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 ]
New Server | HOMM1: info forum | HOMM2: info forum | HOMM3: info forum | HOMM4: info forum | HOMM5: info 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 thread is 21 pages long: 1 2 3 4 5 ... 10 ... 17 18 19 20 21 · «PREV / NEXT»
RoseKavalier
RoseKavalier


Responsible
Famous Hero
posted August 14, 2017 02:32 PM
Edited by RoseKavalier at 20:34, 14 Aug 2017.

I don't know anything about adding new monsters, check WoG tutorials for that.

It's possible using only hex edit (and a lot of work) to extend the list of creatures with special abilities but with limitations.
But in this case you might just better be served with a HDmod plugin (hooks).

Spells cost less and damper are function calls (i.e. check if your hero has this creature & check if your enemy has this creature). They are both called twice (check for Mage/Archmage & Pegasus/Silver Pegasus) and currently not cumulative.

The not-cumulative part can probably be modified, but adding new creatures with these abilities would require hooks.

ED: looked it up.
Creature IDs in purple.
Making them additive should be possible but it's a bit of work.
i.e. store first result of AL (0 or 1), add this result to the second AL result, multiply that by 2 and add/sub to ESI.

____________
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


Supreme Hero
Heroes is love, Heroes is life
posted August 21, 2017 11:29 AM
Edited by phoenix4ever at 22:39, 21 Aug 2017.

Would it be possible to edit these 4 artifacts?
* Celestial Necklace of Bliss from +3 -> +2
* Lion Shield of Courage from +4 -> +3
* Sword of Judgement from +5 -> +3
* Helm of Heavenly Enlightenment from +6 -> +3

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


Adventuring Hero
posted August 22, 2017 02:27 PM
Edited by FfuzzyLogik at 14:30, 22 Aug 2017.

I agree with your wish... These artifacts are too strong.
The +X-Y relics are bad compared to these ones... For example +10-2 (thunder helmet and titan cuirass) gives "+8". We know that might is stronger than magic and magic artifacts are worst than might... Here the +3 (necklace of bliss) adds +12 in total so "50% better" if we just care about amount of caracteristics added. The +4 to each caracteristic adds +16 in total (2 times stronger), +5=> +20 and worst of all +6 => +24... So 3 times stronger than thunder helmet or titan cuirass... I think these two artifacts wourd require a boost (+12-3 instead of +10-2) and the "too strong ones" effectively "nerfed".
You proposition is quite simple and efficient but make the modded artifacts are "the same" than some other... I'd prefer to change these artifacts by +X Attack and +X spell power and other with +Y defense and +Y knowlege... To make "new" kind of combo (not only attack and defense or spell power and knowlege). But I think its harder to do...

Sorry but I don't know where artifact's proprieties are stroed.
Have a good day,
____________
FfuzzyLogik.

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

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


Supreme Hero
Heroes is love, Heroes is life
posted August 22, 2017 08:08 PM

Exactly, especially the Helm is really bad at +24, there are two other helms that are relics, but they give only +8 and look really bad compared to it. The sword gives +20 and the other relic sword gives only +9 and the shield gives +16 and the other relic shield gives only +9...  

Does'nt anyone please know where and how to edit these artifacts???

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


Responsible
Famous Hero
posted August 26, 2017 02:52 PM

phoenix4ever said:
Would it be possible to edit these 4 artifacts?
* Celestial Necklace of Bliss from +3 -> +2
* Lion Shield of Courage from +4 -> +3
* Sword of Judgement from +5 -> +3
* Helm of Heavenly Enlightenment from +6 -> +3


Artifacts primary bonuses are stored at
23E758h
4 bytes per artifact, 1 byte per primary (A-D-SP-K)
Artifact IDs

For instance, Sword of Judgment is art id #35
23E758h + 35*4 = 23E7E4h
____________
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
Serp
Serp


Adventuring Hero
posted August 26, 2017 03:38 PM

Dont want to open a new thread for that:

Modding HD Mod ?
As some of you might know, baratorch already implemented "confirmation window for scholar and witch hut". It was available in a HD mod version few months ago, but then was disabled again.

Isn't it possible to switch it on somewhere?

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


Responsible
Famous Hero
posted August 26, 2017 05:50 PM

Serp said:
Dont want to open a new thread for that:

Modding HD Mod ?
As some of you might know, baratorch already implemented "confirmation window for scholar and witch hut". It was available in a HD mod version few months ago, but then was disabled again.

Isn't it possible to switch it on somewhere?



My guess is no, but it's not too difficult to create your own plugin that does this, you need 1 patch to create the refuse button and 1 hook to handle the decision.
____________
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
Baronus
Baronus


Supreme Hero
posted August 26, 2017 07:30 PM

I see you big knowlege. And maybe someone knows where is levelling alghorithm?

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


Supreme Hero
Heroes is love, Heroes is life
posted August 26, 2017 07:50 PM

Thank you RoseKavalier.

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


Responsible
Famous Hero
posted August 26, 2017 11:22 PM

Baronus said:
I see you big knowlege. And maybe someone knows where is levelling alghorithm?

Level up
DA990h
Give experience
E3620h
____________
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
Baronus
Baronus


Supreme Hero
posted August 28, 2017 08:36 AM
Edited by Baronus at 08:37, 28 Aug 2017.

Great thanks! Now I must think how it works :-) I want to mod experience requires to level up. But in HIV :-) Are the same! But skill limit is 100! Not 24! So faster will be better.

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


Adventuring Hero
posted August 28, 2017 04:51 PM
Edited by Maurice at 18:24, 28 Aug 2017.

Hello there !

I just came back from my weekend (gone see my family). And I was spending my night in modding artifacts ! Wonderful, very easy to equilibrate artifacts in changing their primary skill bonuses... If one is "too weak" we can add some primary skill to compense its weakness... Very nice !

I have just some problem with artifacts who "delete spellcasting". I totally hate them because its no more "might and MAGIC" and knowing might is more strong, if a warrior gets it, he just delete mage's power... And if a mage get it, its... quite useless !
So, I hate orb of inhibition, recanter's cloack and cape of silence' effect. For the 2 first, I made them "unequippable" (for now) in giving them no slot to be used (using the artraits.txt). So they are just some artifacts who can be sold... That's a solution but being able to give them some nice ability shall be better.
If I can't add them some ability, I'd just delete the ability they have (so I'll just give them primary skill bonus). Someone can tell me how to "delete" their ability ?
Maybe, if you've some time, give me tips to add them a "new" one (even if this type does exist but with different value). For example, some other artifact who adds mana regeneration, magic resist or (+/-)luck/moral.

I read Maurice's words about the creatures' spellcast.
http://heroescommunity.com/viewthread.php3?TID=42152&pagenumber=8
Here he details how spell type, spell power and level of spells are cast by elementals and ogre magi.
As RoseKavalier wrote, its not easy to add abilities to creatures are at start or at end of creature list. So I thought about giving them ability to cast spell. With Maurice's post, I can change the spell and level of casting but I don't know how is written "whitch creature has this spellcast ability".
In reading the lines around location posted by Maurice, I hoped to find but... From 48384h its written :

8b 55 08 6a 06 6a 02 6a ff 6a 01 52 6a 1e eb 3e

8b 45 08 6a 06 6a 02 6a ff 6a 01 50 6a 20 eb 2e

8b 4d 08 6a 06 6a 02 6a ff 6a 01 51 6a 1f eb 1e

8b 55 08 6a 06 6a 02 6a ff 6a 01 52 6a 21 eb 0e

8b 45 08 6a 06 6a 02 6a ff 6a 01 50 6a 2b 8b 0d

Where :
- 02 : Spell level (advanced) ;
- 06 is spell power  ;
- spell id :
  => 1e : Pro' from air ;
  => 20 : Pro' from water ;
  => 1f : Pro from fire ;
  => 21 : Pro' from earth ;
  => 2b : Bloodlust  

So I found 55, 45; 4d, 55, 45 who means something ! Else because it can't be creature ID, 55 is used two times...
So I thought it may be 52, 50, 51, 52, 50 but once more 50 and 52 are used two times...
I don't know too what means the eb 3e, eb 2e, eb 1e, eb 0e and 8b 0d. It may be that but I don't understand how its written for now...

If someone can give me some light in there, I thank him/them in advance. Have a good day,
____________
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 28, 2017 05:02 PM
Edited by Maurice at 19:28, 28 Aug 2017.

There is a case statement that checks creature ID's in any case.

But in machine code, it's a bit more complex than that, because it uses a jump table. And the way the jump table works, is ... odd.

Basically, from address 0x00048460h onward, it lists 10 entries of 4 bytes each:

6A 82 44 00
51 83 44 00
08 83 44 00
C4 83 44 00
94 83 44 00
B4 83 44 00
84 83 44 00
A4 83 44 00
5E 83 44 00
DD 83 44 00

If you reverse them (and subtract 400000 after that, since you're dealing with data in the exe, not the data in memory during runtime), you will see 10 memory addresses. Each of these refers to one of the relevant functions for monster spellcasting:

0x0004826Ah
0x00048351h
0x00048308h
0x000483C4h
0x00048394h
0x000483B4h
0x00048384h
0x000483A4h
0x0004835Eh
0x000483DDh

The careful observer will note that these are not in alphabetical order, as is indeed confirmed by the disassembled code.

How does the game access the jumptable and pick the correct value? Simply through enumeration. It knows it has 10 possible values, so when it evaluates Creature ID, it does so through the next set of 122 bytes, starting from address 0x00048488h:

00 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 09 09
09 09 09 09 01 09 09 09 09 09
09 09 09 09 09 09 09 09 02 09
09 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 03 09
09 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 09 09
09 09 09 09 09 09 09 09 09 09
04 09 05 09 06 09 07 09 09 09
09 08

Most entries point to 09, the "catch all" part of the switch statements. The only ones that don't are the following bytes:

Byte 0 is 00, pointing to the Resurrection spell subroutine. Arch Angel ID would be 13, but the switch statement subtracts 13 before making the comparison, saving 13 bytes of space on the jumptable. All creature ID values below are also offset by a value of 13 as a result.
Byte 24 is 01, which points to the subroutine for the Master Genie spell cast. Master Genies have an offset creature ID of 24.
Byte 38 is 02, which points to the subroutine for the Pit Lords. Pit Lords, you guessed it by now probably, have an offset creature ID of 38.
The others follow suit:
Byte 78 is for Ogre Mages, byte 110, 112, 114 and 116 are the Elementals (Ice, Magma, Storm and Energy, respectively) and finally, byte 121 is for the Faerie Dragon.

You can alter these bytes pointing to the various subroutines easily with this knowledge, by simply changing what subroutine each enumerated value points to. Keep in mind, though, that the creature ID table starts from the Arch Angel (setting that one to 0) and runs to the Faerie Dragon - other entries before the Arch Angel or after the Faerie Dragon have no value whatsoever in this table.

____________
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


Responsible
Famous Hero
posted August 28, 2017 06:32 PM

FfuzzyLogik said:

So I found 55, 45; 4d, 55, 45 who means something ! Else because it can't be creature ID, 55 is used two times...


It's just using a different register.

____________
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


Supreme Hero
Heroes is love, Heroes is life
posted August 28, 2017 09:16 PM

I might have asked this before, but does anyone know where or what decides what turns a spell into a mass spell? Would it for example be possible to turn Slayer into a mass spell at expert Fire Magic?

Also does anyone know where to edit the speed of Pirates and Corsairs? (I suppose it's in HotA.dat somewhere...)

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


Adventuring Hero
posted August 28, 2017 10:58 PM

That's a bit more complecate than I thought (and hoped) ! But again... I can't do anything for monks/zealots... I'd like to give them some special ability but I can't give them a "dispel attack" nor special magic resistance, nor spellcasting...
What can I do for them ?

Thanks for your nice answers ! I'll continue artifacts modding. Is it possible to add one more "moove artifact" (like boots of speed or equestrian's gloves) in "using a second time" adresses in replacing for example orb of inhibition ?

Have a 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
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted August 28, 2017 11:03 PM
Edited by AlexSpl at 23:11, 28 Aug 2017.

Quote:
I might have asked this before, but does anyone know where or what decides what turns a spell into a mass spell? Would it for example be possible to turn Slayer into a mass spell at expert Fire Magic?


Here is a hook:

int __stdcall massSpell(LoHook* h, HookContext* c)
{
  int spells[] = {45, 49, 50, 51, 52, 61};
  int spellID = c->ebx;
     
  for (int i = 0; i < sizeof(spells) / sizeof(int); ++i)
  {
     if ( spellID == spells(i) )
     {
        c->eax = 0;
        break;
     }
  }
       
  return EXEC_DEFAULT;
}

...

_PI->WriteLoHook(0x59F136, massSpell);


Turns spells with ID = {45, 49, 50, 51, 52, 61} to mass spells. Just change IDs. Hex patch is also, as always, possible

I have written spells(i) because there's no [code] tag on the forum. You should use [] instead.

Quote:
Would it for example be possible to turn Slayer into a mass spell at expert Fire Magic?

It's just an additional check.

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


Responsible
Famous Hero
posted August 28, 2017 11:10 PM
Edited by RoseKavalier at 23:29, 28 Aug 2017.

phoenix4ever said:
I might have asked this before, but does anyone know where or what decides what turns a spell into a mass spell? Would it for example be possible to turn Slayer into a mass spell at expert Fire Magic?


Spells Table
Start: 2854A0h

Each spell: 136 bytes (88h)
Description

Note: a lot of these fields are populated after the game is launched, but you should at least be able to modify flags.
~~~

FfuzzyLogik said:
That's a bit more complecate than I thought (and hoped) ! But again... I can't do anything for monks/zealots... I'd like to give them some special ability but I can't give them a "dispel attack" nor special magic resistance, nor spellcasting...
What can I do for them ?

Thanks for your nice answers ! I'll continue artifacts modding. Is it possible to add one more "moove artifact" (like boots of speed or equestrian's gloves) in "using a second time" adresses in replacing for example orb of inhibition ?


Without hooks, doing that kind of stuff is overly complicated.

e.g. movement artifacts work as loops (so technically if you could equip Boots of Speed on your head, you'd still get +600 movement).
The game checks if given hero has given artifact and then adds movement based on movement.txt.

It's interesting to note that Ring of the Wayfarer/Angel Wings were at some point meant to grant extra movement.


I would suggest to get your hands on a C/C++ compiler (e.g. Visual Studio, Codeblocks, ...) and ask for a basic tutorial on how to make a hook like the code provided by AlexSpl. It'd also help a lot to share your modifications

Naturally, having a bit of Assembly knowledge will help a lot.
____________
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
AlexSpl
AlexSpl


Responsible
Supreme Hero
posted August 28, 2017 11:14 PM
Edited by AlexSpl at 23:18, 28 Aug 2017.

2RoseKavalier: So it's possible to make a spell a mass one just by modifying that table?

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


Responsible
Famous Hero
posted August 28, 2017 11:32 PM

AlexSpl
I haven't tried it but looking at the spell table flags seems to be coherent with WoG struct.
____________
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 thread is 21 pages long: 1 2 3 4 5 ... 10 ... 17 18 19 20 21 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0694 seconds