Randomized Henchmen

Randomized Henchmen
This commit is contained in:
Jaysyn904
2021-10-10 23:01:07 -04:00
parent 79303e9f79
commit 68de4c6610
29 changed files with 31455 additions and 4417 deletions

View File

@@ -5,38 +5,50 @@
// By Thrym of Markshire 5/21/06 //
// //
////////////////////////////////////////////////////////////////////////////////
// //
// FUNCTION: //
// The Nomenclature is an include file placed in the spawn script //
// nw_c2_default9 designed to assign a name to a generic NPC who may //
// wander towns, roads, shops, etc. //
// //
// Utilizing both SetName and RandomName the system will name the NPC in //
// one of two ways ... //
// //
// "SET_NAME": By setting the variable "SET_NAME" on the NPC and //
// assigning it a string the creature will rename itself upon spawning. //
// This is handy for DM's and builders to create more precisely named //
// creatures for the palette and then generize them upon spawn. //
// //
// eg. Ancient White Dragon in the Creator becomes White Dragon on Spawn. //
// //
// "SET_NAME" = "RANDOM": By setting the same variable to the name "RANDOM" //
// the NPC then is given a random name generated by RACE and GENDER using //
// the RandomName function. //
// //
// eg. Male Dwarven Villager in the creator becomes Gloigan on spawn //
// this time and perhaps Rufus on the next spawned Villager. //
// //
// "NAME_TYPE": Setting this int variable to "1" will cause a Full Name //
// to be generated if the "SET_NAME" is set to "RANDOM". //
// //
// eg. Male Dwarven Villager becomes Gloigan Stonecutter or Rufus Mason. //
// //
////////////////////////////////////////////////////////////////////////////////
/*
// FUNCTION:
// The Nomenclature is an include file placed in the spawn script
// nw_c2_default9 designed to assign a name to a generic NPC who may
// wander towns, roads, shops, etc.
//
// Utilizing both SetName and RandomName the system will name the NPC in
// one of two ways ...
//
// "SET_NAME": By setting the variable "SET_NAME" on the NPC and
// assigning it a string the creature will rename itself upon spawning.
// This is handy for DM's and builders to create more precisely named
// creatures for the palette and then generize them upon spawn.
//
// eg. Ancient White Dragon in the Creator becomes White Dragon on Spawn.
//
// "SET_NAME" = "RANDOM": By setting the same variable to the name "RANDOM"
// the NPC then is given a random name generated by RACE and GENDER using
// the RandomName function.
//
// eg. Male Dwarven Villager in the creator becomes Gloigan on spawn
// this time and perhaps Rufus on the next spawned Villager.
//
// "NAME_TYPE": Setting this int variable to "1" will cause a Full Name
// to be generated if the "SET_NAME" is set to "RANDOM".
//
// eg. Male Dwarven Villager becomes Gloigan Stonecutter or Rufus Mason.
"RND_ROGUE"
"RND_BARBARIAN"
"RND_FIGHTER"
"RND_CLERIC" : Setting these to "1" will give the NPC a class appropriate
"RND_MAGE" : title
"RND_DRUID"
"RND_RANGER"
//
//
//////////////////////////////////////////////////////////////////////////////*/
//void main (){}
///// FUNCTION DECLARATIONS ////////////////////////////////////////////////////
// Generates a Random First Name
@@ -66,13 +78,245 @@ void ms_Nomenclature(object oNPC = OBJECT_SELF)
string sTitle = GetLocalString(oNPC, "TITLE");
string sPostfix = GetLocalString(oNPC, "POSTFIX");
int nRndRogue = GetLocalInt(OBJECT_SELF,"RND_ROGUE");
if (nRndRogue == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Quick";
}
else if(nResult == 2)
{
sPostfix = "the Quiet";
}
else if(nResult == 3)
{
sPostfix = "the Sharp";
}
else if(nResult ==4)
{
sPostfix = "the Sneak";
}
else if(nResult == 5)
{
sPostfix = "the Rogue";
}
else
sPostfix = "the Footpad";
}
int nRndBarb = GetLocalInt(OBJECT_SELF,"RND_BARBARIAN");
if (nRndBarb == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Barbarian";
}
else if(nResult == 2)
{
sPostfix = "the Destroyer";
}
else if(nResult == 3)
{
sPostfix = "of the Plains";
}
else if(nResult ==4)
{
sPostfix = "of Tiger Clan";
}
else if(nResult == 5)
{
sPostfix = "of Bear Clan";
}
else
sPostfix = "the Avenger";
}
int nRndFight = GetLocalInt(OBJECT_SELF,"RND_FIGHTER");
if (nRndFight == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Strong";
}
else if(nResult == 2)
{
sPostfix = "the Stout";
}
else if(nResult == 3)
{
sPostfix = "of the Blade";
}
else if(nResult ==4)
{
sPostfix = "of Neverwinter";
}
else if(nResult == 5)
{
sPostfix = "of Amn";
}
else
sPostfix = "the Swordhand";
}
int nRndCleric = GetLocalInt(OBJECT_SELF,"RND_CLERIC");
if (nRndCleric == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Pious";
}
else if(nResult == 2)
{
sPostfix = "the Holy";
}
else if(nResult == 3)
{
sPostfix = "the Priest";
}
else if(nResult ==4)
{
sPostfix = "the Zealous";
}
else if(nResult == 5)
{
sPostfix = "of Phlan";
}
else
sPostfix = "the Wise";
}
int nRndMage = GetLocalInt(OBJECT_SELF,"RND_MAGE");
if (nRndMage == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Mad";
}
else if(nResult == 2)
{
sPostfix = "the Arcane";
}
else if(nResult == 3)
{
sPostfix = "the Black";
}
else if(nResult ==4)
{
sPostfix = "the Wizard";
}
else if(nResult == 5)
{
sPostfix = "of Waterdeep";
}
else
sPostfix = "the Mage";
}
int nRndBard = GetLocalInt(OBJECT_SELF,"RND_BARD");
if (nRndMage == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Dancer";
}
else if(nResult == 2)
{
sPostfix = "the Troubador";
}
else if(nResult == 3)
{
sPostfix = "of the Song";
}
else if(nResult ==4)
{
sPostfix = "the Bard";
}
else if(nResult == 5)
{
sPostfix = "the Raconteur";
}
else
sPostfix = "the Minstrel";
}
int nRndDruid = GetLocalInt(OBJECT_SELF,"RND_DRUID");
if (nRndDruid == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Druid";
}
else if(nResult == 2)
{
sPostfix = "of the Forest";
}
else if(nResult == 3)
{
sPostfix = "of the Wild";
}
else if(nResult ==4)
{
sPostfix = "the Wolflord";
}
else if(nResult == 5)
{
sPostfix = "the Treelord";
}
else
sPostfix = "the Warden";
}
int nRndRanger = GetLocalInt(OBJECT_SELF,"RND_RANGER");
if (nRndRanger == 1)
{
int nResult = d6(1);
if (nResult == 1)
{
sPostfix = "the Ranger";
}
else if(nResult == 2)
{
sPostfix = "of the Forest";
}
else if(nResult == 3)
{
sPostfix = "of the Wild";
}
else if(nResult ==4)
{
sPostfix = "the Strider";
}
else if(nResult == 5)
{
sPostfix = "the Venger";
}
else
sPostfix = "the Warden";
}
if (sRandomName != "")
{
if (sRandomName == "RANDOM")
{
switch (GetLocalInt(oNPC, "NAME_TYPE"))
{
case 1: sRandomName = sTitle + " " + ms_RandomFirstName(oNPC) + " " + ms_RandomLastName(oNPC); break;
case 1: sRandomName = sTitle + " " + ms_RandomFirstName(oNPC) + " " + ms_RandomLastName(oNPC)+ " " + sPostfix; break;
default: sRandomName = sTitle + " " + ms_RandomFirstName(oNPC) + " " + sPostfix; break;
}
}