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 4 - Lands of Axeoth > Thread: Found a way to add new heroes
Thread: Found a way to add new heroes This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
Baronus
Baronus


Supreme Hero
posted August 30, 2017 10:29 AM

Any correction of these 00 dont give a succes. Maybe you must correct exe code too. Editor read from exe too. Yes I dont see sense with names a these 00. One i short second long? Distance is 00 or 00000000?
Ive built corrected lay with new portrait a txt table and no succes. All works fine but no new hero. Must be in code as I see.
I wonder how you add correctly Hexis and other two portraits to editor without code edditnig? Can you send me these corrected file?

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


Famous Hero
posted August 30, 2017 12:11 PM

Well if it does read from the exe, I'll make sure to edit that aswell.

I will send you the files.

In case others are interested or you want to do it yourself, this is what I did. In the tables.heroes.txt I renamed the keyword of 2 generic heroes, 1 to sleeping and the other to dead and changed their gender and class aswell. These changes can be seen in both the Equi FaceTool and in the editor. (If you rename generic to hexis, hexis portrait is visable in the FaceTool but not in the editor).
(I can't remember if I tried this with added lines to the tables files - will have to check if it works).

As for Hexis I renamed keyword generic to hexis and changed gender and class. In the editor I renamed hsine keyword to hexis as lenght is the same. That replaces hsine portrait with hexis portrait.


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


Supreme Hero
posted August 30, 2017 01:03 PM

Ok. in edior. But if you build map with new named hero by correcting editor eg Aniut non Anium game read it? In exe is still Anium. If read all is ok. We can produce new editor to mapmaking and new txt table with new and old heroes and can play them ingame.

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


Famous Hero
posted August 30, 2017 01:09 PM

I haven't tried it in game yet. Only viewed it in the editor, so see if changes could be read. I figured editor was first step.
I will try it later today and let you know if the game crash or reads the changes. I haven't yet looked in the exe file, but Radmutant said he believed the keywords are also stored in the exe and needs to be edited there as well in order to work. Time will tell.

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


Adventuring Hero
posted August 30, 2017 07:42 PM
Edited by radmutant69 at 19:52, 30 Aug 2017.

I"m pretty sure you have to edit the game exe to see such 'new' heroes in game.

By the way when we discussed about this I meant generic heroes as those heroes whose are come when you bought too many heroes from the tavern. They have (I think) the generic class in the hero table.

As far as I know they have their own data in the tables and exes. What if you change their class and add a new portrait for one of them?

I never tried it, but I think it should work as your 'new' Hexis hero works.

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


Famous Hero
posted August 30, 2017 08:20 PM

Well basically the generic heroes all share the same keyword and class, being generic, only name and bio differs.
My search function in hexeditor is bugging me atm, so I haven't located where exactly sleeping, dead or generic are located, just that they aren't among the hero keywords. but admitted I haven't tried your suggestion.
I could try renaming hexis to generic in the layer file. It's an interesting thought, as on one hand in theory all doublicate heroes should then get the generic/Hexis portrait, but on the other hand it would collide with the fact that placing two Anium's on a map, would force the 2nd one to get a generic hero name and bio, while keeping Anium's portrait. Question is if the portrait would change in game? If it works though, it would basically just mean that all generic placed heroes would end up with Hexis' portrait. I'm not sure what would happen when buying doublicates in a tavern. We'll see..

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


Promising
Famous Hero
Modding the Unmoddable
posted September 03, 2017 10:10 AM
Edited by NimoStar at 10:47, 03 Sep 2017.

Adding new heroes... is easy...

look at this:



It is the hero list from the .exe

Those are the keywords.

But keywords have "00" spaces that do nothing.

You need at least one 00 space. But sometimes there are two or three or four consecutive ones. Add a new "keyword" in between, for example.

Instead of archilus....aislinn
Do archilus.iu.aislinn

Now you can have a new keyword hero named "iu"

Change one generic keyword to hero on table. Compress table and put on game data.

Then add portrait with the method you found.

You are done now.

(But dead hero seems interesting :V)

Test heroes, then get back here and report...
More heroes can mean more Creature Heroes!



____

Incidentally, I found creatures keywords too and there is also free space!



Adding creatures may be harder though, because each one has different abilities and graphics unlike heroes which share a single preprogrammed universal template.

However, maybe creatures without abilities... would work... who knows... it is a matter of trying and seeing. (they would also have to be added to the campaign editor)

So for adding new creatures:
- Put new keyword in .exe
- Add to creature table and stats in a line with that keyword
- Put new portraits on creature files with that keyword
- Place .spr files named with that keyword (both adventure and combat)
- Add to map editor .exe
- Add in objects palette
- Place in a map

In theory... it can work. In theory
If this is so, it can augur a new age in H4 modding. Not even H3 can create new creatures normally without replacing.

New creature could have no abilities, but with my method it could have spells (only up to 14 of new spellbooks, 3 spells each)
It could also be recruitable in dwellings on the map and even in towns by editing the .exe as we know.

Also, if you want to make a new creature of your own but with abilities, put it where an old but boring creature was (like Orc, Squires, or Behemoth keywords). Then you can use their ability slots. Then, recreate these boring creatures as "new" abilityless creatures.

Because of keyword change, though, this would be a radical shift to already-created maps.

Bear in mind this is yet untested. We don't yet know how creature numeration even works. It seems, though, that it coincides with the list on reverse, which would mean that adding a new one could have unintended consequences.
____________
CLICK on the image to discover H4 Greatest Mod!

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


Famous Hero
posted September 03, 2017 07:54 PM
Edited by Karmakeld at 23:45, 03 Sep 2017.

I'll do the hero test later, but I came to the same conclusion, I just spend yesterday looking through the exe file noting down interesting stuff, but thanks anyway.
Also keywords can be renamed, you just have to rename all other keywords.
It's worth noticing that keywords are listed exactly the same way (same order and same amount of 00' between names) in both the editor and the exe, while the order they appear in the table file isn't exactly the same.
I might give creatures a test, but it would be in the sense of dublicating a monster and just change name to see if it works.
I also found that there seems to be a bunch of unused splashscreen names. I still have to test these, as simply renaming a splashscreen and placing it in Data folder doesn't read it. The same was the case with portraits. It seems the file needs to be build before you can 'overwrite' it with a .h4d copy in the Data folder.

There are other stuff to look into, but that will follow later, in case they work.

EDIT: If anyone is interested in locations in the exe file, I'll post them here:
Artifacts: 0064b24b/00656fa0 (not sure yet of the difference, but could be adv. map/inventory images).
Abilities: 00663f30.
Decoratives: 0064e100.
Dwellings: 0065bb50 (in town), 0064cc38 & 0064e8c4 (not sure the difference, but worth noticing that Mega Dragon, Sea Monster and Mermaid dwelling are listed at 0064cc38).
Spells: 00682754.
Creatures: 00664d40 (portraits), 00664d4c.
Splashscreens: 006796cc. (006660b0 the ones displayed in the campaign menues).
Heroes: 0066e758

UPDATE:
Quote:
But keywords have "00" spaces that do nothing.

You need at least one 00 space. But sometimes there are two or three or four consecutive ones. Add a new "keyword" in between, for example.

Instead of archilus....aislinn
Do archilus.iu.aislinn

Now you can have a new keyword hero named "iu"

Change one generic keyword to hero on table. Compress table and put on game data.

Then add portrait with the method you found.

You are done now.


I just tried this, without succes >.<. In both the editor and in the exe I replaced hexx....hastner with hexx.hb.hastner.
In both layer files I replaced 05 hexis with 02 hb.
In tables file I replaced generic keyword with hb and class with Necromancer. (as Hexis' portrait is alread packed, I figured that would be the obvious choice to start with).
But it doesn't work. I get an Out of Memory error when trying to edit the heroes in the editor.

What I know is, that the layer file should be fine, I encountered some initial issues, but I can view all the images within the file and see Hexis' portrait being renamed to hb, so that seems fine.

I noticed something, which could be the issue, the original tables file is 144KB while my modded file is 139KB. Now what really puzzles me, is that I tried adding an extra line the other day, but couldn't get that to work either (editor wouldn't open) - it's size 139KB.
Now just in case I would be able to add more heroes, I made a tables file with 50 lines added, most with blank keyword. The really odd thing is, that file is 133KB. Now if I type in 'test' as keyword and saves as, the file is further reduced to 129KB..?!! I played around with it a bit, and it seems it can make a difference wheter you choose save as or just save. I could increase file size back to 133KB by deleting the keyword and press save, instead of save as.. It makes no sense that the file gets reduces, even though more text is added. Maybe this is the problem?? (I've used TextEdit program for editing, and HexEditor for inserting additional lines).

Also worth mentioning, is that I made a test map based on the previous modifications I made to the editor/exe file = renamed Aglion to Aclion and replaced generic heroes with Sleeping and Dead in tables file. Aglion is no longer present in the normal editor but now appears as a female death knight in the modded version (which btw. seems to read from new_mod.h4r instead of new.h4r.). The modded exe file runs and reads the map just fine, which leads me back to thinking the tables file must be the one causing the error.

I haven't yet been able to confirm or not, wheter the number of lines within the tables.heroes file are listed somewhere - so far I haven't found any number to match this.
There's a total of 511 lines in the file minus 6 info lines (Special Campaign heroes, Generic heroes, Version 1.3, Heroes Expansion 2.0, empty line and Heroes 2nd expansion). So a total of 511 (505 name) lines.
In the layer files, the first code indicates the number of portraits that are read. I added an image but didn't change the code, result was that the last image gets cut off. So it didn't corrupt the file, it just told that only 58 images should be read instead of all 59.

@NimoStar, perhaps you could find time to do some testing of your own?? In theory it shouldn't be hard, but as you see, something is preventing it from working..

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


Supreme Hero
posted September 04, 2017 09:20 AM
Edited by Baronus at 09:31, 04 Sep 2017.

I tried reduction 0000 but no succesl Yes I think the same. If you Nimo has any succes modding exe names or editor names send us a file. Me and Karma tried many times and dont work. Kewords are codded in way we dont know and we dont see any idea and sense with these keywords. One is short second long. We have 00 empty or 000000 empty space? No idea how it works... If I changed 00Anium to Anium00 this hero IS NOT VISIBLE! I dont see how to ad new if small correction old gives error...
...
Karma thanks for adressess!

Beware witn txt tables. Maybe you changed format? Must be special and only special txt edit do it correctly. Some editors can destroy format by giving another!

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


Promising
Famous Hero
Modding the Unmoddable
posted September 05, 2017 03:35 AM

kARMAKELD, i AM SORRY TO TELL YOU YOUR TEST IS NOT RELIABLE FOR .EXE PRINCIPLES IF YOU DON'T KNOW HOW TO PROPERLY EDIT A TABLE..

(sorry, accidental caps lock)

wHAT i AM SAYING IS THAT AS bARONUS SAYS ... arrgh again
...there is a proper procedure for doing that and it involves special programs like textedit. I use textedit. If you use for example notepad or notepad++ to edit a table file, they will lose format and be unreadable by the game
(Incidentally the same happens if you use textedit to edit the Strings file, much to my chagrin - NOTHING but hex editing seems to format it properly)

Textedit has a button at the top to "add new line" (it looks like a down-pointing tan-colored spike arrow)

I have used this many times with relatively few problems.

As for the 00 on hexes ... they are being used as null instructions (but the proper code for that is 09, equilibris programmers were noobs :V) ...  thus these are effectively "blank spaces" and do nothing.

Take into account this is not "00anium00", but rather, those pseudo-null instructions (each double zero is a single byte) are displayed like dots in ASCII, so it is ".anium." (but they are not the ONLY instruction/value that displays like a dot, so be careful)

As for these... I have sucessfully used these "blank spots" in editing other parts of the .exe such as mass_spells and even the enumeration of read files (that is why my mini-mods are on "nim.h4r" rather than "new_mod.h4r", also I free space this way by shortening and leaving more 00's than before)

SO, my theory is still that it might work, but you have to implement it properly.
I will try by creatures first and report any results...
____________
CLICK on the image to discover H4 Greatest Mod!

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


Supreme Hero
posted September 05, 2017 05:47 AM

I teld that I only replaced hero by 1 byte eg. Anium. to .Anium AND AFTER I DONT SAW ANIUM IN EDITOR! I have no idea how it works.

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


Promising
Famous Hero
Modding the Unmoddable
posted September 05, 2017 10:04 PM

That does seem to be true, and strange. I also noticed that Anium apears on the bottom of the hero list instead of the top (when you choose your hero in editor, at least with my mod - Anium is the first necromancer aphabetically, yet appears last).

When "removing" Anium  by your technique, Blackdog, that was the next alphabetically, appears last instead of first instead.

Anyways, most heroes are not ordered alphabetically, but some are, so I don't know what this means.

In fact, it seems heroes with the same alignement are ordered alphabetically from the bottom up in the .exe

Check this:


***

However, what I truly wanted to do to begin with, was adding one or two letter heroes *in between* existing heroes, not to move those existing. Of course, that would have been the long term plan if it worked, but first things first. What I am worried about now is that they won't even read those new heroes. Maybe the programming points *specifically* to where each hero/creature keyword begincs...

If this would be the case, without knowing where that programming is, change would be impossible.

So... back to asking for the source code. :v
____________
CLICK on the image to discover H4 Greatest Mod!

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


Supreme Hero
posted September 06, 2017 08:52 AM

I didnt removed anium its only example. Ive removed another in middle table but dont remember.
How it will be work if moving by 1 byte destroing hero? Ok. if you can do it. Whats a problem add 2 letters? ab or an?

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


Adventuring Hero
posted September 06, 2017 10:16 AM
Edited by radmutant69 at 10:18, 06 Sep 2017.

I just tried to make a new hero by replacing two 00s between Mysterio's and Erutan Revol's keywords with 'xy' both in the exe and the campaign editor, and added this new keyword to the hero table between these two.

The Facetool can see this new hero but not the exe or the editor. It's not working just like that, I think.

The only thing what I could do successfully (for now) is duplicating heroes. They share the same name and portrait, but you can add a lot of Anium (for example) of different hero classes, looks or gender to the game...

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


Supreme Hero
posted September 06, 2017 11:10 AM

As you see. Only solution I see is that we have codded number of heroes - at begin and at end. And you must correct it. Maybe you must change. But I if I replace hero by 1 byte I dont see it. Maybe I must to edit both editor and exe.

But mabe USING ONE KEYWORD, BUT ANOTHER CLASS!!! :-):-):-)
Eg. Anium in Life def may be knight but in Order def may be Lord. Next add Anium as keyword to knight and second lord. But name can be another. Anium as Roland knight and Nolan lord. Now you have TWO OTHER PORTRAITS! Because maybe game read from another defs? But all of this can give crash :-) Its only fast idea:-)

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


Adventuring Hero
posted September 06, 2017 11:53 AM
Edited by radmutant69 at 12:01, 06 Sep 2017.

Nope. Heroes with the same keyword always share the same portrait and name. Stupidly the portrait comes from the first Anium in the table but the name (and the bio) is from the last Anium. At least in my little experiment. I don't really know why.

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


Supreme Hero
posted September 06, 2017 07:20 PM

Editor dont need exe. Its another good news.
I know how names are codded. Name must be 4x size 4,8,12,16 etc. Its a key! But must be 00 to border so eg. aniumate00000000 must be 12.
If you want cut name to find area you must:
1. Cut editor.
2. Cut exe.
3. Cut big layer.
4. Cut small layer.
Is any sense of it? Your mod will need very big work. We dont need thousands new portraits because in one gameplay we need only small number. So adding by replacing old is the best and fast solution and dont need all layers editing by name cutting. If we will find easy way to add its no problem. For now its big work. And add only new picture and bio. In HIV its only difference inside class. So mod heroes you want and build new.h4r file. You can replace it in a moment.

And if I cut name new hero is still not visible. Old yes but not new. Must try maybe another way...
...
Dont edit keyword by textedit I posted! It break file! Only hexedit. Keyword is eg. 0500anium. 05 is anumber of letters. So eg. 0800aniumate.This method dont destroy you file. Rest you can edit by HIV txt edit correctly.

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


Promising
Famous Hero
Modding the Unmoddable
posted September 06, 2017 10:39 PM

Quote:
Nope. Heroes with the same keyword always share the same portrait and name. Stupidly the portrait comes from the first Anium in the table but the name (and the bio) is from the last Anium. At least in my little experiment. I don't really know why.


Can these Aniums be in the same game at the same time with different appearances?

If so this may be good for a campaign. Doesn't matter if a bio and name is the same so much... these can be customized in campaign editor, even.

The thing is that you can have the same hero as many classes (even as different hero Creatures) without spending more hero slots.

This was made just by extending the hero table?
____________
CLICK on the image to discover H4 Greatest Mod!

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


Adventuring Hero
posted September 07, 2017 08:04 AM

Heh. No. I failed.

It works in the editor but in the game they all have the same class and appereance. And most of them use generic names.

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


Famous Hero
posted September 09, 2017 12:07 AM

Nimo, if you read my post properly, you would've noticed I wrote that I used TextEdit for editing or HexEditor, not notepad or other text program, so I find it unfair to ditch my test result based on your assumption that I used a wrong program. As I also posted, it's when I saved as IN TextEdit program that I noticed file size change - I have succesfully edited several tables files, so I do know how to properly do that.

As for the rest, you all basically reached the same results as I - some being viewable in FaceTool but not in editor/game - this clearly indicates that the FaceTool only reads from the tables/layer files packed within the new_mod file.
As for the alphabetic order, I already stated they're more or less listed in the same way in the editor/exe as in the tables file (reversed alphabetic within classes, followed by expansions etc..).
That was also why I tried inserting HB between HExx and HAstner, but to no success.
I replaced generic keyword, but as that worked with dead and sleeping, I doubt the tables file has to follow the same order as in the editor/exe.

I had a similar idea of doing another attempt with a dublicated, renamed hero and then use FaceTool to edit the portrait, but as other attempts to add keywords have failed, I don't see why this would be any different.

Anyway, it's nice to see others giving it a try.

Btw. Did any of you try to shorten a keyword, say from 05 Anium to 04 Aniu (replacing m with .)?

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

Page compiled in 0.0572 seconds