Saturday, 29 December 2007

Couldn't stay away for long...

At Christmas day I couldn't hold it back any longer. Too much food and carrols I suppose. So I started to work on the resting-script. I've never played with it before, not even in NWN1 so I had to do some research before the coding. It's not easy to get it work in the way I want. This is how it is supposed to work:
  • Resting has to take time proportional to the amount of healing done. I believe it was something like that in Baldur's Gate.
  • You can chose to rest untill fully healed or just a short one to restore a few HP.
  • Time has to move during rest so the torches and lamps will consume their fuel.
  • You can't rest everywhere and not more often than every 4th hour.
  • Resting in the dark will attract the Grue.
  • Optional: I want a nicer animation than that ugly kneel down thing.
One thing I've learned is that I probably have to ditch the standard sleeping completly. The animation and rest timer kicks in before the OnRest-script and I have to cancel it before doing the above things. Doing so makes ON_REST_CANCELED to fire and that one I need to stop the healing when aborting the rest. So I'm thinking of making a useable bedroll that you activate when you want to rest. No fancy palceable system - it has to be as easy to use as the ordinary sleep.

I've already tested the animations and they work okay. The big thing is to make the rest system robust. If it fails you could get eternal healing or never be able to rest again, so it will take quite some thinking and testing.

2 comments:

Ernie Noa said...

Good luck. Sounds like a major overhaul of the system. I'd love to take a peak at the scripting you come up with someday.

Good luck!

craftypainter said...

Have you checked the Hardcore rules resting system? Perhaps it contains some useful code that you could reuse?