Focus that Creates Ships?

Hello! I was looking at other mods, and I had an idea.

I want to make a focus that adds a ship to a country, like a battleship. How would I do this?

Not too sure on this one, but looking at how the "Destroyers for Bases" event works, you will need to create a new OOB which contains the ship(s) you want to give to the nation. And then have the focus reward be "load_oob = YOUR_NEW_OOB" (have a look at C:\Program Files (x86)\Steam\steamapps\common\Hearts of Iron IV\history\units\ENG_destroyers_for_bases_mtg.txt for to see how an OOB looks)


However, it may be possible to do something like this:

create_equipment_variant = { 

    name = "Montecuccoli Class" #Name of the class of ship - will add to list of ships for future production

    type = light_cruiser_1  #What type of ship it is destroyer/submarine/battleship/etc.

    upgrades = { 

        ship_reliability_upgrade = 3 #List of any upgrades the ship has with the level: torpedo/anti-air/engine/etc.

        ship_engine_upgrade = 3 

        ship_gun_upgrade = 3 

        ship_anti_air_upgrade = 3 

    }

}

add_equipment_production = {

    equipment = {

        type = light_cruiser_1 #Same as created above

       version_name = "Montecuccoli Class " #Same as above

    }

    requested_factories = 0 #Shouldn't need any, as it will be finished

    progress = 1 #100% complete

    amount = 1 #Producing just 1

}

And this should spawn a ship in the default location. But I'm not too sure on this one.

Thank you! I never realized the equipment production did that!

It asks me for the tag of the creator. Do I just use the italian tag? Also does the name of the ship have the be Montecuccoli Class or can I change it around

You use whichever tag is the nation which is creating the ship, and yes "Montecuccoli Class" is whatever you want to call it, it doesn't have to be that.

Thanks