Prince of Persia Horizon

User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Prince of Persia Horizon

Post by Norbert »

Also related is this thread.
Forum user emrtss noticed a guard with color 254 (0xFE) there.
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

David wrote:I see you posted between the time I saw your first post and the time I clicked "post answer".
So some parts of my posts will appear redundant, but it also has new information!.... will reuse his color.
Thank you for the information David! Please try my levels too and post videos if possible :)
What if life is a video game and Déjà Vu are just checkpoints?
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

Hello Everyone,

I have a hex editor but it is too complicated for me to use it. Does anyone know how to change guard skills manually?

Thank You
What if life is a video game and Déjà Vu are just checkpoints?
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince of Persia Horizon

Post by David »

princeomkar wrote:Does anyone know how to change guard skills manually?
So, what do you want exactly?

a) Assign a skill to a guard?
You can do that in Apoplexy. It's called "guard level" there.

b) Change the properties of a skill?
The various probabilities, as described in this document ?
I would direct you to CusPop, but it can't edit this yet...
Even Apoplexy can edit these only in PoP1 SNES, as mentioned here: viewtopic.php?p=19340#p19340
So you need a hex editor in this case.
princeomkar wrote:I have a hex editor but it is too complicated for me to use it.
We have a hex-editing tutorial here: viewtopic.php?p=14068#p14068
In this case, instead of "Find", you need to use "Go to Offset". In that window select "From beginning" and "Hex", and paste the offset from the list below.

The offsets are:
For unpacked 1.0/1.3/1.4:
0x1D3C2 / 0x1D2B4 / 0x19C5E -- Striking Prob.
0x1D3DA / 0x1D2CC / 0x19C76 -- Re-striking After Block Prob.
0x1D3F2 / 0x1D2E4 / 0x19C8E -- Blocking Strike Prob.
0x1D40A / 0x1D2FC / 0x19CA6 -- Improper Blocking Prob.
0x1D422 / 0x1D314 / 0x19CBE -- Going Into Hit Range Prob.
0x1D43A / 0x1D32C / 0x19CD6 -- Refractory Period After Pain
0x1D452 / 0x1D344 / 0x19CEE -- Extra Health (this one *is* in CusPop!)

After you jumped to the offset, go forward *twice* as many bytes as the number of the skill (0..11) that you want to change.
Then you can use the Data Interpreter panel to change the number. (You can open it from the View menu if it's not visible.)
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

hex.png
It shows this dialogue box. So I enter the offset (0x1D3F2 / 0x1D2E4 / 0x19C8E -- Blocking Strike Prob.) as mentioned by you.
Then this page opens up.
hex2.png
It says 'Showing Page:0' . So when you say go forward twice the skill, I should go to 16th page right? (assuming I want to change skill 8). Or is there any other button saying forward?
What if life is a video game and Déjà Vu are just checkpoints?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Prince of Persia Horizon

Post by Norbert »

This is what David wrote, but I'm using a monospace font and I'm omitting the "0x" hexadecimal prefixes:

Code: Select all

For unpacked 1.0   / 1.3   / 1.4:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
             1D3C2 / 1D2B4 / 19C5E -- Striking Prob.
             1D3DA / 1D2CC / 19C76 -- Re-striking After Block Prob.
             1D3F2 / 1D2E4 / 19C8E -- Blocking Strike Prob.
             1D40A / 1D2FC / 19CA6 -- Improper Blocking Prob.
             1D422 / 1D314 / 19CBE -- Going Into Hit Range Prob.
             1D43A / 1D32C / 19CD6 -- Refractory Period After Pain
             1D452 / 1D344 / 19CEE -- Extra Health (this one *is* in CusPop!)
Most likely you're using PoP1 version 1.0, which means you go to offset 1D3F2 to change blocking.
When you arrive there, the first two bytes (00 00) are the blocking skill of guard level/skill 0.
The next two bytes (96 00) are of guard level/skill 1.
And so on.

The 96 00 bytes mean that the blocking strike probability of guards with skill/level 1 is 150, because 96 hexadecimal ('computer counting'; 0-15) is 150 decimal ('human counting'; 1-10). That is 150 out of 255. If you would change 96 to FF, their blocking ability becomes 255 out of 255.

Anyway, I will probably extend CusPop one day to allow users to more easily modify guard settings.
There are just a bunch of other coding projects I want to finish first.
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

Norbert wrote:This is what David wrote, but I'm using a monospace font and....guard settings.
As per your instructions, I entered the offset but it highlighted block containing '64'. I could not see '00 00' or '96 00'.
hex3.png
Can you please tell me?
Another thing was using CusPOP web based version, I changed the enemy resources of level 14 from none to Jaffar.(including the blinking time, time stops, etc) Jaffar as expected appears in Apoplexy while editing. When I try to test the level, as soon as Prince enters room having Jaffar, it dies automatically (like enemies get killed when 'K' is pressed in cheat mode) and the blinking follows his death. How to solve the problem?

P.S. : Sorry for asking too many questions... :oops:
What if life is a video game and Déjà Vu are just checkpoints?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Prince of Persia Horizon

Post by Norbert »

princeomkar wrote:I entered the offset
Then maybe try the 1D2E4 (v1.3) and 19C8E (1.4) offsets.
Make sure, when you use "Go to Offset", that the radio button is on "Hex".

You can check which version your EXE file is by looking up its file size below.
123335: packed 1.0
129504: unpacked 1.0
125115: packed 1.3
129472: unpacked 1.3
110855: packed 1.4
115008: unpacked 1.4
princeomkar wrote:as soon as Prince enters room having Jaffar, it dies automatically
That's because the default guard hit points for the princess level is 0.
For CusPop, search for the "Set up guard base hit points" section.
For apoplexy, press F2 and then look at the numbers on the right.
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

Its Version packed 1.0. But neither of your Offsets are showing the required results.

When I enter Offset 19C8E
hex4.png
When I enter Offset 1D2E4
hex5.png
I will raise base guard hit points.
What if life is a video game and Déjà Vu are just checkpoints?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Prince of Persia Horizon

Post by Norbert »

princeomkar wrote:packed
Most likely, this is the problem.

Unpack the executable first:
http://www.popot.org/other_useful_tools ... ack_unpack

Also, when you use CusPop, pick unpacked.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince of Persia Horizon

Post by David »

Offsets for unpacked versions: viewtopic.php?p=19945#p19945

And I found the offsets for the packed versions:

Code: Select all

For packed 1.0   / 1.3   / 1.4:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
           1B80E / 1C62B / 189FD -- Striking Prob.
           1B826 / 1C643 / 18A15 -- Re-striking After Block Prob.
           1B83E / 1C65B / 18A2D -- Blocking Strike Prob.
           1B856 / 1C673 / 18A45 -- Improper Blocking Prob.
           1B86E / 1C68B / 18A5D -- Going Into Hit Range Prob.
           1B886 / 1C6A3 / 18A75 -- Refractory Period After Pain (The last few items of this table are packed!)
                                 -- (Extra Health is fully packed...)
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

Hello Friends!

Levels 12(b) and princess level. Kindly give feedback so that I can improve in my next mod. Please post videos as the levels are difficult to a certain extent! ;) :)
prince.zip
(80.94 KiB) Downloaded 94 times
I still couldn't find the offset in packed or unpacked. Maybe I will try that later.
Again, please give feedback! :)
What if life is a video game and Déjà Vu are just checkpoints?
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince of Persia Horizon

Post by David »

princeomkar wrote:I still couldn't find the offset in packed or unpacked. Maybe I will try that later.
Since you're using the packed 1.0 version of PRINCE.EXE, the offset for striking prob. is 1B80E.

This is what you should see after you enter the offset: (Scroll down for the picture.)
(The red stuff was added by me.)
You may have to right-click the numbers in the Offset column so it switches to hex mode.
Note that the first number in the Offset column says "1B80Eh".

For guard skills, it's a good idea to resize the window so that there two bytes in each row, as you see here.
Then you need to edit the numbers in the column titled "00".

These numbers are in hexadecimal, so you need to convert the numbers you want to write here, from decimal to hexadecimal.
It seems that you can't edit the numbers in the DataInterpreter panel, so you have to convert numbers to hex elsewhere.
For example, with the Windows calculator.

But you can use the DataInterpreter panel, after you edited the numbers, to see if you converted the number correctly.
guard_skill_edit_pic_with_texts.png
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Re: Prince of Persia Horizon

Post by Akruzen »

Hello Everyone!

Is my mod too difficult? (or too easy for instance ;) ) Come on SuavePrince, yaqxsw Armfly,,,, where are you??

I found one trick...was it know before?? Please tell :D

What if life is a video game and Déjà Vu are just checkpoints?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: Prince of Persia Horizon

Post by Norbert »

princeomkar wrote:Come on SuavePrince, yaqxsw Armfly,,,, where are you??
I'm currently working on popot.org, but after I'm done with that I'm going back to playing mods.
I will then look into your (and other people's) mod(s). :)
Post Reply