Posts: 973
Threads: 20
Joined: Oct 2010
Anthony Wrote:So if you wanted to level out level-up bonuses, you could alter what bonuses occur at what level, but not the total number of bonuses per level;
Yes.
Or otherwise it requires a little more rearranging of the code.
Quote: level 4 gets 3 bonuses (damage, accuracy, resistance), level 2 and 3 each only get 1.
Uhh...
Level 2 gets 3 bonuses: melee, ranged, resistance.
Level 3 gets 2 bonuses: defense, resistance
Level 4 gets 4 bonuses: melee, ranged, resistance, to hit (and a hitpoint).
Quote:What happens if you put something undefined, such as 2 or 3, in there? (I might try; it might buff some other bit, such as special attack strength).
Other numbers are not undefined
2=ranged type (doesn't make sense to increment that - will be unpredictable)
3=ranged shots (could be nice, increasing the shots with level)
7=movement in half moves (also interesting)
0Dh=current number of figures (more figures at higher levels, yay!)
10h=hit points
11h=scouting range
13h=total number of figures
15h=gaze/touch/poison/holy-bonus/res-to-all modifier
24h=Extra To Hit Melee
25h=Extra To Hit Ranged
26h=Extra To Defend (better blocking at higher levels?)
27h=weapon type (mithril and such, mmmh)
These are the numbers that make some sense to change on level-up.
I've left out the ones that do not make sense.
I suspect a number of these can be used successfully, but it will take some experimentation to see how they work out.
--I like ILSe
July 22nd, 2012, 18:19
(This post was last modified: July 22nd, 2012, 18:59 by Anthony.)
Posts: 591
Threads: 30
Joined: Jul 2012
I like Serena Wrote:Other numbers are not undefined Heh. Well, not defined in your prior post. I see that it's just 2 less than the offset into the monster structure for most of the examples you give (other than the ones over 0x24); the only ones I can see applying in a remotely sensible manner are byte 9 (high order bit of construction cost; should add ~5 to upkeep, but probably only gets bumped for units with construction cost > 256), 0x12 (transport capacity), and 0x14 (construction rate of engineers).
Incidentally, those offsets may be wrong. Not sure what ovr116 is, but assuming the same relative offsets:
8fa8a is in fact 6
8fa9b is in fact 1
8faab is 0x83; was this supposed to be 8faa2?
8fab6 is in fact 6
8fabd is in fact 5
Pattern is not clear; level 3 might be 8fad0 (6), 8fae1 (5), 8fae8 (0), 8fafc (4).
I like Serena Wrote:15h=gaze/touch/poison/holy-bonus/res-to-all modifier Speaking of which, has anyone patched the sign problem with that, where a positive value makes poison attacks (etc) better, but resisted attacks worse?
July 22nd, 2012, 18:35
(This post was last modified: July 22nd, 2012, 19:05 by I like Serena.)
Posts: 973
Threads: 20
Joined: Oct 2010
Anthony Wrote:Heh. Well, not defined in your prior post. I see that it's just 2 less than the offset into the monster structure for most of the examples you give (other than the ones over 0x24); the only ones I can see applying in a remotely sensible manner are byte 9 (high order bit of construction cost; should add ~5 to upkeep, but probably only gets bumped for units with construction cost > 256), 0x12 (transport capacity), and 0x14 (construction rate of engineers).
It's actually the battle-unit structure.
The first part of that structure is indeed copied from the unittype-data structure.
When battle commences, battle-unit structures are set up for all units involved.
This is the time that the experience level is processed to see how much bonuses should be added to the battle-unit structure.
At this time stuff like cost, upkeep, transport-capacity, and construction-ability has no function.
Quote:Speaking of which, has anyone patched the sign problem with that, where a positive value makes poison attacks (etc) better, but resisted attacks worse?
What problem?
I'm not aware of it.
I do know that a higher positive value gives a stronger poison attack.
Resistance modifiers however are always negative.
If the number is positive, I believe the code will effectively put a minus sign in front of it.
In other words, for level-up effects, you'd better not use the gaze-modifier.
That one will take more work to use properly.
--I like ILSe
Posts: 206
Threads: 13
Joined: Apr 2012
cool thx. if i ever make another version of my mod, i will include changes to the lvl boni =)
dance!
Posts: 591
Threads: 30
Joined: Jul 2012
I like Serena Wrote:What problem? It means you can't coherently have, say, poison and death on the same creature, unless the byte gets flipped (which might be true; chaos spawns are the obvious test case).
Oh, see above; I think the byte offsets you posted for level bonuses might be off.
Posts: 973
Threads: 20
Joined: Oct 2010
Anthony Wrote:Incidentally, those offsets may be wrong. Not sure what ovr116 is, but assuming the same relative offsets:
8fa8a is in fact 6
8fa9b is in fact 1
8faab is 0x83; was this supposed to be 8faa2?
8fab6 is in fact 6
8fabd is in fact 5
Pattern is not clear; level 3 might be 8fad0 (6), 8fae1 (5), 8fae8 (0), 8fafc (4).
Sorry, ovr116:1EDB (8faab) was wrong.
The Melee-increment is not editable as a number I'm afraid.
I've edited my previous post to show that.
And no, there's not really a clear pattern, although each of the (editable) numbers can be recognized by the sequence:
This increments the value at offset <code> in the battle-unit structure.
For instance 26 FE 47 00 would increment melee.
And the level-conditions can be recognized by the sequence:
Code: 83 FE <level-minus-2>
For instance 83 FE 01 signifies the start of level 3 bonuses.
--I like ILSe
Posts: 973
Threads: 20
Joined: Oct 2010
Anthony Wrote:It means you can't coherently have, say, poison and death on the same creature, unless the byte gets flipped (which might be true; chaos spawns are the obvious test case).
Ah, you can, but obviously they are tied to each other.
For the combination you should use a positive number.
I just looked up Chaos Spawn, which has a gaze/poison modifier of +4.
This specifies poison strength 4 and resistance modifier -4 for the other attacks.
Edit: Oh, and the doom gaze uses the ranged attack strength (if I'm not mistaken).
Quote:Oh, see above; I think the byte offsets you posted for level bonuses might be off.
Yes. I just saw that. I've corrected it now.
--I like ILSe
Posts: 973
Threads: 20
Joined: Oct 2010
Anthony Wrote:Not sure what ovr116 is
ovr116 is the prefix IDA uses to identify code segments.
"ovr" is short for "overlay".
The Tweaker has an address calculator (button in the main window).
It works after connecting to the game, or after loading wizards.exe/magic.exe.
With the address calculator you can convert IDA addresses to offsets in the corresponding executable and vice versa.
--I like ILSe
Posts: 591
Threads: 30
Joined: Jul 2012
I like Serena Wrote:When battle commences, battle-unit structures are set up for all units involved.
This is the time that the experience level is processed to see how much bonuses should be added to the battle-unit structure. Level bonuses are visible in overland; does it regenerate the structure every time you left-click on a unit?
Posts: 973
Threads: 20
Joined: Oct 2010
Anthony Wrote:Level bonuses are visible in overland; does it regenerate the structure every time you left-click on a unit?
Yes.
The battle-unit structure is used to view a unit, whether in combat or on the overland map.
It shows you what the unit would look like in combat.
--I like ILSe
|