Skip to content

Commit

Permalink
Update 111a
Browse files Browse the repository at this point in the history
	#Naval rework
		- Added three new naval units, adjusted costs for all units. Coal required for steam ships and oil for end game ships.
		- Caravel is the tier one light ship just below Frigate, Screw Frigate is tier 3 light ship just after frigate and Carrack is the tier 1 capital ship.

	#Population growth
		- added state_mortality_wealth_mult bonus to three techs in the society tree.
		- tweaked native modifier to disable population growth/decline (This only affects decentralized nations) if the modifier is on a playable nation let me know.
		- Other slight tweaks.
  • Loading branch information
AndHope committed Jul 28, 2024
1 parent 48dad9e commit d90dddc
Show file tree
Hide file tree
Showing 26 changed files with 563 additions and 30 deletions.
35 changes: 35 additions & 0 deletions common/combat_unit_types/br_naval_flagship_combat_unit_types.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
### Flagship group

combat_unit_type_carrack = {
group = combat_unit_group_capital_ship

upkeep_modifier = {
goods_input_manowars_add = 1
}
battle_modifier = {
unit_offense_add = 10
unit_defense_add = 10
unit_morale_loss_add = 10
unit_convoy_raiding_mult = -0.5
}

unlocking_technologies = { }

combat_unit_image = {
trigger = {
has_culture_graphics = east_asian
}
texture = "gfx/unit_illustrations/capital_ships_carracks_east_asia.dds"
}

combat_unit_image = {
texture = "gfx/unit_illustrations/capital_ships_carracks.dds"
}

upgrades = {
combat_unit_type_man_o_war
}
}


combat_unit_type_man_o_war = {
group = combat_unit_group_capital_ship

Expand Down Expand Up @@ -34,6 +66,7 @@ combat_unit_type_ironclad = {
goods_input_ironclads_add = 3
goods_input_artillery_add = 3
goods_input_ammunition_add = 3
goods_input_coal_add = 1
}

battle_modifier = {
Expand Down Expand Up @@ -62,6 +95,7 @@ combat_unit_type_dreadnought = {
goods_input_artillery_add = 6
goods_input_ammunition_add = 6
goods_input_radios_add = 2
goods_input_coal_add = 2
}

battle_modifier = {
Expand Down Expand Up @@ -90,6 +124,7 @@ combat_unit_type_battleship = {
goods_input_artillery_add = 8
goods_input_ammunition_add = 8
goods_input_radios_add = 3
goods_input_oil_add = 2
}

battle_modifier = {
Expand Down
67 changes: 64 additions & 3 deletions common/combat_unit_types/br_naval_light_combat_unit_types.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
### Light ship group

combat_unit_type_caravel = {
group = combat_unit_group_light_ship

upkeep_modifier = {
goods_input_manowars_add = 0.5
}

battle_modifier = {
unit_offense_add = 5
unit_defense_add = 5
unit_morale_loss_add = 10
}

unlocking_technologies = { }

combat_unit_image = {
trigger = {
has_culture_graphics = east_asian
}
texture = "gfx/unit_illustrations/light_ships_caravels_east_asia.dds"
}

combat_unit_image = {
texture = "gfx/unit_illustrations/light_ships_caravels.dds"
}

upgrades = {
combat_unit_type_frigate
}

}

combat_unit_type_frigate = {
group = combat_unit_group_light_ship

Expand All @@ -22,19 +54,45 @@ combat_unit_type_frigate = {
}

upgrades = {
combat_unit_type_monitor
combat_unit_type_destroyer
combat_unit_type_torpedo_boat
combat_unit_type_screw_frigate
}
}

combat_unit_type_screw_frigate = {
group = combat_unit_group_light_ship

upkeep_modifier = {
goods_input_manowars_add = 1.5
goods_input_coal_add = 0.25
}

battle_modifier = {
unit_offense_add = 15
unit_defense_add = 15
unit_morale_loss_add = 8
unit_convoy_defense_mult = 0.10
}


unlocking_technologies = { screw_frigate }

combat_unit_image = {
texture = "gfx/unit_illustrations/light_ships_screw_frigates.dds"
}

upgrades = {
combat_unit_type_destroyer
}
}

combat_unit_type_monitor = {
group = combat_unit_group_light_ship

upkeep_modifier = {
goods_input_ironclads_add = 1
goods_input_artillery_add = 1
goods_input_ammunition_add = 1
goods_input_coal_add = 0.5
}

battle_modifier = {
Expand Down Expand Up @@ -62,6 +120,7 @@ combat_unit_type_destroyer = {
goods_input_ironclads_add = 2
goods_input_artillery_add = 2
goods_input_ammunition_add = 2
goods_input_coal_add = 1
}

battle_modifier = {
Expand Down Expand Up @@ -91,6 +150,7 @@ combat_unit_type_torpedo_boat = {
upkeep_modifier = {
goods_input_ironclads_add = 2
goods_input_explosives_add = 4
goods_input_coal_add = 1
}

battle_modifier = {
Expand Down Expand Up @@ -123,6 +183,7 @@ combat_unit_type_scout_cruiser = {
goods_input_ammunition_add = 3
goods_input_artillery_add = 3
goods_input_radios_add = 1
goods_input_oil_add = 1
}

battle_modifier = {
Expand Down
6 changes: 3 additions & 3 deletions common/defines/br_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ NPops = {
#COLONIAL_GROWTH_BASE_FACTOR = 0.00001 # Colonial growth generated by a state is ( total pops / 1000 ) * this * modifier from institution
#MIN_BASE_COLONIAL_GROWTH = 0.01 # Country base colonial growth from population cannot be lower than this
MAX_BASE_COLONIAL_GROWTH = 0.05 #was 0.1 # Country base colonial growth from population cannot be higher than this
MAX_COLONIAL_GROWTH = 0.005 #was 0.02 # Colonies can grow by this much at most per day
MAX_COLONIAL_GROWTH = 0.01 #was 0.02 # Colonies can grow by this much at most per day

}

Expand Down Expand Up @@ -114,13 +114,13 @@ NMilitary = {

BATTLE_RAW_MANPOWER_INFLICTED_CASUALTY_RATIO = 0.15 #0.50 # applied to the number of casualties caused by raw number of troops, ie without considering Offense/Defense - increasing this makes CE less important and battles more lethal
BATTLE_COMBAT_EFFICIENCY_INFLICTED_CASUALTY_RATIO = 0.5 #1.5 # applied to the number of casualties caused by troops with Offense/Defense also factored in - incre
BASE_MORALE_RECOVERED_PER_DAY = 0.015 #0.03 # Default morale recovered is 3% per day
BASE_MORALE_RECOVERED_PER_DAY = 0.01 #0.03 # Default morale recovered is 3% per day
BASE_MORALE_LOST_PER_DAY = 0.01 #0.05 # Default morale lost when out of supply is 5%
MANPOWER_LOST_DUE_TO_ATTRITION_PER_WEEK_MIN = 0.01 #0.04 # The minimum percentage of manpower a unit can lose each week due to attrition
MANPOWER_LOST_DUE_TO_ATTRITION_PER_WEEK_MAX = 0.04 #0.12 # The maximum percentage of manpower a unit can lose each week due to attrition

BATTLE_BASE_MIN_PROVINCES_TAKEN = 1 #4
BATTLE_BASE_MAX_PROVINCES_TAKEN = 5 #12
BATTLE_BASE_MAX_PROVINCES_TAKEN = 4 #12
#BATTLE_PROVINCES_TAKEN_FRONT_PROVINCES_NUM_DIVISOR = 25 # Attacker takes (num provinces in front) divided by this as extra, clamped to BATTLE_BASE_MIN_PROVINCES_TAKEN and BATTLE_BASE_MAX_PROVINCES_TAKEN
#BATTLE_PROVINCES_TAKEN_THEATER_PROVINCES_NUM_DIVISOR = 250 # Attacker takes (num provinces in theater) divided by this as extra, clamped to BATTLE_BASE_MIN_PROVINCES_TAKEN and BATTLE_BASE_MAX_PROVINCES_TAKEN
#BATTLE_PROVINCES_TAKEN_ATTACKING_UNIT_SCALE = 0.02 # Multiply provinces taken by ( 1 + this * number of attacking units left at end of battle)
Expand Down
100 changes: 100 additions & 0 deletions common/defines/br_pop_defines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

### Pop Growth Constants
## Base Values per month
@min_birthrate = 0.00130 #was 0.00055 # Minimum base birthrate per month (at POP_GROWTH_STABLE_SOL)
@max_birthrate = 0.00400 #was 0.00450 # Maximum base birthrate per month (at SOL = 0 if not modified by malnourishment)
@min_mortality = 0.00120 #was 0.00045 # Minimum base mortality per month (at POP_GROWTH_STABLE_SOL)
@max_mortality = 0.00600 #was 0.00600 # Maximum base mortality per month (at SOL = 0 if not modified by malnourishment)

## SoL Thresholds
@pop_growth_equilibrium_sol = 5 # Equilibrium is pops stop starving and where growth first becomes positive
@pop_growth_transition_sol = 11 #was 10 # Transition determines how long birthrate "lags" behind mortality before starting to drop. Setting to same as equilibrium leads to no "lag" (only matters for birthrate)
@pop_growth_max_sol = 15 #was 20 # Growth Max is where net growth generally is at it's highest (only matters for mortality)
@pop_growth_stable_sol = 22 #was 30 # Stable is where birthrate and mortality stop changing and hit their minimum values

## Others
@transition_birthrate_mult = 1.1 #was 1 # If you want the birthrate "lag" to go to a higher or lower value than max_birthrate. (you can also just change it directly below)
@max_growth_mortality_mult = 0.465 #was 0.35 # What proportion of birthrate_at_growth_max mortality should be at. Higher means lower growth

### Pop Growth Derived values
# Generally, for each one of these derived values below we're really just doing one of three operations (or combination of them):
# - Calculate a Point: sol * slope + start_value (x_at_y)
# - Calculate a Slope: (start_value - end_value) / number_of_steps (x_slope)
# - Calculate an Intercept: -slope*sol + end_value (x_intercept)
# Intercepts are only needed for line segments that don't start at 0 SoL

@birthrate_at_transition = @[max_birthrate*transition_birthrate_mult]
@rate_at_equilibrium = @[pop_growth_equilibrium_sol*((birthrate_at_transition-max_birthrate)/pop_growth_transition_sol)+max_birthrate] # determines both mortality and birthrate

## Mortality from 0 to pop_growth_equilibrium_sol
@mortality_starving_slope = @[(rate_at_equilibrium-max_mortality)/pop_growth_equilibrium_sol]

## Birthrate from 0 to pop_growth_transition_sol
@birthrate_pretransition_slope = @[(birthrate_at_transition-max_birthrate)/pop_growth_transition_sol]
# was @birthrate_pretransition_slope = @[(birthrate_at_transition-rate_at_equilibrium)/pop_growth_transition_sol] ; formula fixed

## Mortality from pop_growth_equilibrium_sol to pop_growth_max_sol
@birthrate_at_growth_max = @[(pop_growth_max_sol-pop_growth_transition_sol)*((min_birthrate-birthrate_at_transition)/(pop_growth_stable_sol-pop_growth_transition_sol))+birthrate_at_transition]
@mortality_at_growth_max = @[birthrate_at_growth_max*max_growth_mortality_mult]
@mortality_equilibrium_to_growth_max_slope = @[(mortality_at_growth_max-rate_at_equilibrium)/(pop_growth_max_sol-pop_growth_equilibrium_sol)]
@mortality_equilibrium_to_growth_max_intercept = @[-mortality_equilibrium_to_growth_max_slope*pop_growth_equilibrium_sol+rate_at_equilibrium]

## Birthrate from pop_growth_transition_sol to pop_growth_stable_sol
@birthrate_transition_slope = @[(min_birthrate-birthrate_at_transition)/(pop_growth_stable_sol-pop_growth_transition_sol)]
@birthrate_transition_intercept = @[-birthrate_transition_slope*pop_growth_stable_sol+min_birthrate]

## Mortality from pop_growth_max_sol to pop_growth_stable_sol
@mortality_growth_max_to_stable_slope = @[(min_mortality-mortality_at_growth_max)/(pop_growth_stable_sol-pop_growth_max_sol)]
@mortality_growth_max_to_stable_intercept = @[-mortality_growth_max_to_stable_slope*pop_growth_stable_sol+min_mortality]

### Pseudo algorithm to determine base Mortality / Birthrate
## Mortality
# if (sol < POP_GROWTH_EQUILIBRIUM_SOL)
# { mortality = sol * POP_GROWTH_MORTALITY_STARVING_SLOPE + POP_GROWTH_MAX_MORTALITY }
# else if (sol < POP_GROWTH_MAX_SOL)
# { mortality = sol * POP_GROWTH_MORTALITY_EQUILIBRIUM_TO_GROWTH_MAX_SLOPE + POP_GROWTH_MORTALITY_EQUILIBRIUM_TO_GROWTH_MAX_INTERCEPT }
# else if (sol < POP_GROWTH_STABLE_SOL)
# { mortality = sol * POP_GROWTH_MORTALITY_GROWTH_MAX_TO_STABLE_SLOPE + POP_GROWTH_MORTALITY_GROWTH_MAX_TO_STABLE_INTERCEPT }
# else { mortality = POP_GROWTH_MIN_MORTALITY }

## Birthrate
# if (sol < POP_GROWTH_EQUILIBRIUM_SOL)
# { birthrate = (sol * POP_GROWTH_BIRTHRATE_PRETRANSITION_SLOPE + POP_GROWTH_MAX_BIRTHRATE) * (1 - malnourishment * (POP_GROWTH_EQUILIBRIUM_SOL - sol)) }
# else if (sol < POP_GROWTH_TRANSITION_SOL)
# { birthrate = sol * POP_GROWTH_BIRTHRATE_PRETRANSITION_SLOPE + POP_GROWTH_MAX_BIRTHRATE }
# else if (sol < POP_GROWTH_STABLE_SOL)
# { birthrate = sol * POP_GROWTH_BIRTHRATE_TRANSITION_SLOPE + POP_GROWTH_BIRTHRATE_TRANSITION_INTERCEPT }
# else { birthrate = POP_GROWTH_MIN_BIRTHRATE }

NPops = {
## Birthrate
POP_GROWTH_BIRTHRATE_PRETRANSITION_SLOPE = @birthrate_pretransition_slope
POP_GROWTH_BIRTHRATE_TRANSITION_SLOPE = @birthrate_transition_slope
POP_GROWTH_BIRTHRATE_TRANSITION_INTERCEPT = @birthrate_transition_intercept

## Mortality
POP_GROWTH_MORTALITY_STARVING_SLOPE = @mortality_starving_slope
POP_GROWTH_MORTALITY_EQUILIBRIUM_TO_GROWTH_MAX_SLOPE = @mortality_equilibrium_to_growth_max_slope
POP_GROWTH_MORTALITY_EQUILIBRIUM_TO_GROWTH_MAX_INTERCEPT = @mortality_equilibrium_to_growth_max_intercept
POP_GROWTH_MORTALITY_GROWTH_MAX_TO_STABLE_SLOPE = @mortality_growth_max_to_stable_slope
POP_GROWTH_MORTALITY_GROWTH_MAX_TO_STABLE_INTERCEPT = @mortality_growth_max_to_stable_intercept

## Base Values
POP_GROWTH_MIN_BIRTHRATE = @min_birthrate # Minimum base birthrate per month (at POP_GROWTH_STABLE_SOL)
POP_GROWTH_MAX_BIRTHRATE = @max_birthrate # Maximum base birthrate per month (at SOL = 0 if not modified by malnourishment)
POP_GROWTH_MIN_MORTALITY = @min_mortality # Minimum base mortality per month (at POP_GROWTH_STABLE_SOL)
POP_GROWTH_MAX_MORTALITY = @max_mortality # Maximum base mortality per month (at SOL = 0 if not modified by malnourishment)

## SoL Thresholds
POP_GROWTH_EQUILIBRIUM_SOL = @pop_growth_equilibrium_sol # Equilibrium is pops stop starving and where growth first becomes positive
POP_GROWTH_TRANSITION_SOL = @pop_growth_transition_sol # Transition determines how long birthrate "lags" behind mortality before starting to drop. Setting to same as equilibrium leads to no "lag" (only matters for birthrate)
POP_GROWTH_MAX_SOL = @pop_growth_max_sol # Growth Max is where net growth generally is at it's highest (only matters for mortality)
POP_GROWTH_STABLE_SOL = @pop_growth_stable_sol # Stable is where birthrate and mortality stop changing and hit their minimum values
}
### End Pop Growth Constant defines

NPops = {
LOW_POP_THRESHOLD = 7500 #was 5000 # If a state has less than this amount of pops per arable land, apply the low pop modifier
HIGH_POP_THRESHOLD = 250000 #was 100000 # If a state has more than this amount of pops per arable land, apply the high pop modifier
}

1 change: 1 addition & 0 deletions common/history/countries/TAT - Tataria.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
activate_law = law_type:law_national_supremacy
activate_law = law_type:law_traditionalism
activate_law = law_type:law_tribal_armies
effect_native_conscription_3 = yes

add_modifier = {
name = br_modifier_nomad_heritage
Expand Down
4 changes: 4 additions & 0 deletions common/history/countries/kazak minors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
activate_law = law_type:law_oligarchy
activate_law = law_type:law_tribal_armies
activate_law = law_type:law_debt_slavery
effect_native_conscription_3 = yes


ig:ig_landowners = {
Expand Down Expand Up @@ -42,6 +43,7 @@
activate_law = law_type:law_oligarchy
activate_law = law_type:law_tribal_armies
activate_law = law_type:law_debt_slavery
effect_native_conscription_3 = yes


ig:ig_landowners = {
Expand Down Expand Up @@ -79,6 +81,7 @@
activate_law = law_type:law_oligarchy
activate_law = law_type:law_tribal_armies
activate_law = law_type:law_debt_slavery
effect_native_conscription_3 = yes


ig:ig_landowners = {
Expand Down Expand Up @@ -116,6 +119,7 @@
activate_law = law_type:law_oligarchy
activate_law = law_type:law_tribal_armies
activate_law = law_type:law_debt_slavery
effect_native_conscription_3 = yes


ig:ig_landowners = {
Expand Down
17 changes: 17 additions & 0 deletions common/history/military_formations/japan_military_formations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,23 @@ MILITARY_FORMATIONS = {
}
}

create_military_formation = {
type = fleet
hq_region = sr:region_japan

combat_unit = {
type = unit_type:combat_unit_type_carrack
state_region = s:STATE_KANSAI
count = 5
}
combat_unit = {
type = unit_type:combat_unit_type_carrack
state_region = s:STATE_KANTO
count = 5
}
}


}

}
1 change: 1 addition & 0 deletions common/laws/br_health_system.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ law_public_health_insurance = {
state_mortality_mult = -0.04
state_pollution_reduction_health_mult = -0.15
state_standard_of_living_add = 0.5
country_bureaucracy_investment_cost_factor_mult = 0.02
}

pop_support = {
Expand Down
Loading

0 comments on commit d90dddc

Please sign in to comment.