Hearts of Iron IV

Hearts of Iron IV

OWB - Enclave Reborn
Avenger93 12 Sep, 2020 @ 1:00pm
Fixing the broken vertibird design company
It's been a pet peeve of mine and a known issue that the vertibird design company does nothing. Not anymore. There's 2 ways to fix this, one simple and quick but comes with a drawback and one more refined that makes everything as was originaly intended, but needs you to do more than a single quick edit. The only thing you need to do this fix btw is a robust text editing software, personally I'm using Notepad++.

Now, the quick solution:

In the mod folder/common/country_leader/enc_leader_traits.txt you will find a block marked as vertibird_aircraft_manufacturer that is supposed to improve your vertibirds when you have them as a design company.

it looks like this:

vertibird_aircraft_manufacturer = { random = no equipment_bonus = { vb_gunship_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } vb_transport_plane_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } } ai_will_do = { factor = 1 } }

to make it work, it SHOULD look like this:

vertibird_aircraft_manufacturer = { random = no equipment_bonus = { cas_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } cargo_plane_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } vb_gunship_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } vb_transport_plane_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } } ai_will_do = { factor = 1 } }

The mentioned downside? This applies the bonuses to all items under the 2 listed archetypes on top, not just the vertibirds. Because apparently that's how HoI 4 works.

If that is too much of a problem for your immersion, the more advanced method of editing consists of editing not just the file above, but also 3 other files in the OWB folder itself.

the first 2 you need are the 2 files that define equipment archetypes and stats for cargo planes and cas, found in owbroot/common/units/equipment/air_cas_eq.txt and air_cargo_plane_eq.txt

In both those files, you need to create a new archetype with a single child for each vertibird. Scroll down until you find the vertibirds themselves, they are always the last entry on each file. For the CAS version, for convenience, replace the section that starts with # VB Gunship (minus the last } in the file) with this"

vertibird_cas_equipment = { is_archetype = yes picture = archetype_cas_equipment is_buildable = no type = { tactical_bomber } group_by = archetype sprite = cas_plane air_map_icon_frame = 2 interface_category = interface_category_air upgrades = { plane_cas_upgrade plane_range_upgrade plane_engine_upgrade plane_reliability_upgrade } # CAS interface_overview_category_index = 0 air_range = 2600 air_superiority = 1 maximum_speed = 750 air_agility = 60 air_attack = 12 air_defence = 12 air_ground_attack = 50 air_bombing = 20 fuel_consumption = 2 naval_strike_attack = 15 naval_strike_targetting = 15 #Space taken in convoy lend_lease_cost = 8 build_cost_ic = 300 resources = { } manpower = 2 reliability = 0.8 } # VB Gunship vb_gunship_equipment = { archetype = vertibird_cas_equipment carrier_capable = yes priority = 50 sprite = cas_plane_5 resources = { composites = 3 advanced = 2 water = 2 energy = 2 } manpower = 2 reliability = 0.8 visual_level = 5 }

For the cargo plane version replace the section starting with # VB-0 (again, minus the last } in the file) with this:

vertibird_cargo_plane_equipment = { is_archetype = yes picture = archetype_strat_bomber_equipment type = air_transport group_by = archetype sprite = transport_plane air_map_icon_frame = 12 interface_category = interface_category_air # Transport interface_overview_category_index = 6 air_superiority = 0 reliability = 0.8 air_range = 6000 maximum_speed = 600 air_agility = 20 air_defence = 40 # Air vs Navy - high damage / low hit chance / hard to hurt naval_strike_attack = 0.0 naval_strike_targetting = 0.0 build_cost_ic = 240 resources = { } manpower = 10 fuel_consumption = 1 } # VB-0 vb_transport_plane_equipment = { archetype = vertibird_cargo_plane_equipment priority = 40 visual_level = 4 sprite = transport_plane_4 resources = { composites = 2 advanced = 2 water = 2 energy = 2 } visual_level = 4 }

the 3rd file that needs editing is for the localization so the game knows to display a proper text. it's found in OWBroot/localisation/replace/fallout_equipment_|_english.yml don't worry, notepad++ opens it just fine.

In there find the CAS category and add:

vertibird_cas_equipment:0 "VB-02 Gunship" vertibird_cas_equipment_short:0 "VB-02 Gunship" vertibird_cas_equipment_desc:0 ""

in the archetype definition block that starts that section of the file. It's start is helpfully labeled with a # CAS.

Do the same with:

vertibird_cargo_plane_equipment:0 "VB-02 Transport" vertibird_cargo_plane_equipment_short:0 "VB-02 Transport" vertibird_cargo_plane_equipment_desc:0 ""

at the start of the section # cargo planes.

finally, don't forget to go back to ERBroot/common/country_leader/enc_leader_traits.txt and turn the vertibird_aircraft_manufacturer into:

vertibird_aircraft_manufacturer = { random = no equipment_bonus = { vertibird_cas_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } vertibird_cargo_plane_equipment = { build_cost_ic = -0.10 reliability = 0.1 instant = yes } } ai_will_do = { factor = 1 } }

As a bonus, doing these changes also means no other design company in the game will work on the vertibirds.

Just remember when adding in the new archetypes to not remove the } at the end of the file. when you paste in the blocks I posted above in air_cargo_plane_eq.txt and air_cas_eq.txt you need to have an extra } a row bellow the blocks to pasted, or else you're breaking the file. Notepad++ keeps tracks of those, just check that all opened { have a corresponding } somewhere after them to close them.

And as always, ALWAYS back up your files before starting to edit.
Last edited by Avenger93; 12 Sep, 2020 @ 1:04pm
< >
Showing 1-1 of 1 comments
OakHeart 8 Oct, 2020 @ 10:11am 
It seems to me that the "Greasers" enterprise is also not working properly (original OWB mod). You can check? I'm not good at coding
< >
Showing 1-1 of 1 comments
Per page: 1530 50