Can skeleton be immortal?

Open-source port of PoP that runs natively on Windows, Linux, etc.
Post Reply
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Can skeleton be immortal?

Post by atrueprincefanfrom18 »

I just got a comment on this video at the timestamp. Is it possible if skeletons become immortal and you'll just have to get rid of them by making them fall down or make them disappear (or move) through the wall.

I wonder if it's possible by adding any fix. Because logically, as it's a skeleton, he shouldn't get killed except if he gets moved to non-existent room.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Can skeleton be immortal?

Post by atrueprincefanfrom18 »

And yes, they can be. Seems C is not really that hard!

You need to make changes here. Before you take_hp(100) which would make the guard (skeleton) dead, first check if the guard is skeleton. You need to check

Code: Select all

if (Char.charid != charid_4_skeleton) {
	// do the normal things, such as taking hp, playing music, showing blood here
}
And I also checked what made the skeleton turn dead when they fall on spikes. Seems you need to make changes here. Same thing:

Code: Select all

if (Char.charid != charid_4_skeleton) {
	// do the normal things, such as taking hp, showing dead skeleton, playing music here
}
I think I should make video on this.
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1785
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: Can skeleton be immortal?

Post by atrueprincefanfrom18 »

Video done!





Maybe I should do more such videos? A lot more to discover from SDLPoP source code! :)
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
dmitrys
Developer
Developer
Posts: 195
Joined: October 1st, 2020, 6:05 am

Re: Can skeleton be immortal?

Post by dmitrys »

Or you can modify the "take_hp" function not to do anything if the character is a skeleton.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: Can skeleton be immortal?

Post by Norbert »

atrueprincefanfrom18 wrote: March 20th, 2021, 4:49 pmSeems C is not really that hard!
atrueprincefanfrom18 wrote: March 21st, 2021, 5:01 amA lot more to discover from SDLPoP source code! :)
Programming is fun. :)
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Can skeleton be immortal?

Post by David »

dmitrys wrote: March 21st, 2021, 10:25 am Or you can modify the "take_hp" function not to do anything if the character is a skeleton.
With your change, the skeleton will behave slightly differently than with the changes by atrueprincefanfrom18.

When the skeleton falls into a trap, the game will show the skeleton's dead sprite.
If the skeleton fell into spikes, it will not move, unlike in the video.
But the prince will draw his sword at the chomped or spiked skeleton.
You can even "revive" the skeleton if you stab it. :)
Post Reply