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!
== Artifacts == All stats given by artifacts are written into a table at 0x23e758, 4 bytes for each artifact (Attack, Defense, Power, Knowledge). The artifact traits are specified in artraits.txt, while artifact pick-up events are defined in artevent.txt (both in Hota_lng.lod). Interference amount of the Plate of the Dying Light is specified as a IEE-754 floating point value at 0x1d40c8 in Hota.dll === Combination Artifacts === Combination artifact's components are specified at a few functions, starting at 0x04c63d. For further reading see BTB2's guide (linked below, as External Link #3). Be aware! BTB2's guide is either wrong or outdated! His method of removing components seems to work correctly, however, most likely due to HotA putting their combination artifacts in HotA.dll to push them in between base game combination artifacts, or for another reason, ''his method of increasing the number of items does NOT work''. However, not all is lost. There's 8 bytes of nop (90) commands starting at 0x4c8c8, and we can use them to add an extra item (to showcase it, I'll present a code for adding an extra item to the Ring of the Magi's requirements. This seems a safe method, since only a short push is used, and therefore I advise changes to 3-piece combination artifacts to simply copy this method and swap Ring of the Magi with their edited artifact). :0x4c85b 6a '''XX''' (ref item ID) -> eb 6d (jump 109 bytes forward) :0x4c8c8 90909090 90909090 -> eb 06..(skip following code)...6a '''XX''' (ref item ID) 6a '''YY''' (2nd ref item ID).....eb 8d (jump backwards 115 bytes) Replace emboldened text with your appropriate artifact IDs. Remember to also update the number of components (in this example at 0x04C861). Note, that the method described above only works for a jump of 125 bytes or less. Gladly, there's a few other empty spaces that can be used for adding extra components: * 0x4c25c (11 bytes of nop) * 0x4c2d6 (10 bytes) * 0x4c347 (9 bytes) * 0x4c3c7 (9 bytes) * 0x4c622 (14 bytes) * 0x4c8c8 (8 bytes) * 0x4ca15 (11 bytes) * 0x4d008 (8 bytes) Simply use the available space within 125 bytes of the definition of any of the original components. If this can't be done, swap your artifact with another, which can be edited. Note, that if you're using HotA, it's much safer to just edit appropriate artifact reference IDs and add other appropriate components (or replace the resulting artifact) by editing Hota.dat (see: [https://heroes.thelazy.net/index.php?title=Hex_Editing_-_Guide/artsinfo0|HotA Artifacts - artsinfo0] === Making new Combination Artifacts === For now it is wholly unknown how to do it. HotA devs seem to now their way around it.{{unk}} See below. What might work is repeating a function identical to that of another artifact with different properties using some empty space. Requires further testing. === HotA Artifacts === Hota's new artifacts are coded in the Hota.dat. To edit their properties, you need to edit their text (or use hexadecimal values for ASCII to match their text in hex editing). Artifacts are coded as follows: ==== artsinfo0 ==== This part of the file includes partial data on all HotA artifacts, written as follows: :<nowiki>#</nowiki>Artifact Name :<ref_ID> :X Y Z # Description: :P Q R # Dif abl, S points :-1 Note, that the ref_ID above is written in decimal system. The X Y Z applies a buff to the artifact, seemingly by coding first the bonus type with X, amount with Y and optional specification with Z. * 0 - Increase Attack / Defense * 1 - Add Spell Power * 2 - Add Knowledge * 7 - Different Ability, Y = AI value {{unk}} (it's described as "points") * 8 - Movement artifact? * 13 - Restrict spells; Y = 1 for Cloak of Silence, 4 for Ring of Oblivion * 16 - Add daily resource growth, Y = amount, Z = resource type (0 = wood, 6 = gold) * 24 - Enemy morale bonus * 25 - Enemy luck bonus The P Q R are coded in the same way as above and refer to a second ability. However, the method above seems to suggest some artifacts have different bonuses than they actually possess: Ironfist of the Ogre doesn't increase either attack or defense; Trident of Dominion increases attack by 6, etc. This part of the file also includes definitions of all combo artifacts and their components. F.e. Diplomat's Cloak: :<nowiki># </nowiki>Diplomat's Cloak :12 141 3 66 67 68 * 12 is the number of the combination artifact (including SoD ones) * 141 is the decimal reference ID of the Diplomat's Cloak * 3 is the number of components * 66 67 68 are the reference IDs of components (decimal) Note, that this can be used to effectively alter any base-game combination artifact! Simply add a line before these artifact definitions :<nowiki># </nowiki>Sample Text :N RIF C R+ R++ R+++ R++++, where N is the number of combination artifact (counting the way they're placed in the .exe code), RIF is the reference ID of the final artifact, R+, R++ and so on are the additional components. To showcase adding an extra requirement to the Ring of the Magi (since a similar concept was used above) and replacing the Ring of the Magi with the AB blade and requiring a Sword of Hellfire: :<nowiki>#</nowiki> Armageddon's Blade :10 128 1 11 (11 is the reference ID of the new item - Sword of Hellfire). Sadly, new combination artifacts can't simply be added this way. === art<ref_ID> === art<ref_ID> entries in HotA.dat (as visible in the Hota.editor.exe) can be used to alter an artifact's name, adventure map event text, description, slot type and rarity class (treasure, minor, major, relic). Here is also the true artifact bonus data coded. Note that the Reference ID is in decimal. :gold_price <nowiki>#</nowiki> cost - (cost of 0 is used if an artifact cannot normally appear, f.e. if it's a Combination Artifact. :slot <nowiki>#</nowiki> slot type (0 - none, 1 - head, 2 - shoulders, 3 - neck, 4 - right hand, 5 - left hand, 6 - torso, 7 - ring, 8 - feet, 9 - misc, 10 - ballista, 11 - ammo cart, 12 - first aid tent, 13 - catapult, 14 - spell book) :class <nowiki>#</nowiki> type (1 - none, 2 - treasure, 4 - minor, 8 - major, 16 - relic) :0 <nowiki>#</nowiki> disabled as defaults (0 - no, 1 - yes) :0 <nowiki>#</nowiki> add new spells (0 - no, 1 - yes) :0 <nowiki>#</nowiki> attack bonus (_int8_) :0 <nowiki>#</nowiki> defense bonus (_int8_) :0 <nowiki>#</nowiki> spell power bonus (_int8_) :0 <nowiki>#</nowiki> knowledge bonus (_int8_)
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