I put a lot of traces in oolite-priorityai.js and in OOJSShip.m, and yesterday when I got attacked by police out of the blue I've got this in the Latest.log:
Code: Select all
21:38:10.130 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Considering branch with 9 entries, target:None
21:38:10.130 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Considering: entry 0
21:38:10.130 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Considering: entry 1
21:38:10.130 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Conditions met
21:38:10.130 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Executing behaviour
21:38:10.364 [dybal.trace]: OOJSShip, GalCop Sheriff: FIR483-QU1 target set to player <== this one attacked me later
21:38:10.365 [dybal.trace]: OOJSShip, GalCop Viper: SGJ299-QU1 target set to player
21:38:10.631 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Considering branch with 9 entries, target:None
21:38:10.631 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Considering: entry 0
21:38:10.632 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Considering: entry 1
21:38:10.632 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Conditions met
21:38:10.632 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Viper Interceptor: MHY368-QU1: Executing behaviour
<...>
21:38:29.806 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Sheriff: FIR483-QU1: Considering branch with 9 entries, target:Adder: Fool's Bait
21:38:29.806 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Sheriff: FIR483-QU1: Considering: entry 0
21:38:29.807 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Sheriff: FIR483-QU1: Considering: entry 1
21:38:29.807 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Sheriff: FIR483-QU1: Conditions met
21:38:29.807 [oolite-libPriorityAI]: dybal: AI 'Oolite Police AI', configurationAcquireCombatTarget: GalCop Sheriff: FIR483-QU1 already have player ship as target
21:38:29.807 [oolite-libPriorityAI]: _reconsiderList: AI 'Oolite Police AI', GalCop Sheriff: FIR483-QU1: Executing behaviour
21:38:29.807 [oolite-libPriorityAI]: dybal: AI 'Oolite Police AI', behaviourDestroyCurrentTarget: GalCop Sheriff: FIR483-QU1 asks for help against player
21:38:29.807 [oolite-libPriorityAI]: dybal: AI 'Oolite Police AI', responseComponent_standard_helpRequestReceived: GalCop Sheriff: FIR483-QU1 adds player ship to defense targets due to help request from GalCop Sheriff: FIR483-QU1
21:38:29.807 [dybal.trace]: OOJSShip.ShipAddDefenseTarget, adding player ship to GalCop Sheriff: FIR483-QU1 defense targets
21:38:29.807 [dybal.trace]: addDefenseTarget: GalCop Sheriff: FIR483-QU1 (police) added player as defense target
21:38:29.808 [oolite-libPriorityAI]: dybal: AI 'Oolite Police AI', responseComponent_standard_helpRequestReceived: GalCop Viper Interceptor: RBZ805-QU1 adds player ship to defense targets due to help request from GalCop Sheriff: FIR483-QU1
Code: Select all
{ // 1
condition: ai.conditionInCombat,
configuration: ai.configurationAcquireCombatTarget,
behaviour: ai.behaviourDestroyCurrentTarget,
reconsider: 5
},
That leads to two questions:
- a) Why the player ship became (and stayed) the Viper target: I didn't try to put traces in the core game for when the player ship becomes a ship's target, but I put something in OOJSShip.m for when that was done by a script, and some script assigned the player ship as the [Viper that started the attack]'s target 19s before the attack
- b) Why conditionInCombat turned true then (the Viper patrol was attacking a fugitive for some time): looking at PriorityAIController.prototype.conditionInCombat, it would return true if the cached value (set in previous run of the same function) was true or if the alertCondition turned red. Since this condition occurs only in that entry in the priority list in the policeAI, any time that cache were initialized as true while the player was the ship's target would already have started an attack, so it must have been a change to red alert, but as far as I could see there was no direct attack on that ship