Any idea how to implement AI restriction on producing units?
Nevermind, I'm stupid, I just realized my mistake lol
So another question. Can you do something like this?: has_manpower > deployed_army_manpower_k - 100000
Or it's not possible at all?
Nevermind, I'm stupid, I just realized my mistake lol
So another question. Can you do something like this?: has_manpower > deployed_army_manpower_k - 100000
Or it's not possible at all?
Pufiadagaddt
Hello. I am new to modding as a whole, and was thinking about limiting Germany to stop producing new divisions once it reaches a certain manpower pool. The logic I was trying to use was: if available manpower < deployed army manpower then I put a negative to every role ratio.
It was a half success. Germany did stop producing units after it hit the 1 million deployed manpower, but the abort part never kicks in, despite Germany having double the amount of available manpower than deployed manpower. I do understand that "deployed_army_manpower_k" is a variable and not a trigger, but the official wiki wrote that "has_manpower" can take a variable as argument.
GER_stop_producing_units = {
allowed = {
original_tag = GER
}
enable = {
has_army_manpower = {
size > 1000000
}
}
abort = {
has_manpower < deployed_army_manpower_k
}
ai_strategy = {
type = role_ratio
id = garrison
value = -300
}
ai_strategy = {
type = role_ratio
id = paratroopers
value = -300
}
ai_strategy = {
type = role_ratio
id = mountaineers
value = -300
}
ai_strategy = {
type = role_ratio
id = marines
value = -300
}
ai_strategy = {
type = role_ratio
id = cavalry
value = -300
}
ai_strategy = {
type = role_ratio
id = motorized
value = -300 #because doctrine this = 1
}
ai_strategy = {
type = role_ratio
id = anti_armor
value = -300
}
ai_strategy = {
type = role_ratio
id = mechanized
value = -300 #because doctrine this = 0
}
ai_strategy = {
type = role_ratio
id = armor
value = -300 #because doctrine this = 3
}
ai_strategy = {
type = role_ratio
id = infantry
value = -300 #88 to 70
}
}