Added more creature model overrides

Added more creature model overrides.  Added another "boss" creature to the Labyrinth.  Tweaked several other creatures.  Full compile.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-04-07 18:07:07 -04:00
parent bfbbd2f1ac
commit dc236b3073
146 changed files with 122012 additions and 76538 deletions

View File

@@ -43,6 +43,15 @@ const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
#include "ms_name_inc"
#include "x2_inc_switches"
void Embiggen(object oNPC, float fIncrease);
void Embiggen(object oNPC, float fIncrease)
{
SetObjectVisualTransform(OBJECT_SELF, OBJECT_VISUAL_TRANSFORM_SCALE, fIncrease);
}
void main()
{
//:: User defined OnSpawn event requested?
@@ -151,7 +160,15 @@ void main()
int nHunefer = GetStringLeft(GetTag(OBJECT_SELF), 7) == "HUNEFER" ? TRUE : FALSE;
if(nHunefer)ExecuteScript("fear2_aura",OBJECT_SELF);
//:: Make a creature a little bigger.
int nEmbiggen = GetLocalInt(OBJECT_SELF,"EMBIGGEN");
if (nEmbiggen > 0)
{
float fIncrease = (IntToFloat(nEmbiggen)+100.0) / 100.0;
DelayCommand(0.0f, Embiggen(OBJECT_SELF, fIncrease));
}
//:: Handle various onspawn immunities & buffs
//:: Shadows should be unaffected by darkness
@@ -548,6 +565,17 @@ void main()
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
}
//:: If Incorporeal, apply changes
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
{
effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL);
eConceal = ExtraordinaryEffect(eConceal);
effect eGhost = EffectCutsceneGhost();
eGhost = ExtraordinaryEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF);
}
//:: Execute OnSpawn script.
int nSpider = GetStringLeft(GetTag(OBJECT_SELF), 12) == "MONST_SPIDER" ? TRUE : FALSE;
if(nSpider)

View File

@@ -0,0 +1,28 @@
void main()
{
object oTarget;
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Only fire once per PC.
if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
SetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
// Close and lock "HUNEFER_DOOR".
AssignCommand(oTarget, ActionCloseDoor(oTarget));
SetLocked(oTarget, TRUE);
// Setting the requirement for a specific key to unlock "HUNEFER_DOOR".
SetLockKeyRequired(oTarget);
SetLockKeyTag(oTarget, "HUNEFER_KEY");
// Setting lock data for "HUNEFER_DOOR".
SetLockLockable(oTarget, FALSE);
SetLockUnlockDC(oTarget, 30);
}

View File

@@ -0,0 +1,34 @@
//:: hunefer_warning.nss
void main()
{
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Only fire once per PC.
if ( GetLocalInt(OBJECT_SELF, "DO_ONCE__" + ObjectToString(oPC)) )
return;
SetLocalInt(OBJECT_SELF, "DO_ONCE__" + ObjectToString(oPC), TRUE);
// If the PC's total level is at most 50.
if ( GetHitDice(oPC) <= 50 )
{
//:: Send a message to the player's chat window.
SendMessageToPC(oPC, "As you draw near the portal, you are overcome by a powerful feeling of dread.");
SendMessageToPC(oPC, "You feel that entering the portal would be a very short-lived & terrible idea.");
//:: Have text appear over the PC's head.
FloatingTextStringOnCreature("As you draw near the portal, you are overcome by a powerful feeling of dread.", oPC, FALSE);
FloatingTextStringOnCreature("You feel that entering the portal would be a very short-lived & terrible idea.", oPC, FALSE);
//:: Have the PC say something.
PlayVoiceChat(VOICE_CHAT_BADIDEA, oPC);
}
}

View File

@@ -16,6 +16,7 @@
*///
//::////////////////////////////////////////////////////////////////////////////
#include "inc_debug"
#include "spawn_main"
//:: Function to process the curse
void ApplyCurse(object oPC)
@@ -23,10 +24,10 @@ void ApplyCurse(object oPC)
//:: Check for exising variable on player
int oldTime = GetLocalInt(oPC, "CurseWillSaveTime");
// Get the current system time in seconds
//:: Get the current system time in seconds
int newTime = (GetTimeHour()*60*60)+(GetTimeMinute()*60)+GetTimeSecond();
// Calculate the time difference in seconds
//:: Calculate the time difference in seconds
int timeDifference = newTime - oldTime;
if (DEBUG)
@@ -36,18 +37,19 @@ void ApplyCurse(object oPC)
SendMessageToPC(oPC, "timeDifference = " + IntToString(timeDifference));
}
//:: Check if the character hasn't made a Fortitude save in the last 3 minutes
//:: Check if the character hasn't made a Will save in the last 3 minutes
if (oldTime == 0 || timeDifference >= 180) // 180 seconds = 3 real-time minutes
{
//:: Check if the character failed the save
if (!WillSave(oPC, 20))
{
//:: Apply a curse
effect eCurse = EffectCurse();
effect eCurse = EffectCurse(1, 1, 1, 1, 1, 1);
effect eVFX = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
effect eLink = EffectLinkEffects(eCurse, eVFX);
eLink = EffectLinkEffects(eCurse, eVis);
eLink = SupernaturalEffect(eLink);
eLink = TagEffect(eLink, "LabyrinthCurse");
@@ -62,7 +64,7 @@ void ApplyCurse(object oPC)
SendMessageToPC(oPC, "Setting CurseWillSaveTime as " + IntToString(newTime));
}
// Send a message to the player
//:: Send a message to the player
SendMessageToPC(oPC, "The very air you breathe in this labyrinth is cursed.");
}
@@ -96,7 +98,7 @@ void main()
ApplyCurse(oPC);
}
// Get the next object in the area
//:: Get the next object in the area
oPC = GetNextObjectInArea(oArea);
}
}

View File

@@ -25,7 +25,7 @@ void main()
object oArea = OBJECT_SELF;
//:: Init. NESS spawner system
Spawn_OnAreaEnter( "spawn_sample_hb", 10.0 );
Spawn_OnAreaEnter( "spawn_sample_hb", 10.0 );
//:: Init. randomized respawning trap system
ExecuteScript("se_oea_rsp_traps", oArea);

View File

@@ -1,80 +0,0 @@
//::////////////////////////////////////////////////////////////////////////////
//:: Find Traps
//:: NW_S0_FindTrap
//:: Copyright (c) 2001 Bioware Corp.
//::////////////////////////////////////////////////////////////////////////////
/*
- Finds and removes all traps within 30m.
- Caster level + d20 vs the trap disarm
Fail - Trap detected
Success - Trap disabled
*/
//::////////////////////////////////////////////////////////////////////////////
//:: Created By : Preston Watamaniuk
//:: Created On : Oct 29, 2001
//:: Modified By: Sir Elric
//:: Modified On: 15th April, 2006
//::////////////////////////////////////////////////////////////////////////////
#include "x2_inc_spellhook"
void main()
{
/*
Spellcast Hook Code
Added 2003-06-23 by GeorgZ
If you want to make changes to all spells,
check x2_inc_spellhook.nss to find out more
*/
if (!X2PreSpellCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
effect eVis = EffectVisualEffect(VFX_IMP_KNOCK);
int nCnt = 1;
object oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
while(GetIsObjectValid(oTrap) && GetDistanceToObject(oTrap) <= 30.0)
{
if(GetIsTrapped(oTrap))
{
SetTrapDetectedBy(oTrap, OBJECT_SELF);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetLocation(oTrap));
object oCaster = OBJECT_SELF;
int nDC = GetTrapDisarmDC(oTrap);
int nLevel = GetCasterLevel(oCaster);
int nRandom = d20()+ nLevel;
string sTrap = GetName(oTrap);
if(nRandom >= nDC)
{
if(GetObjectType(oTrap) == OBJECT_TYPE_TRIGGER)
SendMessageToPC(oCaster, "You have successfully disabled the " + sTrap + "");
else
SendMessageToPC(oCaster, "You have successfully disabled the trap on the " + sTrap + "");
// For respawning trap code...
SetLocalInt(oTrap, "DISARMED_BY_SPELL", TRUE);
DelayCommand(2.0, SetTrapDisabled(oTrap));
}
else
{
if(GetObjectType(oTrap) == OBJECT_TYPE_TRIGGER)
SendMessageToPC(oCaster, "You have detected " + sTrap + " but are unable to disable it");
else
SendMessageToPC(oCaster, "You have detected the trap on the " + sTrap + " but are unable to disable it");
}
}
nCnt++;
oTrap = GetNearestObject(OBJECT_TYPE_TRIGGER | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
}
}

View File

@@ -0,0 +1,24 @@
//:: plchb_trap_spawn.nss
#include "inc_debug"
void main()
{
/* // Check if the placeable object is valid
object oPlaceable = OBJECT_SELF;
if (!GetIsObjectValid(oPlaceable)) return;
// Spawn a waypoint at the placeable's location
location loc = GetLocation(oPlaceable);
object oWaypoint = CreateObject(OBJECT_TYPE_WAYPOINT, "rand_trap_loc", loc);
// Check if the waypoint is valid
if (!GetIsObjectValid(oWaypoint))
{
// Output an error message if waypoint creation fails
if (DEBUG) SendMessageToPC(GetFirstPC(), "Error: Unable to create waypoint at location!");
return;
}
// Destroy the placeable object
DestroyObject(oPlaceable, 1.5); */
}

View File

@@ -0,0 +1,3 @@
void main()
{
}

View File

@@ -0,0 +1,60 @@
//:: plcused_portal.nss
//::
//:: Reads destination waypoint from string var "DESTINATION" on self
//::
void ClearAndJumpToObject(object oDestination);
void ClearAndJumpToObject(object oDestination)
{
ClearAllActions();
JumpToObject(oDestination);
}
void main()
{
object oSelf = OBJECT_SELF;
int nHench;
object oHench;
effect eVFX;
object oTarget;
string sDestination = GetLocalString(oSelf, "DESTINATION");
// Get the creature who triggered this event.
object oPC = GetLastUsedBy();
// Find the location to which to teleport.
oTarget = GetWaypointByTag(sDestination);
// Save the PC's current location for the return trip.
SetLocalLocation(oPC, "ls_stored_loc", GetLocation(oPC));
// Teleport the PC.
eVFX = EffectVisualEffect(VFX_IMP_UNSUMMON);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oPC);
DelayCommand(3.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));
// Also teleport associates (but no visual effect for them).
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
// Support for multiple henchmen (includes horses).
nHench = 1;
oHench = GetHenchman(oPC, 1);
while ( oHench != OBJECT_INVALID )
{
DelayCommand(3.1, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
// Next henchman.
oHench = GetHenchman(oPC, ++nHench);
}
// Apply a visual effect.
eVFX = EffectVisualEffect(VFX_COM_HIT_NEGATIVE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSelf);
}

View File

@@ -27,7 +27,7 @@
const int DEBUG_MODE = FALSE;
// DEBUG - TRUE or FALSE(Set to TRUE by default - Visual effect for trap creation)
const int DO_EFFECTS = TRUE;
const int DO_EFFECTS = FALSE;
// Area trap respawner timer
// When a player enters the area objects are scanned and trapped, if set

View File

@@ -69,6 +69,81 @@ void SetCampSpawn(object oCamp, string sCamp, location lCamp)
// Place Custom Camps Here
// -------------------------------------------
//:: Boneklaw patrol
if (sCamp == "boneklaw_patrol")
{
//:: Set Number of Placeables
int nPlcNum = 0;
SetLocalInt(oCamp, "CampNumP", nPlcNum);
//:: Set Number of Creatures
int nSpawnNum = 2 + nDifficulty + d3(2);
SetLocalInt(oCamp, "CampNumC", nSpawnNum);
//:: Set Radius of Camp
SetLocalFloat(oCamp, "CampRadius", 10.0);
// Set Creature 0 to be Trigger
// Script 00 : Kill him and the Camp Despawns
// SetLocalString(oCamp, "CampTrigger", "C0");
// SetLocalInt(oCamp, "CampTriggerScript", 0);
//:: Set Placeable 0 to be Camp Center
SetLocalString(oCamp, "CampCenter", "P0");
//:: Set Placeable 0 and Spawn Flags
//:: First Placeable always Spawns at Center of Camp
//:: If CampCenter Is Not Set
//SetLocalString(oCamp, "CampP0", "poa_corpse001");
//SetLocalString(oCamp, "CampP0_Flags", "SP_SF");
// Set Creature 0 and Spawn Flags
SetLocalString(oCamp, "CampC0", "grp_boneklaw");
SetLocalString(oCamp, "CampC0_Flags", "SP_RW_SG");
// Set Creature 1 and Spawn Flags
SetLocalString(oCamp, "CampC1", "grp_boneklaw");
SetLocalString(oCamp, "CampC1_Flags", "SP_RW_SG");
// Set Creature 2 and Spawn Flags
SetLocalString(oCamp, "CampC2", "grp_boneklaw");
SetLocalString(oCamp, "CampC2_Flags", "SP_RW_SG");
// Set Creature 3 and Spawn Flags
SetLocalString(oCamp, "CampC3", "grp_boneklaw");
SetLocalString(oCamp, "CampC3_Flags", "SP_RW_SG");
// Set Creature 4 and Spawn Flags
SetLocalString(oCamp, "CampC4", "grp_boneklaw");
SetLocalString(oCamp, "CampC4_Flags", "SP_RW_SG");
// Set Creature 5 and Spawn Flags
SetLocalString(oCamp, "CampC5", "grp_boneklaw");
SetLocalString(oCamp, "CampC5_Flags", "SP_RW_SG");
// Set Creature 6 and Spawn Flags
SetLocalString(oCamp, "CampC6", "grp_boneklaw");
SetLocalString(oCamp, "CampC6_Flags", "SP_RW_SG");
// Set Creature 7 and Spawn Flags
SetLocalString(oCamp, "CampC7", "grp_boneklaw");
SetLocalString(oCamp, "CampC7_Flags", "SP_RW_SG");
// Set Creature 8 and Spawn Flags
SetLocalString(oCamp, "CampC8", "grp_boneklaw");
SetLocalString(oCamp, "CampC8_Flags", "SP_RW_SG");
// Set Creature 9 and Spawn Flags
SetLocalString(oCamp, "CampC9", "grp_boneklaw");
SetLocalString(oCamp, "CampC9_Flags", "SP_RW_SG");
// Set Creature 10 and Spawn Flags
SetLocalString(oCamp, "CampC10", "grp_boneklaw");
SetLocalString(oCamp, "CampC10_Flags", "SP_RW_SG");
}
//:: Boneklaw patrol
//:: Ghouls, Ghasts & supper
if (sCamp == "ghoul_feast")
{

View File

@@ -1737,8 +1737,8 @@ HUNEFER002 - Hunefer: 54 HD / CR75
break;
}
//
// Spawn Something up to CR 11-14
case 11: case 12: case 13: case 14:
// Spawn Something up to CR 11-18
case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18:
sRetTemplate = "nw_mummyboss"; //:: Mummy Lord: 12 HD / CR11
break;
//
@@ -2062,13 +2062,13 @@ HUNEFER002 - Hunefer: 54 HD / CR75
// Select a Creature to Spawn
switch (nAveragePCLevel)
{
// Spawn Something up to CR 7
case 1: case 2: case 3: case 4: case 5: case 6: case 7:
// Spawn Something up to CR 10
case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10:
sRetTemplate = "nw_wraith"; //:: Wraith: 05 HD / CR7
break;
//
// Spawn Something up to CR 14
case 8: case 9: case 10: case 11: case 12: case 13: case 14:
// Spawn Something up to CR 16
case 11: case 12: case 13: case 14: case 15: case 16:
sRetTemplate = "ar_wraith002"; //:: Wraith: 10 HD / CR14
break;
//

View File

@@ -37,6 +37,12 @@ const int EVENT_USER_DEFINED_POSTSPAWN = 1511;
#include "nwnx_webhook"
#include "nwnx_util"
void Embiggen(object oNPC, float fIncrease);
void Embiggen(object oNPC, float fIncrease)
{
SetObjectVisualTransform(OBJECT_SELF, OBJECT_VISUAL_TRANSFORM_SCALE, fIncrease);
}
void main()
{
@@ -136,7 +142,37 @@ void main()
int nHunefer = GetStringLeft(GetTag(OBJECT_SELF), 7) == "HUNEFER" ? TRUE : FALSE;
if(nHunefer)ExecuteScript("fear2_aura",OBJECT_SELF);
//:: Make a creature a little bigger.
int nEmbiggen = GetLocalInt(OBJECT_SELF,"EMBIGGEN");
if (nEmbiggen > 0)
{
float fIncrease = (IntToFloat(nEmbiggen)+100.0) / 100.0;
DelayCommand(0.0f, Embiggen(OBJECT_SELF, fIncrease));
}
//:: Handle various onspawn immunities & buffs
//:: Shadows should be unaffected by darkness
int nShadow1 = GetStringLeft(GetTag(OBJECT_SELF), 9) == "NW_SHADOW" ? TRUE : FALSE;
if(nShadow1)
{
effect eUltraVis = EffectUltravision();
eUltraVis = SupernaturalEffect(eUltraVis);
eUltraVis = ExtraordinaryEffect(eUltraVis);
eUltraVis = UnyieldingEffect(eUltraVis);
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eUltraVis,OBJECT_SELF));
}
int nShadow2 = GetStringLeft(GetTag(OBJECT_SELF), 6) == "SHADOW" ? TRUE : FALSE;
if(nShadow2)
{
effect eUltraVis = EffectUltravision();
eUltraVis = SupernaturalEffect(eUltraVis);
eUltraVis = ExtraordinaryEffect(eUltraVis);
eUltraVis = UnyieldingEffect(eUltraVis);
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eUltraVis,OBJECT_SELF));
}
int nNoStun = GetLocalInt(OBJECT_SELF,"NOSTUN");
if (nNoStun > 0)
{
@@ -510,6 +546,17 @@ void main()
DelayCommand(0.0f, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eVis,OBJECT_SELF));
}
//:: If Incorporeal, apply changes
if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE)
{
effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL);
eConceal = ExtraordinaryEffect(eConceal);
effect eGhost = EffectCutsceneGhost();
eGhost = ExtraordinaryEffect(eGhost);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF);
}
//:: Execute OnSpawn script.
int nSpider = GetStringLeft(GetTag(OBJECT_SELF), 12) == "MONST_SPIDER" ? TRUE : FALSE;