Page 1 of 1

Problem with Actions.HouseRepairEnable

PostPosted: 24 Sep 2015, 18:58
by Strangelove
Hello,

i've noticed some problems with the Action Actions.HouseRepairEnable. It seems like it cant be used with AI players.

Here my observations:
I've deactivated the AutoRepair for the AI in the MapEditor, to only enable it later for specific houses and under specific conditions. However, the KaM Remake seems to disable it pretty much immidiatly again after i enabled it in the dynamic script (Builders move for like 1~2sec to the damaged building and then stop).
The same goes the other way around. If i activate AutoRepair in the Map Editor and disable it for a specific House with the Action Actions.HouseRepairEnable, the AI still repairs the House.
Is this intended or a bug?


Best regards,
Strangelove

Re: Problem with Actions.HouseRepairEnable

PostPosted: 28 Sep 2015, 12:27
by Lewin
It's unintentional. Houses periodically set their repair status to match the AI's configuration (since it could change). But this means you can set it individually for AI houses. I guess we need three states for global AI repair:
Force On
Force Off
Don't care

Re: Problem with Actions.HouseRepairEnable

PostPosted: 28 Sep 2015, 17:22
by Strangelove
Thanks for your replay. It seemed unintentional to me as well. Why do you actually focre update the set AI configuration that often, instead of just setting it after the house is finished building?

Re: Problem with Actions.HouseRepairEnable

PostPosted: 28 Sep 2015, 21:59
by Lewin
Thanks for your replay. It seemed unintentional to me as well. Why do you actually focre update the set AI configuration that often, instead of just setting it after the house is finished building?
As I said, the AI configuration could change. A script might want to globally enable/disable house repair for an AI after some event occurs (e.g. attack is beaten back). Or the autobuild AI might want to switch it on and off depending on how busy the labourers are (I don't think it does that though).

Maybe it would be best to only set it once when the house is built, and only set it again when the AI repair configuration changes.

Re: Problem with Actions.HouseRepairEnable

PostPosted: 14 Oct 2017, 10:17
by Strangelove
@Rey: Could you pleae look into that?

Re: Problem with Actions.HouseRepairEnable

PostPosted: 15 Oct 2017, 04:36
by Rey
Sure, I'll check it this week