Hey guys.
It seems to me and some fellows here that things returned by agent_get_combat_state would be interesting and useful. So I've done some tests to try out some of the return values. Here's the list:
cs_free = 0
cs_target_in_sight = 1 # ranged units
cs_guard = 2 # no shield
cs_wield = 3 # reach out weapon, preparing to strike, melee units
cs_fire = 3 # ranged units
cs_swing = 4 # cut / thrust, melee units
cs_load = 4 # crossbow units
cs_still = 7 # melee units, happens, not always (seems to have something to do with the part of body hit), when hit
cs_no_visible_targets = 7 # ranged units
cs_target_on_right_hand_side = 8 # horse archers
Add this list into your module_constants.py, and it can be good reference, I think.
It's reasonable to infer that there must be states numbered 5 and 6, but no matter how many times I tried, I could see no agent in any of these two states.
One more thing: this does not apply to player. It only returns 0 for player agent.
It seems to me and some fellows here that things returned by agent_get_combat_state would be interesting and useful. So I've done some tests to try out some of the return values. Here's the list:
cs_free = 0
cs_target_in_sight = 1 # ranged units
cs_guard = 2 # no shield
cs_wield = 3 # reach out weapon, preparing to strike, melee units
cs_fire = 3 # ranged units
cs_swing = 4 # cut / thrust, melee units
cs_load = 4 # crossbow units
cs_still = 7 # melee units, happens, not always (seems to have something to do with the part of body hit), when hit
cs_no_visible_targets = 7 # ranged units
cs_target_on_right_hand_side = 8 # horse archers
Add this list into your module_constants.py, and it can be good reference, I think.
It's reasonable to infer that there must be states numbered 5 and 6, but no matter how many times I tried, I could see no agent in any of these two states.
One more thing: this does not apply to player. It only returns 0 for player agent.