Alright, so i wrote up the basics. No pictures though
Modding in your ships with an external mod
Model your ship (I'll skip this step for obvious reasons)
Make sure you export a ship with sections, basically that just means that your ship
is made up of multiple exported meshes. The frame usually is invisible and the visible
ship parts are just the sections (e.g. "shiptest_corvette_frame", "shiptest_corvette_coreA").
But that doesn't necessarily matter, i dont think there are any "proper" restrictions on that, so
i'd like to encourage to play around with that.
All files from your mod that have the same name and folder structure as the files
in the Stellaris game folder will be replaced by your files.
Everything i do in this tutorial happens in my personal mod folder.
My mod folder:
X:\Users\USERNAME\Documents\Paradox Interactive\Stellaris\mod\shiptest
"...\shiptest" is the name of my mod
I then copied the files i need to make my own mod.
So far i do not know how NOT to change global files while modifying the game (e.g. 00_species_classes)
There are 4 files you need to modify
.../common/species_classes/00_species_classes.txt
.../common/graphical_culture/00_graphical_culture.txt
.../common/section_templates/corvette.txt
.../common/Stellaris/gfx/models/ships/mammalian_01/_mammalian_01_ships_meshes.gfx
First, create your own graphical culture for your ships (the graphical culture is used for the different races in game e.g. Mammalian)
.../common/species_classes/00_species_classes.txt
Code:
#THE NAME YOUR CULTURE (Since this is just a test i just chose the first 3 letters of the file name (SHIptest))
SHI = {
portraits = {
"human"
"mam5"
"mam13"
"mam10"
"mam14"
}
custom_portraits = {#add additional portraits when customizing species
trigger = { local_has_dlc = "Paradox Account Sign-up Bonus" }
portraits = {
"mam16"
}
}
custom_portraits = {#add additional portraits when customizing species
trigger = { local_has_dlc = "Creatures of the Void Portrait Pack" }
portraits = {
"mam17"
}
}
#THIS IS THE IMPORTANT PART
#CHANGE THE NAME OF THE GRAPHICAL_CULTURE TO THE NAME YOU ARE GIVING YOURS
graphical_culture = shiptest
move_pop_sound_effect = "moving_pop_confirmation"
}
Alright, so now when you start Stellaris and you create a new empire, the name SHI will pop up under the ship types.
.../common/graphical_culture/00_graphical_culture.txt
Add your graphical culture to the file, make sure you include "fallback = mammalian_01" as the first line, this
will replace missings files with the standard mammalian ships.
I'm not 100% sure if changing this file is necessary, but i think it is connected with a problem i had.
Code:
#THE NAME OF YOUR GRAPHICAL CULTURE
shiptest = {
#IN CASE YOU HAVE MISSING MODELS IT WILL REPLACE THEM WITH STANDARD MAMMALIAN MODELS
fallback = mammalian_01
#YOU CAN SET HOW YOUR SHIPS ARE LIT IN GAME (NOT TRIED YET)
ship_lighting = {
cam_light_1_dir = { 1.0 0.0 0.5 }
cam_light_2_dir = { -0.5 0.2 0.0 }
cam_light_3_dir = { 0.5 -1.0 0.0 }
intensity_near = 1.0
intensity_far = 1.0
near_value = 700
far_value = 4000
rim_start_near = 0.5
rim_stop_near = 0.99
rim_start_far = 0.3
rim_stop_far = 0.99
#rim_start_far = 1.5
#rim_stop_far = 2.0
ambient_near = 0.1
ambient_far = 50.0
}
}
Last but not least, we need to add the sections to the ship class. In this case i used the corvette class.
If you want to change another class, use another text file.
.../common/section_templates/corvette.txt
You could change the "corvette.txt" but i prefer not to meddle with the main files of the game, so i copied the "corvette.txt"
and named it "shiptest.txt"
Here you need to change 2 lines for one section.
Code:
ship_section_template = {
#CHANGE THE KEY TO WHATEVER YOU CALLED YOUR FIRST SECTION
#IM NOT SURE IF THIS JUST CHANGES THE NAME DISPLAYED
#IN THE GAME OR IF IT DOES ANYTHING ELSE
key = "CORVETTE_COREA"
ship_size = corvette
fits_on_slot = mid
#CHANGE THE ENTITY TO THE NAME YOUR SECTION IS GIVEN IN ITS .ASSET FILE
entity = "corvette_coreA_entity"
icon = "GFX_ship_part_core_mid"
# Guns
weapon_preferences = { weapon_type_kinetic }
ai_weight = {
modifier = {
factor = 2.0
OR = {
has_ai_personality = honorbound_warriors
has_ai_personality = evangelising_zealots
has_ai_personality = spiritual_seekers
has_ai_personality = democratic_crusaders
has_ai_personality = hive_mind
}
}
}
component_slot = {
name = "SMALL_GUN_01"
slot_size = small
slot_type = weapon
locatorname = "small_gun_01"
}
component_slot = {
name = "MEDIUM_GUN_01"
slot_size = medium
slot_type = weapon
locatorname = "medium_gun_01"
}
small_utility_slots = 5
cost = 30
}
Now we need to specify the meshes used for our graphical culture.
In this file you will find the meshes to all ship classes.
Because we have created our own graphical culture we need to copy over the mammalian and rename to whatever we called ouf gfx culture.
.../common/Stellaris/gfx/models/ships/mammalian_01/_mammalian_01_ships_meshes.gfx
Renamed to:
...shiptest\gfx\models\ships\shiptest\_shiptest_meshes.gfx
Scroll down until you come to ###### corvette frame ######
Change the name of the meshes to the meshes you are replacing it with.
Code:
####### corvette frame #######
#pdxmesh = {
# name = "shiptest_corvette_frame_mesh"
# file = "gfx/models/ships/shiptest/shiptest_corvette_frame.mesh"
# animation = { id = "idle" type = "mammalian_01_corvette_frame_idle_animation" }
# animation = { id = "death" type = "mammalian_01_corvette_frame_death_animation" }
# animation = { id = "attack" type = "mammalian_01_corvette_frame_idle_animation" }
# scale = 1.0
#}
####### corvette sections #######
pdxmesh = {
name = "shiptest_corvette_coreA_mesh"
file = "gfx/models/ships/shiptest/shiptest_corvette_coreA.mesh"
scale = 1.0
meshsettings = {
shader = "PdxMeshShip"
#Mipmap tweaking
#texture_diffuse = "512x512.dds"
}
}
pdxmesh = {
name = "shiptest_corvette_coreB_mesh"
file = "gfx/models/ships/shiptest/shiptest_corvette_coreB.mesh"
scale = 1.0
meshsettings = {
shader = "PdxMeshShip"
#Mipmap tweaking
#texture_diffuse = "512x512.dds"
}
}
Now everything should work. Start your game with your mod enabled and create a new empire.
Choose your own graphical culture (mine is shown as SHI ships)
Start a game and go into the ship designer and see for yourself if everything is in order.
If i forgot something or if something is not clear, ask away. I'll try to help as best as i can.