Added PEPS AI. Updated module name. Set all henchmen to have a random race &/or class based name using a custom version of Markshire's Nomeclature scripts, as well as appearance. Set Constructs, Undead, Outsiders & Elementals to not require food or drink. Full compile.
92 lines
1.9 KiB
Plaintext
92 lines
1.9 KiB
Plaintext
//:://////////////////////////////////////////////
|
|
//;:
|
|
//:: mmd_inc_random.nss
|
|
//::
|
|
/*
|
|
Handles random NPC appearances.
|
|
*/
|
|
//::
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Jaysyn
|
|
//:: Created On: 2025-07-15 16:49:54
|
|
//:://////////////////////////////////////////////
|
|
|
|
void rnd_height(object oPC)
|
|
{
|
|
int nPercent = 90 + Random(21); // 90% to 110%
|
|
float fScale = IntToFloat(nPercent) / 100.0f;
|
|
|
|
SetObjectVisualTransform(OBJECT_SELF, OBJECT_VISUAL_TRANSFORM_SCALE, fScale);
|
|
}
|
|
|
|
|
|
void rnd_skin(object oPC)
|
|
{
|
|
//:: Randomize skin color
|
|
int nKeepskin = GetLocalInt(OBJECT_SELF,"MMD_KEEPSKIN");
|
|
int nSkinColor;
|
|
nSkinColor = Random(15);
|
|
|
|
if (nKeepskin != 1)
|
|
{
|
|
SetColor(OBJECT_SELF, COLOR_CHANNEL_SKIN, nSkinColor);
|
|
}
|
|
}
|
|
|
|
void rnd_pheno(object oPC)
|
|
{
|
|
//: Randomize body size (3:1 ratio)
|
|
int nKeepPheno = GetLocalInt(OBJECT_SELF, "MMD_KEEPPHENO");
|
|
int nRandom = d4();
|
|
|
|
if (nKeepPheno != 1 && nRandom == 1)
|
|
{
|
|
SetPhenoType(PHENOTYPE_BIG , OBJECT_SELF);
|
|
}
|
|
|
|
}
|
|
|
|
void rnd_head(object oPC)
|
|
{
|
|
// Randomize head
|
|
int nKeephead = GetLocalInt(OBJECT_SELF,"MMD_KEEPHEAD");
|
|
int nKeephair = GetLocalInt(OBJECT_SELF,"MMD_KEEPHAIR");
|
|
int nHeadNumber;
|
|
nHeadNumber = Random(12)+1;
|
|
|
|
if (nKeephead != 1)
|
|
{
|
|
SetCreatureBodyPart(CREATURE_PART_HEAD, nHeadNumber, OBJECT_SELF);
|
|
}
|
|
|
|
// Randomize hair color
|
|
int nHairColor;
|
|
nHairColor = Random(15);
|
|
if (nKeephair != 1)
|
|
{
|
|
SetColor(OBJECT_SELF, COLOR_CHANNEL_HAIR, nHairColor);
|
|
}
|
|
}
|
|
|
|
void rnd_tattoo(object oPC)
|
|
{
|
|
// Randomize Tattoos
|
|
int nKeeptats = GetLocalInt(OBJECT_SELF,"MMD_KEEPTATS");
|
|
int nTattoo1;
|
|
nTattoo1 = Random(60);
|
|
|
|
if (nKeeptats != 1)
|
|
{
|
|
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_1, nTattoo1);
|
|
}
|
|
|
|
int nTattoo2;
|
|
nTattoo2 = Random(60);
|
|
|
|
if (nKeeptats != 1)
|
|
{
|
|
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_2, nTattoo2);
|
|
}
|
|
|
|
}
|