• 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.

Stellaris Dev Diary #32 - Modding art

Hello Modders. Today's dev diary will be about modding art, and give a cursory glance at what is possible to do in Stellaris. We will mainly talk about characters and ships in this dev diary. Today we are releasing our Maya exporter, which opens up a whole new world of possibilities for modders. So, provided you have the skills in Maya and Photoshop, you can do anything you want - anything we have done, you can do too!

(more info and links can be found at the end of this post)


For characters, you have two options. The simpler one is static 2d avatars. These are just an image with transparency that is used directly in-game. They don't require Maya or any other fancy tools, and will likely be the initial choice for most modders. Static portraits are not used by the core game, but the functionality is there for the modders. There is an example for this in the games files, where we specify the species, so you just add textures and point to them in the files and you get new species.

01_character.jpg



All the characters we have created for Stellaris are animated 2D portraits. What we do is we draw characters in Photoshop, and split the images up into separate parts for anything that will be in a different layer, looking something like the picture below. We then create a plane for each asset in Maya, and layer them correctly.


02_character_split_up.jpg



If you want to create an animated character, you have two options. One, you can mod an existing one by modifying an existing character’s texture. This is desirable if you don't want to or can't use Maya for any reason but your Photoshop skills are high. This is a bit limiting of course, since you can only change the look so much within the confines of that character. The animations will of course be the same, so you can't move the eyes etc.
If you want to do this, take an existing texture and add some more colors to the entire texture, and you can see the entire area you have to work with.There is some space outside the edge of the character to work with.

Secondly, if you have some Maya skills, you have more freedom. The level of knowledge required is really not that high. Just creating a few planes, cutting, creating some joints and simple animations. What you do is you create texture similar to ours, then create a few different planes and cut out each area. Build a simple rig, and add some animation.

03_maya_character_cutup.jpg

04_character_rigged_side.jpg

05_character_rigged.jpg

You can also mod in more clothes, triggering the use of different outfits in different situations. In the game currently we use this for the different leader types such as scientist, admiral etc. We also use this for the rulers, so that if you are a militaristic society, your ruler will wear a military uniform. This has very few limits, and could be used to create some very unique characters.

There is another layer where you can add other things to you characters with the help of triggers. We use it to add the different hairstyles for the humans, but you could just as well add glasses to your characters, or some other visual attribute.

If you are feeling fancy, you could even extend a race to use multiple portraits. So that you insect race has a Queen model for your ruler, a lieutenant for you leaders, and a third model for your pops.

Though all the portraits in the game are shown as 2D, they are technically 3D and there is nothing really stopping you from adding a 3D model (though we have yet to try that ourselves).

If you wish to know exactly how to add new portraits, there is a detailed guide on the wiki:
http://www.stellariswiki.com/Portrait_modding



Moving on to to ships. With the release of our maya exporter, you can now create any model you like and add it to the game. The process is very straightforward. You build your mesh and use maya to export it. There is fairly little to be said simply because most things are theoretically possible to do. If you want ships with like 5 sections you can do that. Vertical ships? Sure. Organic ships? Absolutely.

Stations are also technically ships that don't move, so these are of course modable as well.


Code:
corvette = {
    max_speed = 5.25
    acceleration = 0.35
    rotation_speed = 0.1
    combat_max_speed = 1.5
    combat_rotation_speed = 0.08
    collision_radius = 2.0
    modifier = {
        ship_armor_add = 3
    }
    max_hitpoints = 300
    size_multiplier = 1
    fleet_slot_size = 1
    section_slots = { "mid" = { locator = "part1" } }
    num_target_locators = 2
    is_space_station = no
    icon_frame = 2
    base_buildtime = 60
    can_have_federation_design = yes
    enable_default_design = yes    #if yes, countries will have an auto-generated design at start 
 
    prerequisites = { "tech_spaceport_1" }
 
    class = shipclass_military
    required_component_set = "ftl_components"
    required_component_set = "combat_computers"
    required_component_set = "thruster_components"
    required_component_set = "ship_sensor_components"
}


You can place any number of locators on the ships. You can, for example, add locators to where on the ship enemies ships will aim, so that they don't all hit the center. You can also add locators for where the guns will be and where the engines are. You can easily add guns to your ship without having visible turrets, which is likely what most modders will do.

With all these new possibilities, I very much look forward to what the community will produce.


If you want to download the exporter right away, go to
https://accounts.paradoxplaza.com/profile/downloads

More details on the exporter can be found on the wiki:
http://www.stellariswiki.com/Maya_exporter

We also started a new sub-forum for the exporter.
https://forum.paradoxplaza.com/forum/index.php?forums/clausewitz-maya-exporter-modding-tool.935/



We have recently worked on support for static galaxies. This will allow users to create a specific galaxy to use for specific scenarios. In this test we have more than 5000 stars, which still renders smoothly. Might have to optimize the game a bit though :)

stellaris_dev_diary_31_01_20160502_galaxy_test.jpg


And also a video for you guys!
 
Last edited by a moderator:
  • 169
  • 62
Reactions:
What about clothing for 2D? I really wanna add just a piece of clothing for humans. How will I go about doing that? Is there 2D assets for humans?
 
What about clothing for 2D? I really wanna add just a piece of clothing for humans. How will I go about doing that? Is there 2D assets for humans?
The most recent dev-blog probably answers that for you. Since the clothing is an overlay on the primary model, I imagine it'll be a fairly simple 2D plane in Maya.
 
The most recent dev-blog probably answers that for you. Since the clothing is an overlay on the primary model, I imagine it'll be a fairly simple 2D plane in Maya.

It only looks at the clothes of 3d maya assets. Not how clothing on 2d works. Or am I reading this thing wrong? o_O
 
It only looks at the clothes of 3d maya assets. Not how clothing on 2d works. Or am I reading this thing wrong? o_O
The 2D assets are in 3D only in the sense that they're rigged for animation in Maya, they're a series of 2D planes in Maya. No true 3D at all.
If you're working with static portraits it's apparently much simpler and uses images with transparency, though they do not elaborate on the exact process.
 
The levels for galaxy size are currently not included in defines.lua, I believe they are set in code.



Basically you script each star.
system = { id = "0001" position = { x = -250 y = -200 } initializer = sol_system_initializer }
The initializer is not mandatory, if you leave it out you get a random name and system content.

You can also script hyperlanes

add_hyperlane = { from = "0001" to = "0002" }
prevent_hyperlane = { from = "0003" to = any }

Does this mean that a scripted event could rearrange the hyperlanes during the game? Would it have to be a static galaxy for this to work or could the randomly generated galaxy be rearranged in the same way?
 
The mesh exporter/importer and this 5000 star galaxy are awesome. 1000 always felt a little bit small for me when thinking about a Star Trek or Stargate mods that surely will come out. The possibility to basically have 1000+ stars per quadrant is amazing.

Thanks for not putting a hardcap on the number of stars @Paradox. :)

can make 2-3 galaxy in 1 game ?

Would love this as well. Ideally with the possibility to define an upper limit or completely randomizing this. Would be cool if there are for example 2 galaxies and in the late game a species which dominated it's own galaxy starts a conqeust and attacks the galaxy the player is in. Would also be cool for a Stargate mod. Then you could visit the galaxy of the Asgard, Replicators, Wraith or Ori.

Or small satellite galaxies around a bigger galaxy, just like our milky way.
 
Last edited:
  • 1
Reactions:
If you are feeling fancy, you could even extend a race to use multiple portraits. So that you insect race has a Queen model for your ruler, a lieutenant for you leaders, and a third model for your pops.

Is there a way to change the % of gender distribution?
 
For flags, se the thread here. (Some examples in my signature link as well)

I dont have the details on info yet, but I would be suprised if you can make your own category.
 
The levels for galaxy size are currently not included in defines.lua, I believe they are set in code.



Basically you script each star.
system = { id = "0001" position = { x = -250 y = -200 } initializer = sol_system_initializer }
The initializer is not mandatory, if you leave it out you get a random name and system content.

You can also script hyperlanes

add_hyperlane = { from = "0001" to = "0002" }
prevent_hyperlane = { from = "0003" to = any }

when you say prevent hyperlane from 3 to any
1.do you mean that in theory no hyperlane empire can touch you in that system because there will not be generated any hyperlane to/from that system
2.or is it just to prevent it from generating random hyperlanes ?

and what is the max with and height (x,y) the game can handle

one more question how do you seperated all the systems generation

system = {
id = "0001"
position = { x = -250 y = -200 }
initializer = sol_system_initializer
add_hyperlane = {
from = "0001"
to = "0002"​
}
prevent_hyperlane = {
from = "0003"
to = any​
}​
}

system ={ next one
}


sry if it have been showed some where havent seen it then and its abit late now
 
Is there a way to have multiple 2d or 3d portraits for one species, like one portrait for the civilians, one for the scientists, one for the Governors, etc?

I believe a Dev mentioned that it is possible to have portraits for just about all categories, not sure how it'll work though, I don't think that information is in the basic modding info. :)
 
I'm having some trouble modding in a static portrait for my own species. I've tried to follow the instructions on the Wiki, but it doesn't show up under the Mammalian category (I've entered them as mam18), so I'm not entirely sure what else I need to add, if I'm just adding a single static image file for my race.
 
I'm having some trouble modding in a static portrait for my own species. I've tried to follow the instructions on the Wiki, but it doesn't show up under the Mammalian category (I've entered them as mam18), so I'm not entirely sure what else I need to add, if I'm just adding a single static image file for my race.

I had the same issue. Add text files with the following code into the corresponding path

C:\Program Files (x86)\Steam\steamapps\common\Stellaris\gfx\portraits\portraits

Code:
portraits = {
    Star_Fox = {
        texturefile = "gfx/models/portraits/Star_Fox.dds"
        clothes_selector = "no_texture"
        hair_selector = "no_texture"
        greeting_sound = "mammalian_01_greetings"
    }
}

C:\Program Files (x86)\Steam\steamapps\common\Stellaris\common\species_classes

Code:
AVI = {
    portraits = {
        "Star_Fox"
    }
}

C:\Program Files (x86)\Steam\steamapps\common\Stellaris\gfx\models\portraits

.dds file

You have to add the .txt code in 2 different places, and the actual image into the gfx folder. Use seperate .txt files to keep things simple

Here is a tutorial I made to help out!