This project began as nothing more than a simple demo of my Random NPC Citizens
and the Randomized Descriptions that they came equipped with.
I ended up enlisting the aid of a scripter/ idea man for whom I have the utmost respect;
"ffbj".
We soon found ourselves embroiled in one idea right after the other.
As we worked on this, I tried to maintain the distinction between what was "purely" ffbj's and what was "purely" mine, but throughout it all we passed ideas, suggestions,
and ever changing concepts, and in many cases, that distinction became somewhat
blurred.
Within the scripts you will find file and function headers which give you the author of the script and often, credit to one or the other of us.
In some situations, it was not an easy task to classify the author of the scripts. I tried to make it so that the originator of the script or function kept the title of "author", but
make no mistake, we both have our fingerprints on every inch of this stuff. lol
In the end, the best description I can come up with for this system is:
It is a Demonstration of
1) Blasco's Random NPC Generation
2) Blasco's Randomized Descriptions for NPC citizens.
3)Blasco's Random NPC Bounty
4) ffbj's Bounty Shout
5)ffbj's Daily Bounty Sheet.
I had a blast working with him on this project and hope to do so again sometime in the future.
The Demo module has all the scripts, include files, and information on how to use the system. Feel free to take what you need from it.
I felt it should be mentioned that within the "00_Descriptions" include file you will find what basically amounts to a Random Word Generator that has the ability to create random words anywhere from 4 to 10 letters in length.
These words are suitable for use as names within a fantasy world setting (which is exactly what I made it for, and the purpose for which ffbj and I used it)
I mention it so that you may know that you can use it "standalone" by calling the function itself in any script you like.
The RandomWord function also has a built in swear filter that contains several objectionable words within the body of it so don't let your kids see it. lol
VERSION 3:
Added in bounty hb to prevent normal citizens from turning hostile to the PC when they attack a bounty npc before the npc has a chance to perceive them. This will allow the PC to attack from stealth and still have the npc be hostile prior to such action. An oversight pointed out by Gonzo_og.
These scripts will generate npc's with random clothing and descriptions and a few with bounties on them. Consult the scripts for more defintions.
This is:
VERSION 2 of the module:
Features a modified "00_descriptions" include file with:
1) Several new random strings for the descriptions.
2) Reworked much of the grammar, and used lower case "He, his, him, She, her" where it is appropriate. The descriptions look far better in this version.
3) Added a check to insure that certain portions of the descriptions are never given (back to back) to newly created NPCs which helps to improve the appearance of the randomness of the descriptions themselves.
4) And, as suggested, added a new function to the include that can be used within the NPC Citizen's OnConversation event to allow the npc to give a random one line conversation.
Also included in this version is a new script: "gen_npc_onconv" which is added to the NPC Citizen templates in the module. It is nothing more than a simple modification of the default bioware OnConversation event script for NPCs with the new function for the Random One Line conversation called within it.
Maybe you could just bump up the wanted NPC's perception range when it becomes wanted? _________________________ stuff
Posted by Gonzo_og at on01/19/10
Thank you two for improving NWN with scripts like these, long into it's "golden years". _________________________ stuff
Posted by ffbj at on11/09/09
Oh and add into the hb the check for a nearby PC within 25 meters or so, to prevent the npc from going hostile if no PC are nearby.
Posted by ffbj at on11/09/09
This could also occur if the PC is in stealth mode and the npc does not perceive them before the PC attacks them. One way to solve it would be to add in a line to the npc's on hb which turns them hostile if when checked the local bounty has been set to 1.
Posted by Blasco-Yang at 2010-01-1117:01:45
To Gonzo: Thanks for bringing that to my attention Gonzo. I tested it again and you are correct. It has to do with the NPC's OnPerception event. We wanted to insure that once an Npc became flagged as a "wanted bounty" that it would not turn hostile while no Players were around and begin attacking "innocent npcs" so it was decided to work this out in the Npc's OnPerception and cause it to turn hostile only once it percieved a Player character. It appears the problem arises when the "wanted" npc is attacked by the Player before it actually "percieves" the Player. In such an instance all npcs (even those who are not flagged as wanted) will retaliate against the Player. If the outlaw npc actually percieves the player first, then this scenario does not occur. I will discuss this with ffbj and we will try to work out a solution as soon as possible. Thanks again.
Posted by Gonzo_og at on01/19/10
This is a really cool script. I only have one issue in the demo mod. When using the bounty sheet, one of the NPC's becomes hostile. No problem. But when my PC engages in combat, every randomly generated NPC in the area becomes hostile and attacks my PC. _________________________ stuff
Posted by Daijin at on11/22/09
Nice work :) !! _________________________ Dream Well, Faith, Loyalty, Truth, Honor, Friendship always..... Daijin Dreamweaver, Leader of the Dream Warriors for 32 years, going strong. Nwn The Dunjon Shard: Link
Posted by Blasco-Yang at 2009-11-1616:55:03
Thanks for the advice CAP. Yea I left out a few races. Specifically the ones I didn't use as templates for the npc creation. Frankly, I've been tempted to add half orcs to the templates. Thanks for the spelling correction as well. I've actually, always been quite good with spelling. (grammar, and punctuation not so good), but certain words I seem to continually mess up. And you found one of them: "freind". "i" before "e" and all that gets twisted up in the old noggin. lol Good, constructive pointers like that are what make a script/system better so long as we heed the advice.
Posted by CAP at on11/08/09
In closing I'd just like to point out I misspelled 'swirling' in my last post _________________________ Vox Populi. Vox Dei The Community Adventure Project
Posted by CAP at on11/08/09
Line 644 of 00_description... Misspelled 'freind'... I am having a storm of my brain... There are many thing swilling... Oh yes... This is good... Very good. Damn shame I can't vote twice. _________________________ Vox Populi. Vox Dei The Community Adventure Project