2025/12/15 Update

Updated PEPS
Hooked up new PRC8 GUI event.
Updated nim tools.
Updated readme.
This commit is contained in:
Jaysyn904
2025-12-15 21:37:12 -05:00
parent d897e0c598
commit e0803385be
1191 changed files with 139110 additions and 35267 deletions

View File

@@ -94,6 +94,7 @@ void ai_ClearCreatureActions(int bClearCombatState = FALSE)
void ai_SetLastAction(object oCreature, int nAction = AI_LAST_ACTION_NONE)
{
SetLocalInt(oCreature, sLastActionVarname, nAction);
SetLocalInt(oCreature, sLastActionTimeVarname, ai_GetCurrentTimeStamp());
}
int ai_CompareLastAction(object oCreature, int nAction)
{
@@ -105,6 +106,7 @@ int ai_CompareLastAction(object oCreature, int nAction)
}
void ai_SetListeningPatterns(object oCreature)
{
SetListening(oCreature, TRUE);
SetListenPattern(oCreature, AI_I_SEE_AN_ENEMY, AI_ALLY_SEES_AN_ENEMY);
SetListenPattern(oCreature, AI_I_HEARD_AN_ENEMY, AI_ALLY_HEARD_AN_ENEMY);
SetListenPattern(oCreature, AI_ATKED_BY_WEAPON, AI_ALLY_ATKED_BY_WEAPON);
@@ -114,7 +116,6 @@ void ai_SetListeningPatterns(object oCreature)
SetListenPattern(oCreature, AI_I_AM_DISEASED, AI_ALLY_IS_DISEASED);
SetListenPattern(oCreature, AI_I_AM_POISONED, AI_ALLY_IS_POISONED);
SetListenPattern(oCreature, AI_I_AM_WEAK, AI_ALLY_IS_WEAK);
SetListening(oCreature, TRUE);
}
int ai_IsNonliving(int nRacialType)
{
@@ -134,12 +135,12 @@ int ai_GetIsInCombat(object oCreature)
}
void ai_SetCombatRound(object oCreature)
{
SetLocalInt(oCreature, "AI_COMBAT_ROUND_START", SQLite_GetTimeStamp());
if(AI_DEBUG) ai_Debug("0i_states_cond", "116", " ===============> " + GetName(oCreature) + " ROUND START:" + IntToString(SQLite_GetTimeStamp()) + " <===============");
SetLocalInt(oCreature, "AI_COMBAT_ROUND_START", ai_GetCurrentTimeStamp());
if(AI_DEBUG) ai_Debug("0i_states_cond", "116", " ===============> " + GetName(oCreature) + " ROUND START:" + IntToString(ai_GetCurrentTimeStamp()) + " <===============");
}
void ai_EndCombatRound(object oCreature)
{
if(AI_DEBUG) ai_Debug("0i_states_cond", "120", " ===============> " + GetName(oCreature) + " ROUND END:" + IntToString(SQLite_GetTimeStamp()) + " <===============");
if(AI_DEBUG) ai_Debug("0i_states_cond", "120", " ===============> " + GetName(oCreature) + " ROUND END:" + IntToString(ai_GetCurrentTimeStamp()) + " <===============");
DeleteLocalInt(oCreature, "AI_COMBAT_ROUND_START");
}
int ai_IsInCombatRound(object oCreature, int nCombatRound = AI_COMBAT_ROUND_IN_SECONDS)
@@ -148,10 +149,10 @@ int ai_IsInCombatRound(object oCreature, int nCombatRound = AI_COMBAT_ROUND_IN_S
if(AI_DEBUG) ai_Debug("0i_states_cond", "148", " nCombatRoundStart: " + IntToString(nCombatRoundStart));
if(!nCombatRoundStart) return FALSE;
// New combat round calculator. If 6 seconds has passed then we are on a new round!
int nSQLTime = SQLite_GetTimeStamp();
int nCombatRoundTime = nSQLTime - nCombatRoundStart;
if(AI_DEBUG) ai_Debug("0i_states_cond", "153", " SQLite_GetTimeStamp: " + IntToString(nSQLTime) +
"(" + IntToString(nSQLTime - nCombatRoundStart) + ")");
int nTime = ai_GetCurrentTimeStamp();
int nCombatRoundTime = nTime - nCombatRoundStart;
if(AI_DEBUG) ai_Debug("0i_states_cond", "153", " nTime + (nTime - Round Start): " + IntToString(nTime) +
"(" + IntToString(nTime - nCombatRoundStart) + ")");
if(nCombatRoundTime < nCombatRound) return TRUE;
ai_EndCombatRound(oCreature);
return FALSE;
@@ -200,9 +201,11 @@ int ai_Disabled(object oCreature)
effect eEffect = GetFirstEffect(oCreature);
while(GetIsEffectValid(eEffect))
{
switch(GetEffectType(eEffect))
switch(GetEffectType(eEffect, TRUE))
{
WriteTimestampedLogEntry("Effect Type: " + IntToString(GetEffectType(eEffect, TRUE)));
case EFFECT_TYPE_DOMINATED :
case EFFECT_TYPE_CUTSCENE_DOMINATED :
{
if(!GetCommandable(oCreature)) SetCommandable(TRUE, oCreature);
return FALSE;
@@ -213,6 +216,7 @@ int ai_Disabled(object oCreature)
case EFFECT_TYPE_CONFUSED :
case EFFECT_TYPE_FRIGHTENED :
case EFFECT_TYPE_PARALYZE :
case EFFECT_TYPE_CUTSCENE_PARALYZE :
case EFFECT_TYPE_TURNED :
case EFFECT_TYPE_CHARMED :
case EFFECT_TYPE_PETRIFY :