You are here

Tutorial - Custom State Scripts

4 posts / 0 new
Last post
Hovering Sombrero
Hovering Sombrero's picture
Tutorial - Custom State Scripts

In an ongoing effort to be more active in documenting the strange little factoids I collect while I mangle the Aurora engine with my clumsy Lenny hands, I have decided to write this tutorial. It should contain everything you ever wanted to know about NWN's state scripts, their limitations and how best to mangle them with your own Lenny hands. Enjoy!

Google Doc - NWN Custom Content Tutorial - State Scripts

Gently waving in the air above the meadow / Softly floating in the sky outside the window

  • up
    50%
  • down
    50%
Proleric
Proleric's picture

I certainly learned something new from this.

Would you be willing to contribute it to the Lexicon? It's good to have all the tutorial information in one place.

One small point of detail regarding object heartbeat scripts. After many community discussions, I don't think there's a case for avoiding them. It's more a matter of being aware that excessive usage can cause lag, especially in PW.

Thanks for your contribution.

NWN and DAO adventures at http://proleric.com/

  • up
    50%
  • down
    50%
Hovering Sombrero
Hovering Sombrero's picture

I would certainly be willing, although I have never updated the Lexicon before. There's also a few bits of misinformation I need to weed out with more spading. I'll try to get version 2 up to Lexicon standards.

As for default, I really only meant that any reasonable use for default is better put in the module's heartbeat script. It isn't really relevant to the tutorial, though, so I'll remove the ambiguous "don't use it because it's evil" sidenote.

Uh, and just for clarity for those who've read the tutorial v1, the bad bits of information are as follows:

  • The character's heartbeat script is only replaced by Dominate; other effects run the state script immediately after the heartbeat.
  • I left out a mention that the heartbeat timer is reset whenever a new state script is applied. For example, someone hit by Daze would fire their heartbeat. If Confused was applied, nothing would change because it has a lower priority. When Daze expires, Confusion would take effect and reset the player's heartbeat. However, the timer would not reset when confusion ended and the player returned to normal.

Edit: Aaaaargh, more spading!

  • Commandable set to false both before the creature's heartbeat script and immediately after the state script each round.
  • Apparently sleep is hard-coded to completely override and ignore the Commandable flag. Seriously, bioware?
  • The hard-coded effects of status effects are also suppressed by the priority system. Dominated creatures put asleep will actually leave the player's party as though it is no longer Dominated and then rejoin the player's party when sleep ends as though it were Dominated a second time. SO WEIRD!
  • up
    50%
  • down
    50%
Proleric
Proleric's picture

Thanks. For Lexicon access, please contact Squatting Monk, quoting this thread.

  • up
    50%
  • down
    50%