• 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 #269 - Digging a Grave, and Galactic Matters

Hello there!

I’m CheerfulGoth, a content designer on Stellaris, and today I’m excited to share the design process behind the Tiyanki Grave Mound that was added in the Fornax patch!

Concept and Planning​

To allow new content designers to familiarize themselves with all aspects of the game, they are usually assigned some onboarding tasks. The Tiyanki Graveyard was a combination of two such tasks: designing a unique solar system with new ships on patrol, and creating an arc site.

Stellaris already includes a massive amount of content, and one of the hardest things as a new content designer is to avoid retelling stories. I decided to focus on space critters, because they have relatively few events associated with them, and most of these haven’t been touched in years. We already have a system where Tiyanki are born, so why not show where they die?

Something that struck me while rereading all our Tiyanki-related content was that killing them allows you to research the Regenerative Hull Tissue, but their superior healing abilities don’t have any narrative impact. This gave me the idea of a sort of ‘elephant graveyard’ full of wriggling corpses that don’t stop growing even if they’re dead.

After getting the main concept approved, it was time to build the event chain. The onboarding tasks required me to create new ship types, so I decided to make some static Tiyanki gravekeepers protecting the arc site. I knew some players would never hurt a Tiyanki, though, and I wanted to keep the content accessible to different playstyles. A special project was thus added, allowing pacifist players to lure away the gravekeepers without hurting them.

Prototype​

Communication between different departments is crucial when working on a team. I wanted my ball of corpses to look the part, but the art team was busy working on Toxoids — so instead of requesting art assets for a minor onboarding task, I experimented with what was already in the game. After all, we already have a perfectly good Tiyanki Matriarch corpse. Why not scale it down and spawn a couple copies around a planet, wrapping it in tentacles?

My first attempts, however, produced... Unintended results:

tiyanki_1 (1).png

Space in Stellaris is actually flat: all planets and spaceships are bound to an invisible 2D plane. We can offset the coordinate of ambient objects (decorations) to make them appear above or below the plane, but we usually use this kind of trick only for temporary VFX, like when a planet cracker hovers over a planet.

Figuring out how to wrap a planet in corpses took a bit of experimentation, but eventually we got there!

tiyanki2.jpg

Implementation​

Once implemented in-game, the content gets tested for bugs by QA. While testing, we noticed a curious issue: the graveyard looked fine when you encountered it the first time:

tiyanki3.jpg


But if you closed the system view and opened it again...

tiyanki4.jpg


...It ballooned into a fleshy monstrosity whose size rivaled the Sun!

The cause, as fellow Content Designer @Caligula Caesar discovered, turned out to be an obscure bug that resulted in offset decorations being incorrectly sized during initialization.. As mentioned above, we usually use offset for temporary VFX, so this bug has never been noticed since release!

Final Art​

At this point, the art department stared at my work in mild horror and decided it was best to create an unique asset for it. The graveyard looked fine, but smashing ambient objects together is not standard practice and could potentially create performance issues. Nevertheless, the horrible mishmash provided a useful reference for the concept art and the final model:

TiyankiGraveyard_01.jpg

final.jpg

Notes for modders​

My graveyard was dismantled, but I hope it will inspire you to create even worse abominations.
Here’s a handy summary on how to offset ambient objects. When spawning an event object, make sure sure to use use_3d_location = yes to be able to adjust its position.

CommandExampleResult
entity_offset

Offsets an object on the horizontal axis (left or right).

Takes both fixed values or a min/max amount (useful for randomly spawning multiple objects in a while block).
create_ambient_object = {
while = {
count = 10
create_ambient_object = {
type = "small_dead_tiyanki_object"
use_3d_location = yes
entity_offset = { min = -10 max = 10 }
location = this
}
}
}
image2021-10-21_16-13-10.png

Objects spawned with random horizontal offset.
entity_offset_height

Offsets an object on the vertical axis (up or down).

Takes both fixed values or a min/max amount (useful for randomly spawning multiple objects in a while block).
create_ambient_object = {
while = {
count = 10
create_ambient_object = {
type = "small_dead_tiyanki_object"
use_3d_location = yes
entity_offset_height = { min = -10 max = 10 }
location = this
}
}
}
image2021-10-21_16-13-58.png

Objects spawned with random vertical offset.
entity_offset_angle

Offsets the angle at which the object is spawned in relationship to its spawning point. Think of a clock: the base entity is the pivot, while the new objects are spawned around it.

Takes both fixed values or a min/max amount (useful for randomly spawning multiple objects in a while block).
create_ambient_object = {
while = {
count = 10
create_ambient_object = {
type = "small_dead_tiyanki_object"
use_3d_location = yes
entity_offset_angle = { min = 0 max = 360 }
location = this
}
}
}
image2021-10-21_16-15-29.png

Objects spawned with random angles.
entity_face_object

Automatically rotates the object towards the target.

Scope: planet, fleet, star, this.
create_ambient_object = {
type = "small_dead_tiyanki_object"
use_3d_location = yes
entity_face_object = star
}
image2021-10-22_10-7-16.png

Left group is set to face the star (not in the screen). Second group is set to face this (the planet they spawned from).
base_angle_towards

Determines the default angle of the object in relationship to the base entity.

Scope: planet, fleet, star, this.
create_ambient_object = {
type = "small_dead_tiyanki_object"
use_3d_location = yes
base_angle_towards = this
}
image2021-10-22_10-24-45.png

Both Tiyankis have an angle of 0°. One is set to base_angle_towards = star, and is aligned to its "face" like the planets. The second is set to base_angle_towards = this, where this is a planet with an angle of 180°


No tiyankis were harmed in the making of this dev diary.

-------

But that is not all! For I, @Caligula Caesar, have something quite cool to show off, namely some experimentations with galaxy shapes.
We haven’t made any changes to the available galaxy shapes for… I think since release, unless I am mistaken. Anyway, we wanted to spice things up a bit, and took a look at whether we could persuade our galaxy generator to create new shapes.

First we taught it a few new tricks. Now you can define a new galaxy in script and feed parameters into it, and it will be available to select in the galaxy generation screen. This means that when modders inevitably decide we didn’t go far enough in this dev diary, they can make their own combinations without replacing existing ones. It now also doesn’t determine its behaviour based on what the galaxy shape is called. With this I mean, in the current version the 2-spiral galaxy will always have two spiral arms, and you can merely tweak how thick and twisting these arms are - this is no longer the case. Now you can freely define how many arms you wish to have, and also combine them with a ring if you so please.

As a result, we could add a few new shapes. For instance, we could add some spiral galaxies with different numbers of arms:

LUTARlG8v-ajavCobLYSwrhNcN9lxddhLCOTjtpPpWWu8SEZpd3bFF_fCy0_KkQtUknde8KWtuGciFwPUpw8_A9Y-GNaUVgAARaWm0vADqWwoadaDByhQ6TxPbRyUf4hrnqux0uDVhYpIFoG7p9l9kqecrb9lXtAoq5xvz9XhUPeZZl8yI56hiyi1Q


NK1GP88G4_I7hdV5FYSLC_jKplRKdpuPk9AnfpEbZmO-jk90QLqbLMTjgkS8E3k1E-wshYkyAfSuM7i_yViiK49HK94uRnr-6hdMOBl9bCXiCxlb0TeEhoNjnkyystaIteIRops1gjwVCErS5ZdoYWS7cujxqMWXW5fASY83F_ELkRO5FIBrHIz0Jg


1iC_lKONUKkplNKq49lRUHoK1NKVgA6FUM8ro7Xr3bpn2e5IChj3fDE9ph2JQEClc-vXUVluFc8N_0ZBxohhfER2_GCufBhdX4XTMSkm-mfgA3HlMbQB2rW9Y7rBrnkYJf-6oVe1Q33qLrKE_1wgvCpwEsQ7s4EiODVZ3SiSKV1Dyo6JvjvFH_cgtw


But there was more we could do. In particular, we wanted to make a few galaxy shapes that would create some unusual galactic terrain, and some potentially interesting asymmetric starts. For instance, we could make a twist on the two-arm spiral galaxy that has very thick, slightly winding arms, resembling a bar galaxy:

F6WdytSWBCmPg_nj2kb8547hxpePWcFygXSlsydXQM_Ebmf7cHt082OCUw5I-tTRMLG8-AAke-WqsP9po4ZgfxAmLnLx_gUgf1J2aiwPZhs1_M3pFHM2CI76NGCLglZRUscJ-qMGJKZDCYRrDqe1jO0WCUg1tzOrwoMdIvWbe8vCRIcd3bJP6eiEXw

Credit: NASA and STScI​
SVFBGVJbnX5ZNBhg0pinQ2aWZRVLemOuHO42nrQ3LbJMusuZN0jPKCY1iWuUNkPFjJMwl3qkGDCuttxOellGh7J97B0OEhTiG-TQyLM1HkCSzKLbNklhF2sknKSfXuGUG90BI4SDgp4mW4-ZZJnxbAn242kkvHB7r6ldaRsC_ZRmFz4xgxkX42nb4Q

Yes, those two halves are connected by a single hyperlane

A ring galaxy and a spiral galaxy could be combined to make a “cartwheel” galaxy:

KYzoZqCJhQ3YSrr6BkSvWl-L3cRSxb5GJ8GkvB4s-JQy2pDnAoso3bj3e2eZ9J-KBKbjpqyB8TaEppWjAXDNC2v32IJB-IuC2HLsLsqxFL2zvB4RLdv8HC9v217itqotmG-Q0AEpAMe-zck0HVi5CkjrCQT_hwkAnIJvPRz6N7gYngNxvXQcG4HeUw

Credit: NASA, ESA, CSA, STScI and Webb ERO Production Team​
K88zv-F4g6ySjk3_I-LQFExTOOJk7RpsRy1jEbDbxAqGoXNDeDnmtgCZXtTH9FA5olvQY-MsfjcxpsO2aeAz3fbs4bj29EXDvzAoGu2PFPFWOpOhdoQU5muFvaaIt94kfGqUz2TthL85zSGr5jCQirxlFomox1vfR7Cx1V1SuRhbVb3RiLRTC2VnOw


Alternatively, we could omit an arm of a 4-arm spiral, and create something we dubbed the “hedgehog”:

v4OKroo3O7tD5AKP5wAxUPVDYp9pvLKJqWr-jUOBU_rd7QfxQ1PpdXCB7KPirCip0MZiF4Mxt2CvR5clPPjUc8Uiscy33Bp7YDg8jdze2sBpPJH4V6LgtuhvKYoErnV9yCdebiN-1ux9yPgCwnq-eFRehGvef6qS4tVJAQGv7tCbFT-3y6bj5GQCMQ


Finally, in a bout of silliness, I also added the “starburst”, which is a shape that is actually impossible in reality, but might create some interesting gameplay:

kJAdox3yzZpeVeHJ3GK_N-Z_qMRm3gvWYgDlZeh4APnd8KoKgi6d--QQlx-QYWopvb0JvO3Ducn7XY4dbUHm1tprTy5Vl7x-1karSm67nlrtxASenzTUElNJgmMvNkTX9muj3hoctGfO4GgWibum-qApIXMYMzYdL2HAf3TKgy17IZw6aUKQa10ocw


Another thing related to galaxy shapes which we’ve looked at a bit is static galaxies. This is the system modders use to generate a specific preset galaxy, for instance certain total conversion mods. It turns out that the code for generating a random galaxy (i.e. those we usually generate) and that used for static galaxies differ completely, which specifically became an issue during galaxy generation: the two different versions of the code probably did the same thing once upon a time, but inevitably the code has diverged, so modders reported numerous issues with static galaxies. For instance, it was not possible to use secondary species, and there were a number of small issues with starting setups, such as starbases and sectors not automatically spawning. It also wouldn’t call the empire_init on_actions, which would cause further divergence from how things would be if a regular galaxy was generated.

Anyway, I probably shouldn’t talk about this, since the code has not yet even been approved, but I tried to combine as much of the random galaxy and static galaxy code as possible, resolving a fair few issues with the latter, and hopefully making it more robust in the future. (Also, on the prompting of a modder, I added the ability to specify "effect = { }" in a particular system’s entry in a static galaxy. And you should now be able to create several static galaxy maps rather than being limited to one).

So, basically, for players who enjoy mods that create bespoke galaxies, you will probably be able to get access to much improved versions of these in the near future. (Can't promise it will definitely be in the next patch).
 
  • 108Like
  • 91Love
  • 10
  • 5
Reactions:
Also, as is tradition, I would like to request we be allowed to force-spawn pre-made empires, so I can finally have my UNE vs. CoM game!

You already can? Unless I'm confused on what you mean, you can already set your custom empires to be force spawned in. I assume it works for the Paradox made ones as well, but if not, couldn't you just re-create them as a custom empire in a few seconds and set it to force spawn
 
  • 4
  • 3
Reactions:
You already can? Unless I'm confused on what you mean, you can already set your custom empires to be force spawned in. I assume it works for the Paradox made ones as well, but if not, couldn't you just re-create them as a custom empire in a few seconds and set it to force spawn
This! You can select a premade empire, edit it, save it without touching anything and it is now a force-spawnable "custom" empire.
 
  • 4
  • 1
Reactions:
Me too!
 
Tiyanki Graveyard should bring a permanent effect to all planet(s) either in same system, or within 1 star distance, as a sort-of "fertilizer" source for planetary use, providing +5% food production (or at most +10%). The old Tiyanki would be chopped up and hauled off to rot in farming operations, or their reconstructive tissue may hold chemical production facility buffs (if the farming boost isn't preferable). I haven't run into this yet in game (so I don't know if the game already has buffs for this event), but this was the first thing that came to mind once seeing it. There wouldn't be a graveyard, it would be a recycling operation to make use of them.
 
  • 1
Reactions:
We'll need two hyperlanes, one colonised by a megacorp minmaxed for espionage.

Plus the ability to put jump drives on bastion citadels :p
LOL! :D
 
If we're departing from scientifically plausible galaxy shapes, how about a lattice/beehive type map? A series of segments, gaps in the middle like mini-cores, connected to the adjacent ones by choke points.
 
  • 3Like
  • 1Haha
Reactions:
I hope Stellaris 2 allows for 3D maps. I'd like a galaxy type where it's actually two galaxies colliding with each other at different angles. I think Sword of the Stars 2 had this kind of configuration.
 
  • 2Like
Reactions:
That would be nice! And I would love to see 3D space battles if one day Stellaris get a sequel. :)
 
  • 2Like
Reactions:
I would very much like a "Milky Way" galaxy type, as unique to galaxies as Earth is to home planets. It would contain basically everything we're aware of, and randomize the stuff between and beyond.

Also, as is tradition, I would like to request we be allowed to force-spawn pre-made empires, so I can finally have my UNE vs. CoM game!
Great idea.
 
You already can? Unless I'm confused on what you mean, you can already set your custom empires to be force spawned in. I assume it works for the Paradox made ones as well, but if not, couldn't you just re-create them as a custom empire in a few seconds and set it to force spawn
It's not the same. The game interprets them as a different species, removing the unique diplomacy between them.
 
  • 1
Reactions:
Do y’all have any plans for the center of the galaxy? Or will there be any options with this new generation?
 
  • 1Like
Reactions:
Love this. Both the graveyard and the new galaxy shapes.
 
One question I had after rereading the dev diary is, will we be getting any tweaks to the below trigger?

Code:
check_galaxy_setup_value - Checks the value for a specific option from the galaxy setup
check_galaxy_setup_value = { setting = <string> value >=< <float>/<variable> }
possible values: num_empires, num_advanced_empires, num_fallen_empires, num_marauder_empires, mid_game_year, end_game_year, victory_year, num_guaranteed_colonies, num_gateways, num_wormhole_pairs, num_hyperlanes, habitable_worlds_scale, primitive_worlds_scale, crisis_strength_scale, tech_costs_scale
Supported Scopes: all
Chiefly, to allow it to see what the ID of the chosen galaxy type was.

Hypothetically, I could write an on startup event that only triggers if using the "Frozen Hedgehog Galaxy" galaxy type (identical to the regular galaxy type - aside from its name), and then the script could set all non-capital/colonised habitable worlds to be frozen, as a simple example, when the event sees that galaxy type was used.

There was a meme/mod a while back about sticking black holes in every system. And people have asked for more "galactic origin" type functions for ages.

Ideally we'd have a 'run x galaxy script on start' parameter that modders could fill a folder for, but Something like just reading galaxy type names, to trigger bootup scripts, could let you create 'young/old/end-of-time galaxies', 'resource abundant/sparce galaxies', with different distributions of types of stars and frequency of space deposits (the latter probably could do with a slider tbh). Or ones filled with shrouded and infested worlds - without needing to create explicitly static galaxies.
 
Last edited:
  • 4Like
Reactions:
I think there's a "Functionality" aspect that could/should also be applied in select new galaxies being conceived, to include an entire "Nebula Galaxy" or such, where communications are impossible beyond a one-star limit, no matter what buffs you obtain. This would be like a "blackout" galaxy for seeing anything beyond your own stars, even if your Science ships are out beyond your own star holdings, and you wouldn't hear their results until they either warped out/back to you (which could then be an "auto-return" feature of science ships out in this type galaxy), or if you have an allied empire that is adjacent and you have a Comms agreement (would actually make a Comms trade agreement quite a critical part of game play).

So essentially, you can map stars once you see them AND the science ship successfully returns with the information it found. You wouldn't be able to investigate anomalies right away, nor any other science project - only upon return of the science ship would those decisions then be made available, along with the scanned system results. I would really like to see more toward this level of gameplay, and the "lack of information" that would be reality for such distant voyages in space.

To implement this, and choose whether to play this type galaxy, could be part of the Game Setup screen at the beginning of the game. I realize - this is perhaps better placed in the Suggestion thread, but if we're talking about adding new Galaxy patterns, we should simultaneously consider changes in the Functionality and Dynamics of galaxies, as well, to help give entire Galaxies a theme of their own, individualize them, customize them more - not simply make eye-pleasing patterns.
 
  • 1
  • 1
  • 1Like
Reactions: