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: [Tutorial] Heroes III Modding
Thread: [Tutorial] Heroes III Modding This thread is 5 pages long: 1 2 3 4 5 · «PREV
SilverG
SilverG


Known Hero
posted May 01, 2020 09:37 PM

FfuzzyLogik said:
In editing the text files, note that only the "values" are used by the program ; the text is inidcative.

To change the creatures you fight its "hex editing" in datas (or once more, use other mod support).

I wrote a question for you on the "how to edit hota" thread about editing the creatures spellcasting. I suggest you search on there some answers there. Link here : how to edit hota thread

I don't know for "different kind" of shipwreak... I thought it exist only one kind...

Samely, have you changed the "rewards" ? Here again I think the type of reward can't be changed but value can (by text editing). I think the "crash" comes from here ? Not sure.

You made 8 kind of percentages ? It does exist in standard text file ? If not, program will only use the "normal lines" and if the total is not 100% its possible the "crash" comes from here too... As previously written, do not insert a line ! The game reads it "where it is" with original file ! So inserting a line/column will create bugz for sure... There is some editors who can change those files safely with "no chance" of making mistakes in saving the file... All is on "ERA" pack. Even if you won't use ERA, download it for the tools are made by incredible persons during the ages to mod... The text editor linked is one of these tools. Some others exist for edit graphics if you wish (but it will require some time to learn to use them).

Samely you can change text files for heroe's starting troop but it won't do anything until you change a part of data in exe (by hex editing). Amount can be changed in text file but not the "kind of unit".


WOW... so guess I'm off to learn Hex Editing soon

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


Adventuring Hero
posted September 17, 2022 05:28 PM
Edited by Parascus at 18:26, 17 Sep 2022.

Hello folks,

I hope this thread has still some of you listening to it. I try to modify my HOMM III Comnplete Edition. Not in a really fancy way, just changing some of the heroe pics and I try to change some skill and sepcialities. I just want to change the skill land speciality for Sylvia so that she has something usefull instead of navigation. I always play without water together with my son.

I already tried to change the entry in the file HreoSpec.txt but this is only the translation. Can somebody give me a hint in which file the skill and speciality assignment takes place?

Kind regards
____________

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

Tavern Dweller
HotA Crew
posted September 18, 2022 08:16 AM
Edited by void_17 at 08:25, 18 Sep 2022.

Parascus said:
Hello folks,

I hope this thread has still some of you listening to it. I try to modify my HOMM III Comnplete Edition. Not in a really fancy way, just changing some of the heroe pics and I try to change some skill and sepcialities. I just want to change the skill land speciality for Sylvia so that she has something usefull instead of navigation. I always play without water together with my son.

I already tried to change the entry in the file HreoSpec.txt but this is only the translation. Can somebody give me a hint in which file the skill and speciality assignment takes place?

Kind regards



Hi Parascus. Unfortunately, in order to change such heroes properties, you have to code a bit. These properties are stored within .exe file's .data section table(address from 0x679DD0 to 0x67D868). There are 163 heroes in Complete version, hence 163 unique attributes which follow this structure:

Quote:
//size = 5C
struct THeroTraits
{
 int m_sex;//+0
 int m_race;//+4
 THeroClass m_class;//+8

 TSecondarySkill m_1stSkill;//+0C
 TSkillMastery m_1stSkillLevel;//+10
 TSecondarySkill m_2ndSkill;//+14
 TSkillMastery m_2ndSkillLevel;//+18

 bool32 m_startsWithSpellbook;//+1C
 SpellID m_startingSpell;//+20

 TCreatureType m_1stStack;//+24
 TCreatureType m_2ndStack;//+28
 TCreatureType m_3rdStack;//+2C

 const char * m_small_portrait_name;//+30
 const char * m_large_portrait_name;//+34

 bool m_allowedInRoE;//+38
 bool m_allowedInABSoD;//+39
 bool m_isCampaignHero;//+3A

 unsigned long attributes;//+3C
 const char * m_name;//+40

 int m_1stStackLow;//+44
 int m_1stStackHigh;//+48
 int m_2ndStackLow;//+4C
 int m_2ndStackHigh;//+50
 int m_3rdStackLow;//+54
 int m_3rdStackHigh;//+58
 
};



Some of these fields are filled in advance, so you are free to change them with 100% guarantee it won't be rewritten by the game. I insist on using patcher_x86 by HD Mod creator instead of manual HEX Editing.
https://gist.github.com/Ginden/57029632c2920a012990315dbbe579ed

But some fields are null in .exe itself. Instead, there are written by a function InitializeHeroTraitsTable at address 0x4E6850 from HOTRAITS.TXT spreadsheet:

Quote:
unsigned long attributes;//+3C
const char * m_name;//+40

int m_1stStackLow;//+44
int m_1stStackHigh;//+48
int m_2ndStackLow;//+4C
int m_2ndStackHigh;//+50
int m_3rdStackLow;//+54
int m_3rdStackHigh;//+58




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


Adventuring Hero
posted September 18, 2022 08:57 AM
Edited by Parascus at 09:02, 18 Sep 2022.

Hi void_17,

thanks for your detailed info. I will try this (in a way). But because I don't know what to do with a *.hpp, I asume it is a C++ extension but I don't have a compiler and don't know what to do with it. I'm more a Java type. So I will usae a hex editor and be causious counting the bytes.
Can you tell me the size of a heroes data? Is it 62?

Also is there a list of skills and specialities so I can assign the right values?

Regarding the address, I don't have so much lines in my heroes version. It ends with 0x29AFF0. Allthough I can play SoD and AB as well it seems not to be the "complete" version, sorry. I read in another thread that the value might be 0x279DD0. But I think the process/structure you decribed will be the same, correct?

Hopefully the last question and I'm enabled to get my hands on: I see the skill properties in your data structure but I miss the speciality. Is there a way to take influence n these as well?

Kind regards.

Parascus
____________

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

Tavern Dweller
HotA Crew
posted September 18, 2022 10:13 AM
Edited by void_17 at 10:14, 18 Sep 2022.

Parascus said:

Can you tell me the size of a heroes data? Is it 62?


I have already written it. 0x5C = 92.

Parascus said:

Regarding the address, I don't have so much lines in my heroes version. It ends with 0x29AFF0. Allthough I can play SoD and AB as well it seems not to be the "complete" version, sorry. I read in another thread that the value might be 0x279DD0. But I think the process/structure you decribed will be the same, correct?


just add +0x400000 to address. first 0x400000 bytes are EXE header


Parascus said:

Hopefully the last question and I'm enabled to get my hands on: I see the skill properties in your data structure but I miss the speciality. Is there a way to take influence n these as well?


Sure. Edit table at 0x678420 (or 0x278420)

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


Adventuring Hero
posted September 18, 2022 02:06 PM
Edited by Parascus at 14:07, 18 Sep 2022.

Hello once more,

thanks for your help. I really overread 5C at the top, sorry.

I now managed to change the skills of the heroes. But I had no luck with the speciality. I assume that the heroe order is the same as with the skills. In my editor I have the following (first 16) values at 278420:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Where do I see the speciality? I already tried to change the first value to 01, but nothing changed.

Kind Regards
____________

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


Known Hero
posted September 23, 2022 10:41 PM

Hello Parascus:

It has been a long time since I've edited this... but I can tell you that apart fromm the hex values you will also need to edit the sprites, should you wish to change the speciality for any particular hero.

------------------------------
HERO SPECIALTIES (28 bytes)
------------------------------

BYTE 01: Specialty type

00 = Skill
01 = Creature (scaling)
02 = Resource (05 - Gems; 03 - Sulfur; 01 - Mercury; 04 - Crystal)
03 = Spell
04 = Creature (static)
05 = Speed (Sir Mullich)
06 = Conversion (Gelu & Dracon)
07 = Dragon (Mutare)

BYTE 05: Skill, Creature, Resource, or Spell ID (type 0-4),
1st creature ID allowed for conversion (type 6),
(*See below for type 5 bonus)

BYTE 09: Attack bonus (type 4/7)

BYTE 13: Defense bonus (type 4/7)

BYTE 17: Damage bonus (type 4/7)

BYTE 21: 2nd creature ID allowed for conversion (type 6)

BYTE 25: Resulting creature ID after conversion (type 6)

(*The type 5 speed bonus is actually a global setting located at E63F9 - 02
               (full string to find it faster: 03 83 C7 02 01 7E 50))


The value of resource specialties is hardcoded; the only one how to edit is gold
specialties (0E4410 = (5E 01 00 00 8B E5 5D C3 90 90 90 90 90) 5E 01 00 00, or 350 gold). - Changed to C4 09 00 00 - 2,500 Gold

It's also possible to force-enable the "OK" button on the skill selection screen by going to 0F950F
(10 83 C8 FF 3B C8 74 09 39 45 14 74 04 33 C0 EB 05 B8) and changing the 74 to EB; this will allow players to reject both skill choices.

SO feel free to refer to page:
http://heroescommunity.com/viewthread.php3?TID=42152&pagenumber=97

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


Adventuring Hero
posted September 23, 2022 10:56 PM

Hello SilverG,

wow, thanks for this reply. I'm eager to test it this weekend. Honestly it's more than I hoped for. I just hoped to get rid of the navigation speciality and change it to some other standard. But this seems realy nice ... to edit the speciality.

Have a nice evening and thanks to you all that helped me.

Kind regards

Parascus
____________

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


Adventuring Hero
posted September 27, 2022 09:52 PM
Edited by Parascus at 12:07, 28 Sep 2022.

Hello SilverG,

thanks for your info, I managed to change the specialities (tested with crystal producing). Now I'm stuck with the images. I know I have to change the pictures in UN44.def and UN32.def. But I do not find a tool to convert the extracted *.def to a folder with *.bmp or *.pcx and back to *.def. Every link I found is a death end except h3deftool. But I do not understand this tool. I don't find a possibility to extract images and to reintegrate them. Do you have  link to a tutorial where I can see how it is done? Or do you have another hint, which software to us?

Ah, and another point is that I tried to use Pathfinding as speciality. But it seems that this is not predefined. Is there any way to achieve a pathfnding speciality, e.g. the penalty for different grounds are reduced faster than with a secondary skill?

Kind regards

Parascus
____________

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


Known Hero
posted October 03, 2022 05:35 PM

Hello,

I can't explain how to use it by writing but definitively, deftool is (as far as I know), the best to edit .def... Its made for that.

I can suggest you to join the a discord and show you how to use it maybe...

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 October 03, 2022 06:53 PM

Ah, sorry, I found the tool already mentioned in another post und tried it ... One tool is used to extract all images and the other is for combining them again. Thank you ffuzzyLofic.

Kind regards

Parascus
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 5 pages long: 1 2 3 4 5 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0529 seconds