Added a faction, and minor stuff

Adding  faction goes through every area. I had no idea.
This commit is contained in:
EpicValor
2023-08-28 22:46:32 -05:00
parent 00305fc3a5
commit ac21a61c37
642 changed files with 44575 additions and 6193 deletions

View File

@@ -8,4 +8,5 @@ void main()
{
LevelUpHenchman69(OBJECT_SELF, oPC);
}
DelayCommand(10.5, ExecuteScript("_golemstats", OBJECT_SELF));
}

View File

@@ -7,7 +7,7 @@ to an areacleanup script which cleans the area
void main()
{
float cleanupdelay = 15.0; //if you change this it alters how long before
float cleanupdelay = 600.0; //if you change this it alters how long before
// the area cleans up, if you do change it INCLUDE THE DECIMAL, or it won't
// work
if(!GetIsPC(GetExitingObject()) ) {

View File

@@ -7,6 +7,6 @@ void main()
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBless, oPC, 3600.0);
RewardPartyXP(10000,oPC,FALSE);
RewardPartyXP(2000,oPC,FALSE);
//AdjustAlignment(oPC, ALIGNMENT_GOOD, 50);
}

View File

@@ -53,7 +53,16 @@ void main()
case OBJECT_TYPE_PLACEABLE:
if (GetTag(oObject) != "BodyBag") {
break; }
case OBJECT_TYPE_ITEM:
if (GetTag(oObject) == "statueofdeath") {
break; }
if (GetTag(oObject) == "statueofgold") {
break; }
if (GetTag(oObject) == "statueofjade") {
break; }
if (GetTag(oObject) == "statueofwater") {
break; }
TrashObject(oObject); }
oObject = GetNextObjectInArea(OBJECT_SELF);
}

View File

@@ -9,10 +9,10 @@ int iDouble_EXP = FALSE; // Set to TRUE enables seeing first the PW
// experience followed by Bioware experience.
// This is useful to compare values.
float Experience_Slider = 0.20;// This is the percentage that can be adjusted.
float Experience_Slider = 0.30;// This is the percentage that can be adjusted.
// This value matches the Bioware slider.
float Exp_Level_Cap = 20.0; // This is the basic CR cap.
float Exp_Level_Cap = 3000.0; // This is the basic CR cap.
int iBoss_Cap_Method = 2; // These are mode sets for how bosses are handled
// Mode 1: The CR of the boss is modified.
@@ -28,7 +28,7 @@ float Lower_Exponent = 0.50; // This is the exponent that defines how exp
float Higher_Exponent = 0.50; // This is the exponent that defines how exp
// increases whent he CR is higher than player.
float Party_Proximity = 60.0; // The distance a party member must be to get a
float Party_Proximity = 160.0; // The distance a party member must be to get a
// share of the experience.
float Leveling_Exponent = 1.08;// This exponent defines how fast the exponent is

View File

@@ -0,0 +1,198 @@
/*
Pstemarie: 12-23-2019
Generic Creature OnUserDefined Event Script
To use:
1. Set the creature to use the X2 Monster AI (scripts with the prefix
x2_def_****).
2. Set this script as the creature's OnUserDefined event handler.
3. Set an INT variable named "X2_USERDEFINED_ONSPAWN_EVENTS" with a
value of "2" on the creature.
4. Uncomment any desired special behavior under the PRE and POST-SPAWN
conditionals
Leeched from nw_c2_default9, nw_c2_herbivore, and x2_def_userdef - all (c) 2002-2004 Bioware
*/
const int EVENT_USER_DEFINED_PRESPAWN = 1510;
const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
#include "x0_i0_anims"
void main()
{
int nEvent = GetUserDefinedEventNumber();
if (nEvent == EVENT_USER_DEFINED_PRESPAWN)
{
}
else if (nEvent == EVENT_USER_DEFINED_POSTSPAWN)
{
//----------------------------------------------------------------------
// OPTIONAL BEHAVIORS (Comment In or Out to Activate )
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
//* This causes the creature to say a special greeting in their conversation file
//* upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
//* greeting in order to designate it. As the creature is actually saying this to
//* himself, don't attach any player responses to the greeting.
//SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
//* This will set the listening pattern on the NPC to attack when allies call
//SetSpawnInCondition(NW_FLAG_STEALTH);
//* If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
//* If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
//* This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
//* If this is set, the NPC will appear using the "EffectAppear" animation instead of fading in.
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//* This will play Ambient Animations until the NPC sees an enemy or is cleared.
//* NOTE: These animations will play automatically for Encounter Creatures.
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
//* This will play Ambient Animations until the NPC sees an enemy or is cleared.
//* NOTE: NPCs using this form of ambient animations will not move to other NPCs.
//----------------------------------------------------------------------
// ANIMATION SETTINGS
/*
These are extra conditions you can put on creatures using ambient animations - either
NW_FLAG_AMBIENT_ANIMATIONS or NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS.
*/
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
//* Civilized creatures interact with placeables in their area that have the tag "NW_INTERACTIVE"
//* and "talk" to each other.
//*
//* Humanoid races are civilized by default, so only set this flag for monster races that you want to
//* behave the same way.
//SetAnimationCondition(NW_ANIM_FLAG_CONSTANT);
//* If this flag is set, this creature will constantly be acting. Otherwise, creatures will only start
//* performing their ambient animations when they first perceive a player, and they will stop when the
//* player moves away.
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
//* Civilized creatures with this flag set will randomly use a few voicechats. It's a good idea to avoid
//* putting this on multiple creatures using the same voiceset.
//SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE);
//* Creatures with _immobile_ ambient animations can have this flag set to make them mobile in close
//* range. They will never leave their immediate area, but will move around in it, frequently returning
//* to their starting point.
//*
//* NOTE: Creatures spawned inside interior areas that contain a waypoint with one of the tags "NW_HOME",
//* "NW_TAVERN", and "NW_SHOP" will automatically have this condition set.
//----------------------------------------------------------------------
// SPECIAL BEHAVIOR SECTION
/*
The following section outlines the various special behaviors that can be placed on a creature.
To activate one of the special behaviors:
1. Comment in SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
2. Comment in ONE other special behavior setting (ONLY ONE).
*/
//SetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL);
//* OPTIONAL SPECIAL BEHAVIORS - ONLY ONE OF THESE SHOULD BE SET AT A TIME
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN);
//* Flee to a waypoint and return a short time later.
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE);
//* Flee to a waypoint and do not return.
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE);
//* Teleport to a waypoint and do not return.
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN);
//* Teleport to a waypoint and return a short time later.
//SetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE);
//* Will only attack those that close within 5m and are not friends, Rangers or Druids.
//SetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE);
//* Will flee those that close within 7m if they are not friends, Rangers or Druids.
//SetCombatCondition(X0_COMBAT_FLAG_RANGED);
//* Ranged Attacker: Will attempt to stay at ranged distance from their target.
//SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE);
//* Defensive Attacker: Will use defensive combat feats and parry
//SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER);
//* Ambusher: Will go stealthy/invisible and attack, then run away and try to go stealthy
//* again before attacking anew.
SetCombatCondition(X0_COMBAT_FLAG_COWARDLY);
// * Cowardly: Will attempt to flee attackers.
//----------------------------------------------------------------------
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in
the NW_D2_DefaultD. Like the On Spawn In script this script is meant to be customized by
the end user to allow for unique behaviors. The user defined events are 1001 - 1007, and
1510 and 1511.
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
}
else if(nEvent == EVENT_HEARTBEAT ) //HEARTBEAT
{
}
else if(nEvent == EVENT_PERCEIVE) // PERCEIVE
{
}
else if(nEvent == EVENT_END_COMBAT_ROUND) // END OF COMBAT
{
}
else if(nEvent == EVENT_DIALOGUE) // ON DIALOGUE
{
}
else if(nEvent == EVENT_ATTACKED) // ATTACKED
{
}
else if(nEvent == EVENT_DAMAGED) // DAMAGED
{
}
else if(nEvent == 1007) // DEATH - do not use for critical code, does not fire reliably all the time
{
}
else if(nEvent == EVENT_DISTURBED) // DISTURBED
{
}
}

View File

@@ -0,0 +1,33 @@
//::///////////////////////////////////////////////
//:: On Blocked script for BESIE commoners
//:: re_common_blkd
//:: Original On Blocked script Copyright (c) 2001 Bioware Corp.
// modifications by Carlo
//:://////////////////////////////////////////////
/*
This will cause blocked creatures to open
doors, or failing that clear their action queue.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 23, 2001
//:://////////////////////////////////////////////
void main()
{
object oDoor = GetBlockingDoor();
// * Increment number of times blocked
SetLocalInt(OBJECT_SELF, "X2_NUMTIMES_BLOCKED", GetLocalInt(OBJECT_SELF, "X2_NUMTIMES_BLOCKED") + 1);
if (GetLocalInt(OBJECT_SELF, "X2_NUMTIMES_BLOCKED") > 1)
{
SetLocalInt(OBJECT_SELF, "X2_NUMTIMES_BLOCKED",0);
ClearAllActions();
}
if(GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 5)
{
if(GetIsDoorActionPossible(oDoor, DOOR_ACTION_OPEN) && GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 7 )
{
DoDoorAction(oDoor, DOOR_ACTION_OPEN);
}
}
}

View File

@@ -0,0 +1,115 @@
//::///////////////////////////////////////////////
//:: Default: On Spawn In
//:: NW_C2_DEFAULT9
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Determines the course of action to be taken
after having just been spawned in
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 25, 2001
//:://////////////////////////////////////////////
#include "ms_name_inc"
#include "rnd_commoner_inc"
#include "NW_O2_CONINCLUDE"
#include "NW_I0_GENERIC"
void main()
{
// Randomize Skin Tone
rnd_skin(OBJECT_SELF);
// Randomize Head & Hair color
rnd_head(OBJECT_SELF);
// Randomize Tattoos
rnd_tattoo(OBJECT_SELF);
// Randomize Clothing
rnd_clothes(OBJECT_SELF);
// Randomize Last Name Usage
int bNameChance = d100() > 33;
SetLocalInt(OBJECT_SELF, "NAME_TYPE", bNameChance);
int nOneName = GetLocalInt(OBJECT_SELF,"SINGLE_NAME");
if (nOneName = 1)
{
SetLocalInt(OBJECT_SELF, "NAME_TYPE", 0);
}
//Calls the Random Name Generator
ms_Nomenclature(OBJECT_SELF);
// OPTIONAL BEHAVIORS (Comment In or Out to Activate )****************************************************************************
//SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION);
//SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION);
// This causes the creature to say a special greeting in their conversation file
// upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired
// greeting in order to designate it. As the creature is actually saying this to
// himself, don't attach any player responses to the greeting.
//SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET);
// This will set the listening pattern on the NPC to attack when allies call
//SetSpawnInCondition(NW_FLAG_STEALTH);
// If the NPC has stealth and they are a rogue go into stealth mode
//SetSpawnInCondition(NW_FLAG_SEARCH);
// If the NPC has Search go into Search Mode
//SetSpawnInCondition(NW_FLAG_SET_WARNINGS);
// This will set the NPC to give a warning to non-enemies before attacking
//SetSpawnInCondition(NW_FLAG_SLEEP);
//Creatures that spawn in during the night will be asleep.
//SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING);
//SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION);
//SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS);
SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS);
//This will play Ambient Animations until the NPC sees an enemy or is cleared.
//NOTE that these animations will play automatically for Encounter Creatures.
SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED);
// Interacts with placeables + More civilized actions. See Readme.
SetAnimationCondition(NW_ANIM_FLAG_CHATTER);
// Will use random voicechats during animations, if Civilized
// NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME.
//SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.)
//SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.)
//SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.)
// CUSTOM USER DEFINED EVENTS
/*
The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the
On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined
events user 1000 - 1010
*/
//SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001
//SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002
//SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005
//SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006
//SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008
//SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003
//SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004
//SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007
// DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) *****************************************************************************************
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to.
//WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0)
// 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them
// 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after
// combat.
GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalInt(OBJECT_SELF, "iDialogue", Random(10) + 1);
}

View File

@@ -0,0 +1,125 @@
//:: Copyright (c) Project RATDOG
//:://////////////////////////////////////////////
/*
Randomize appearance & clothing for commoners
*/
//:://////////////////////////////////////////////
//:: Created By: Jaysyn
//:: Created On: Sept 01, 2021
//:://////////////////////////////////////////////
void rnd_skin(object oPC)
{
//:: Randomize skin color
int nKeepskin = GetLocalInt(OBJECT_SELF,"RA_KEEPSKIN");
int nSkinColor;
nSkinColor = Random(5);
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, "RA_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,"RA_KEEPHEAD");
int nKeephair = GetLocalInt(OBJECT_SELF,"RA_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,"RA_KEEPTATS");
int nTattoo1;
nTattoo1 = Random(15);
if (nKeeptats != 1)
{
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_1, nTattoo1);
}
int nTattoo2;
nTattoo2 = Random(15);
if (nKeeptats != 1)
{
SetColor(OBJECT_SELF, COLOR_CHANNEL_TATTOO_2, nTattoo2);
}
}
void rnd_clothes(object oPC)
{
int nNoble = GetLocalInt(OBJECT_SELF,"NOBLE");
object oItem;
if (nNoble != 1)
{
//Randomizes Commoner's Clothing
int nStackSize = 1; // Create 1 items
int nResult = d20(1);
string sItem;
sItem = "baleas_cloth0" + IntToString(nResult);
oItem = CreateItemOnObject(sItem, oPC, 1);
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
}
else if (GetGender(oPC) != 1) // 1 is Female
{
//Randomizes Male Noble's Clothing
int nStackSize = 1; // Create 1 items
int nResult = d10(1);
string sItem;
sItem = "noble_m_cloth0" + IntToString(nResult);
oItem = CreateItemOnObject(sItem, oPC, 1);
//DelayCommand(0.5f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
}
else
{
//Randomizes Female Noble's Clothing
int nStackSize = 1; // Create 1 items
int nResult = d10(1);
string sItem;
sItem = "noble_f_cloth0" + IntToString(nResult);
oItem = CreateItemOnObject(sItem, oPC, 1);
//DelayCommand(0.5f, ActionEquipItem(CreateItemOnObject(sItem), INVENTORY_SLOT_CHEST));
DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST));
}
}
// Test VOID
//void main(){}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalInt(OBJECT_SELF, "iRumor", Random(60) + 1);
}

View File

@@ -0,0 +1,19 @@
// sc_ra_rnd_dialog
// by: Tsurani.Nevericy
int StartingConditional()
{
object oSelf = OBJECT_SELF;
string sParam = GetScriptParam("iDialogueNum");
int nCheck = GetLocalInt(oSelf, "iDialogue");
if (!nCheck) // if no random value yet
SetLocalInt(oSelf, "iDialogue", Random(10)+1);
int nVal = StringToInt(sParam);
if (nVal == nCheck)
{
DeleteLocalInt(oSelf, "iDialogue");
return TRUE;
}
return FALSE;
}

View File

@@ -0,0 +1,19 @@
// sc_ra_rnd_rumors
// by: Tsurani.Nevericy
int StartingConditional()
{
object oSelf = OBJECT_SELF;
string sParam = GetScriptParam("iRumorNum");
int nCheck = GetLocalInt(oSelf, "iRumor");
if (!nCheck) // if no random value yet
SetLocalInt(oSelf, "iRumor", Random(13)+1);
int nVal = StringToInt(sParam);
if (nVal == nCheck)
{
DeleteLocalInt(oSelf, "iRumor");
return TRUE;
}
return FALSE;
}