Page 1 of 1

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

Posted: May 9th, 2020, 2:19 am
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

Re: Making new programs

Posted: May 9th, 2020, 1:20 pm
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.

Re: Making new programs

Posted: May 9th, 2020, 3:34 pm
by Emiliano
Thanks David

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

Posted: May 9th, 2020, 9:55 pm
by David
I've added "How to add a new guard color?" to the topic title.