Another one - ai_will_do doesn't seem to be doing anything in cb_types (giving a factor of 0 if distance exceeds a certain value does not preclude a crusade, but putting the distance restriction in can_use does), despite being added to some of the new vanilla CBs, and crusade weights don't seem to have much of an effect, if any, at least in the fragmented world of Lux Invicta.
I finally got around to looking into this one. It doesn't have anything to do with the AI not looking at ai_will_do or the distance trigger not working. The problem is bad coding and using scopes for things they weren't made for. Any CB that is in title scope and has an attacker in the Root scope and a defender in the From scope will have this problem if you step into the Root scope, like this:
Code:
ai_will_do = {
factor = 1
modifier = {
factor = 0
ROOT = {
distance = {
who = FROM
value = 1000
}
}
}
The ROOT scope here isn't the real ROOT scope (which instead is the title) and thus have no FROM scope, so when you use FROM here it will instead point to itself, and the character will check the distance against itself...
Unfortunately this is a pretty big bug and I can't do such a big change on my own. Will have to wait for the CK2 lead to return from vacation to discuss this. To "fix" the problem wight now you can do something like this (I feel dirty just writing it):
Code:
ai_will_do = {
factor = 1
modifier = {
factor = 0
ROOT = {
PREV = {
FROM = {
distance = {
who = PREVPREV
value = 1000
}
}
}
}
}
- 4