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.
This is my function to randomly generate names... Seems to me that you left out a couple of races... *** CODE BELOW *** //:**************************************************************************:\\ void MyNewName (object oSelf = OBJECT_SELF) { //Randomly Generate Names, so that no Common NPC is without one string sTag = GetTag (oSelf); if (sTag == "COMMONER"){ int NAME_ME; int nRace = GetRacialType (oSelf); switch (nRace)//Accounts only for first names { case RACIAL_TYPE_DWARF: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_DWARF_MALE; else NAME_ME = NAME_FIRST_DWARF_FEMALE; break; case RACIAL_TYPE_ELF: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_ELF_MALE; else NAME_ME = NAME_FIRST_ELF_FEMALE; break; case RACIAL_TYPE_GNOME: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_GNOME_MALE; else NAME_ME = NAME_FIRST_GNOME_FEMALE; break; case RACIAL_TYPE_HALFELF: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_HALFELF_MALE; else NAME_ME = NAME_FIRST_HALFELF_FEMALE; break; case RACIAL_TYPE_HALFLING: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_HALFLING_MALE; else NAME_ME = NAME_FIRST_HALFLING_FEMALE; break; case RACIAL_TYPE_HALFORC: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_HALFORC_MALE; else NAME_ME = NAME_FIRST_HALFORC_FEMALE; break; case RACIAL_TYPE_HUMAN: if (GetGender (oSelf) == GENDER_MALE) NAME_ME = NAME_FIRST_HUMAN_MALE; else NAME_ME = NAME_FIRST_HUMAN_FEMALE; break; } string MyNameIs = RandomName (NAME_ME); SetName (oSelf, MyNameIs); } } _________________________ Vox Populi. Vox Dei The Community Adventure Project
Posted by Blasco-Yang at 2009-11-1517:35:39
DM Vecna: I do have a bounty system that works quite well for encounter creatures if you are interested. (In many ways it is quite similar to this system) It's called: Blasco's Simplified Bounty Creatures and you can find it right here on the vault.
Posted by DM_Vecna at on11/11/09
Really nice job here guys! The only thing I see missing is a on spawn variation to be used for encounter based spawning/despawning and custom heads. _________________________ Link Link
Posted by ffbj at on11/09/09
One thing on the bounty side which was Blasco's idea, was that the bounty npc does not actually have the gold that is the bounty on them. The PC just gets the gold when they kill that npc. This prevents thieves from stealing that bounty gold off the npc, and makes more sense. Personally I never cared for the idea of turning in fingers, noses, or whatever. It's just an expedient way to rewared the PC for killing the bounty creature.
Posted by Blasco-Yang at 2009-11-0916:20:08
Absolutely CAP 9fires. Feel free to do with it as you please. I'm glad you like it and can use it. I've been using your Graphic Meters Concept and loving it. I'm glad to be able to return the favor. As for the NPCs giving out a greeting: I had considered this, but was actually looking into the potential of pulling a bit of text out of the NPC's own individual description field as part of a quick, non PC respondable, greeting. This would make for fairly individualized "SpeakString" comments that personally relate to the NPC in question. Of course, I've not yet looked too deeply into it, so doing it in that manner may not be feasible. If not, I will inject some form of greeting anyway in a future update.
Posted by ffbj at on11/09/09
Cool by me. Of course you would have to get an ok from Blasco too. I know he speaks glowingly of your CAP, btw. Also adding in a random hello would not be a bad thought, but that's Blasco's ballywick, so the ball's in his court there. I don't usually vote on my own stuff but since I was just a part of this project I am going to vote on it. I really like what it does and how it adds, depth, or substance to a world. Just laughed my ask off on some of the descriptions. Thanks for the votes, and great working with you Blasco on this. Cheers!
Posted by CAP at on11/08/09
Is it cool if I wrap this up in my AI? I had something similar - well a random name generator, but damn you guys took what I was thinking and made it ... a 10. The random clothing thing... WOW what a time and resource saver... The random descriptions, superlative. I love random. Predictability sucks. _________________________ Vox Populi. Vox Dei The Community Adventure Project
Posted by Wazf651 at on11/08/09
first time i vote,i was thinking vote was splitting
Posted by CAP at on11/08/09
o.0 This looks interesting. _________________________ Vox Populi. Vox Dei The Community Adventure Project
Posted by Wazf651 at on11/08/09
Nice! i like the random npc setup and your scripts is clean. Suggestion: maybe one random speach liner like "hello" can put more colors to npc