I use some events that change unit values (like air_attack and so), but some units do not get these boni and some units get more than they should (if i change air_attack for escorft fighter brigades, some of the bomber units also get the boni). Examing the savegame, i noticed that the unit values are stored for each unit separately in the savegame. I think it would be better to store all unit values globally for each division/brigade type, model and country (except for strength, maxstrength and organization) - this would also save space in savegames.
Example:
Current save:
Proposed fix:
Example:
Current save:
Code:
country = {
tag = ENG
#many lines of code
division = {
id = { type = 12700 id = 5 }
name = "5th Infantry Division"
model = 1
brigade_model = 0
type = infantry
strength = 100.0000
organisation = 52.0000
morale = 70.0000
experience = 0.0000
defaultorganisation = 50.0000
redep_unit_name = ""
supplies = 11.1983
oil = 0.0000
max_supply_stock = 11.2000
max_oil_stock = 0.0000
maxspeed = 4.0000
supplyconsumption = 0.8000
fuelconsumption = 0.0000
defensiveness = 15.0000
toughness = 12.0000
softness = 100.0000
suppression = 2.0000
airdefence = 3.0000
softattack = 10.0000
hardattack = 1.0000
transportweight = 8.0000
airattack = 2.0000
speed_cap_art = 6.0000
speed_cap_eng = 6.0000
speed_cap_aa = 6.0000
speed_cap_at = 6.0000
artillery_bombardment = 0.0000
}
Code:
country = {
tag = ENG
#many lines of code
division_values = {
infantry = {
model = {
maxspeed = 4.0000
supplyconsumption = 0.8000
fuelconsumption = 0.0000
defensiveness = 15.0000
toughness = 12.0000
softness = 100.0000
suppression = 2.0000
airdefence = 3.0000
softattack = 10.0000
hardattack = 1.0000
transportweight = 8.0000
airattack = 2.0000
speed_cap_art = 6.0000
speed_cap_eng = 6.0000
speed_cap_aa = 6.0000
speed_cap_at = 6.0000
artillery_bombardment = 0.0000
}
model = {
#model 1 stats and so on
}
}
#many lines of code
division = {
id = { type = 12700 id = 5 }
name = "5th Infantry Division"
model = 1
brigade_model = 0
type = infantry
strength = 100.0000
organisation = 52.0000
morale = 70.0000
experience = 0.0000
redep_unit_name = ""
supplies = 11.1983
oil = 0.0000
max_supply_stock = 11.2000
max_oil_stock = 0.0000
}
Upvote
0