Some insight from poking in data.pak

The new Heroes games produced by Ubisoft. Please specify which game you are referring to in your post.
Extrakun
Peasant
Peasant
Posts: 57
Joined: 25 May 2006

Some insight from poking in data.pak

Unread postby Extrakun » 01 Jun 2006, 03:47

Hi all,

I have been poking through the various mapscripts.lua and realise that getting an easy mode may not be as easy as it seems. First, it seems that for each mission, the developers had hard-coded the normal difficulty. What it means is that to add an easy mode, the developers may have to manually add in 30 different starting conditions. I'm don't think there's an overall 'cheating routine' for the AI (at least from my observation).

Second, well, what's more distressing is that the custom games, has their own mapscript and other axuillary files, and they are also in the data.pak. Notice that you can't find any of the custom game mapfiles in the folders. They are hard-coded within the data.pak.

So what does this means? Maybe the developers never intended to release the map editor for the public. Or maybe this is why the map editor is delayed. It was intended as an internal tool, and they lacked the time to expose its functionality out -- quite evident that they even hard-coded the custom games into the data.pak

Now, how many users will dream of messing with their data files? Hardcore gamers and modders would, but the typical game player can't be bothered. Right now, even if they do release a map editor, the process of adding it into the data.pak is daunting.

This means that for a map editor to be released, they have to patch the game such that it does not read the list of custom games from data.pak. (Or provide an utilty that can easily add/remove files to data.pak). Second, from my sniffing into the various mapscript, it seems stuff like heroes setup, starting resources and etc. are all coded via. LUA. Notice why you can't choose your hero or starting town from the custom games? Perhaps gone are the days of Heroes III and Heroes IV where you get a user-friendly interface to tweak numbers and stuff.

And perhaps this is why they are delaying the map editor. And hopefully it will all turn out to be all right. And by exposing the game internals through LUA, it allows apsiring mod-makers (like many here) to seek solutions to the problems of the game.

User avatar
Raspyn
Leprechaun
Leprechaun
Posts: 43
Joined: 17 May 2006
Location: Canada

Unread postby Raspyn » 01 Jun 2006, 03:56

Hm, interesting and sad discoveries :(

I have faith that map-modding will be easily accessible in a patch or two, though.

Snap
Leprechaun
Leprechaun
Posts: 12
Joined: 26 May 2006

Unread postby Snap » 01 Jun 2006, 04:10

data.pak is not "hardcoded" - it's simply a way to store data files in a compressed archive, so that they take up less space on your hard drive. You can actually unpack all files into a directory structure and delete data.pak - the game will use the unpacked files. The way it typically works is that you can add or replace game data files by placing them in the appropriate directories. E.g. if you make a custom map, you'll place its files into data\Maps\SingleMissions.

Extrakun
Peasant
Peasant
Posts: 57
Joined: 25 May 2006

Unread postby Extrakun » 01 Jun 2006, 04:23

Snap wrote:data.pak is not "hardcoded" - it's simply a way to store data files in a compressed archive, so that they take up less space on your hard drive. You can actually unpack all files into a directory structure and delete data.pak - the game will use the unpacked files. The way it typically works is that you can add or replace game data files by placing them in the appropriate directories. E.g. if you make a custom map, you'll place its files into data\Maps\SingleMissions.
I using 'hard-coded' in a loose manner here. Maybe "not-user-friendly" is better. While for modders, it is a simple thing to just unzip those files, most people won't feel comfortable. Compounding the problem is that

1) The data.pak files are really big
2) From what others have told me, you can't patch the game if you delete the original .pak file
3) Typical users are leery of messing with data files.

At any rate, I'm sorry for using the term 'hard-coded' from the usual defintion. What I meant is that from a typical user point of view, it seems to be hard-coded. And more specifically, the game itself seems hard-coded to look into data.pak for custom mapfiles.

IMHO, a process which requires user to twinkle or mess about with game configuration file is unacceptable. Here's hoping that the patch for the map-editor will come soon!

Vision
Conscript
Conscript
Posts: 206
Joined: 06 Jan 2006

Unread postby Vision » 01 Jun 2006, 05:24

For maps, especially easy will be the ability to just drop MapName.pak into the data folder

The game reads all PAK files on start, so players looking for maps will only need to download the map, drop it in the data folder, and bam.

There is NO need to unzip the pak files that are there to begin with (data, sounds and texts)

Others do not know for sure if the game will require the PAK or will alternately look for the files first.

There would be no need to mess with any files for players to create ANYTHING they want. This is because if you drop, for example, the tooltip sound removal mod into the data folder, the game first checks the data.pak, gets everything into memory, then looks at all the other paks, overwrites (in memory) anything that has been overruled, and launches. This puts the new tooltip sound in place of the old. No data.pak editing what-so-ever

User avatar
Inoko
Leprechaun
Leprechaun
Posts: 9
Joined: 30 May 2006
Location: New Zealand

Unread postby Inoko » 01 Jun 2006, 05:25

Yeah. It's very mod friendly, actually. Which makes me quite happy.

User avatar
asandir
Round Table Hero
Round Table Hero
Posts: 15481
Joined: 06 Jan 2006
Location: The campfire .... mostly

Unread postby asandir » 01 Jun 2006, 07:08

I was pretty stunned to see that pretty much everything was lua xml ... brilliant for modding and editting .... hurray to nival, cause now the community can get in and fix some of the broken stuff (and annoying stuff - mouseover sound anyone) quickly and easily

Extrakun
Peasant
Peasant
Posts: 57
Joined: 25 May 2006

Unread postby Extrakun » 01 Jun 2006, 09:11

Vision wrote:For maps, especially easy will be the ability to just drop MapName.pak into the data folder
Hmm, yes, that's a good thought. They can just put the map folder inside the data folder, and the game shall be able to find it.

User avatar
Inoko
Leprechaun
Leprechaun
Posts: 9
Joined: 30 May 2006
Location: New Zealand

Unread postby Inoko » 02 Jun 2006, 02:06

From poking around in the data.pak some more, I just noticed that a map editor would not actually be that hard, to tell you the truth. It would merely require them programming something that when you placed down "Alchemist's Lab" at x, y, it would translate that in to the XML used for it. From seeing how it's laid out (I don't really want to post the code here, in case that's against some terms or other. :) ), it's really just a series of very simple, very easy variables that would be set.

In other words, don't despair at getting a map editor. It looks -very- possible.

User avatar
Psychobabble
Spectre
Spectre
Posts: 706
Joined: 06 Jan 2006
Location: Melbourne, Australia
Contact:

Unread postby Psychobabble » 02 Jun 2006, 02:27

Snap wrote:data.pak is not "hardcoded" - it's simply a way to store data files in a compressed archive, so that they take up less space on your hard drive. You can actually unpack all files into a directory structure and delete data.pak - the game will use the unpacked files. The way it typically works is that you can add or replace game data files by placing them in the appropriate directories. E.g. if you make a custom map, you'll place its files into data\Maps\SingleMissions.
That's exactly what Quake's done all along. You don't need to modify or unpack data.pak, you just add it to the appropriate folder and the game reads it as if it were part of the .pak.

User avatar
asandir
Round Table Hero
Round Table Hero
Posts: 15481
Joined: 06 Jan 2006
Location: The campfire .... mostly

Unread postby asandir » 02 Jun 2006, 02:32

not too sure of that PB, i editted the devil and archdevil stats and left the .xdb files in the data folder, but the stats where the same a vanilla devil and arch devil, i had to save these to the data.pak to get the stats to change, however for a map edit i was able to just place it into the data folder and it worked .... any ideas why this could be?

User avatar
grumpy_dwarf
Leprechaun
Leprechaun
Posts: 48
Joined: 06 Jan 2006

Unread postby grumpy_dwarf » 02 Jun 2006, 03:18

just how are you guys/gals opening the data paks?

User avatar
asandir
Round Table Hero
Round Table Hero
Posts: 15481
Joined: 06 Jan 2006
Location: The campfire .... mostly

Unread postby asandir » 02 Jun 2006, 03:24

i use winace, you can use winrar, or even winzip

just dbl click the data.pak and select your archiver of choice, then edit away, but be sure to save the file to the data folder

Extrakun
Peasant
Peasant
Posts: 57
Joined: 25 May 2006

Unread postby Extrakun » 02 Jun 2006, 03:37

I recommend WinRAR over WinZip, as WinRAR allows you to see the directory structure.

User avatar
asandir
Round Table Hero
Round Table Hero
Posts: 15481
Joined: 06 Jan 2006
Location: The campfire .... mostly

Unread postby asandir » 02 Jun 2006, 04:17

winzip should be your last choice .... that's why i listed it last :-D ;)

User avatar
theGryphon
Spectre
Spectre
Posts: 716
Joined: 06 Jan 2006

Unread postby theGryphon » 02 Jun 2006, 04:34

stefan.urlus wrote:not too sure of that PB, i editted the devil and archdevil stats and left the .xdb files in the data folder, but the stats where the same a vanilla devil and arch devil, i had to save these to the data.pak to get the stats to change, however for a map edit i was able to just place it into the data folder and it worked .... any ideas why this could be?
You don't need to play with the data.pak file. Just save the files you edited into the exact same folder structure as they are found in the data.pak. Then zip them maintaining this folder tree and change the extension to pak. That's it. This is the best thing to do in my experiments. Your data.pak file should stay vanilla. Just copy its content to another folder and do as above to create new pak files. ;)
I believe in science and that science can explain everything.
Because God has made it all work in such a beautiful way...


Return to “Heroes V-VI”

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Semrush [Bot] and 18 guests