Fixing the shadow

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

Fixing the shadow

Post by Emiliano »

Is there any way to kill the shadow by the left side without crashing the game?
I know I must import the sources with PR, but is there a code to fix it well?
I hope you can help me, watch the video and you'll know what I'm talking about
65536
4DPlayer

Re: Fixing the shadow

Post by 4DPlayer »

Emiliano Fierro wrote: November 21st, 2019, 12:35 am Is there any way to kill the shadow by the left side without crashing the game?
I know I must import the sources with PR, but is there a code to fix it well?
I hope you can help me, watch the video and you'll know what I'm talking about
In the file "resources.xml" find the <folder index="pop1" name="binary" file="shadow.dat" path="shadow" palette="750"> section.
In a regular resources.xml it will look like:

Code: Select all

<folder index="pop1" name="binary" file="shadow.dat" path="shadow" palette="750" type="image">
  <item value="750" path="res750.pal" type="palette-pop1-4bits"/>
  <item value="751" path="hit points.bmp"/>
  <item value="752" path="splash.bmp"/>
  <item value="753" path="res753.bmp"/>
  <item value="754" path="res754.bmp"/>
  <item value="755" path="res755.bmp"/>
  <item value="756" path="res756.bmp"/>
  <item value="757" path="res757.bmp"/>
  <item value="758" path="res758.bmp"/>
  <item value="759" path="res759.bmp"/>
  <item value="760" path="res760.bmp"/>
  <item value="761" path="res761.bmp"/>
  <item value="762" path="res762.bmp"/>
  <item value="763" path="res763.bmp"/>
  <item value="764" path="res764.bmp"/>
  <item value="765" path="res765.bmp"/>
  <item value="766" path="res766.bmp"/>
  <item value="767" path="res767.bmp"/>
  <item value="768" path="res768.bmp"/>
  <item value="769" path="res769.bmp"/>
  <item value="770" path="res770.bmp"/>
  <item value="771" path="res771.bmp"/>
  <item value="772" path="res772.bmp"/>
  <item value="773" path="res773.bmp"/>
  <item value="774" path="res774.bmp"/>
  <item value="775" path="res775.bmp"/>
  <item value="776" path="res776.bmp"/>
  <item value="779" path="res779.bmp"/>
  <item value="780" path="res780.bmp"/>
  <item value="781" path="res781.bmp"/>
  <item value="782" path="res782.bmp"/>
Below <item value="782" path="res782.bmp"/>
add:

Code: Select all

  <item value="783" path="res783.bmp"/>
  <item value="784" path="res784.bmp"/>
Then, in a hex editor, open the file located in the shadow folder of PR called "res750.pal.more". Replace the first byte in that file with 0x22.
After that, you can add the death frames to the shadow folder using the death frames of the Prince. Make sure to name those frames from "frame 1.bmp" and so on to "res779.bmp" and so on until "res 784.bmp" but use "dead.bmp" for "res784.bmp".

This is an example of how you should name and place each file from the Prince's death frames and dead frame in the shadow folder in PR:
Capture.JPG
Then import SHADOW.DAT in pr and you'll have your new file.
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

4DPlayer wrote: November 21st, 2019, 4:44 pm
Emiliano Fierro wrote: November 21st, 2019, 12:35 am Is there any way to kill the shadow by the left side without crashing the game?
I know I must import the sources with PR, but is there a code to fix it well?
I hope you can help me, watch the video and you'll know what I'm talking about
In the file "resources.xml" find the <folder index="pop1" name="binary" file="shadow.dat" path="shadow" palette="750"> section.
In a regular resources.xml it will look like:

Code: Select all

<folder index="pop1" name="binary" file="shadow.dat" path="shadow" palette="750" type="image">
  <item value="750" path="res750.pal" type="palette-pop1-4bits"/>
  <item value="751" path="hit points.bmp"/>
  <item value="752" path="splash.bmp"/>
  <item value="753" path="res753.bmp"/>
  <item value="754" path="res754.bmp"/>
  <item value="755" path="res755.bmp"/>
  <item value="756" path="res756.bmp"/>
  <item value="757" path="res757.bmp"/>
  <item value="758" path="res758.bmp"/>
  <item value="759" path="res759.bmp"/>
  <item value="760" path="res760.bmp"/>
  <item value="761" path="res761.bmp"/>
  <item value="762" path="res762.bmp"/>
  <item value="763" path="res763.bmp"/>
  <item value="764" path="res764.bmp"/>
  <item value="765" path="res765.bmp"/>
  <item value="766" path="res766.bmp"/>
  <item value="767" path="res767.bmp"/>
  <item value="768" path="res768.bmp"/>
  <item value="769" path="res769.bmp"/>
  <item value="770" path="res770.bmp"/>
  <item value="771" path="res771.bmp"/>
  <item value="772" path="res772.bmp"/>
  <item value="773" path="res773.bmp"/>
  <item value="774" path="res774.bmp"/>
  <item value="775" path="res775.bmp"/>
  <item value="776" path="res776.bmp"/>
  <item value="779" path="res779.bmp"/>
  <item value="780" path="res780.bmp"/>
  <item value="781" path="res781.bmp"/>
  <item value="782" path="res782.bmp"/>
Below <item value="782" path="res782.bmp"/>
add:

Code: Select all

  <item value="783" path="res783.bmp"/>
  <item value="784" path="res784.bmp"/>
Then, in a hex editor, open the file located in the shadow folder of PR called "res750.pal.more". Replace the first byte in that file with 0x22.
After that, you can add the death frames to the shadow folder using the death frames of the Prince. Make sure to name those frames from "frame 1.bmp" and so on to "res779.bmp" and so on until "res 784.bmp" but use "dead.bmp" for "res784.bmp".

This is an example of how you should name and place each file from the Prince's death frames and dead frame in the shadow folder in PR:
Capture.JPG

Then import SHADOW.DAT in pr and you'll have your new file.
Thanks, but Does it work in the left side?
65536
4DPlayer

Re: Fixing the shadow

Post by 4DPlayer »

Emiliano Fierro wrote: November 21st, 2019, 4:53 pm
Thanks, but Does it work in the left side?
This will work in any side because the shadow will actually die and not disappear.
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

4DPlayer wrote: November 21st, 2019, 6:18 pm
Emiliano Fierro wrote: November 21st, 2019, 4:53 pm
Thanks, but Does it work in the left side?
This will work in any side because the shadow will actually die and not disappear.
Thanks, today in the afternoon I will fix it
65536
4DPlayer

Re: Fixing the shadow

Post by 4DPlayer »

One thing I forgot:
Below <item value="782" path="res782.bmp"/> in the shadow.dat section of resources.xml there is text reading </folder>.
Make sure when you add the new lines in resources.xml that </folder> is at the bottom of the <folder index="pop1" name="binary" file="shadow.dat" path="shadow" palette="750> section in resources.xml.

So when you’re done adding the new lines of code in the xml document, the shadow folder section should look like:

Code: Select all

 <folder index="pop1" name="binary" file="shadow.dat" path="shadow" palette="750" type="image">
  <item value="750" path="res750.pal" type="palette-pop1-4bits"/>
  <item value="751" path="hit points.bmp"/>
  <item value="752" path="splash.bmp"/>
  <item value="753" path="res753.bmp"/>
  <item value="754" path="res754.bmp"/>
  <item value="755" path="res755.bmp"/>
  <item value="756" path="res756.bmp"/>
  <item value="757" path="res757.bmp"/>
  <item value="758" path="res758.bmp"/>
  <item value="759" path="res759.bmp"/>
  <item value="760" path="res760.bmp"/>
  <item value="761" path="res761.bmp"/>
  <item value="762" path="res762.bmp"/>
  <item value="763" path="res763.bmp"/>
  <item value="764" path="res764.bmp"/>
  <item value="765" path="res765.bmp"/>
  <item value="766" path="res766.bmp"/>
  <item value="767" path="res767.bmp"/>
  <item value="768" path="res768.bmp"/>
  <item value="769" path="res769.bmp"/>
  <item value="770" path="res770.bmp"/>
  <item value="771" path="res771.bmp"/>
  <item value="772" path="res772.bmp"/>
  <item value="773" path="res773.bmp"/>
  <item value="774" path="res774.bmp"/>
  <item value="775" path="res775.bmp"/>
  <item value="776" path="res776.bmp"/>
  <item value="779" path="res779.bmp"/>
  <item value="780" path="res780.bmp"/>
  <item value="781" path="res781.bmp"/>
  <item value="782" path="res782.bmp"/>
  <item value="783" path="res783.bmp"/>
  <item value="784" path="res784.bmp"/>
   </folder>
  
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

I did all your steps and the game still crashes :( by the left side
I can prove it, here's my file
Check out the file and correct my mistakes
Attachments
SHADOW.DAT
(6.52 KiB) Downloaded 101 times
65536
4DPlayer

Re: Fixing the shadow

Post by 4DPlayer »

Emiliano Fierro wrote: November 22nd, 2019, 1:47 am I did all your steps and the game still crashes :( by the left side
I can prove it, here's my file
Check out the file and correct my mistakes
Did you edit the first byte in res750.pal.more to 0x22?
If you did, then maybe it’s an issue in resources.xml. Could you upload the xml file?

Edit: Wait. I think I know the problem. You need to re-export SHADOW.DAT after you make the change to resources.xml. Changes in the dat file won’t change if you are working with an already exported SHADOW.DAT.
Last edited by 4DPlayer on November 22nd, 2019, 6:12 am, edited 1 time in total.
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

I edited the first byte in res.pal.more
I can't send xml files I followed all your steps
Attachments
xml sources.png
65536
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

4DPlayer wrote: November 22nd, 2019, 4:33 am
Emiliano Fierro wrote: November 22nd, 2019, 1:47 am I did all your steps and the game still crashes :( by the left side
I can prove it, here's my file
Check out the file and correct my mistakes
Edit: Wait. I think I know the problem. You need to re-export SHADOW.DAT after you make the change to resources.xml. Changes in the dat file won’t change if you are working with an already exported SHADOW.DAT.
I guess that might be the problem
65536
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

Here are my re-exported shadow.dat
And my re-imported file
Attachments
Shadow.png
shadow.dat
(6.52 KiB) Downloaded 89 times
65536
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

This is what happens:
Attachments
Glitch.png
65536
4DPlayer

Re: Fixing the shadow

Post by 4DPlayer »

Emiliano Fierro wrote: November 22nd, 2019, 4:53 am Here are my re-exported shadow.dat
And my re-imported file
If you look at your image again, you can see you forgot to add "res781.bmp". If you add that file to the shadow folder and then re-import shadow.dat, it will probably work.
res781.bmp was not added in the shadow folder.
res781.bmp was not added in the shadow folder.
Shadow.png (59.74 KiB) Viewed 6070 times

Also, there is another line of code you can add to resources.xml to make the shadow guard better. Below <item value="767" path="res767.bmp"/> in the shadow.dat section of resources.xml you can add <item value="768" path="res768.bmp"/> like this:
Capture.JPG
Capture.JPG (57 KiB) Viewed 6070 times
When you add this line of code, re-export SHADOW.DAT and then you can take a "normal.bmp" from kid.dat, rename it to "res768.bmp", and move it to the shadow folder.
That way, the shadow guy will actually stand with a sword instead of being invisible when he doesn't see you.
res768standingshadow.JPG
res768standingshadow.JPG (9.49 KiB) Viewed 6070 times
You only need to add that line of code to resources.xml if you want. It is not really necessary.
Last edited by 4DPlayer on November 22nd, 2019, 5:35 pm, edited 1 time in total.
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

I will try again today later
65536
User avatar
Emiliano
Wizard Scribe
Wizard Scribe
Posts: 718
Joined: July 31st, 2019, 8:53 pm
Location: Mexico
Contact:

Re: Fixing the shadow

Post by Emiliano »

I did it again and it worked perfectly, Thank you very much
You'll see it in Lihinghntom's Nightmares (February 2020 or so)
65536
Post Reply