4D prince guards

Windows and Linux editor of PoP1 (for DOS and SNES) and PoP2 (for DOS).
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: 4D prince guards

Post by Emiliano »

Yes it does, the sound is pure
65536
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: 4D prince guards

Post by Emiliano »

I've made a tutorial about how to set these guards with a Hex editor

Look that FE and FF display different colors
This is possible thanks to David viewtopic.php?p=28784#p28784
I jus thought that searching their color byte and copying it to any guard should work
You may need this guide:
*Note: this Hex Rooms only work with plv files
Attachments
Hex Rooms.txt
(229 Bytes) Downloaded 105 times
65536
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5745
Joined: April 9th, 2009, 10:58 pm

Re: 4D prince guards

Post by Norbert »

David wrote: November 9th, 2014, 1:19 pmActually, the regular guards use 1-7, and the "special" ones (fat, Jaffar) use 0 (but the color is ignored for them).
[...]
But I see that Apoplexy subtracts 1 from the color, so that explains the differences.
No, apoplexy also uses - 'has' to use - 1-7.
See, for example, the C file of version 3.8, starting line 22069.
I incorrectly wrote "0-6" because I was thinking of the tiles screen where the guard skills start with "0".
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: 4D prince guards

Post by Emiliano »

There is another interesting case, in the room 14 of level 4 a guard changes its color, the color in the offset is 00
Watch the video to see what I'm talking about and analize the images

You can also find guard with this property in the mod Root Planet
Attachments
hexit_003.png
hexit_003.png (10.25 KiB) Viewed 7477 times
Swirly color guard.png
65536
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: 4D prince guards

Post by David »

Emiliano Fierro wrote: June 15th, 2020, 6:25 pm There is another interesting case, in the room 14 of level 4 a guard changes its color, the color in the offset is 00
Watch the video to see what I'm talking about and analize the images
Yes, guards with color zero will reuse the color of the last guard you've seen with non-zero color.

See these posts:
* viewtopic.php?p=25716#p25716
* viewtopic.php?p=19907#p19907
* viewtopic.php?p=15040#p15040
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: 4D prince guards

Post by dmitrys »

It is also possible to set level palettes to recycled memory. In SDLPoP there is a level_color setting that is used by PoP 1.3-1.4 that modifies colors for dungeon levels but it also works for palace levels including the princess level original game. If you set the value above the supported value (something like 3 or 4), it will use recycled memory to paint the level. Each number will generate a unique palette. Some of them are borderline unusable (too many dark colors) but some will look pretty cool. And just like with guards, command line arguments can affect those colors.

One of the random values generated a cool palace level color set that I used in my room. I converted it to an actual stable palette (programatically) and fixed about 20-25% of the colors that were off.
Capture.JPG

Here what I got when I set level_color to 15 (a first random attempt) for level 5 in SDLPoP.ini in an unmodified SDLPoP.
Capture2.JPG
AJprince
Efendi
Efendi
Posts: 11
Joined: December 20th, 2021, 9:10 pm

Re: 4D prince guards

Post by AJprince »

Does anyone know how to make a palace carpets tile work in a dungeon?
I tried the same steps as the mirror but couldn't get it to work:

David - "It's possible:
* 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.)"
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: 4D prince guards

Post by dmitry_s »

You would have to update all tiles that have a floor such as pillars, gates, chompers....
David
The Prince of Persia
The Prince of Persia
Posts: 2848
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: 4D prince guards

Post by David »

AJprince wrote: March 28th, 2022, 11:21 pm Does anyone know how to make a palace carpets tile work in a dungeon?
I tried the same steps as the mirror but couldn't get it to work:
PoP checks the type of the current level and skips drawing the carpets on dungeon levels.

To remove these checks, you need to edit PRINCE.EXE:

Code: Select all

seg008:0575 8B 1E 9E 0F                          mov     bx, current_level
seg008:0579 80 BF B2 02 00                       cmp     tbl_level_type[bx], 0
seg008:057E 74 4D                                jz      loc_A1ED
Search: 8B 1E 9E 0F 80 BF B2 02 00 74 4D
Change: 74 4D to 90 90
Offset in unpacked 1.0: 0xBA4E

Code: Select all

seg008:0795                      tile_doortop:
seg008:0795 8B 1E 9E 0F                          mov     bx, current_level
seg008:0799 80 BF B2 02 00                       cmp     tbl_level_type[bx], 0
seg008:079E 75 03                                jnz     loc_A3C3
seg008:07A0 E9 F8 00                             jmp     end
Search: 8B 1E 9E 0F 80 BF B2 02 00 75 03 E9 F8 00
Change: 75 to EB
Offset in unpacked 1.0: 0xBC6E


The SDLPoP equivalent of the above hacks is this:
In draw_tile_topright() and draw_tile_right() disable these lines:

Code: Select all

if (custom->tbl_level_type[current_level] == 0) return;
AJprince
Efendi
Efendi
Posts: 11
Joined: December 20th, 2021, 9:10 pm

Re: 4D prince guards

Post by AJprince »

dmitry_s wrote: April 2nd, 2022, 5:50 am You would have to update all tiles that have a floor such as pillars, gates, chompers....
Oh, I was thinking of what the game calls "carpets."
original.png
original.png (644 Bytes) Viewed 6463 times
style02.png
style02.png (644 Bytes) Viewed 6463 times
Although it would be nice to have carpets scattered about on the floors too. Neat idea.
AJprince
Efendi
Efendi
Posts: 11
Joined: December 20th, 2021, 9:10 pm

Re: 4D prince guards

Post by AJprince »

Thank-you so much David, I will check that out. :o
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: 4D prince guards

Post by Emiliano »

Hello again, I have been doing this since my “Root Planet” mod, I liked the random color guards and put them regularily, I notice it depends entirely on the palatte used in prince.dat, well, this are gotten using the original palette and sound blaster
I think the best colors are E2, EE, F0, F4, F6, F7 and F9, I decided not to include FF because we have already seen them; I took 21 pictures, I placed the 256 bytes possible and some of them are really ugly, the dat file contains the palettes, simply replace it on the original prince.dat and remember to use the original guard.dat
Attachments
prince.dat
(3.63 KiB) Downloaded 80 times
Random color guards.zip
(51.68 KiB) Downloaded 74 times
65536
Post Reply