Heroes 2 Modding

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
TheRatt
Leprechaun
Leprechaun
Posts: 6
Joined: 21 Aug 2013

Heroes 2 Modding

Unread postby TheRatt » 21 Aug 2013, 13:05

Hello. I'm currently independently working on modding Heroes 2. I've extracted the main AGG file, and have these formats:

ICN- Animations, sprites, game graphics. Converted to bmps with icnpack.
TIL- Only three of them. Seem to be terrain textures. Converted with tilpack.
82m- Sound files. Converted to wave with Audacity.
XMI- Music files. Can convert to MIDI with Winamp. This one's strange, because not all of the music files are there, and the music sounds different than it is supposed to.
PAL- Palette file.
FNT- Fonts. Opening with hex editor shows that it directs to the FNT.ICN files.
BMP- Should be bitmaps, but they won't open with any program I've tried. The only way to see them is to open with Wordpad or Hex Editor. You can see symbols crouched together to make a form, seems to mostly be scroll-over icons.
BIN- Some of these can be understood with text editor. Others are completely ineligible.

That's what I have so far. In the main executable, I've discovered game text, creature tables, starting hero stats (not starting secondary skills), possibly creature dwelling costs, basic stuff. I'm not an expert on programming, so if someone skilled in this stuff could help me, that would be great. I don't even understand how to edit strings to where you can make it longer. If you add more characters to a string, it crashes. I don't know how to do this. If any programming expert can help me, that would be nice. I know there are people who have successfully extracted homm2, but I'm nowhere near the knowledge that they have.

User avatar
Kristo
Round Table Knight
Round Table Knight
Posts: 1548
Joined: 23 Nov 2005
Location: Chicago, IL

Unread postby Kristo » 21 Aug 2013, 18:24

We have a thread dedicated to modding Heroes 2. There's some good info in there. At one time, Darmani had a project that could add new creatures and/or factions to the game, but I haven't seen any mention of that here in quite a while.
Peace. Love. Penguin.

TheRatt
Leprechaun
Leprechaun
Posts: 6
Joined: 21 Aug 2013

Heroes 2 Modding

Unread postby TheRatt » 22 Aug 2013, 02:29

I've skimmed through most of it. I decided to make a new thread because that one seemed dead. I didn't see how you can increase the character limit of a string. Like, if you want to edit a text, if you add more than what is there, it will crash. How do you increase it? I would think that it would be possible, from what Darmani has done so far.

User avatar
Kristo
Round Table Knight
Round Table Knight
Posts: 1548
Joined: 23 Nov 2005
Location: Chicago, IL

Unread postby Kristo » 23 Aug 2013, 02:24

I'm not certain this will work, but the first thing I would try to do is find the places in the exe where the string is referenced. The offset of a string has to be mentioned in the code somewhere. Then you can change that number to point to an offset at the end of the file and add your new string there. That way nothing gets moved out of its fixed position in the exe file, and hopefully, no crash.

It's much easier said than done when you're working in raw machine code like this.[/list]
Peace. Love. Penguin.

TheRatt
Leprechaun
Leprechaun
Posts: 6
Joined: 21 Aug 2013

Unread postby TheRatt » 23 Aug 2013, 06:01

Do you mean moving the address? How would you point to the offset? Let's say I would want an extra character to "Knight" at address 0014D9F6.

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 23 Aug 2013, 10:24

Kristo wrote: At one time, Darmani had a project that could add new creatures and/or factions to the game, but I haven't seen any mention of that here in quite a while.
It is not totally dead project yet, but everyone has very little time. If i am not mistaken, some news are in preparation.

@TheRatt: sorry, do not know how to help you. Darmani's project is using separate agg and exe files, being more an expansion pack than a modification, as far as i know.

User avatar
Kristo
Round Table Knight
Round Table Knight
Posts: 1548
Joined: 23 Nov 2005
Location: Chicago, IL

Unread postby Kristo » 23 Aug 2013, 19:09

TheRatt wrote:Do you mean moving the address? How would you point to the offset? Let's say I would want an extra character to "Knight" at address 0014D9F6.
I was proposing that you write "Knight2" at the very end of the file (don't forget the null byte at the end) and note that offset. You then find where 0014D9F6 is used in the code and replace it with the offset of the new string at the end of the file. But I've never done this before - just theorizing how one might do it.
Peace. Love. Penguin.

User avatar
Kristo
Round Table Knight
Round Table Knight
Posts: 1548
Joined: 23 Nov 2005
Location: Chicago, IL

Unread postby Kristo » 25 Aug 2013, 13:09

TheRatt wrote:So I search the address in the hex editor? How do I find out where it's used in the code?
Yeah, if your hex editor has a search feature you'll need to search for that number and replace it with the offset at the end of the file. One thing I forgot to mention is the architecture is little-endian, so you'll actually have to search for F6D91400.

I'm out of my depth at this point (again, since I've never done something like that before) so I'm not sure how much more help I can be.
Peace. Love. Penguin.

TheRatt
Leprechaun
Leprechaun
Posts: 6
Joined: 21 Aug 2013

Heroes 2 Modding

Unread postby TheRatt » 25 Aug 2013, 16:11

Well, F6 D9 yields one result, adding 14 00 yields none. I'm finding it difficult to search for addresses with Hex Bytes search, even backwards. Should all the addresses be inside the code? Do I need to search for the offset of a position?

I've also noticed that there is an option to change the endian on my hex editor to big endian (Flexhex). Changing from little to big only seems to change the unicode text.


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 23 guests