Editing
Hex Editing - Guide
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Altering Hero specialties === ==== 00 - Skill Specialty ==== The code for skill specialties works as follows: <span style="color:red">XXXXXXXX</span> D805 <span style="color:blue">YYYYYYYY</span> D8 4D FC where <span style="color:red">XXXXXXXX</span> is a DWORD pointer to a 5% value (in IEEE-754), <span style="color:blue">YYYYYYYY</span> is a DWORD pointer to a value of 1 (again, in IEEE-754) ===== How it works ====== The number of levels is multiplied by the XXXXXXXX DWORD pointer, added to the YYYYYYYY DWORD pointer and then the skill bonus is multiplied by it (D8 4D FC). If we want to change the % gain per level, we only need to change the XX value. If we want to instead make the bonus additive (say x% per level, regardless of how much skill itself adds), we can replace the D805YYYYYYYY with 909090909090 (NOP) and replace the D8 4D FC with D8 45 FC. Therefore it is possible to have a different bonus for one skill than another. ===== Offsets ===== The offsets for each skill specialty bonus are as follows: : Archery - 0x0E4420 : Armorer - 0x0E45C9 : Diplomacy - 0x0E483C : Eagle Eye - 0x0E46E0 : Estates - 0x0E464F : First Aid - 0x0E4BD9 : Intelligence - 0x0E4B69 : Leadership - 0x0E3C81 : Learning - 0x0E4AF9 : Logistics - 0x0E4F1E : Luck - 0x0E3A2B : Mysticism - 0x0E41FE : Necromancy - 0x0E3F92 : Offense - 0x0E4569 : Resistance - 0x0E499C : Scouting - 0x0E432E : Sorcery - 0x0E5B61 ===== Exceptions ===== Specialties for integer-bonuses (Luck, Logistics, Scouting) only have their effect when a full integer is gained from their % bonus. Diplomacy specialty only affects surrender costs. Learning specialty is fully over-writen by the Hota.dll. ==== 01 - Unit Specialty ==== The scaling factor for a unit specialty is a DWORD pointing to a 5% value (in IEEE-754), located at 0x0e6548. Setting the unit IDs to an upgraded unit will ensure only the upgraded units are affected by the specialty. Ballista and Cannon specialty are Unit specialties. ==== 02 - Resource Specialty ==== The amount of resources obtained from a gold specialty is saved at 0x0E4681 (as 350). The code for other resource specialties is possible to edit, but it checks for each resource together and then adds 1 to their growth (therefore its only possible to make all resource specialists increase resource gain by 2, unless a complete re-write of the function is performed). ==== 03 - Spell Specialists ==== ===== Spell specialty types ===== Spell specialty type table starts at 0x0e6358 (with Fire Wall specialty). Each consecutive byte is then the next spell by spell ID (Firewall, Earthquake, Magic Arrow, etc.) up to Slayer. Each spell specialty can take 6 types: : 00 - +100% damage (Luna). Note that Hota.dll overwrites this +100% damage with a much more sensible 25%. : 01 - +50% damage (Ciele). : 02 - Tier bonus A (+3/+3/+2/+2/+1/+1/+0), such as Weakness specialty or Haste specialty. : 03 - Static bonus +2 (Aenain) : 04 - This one is only used by Fortune (Daremyth, Melodia). In contrary to what BTB claims, it sets the value of the spells effect to 3, regardless of spell's level. : 05 - Tier bonus B (+4/+3/+2/+1/+0/+0/+0), only used by Coronius as far as I know. : 06 - Scaling bonus. If a spell does not belong to the spell table, the scaling bonus is applied (for example this applies to the Hypnotize specialist, Astral). : '''But what if we want to change the specialty type for a spell like Hypnotize? ''' We can extend the table by changing 0x0e6296 (equal to 0x2a by default) to a different value, which corresponds to the number of spells in the table -1. If we extend the table, the next specialties will be those for the next spells by spell ID. We have a total of 13 bytes of nop (90), so the last spell specialty we can code this way is Summon Air Elemental. Remember to update all specialties created this way! You shouldn't just leave the nops (90) in the middle of the table! "But what about Victoria, the Land Mine specialist?", you may ask. Well, I'm here to give answers: The command '''lea eax, [esi-0Dh]''' located at 0x0e6291 finds the spell ID of firewall (0d) and chooses it as the first spell on the list of specialties ''(remember? The one that starts at 0x0e6358?)''. By changing it to '''lea eax, [esi-0Bh]''', we can change the first spell ID to 0x0B, or Land Mine. ''Notice, that this reduces the last spell specialty to Summon Earth Elemental, but I doubt anyone will miss the Summon Water Elemental and Summon Air Elemental specialties.'' Next, we have to increase the number of spells in the list by 2 (located at 0x0e6296), and then move the entire spell specialty table, 2 bytes each, because now it starts at 0x0e6358 with Land Mine (and still follows by spell ID). "And what about Eovacius? And Zilare?" Haven't looked at them yet but I believe they may be hard-coded. The specialty types can be changed by altering their commands. Each specialty type (00, 01, and so on) have a DWORD pointer to their appropriate code located in a 28-byte long table starting at 0x0e633c. ===== Changing Tier bonuses ===== Let's say we want to make Olema's Weakness specialty remotely usable, but we still want it to be a tier-based specialty. We can change the bonuses the spell provides for each unit tier in a 28-byte long table that starts at 0x23eaa8. Each 4 bytes corresponds to the next unit level. A similar table for Coronius' specialty type starts at 0x23eac4 (immediately afterwards) and works the same way. ===== Changing the static bonus ===== At 0x0e62e6 the value 0x02 determines the static bonus (such as the one Disrupting Ray specialists get). ===== Changing the scaling bonus ===== At 0x0e631f the DWORD pointer finds an IEEE-754 double precision value for 3% (base game). Replacing this pointer with another one finds a different % bonus. If you don't want the scaling specialties to divide their bonus by unit level, replace f7 f9 at 0xe630b with 90 90 (nop-ing out the division). ===== Specialties that don't work ===== Several specialties don't work because no specialty type can increase their bonus: * Curse * Anti-Magic * Dispel * Slow {{unk}}, but it would probably be way too strong anyway; * Berserk * Blind * Teleport * Remove Obstacle. ==== 04 - Unit (static) ==== Only Xeron is specified to add speed thanks to his static unit specialty. This is (most likely) saved at the following address: 0x4b1b3 {{unk}}. Setting the unit IDs to an upgraded unit will ensure only the upgraded units are affected by the specialty. ==== 05 - Speed specialty ==== Sir Mullich's unit specialty amount (0x02) is located at 0x0E6669. ==== 06 - Unit Upgrade specialty ==== These specialties calculate the upgrade cost automatically, with the same function that calculates upgrade costs in all other cases. If "unupgraded" unit is more expensive than the upgraded one, the message about necessary costs wil appear, but no cost will be stated and the conversion will be free. Setting the unit IDs to an upgraded unit will ensure only the upgraded units are affected by the specialty. ==== 07 - Dragon specialty ==== I believe Mutare's bonus is specified within her specialty block.
Summary:
Please note that all contributions to Heroes 3 wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information