Pwned Noob 9 #101 Posted November 6, 2008 Guys, I need help When I repack Models.H2O from the extracted files and play with the repacked file, I get a crash just after the first loading screen. I did NOT change anything, just extracted and packed, to test. I tried with both cmd and GUI, nothing to do. I noticed the file changes its size a little (original = 97.477 KB, Repacked = 97.816 KB). By any chance, do I need some kind of patch to Battle Realms in order to get it to work? UPDATE: Apparently i'm not the only one with this problem, and I tried to take action. Opening the original file (this time interface_text.h2o) with the hex editor, all what i could see was a bunch of incomprensible bytes. Opening the repacked file... surprise... the text was still perfectly readable, just like in the extracted files. So I looked into the source code. This is from cmd_extract.c, line 25 and following: if (node->file->entrytype == ENTRYTYPE_COMPRESSED) { printf("decompressing file: %s\n", node->name); dumpchunk(src, dst, node->file->checksum); } else if (node->file->entrytype == ENTRYTYPE_RAW) { printf("extracting file: %s\n", node->name); dump(src, dst, node->file->size_raw, node->file->checksum); } This is from cmd_build.c, line 36: entry->entrytype = ENTRYTYPE_RAW; Not compressed. Just like the file I checked with hex editor. Maybe I've figured it out, but i'm a noob () and i can't c0mpile (usually that word gets you an error in forums) it. I'd try to replace that line with entry->entrytype = ENTRYTYPE_COMPRESSED; ... and have a test. Who knows. 8 Quote Share this post Link to post Share on other sites
marcelo_20xx 17 #102 Posted November 19, 2008 I will like to add something here. The repacks tools are not always perfect because sometimes they use differents algorithms of compression to achieve the same result, the expected file may vary, while sometimes it will work fine in others it may crash the application (the game) because of misplaced bytes, loss of information in the compression data process and random errors. You can check this just by extracting the file and then repacking without changing anything, most of the time the CRC and checksum of the file will be different of the original one unless is a well documented type of archive. In BR we don't have such luck, but H2Otool is a good and useful tool nonetheless. Quote Share this post Link to post Share on other sites
Pwned Noob 9 #103 Posted November 19, 2008 I will like to add something here. The repacks tools are not always perfect because sometimes they use differents algorithms of compression to achieve the same result, the expected file may vary, while sometimes it will work fine in others it may crash the application (the game) because of misplaced bytes, loss of information in the compression data process and random errors.You can check this just by extracting the file and then repacking without changing anything, most of the time the CRC and checksum of the file will be different of the original one unless is a well documented type of archive. In BR we don't have such luck, but H2Otool is a good and useful tool nonetheless. It extracts perfectly. But the problem is packing. I don't think the output is compressed at all; i was able to read each string of the text interface files I included. While in the original packed .h2o i can't read any string, just some "ÿÿÿà 1•â" for example. Oh well, i'll have a look at the algorythm and try to make my own VB6 program to extract/pack; i'd better not get my hopes up anyway. Quote Share this post Link to post Share on other sites
Dragon Lord 0 #104 Posted December 27, 2008 how can i make kenji appear in skirmish with h2otool?.. help pls i dont know what to do Quote Share this post Link to post Share on other sites
Mana 3,867 #105 Posted December 27, 2008 how can i make kenji appear in skirmish with h2otool?.. help pls i dont know what to do You don't. But someone has made a mod for that. Try searching. Quote Share this post Link to post Share on other sites
Luzifer666 0 #106 Posted February 24, 2009 Ok guys great tool thank you very much. But I have a problem. I played around with the rice texture, repacked everything and started the game. Everything worked fine and the rice texture was the one I created, BUT when I play the game I see black tiles on the ground: So I unpacked the original textures again and repacked them immidiately without changing anything to test if the packer is the problem and it seems like it is the problem because the same shit happened again. I tested this with both packers and several times. Any suggestions are appreciated. Thanks! EDIT: These tiles are under buildings aswell but in a lighter color. I painted the shadow of people green to see if it has an effect but it changed nothing. Black tiles again :-( Quote Share this post Link to post Share on other sites
Dark_one 0 #107 Posted April 24, 2009 Hi, im trying to edit the textures on the models.h2o file, but i cant rebuild this file, because when i launch the game , it crash, and says: "GATHERPOINT_DRAGON.lmd" I know that im not the only with this problem, but i cant figure out, how to solve it, or i dont know if this file cant be repacked again, because i follow the tutorial of extract-build (Zymeth tutorial) with textures.h2o and works, but whit this file not... Quote Share this post Link to post Share on other sites
dragonnik1 3 #108 Posted February 7, 2010 Hey any body found solution this problem..tht extract n repack of models.h20 files? H20 GUI/cms both gives error..anyluck with anybody? Quote Share this post Link to post Share on other sites
nicosafull 0 #109 Posted December 9, 2011 I checked HD textures made by soe guy I packed both, efftecs.h2o and effects2.h2o and replaced same files, old shitty ones with new ones, when I launch game NO crash , but ny textures in the gamr are kike invisible, warlocks bolts are not seen... the problem is packing Quote Share this post Link to post Share on other sites
masterlotuslovebr 0 #110 Posted May 13, 2012 OH YEAH!!! i did it. i was able to extract the Music.H2O file. LOL. Quote Share this post Link to post Share on other sites
jirooryuji 2 #111 Posted September 15, 2012 can i requestt a mod here? -dragon- on keep: -change garrin to Kenji 1, otomo, kazan, teppo, arah, tao heroes train to keep: training cost will increase by 50% (not including yin and yang) -kenji 1 = kenji one with the dragon, inc. att and def 25% -tao =inc. mag.def and def by 15% -otomo = inc. att 10% and def 15% -kazan = inc. att 5% def 20% -teppo = inc. def 15% -arah = inc. att 5% and def 10% range 5% -serpent- on keep -change budo to kenji 1, young taro?, shinja, utarah, vetkin heroes train to keep: training cost will increase by 50% (not including yin and yang) -kenji 1 = kenji 3(tattooed, same strenght w/kenji one with dragon) young taro? = taro (increase att and def by 20%) -shinja = att 15% -utarah = att and def 10% -vetkin = att 15% def 5% -wolf- on keep -Grayback (slave), shalelord, wildeye, longtooth(slave), gaihla heroes train to keep: training cost will increase by 50% (not including yin and yang) -grayback (slave) = gryback (end, stats(resistance, att, mag.def, def, etc.) inc. by 20%) -longtooth (slave) = longtooth (armored, inc. att and def by 10% range 5%) -shalelord = def and mag.def 20% -wildeye = att and def 10% -gaihla = att 5% def 15% -lotus on keep -Zymeth, change soban to Nightvol(ninja w/ attack and def of 5 ninjas), yvaine, issyl, koril heroes train to keep: training cost will increase by 50% (not including yin and yang) -zymeth = zymeth (with orb, att of 10 WL) -nightvol(ninja) = nightvol (true form, w/att and def of 15 ninjas) -yvaine = att 10% def 5% range 5% -issyl and koril = att and def 10% all peasants increase all stats by 15% all warriors increase all stats(resistance, att, mag.def, def, etc.) by 15% all buildings increase hp def 100% and fire resistance by 25% all range warriors (archers, crossbowmens, hurlers, leafdesciples, etc.) increase range by 2% AI should be able to use Kenji one w/the Dragon, Zymeth one with Orb and other Upgrades. Hope you can do it Quote Share this post Link to post Share on other sites
Inertia 0 #112 Posted January 14, 2013 I hate to revive an old thread, but when extracting models.h2o, I noticed that the models,meshes,skeletons etc are all in formats like .LMS or .LSD. Anyway to edit these? Quote Share this post Link to post Share on other sites
Blankname 14 #113 Posted August 23, 2014 (edited) i have made a little unofficial update for the h2otool. it now reads user input from console and and has some minor bufixes https://www.mediafire.com/folder/m3ilwb1j98hck/h2otool my goal is to implement the pkware compression functions, but no sure how long it will take me or if i will even be able to do it, since im still a beginner at C Edited August 24, 2014 by Blankname 1 Quote Share this post Link to post Share on other sites
Danixu 0 #114 Posted June 12, 2015 i have made a little unofficial update for the h2otool. it now reads user input from console and and has some minor bufixes https://www.mediafire.com/folder/m3ilwb1j98hck/h2otool my goal is to implement the pkware compression functions, but no sure how long it will take me or if i will even be able to do it, since im still a beginner at C Wow thanks for the update. Even with the update i still getting problems with Interface_Text.H2O. The size without change anything (unpacked and packed), change from 183KB to 2718KB. When I try to enter to game then it closes. I'd like to help you but i don't know about C programming. Greetings!! Quote Share this post Link to post Share on other sites
Blankname 14 #115 Posted August 14, 2015 in case anyone intersted i have started researching the h2o format by reverse engineering the liquid exes (BR, LotR:WotR, Dragonshard) and found out that br and wotr h20 formats are different, although both have a version number of 6.0 (they probably didnt bother to change it to 7.0) more finds: unknown1 after 'number of files' is actually 'number of <unknown>' which stores a structure of 8 bytes at the end of the file (8 bytes x number of unknown1). the contents of this structure is unknown since unknown2 is always 0x0CE34100 if there directories or 0x00000000 otherwise, it doesnt seem important to know the purpose of this variable (where is unknown3?? lol) unknown4 is also always 0x7CFC1200, neither seems important surely offset and unknown5 are one only variable of 64 bits, since the (un)compressed sizes of h2o files are also stored in 64 bits variables so we are only left with unknown6... Quote Share this post Link to post Share on other sites
KoMiKoZa 14 #116 Posted August 15, 2015 in case anyone intersted i have started researching the h2o format by reverse engineering the liquid exes (BR, LotR:WotR, Dragonshard) and found out that br and wotr h20 formats are different, although both have a version number of 6.0 (they probably didnt bother to change it to 7.0) more finds: unknown1 after 'number of files' is actually 'number of <unknown>' which stores a structure of 8 bytes at the end of the file (8 bytes x number of unknown1). the contents of this structure is unknown since unknown2 is always 0x0CE34100 if there directories or 0x00000000 otherwise, it doesnt seem important to know the purpose of this variable (where is unknown3?? lol) unknown4 is also always 0x7CFC1200, neither seems important surely offset and unknown5 are one only variable of 64 bits, since the (un)compressed sizes of h2o files are also stored in 64 bits variables so we are only left with unknown6... And what exactly does this information give us? The h2o files have already been unpacked, what's the use of your research? I don't get it. h2o is just a "storage" file extension used to archive the game data. It's better to investigate other unknown file extensions or battlerealms_f.exe, no? Quote Share this post Link to post Share on other sites
Gregor8356 275 #117 Posted August 16, 2015 I think the researchs are to improove H2O tool based on all files made by liqud H20 files, this my give as beter understanding compresion and decompresion errors Quote Share this post Link to post Share on other sites
KoMiKoZa 14 #118 Posted August 16, 2015 (edited) I think the researchs are to improove H2O tool based on all files made by liqud H20 files, this my give as beter understanding compresion and decompresion errors I.. still don't see any use of it, but probably because I'm not really into the technical part. There is a packer/unpacker (h2otoolGUI) and it works fine, has never showed any errors. If we have it, why research further? I mean I'm not against that but I think it's better to research other BR extensions or .exe itself instead. Edited August 16, 2015 by KoMiKoZa Quote Share this post Link to post Share on other sites
Blankname 14 #119 Posted August 16, 2015 researching the .exe is what im doing, as i already said h2o tools are incomplete and causes the game to crash sometimes when using repacked h2o files Quote Share this post Link to post Share on other sites
KoMiKoZa 14 #120 Posted August 16, 2015 researching the .exe is what im doing, as i already said h2o tools are incomplete and causes the game to crash sometimes when using repacked h2o files Alright, I got you. By "researching the .exe" I meant researching other game features, not h2o compressing system. But now I see, wasn't really aware that the h2o packs cause the crashes. You're doing the right thing! That might help us in the future as BRJokerz are preparing a huge project dedicated to BR. Good luck! Quote Share this post Link to post Share on other sites