How do I re-pak a moded file into the data.pak???

Mods and development for mods. Including WoG & Equilibris (RU) subforums.
User avatar
Drax
Leprechaun
Leprechaun
Posts: 10
Joined: 21 Jun 2006
Location: Texas
Contact:

How do I re-pak a moded file into the data.pak???

Unread postby Drax » 21 Jun 2006, 17:12

Ok, I use winrar to extract a zombies.xdb creature file from data.pak
(gamemechanics\creature\creatures\necropolis\zombies.xdb)
I edit it to change their speed from 4 to 8 in wordpad, and save it. Now how do I get it back into the data.pak file without screwing it up.

Please be specific and detailed as I am new to this and leaving out what may seem an obvious step to you could derail my efforts.

Thanks for any help.

User avatar
Arstahd
Leprechaun
Leprechaun
Posts: 48
Joined: 20 May 2006

Unread postby Arstahd » 21 Jun 2006, 18:40

Leave the original PAK files alone, there is no need to change them. The game will read and use any new PAK files that are placed in the same folder.

To create a new PAK file you just need to archive your modded files into ZIP format (make sure to keep the file structure). Then just rename the extention to PAK.

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Unread postby Gaidal Cain » 21 Jun 2006, 18:43

That's right. To make it more clear, you need to go pak the gamemechanics folder. Name of new pak file doesn't seem to matter.
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Drax
Leprechaun
Leprechaun
Posts: 10
Joined: 21 Jun 2006
Location: Texas
Contact:

Unread postby Drax » 21 Jun 2006, 20:24

Ok, sounds like it will be pretty easy, but how do I keep the file structure. I tried zipping the file with winrar and renamed it from .zip to .pak but it still isn't being picked up. How exactly do I do this? Or should I say what steps do you guys use to do this.

Sorry if I seem slow, but Im new to this.

Thanks

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Unread postby Gaidal Cain » 21 Jun 2006, 21:35

When you extracted the file out of the .pak file in the first place, did all the folders in the .pak file get extracted as well (i.e you found the file in Heroes5/data/data/GameMechanics/creature/creatures/necropolis)?

If so, go to heroes5/data/data, and zip the GameMechanics folder, rename the zip file, and move it to Heroes5/data. Otherwise, create sucha folder structure (case probably matters, so check that it's correct).
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett

User avatar
Drax
Leprechaun
Leprechaun
Posts: 10
Joined: 21 Jun 2006
Location: Texas
Contact:

Unread postby Drax » 22 Jun 2006, 01:55

Got it! Wow, this is really awesome. I can't believe how easy this is, Here is how I am doing it for those who read this thread in the future.

1 Make a folder to use as a work site. I called mine c:\Heroes5dataUnpacked
2 Using winrar, extract your whole data.pak file from the Heroes5\data directory to the newfolder. (IT will be about 2.6 gig so be sure you have space.)
3 Navigate through the directories there to find the one you want. I went to Gamemechanics\creatures\creature\necropolis\ where I found all of the .xdb files for the undead creatures. I wanted to make a modified copy to get me through the Invasion campaign because the computer had so many cheats I was getting my butt kicked.
4 open the file you want to change (ex zombie.xdb) with some text editor. I used wordpad and it worked fine (Oh yeah, right click the .xdb file and go to properties and uncheck the read only attribute)
5 find the attribute you want to change and change its number, then resave the file.
6 Using winrar, take the whole gamemechanics directory node and 'add to archive' selecting .zip extention instead of .rar and name the file something descriptive. I called mine GameMechanicsSuperNecro.zip. After it is created rename its extension from .zip to .pak
7 now just copy that file to your Heroes5 data directory and run the game, and your new attributes are in play. When you want to disconnect the changes just move the file back out of the directory.


Thats it. It works great, I can't wait to experiment more. The computer has its hands full now (But it still almost out cheats me)

Loads of thanks for all the pointers to Gaidan Cain and Arstahd for getting me going. I've been a software developer for many years, but until you have the info you can't do jack. Thats why I have provided such detail here. I hope someone finds it useful.


'Imagination is more important than intelligence' - Albert Einstien.

User avatar
Arstahd
Leprechaun
Leprechaun
Posts: 48
Joined: 20 May 2006

Unread postby Arstahd » 22 Jun 2006, 04:14

Drax wrote:6 Using winrar, take the whole gamemechanics directory node and 'add to archive' selecting .zip extention instead of .rar and name the file something descriptive. I called mine GameMechanicsSuperNecro.zip. After it is created rename its extension from .zip to .pak
This is a bit inefficient, there is no need to repack the entire GameMechanics directory when you are only modding 1 or 2 files.

What I do is create an empty folder structure of the node that I will be modding and place it in the DATA folder. I then copy the few files that I will be modding into this. As long as it's in the DATA folder there is no need to pack the mod yet, the game will read the unpacked files. Only when I'm done testing and tweaking the mod do I pack it. By only working with the edited files, file size is kept to a minimum and things easier to keep track of.

User avatar
Gaidal Cain
Round Table Hero
Round Table Hero
Posts: 6972
Joined: 26 Nov 2005
Location: Solna

Unread postby Gaidal Cain » 22 Jun 2006, 10:13

Me, I just go through the data.pak file with winrar and extract the files I want to modify. Winrar preserves folder structure when extracting files.
You don't want to make enemies in Nuclear Engineering. -- T. Pratchett


Return to “Modcrafting Guild”

Who is online

Users browsing this forum: No registered users and 3 guests