Jump to content

ActionOverride doesn't work on the dead

Recommended Posts

It's probably well known already, but just for completeness sake:

verified via this block in bg2 ar4000.bcs (tob start)

    RESPONSE #100
        ActionOverride("drim02", JumpToPoint([1000.1750]))
        ActionOverride(Player1, JumpToPoint([1000.1750]))
        ActionOverride("drim02", DisplayStringHead(Myself,1))


Link to comment

Sorry, had to do some more testing for sleeping/helpless.

Both ACTSLEEP.IDS and INSTANT.IDS control which actions can be taken depending on whether the creature is sleeping, otherwise helpless, and/or dead.  

  • Sleeping creatures need the action to be listed in ACTSLEEP.IDS to attempt it.
  • Non-Sleeping, but still helpless creatures (held, web, etc...) need the action to be listed in INSTANT.IDS to attempt the action, but do not need the action listed in ACTSLEEP.IDS at all.
  • At least through ActionOverride(), dead creatures need the action to be listed in INSTANT.IDS to attempt the action, and also listed in ACTSLEEP.IDS to avoid crashing when they attempt it.  An action not listed in either won't be attempted while dead through ActionOverride, and therefor won't crash.  "Dead" creatures here applies to those with "STATE_DEAD".
  • Creatures with either "STATE_STONE_DEATH" or "STATE_FROZEN_DEATH" set without "STATE_DEAD", as far as I've seen, will not attempt actions unless they are listed in both ACTSLEEP.IDS and INSTANT.IDS (they aren't attempted, and therefor do not crash, if they're only listed in INSTANT.IDS).
  • Actions ordered upon a dead creature through the UI will be attempted (though likely fail), whether or not they are listed in INSTANT.IDS, and will crash if not listed in ACTSLEEP.IDS. Only example I'm aware of: It is possible to have a dead party member selected, and ordering them to move will crash unless the relevant movement actions have been added to ACTSLEEP.IDS.
  • Some actions can be added to either/both files and will function as expected, but I've never gone through and made a comprehensive list of which actions can/cannot be added.  Many of those actions can be attempted, but will still fail, usually those that require a valid target, as they cannot locate(dead) and/or reach(dead/helpless) said target.
  • The "Pause Target" effect (op165) has some oddities, such as frequently not performing any actions until after opening a menu (inventory, options, record, etc...), so I'm not certain about it's restrictions.

* Some of these may have exceptions - they're are too many actions to fully test.

Edited by kjeron
Link to comment

CHASE.IDS is a bit complicated — there are many edge cases and hardcoded exceptions. When a creature is in an area that is being unloaded, (for example, by all party members leaving a non-master area, or transitioning to a new master area), the engine allows creatures to follow the party to the new area. In general, if a creature is executing an action from CHASE.IDS while the area it is in is being unloaded, it is allowed to follow its target through the transition.

Link to comment
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...