Making new programs (How to add a new guard color?)

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.
Post Reply
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Making new programs (How to add a new guard color?)

Post by Emiliano »

Hi everyone
Is there any way to add an eighth regular guard palette?
And how would I set guards that use it?
I also made another question:
viewtopic.php?f=67&t=4511&p=28699#p28699
You may think that I'm not able to make programs, but let me try, or easier, make those programs for me and Suave Prince
I already know they are set with hex editors, so I will pass my coordinates every time
65536
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Making new programs

Post by David »

Emiliano Fierro wrote: May 9th, 2020, 2:19 am Is there any way to add an eighth regular guard palette?
1. Export PRINCE.DAT with PR.
2. In binary\guard palettes.pal, add the 16 new colors to the end.
a) If you're using Palette Suite (recommended): Use Edit -> Resize, enter 128 and press OK. Then fill the last row with the colors you want to use.
b) If you're using a text editor: Add the 16 lines of RGB values to the end, and increase the number of colors in line 3 to 128.
Note: 128 comes from 8×16, i.e. 8 guard palettes with 16 colors each.
3. Import PRINCE.DAT with PR.
Emiliano Fierro wrote: May 9th, 2020, 2:19 am And how would I set guards that use it?
1. Open Apoplexy and select PoP1. (This will export LEVELS.DAT into the levels\ folder.)
2. Put a guard (any color) where you want to have a guard with the new colors.
3. Save the level.
4. In the levels\ folder, find the PLV file corresponding to the level of the new guard, and open it in a hex editor.
5. Go to the offset where the guard's color is stored: 0x8EA = room 1, 0x8EB = room 2, ..., 0x901 = room 24.
6. Set the byte to 08. This tells the game to use palette #8 for this guard.
7. Save the file and close the hex editor.
8. In Apoplexy, go to a different level then come back (this reloads the level from the PLV) and find the room with the guard.
The guard should appear with swirly colors, like here: viewtopic.php?p=19907#p19907
9. Do some dummy change in the level, like put a floor where there is already one. This forces Apoplexy to mark the level as changed.
10. Save the level. This will import the PLV file back to LEVELS.DAT.
11. Start the game (press D) and find the guard. He should have the new colors.
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Making new programs

Post by Emiliano »

Thanks David
65536
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Making new programs (How to add a new guard color?)

Post by David »

I've added "How to add a new guard color?" to the topic title.
Post Reply