Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: How to edit HotA?
Thread: How to edit HotA? This Popular Thread is 111 pages long: 1 10 ... 13 14 15 16 17 ... 20 30 40 50 60 70 80 90 100 110 111 · «PREV / NEXT»
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted August 08, 2017 12:08 PM

I use Hex Editor Neo, it's good and free.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted August 08, 2017 12:10 PM

I use HxD (free), but if you can pay you might like WinHex.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted August 08, 2017 12:19 PM

Quote:
Coming back to subject, for a 25% for citadel, writing "do you lack citadel, so divide by 4" shall work ?
And for 50% for caslte ? I'm not sure to understand well what to write. Some "do you lack a castle, so divide by 2" ?

See my latest patch. All you need to do is to replace blue and green numbers with those you want.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted August 08, 2017 01:11 PM

I use UltraEdit, although hex editing is only a minor part of what that editor can do. It's not freeware, either.
____________
The last Reasonable Steward of Good Game Design and a Responsible Hero of HC. - Verriker

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
FfuzzyLogik
FfuzzyLogik


Known Hero
posted August 09, 2017 02:06 AM

But just so few caracters dont code all abilities right ? For "spellcaster resurection", "animate demons", "drain life", things are written differently no ?
I suppose these special abilities are coded somewhere and there its written "the creature number ZZZ" get this ability, no ? So here less "repetition" to find where it is...

I noticed (even if no "text tell this") fire elementals do extra-damage on water and same in other side. Do they have hidden some "hates water and ice elementals" ? I noticed psychic elementals do less damage on undead. Someone know mecanics here ?

Good night,
____________
FfuzzyLogik.

If I'm crazy ? Sure, because its madness to be normal...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Admirable
Supreme Hero
posted August 09, 2017 05:45 AM

@AlexSpl nice patch!

@FfuzzyLogik
From my observations. there are a lot of different areas that each deal with a separate ability type... some of them are in the format...

if (creature_type == specific_creature)
  { special ability }

...while some other abilities are organized in a table, with switch() and so on. I don't have a complete list and anyway such a list might be a bit exhaustive since all creature abilities are spread a bit over the place. If you have specifics, that may prove easier to identify.

Psychic Elementals deal half damage to all creatures immune to mind spells (e.g. Giants, Titans, Undead, ...).

Regarding Water/Fire Eles, I guess it's the developers' take on both of them being weak to the opposite element.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted August 09, 2017 08:24 AM

Air and Earth Elementals also hate each other.
And Magic Elementals deal half damage to creatures immune to magic. (Other Magic Elementals and Black Dragons)

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted August 09, 2017 08:36 PM

Does anyone know how to edit starting armies of Ranloo, Beatrice & Kinkeria? I suppose it's somewhere in HotA.dat?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted August 09, 2017 11:12 PM
Edited by AlexSpl at 23:29, 09 Aug 2017.

Beatrice

           ID     Min-Max
1st slot: 364Fh 366Fh-3673h
2nd slot: 3653h 3677h-367Bh
3rd slot: 3657h 367Fh-3683h


Kinkeria

           ID     Min-Max
1st slot: 38EFh 390Fh-3913h
2nd slot: 38F3h 3917h-391Bh
3rd slot: 38F7h 391Fh-3923h


Ranloo

           ID     Min-Max
1st slot: 3BC8h 3BE8h-3BECh
2nd slot: 3BCCh 3BF0h-3BF4h
3rd slot: 3BD0h 3BF8h-3BFCh

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
phoenix4ever
phoenix4ever


Legendary Hero
Heroes is love, Heroes is life
posted August 09, 2017 11:32 PM

Thanks again Alex. That's great.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
FfuzzyLogik
FfuzzyLogik


Known Hero
posted August 10, 2017 04:28 PM
Edited by FfuzzyLogik at 16:54, 10 Aug 2017.

So then, special abilities are so "hard hardcoded" and difficult to change. But is it possible to "switch creatures" ? I mean change creature 3 with the 2... The special abilities will stand for "old" creature 3 and 2 respectively.

For example, NWC programmers switched Fortress creatures : Gorgon is in "third position" and his abilities (death stare) are coded for this position. But its relocated to be the 5th creature of this race. They have probably coded the "special" abilities and creatures then think they were not in good position.
So then, it may be possible to do the same and, for example, switch cyclops be a creature 5 instead of 6, you could switch them with rocs. So "special" abilities will still be the ones for cyclops but cyclops will be build as creature 5 and not 6.

You'll have to change creature level like this then :
Here is the gorgon and mighty gorgon caracteristics :
Gorgon : 7 0 0 0 4 0 0 0 10 4D 67 0 4 4D 67 0 11 0 0 0
M. Gorg : 7 0 0 0 4 0 0 0 FC 4C 67 0 F0 4C 67 0 11 0 0 0
This is where is located the fact its the level 5 creature (because level 1 is 0)
The 11 at end means its living and 2 hexes. So death stare is not coded here. If you switch again this creature to be the level 3 creature, you'll have a gorgon with "serpentfly and dragonfly" abilities.

And then you'll have no correction for pictures nor of heroes' specialities if I'm right because will still be focusing creature number who will be the same.
You just have to correct the "creature level".

I still don't understand very well how "not too hard coded" abilities are written. Using what I know about creatures abilities  and the list Maurice gave I made here a list of what's written may mean :
1 0 0 0 : living 1 hex
10 80 0 0 : living attack twice (notice than you cannot make a "hit twice but shoot one time).
11 0 0 0 : living 2 hexes
11 80 0 0 : living 2 hexes attack twice
11 0 1 0 : living 2 hexes, no ennemy retaliation
11 0 9 0 : (cerberi) living 2 hexes "9 no ennemy retaliation and 3 headed attacks" ?
12 0 1 0 : (harpy) living fly no ennmy retaliation
13 0 0 0 : living fly 2 hexes
14 0 0 0 : living Shoot 1 hex
14 0 10 0 : (Magog) living shooting and 10 for fireball attack ? 14 10 0 0 : living Shoot no melee penalitiy
14 80 0 0 : living Shoot twice 1 hex
14 18 0 0 : (archmages) living Shoots no melee penality no obstacle penality
14 18 0 0 : (beholders) living shoot no obstacle penality (not written in description) and no melee penality
12 40 0 0 : (effreti and effreti sultan) living flying, I think fire 40 is fire magic immunity
15 10 0 0 : (medusa) living shooting 2 hex no melee penality

2 0 0 0 : (gargoyle) fly not living but still have moral
2 4 6 0 : (wraithes) undead fly
2 4 7 0 : (vampires) undead fly no ennemy retaliation
4 4 16 0 : (liches and power liches) undead shoot with death cloud
1 4 6 0 : (death and dread knights) undead, 2 hexes... The 1 at start ??

0 4 2 0 : Golem style (same for elementals and golems)
0 44 2 0 : (fire elementals) golem style but after... ? Fire magic immunity probably added on "golem style"
0 4 0B 0 : (psy and magic elementals) golem style attack all around no ennemy retaliation ?
5 4 2 0 : (Ice elementals) golem style shooting ? But 0 4 2 0 for storm elemental, I don't understand... And I don't know how to add them "no melee penality, that's written in text but they have not this ability...
2 44 2 ??: (energy elementals) golem style fly fire magic immunity ?

80 4 6 80 : (bone/ghost dragons) undead, fly, 2hexes (order here ??) dragon type.
34 0 0 0 : (cyclops) living 1 hex shooting destroy walls ?
10 1 1 0 : (devil) living, 1 ??, no ennemy retaliation, king ??
12 1 0 0 : Angels ?? living Fly but "1" ??
13 1 0 0 : Archangels ?? living fly 2 hexes but "1" ??
9B 0 0 80 : Green and gold dragons (not sure what it means, probably 2 hex attack for 80 and 9B "king")
9B 0 0 80 : (red dragon) living dragon style 2 hexes ??
9B 4 0 80 : (black dragon) living dragon style 2 hexes ??
10 6 0 0 : (Giant) living (6 : immune mind spells ? king)
14 6 0 0 : (Titan) living, shooting (6 ? king)
9B 40 0 0 : (both phoenixes and firebirds) living fly 2 hexes fire immunity ?
91 0 0 0 : (behemoths) no sure ? living 2 hexes king ?
91 0 9 0 : (hydra) not sure ? living 2 hexes king, no ennemy retaliation and attack all around ?

For "hard coded abilities" how many slots you have to define whitch creature gets it ? For example, Mummy, Death K, Dread K get "curse attack". Can we add one more ?
I'd like to make the thief "strike and return" because it looks nice for a thief to go, "back attack" and come far. I find this fun but still don't know where "strike and return" is written.

I hope it helps,
____________
FfuzzyLogik.

If I'm crazy ? Sure, because its madness to be normal...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted August 10, 2017 05:25 PM
Edited by Maurice at 17:35, 10 Aug 2017.

It's coded by internal creature ID. The game does a lot of comparison for special abilities against that creature ID and you would be able to swap those around. You just need to change the hard-coded switch-statements and if-statements that check against it.

Also, you have to translate your hex values to bit values to make better sense of it. Take a look at the bit wise value I posted before:
Quote:
Bit 1: Unsure, it's 1 for all Dragons, Behemoth and Ancient Behemoth, Hydra and Chaos Hydra, Fire Bird and Phoenix. It's 0 for all other creatures. I haven't found a link between these creatures;
Bit 2: Is this unit a War Machine?
Bit 3: Can this unit attack Walls?
Bit 4: Is this a Living Unit (i.e. susceptible to healing spells and Death Ripple)?
Bit 5: Unsure, does this unit's attack hit 2 hexes?
Bit 6: Does this unit use a ranged attack?
Bit 7: Is this unit a Flying unit?
Bit 8: Does this unit occupy 2 hexes?

Bit 9: Does this unit attack twice?
Bit 10: Does this unit have Fire Immunity?
Bit 11: Unused (always 0).
Bit 12: Is this unit's melee attack as effective as its ranged attack?
Bit 13: Does this unit suffer no Ranged penalty (or suffer no Siege Wall Ranged attack penalty, not sure)?
Bit 14: Unsure. It's 1 for all Golems, the Giant and Titan, the Gold Dragon and all Undead, Elemental and War Machine units. It's 0 for all other units.
Bit 15: Unsure; is only 1 for Giant and Titan, 0 for all other units.
Bit 16: Unsure; is only 1 for Angel, Arch Angel, Devil and Arch Devil, 0 for all other units.

Bit 17, 18 and 19: Unused (always 0)
Bit 20: Does this units' Ranged attack have an area effect?
Bit 21: Does this units' Melee attack have an area effect?
Bit 22: Is this unit an Undead unit?
Bit 23: Is this unit not affected by Morale?
Bit 24: Does this unit not provoke enemy retaliation on its attack?

Bit 25: Is this unit a Dragon?
Bit 26-32: Unused (always 0).


Each bit says whether it applies to the creature (specific bit is 1) or not (bit is 0). For example, take your

12 0 1 0 : (harpy) living fly no ennmy retaliation

entry. A hex value of 12 is 00010010 in binary. Looking at the table,  you will see that bit 4 means this is a Living Unit, bit 7 means this is a Flying Unit. The other bits are off and hence don't apply to this unit. The second hex value is all 0's, so bit 9 through 16 all don't apply to the Harpy unit. The third hex value translates as 00000001, so only the last bit is 1, which is bit 24 from the list above. You can see that it means this unit doesn't provoke an enemy retaliation. You can find similar for all other creatures in your list.
____________
The last Reasonable Steward of Good Game Design and a Responsible Hero of HC. - Verriker

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Admirable
Supreme Hero
posted August 10, 2017 06:37 PM
Edited by RoseKavalier at 18:38, 10 Aug 2017.

FfuzzyLogik said:

For "hard coded abilities" how many slots you have to define whitch creature gets it ? For example, Mummy, Death K, Dread K get "curse attack". Can we add one more ?
I'd like to make the thief "strike and return" because it looks nice for a thief to go, "back attack" and come far. I find this fun but still don't know where "strike and return" is written.



Maurice already covered flags, but you can also work directly with hex numbers and add them together.
e.g.

Two-hex = 00000001h
Flyer = 00000002h
Shooter = 00000004h
Undead = 00040000h
Sum    ----
00040007h


~~~

Harpies strike and return is in the format
if (creature_type == (harpy || harpy_hag))
    {strike_and_return}

The comparison for harpies is at 7832Bh (CMP EAX, 0x48) and hags just after at 78330h (CMP EAX, 0x49). To add another unit here you'll need a hook or to condense code like AlexSpl did previously.



~~~

Creature resistances are in a table-switch() format, starting with Dwarves and finishing with Crystal Dragons at 4A658h, one byte each. And by this I mean, all creatures in between these two, but **not** the others outside this range. So if you want to add resistance to Archangels, you need a lot more work. The list of creatures sorted by ID are available a bit all over the place, a quick search should yield it.

0h ~ 20% resistance
1h ~ 40% resistance
2h ~ Immune Spell Levels 1-3
3h ~ Immune Spell Levels 1-4
4h ~ Immune All Spells
5h ~ Air Elemental type
6h ~ Earth Elemental type
7h ~ Water Elemental type
8h ~ No immunity/resistance

There's another similar process for damage resistance/increase itself starting with Stone Golem and finishing with Energy Elemental at 4b280h.

0h ~ Stone Golem type
1h ~ Iron Golem type
2h ~ Air Elemental type
3h ~ Earth Elemental type
4h ~ Fire Elemental type
5h ~ Water Elemental type
6h ~ Gold Golem type
7h ~ Diamond Golem type
8h ~ No damage resistance

~~~

Some abilities applied after attack are also in table switch() format at 412D8h starting with Vampire Lords and finishing with Rust Dragon.

0h ~ Vampire Lord type
1h ~ Thunderbird type
2h ~ Mighty Gorgon type
3h ~ Serpent Fly type
4h ~ Rust Dragon type (Reduced defense)
5h ~ None

~~~

Some more abilities at 4065Ch starting with Dendroid Guards and finishing with Mummies.

0h ~ Dendroid type
1h ~ Unicorn type
2h ~ Zombie type
3h ~ Black Knight type (Curse)
4h ~ Ghost Dragon type
5h ~ Medusa type (Stone)
6h ~ Scorpicore type
7h ~ Wyvern Monarch type
8h ~ Rust Dragon type (the % chance to do damage)
9h ~ None

~~~

This is by far not a complete list but covers what you asked for.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
FfuzzyLogik
FfuzzyLogik


Known Hero
posted August 10, 2017 07:16 PM
Edited by FfuzzyLogik at 19:21, 10 Aug 2017.

Thanks for your patience about my lack of understanding.

So, it means if I want to switch Demons and Hell Hounds for example, I swap the "hardcoded" adress.

Orginal caracteristics :
Demon :   3 0 0 0 3 0 0 0 4C 51 67 0 40 51 67 0 1 0 0 0
HDemon :  3 0 0 0 3 0 0 0 38 51 67 0 2C 51 67 0 1 0 0 0
HellH :   3 0 0 0 4 0 0 0 24 51 67 0 18 51 67 0 1 0 0 0
Cerberi : 3 0 0 0 4 0 0 0 10 51 67 0 4 51 67 0 1 0 0 0

Changed caracteristics :
Demon :   3 0 0 0 3 0 0 0 24 51 67 0 18 51 67 0 1 0 0 0
HDemon :  3 0 0 0 3 0 0 0 10 51 67 0 4 51 67 0 1 0 0 0
HellH :   3 0 0 0 4 0 0 0 4C 51 67 0 40 51 67 0 1 0 0 0
Cerberi : 3 0 0 0 4 0 0 0 38 51 67 0 2C 51 67 0 1 0 0 0
And now, Demons and Horned demons are level 3 creature (but still not the look of creature, just abilities are swapped) ? And Hell hounds and cerberi the level 4 creatures. That's it ?

They will be build in the normal order or the hardcoded adress indicates too where its build (I mean in slot 3 or 4 in town) ?

But the "raise devil" spell of Pit lords are affecting "the level 4 creature" or the "devil" hardcoded ID ?

The idea I had is to make Pit lord ability a bit less strong making it able to make only level 3 creature. And Cerberi looks more strong than Demons... So a switch looks intresting.

Understood for the abilities but I find not easy and time consuming (because you must take care to not make mistakes) to swap between languages. I'm not a programmer as you may notice and my english is not the best (that do not help to understand well subtelties).

I was answering during the same time you did RoseKavalier. Thanks alot for your answers. Its still hard for me to find the right lines but your posts will give me possibility to try it.

Thanks alot to you both,
____________
FfuzzyLogik.

If I'm crazy ? Sure, because its madness to be normal...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Admirable
Supreme Hero
posted August 10, 2017 08:06 PM

FfuzzyLogik said:

They will be build in the normal order or the hardcoded adress indicates too where its build (I mean in slot 3 or 4 in town) ?


But the "raise devil" spell of Pit lords are affecting "the level 4 creature" or the "devil" hardcoded ID ?


I haven't spent much time looking at creature tables you're using, but to me it looks like you're swapping defs (image). Probably not what you're looking for but I could be wrong.

FfuzzyLogik said:
But the "raise devil" spell of Pit lords are affecting "the level 4 creature" or the "devil" hardcoded ID ?

1A776Bh is creature ID for Pit Lords to raise (0x30 = Demon, 0x2D = Hell Hound)
Source: TEW4

You don't need to be a programmer for this type of stuff (I'm not), but time, patience and practice. The more you do it, the easier it becomes.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
FfuzzyLogik
FfuzzyLogik


Known Hero
posted August 10, 2017 09:04 PM

Sure, but I opened MM3 with hex editor for the first time a file few days ago. So many things are quite mysterious to me and even basics explanations are not easy for me now. They are probably simple for someone who knows more how its written...
I won't take you too much of your time so I won't ask too much things but hoping it helps other persons, I ask some.

For now I don't understand where is (for example) 1A776Bh.
At this adress (1a776b) to (1a777e) I got :
fb ff 89 83 e8 32 01 00 eb 0a c7 83 e8 32 01 00
00 00 00 00 89

I do not have the screen you have with "CMP EAX 48" or something like that is written and where things have some "organisation" who looks more readable... And don't understand well what a hook is... I'll read again later when I understand more how hex editor works.

Yes I need time, patience, practice and... Maurice, AlexSpl or RoseKavalier's help ^^
Thanks to you all for your time !

But do you "need" some things ? I mean if you're still here it means you still play and possibly mod this game. May I do something you shall need ?
____________
FfuzzyLogik.

If I'm crazy ? Sure, because its madness to be normal...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Admirable
Supreme Hero
posted August 10, 2017 09:53 PM
Edited by RoseKavalier at 21:56, 10 Aug 2017.

FfuzzyLogik said:
Sure, but I opened MM3 with hex editor for the first time a file few days ago. So many things are quite mysterious to me and even basics explanations are not easy for me now. They are probably simple for someone who knows more how its written...
I won't take you too much of your time so I won't ask too much things but hoping it helps other persons, I ask some.

For now I don't understand where is (for example) 1A776Bh.
At this adress (1a776b) to (1a777e) I got :
fb ff 89 83 e8 32 01 00 eb 0a c7 83 e8 32 01 00
00 00 00 00 89

I do not have the screen you have with "CMP EAX 48" or something like that is written and where things have some "organisation" who looks more readable... And don't understand well what a hook is... I'll read again later when I understand more how hex editor works.

Yes I need time, patience, practice and... Maurice, AlexSpl or RoseKavalier's help ^^
Thanks to you all for your time !

But do you "need" some things ? I mean if you're still here it means you still play and possibly mod this game. May I do something you shall need ?


I use OllyDbg which at first may seem a bit confusing but provides a lot of nice features and displays the unreadable hex dump to "complicated-but-readable" Assembly.

You're looking at h3hota.exe right?

If you're using a hex editor, look for whatever is before the 'h' or after 0x ...
e.g.
1A776Bh or 0x001A776B look for 001A776B (below)
If you're using a memory editor, you need to add 400000h or 0x400000 to the address.
e.g.
1A776Bh or 0x001A776B look for 005A776B (above)

____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
FfuzzyLogik
FfuzzyLogik


Known Hero
posted August 10, 2017 10:29 PM
Edited by FfuzzyLogik at 22:58, 10 Aug 2017.

For now I was looking at Heroes3.exe... I'm making my "mod" on heroes III before going to H3HotA.exe and I hope "copy paste" some things if they work well on the game "I know"...

Opening Hota.exe, the things are written like you wrote !

That's why I didn't find at the adresses you let the things were hoped ^^ I thought the H3HotA.exe file is quite same "at beginning" but different at "the end".

But they have added some things in "middle" of file so adresses are changed... That's it ?

In H3.exe I didn't found the "30" searched at your first post. But when I searched "30 50 8c cf" I found it at "1a745b". That was a bit far... The others will not be far from the ardesses you gave, I'll find. Thanks alot.

Very sorry ^^

To be "complete" it lacks just :
- "regenerating" (troll, wrights),
- mana drain (wrights),
- mana "steal" (familiar),
- no range penality (sharpshooter),
- "not take care of 30% or 60% of ennemy armor (behemoths),
- "2" or "unlimited" retaliations (griffon),
- "magic damper" (pegasi)
- "heroes spell cost less" (magi)
- "get fireshield" (effreti sultan)
- "doble damage" (dread knight)
- "immune to blinding" (troglodyte)
- "spellcaster" with different kind :
   => animate demon,
   => casting benefit spell (elementals and protection from XXX, bloodlust from ogre magi)
   => casting random positive spell (genies),
   => casting random global spell (enchanters)
   => casting random damage spell.
Those abilities are not the most used in game, they are probably written like "strike and return" right ?

With the "special attacks" are at hand now, I think I got really many things to do for equilibration ! Thanks alot !!
____________
FfuzzyLogik.

If I'm crazy ? Sure, because its madness to be normal...

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Maurice
Maurice

Hero of Order
Part of the furniture
posted August 10, 2017 10:43 PM
Edited by Maurice at 22:50, 10 Aug 2017.

Basically, the "CMP EAX 48" part is simply assembly code. It's pretty bare-bones machine language, which is covered with just a few hex values.

83 F8 48 is the hex code of that assembly command. Whenever the CPU encounters this particular hex code during program execution, it will perform the instructions that in assembly read "CMP EAX 48". Those are called "opcodes". This particular instruction simply tells the CPU to compare the value stored in register EAX with the (hex) value of 48. This results in a boolean return value, TRUE if the value in the register matches hex 48, FALSE if it isn't. This TRUE/FALSE return value is stored in a state flag for the CPU. Then, when it works through the next instruction, it can use these state flags to figure out what to do.

In this particular case, the next opcode is 74 05, which in Assembly says "JE 05". JE is short for "Jump If Equal" (i.e. it will jump if the above comparison yielded "TRUE") and then moves 5 bytes further down the code to find the next instruction it has to perform. If it were false, it would continue with the next bytes after the 74 05 instruction instead.

Assembly uses registers to store values and manipulate them. EAX is one of the most commonly used registers, but others exist as well: EBX, ECX and EDX. Originally in ancient times, each had a specific use, but these days it's fairly general. These four registers can hold values of up to 32 bits. Smaller subsets of these registers exist too, but that goes a bit beyond the basics.

____________
The last Reasonable Steward of Good Game Design and a Responsible Hero of HC. - Verriker

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
RoseKavalier
RoseKavalier


Admirable
Supreme Hero
posted August 10, 2017 10:54 PM
Edited by RoseKavalier at 23:04, 10 Aug 2017.

FfuzzyLogik said:
For now I was looking at Heroes3.exe... I'm making my "mod" on heroes III before going to H3HotA.exe


I'm assuming you're working with HoMM3 Complete?
A word of advice: do 'Create HD exe' with the HDmod and edit that instead.

Why?
There are several versions of H3 along the years. The one that is most commonly used for modding is version 3.2 (HotA, HDmod, WoG) whereas Complete is 4.0. It's possible to make a mod that works for version 3.2 and 4.0 but if you're doing manual hex edits, you'll be really sad when you try to port your modifications to HotA or something else.

FfuzzyLogik said:

Those abilities are not the most used in game, they are probably written like "strike and return" right ?


From memory, yes to a lot of those. The ones I haven't previously looked up are probably similar too.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 111 pages long: 1 10 ... 13 14 15 16 17 ... 20 30 40 50 60 70 80 90 100 110 111 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.2431 seconds