Ineffable Wingbolt Dahak Posted October 1, 2007 Share Posted October 1, 2007 Okay I know that NPC's have script issues. However if you set a default script in the scendata.txt file for that creature will the script then run properly? Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted October 1, 2007 Share Posted October 1, 2007 I believe you're talking about joined NPCs, in which case no, there is no way to get them to behave in any way other than basicnpc (custom death states are possible, but that's it) Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Nioca Posted October 1, 2007 Share Posted October 1, 2007 There is a way to work around that. The creature could be modified to do stuff directly from the START_STATE of the town or scenario script. Of course, this can be tricky and unreliable at times, but it's the best we have available to us. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted October 1, 2007 Share Posted October 1, 2007 Also, it will probably slow down the entire town if a complete creature script will have to be run from the START_STATE. That, and it seems quite a hassle to me. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted October 2, 2007 Share Posted October 2, 2007 Plus you would have to repeat the code in every town! Not really worth it... Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted October 2, 2007 Share Posted October 2, 2007 It actually seemed like a pretty cool idea to me. You could put it in a terrain script and make it so it runs ever turn (even from far away. Terrain scripts run in between combat turns as well, which could be useful.) That way each town you just put a terrain script down. I don't see why it would slow things down. Well the terrain script idea might because it'd be run so often in combat, but checks could be made so that it only runs once per combat turn. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted October 2, 2007 Share Posted October 2, 2007 One technique I thought up a while ago was to alter basicnpc.txt itself. Wrap the default behaviour in an else, and then add your own scripting in ifs that test for the desired condition. For instance, before the default else, test to see if the creature's number is X, where X is the creature number for Hank the Hireling. I have yet to get around to implementing it, though. -------------------- I wouldn't shake his hand if I were you. I hear he licks his thumb. Quote Link to comment Share on other sites More sharing options...
Understated Ur-Drakon Celtic Minstrel Posted October 2, 2007 Share Posted October 2, 2007 That would work... provided the behaviour actually uses basicnpc.txt (which it probably does) rather than being hard-coded or something... Quote Link to comment Share on other sites More sharing options...
Unflappable Drayk Lazarus. Posted October 2, 2007 Share Posted October 2, 2007 I think it's hard coded, because technically you don't HAVE to have a basicnpc script at all. Or maybe not... Anyway it's worth a shot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.