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 · NEXT»
Karmakeld
Karmakeld


Famous Hero
posted August 21, 2017 08:47 PM
Edited by Karmakeld at 21:56, 21 Aug 2017.

Found a way to add new heroes

I've just tested it, and I managed to succesfully make use of the three unused portraits packed in the game files - Hexis, Dead (tombstone) and Sleeping
View the file in the FaceTool and you'll see.
Look at the Male/Female Necromancers. They're some of the last ones.

We've discussed this some months ago and it was suggested to use Generic heroes, and so I did.
I simply renamed the 'keyword' to the above using TextEdit and also changed class.
I'll have to try adding more portraits to the portrait files, but the process should be the same.

EDIT: Hmmm.. It seems I can't open the editor with these changes.. I guess the reason is that I only packed the heroes.tables and the other text files are missing. Still you can view the added heroes in the FaceTool for now. Will have to update the file and see how it looks in the editor.

EDIT2: Yup, I got the edior up and running. 2 of the heroes (Sleeping and Dead are present in the editor. I can view them when customizing female necromancers and they also appear in the Customize available heroes list. Oddly Hexis doesn't appear even though he's present when I open the FaceTool.

Anyway, next step will be to try adding custom made portraits, and see if they can be added and read.

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


Supreme Hero
posted August 21, 2017 11:04 PM

Add new line. Hero data and x to have in tavern. Facetool 95 can add new hero as I read.

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


Famous Hero
posted August 22, 2017 08:12 AM
Edited by Karmakeld at 08:19, 22 Aug 2017.

Thanks for the suggestion, Baronus, but I can't/don't know how to add new lines. TextEdit won't add new lines, the function doesn't seem to work, but I'll try adding new lines via HexEditing, it's the only way I can think of. More specific, I intend to just copy/paste infos, meaning instead of adding new lines and potraits separately, I hope to do it in one take.
FaceKit95 won't run on either my Laptop (Win8) or my Desktop (winXP), so that's not really an option.
If you can add new lines, perhaps you'd like to help me?
I have numerous portraits to add myself, but others might like just blank Color Circles, so ppl. can add their own. I was thinking of eg. 10 empty portraits pr. Class.

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


Supreme Hero
posted August 22, 2017 09:34 AM
Edited by Baronus at 09:34, 22 Aug 2017.

What is with your Facetool? You must only write in command lines there heroes iv folder and second the sameplus /heroes4.h4r.
Txtedit has option add column add row...

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


Famous Hero
posted August 22, 2017 10:26 AM

Yes TextEdit has the options to add rows and xolumns, but it don't seem to work. I've tried and it never adds anything. Does the function work for you?

My Equi FaceTool works fine
FaceKit on the other hand doesn't. I'm not by my pc, but I recall it said something about Language error.

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


Supreme Hero
posted August 22, 2017 11:25 AM

Ok. Manually will be hard but its possible:
1. Made your new eg. 16 portraits using eqtool. It replace old heroes.
2. You must hexdedit it. Change names eg 05 anium to 07 newher1 (more letters)
3. Add 16 new lines in txttable and write all new data with new keyboards.
4. Copy paste your new 16 heroes def to old! At the end. Change you do it correct. You must cut first two bytes 10 its 16 because now it will be false.
5. At top of def you have number of frames eg. a0 = 160 portraits. Add 16 it means b0 = 176.
It will be correct.
First try add only 1 new line portrait.

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


Famous Hero
posted August 22, 2017 11:33 AM
Edited by Karmakeld at 11:35, 22 Aug 2017.

Thanks. I didn't think of the portraits being counted on hex code. I'll keep you posted of my progress.

If you can add row and colums with TextEdit that would be very useful. Can you use the function?

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


Supreme Hero
posted August 22, 2017 11:47 AM
Edited by Baronus at 11:49, 22 Aug 2017.

I must test. If not copy paste some old lines by advanced notebook. And open txtedit.
You can add new def named like old in eg. new.h4r without injection to old def. Its easiest but if you want more portraits you must add at end as Ive wrote, because you may have only one new.h4r.

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


Famous Hero
posted August 23, 2017 03:03 PM
Edited by Karmakeld at 09:14, 30 Aug 2017.

Well it might seem I got a bit too excited a bit too fast.
By HexEditing I can add new lines to the tables.heroes.txt file. These new lines can be read by the FaceTool, but the image is blank. And as the FaceTool requires an image to overwrite, it basically can't save my changes.

I'm able to add new layers to the image files, but I haven't yet packed it in a h4r file along with the modded txt files. In the past I haven't had much luck with ResEdit for packing files, but I will have to try it. Something I noticed, is that although I renamed the image and am able to view the image name in other programs, I can't locate it, when viewing it in HexEditor, so I'm not sure if this is indeed a usable way to setup the keyword that link the txt file to the image.

EDIT: I found out the image keyword got renamed to frame 001. Not sure why though, but it can be changed by Hexediting.

Alternative method might be to HexEdit the image file and simply copy/paste an image within the file and renaming it.

@Baronus, if you have the time, I can send you any modded file and perhaps you could help me, either by trying to pack the modded layer file or by copying an image with hexedit??

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


Supreme Hero
posted August 23, 2017 05:39 PM

To add new line just copy paste some old lines and edit by this txtedit:
fee txtedit

HD editor you need to edit LAYER!!! You must write new keyboard. Keyboard is name in layer eg Anium. HD editor usually can search txt content inside file. New keyboard you must write in table.
Layer must be packed if you have there only few portraits. If you have all portraits in layer no.
But to see your new heroes you must rename layer to h4d and put in data. It remove all your old heroes but newest will be visible. Table must be packed.
To use Resedit2.
Open. Create new file. Save. Close Resedit. Open new file by Resedit. Open editing panel and select file. Push on file. Confirm.
The best is Mh4096. You must only extract table and using equi build new one. RENAME EQUI BEFORE!
Ofcourse if you have problem i can look it by email.

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


Famous Hero
posted August 23, 2017 05:57 PM

Well my current status is:

I can add new lines to the text document quite easily, I simply hexedited it, and then text edited the text changes, so that part is ready.

I came to the same conclusion that I need to look at the .lay files - was about to attemp editing h4d, but recalled from Radmutant method for adding new objects, it was the lay that was edited.
I'm currently about to try copy/pasting aislinn's image.

If I place the layers.icons.hero.death.82.h4d file in my Data folder, I'm able to see the changes in the editor.

I've been switching between using GIMP, Namerutan's Tool and the FaceTool. Importing/Saving the edited image, renamed Aglion to Frame 001, thus making his image blank in the editor. I renamed him by hexediting and that worked. So on the positive side, that mean the keyword linking is as expected.

So I'll just have to set up 2 versions of a .lay file - one with original Aislinn image and one with custom portrait, allowing me to compare the image info and see if I can copy/paste those parts.

If I'm unsuccesful I'll e-mail you the stuff I got so far. But admittedly my biggest obstacle is understand where Images starts and ends and where to paste the copied part.

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


Supreme Hero
posted August 23, 2017 07:22 PM
Edited by Baronus at 19:27, 23 Aug 2017.

Picture begins 000100 its pallete 256 colors but first try easiest method.
Maybe made lay by Eq facetool. Extract lay and rename only to eglion and add line with keybord eglion. And copy all aglion content to new line and see result.

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


Famous Hero
posted August 24, 2017 04:52 PM

So I spend a lot of time trying to figure out how the files are read, and made quite a few conclusions along the way.
I could view some changes in the FaceTool, but they wouldn't necessarily show up in the editor.

Long story short, all the keywords are stored within the editor. I renamed one of the heroes in the editor and saved it as a separate editor.exe and now the edited hero is present. If I rename the keyword and open std or equi editor, the hero won't show.

So to add new heroes, creatures, splashscreens etc. new keywords will need to be added to the editor.exe.
There's a bunch of artifacts and spell keywords in the editor, which are also present in the tables files, and I noticed at least with the artifacts, Equilibris team also used existing keywords for their added artifacts.

So next step will be to try adding new hero keywords to the editor. I don't see a clear pattern, as the number of punctures (.) aren't the same between the names. I guess I'll just have to try and see what happens.

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


Supreme Hero
posted August 24, 2017 08:19 PM

Interesting. Its not automaticaly way like objects? How facetool makers done it we can add new heroes? Should I try or you are able do it?

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


Adventuring Hero
posted August 24, 2017 08:36 PM

You have one more problem with this. I think you have to add the new keyword into the game exe file too since also there are those hardcoded hero keywords. I don't think that your newly added heroes would working ingame without it.

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


Famous Hero
posted August 24, 2017 08:49 PM

radmutant69 said:
You have one more problem with this. I think you have to add the new keyword into the game exe file too since also there are those hardcoded hero keywords. I don't think that your newly added heroes would working ingame without it.


Yeah, I had the same thought about the game exe needing editing as well. I just didn't post my discouragement ;-)

@Baronus, it would be great if you could help test editing of the campaign editor and exe file. Just search the hero names. I'll try adding an extra hero tomorrow.
A thing to note, is that placing the layer files as h4d in Data folder and packing the text.h4r didn't do it. Instead I extracted and repacked new_mod.h4r
I'll email you a copy of my edited files (working in the editor) and a layer file with an additonal portrait.
I might be a cumbersome process, but if Equilibris are still actively working on the HD mod/next version, perhaps people would find it usefull with additional heroes..?

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


Supreme Hero
posted August 24, 2017 08:55 PM

I checked it. And have good news. Your portraits are too big! So maybe it will be work with correct...
Portrait begins 000101.
Big has 6731 + NAME LETTERS size eg. Anium 6 = 6737
Small has 3335 + name eg. 6 = 3341
Only name keyword is another! Always the same rest.

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


Famous Hero
posted August 24, 2017 09:10 PM

What info are you refering to?
I viewed my added portrait in Namerutan's tool and it displayed them as having the proper size, but I'm curious if you can make it work without editing editor and game file.

I should point out that in my succesfull attempt, I just changed aglion's keyword in the tables.heroes.txt as well as in layer files, and as posted, he doesn't show in the editor. But give it a try and share your results.

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


Supreme Hero
posted August 24, 2017 10:28 PM
Edited by Baronus at 22:31, 24 Aug 2017.

I vievied it in hdeditor. Eg. all big portrait has 5284 bytes = px your has 5443 or something like that. Maybe it is correctly raw but not like original portrait. So maybe it is a reason...
Maybe duplicate simply copy paste last portrait in lay, change letter add line in txt add 1 number at header and see result. It will be original.

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


Famous Hero
posted August 25, 2017 09:10 AM
Edited by Karmakeld at 09:30, 30 Aug 2017.

I already tried copy/pasting one of the images within the layer file and renamed it. Didn't work for me. I already did many different tests - I could post my result if you want, but the only thing that made a visual change in the editor, was when I edited a keyword within it.

But you could try what you suggested. Perhaps you can make it work?

Although I still believe it requires editing of editor and exe. If I can enable Hexis' portrait by adding it to editor, that should prove it, as that keyword isn't in the editor and I can't enable it by editing the tables file. Equi FaceTool reads it, but not even Equi editor displays it, hence my conclusion.

UPDATE:
So I tried renaming Hsine to Hexis in the editor, and with Hexis keyword present in the tables file, his portrait is now present in the editor (Hsine no longer is).
I then did few attempts to add Hexis to the editor followed by 1 or 2 "./00"s, result is the editor is no longer a recognized program and can't be opened.
Baronus figured the issue might be related to the editor's byte size being increased and tried replacing some of the 00's between hero names, but also seemed to break the editor.

I got another idea to try. Instead of removing 00's I will try reducing the keyword names like Archimemnon to Archi, that could give us 6 letters/bytes if global size has to remain the same.

I still have to see if there's any logic to the number of 00's between names, as they vary from 1-4. Also I'm not sure if the keywords has to follow the same order as in the tables file, most do, but I recall a few didn't, so that could indicate that it isn't important.


 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 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0321 seconds