OSP Code Combat Lancers: Use the right weapon! Battle edition

Users who are viewing this thread

... it's not possible to edit the mission_templates with notepad or wordpad, is it? Because I think I just resoled my own problem. I still haven't gotten it to work, but I just got to think about this.
 
I have noticed an interesting pattern when testing the Caba`drin’s fix for lancers. It works as intended if we face a purely infantry army: all lancers try to use their lances and switch to back-up weapons if dehorsed. But if the enemy army has at least one cavalry unit, our dehorsed lancers will pull out their lances when it’s near and will not switch back to their back-up weapons even after the last enemy cavalry unit is killed.
 
Alex Kit said:
I have noticed an interesting pattern when testing the Caba`drin’s fix for lancers. It works as intended if we face a purely infantry army: all lancers try to use their lances and switch to back-up weapons if dehorsed. But if the enemy army has at least one cavalry unit, our dehorsed lancers will pull out their lances when it’s near and will not switch back to their back-up weapons even after the last enemy cavalry unit is killed.

Hrm. Odd. I've not noticed this. The script is not telling a dehorsed lancer to equip their lance once on the ground...that must be Native AI decision-making.

To force dehorsed lancers to maintain their sidearm, simply comment this line out of the mission_template trigger:
(agent_set_slot, ":agent", slot_agent_lance, 0), # No longer a lancer

That way, the trigger will always check a dehorsed lancer and ensure they are not using their lance, rather than only checking them once after they have been dehorsed.
 
You must be correct about the conflict with the native behaviour. After commenting that line out they just stay and switch to and from their back-up weapons. Looks funny.

 
Back
Top Bottom