Halp! Debug Mode gives me two overflow messages that I don't understand

When testing my module I of course have to resort to Debug Mode time and again. The last time I did that, it gave me two messages that I have no idea what to do about.

  1. Action List Overflow


The creature in question only has a heartbeat script that makes them sit down. The script looks like this:

void main()

if (IsInConversation(OBJECT_SELF) || GetIsInCombat()) return;

ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS, 0.5f, 999999.0f);


I copied it from another module way back when I had no idea what all these squiggles even mean, but I think it looks all right…? Is it the animation length? There are other creatures that have that as a heartbeat script and they don’t give this message.
It spams the dialogue window endlessly when in debug mode and goes away if I select the creature via the (.)key chooser and click “rest”.

  1. AI Update Time Overflow

This is really strange and I have no idea what it could possibly mean.

The script in question goes like this:

#include "nw_i0_generic"
void main()

object oPC = GetPCSpeaker();

CreateItemOnObject("ref_guild", GetPCSpeaker(), 1);

if (GetGender(oPC)==GENDER_FEMALE)
    object oSpot1 = GetWaypointByTag("CUTSC1_wp1");
    object oSpot2 = GetWaypointByTag("CUTSC1_wp2");
    object oSpot3 = GetWaypointByTag("CUTSC1_wp3");

    location lSpot1 = GetLocation(oSpot1);
    location lSpot2 = GetLocation(oSpot2);
    location lSpot3 = GetLocation(oSpot3);

    object oSpawnF1 = CreateObject(OBJECT_TYPE_CREATURE, "radiantheart1", lSpot1);
    object oSpawnF2 = CreateObject(OBJECT_TYPE_CREATURE, "radiantheart2", lSpot2);
    object oSpawnF3 = CreateObject(OBJECT_TYPE_CREATURE, "radiantheart3", lSpot3);


    object oSpot2 = GetWaypointByTag("CUTSC1_wp3");
    location lSpot2 = GetLocation(oSpot2);

    object oSpawnF2 = CreateObject(OBJECT_TYPE_CREATURE, "ariannenoble", lSpot2);


It spawns gender - specific NPCs and gives the PC an item. There is even nothing in the script about the creature tagged “bb_scarlett” (that’s just the person whose conversation the script is tacked on to).

Soo… what’s going on?

See. https://neverwintervault.org/forums/neverwinter-nights-1/nwn1-tech-qs/ai-update-time-overflow-error

Tl’dr: known issue, should not have any impact, just ignore it.

1 Like

Oooh. Phew. Thank you so much.

The first bit is not really that important, but the second bit is kinda crucial for the romance part of my module (which is some 60% of the module) so I got significantly panicked.

One problem the first bug does cause is that you can’t easily read any diagnostics in Debug Mode (dm_dumplocals, for example) if Action List Overflow messages are flooding in.

One source of the problem - walkwaypoints - can be fixed by disabling the call when no PCs are in the area:

if (GetAILevel(OBJECT_SELF) == AI_LEVEL_VERY_LOW) return;

However, there can be problems with sitting and animated creatures, which I haven’t fully resolved. These messages can be suppressed by clearing the actions of all creatures in the module. For EE, the script is

void zStopAll()
  object oArea;
  object oCreature;

oArea = GetFirstArea();

while (GetIsObjectValid(oArea))
    oCreature = GetFirstObjectInArea(oArea);

    while (GetIsObjectValid(oCreature))
        if (GetObjectType(oCreature) == OBJECT_TYPE_CREATURE)
          if (!GetIsPC(oCreature))
            AssignCommand(oCreature, ClearAllActions(TRUE));

        oCreature = GetNextObjectInArea(oArea);

    oArea = GetNextArea();

In 1.69, each area would need to be stopped explicitly, using the area tag.

This may have some unintended consequences, of course, so creatures need to be scripted so that they resume activities after this forced stop. The default walkwaypoints does that automatically.

I know this is old, but I thought this deserved a proper fix.
It looks to me as though the heartbeat script has the problem that it never checks to see if the creature is already sitting, but instead queues up another “sit” command regardless.
Try putting the following line just before the ActionPlayAnimation line in the heartbeat script:
if(GetCurrentAction()==ACTION_SIT) return;
That should stop the overflow problem.

1 Like