Using gpl2jascpal
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Using gpl2jascpal
First off I'd like to say that I am new to Prince of Persia modding as well as this community.
I have been editing levels in Roomshaker for about a week now and I've decided I'd like to try and customize the visuals by changing palettes. I understand that using the default colormaps is the simplest way to alter the game's visual files; however, I would really like to use my own palettes.
I have followed the guide posted here:
http://www.popot.org/documentation.php? ... PoP1Images
and follow along fine until it gets to the point of converting my custom palette from .gpl to .pal using gpl2jascpal. I have the program downloaded and tried following the instructions exactly as stated, but I'm still not sure exactly what commands to use in command prompt to run my .gpl palette through gpl2jascpal. Any help would be greatly appreciate!
I have been editing levels in Roomshaker for about a week now and I've decided I'd like to try and customize the visuals by changing palettes. I understand that using the default colormaps is the simplest way to alter the game's visual files; however, I would really like to use my own palettes.
I have followed the guide posted here:
http://www.popot.org/documentation.php? ... PoP1Images
and follow along fine until it gets to the point of converting my custom palette from .gpl to .pal using gpl2jascpal. I have the program downloaded and tried following the instructions exactly as stated, but I'm still not sure exactly what commands to use in command prompt to run my .gpl palette through gpl2jascpal. Any help would be greatly appreciate!
Re: Using gpl2jascpal
Hi. If your GPL file is "filename.gpl", then the command is:
You already know how to open a command prompt, so probably the next step is to navigate to a directory .gimp-n.n/palettes/, which is probably somewhere in your home directory.
If you find out which are the exact steps, you could write them in a post.
Then I will add them to the document, for future readers.
(I'm not on Windows myself.)
That document is a bit outdated.
It should also mention SDLPoP and MININIM as alternatives.
And it could mention the Windows batch file (and GNU/Linux shell script) that can be used to simplify exporting/importing with PR.
Code: Select all
C:\...path...\gpl2jascpal filename.gpl
If you find out which are the exact steps, you could write them in a post.
Then I will add them to the document, for future readers.
(I'm not on Windows myself.)
That document is a bit outdated.
It should also mention SDLPoP and MININIM as alternatives.
And it could mention the Windows batch file (and GNU/Linux shell script) that can be used to simplify exporting/importing with PR.
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
Wow! Thanks Norbert, I appreciate your reply and continued support for this community (which I'm seeing more and more of every day). I found SDLPoP since making this post and editing the open source files for the in game images is as simple as it gets, but I would still like to end up with a traditional DOS executable so that I don't have to rely on playing the game through SDLPoP. Is there anyway to use the SDLPoP files I've edited to make a prince.exe that I can run in DOS?
PS. I'm attempting Prince of Wateria and although I previously thought I knew some techniques and tricks, this stuff is pretty far beyond me. I must applaud you for the visual alterations too, the mod looks really good!
edit: I also unpacked your wateria files and noticed that most of the in-game images are organized in folders within the main folders for images in those groups (ex. "kid" folder contains separate folders "clipping", "deaths","hanging" etc. and the files within these are all named appropriately). This seems like a godsend when editing the images in order to better organize but I imagine you have to reference them differently in order for them to load properly in the game? I'm probably in way over my head at this point, but I realized in SDLPoP that changing the image file names causes them not to load when the game is run so obviously something is referencing those names (ex. "res51" is the title image). Any insight on this? Thanks.
PS. I'm attempting Prince of Wateria and although I previously thought I knew some techniques and tricks, this stuff is pretty far beyond me. I must applaud you for the visual alterations too, the mod looks really good!
edit: I also unpacked your wateria files and noticed that most of the in-game images are organized in folders within the main folders for images in those groups (ex. "kid" folder contains separate folders "clipping", "deaths","hanging" etc. and the files within these are all named appropriately). This seems like a godsend when editing the images in order to better organize but I imagine you have to reference them differently in order for them to load properly in the game? I'm probably in way over my head at this point, but I realized in SDLPoP that changing the image file names causes them not to load when the game is run so obviously something is referencing those names (ex. "res51" is the title image). Any insight on this? Thanks.
Re: Using gpl2jascpal
Assuming the files you've edited are images, you could use PR and an image manipulation program with a palette editor to get them into relevant DAT files. But it would just be a painful chore, and in the end using them with a DOS executable only means players need DOSBox and can't use various useful SDLPoP features.PretzelGalaxian wrote:Is there anyway to use the SDLPoP files I've edited to make a prince.exe that I can run in DOS?
As for the resource file names, see this thread I recently created.
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
I realize now that with programs like SDLPoP and Mininim, DOSBox isn't really necessary.
I'm still confused about how you ended up with the resources for Wateria so nicely organized and how you were able to finish with an executable that I was able to run in DOSBox in order to play your game.
I'm still confused about how you ended up with the resources for Wateria so nicely organized and how you were able to finish with an executable that I was able to run in DOSBox in order to play your game.
Re: Using gpl2jascpal
SDLPoP and MININIM are native executables for Windows and GNU/Linux.PretzelGalaxian wrote:I realize now that with programs like SDLPoP and Mininim, DOSBox isn't really necessary.
They are not DOS executables, so no DOS emulation (and thus no DOSBox) is required.
PR extracts DAT files into directories, and vice versa.PretzelGalaxian wrote:I'm still confused about how you ended up with the resources for Wateria so nicely organized and how you were able to finish with an executable that I was able to run in DOSBox in order to play your game.
Its package includes a resources.xml file that includes the file names used for BMP, MID and other resources.
The organization you see when extracting Prince of Wateria DAT files with PR is the organization PR always uses.
If you PR efforts didn't get you that organization, use the batch file.
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
I'm not exactly sure how to use the batch file, but since I'm using SDLPoP now I shouldn't need to extract any resources since it doesn't use DAT files, correct? I guess at this point I'm just curious about your process for Prince of Wateria as well as still being confused about how you ended up with the "1.exe" and "2.exe" files to run that game (which I was able to play through DOSBox).
Re: Using gpl2jascpal
If you also want to edit levels, you'll need to add LEVELS.DAT in SDLPoP's main directory.PretzelGalaxian wrote:I'm not exactly sure how to use the batch file, but since I'm using SDLPoP now I shouldn't need to extract any resources since it doesn't use DAT files, correct?
But, yes, you don't need any other DAT files.
The file 2.EXE is the PRINCE.EXE executable for DOS. It uses the DAT files just like it uses the DAT files for the original game. I've only modified the DAT files. And the DAT files were modified by exporting and importing their resources with PR. The only exception being LEVELS.DAT, that I modified with apoplexy. If you still don't understand certain things, I suggest you reply with a post in which you describe exactly what you think all the files and programs are doing. This will allow me to complement and correct your assumptions.PretzelGalaxian wrote:I guess at this point I'm just curious about your process for Prince of Wateria as well as still being confused about how you ended up with the "1.exe" and "2.exe" files to run that game (which I was able to play through DOSBox).
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
Through the exporting of files of a standard PoP1 folder I've come to assume what a few of the DAT files do. Some of them are obviously storing resources like images and music/sound files and some of them contain BIN files (which I don't understand at all). I guess the prince.exe file runs the game by loading the levels from LEVELS.DAT and referencing the various DAT files to access resources to render. I also see PAL files and recognize that these are palettes used to map colors of the relevant image files but I'm not sure why they belong in the folders/DAT files they do or how the game loads them for the corresponding images (I stopped attempting to understand this part after finding SDLPoP. Editing PNG files with GIMP removes the need for PAL files, I guess?) I'm sure there are a few things that I haven't mentioned because either I really don't understand them or don't even realize they're there.
At this point, I feel like I have most of the understanding necessary to build the mods I want to make, but having a better understanding of how everything fits together and works would be ideal. Also, SDLPoP really works great for allowing someone with my level of computer understanding to modify PoP, but it still feels like I'm missing something? I just want to learn as much as I can to help streamline my modding experience.
Thanks again for all of your help.
At this point, I feel like I have most of the understanding necessary to build the mods I want to make, but having a better understanding of how everything fits together and works would be ideal. Also, SDLPoP really works great for allowing someone with my level of computer understanding to modify PoP, but it still feels like I'm missing something? I just want to learn as much as I can to help streamline my modding experience.
Thanks again for all of your help.
Re: Using gpl2jascpal
That is correct.PretzelGalaxian wrote:Editing PNG files with GIMP removes the need for PAL files, I guess?
I'm going to assume that's a rhetorical question, and suggest you ignore these feelings.PretzelGalaxian wrote:Also, SDLPoP really works great for allowing someone with my level of computer understanding to modify PoP, but it still feels like I'm missing something?
Good luck!
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
I appreciate that and all of your help! Hopefully I'll have something to show for myself in the coming weeksI'm going to assume that's a rhetorical question, and suggest you ignore these feelings.
Good luck!
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
Norbert, I am still interested in potentially using this method for editing palettes for various reasons so I'm attempting this step again. Does my gpl2jascpal.exe have to be in certain directory? I have it downloaded but I'm not sure where to put it and I tried using the command that I've quoted above and it didn't work.Norbert wrote:Hi. If your GPL file is "filename.gpl", then the command is:Code: Select all
C:\...path...\gpl2jascpal filename.gpl
Re: Using gpl2jascpal
Did you replace "...path..." with the actual path to where gpl2jascpal.exe is located on your system?PretzelGalaxian wrote:Norbert, I am still interested in potentially using this method for editing palettes for various reasons so I'm attempting this step again. Does my gpl2jascpal.exe have to be in certain directory? I have it downloaded but I'm not sure where to put it and I tried using the command that I've quoted above and it didn't work.Norbert wrote:Hi. If your GPL file is "filename.gpl", then the command is:Code: Select all
C:\...path...\gpl2jascpal filename.gpl
To make things easier, you can move it to C:\gpl2jascpal.exe and then run "C:\gpl2jascpal.exe filename.gpl" (without quotes) in the directory where filename.gpl is located.
Or, you know, move them both into C:\, then go to C:\ and run "gpl2jascpal filename.gpl".
If it doesn't work, you should get some kind of error message.
You can paste the message in a post.
- PretzelGalaxian
- Efendi
- Posts: 15
- Joined: February 3rd, 2017, 9:52 pm
Re: Using gpl2jascpal
"[FAILED] Could not read pink.gpl: No such file or directory!"Norbert wrote: Or, you know, move them both into C:\, then go to C:\ and run "gpl2jascpal filename.gpl".
If it doesn't work, you should get some kind of error message.
You can paste the message in a post.
This is the error I received. Both gpl2jascpal.exe and pink.gpl (the palette I'm attempting to convert) are in C:\ and I ran the command exactly as you said. Does this mean the palette file is not viable for conversion for whatever reason?
Re: Using gpl2jascpal
Try running the command again, but pass PINK.GPL (all uppercase) to the program.PretzelGalaxian wrote:"[FAILED] Could not read pink.gpl: No such file or directory!"