One thing I can't stand about large mods and PWs is that many areas, especially the cities, are veritable ghost towns. Of course this is easy to understand from a builder's perspective as setting up scores or even hundreds of NPC's with individual conversations, even simple one liners, is a royal PITA.
Urk's Random One Liners is a small, simple, easy to modify script set designed to allow large mods to be populated by NPCs that will speak random one liners when spoken to.
Using this script set scores, or even hundreds, of NPCs can be given a single conversation file scripted to allow each to offer a random one liners to players initiating conversations with them. Unlike similar scripts I've found on the web you can't just stand and speak to one person over and over to see all the speak strings. Once a speak string is set on an object it doesn't change. You can only get one (or optionally two) strings from each NPC and then you need to move on to another to see a different string. There is also an option that allows the conversations to reset after one game day.
I have made extensive use of this script set in my Rel Mord campaign mod and it adds a lot of mood and flavor, especially when the party breaks up to buy supplies and the DM has to split his or her attentions. I have 6 separate conversations developed that provide a broad range of potential clues and conversations for wandering PCs.
Conversation 1 is for Commoners.
Conversation 2 is for Guards.
Conversation 3 is for Nobles.
Conversation 4 is for Refugees (specific to that module).
Conversation 5 is for visitors to the city.
Conversation 6 is for students at Rel Mord University.
This package contains a sample character with Urk's Random One Liner scripts attached. To use simply modify and rename the conversation scripts. Mind you you'll need to modify the scripts to get them to say anything INTERESTING. The default strings will leave the NPC saying stuff like "ENTER ONE LINER #5a HERE".
If you want the one liner to change each time the npc is spoken with simply delete the top conversation node (or remove the "text appears when" script in that node). Personally I've never found a good reason to do that, but if you want to it's easy enough to do.
If you want the one liner to reset every 48 minutes (1 day of game time) just uncomment lines 46 through 51 in script 1.
By default the spoken line is determined by a 1d10 roll. This can easily be modified to allow for any number of possible one liners including a bell curve probability. For large mods or PWs you should consider using 2d20, 3d20 or even 2d100 probabilities and you should definitely uncomment the conversation reset lines. This has the advantage of having low probability results for rare or exceptional rumors (clues leading to quest givers, evil temples, thieves guilds, etc) and high probabilities for mundane results that can be used to establish mood, setting elements like current events, local politics and public figures, or local history like recent conflicts or political changes.
This conversation can be added to any object. No outside script support is needed.
DO NOT ENTER TEXT INTO THE CONVERSATION NODES. If they are not left completely blank the scripts won't function.
The first time a character speaks it will offer a unique one liner (called ONE LINER 1a, ONE LINER 2a, ONE LINER 3a etc). Each time after that it will speak a standard follow up line (called ONE LINER 1b, ONE LINER 2b, ONE LINER 3b etc.). The follow up line can be the same or different as the builder wishes. It's pretty easy to copy/paste the "if then" lines that set the string variables from script 1 to script 3. This is a handy shortcut even if you intend to change one liners after the first time the NPC SPeaks.
The standard scripts in this package are unmodified. You do not need to overwrite any scripts when importing the sample character or conversation file.
SHORTCUT FOR SCRIPTERS:
You can always add a line to a creature's OnSpawn script that sets the variable "ConvKey" to a random number on OBJECT_SELF (the conversation owner) and reset the variable according to whatever interval you choose by modifying script 1 to change the ConvKey variable rather than simply resetting it to 0. I chose not to do this to maximize the versatility and ease of use of the script, but using this technique you can then delete the top conversation node and just use script #1.
Votes and due credit are humbly requested, but not required. Having fun using these scripts is NOT optional.
Any time! Thanks for the vote, ninecoronas. _________________________ If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut.
Posted by NineCoronas at 2012-08-18 06:47:34 Voted 10.00 on 08/18/12
BAM! Exactly what I need. I have been putting off writing my own version of this script (which would've came out to the same level of innovation xD). Thanks, mate! Credit'll be given ;) _________________________ "A dagger in the night is worth a thousand swords at dawn..."
WOW! Estelindis! I'm honored to have a vote from such a well known and respected member of the community!
M'Lady is correct. These scripts aren't innovative, just practical. I'm not a scripter by any stretch of the imagination. I'm just a builder that can patch together a script when I need to. I've been using this script set for more than three years, but I only just packaged it for general use because my little brother wanted to see it. I figured since I'd done all the work of cleaning up these scripts I should upload them while I was at it. _________________________ If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut.