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: Heroes 3 Hacking Reference Guide
Thread: Heroes 3 Hacking Reference Guide This thread is 41 pages long: 1 10 20 30 ... 33 34 35 36 37 ... 40 41 · «PREV / NEXT»
Parascus
Parascus


Adventuring Hero
posted November 05, 2022 10:54 AM

HUUUUUUUUUGE!!!!!! I have to have it, I have to try it!!!!!
____________

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


Adventuring Hero
posted November 05, 2022 11:36 AM

Hi AlexSpl,

compliments to this mod. It's really great (literally)! This way I might reactivate water again because now there is enough space. But I have to turn of the loading unloading time ... this is extremley enerving. (Only one little inconvenience: HD mod saves the properties you've choosen on the random map. The new three buttons are not included. But this is really a small thing ;-) ).

I have decided to leave the images as they are and accept the there is no feedback in graphic just in text, how much luck/morale the hero have. It's not only the fact that I can't find a icon class in H3API (I serach with icon, widget, image. Only picture is often used but I don't see the correlations to your code). I also have noticed that in some dialogs I thought they are finished there are mistakes, e.g. allthough the hero has only 1 luck it is displayed as luck of 5 in the creature combat window statistics.

My time is running out (wnat to finish it as a kind of birthday present for my son) and I will concentrate on the other ideas and hints to boost the might and magic experience.

Thanks for the hints so far (and code)

Parascus
____________

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


Responsible
Supreme Hero
posted November 05, 2022 11:41 AM

Theoretically, you don't have to change much. Those are just def with cadres. They are loaded into the memory of the game process automatically by corresponding functions. All you have to do is to fix boundaries. See my plugin NewSpells. The game already supports new spells. And new Morale/Luck values aren't an exception. Briefly, you need to adjust indexes of cadres throughout the code.

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


Adventuring Hero
posted November 05, 2022 11:57 AM

That's what I thought but e.g. the hero meeting dialog is overwritten by HD mod and I don't get my new boundary in it and additionally I thought I understood it at the other positions and there also I had not that much luck. The positions (only the maximum luck, minimum stays at 3) I found to change were:
   //Ilck22
   PI->WriteByte(0x4E3BFB, 6);
   PI->WriteByte(0x52F3D8, 6);
   
   //Ilck30
   PI->WriteByte(0x51D979, 6);
   
   //Ilck42
   PI->WriteByte(0x5F3BF3, 6);
   PI->WriteByte(0x5F433F, 6);
   PI->WriteByte(0x5F434B, 6);

And Ilck42 is not working, the code is not called anymore because of HD mod. I know there are some more places to go because of ilck82, ilckb and ILCKS as well as all the morale defs. But because I can't change it for the overwritten positions I try to concentrate on other changes.

Best regards

Parascus
____________

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


Responsible
Supreme Hero
posted November 05, 2022 12:09 PM

Yes, the HD mod loves to HiHook functions directly. I will look into it deeper, but if you are right, there isn't much you can do. To interact with HiHooked code you need an API from the authors. Everything else would be a pure hack (like needles, for example).

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


Adventuring Hero
posted November 05, 2022 12:22 PM

I'm gratefull for your offer to look into it deeper. But please take my statement serious because I don't want to waste your time on this ... you helped so much and (as I know my luck in coding) I think there might be different questions where any help is appreciated.

Kind regards

Parascus
____________

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


Adventuring Hero
posted November 06, 2022 12:03 AM
Edited by Parascus at 11:53, 06 Nov 2022.

Hi AlexSpl,

I should play in the lottery, I think I can predict the future. I studied the spell speciality function beginning at 4E6260 and I think I understood the principle thanks to BTB's genius manual. For all spells between Firewall and slayer it checks the speciality effect (00 to 06) where 06 is the standard. There would also be the possibility to expand the covered spells, e.g. Hypnotize. But I'd like to implement the posibility to intercept the standard behaviour and implement my own spell specialities, e.g. Hypnotize always works if the target unit is a single creature without mind imunity. For this I hooked at 0x4E628A calling my own speciality function. In this I decied if the spell is executed under speciality circumstances. If not just use the default of HOMM3. But if a spell speciality is used it should omit the standard, i.e. return with NO_EXEC_DEFAULT and jump to an address which does not causee a crash.

And I think it will shock you. I do not find it! I trie different addresses with different ideas. The most promising was 0x4E6299 because I thought that at this point it has decided that the spell is not covered by the decision table and it coninues with the standard for spells without a speciality. What did I wrong with that idea.

BTW I have managed to implement a Visions speciality that works like fortune. But because it is not a combat spell I had to place it in another place:
0x41C6D1 is a function where it calculates the power (level) under which the spell is spoken and it seems to work.

Else do anyone of you have thought (or maybe it already exists) about a Charisma speciality? My idea is to have a speciality depending on Leadership and Diplomacy and it is a "Map Spell". If you approach an enemy and cast the spell on him there is a probability that creatures are comming to you. The dependencies could be:
1. Only creatures without mind spell are affected.
2. Morale boni reduce the probability for a desertation
3. The level of the creature must be lower (or equal) of the casting hero
4. All creature stacks are affected (not only one)
5. You can chose the creatures to join your army
6. If you reject one or more creature they are going back to the origin hero and fighting with higher morale. Another possibility is that they are lost.
7. The number of creatures to desert is calculated on the skill of leadership and diplomacy:
  number_of_deserting_creatures = number_of_creatures * ((7 - creature_level) / 7) * (3 * (leadership_level + diplomacy_level) / 100)

Best regards

Parascus
____________

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


Adventuring Hero
posted November 06, 2022 06:27 PM

Hi BTB,

I tried to insert your Mage Guild upgrade in my version. I have the following changes:

// Allow Mage Guild Lv. 4 for Stronghold and Fortress + Lv. 5 for Castle
0x00460FA4
Heroes3 HD.exe+60FA4 - 74 0F                 - je "Heroes3 HD.exe"+60FB5 { ->Heroes3 HD.exe+60FB5 }
Heroes3 HD.exe+60FA6 - 8B 4D 08              - mov ecx,[ebp+08]
Heroes3 HD.exe+60FA9 - 8B 75 C6              - mov esi,[ebp-3A]
Heroes3 HD.exe+60FAC - 81 C0 4E690003        - add eax,HD_TC2.dll+13694E { (0) }
Heroes3 HD.exe+60FB2 - EB 76                 - jmp "Heroes3 HD.exe"+6102A { ->Heroes3 HD.exe+6102A }
Heroes3 HD.exe+60FB4 - 8B 86 58010000        - mov eax,[esi+00000158]
Heroes3 HD.exe+60FBA - 8B 1D B0CD6600        - mov ebx,["Heroes3 HD.exe"+26CDB0] { (8) }
Heroes3 HD.exe+60FC0 - 8B 8E 5C010000        - mov ecx,[esi+0000015C]
Heroes3 HD.exe+60FC6 - 8B 3D B4CD6600        - mov edi,["Heroes3 HD.exe"+26CDB4] { (0) }
Heroes3 HD.exe+60FCC - 21 D8                 - and eax,ebx
Heroes3 HD.exe+60FCE - 21 F9                 - and ecx,edi
Heroes3 HD.exe+60FD0 - 09 C8                 - or eax,ecx
Heroes3 HD.exe+60FD2 - 74 50                 - je "Heroes3 HD.exe"+61024 { ->Heroes3 HD.exe+61024 }
Heroes3 HD.exe+60FD4 - 8A 46 04              - mov al,[esi+04]
Heroes3 HD.exe+60FD7 - 8B 75 FC              - mov esi,[ebp-04]
Heroes3 HD.exe+60FDA - 8B 4D 08              - mov ecx,[ebp+08]
Heroes3 HD.exe+60FDD - 84 C0                 - test al,al
Heroes3 HD.exe+60FDF - 74 0C                 - je "Heroes3 HD.exe"+60FED { ->Heroes3 HD.exe+60FED }
Heroes3 HD.exe+60FE1 - 3C 06                 - cmp al,06 { 6 }
Heroes3 HD.exe+60FE3 - 74 08                 - je "Heroes3 HD.exe"+60FED { ->Heroes3 HD.exe+60FED }
Heroes3 HD.exe+60FE5 - 3C 07                 - cmp al,07 { 7 }
Heroes3 HD.exe+60FE7 - 74 04                 - je "Heroes3 HD.exe"+60FED { ->Heroes3 HD.exe+60FED }
Heroes3 HD.exe+60FE9 - 42                    - inc edx
Heroes3 HD.exe+60FEA - 90                    - nop
Heroes3 HD.exe+60FEB - 90                    - nop
Heroes3 HD.exe+60FEC - 90                    - nop

// Fortress Guild
0x64301D > 03
0x68A8B8 > 0A 63 4E    // instead of 18 95 4D because I use free space from Scaling Bonus (Speciality Type 06, see below)
0x68B154 > 98

0x4E630A
Heroes3 HD.exe+E630A - 54                    - push esp
Heroes3 HD.exe+E630B - 4F                    - dec edi
Heroes3 HD.exe+E630C - 46                    - inc esi
Heroes3 HD.exe+E630D - 4D                    - dec ebp
Heroes3 HD.exe+E630E - 61                    - popad
Heroes3 HD.exe+E630F - 67 34 41              - xor al,41 { 65 }
Heroes3 HD.exe+E6312 - 00 10                 - add [eax],dl

0x68B156
Heroes3 HD.exe+28B156 - 15 0000006B           - adc eax,6B000000 { 1795162112 }
Heroes3 HD.exe+28B15B - 00 00                 - add [eax],al
Heroes3 HD.exe+28B15D - 00 00                 - add [eax],al
Heroes3 HD.exe+28B15F - 00 00                 - add [eax],al

// Stronghold Guild
0x642FF0 > 03
0x68A808 > 14 36 4E    // instead of 10 95 4D because I use free space from Scaling Bonus (Speciality Type 06, see below)10 95 4D; add pointer to outline

0x68B04E
Heroes3 HD.exe+28B04E - 00 00                 - add [eax],al
Heroes3 HD.exe+28B050 - 86 01                 - xchg [ecx],al
Heroes3 HD.exe+28B052 - 03 00                 - add eax,[eax]

0x4E6314
Heroes3 HD.exe+E6314 - 54                    - push esp
Heroes3 HD.exe+E6315 - 4F                    - dec edi
Heroes3 HD.exe+E6316 - 53                    - push ebx
Heroes3 HD.exe+E6317 - 4D                    - dec ebp
Heroes3 HD.exe+E6318 - 61                    - popad
Heroes3 HD.exe+E6319 - 67 34 00              - xor al,00 { 0 }

0x68B03E > 86
0x68B040 > 5D
0x68B044 > 86
0x68B046 > 3A
0x68B04A > 86
0x68B04C > 1F

Well, my code crashes ... but that's no surprise because I think there is something missing.
I have put the graphics (TbCsMag5.def, TbFrMag3.def, TbFrMag4.def, TbStMag2.def, TbStMag3.def, TgStMag4.def and TbStMage.def) into the H3Sprite.lod. But I do not know how I can add the Stringhld/Fortress requirements. In whcih file is this? Also does the Castle does not need additional Code as well as requirements?
Further more I see in your code that in the Fortress code you refer to (the address?) 10 95 4D at 0x28A8B8 but the additional code is written to 0x4D9518. In the Stronghold code you use also 10 95 4D at 9x28A808 and this time the additional code is at 0x4D9510.

The exception is:
Exception
{
  Module: Heroes3 HD.exe
  Adress:      [ 0x00460FB5 ]
  Code:        EXCEPTION_ACCESS_VIOLATION
  Flags:       0x00000000
  Information: write of address: 0x00000001
}

Context { EAX: 0x00000000, ECX: 0x00000000, EDX: 0x00000000, EBX: 0x00000004, ESP: 0x001992B0, EBP: 0x001992FC, ESI: 0x0DFF2538, EDI: 0x00000000 }

Call stack
{
  [ 0x00460D70 ] called from [ 0x005D2C19 ]
  [ 0x005D2BB0 ] called from [ 0x005D3630 ]
  ? called from before [ HD_SOD.dll+0x52953 ]
  [ HD_SOD.dll+0x528C0 ] called from [ 0x025E08CC ]
  ? called from before [ 0x0859A6F0 ]
}

Do you think the Exception is based on the fact that I do not have the requirements of the buildings? Or do you have another idea?

Best regards

Parascus
____________

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


Famous Hero
Moist & Creamy
posted November 06, 2022 11:32 PM

Looking at your crash log, it seems you've got a bad jump. 460FB5 is in the middle of one of your instructions.

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


Adventuring Hero
posted November 07, 2022 11:24 PM

Hello all,

I have discovered two interesting effects in Herors III HD+. I have a map with two heroes and a stack of 100 skeletons. the first hero has some 1, 2 and 3-level creatures. The second hero has 10 Ghostdragons.
Additionallly I have some learning stones.

First I start the combat with the skeletons with hero 1, but flee without attacking any of the enemy units. When I attack now with the second hero the number of skeletons is reduced, in some cases by 16 units.

The other effect is that when I gain a level and I get sekondary skills offered only 1 skill is offered allthough I would have enough free slots for a second one.

Has anybody had the same effects?

Best regards

Parascus
____________

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


Famous Hero
Moist & Creamy
posted November 07, 2022 11:50 PM

If this is only happening when HD+ is enabled, then open up your game with Cheat Engine and look for where HD+ is injecting its own code into yours.

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


Adventuring Hero
posted November 08, 2022 09:31 AM

Hi BTB,

I did some more tests. It seems that the loss of creatures also appear in the original complete version when you have installed the HoMM3 HD but with no additional Plugins and use the original Heroes3.exe.

For the reduced secondary skill offers, they appear only with HD+ turned on but as before without any plugins or changes ... just installed Heroes Complete and added HoMM3 HD. So I think it can't be an interference with my code.

Best Regards

Parascus
____________

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


Responsible
Supreme Hero
posted November 09, 2022 01:19 PM

Quote:
The other effect is that when I gain a level and I get sekondary skills offered only 1 skill is offered allthough I would have enough free slots for a second one.

It's interesting. Attach your savegames.

Quote:
First I start the combat with the skeletons with hero 1, but flee without attacking any of the enemy units. When I attack now with the second hero the number of skeletons is reduced, in some cases by 16 units.

Maybe you have upgraded skeletons in the middle army, then it's a known bug of them disappearing.

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


Adventuring Hero
posted November 09, 2022 02:55 PM

Hi AlexSpl,

thanks for your reply. How can I attach a file to a posting here?

Best regards

Parascus
____________

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


Known Hero
posted November 09, 2022 05:13 PM

Hello Parascus,

You can eventually give a link for a storage zone where your save file is stored...
You can't add directly a file there.

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
Parascus
Parascus


Adventuring Hero
posted November 09, 2022 06:23 PM

Hi all,

the map is at http://www.parascus.de/homm3/Test-Creature-Loss.h3m.

You need a two player game to test this two effects, maybe use a hot seat session. Staret it with HD+ but no other plugins.

The procedure is:
1) Attack the Skeletons with Sorsha.
2) You can see that there are 50 Skeletons and 50 Skeleton Warriors.
3) Flee as soon as you can.
4) Attack the Skeletons with Isra.
5) Now there are 43 Skeletons and 43 Skeleton Warriors.

6) Visit the Learning Stones with Isra. You can see that sometimes only one allthough the hero has enough space for secondary skills.

Best regards

Parascus
____________

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


Responsible
Supreme Hero
posted November 09, 2022 07:26 PM
Edited by AlexSpl at 19:39, 09 Nov 2022.

Quote:
The procedure is:
1) Attack the Skeletons with Sorsha.
2) You can see that there are 50 Skeletons and 50 Skeleton Warriors.
3) Flee as soon as you can.
4) Attack the Skeletons with Isra.
5) Now there are 43 Skeletons and 43 Skeleton Warriors.

This is a known bug. 100 - (43 + 43) = 100 - 86 = 14 upgraded skeletons, which you loose after fleeing. Try to attack the remaining 86 skeletons with another hero and you'll loose another 43 skeletons.

Quote:
6) Visit the Learning Stones with Isra. You can see that sometimes only one allthough the hero has enough space for secondary skills.

This is definitely a bug of HD+. I think this mode is no longer supported, but you can always report this bug directly to baratorch. But it can also be a problem with your map. So, check other maps before sending a report.

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


Adventuring Hero
posted November 09, 2022 07:37 PM

Hi AlexSpl,

thank you for the explanation. And ny idea about the skill problem?

Kind regards

Parascus
____________

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


Responsible
Supreme Hero
posted November 09, 2022 07:49 PM
Edited by AlexSpl at 19:52, 09 Nov 2022.

Another suggestion. It may be connected to the "Tournament Rules" option, so maybe Isra has some restrictions in that mode, I don't know. Can't ugrade Necromancy till level 4? Read the description of the "Tournament Rules" mode.

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


Adventuring Hero
posted November 09, 2022 08:36 PM

Just tested the map with Tournament rules turned off ... and Voila, the skill upgrade gives me two options.

Thanks for the tipp and have a nice evening

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 41 pages long: 1 10 20 30 ... 33 34 35 36 37 ... 40 41 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0940 seconds