• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Mh i dont have anything special checked.
Just the "create .gfx and .asset", "export animation", "export skeleton" and "export mesh".
Make sure you have project set up in your clausewitz.txt and select that in the exporter.
 
I am a bit confused on how to set up this clausewitz.txt
I have a .obj model and gave the file its series shaders and materials required.
However, I am not particularly sure what the project path is suppose to be going.
Target is obvious for the .exe
 
Still getting this no phong material error.

[stellaris]
animation s 4 "none" "idle" "attack" "move"
material s 2 "PdxMeshStandard" "PdxMeshTextureAtlas"
path s 1 "X:/Steam/steamapps/common/Stellaris"
target_exe s 1 "X:/Steam/steamapps/common/Stellaris/stellaris.exe"

Not too sure on what else could be wrong.
 
Then it is an error in maya. Are you sure, you have a phong material created?
Also it could be that you didnt hit "apply shader attr" in the exporter.
Its easier if you select the material in hypershade and then withouth clicking anything else you hit the button.
 
Ok I managed to make my own mod. I successfully used it as a folder for my models and created a new race. The race show up kind of properly when trying to launche a new game. However you kind of lost me at

Make sure that your ships are named properly, this means that you have a ship "frame" and the sections.
The frame must be named like this in the .asset file.
<gfx_culture>_<ship_size_name>_entity
example: "mammalian_01_corvette_entity"

The sections just need to have the same structure. I didnt rename them, i dont even think they need a .cfg and .asset file.

What's a frame? Is it an actual model? Just a skeleton? Is it just a simple text file? Do i need it for a single section ship like a corvette or a science ship?
So i was like. "hum ok soooo.... i guess my thing is alright like it is? i don't know... ok let's proceed to the next step and see what happen"
But then

Ok, so now you need to add these sections to the ship class.

.../common/section_templates/corvette.txt
You have to replace the entity names in the ship_section_template bracket for each section you made.

My first atempt is a science ship so i went to section_template/science.txt
and it's just this:
Code:
ship_section_template = {
    key = "DEFAULT_SCIENCESHIP_SECTION"
    ship_size = science
    fits_on_slot = mid
    entity = "science_ship_entity"
    icon = "GFX_ship_part_core_mid"
   
    cost = 80
   
    small_utility_slots = 3
}

I really don't feel like i'm supposed to touch that.
So i went into the corvette.txt see what i'm supposed to look for and i'm still not sure. I really think those files in section templates are not supposed to be modified.
I checked the how_to_make_a_ship files but it's really cryptic i didn't learned much from it.

So yeah i'm kind of lost right now.... But hey! I'm starting to have a hang on porting models into the game!
 
  • 1
Reactions:
Gallente FTW :)
Anyway did you find out the engine trails and weapon points how to do this ?

I think my Maya is crashng bcs I have checked the "preview" option too.

Will try it in a second.
Thanks a lot for help.

EDIT: Ok with unchecked "preview" still crashing.

I am thinking about posible issue that I put just phong on it without other color or UV map. Just wnated to test how the ship will look like. But maybe it needs to have UV map and at least color map created.
 
Last edited:
@Mandrac Those text files determine what mesh will be what section on the ship.
If you just want a science ship i dont think you need to modify anything in there since it has no modules.
The frame is basically an invisible mesh which contains the skeleton and animations.

@Jovzin I still havent figured out how to add any locators :(
For your crash problem: Your model should definitively have a UVmap. Also for the textures,
i would recommend that you add all the textures right away or at least some placeholders.
Just put plain colors in the maps. For specular, gloss and metal just put in a 50% grey.
I made the normal map a flat value, so that the normal map has a neutral value ( 127,127,255)
 
Hello Endzeit666. Ok will try thank you very much. I think that this is the issue that there is nor UV map and no colour texture just phong gray shader. I wanted to test the ship first to see it in game but yeah looks like I will first create some place holder textures in Photoshop and put it on the model.
Thank you :) Will tell you how it goes.
 
@Mandrac Those text files determine what mesh will be what section on the ship.
If you just want a science ship i dont think you need to modify anything in there since it has no modules.
The frame is basically an invisible mesh which contains the skeleton and animations.

Is there a way to make an addon for the game and not something that completely overwrite the default files? Because right now that's what i did with the mod. It's basically a copy of the original files but with my stuff added to them. Know what? Do you think you could post a link to the little mod you showed a screen a couple of days aggo? I'd like to study it and reverse engineer what you did.
 
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.
 
  • 2
Reactions:
Nice i'll try again with that guide.
Something you don't mention tho is if the "frame" have a naming convention for it's bone. I mean how does it relate to the sections? I assume you have to model the section and rig it to let's say bone_01 and then make a frame with all the bones of the ship including a bone called bone_01 on which the section you made will be automatically rigged.

Edit: But then again how do you manage the locators.... locators HAVE to be on the section and not the frame. There's no other way.... hum

Edit 2: I think i found how to add engine trails.
The game basically have 1 asset file and 1 gfx file for each graphical culture model set.
The .GFX act as a listing of all individual models (.mesh). It give them an entity name, scale the model and eventualy list animation if animation there is.

The .ASSET however is managing everything related to art that are supposed to go with the models like sounds, animation sequence, visual effects and in our case engine trails.

While browsing some of the files of the game i opened the .asset of a graphical culture and found this:

Code:
entity = {
    name = "avian_01_corvette_M1S1_entity"
    pdxmesh = "avian_01_corvette_M1S1_mesh"

    default_state = "idle"
    state = { name = "idle" state_time = 5
        event = { time = 0 node = "engine_small_01" particle = "avian_01_1_6_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_small_02" particle = "avian_01_1_6_exhaust_idle_particle" trigger_once = yes keep_particle = yes }

        event = { time = 0 node = "light_locator_01" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
        event = { time = 0 node = "light_locator_02" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
        event = { time = 0 node = "light_locator_03" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
    }
    state = { name = "moving" state_time = 5
        event = { time = 0 node = "engine_small_01" particle = "avian_01_1_7_ship_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "engine_small_02" particle = "avian_01_1_7_ship_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
   
        event = { time = 0 node = "light_locator_01" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
        event = { time = 0 node = "light_locator_02" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
        event = { time = 0 node = "light_locator_03" particle = "ship_light_blue_effect" keep_particle = yes trigger_once = yes }
    }
    state = { name = "death" state_time = 5 }
}
I think that for adding engine trail you need to create a locator on your model, give it a name and then add to your .asset something like
Code:
default_state = "idle"
state = { name = "idle" state_time = 5
event = { time = 0 node = "NAME OF YOUR LOCATOR" particle = "avian_01_1_6_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
}
state = { name = "moving" state_time = 5
event = { time = 0 node = "NAME OF YOUR LOCATOR" particle = "avian_01_1_7_ship_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
}

Eventualy you could change the particle name for another existing graphical culture depending of the color you want. Maybe even create one yourself (don't know how tho)

Keep in mind that this is just theory i didn't tried this myself yet.
 
Last edited:
Yeah, i dont know about the bones or anything, so far i just imported it and it worked. So i assume that the bone is indeed on the frame
and the sections are just attached to that or contain the same bone.

Eventually, our problem comes down to those damn locators :D

Gotta try that with the particles at some point, i aint no vfx guy though :rolleyes:
 
Yep called it! I managed to make engine trail apear by doing just what i said earlier. I'm still having a hell lot of trouble making the ship actually working tho. the ship apear in the ship designer and when i do a spawnentity console command but when the ship come out of the shipyard it's just invisible. I don't know if that has to do with me not seting an idle animation properly or if i'm not doing the frame stuff corectly. but yeah for engine trails it fairly easy.
look for something called "create locator" in the rigging tab:


put them on your ship, name them properly and parent them (i don't know if that part is necessary) and add something like this to your .asset file in your ship's bracket :

Code:
default_state = "idle"
    state = { name = "idle" state_time = 5
        event = { time = 0 node = "NAME OF LOCATOR 1" particle = "avian_01_1_6_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = " NAME OF LOCATOR 2" particle = "avian_01_1_6_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "NAME OF LOCATOR 3" particle = "avian_01_1_6_exhaust_idle_particle" trigger_once = yes keep_particle = yes }
    }
    state = { name = "moving" state_time = 5
        event = { time = 0 node = "NAME OF LOCATOR 1" particle = "avian_01_1_7_ship_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "NAME OF LOCATOR 2" particle = "avian_01_1_7_ship_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
        event = { time = 0 node = "NAME OF LOCATOR 3" particle = "avian_01_1_7_ship_exhaust_moving_particle" trigger_once = yes keep_particle = yes }
    }

Here you can clearly see 3 larger dot exactly where i placed those locator:

I tried with a texture completely black just to make sure it's not just texture.



Here have a bonus pic:

Shiny isn't it :p
Ccp's way of treating textures on new ships is a bit diferent from older ones i might have to tweak the specular texture of ccp's newly reskined ship a bit...
 
So for engine trails I need to put the locators. OK .
And did you find out if we need those locators for weapons placement too ?
Anyway how do you have the model settled in outliner ? You have just the model and 3 locators put together in a group ?
Could you be so kind and show me your otuliner setting of the ship ? Thanks.

And you mentioned animations. You created some animations too ? I was thinking that there is no need to create some animation for the ships...
 
So for engine trails I need to put the locators. OK .
And did you find out if we need those locators for weapons placement too ?
Anyway how do you have the model settled in outliner ? You have just the model and 3 locators put together in a group ?
Could you be so kind and show me your otuliner setting of the ship ? Thanks.

And you mentioned animations. You created some animations too ? I was thinking that there is no need to create some animation for the ships...

Well i think for weapon it might be the same but i might be wrong. Weapon are models not just sprites and trails so if i were to test weapon attachments i would try with bones because locator don't give angles or anything it's just a point. About outliner i don't realy know what you're talking about. All i did is take a shape, texture it, put a bone in the midle of it, select both the bone and the shape and parent them together using the parent button in rigging (i realy have no clue how to rig bones properly in maya) then place 3 locator, name them respectively engine1, engine2, engine3, put them in place and parent them the same way i did with the bone and.... that's it.... oh yeah i almost forgot! When you try to export with that the exporter will say that the bone doesn't have a "bind pose". I have no idea what this is so i did a quick google search and find out that to make a "bind pose" for the bone i have to select it and then enter in the mel command input field
Code:
dagPose -bp -save;
This create the bind pose what ever it is and the erporter accept it. And then it kind of work in the game. But then again i have no idea how endzeit do his frame stuff or even how he rig his bones and shit. I'm used to 3dsmax. Maya is radically diferent and i have no idea what i'm doing on this thing. There is so many wacky things on my models i'm surprised that it even work and my problem of ship not spawning properly when they come out of the ship yard can be caused by anything really....