The Beautiful Child

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
Dugi
Posts: 4865
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: The Beautiful Child

Post by Dugi » September 10th, 2018, 6:38 am

mattsc wrote:
September 8th, 2018, 3:05 pm
Alternatively, Dugi could work around this bug by removing the leader_shares_keep candidate action from sides that have more than one leader. Either way, we'll have this fixed for 1.14.5.
The problem is that leader_shares_keep is a part of the passive_leader_shares_keep property and that one is the only comfortable way to make a leader defend himself if attacked (instead of just retaliating) but also keeps him from rushing into battle and getting himself killed easily.

I think I will add a version check that checks if the version is 1.14.5 or higher and uses that option only then.

Btw, I did report the problem with AI crashing with two leaders (but I did no pin it to the keep sharing candidate action) a few years ago somewhere (I can't recall where) and assumed it was fixed because I could not replicate it in this scenario. Then, something else made the right circumstances possible.

mattsc
Posts: 1064
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: The Beautiful Child

Post by mattsc » September 10th, 2018, 1:36 pm

Dugi wrote:
September 10th, 2018, 6:38 am
The problem is that leader_shares_keep is a part of the passive_leader_shares_keep property and that one is the only comfortable way to make a leader defend himself if attacked (instead of just retaliating) but also keeps him from rushing into battle and getting himself killed easily.
Unless I misunderstand you, I don't think that's the case. There are three different parts to this:
  1. passive_leader is an AI aspect that disables all leader actions other than attacking adjacent enemies (well, and leader_goals, but that is irrelevant here).
  2. passive_leader_shares_keep is another aspect that enables the leader_shares_keep candidate action, so that the leader will make room for an allied close-by leader at the end of the AI turn (and move back to the keep at the beginning of the next turn), even if passive_leader=yes is set.
  3. Finally, there is the leader_shares_keep candidate action that performs the moving off the keep action.
Removing the CA only means that the leader never moves off the keep, independent of what either of those two aspects is set to, but it does not affect whether adjacent enemies are attacked. So, unless you specifically want this move off the keep behavior, it should be save to remove the candidate action.

EDIT: struck out part above that was wrong, due to me mis-reading the wiki

User avatar
Dugi
Posts: 4865
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: The Beautiful Child

Post by Dugi » September 11th, 2018, 9:06 am

mattsc wrote:
September 10th, 2018, 1:36 pm
Unless I misunderstand you, I don't think that's the case. There are three different parts to this: [...]
Maybe it changed, but in the past, it used to be that passive_leader does not even attack adjacent enemies.

mattsc
Posts: 1064
Joined: October 13th, 2010, 6:14 pm
Location: Wandering, mostly aimlessly

Re: The Beautiful Child

Post by mattsc » September 11th, 2018, 12:33 pm

Dugi wrote:
September 11th, 2018, 9:06 am
mattsc wrote:
September 10th, 2018, 1:36 pm
Unless I misunderstand you, I don't think that's the case. There are three different parts to this: [...]
Maybe it changed, but in the past, it used to be that passive_leader does not even attack adjacent enemies.
Hmm, yes, apparently the wiki is wrong about that. I just tested it and that is still the case — which is strange, I thought I'd cleaned up everything on that page (but at least it is consistent with my recollection then, I remembered it as you do).

However, the other parts of what I said are still true, the passive_leader_shares_keep aspect does not change that (and I tested that too now).

EDIT: Blargh, I'm an idiot. I completely mis-read the wiki. It clearly states that adjacent enemies are not attacked. Not sure what I was reading... Well, at least I feel better about not having made such a blatant mistake when I cleaned up that page.

Post Reply