2025/07/15 Update

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.
This commit is contained in:
Jaysyn904
2025-07-15 22:19:46 -04:00
parent 239a2cd849
commit d77404f157
502 changed files with 147824 additions and 2042 deletions

32
_module/nss/nw_ch_ac6.nss Normal file
View File

@@ -0,0 +1,32 @@
/*//////////////////////////////////////////////////////////////////////////////
Script: 0e_ch_6_damaged
Programmer: Philos
////////////////////////////////////////////////////////////////////////////////
Player OnDamaged script for PC AI;
Does not fire if the creature dies from the damage.
Does not fire for plot creatures as they take no damage.
May fire before or after OnPhysicalAttacked event.
Fires when EffectDamage is applied to oCreature even if 0 damage.
Fires when a weapon damages a oCreature, but not if resisted.
*///////////////////////////////////////////////////////////////////////////////
#include "0i_associates"
void main()
{
object oCreature = OBJECT_SELF;
if(ai_Disabled(oCreature)) return;
// Make sure to clear wounded shout limit if we take damage. See ai_TryHealing.
DeleteLocalInt(oCreature, "AI_WOUNDED_SHOUT_LIMIT");
object oDamager = GetLastDamager(oCreature);
if(AI_DEBUG) ai_Debug("nw_ch_ac6", "18", GetName(oCreature) + " has been damaged by " + GetName(oDamager));
if(GetSpawnInCondition(NW_FLAG_DAMAGED_EVENT))
{
SignalEvent(OBJECT_SELF, EventUserDefined(1006));
}
if(GetObjectType(oDamager) == OBJECT_TYPE_AREA_OF_EFFECT &&
ai_IsInADangerousAOE(oCreature, AI_RANGE_BATTLEFIELD, TRUE)) return;
if(ai_GetIsBusy(oCreature) || ai_GetIsInCombat(oCreature)) return;
if(!ai_CanIAttack(oCreature)) return;
if(GetDistanceBetween(oCreature, oDamager) < AI_RANGE_CLOSE) ai_DoAssociateCombatRound(oCreature);
else ActionMoveToObject(oDamager, TRUE, AI_RANGE_CLOSE - 1.0);
}