4D prince guards
4D prince guards
Some guards in Prince of Persia 4D look really weird, this is not due to graphical modifications as it changes with the levels.dat.
I was simply wondering how he had done this, below is a picture of how it looks in apoplexy.
http://i.imgur.com/11opLiN.png
I was simply wondering how he had done this, below is a picture of how it looks in apoplexy.
http://i.imgur.com/11opLiN.png
Re: 4D prince guards
That particular guard's color is 254 (0xFE), which is outside the (0-6) range the game is build to work with.
As you can read on page 16 of this document:
"Other codes may generate random colours because the game is reading the palette from trashed memory. This may also cause a game crash."
This is why the guard looks strange in-game:
(mirror)
What you see in the image you posted is how apoplexy displays guards with colors outside the regular 0-6 range.
As you can read on page 16 of this document:
"Other codes may generate random colours because the game is reading the palette from trashed memory. This may also cause a game crash."
This is why the guard looks strange in-game:
(mirror)
What you see in the image you posted is how apoplexy displays guards with colors outside the regular 0-6 range.
Re: 4D prince guards
Thanks for your answer, would it be possible to edit the guard color outside the range of 0-6 in apoplexy? Or would I have to modify my prince.exe for that?
Re: 4D prince guards
You've got to excuse me for my ignorance, but I have got yet another question for you. In the apoplexy editor itselfl, some tiles are marked with a red exclaimation mark. I've seen one of these being used in the Repetition of time mod, however upon trying those myself all it did was creating graphical errors (distorting the level). Are there any use for these tiles at all?
Re: 4D prince guards
Currently, apoplexy only allows users to place regular guards of the seven (0-6) color combinations the game itself is build to work with.emrtss wrote:Thanks for your answer, would it be possible to edit the guard color outside the range of 0-6 in apoplexy? Or would I have to modify my prince.exe for that?
If you want the game to generate colors based on trashed memory (like 4D Prince of Persia), then you would have to modify LEVELS.DAT with a hex editor to set a color greater than 6. However, if the document I cited above is correct, then the change could result in a game crash.
Another, better solution would be to modify the regular seven color combinations by editing PRINCE.EXE. As far as I know, CusPop has no options to do this (yet).
Re: 4D prince guards
The short answer is: no. They are there only to make the tile locations on the 'tiles screen' the same for the dungeon and palace environments. For example, on the tiles screen for dungeon levels, the first tile with an exclamation mark is where the mirror is on the tiles screen for palace levels. This makes it easier for mod authors to remember the tile locations. The longer answer is: some of them actually show stuff without distortion, but the visuals depend on the where the tiles are being used. Also, distortions could make levels quite tricky. Finally, I wouldn't be surprised if it's possible to somehow add, for example, the mirror resource to dungeon levels.emrtss wrote:Are there any use for these tiles at all?
Re: 4D prince guards
The color of the weird guards changes if I start the game with the stdsnd parameter (pcspeaker mode).Norbert wrote:because the game is reading the palette from trashed memory
Maybe that memory is related to sounds?
They are stored in PRINCE.DAT, PR exports it as "guard palettes.pal".Norbert wrote:Another, better solution would be to modify the regular seven color combinations by editing PRINCE.EXE.
Actually, the regular guards use 1-7, and the "special" ones (fat, Jaffar) use 0 (but the color is ignored for them).Norbert wrote:That particular guard's color is 254 (0xFE), which is outside the (0-6) range the game is build to work with.
And that weird guard has color 0xFF. (level 2 room 23)
But I see that Apoplexy subtracts 1 from the color, so that explains the differences.
Do you mean level 12, room 15?emrtss wrote:some tiles are marked with a red exclaimation mark. I've seen one of these being used in the Repetition of time mod
That level is changed to palace in the mod's PRINCE.EXE.
It's possible:Norbert wrote:Finally, I wouldn't be surprised if it's possible to somehow add, for example, the mirror resource to dungeon levels.
* In resources.xml, copy the mirror section from the vpalace section to the vdungeon section.
* Export both DAT files.
* Copy the mirror folder from vpalace to vdungeon.
* Reimport vdungeon.
* Place a mirror on a dungeon level. (In Apoplexy, it's on the left side of the broken floor.)
This is the result: If you want to change those images, you should fix the palettes of the BMP files.
(They still have the vpalace palette, but the game will use the vdungeon palette.)
The easiest way to do this is to re-export vdungeon.
Re: 4D prince guards
Ah, yes. What a weird location (prince/binary/) for that PAL file.David wrote:They are stored in PRINCE.DAT, PR exports it as "guard palettes.pal".Norbert wrote:Another, better solution would be to modify the regular seven color combinations by editing PRINCE.EXE.
I was looking at the PAL files in guards/ (that contain just 0's) and unjustly concluded the colors had to be set in PRINCE.EXE.
Yep, that's the location emrtss meant. (See the chat history, 2014-11-08 23:11:58 and further.) emrtss had copied over just the LEVELS.DAT file, and not also the PRINCE.EXE file. If the latter is also added to prince/, then apoplexy (2.6b and newer) will automatically show the correct environment.David wrote:Do you mean level 12, room 15?emrtss wrote:some tiles are marked with a red exclaimation mark. I've seen one of these being used in the Repetition of time mod
That level is changed to palace in the mod's PRINCE.EXE.
Re: 4D prince guards
But, why In dosbox you see them like this, but in the old computers they look completely green?Norbert wrote: ↑November 8th, 2014, 11:46 pm That particular guard's color is 254 (0xFE), which is outside the (0-6) range the game is build to work with.
As you can read on page 16 of this document:
"Other codes may generate random colours because the game is reading the palette from trashed memory. This may also cause a game crash."
This is why the guard looks strange in-game:
(mirror)
What you see in the image you posted is how apoplexy displays guards with colors outside the regular 0-6 range.
I played it in my dad's computer and it looks green
65536
Re: 4D prince guards
No idea.Emiliano Fierro wrote: ↑November 7th, 2019, 12:43 amBut, why [...] in the old computers they look completely green?
Maybe your dad has a monochrome screen, and other games also look green?
Re: 4D prince guards
I don't know maybe only that game
The thing is that his computer has included MS-DOS by default
The thing is that his computer has included MS-DOS by default
65536
Re: 4D prince guards
Weird.
Re: 4D prince guards
It depends on the sound mode.Emiliano Fierro wrote: ↑November 7th, 2019, 12:43 am But, why In dosbox you see them like this, but in the old computers they look completely green?
I played it in my dad's computer and it looks green
(I've mentioned this here and here, but I didn't post specifics. I'll fix that now.)
Here is what each looks like.
You can use the command line parameter in parentheses to activate that sound mode.
Sound Blaster (sblast): PC Speaker (stdsnd): AdLib (adlib):
Does PoP play sounds using the PC Speaker there?