Warloxx on the NWN forums requested this. I found it a very interesting idea so I went ahead and made it for him. :)
What this does is give any creature you want a random stat increase when they spawn. It's intended to give a little more randomized feel for your creatures.
INSTRUCTIONS:
1.) Save this script as spawn_rand_stats
2.) Open up your OnSpawn script for creatures
3.) Add the following line:
ExecuteScript("spawn_rand_stats", OBJECT_SELF);
4.) Add variables to every creature you want to utilize this script.
Example:
Variable Name: MAX_STR_INCREASES
Variable Type: INT
Variable Value: 8
So now when this creature spawns, a random amount between 0-8 of STR will be added.
Follow the same set up for the rest of the stats.
Please let me know if something doesn't work correctly.
I took the idea of this script and altered it so that it would randomly alter all the ability scores of the NPC by a maximum amount (up to 12, determined by a single local integer). My version shifts abilities up and down (equal chance of either, so -12 to +12).
If you would like my version as an alternative for this posting, Coolty3000, send me an email and I'll send an .erf with it your way (so you could have both versions here). _________________________ World of Aenea (Hall of Fame PW and the origin of all my works)
Vault Entries: The Complete List (50+ entries, including 17 Hall of Fame awards)
Self-Promotional Honesty: If you have opinions on stuff I've made, or if you use any of it (as a player or builder), I like comments/votes/feedback...so do other content makers and builders. Keep us motivated. :)
@DM Heatstroke: That's a valid point, but I personally find it easy enough to just set the minimum stats on the creature and let the script take over from there to handle the max stat amount.
@Link6746: I do not work with NWN2 so I honestly can't say how hard or easy it would be to put in your module. From what I understand, the scripting language hasn't changed much between the games so you can always try it and see.
I wish I knew how easily this script could be ported to NWN2. Merged with some other randomizing scripts, it'd be perfect for a custom spawn system with my PW (When it recovers from a weather based perm crash) _________________________ __________________________________________________
Megadeth has a very intelligent way of talking about governments and religions: Either they bullshit you or try to kill you for not being one of them. I wholeheartedly agree.
(Note: Just because Mustaine is christian doesn't mean he believes EVERYTHING the bible tells him.)
__________________________________________________
I'd like to use this on Athas Reborn but it would have to randomly be able to assign negative vaules as well as positive values. Then when creating a creature I could just use baseline monster stats & apply this script on spawn. _________________________ Heatstroke
I like this idea and script. I'm going to have to try it out. Thanks for making it. _________________________ World of Aenea (Hall of Fame PW and the origin of all my works)
Vault Entries: The Complete List (50+ entries, including 17 Hall of Fame awards)
Self-Promotional Honesty: If you have opinions on stuff I've made, or if you use any of it (as a player or builder), I like comments/votes/feedback...so do other content makers and builders. Keep us motivated. :)