Modifying the sword position of guards
Modifying the sword position of guards
Hello, I'm new to the forum. I have the following question/problem.
For an experiment, I made a new type of enemy based on the fat guard, only twice as big (intended as a boss). It works fine, save for one little detail: the guard's sword is positioned according to his original size. Is it possible somehow to change the coordinates of the sword so it wouldn't look that funny?
For an experiment, I made a new type of enemy based on the fat guard, only twice as big (intended as a boss). It works fine, save for one little detail: the guard's sword is positioned according to his original size. Is it possible somehow to change the coordinates of the sword so it wouldn't look that funny?
- Attachments
-
- princew3_000.png (5.98 KiB) Viewed 7778 times
Re: Modifying the sword position of guards
Well, I know where are the coordinates stored in PRINCE.EXE.Qwerty wrote:Is it possible somehow to change the coordinates of the sword so it wouldn't look that funny?
But if you changed those then the sword would move for all guards and even the prince.
I'd say this would be easier to do with SDLPoP.
The position of the sword is determined here: https://github.com/NagyD/SDLPoP/blob/ma ... 06.c#L1929
I am trying to make a PRINCE.EXE hack as well, but there are not enough available bytes...
Re: Modifying the sword position of guards
methinks this is what they call a "lethal weapon"...
Re: Modifying the sword position of guards
A very belated thank you for your reply.David wrote:Well, I know where are the coordinates stored in PRINCE.EXE.Qwerty wrote:Is it possible somehow to change the coordinates of the sword so it wouldn't look that funny?
But if you changed those then the sword would move for all guards and even the prince.
I'd say this would be easier to do with SDLPoP.
The position of the sword is determined here: https://github.com/NagyD/SDLPoP/blob/ma ... 06.c#L1929
I am trying to make a PRINCE.EXE hack as well, but there are not enough available bytes...
I see that it's not really feasible to change the sword coordinates - but would it be possible to make the sword of certain guards invisible (~not drawn) instead?
Re: Modifying the sword position of guards
I think I found how to do that.Qwerty wrote:I see that it's not really feasible to change the sword coordinates - but would it be possible to make the sword of certain guards invisible (~not drawn) instead?
Hex-edit PRINCE.EXE:
search: 80 3E 2E 3D 00 75 0E 80 3E 2D 3D 02 75 65 80 3E 2F 3D 00 7D 5E
change to: 80 3E 2D 3D 02 74 07 80 3E 2E 3D 00 EB 05 83 3E 9E 0F ## 74 5E -- where ## is the level where you want to hide the sword.
Technical details for the curious:
Spoiler: show
Re: Modifying the sword position of guards
Thanks! It works perfectly!
Re: Modifying the sword position of guards
David is the hex master.
Re: Modifying the sword position of guards
Worked for me too. I wonder the same would be possible for skeletons.
Re: Modifying the sword position of guards
search: 80 3E 2E 3D 00 75 0E 80 3E 2D 3D 02 75 65 80 3E 2F 3D 00 7D 5E
change to: 80 3E 2D 3D 00 75 07 80 3E 2E 3D 00 EB 05 83 3E 9E 0F ## 74 5E -- where ## is the level where you want to hide the sword.
The background is similar to the original hack, except instead of "charid == 2" this one has "charid != 0", so it works for skeletons as well (charid == 4).
Re: Modifying the sword position of guards
Alright!David wrote: ↑September 15th, 2019, 2:54 pmsearch: 80 3E 2E 3D 00 75 0E 80 3E 2D 3D 02 75 65 80 3E 2F 3D 00 7D 5E
change to: 80 3E 2D 3D 00 75 07 80 3E 2E 3D 00 EB 05 83 3E 9E 0F ## 74 5E -- where ## is the level where you want to hide the sword.
The background is similar to the original hack, except instead of "charid == 2" this one has "charid != 0", so it works for skeletons as well (charid == 4).
Thanks for taking your time to find it.
- atrueprincefanfrom18
- Site Shah
- Posts: 1785
- Joined: January 21st, 2020, 2:53 pm
- Contact:
Re: Modifying the sword position of guards
He is an hexpert!
(Yes, not a typo: hex + expert = hexpert )