Page 1 of 1

What sort of game-engine features are exposed in DSB?

Posted: Fri Feb 06, 2015 7:53 pm
by boyflea
Hi,
Q: are core-gameplay features like Game over, savegame, resurrect player, restart game, etc exposed enough to influence their behaviour with bespoke lua scripting?
and if not DSB, any other engine?

Why am I asking this?

from another thread came this side thread,
http://www.dungeon-master.com/forum/vie ... &start=120
...Which got me thinking of DSB:

Probably all hypothetical, but if this original scenario exits, could a level-creator use the existing engine to address?
Wizard Zedd wrote:I have been playing a bit of CSB and I have been killed I don't know how many times and keep ending up in different places...I get what you all were saying about being confusing. Thank goodness for war cry - it at least gives me a bit of a fighting chance.

Question - I had 2 of my guys die and I was near an altar so I resurrected them. Do they lose anything when I do that? Am I better off replaying from a saved game?
debated...
Saumun wrote:Are you playing in RTC?
If so, then yes... your resurrected characters do lose a little on vitals like health and stamina. I prefer to reload a saved game if it's not too far back.
I'm not sure whether how much you lose is dependent on a particular factor, or whether it is completely random (but within certain limits obviously).
and some more...
Ameena wrote:I remember reading that in RTC a character's max health goes down a bit every time they get rezzed...but I always just suicide and reload anyway if someone dies :D.
...
terkio wrote:... I think this asks for a change in the RTC engine ( RTC.exe ), that we cannot do.
May be I am wrong, someone might find a workaround.
...and so if RTC cannot be amended, and people are looking into this mechanism, is there anything on other engines that may provide an answer?

Re: What sort of game-engine features are exposed in DSB?

Posted: Fri Feb 06, 2015 10:03 pm
by Sophia
Generally speaking, DSB exposes a lot of how it functions to the designer. What happens during the tasks you mentioned are all exposed to scripting in some way or other, for example.

For the specific example you posted, what happens when you put bones in a vi altar is handled by use_vi_altar in base/triggers.lua, which then sends a message that is handled by its msg_handler, ultimately, revive_character (also found in base/triggers.lua, just below) ends up doing the actual process of waking the character back up. It permanently reduces max health by a small amount and then brings the character back.

I think characters in FTL DM/CSB came back with whatever stamina and mana they had when they died, but I wasn't sure. I set them to random (low) values in DSB.