Ran into this issue while running tests for an AI template mod.
Basically the AI manages to reach a target template perfectly if only those types actually used in the template are allowed, but as soon as even just additional support companies are allowed it messes up completely.
(Interesting part is in improved_infantry_nic, ignore infantry_nic. width_weight and all stat_weights set to 0.0 for testing.)
Here's the working as intended template file:
And we get this template:
Exactly as it should be, according to the target_template.
Now changing only the allowed_types for the improved_infantry_NIC template, to allow additional support companies:
And we get something like this:
The additional support company getting added to the template, even if it is not in the target_template I could put down to me not understanding how the system works / is supposed to work, but I can't imagine the AI freezing the template progression at roughly half the width of the target is working as intended.
To reproduce:
0. Save either the working or broken template file as templates_NIC.txt in /common/ai_templates/
1. Load the test_setup2 savegame
2. Use "tag nic", "human_ai", "ai_force_template"
3. Let the game run for ~2 months
DLC: -
Mods: Only as described in the post.
Basically the AI manages to reach a target template perfectly if only those types actually used in the template are allowed, but as soon as even just additional support companies are allowed it messes up completely.
(Interesting part is in improved_infantry_nic, ignore infantry_nic. width_weight and all stat_weights set to 0.0 for testing.)
Here's the working as intended template file:
Code:
infantry_NIC = {
target_width = 20.0
width_weight = 0.1
column_swap_factor = 0.5
stat_weights = {
0.00 #-- default_morale
0.00 #-- defense
1.00 #-- breakthrough
0.00 #-- hardness
4.00 #-- soft_attack
0.00 #-- hard_attack
0.00 #-- recon
1.00 #-- entrenchment
0.00 #-- initiative
0.00 #-- casualty_trickleback
0.00 #-- supply_consumption_factor
0.00 #-- supply_consumption
0.00 #-- suppression
0.00 #-- suppression_factor
0.00 #-- experience_loss_factor
#-- Air Values
0.00 #-- air_attack
#-- Common Values
0.60 #-- max_organisation
0.40 #-- max_strength
0.00 #-- build_cost_ic
0.00 #-- maximum_speed
0.00 #-- armor_value
0.20 #-- ap_attack
0.00 #-- reliability
0.00 #-- reliability_factor
0.00 #-- weight
}
target_template = {
weight = 0.9
match_value = 300.0
support = {
engineer = 1
recon = 1
field_hospital = 1
}
regiments = {
infantry = 3
}
}
allowed_types = {
infantry
engineer
recon
signal_company
field_hospital
logistics_company
anti_tank
military_police
artillery
# anti_air
rocket_artillery
anti_tank_brigade
artillery_brigade
rocket_artillery_brigade
# light_tank_destroyer_brigade
# medium_tank_destroyer_brigade
}
replace_at_match = 0.4
replace_with = better_infantry_NIC
target_min_match = 0.2
}
better_infantry_NIC = {
target_width = 20.0
width_weight = 0.0
column_swap_factor = 0.5
stat_weights = {
0.00 #-- default_morale
0.00 #-- defense
0.00 #-- breakthrough
0.00 #-- hardness
0.00 #-- soft_attack
0.00 #-- hard_attack
0.00 #-- recon
0.00 #-- entrenchment
0.00 #-- initiative
0.00 #-- casualty_trickleback
0.00 #-- supply_consumption_factor
0.00 #-- supply_consumption
0.00 #-- suppression
0.00 #-- suppression_factor
0.00 #-- experience_loss_factor
#-- Air Values
0.00 #-- air_attack
#-- Common Values
0.00 #-- max_organisation
0.00 #-- max_strength
0.00 #-- build_cost_ic
0.00 #-- maximum_speed
0.00 #-- armor_value
0.00 #-- ap_attack
0.00 #-- reliability
0.00 #-- reliability_factor
0.00 #-- weight
}
target_template = {
weight = 1.0
match_value = 300.0
support = {
engineer = 1
recon = 1
field_hospital = 1
}
regiments = {
infantry = 10
artillery_brigade = 4
}
}
allowed_types = {
infantry
engineer
recon
field_hospital
artillery_brigade
}
}
Exactly as it should be, according to the target_template.
Now changing only the allowed_types for the improved_infantry_NIC template, to allow additional support companies:
Code:
infantry_NIC = {
target_width = 20.0
width_weight = 0.1
column_swap_factor = 0.5
stat_weights = {
0.00 #-- default_morale
0.00 #-- defense
1.00 #-- breakthrough
0.00 #-- hardness
4.00 #-- soft_attack
0.00 #-- hard_attack
0.00 #-- recon
1.00 #-- entrenchment
0.00 #-- initiative
0.00 #-- casualty_trickleback
0.00 #-- supply_consumption_factor
0.00 #-- supply_consumption
0.00 #-- suppression
0.00 #-- suppression_factor
0.00 #-- experience_loss_factor
#-- Air Values
0.00 #-- air_attack
#-- Common Values
0.60 #-- max_organisation
0.40 #-- max_strength
0.00 #-- build_cost_ic
0.00 #-- maximum_speed
0.00 #-- armor_value
0.20 #-- ap_attack
0.00 #-- reliability
0.00 #-- reliability_factor
0.00 #-- weight
}
target_template = {
weight = 0.9
match_value = 300.0
support = {
engineer = 1
recon = 1
field_hospital = 1
}
regiments = {
infantry = 3
}
}
allowed_types = {
infantry
engineer
recon
signal_company
field_hospital
logistics_company
anti_tank
military_police
# artillery
# anti_air
rocket_artillery
anti_tank_brigade
artillery_brigade
rocket_artillery_brigade
# light_tank_destroyer_brigade
# medium_tank_destroyer_brigade
}
replace_at_match = 0.4
replace_with = better_infantry_NIC
target_min_match = 0.2
}
better_infantry_PAN = {
target_width = 20.0
width_weight = 0.0
column_swap_factor = 0.5
stat_weights = {
0.00 #-- default_morale
0.00 #-- defense
0.00 #-- breakthrough
0.00 #-- hardness
0.00 #-- soft_attack
0.00 #-- hard_attack
0.00 #-- recon
0.00 #-- entrenchment
0.00 #-- initiative
0.00 #-- casualty_trickleback
0.00 #-- supply_consumption_factor
0.00 #-- supply_consumption
0.00 #-- suppression
0.00 #-- suppression_factor
0.00 #-- experience_loss_factor
#-- Air Values
0.00 #-- air_attack
#-- Common Values
0.00 #-- max_organisation
0.00 #-- max_strength
0.00 #-- build_cost_ic
0.00 #-- maximum_speed
0.00 #-- armor_value
0.00 #-- ap_attack
0.00 #-- reliability
0.00 #-- reliability_factor
0.00 #-- weight
}
target_template = {
weight = 1.0
match_value = 300.0
support = {
engineer = 1
recon = 1
field_hospital = 1
}
regiments = {
infantry = 10
artillery_brigade = 4
}
}
allowed_types = {
infantry
engineer
recon
field_hospital
logistics_company
anti_tank
military_police
artillery
artillery_brigade
}
}
The additional support company getting added to the template, even if it is not in the target_template I could put down to me not understanding how the system works / is supposed to work, but I can't imagine the AI freezing the template progression at roughly half the width of the target is working as intended.
To reproduce:
0. Save either the working or broken template file as templates_NIC.txt in /common/ai_templates/
1. Load the test_setup2 savegame
2. Use "tag nic", "human_ai", "ai_force_template"
3. Let the game run for ~2 months
DLC: -
Mods: Only as described in the post.
Attachments
- 2
Upvote
0