Some insight from poking in data.pak
Some insight from poking in data.pak
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.
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.
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 thatSnap 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.
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!
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
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
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.
In other words, don't despair at getting a map editor. It looks -very- possible.
- Psychobabble
- Spectre
- Posts: 706
- Joined: 06 Jan 2006
- Location: Melbourne, Australia
- Contact:
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.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.
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?
- grumpy_dwarf
- Leprechaun
- Posts: 48
- Joined: 06 Jan 2006
- theGryphon
- Spectre
- Posts: 716
- Joined: 06 Jan 2006
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.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?
I believe in science and that science can explain everything.
Because God has made it all work in such a beautiful way...
Because God has made it all work in such a beautiful way...
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests