Closed SpiritBaker closed 4 years ago
Were there any problems you observed? Looked through it and the original code should work?
First part was working partially, the second part was not working at all. Still testing it to be 100% sure. But the fix looks better so far.
The goal was to encourage the AI to build the forts be lined up further apart [x][ ][ ][x] instead of [x][ ][x]. Maybe reducing that factor to 0.8 would be better than removing it altogether?
Also does this have any functionality compared to the almost identical modifier:
modifier = {
factor = 0.6
any_neighbor_province = {
OR = {
has_building = fort_15th
has_building = fort_16th
has_building = fort_17th
has_building = fort_18th
}
}
NOT = { is_capital = yes }
}
No, there's no check for owned provinces. I think it was the original intend.
Doesn't that mean all that code does is reduce the factor of the AI building a fort near another fort owned by someone else?
I think Forts right on the border are generally bad, due to how zone of control is implemented.
So is [x][ ][x] better than [x][ ][ ][x]? I actually don't know the logic for one or the other?
And my reasons for changing the first one. With a Fix, AI is deleting owned forts that border each other. Essentially I just added AND, kinda hard to see in a generated preview.
modifier = {
factor = 0
any_neighbor_province = {
AND = {
owned_by = ROOT
OR = {
has_building = fort_15th
has_building = fort_16th
has_building = fort_17th
has_building = fort_18th
}
}
}
NOT = { is_capital = yes }
}
Shouldn't the AND be implied there? It's strange that it mattered there.
Was not sure myself, but apparently it's not.
any_
| Trigger | Requires valid trigger matches for one subscope in the set.
The set being the neighbor_provinces not the trigger conditional.
Also this, not sure what does this mean exactly
any_neighbor_province | any_neighbor_province = { } | Scopes to one province that shares a border (or sea zone?) with the current scope. | Multiple Subscopes No
Which part of that?
Multiple Subscopes No, part.
all_neighbor_province is what support multiple subscopes.
Actually it seems like the references to ROOT need to be replaced by FROM.
# FROM = owner # ROOT = province
Multiple subscopes refers to "Requires valid trigger matches for one subscope in the set."
So I made these edits based on your suggestions and got the AI to delete the 4 fort line in Constantinople region. I dozed off so I didn't see exactly when they did it but it happened all over, France, Portugal, etc.
Not sure if the second part was working at all.