Guard Settings

A modern Prince of Persia 1 for SNES level editor for Windows.
Post Reply
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Guard Settings

Post by Norbert »

[Edit: I've edited this post several times.]

After some hours of tinkering, I'm left with this question: does the skill setting even do anything?

David, in the SNES table here you could add "Demo" as the header for the last column.

This is the outdated stuff I wrote first:
-----
I think the Guards->Settings... dialog box should be split into two dialog boxes. Maybe I'm wrong, but I think you made a mistake here when you gave Bfa ("blueface") his own column. In reality Bfa shares skill 1 with Ske ("skel"). I'm guessing this is because things like a "strike probability" are not attached to guard types but to guard skills. In other words, when I change a green guard to skill 10, the guard settings dialog box should present me with the "strike probability" settings of the red guard; or, to be more precise, with the guard settings related to skill 10.
-----
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Guard Settings

Post by Norbert »

"Users browsing this forum: David [...]"

I wonder if you just missed my edit. :)
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Guard Settings

Post by David »

Norbert wrote:Okay... after some testing I'm starting to think that maybe the skill setting indeed doesn't do anything at all.
That's correct, skill is determined by the guard type in the SNES version.
I removed the guard skill menu item from my copy of the editor, right now.
Norbert wrote:I wonder if you just missed my edit. :)
No, I didn't, because you also made a new post. :)
Norbert wrote:does the skill setting even do anything?
I think it does not do anything.

According to the disassembly, the level is loaded into RAM as follows:

Code: Select all

7f:F114 LABEL   level guard position
7f:F12C LABEL   level guard direction + type
7f:F144 LABEL   level guard ??? <-- marked as skill in the editor
7f:F15C LABEL   level guard xpos?
7f:f174 LABEL   guard seq low
7f:f18c LABEL   guard seq high
The "skill" is used only once:

Code: Select all

01:9380: ad 19 05    LDA $0519 ; guardprog
01:9383: 9f 44 f1 7f STA $7f:f144,X ; level guard ???
And this is a write (STore), so it does not affect anything.
"guardprog" is the name for guard skill from the Apple II source.
So the "???" is a write-only storage for guard skills? :)

The skill of regular(*) guards is loaded here:
(* i.e. those present in the level data, and not placed by a special event)

Code: Select all

01:87E9: ae 06 05    LDX $0506 ; shown room ; VisScrn
01:87EC: bf 2c f1 7f LDA $7f:f12c,X ; level guard direction + type
01:87F0: 38          SEC
01:87F1: e9 02       SBC #$02
01:87F3: 29 7f       AND #$7f ; clear the direction bit
01:87F5: c9 13       CMP #$13 ; maximal skill + 1
01:87F7: 90 02       BCC $87fb
01:87F9: a9 08       LDA #$08 ; skill used if skill is above maximum
01:87FB: 8d 19 05    STA $0519 ; guardprog
This means: guard skill = level guard type - 2.

For extra confusion: guard type = level guard type - 2.

Code: Select all

01:8830: ae 06 05    LDX $0506 ; shown room ; VisScrn
01:8833: bf 2c f1 7f LDA $7f:f12c,X ; level guard direction + type
01:8837: 38          SEC
01:8838: e9 02       SBC #$02
01:883A: 29 7f       AND #$7f
01:883C: 8d 2b 06    STA $062b ; guard type
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Guard Settings

Post by Norbert »

David wrote:
Norbert wrote:does the skill setting even do anything?
I think it does not do anything.
I eventually came to that conclusion, but it took me a while.
Probably because I'm so used to how the other versions work.
Anyway, thanks for confirming my suspicion.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Guard Settings

Post by salvadorc17 »

If that option is not doing nothing, how to change specific guard settings, for example, how to change it to be invincible.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Guard Settings

Post by Norbert »

salvadorc17 wrote:If that option is not doing nothing, how to change specific guard settings, for example, how to change it to be invincible.
(Note that we were talking about PoP1 for SNES, not DOS.)
In Pr1SnesLevEd, from the top menu, choose: Guards->Settings...
Then modify strike probability, block probability, and so on.
Post Reply