This thread is meant for notes on every kind of issue related to scripting. If you found broken commands or other problems, or have suggestions for improvements Larian might consider to implement post it here:
For notes on the Editor itself go to:
EE Editor Problems/Bugs thread .

The following refers to char scripting:

1) Already mentioned somewhere else:
It would be very useful to be able to check if characters/items are in the field of sight of another character (as it is checked in terms of sneaking already). It could be implemented as an additional option for 'CharacterCanSee'.
EDIT: EE contains a call for that: 'IsFacing'. Now I know what Raze was talking about when I opened the CharacterCanSee thread (before EEE). smile

2) 'DelayReaction' does not work properly when used for WAITING or COMBAT. From my experience: it does not delay reactions for the time you define but for the whole fight. NPCs skipping turn for no reasons is probably related to that. There are several reactions in the 'DefaultCharacter' script that use 'DelayReaction' as an INTERRUPT action:
'Combat_AttackSetEnemy'
'Combat_AttackSetEnemyWithBowHack'
'Combat_MoveToSetEnemy'
'Combat_MoveOutOfSurfaces'
'Combat_TakeCover'
In most cases it is used 'OnMovementFailed'. So: if movement fails during one of these reactions the reaction won't be executed for the whole fight any more (if I'm right). And if there is no alternative action available the NPC has to skip turn. And it does not seem to be very unlikely to happen: If a reaction is delayed due to failed movement it will choose another reaction that probably fails in movement, so it's delayed too, and so on.
I wanted to use 'DelayReaction' to delay the 'Combat_Idle' reaction in the 'Base' file. But the idles were - different from my expectation - delayed for the whole fight, not only - in this case - for 10 seconds.

3) I noticed three Status (maybe there are more) that can't be removed by 'CharacterRemoveStatus': FROZEN, KNOCKED_DOWN and STUNNED. Maybe it works with 'CharacterConsume', using Potions, but I can't see a reason why it should not work with 'CharacterRemoveStatus' since other Status do.

4) 'CharacterUseItem' causes NPCs to stand still and do nothing when the object is removed after they started to execute the action (i. e.: started to move to the object) but before they reached and used it. I prevent that by using 'CharacterMoveTo' before 'CharacterUseItem', so it's guaranteed that no other NPC uses the item faster. And CharacerMoveTo does not cause issues if the object they move to gets removed before they reach it.

5) It would be a useful feature to be able to check character templates in 'CharacterGet'. It's already possible to check item templates in 'ItemGet'.

6) Unless I'm missing something:
Currently there is no check for characters having certain armor or shields equipped, only for weapons ('CharacterHasWeaponType'). For combat AI it would be helpful to be able to check these things.
EDIT: Shields can be checked by 'CharacterHasWeaponType'. Somehow missed it.
EDIT2: No, checking shields does not work.

7) The loop_bed animations don't work properly: the character lies way to high and does not regard the bed's direction (different from all the sit animations). The standard still animation for NPCs lying in beds works fine.

8) Knockdown does not override animations which is an animation override set for. The current animation is not getting replaced by the 'knockdown_fall', 'knockdown_loop' and 'knockdown_getup' animations. Probably it would make sense to handle Knockdown animations (when status applied) in the same way as the death, walk and run animation.
The strange thing is: If Knockdown gets applied before an AnimationOverride is set for the character nothing can override the knockdown animations as long as Knockdown is applied.
It would be great to have both: Status Knockdown overriding all animations (except death) and being able to override Knockdown animations if wanted.

That's all I have at the moment. smile

Last edited by Abraxas*; 16/11/16 08:42 PM.

My mods for DOS 1 EE: FasterAnimations - QuietDay - Samaritan