• 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:
Wait, is the graveyard a thing in the game?
 
Awesome! That is not dead which can eternal lie...
 
  • 4
  • 1Like
  • 1Love
Reactions:
Really like to get new galaxy shapes.
Would it be possible to generate a random galaxys shape based on an greyscale image?
Brighter = more dense stars.
Black = no stars in that area.
 
  • 5Like
Reactions:
Good lord, I love those new galaxy shapes and would love to see them added. Been hoping for more shapes and galaxy 'colours' for a while now!

Also, I, for one, would like to see the end results that are hinted in some of the newly added unique systems...... ;)
 
  • 3Like
Reactions:
Honestly, releasing new "maps" (ie new galaxies) is probably never a bad thing and can do so much to spice up a game! Even if a certain one will see very limited use, having that option makes for some brand new experiences for those willing to try. I see those new galaxy shapes and I want to try every single one!

The narrative of who controls that one hyperfine between two halves could be super interesting. Or maybe the Marauders will spawn precisely there and the two halves will be completely isolated for half the game, except to anyone who owns a Quantum Catapult.

Or someone in the "hedgehog" spawns on the far left side and will be almost isolated for most of the match. But then that empire trying become the Crisis and everyone must venture there.

So when it comes to galaxy shapes, there is probably no such thing as too many. As long as it is communicated clearly which ones are standard/beginner and unusual/advanced.
 
Last edited:
  • 11
  • 3Like
Reactions:
What i would like to see beside that amazing new shapes are galaxys with more stars! Since hyper relays are a thing it feels 1000 stars are not enough anymore. Something like 2k or even 3k stars would be incredible cool.
I know of course that this could maybe come with some technical problems (at least modded bigger galaxys have those) but it's indeed quite high on my wish list.
 
  • 7
  • 2Haha
  • 2
Reactions:
What i would like to see beside that amazing new shapes are galaxys with more stars! Since hyper relays are a thing it feels 1000 stars are not enough anymore. Something like 2k or even 3k stars would be incredible cool.
I know of course that this could maybe come with some technical problems (at least modded bigger galaxys have those) but it's indeed quite high on my wish list.
An incredibly small subset of people can launch a 3k galaxy in under half an hour of loading.
 
  • 49Haha
  • 9Like
  • 1
Reactions:
Yes, those two halves are connected by a single hyperlane

A ring galaxy and a spiral galaxy could be combined “
Are flags set against the different arms and any systems in the inter-arm space? To let us hook in to that at startup and tweak hyperlanes or systems around arm-chokepoints a bit further?
Also, on the prompting of a modder, I added the ability to specify "effect = { }" in a particular system’s entry in a static galaxy.
Checking if I understand this right, is this different from the system effects of (e.g.) black holes and neutron stars?

I don't think there is an easy way to apply effects to all ships (without using an aura/starbase) or colonies (without some looping scripts, or spawning in a nebula and editing the 'in_nebula' effects).

Separately, would it be possible to get an on action for ships leaving a system via a hyperlane? Right now there are onactions for entering a system via hyperlane or using bypasses but not for leaving via HL.
  • (Something like This system from fleet, from from destination)
  • it would open up a bit of space for playing with dynamic hyperlane speeds (rather than them all being 1-2 days travel time, leaving a black hole system might reduce interstellar (IS) speed by 90%, for example, if base IS speed was slowed down, leaving a neutron star could speed you up, and so on).
 
Last edited:
  • 1Like
Reactions:
An incredibly small subset of people can launch a 3k galaxy in under half an hour of loading.
I know that this is not an easy task. I only sayd that i would like to have bigger galaxys for flavor. I know the actual issues, since i have played with some galaxy map mods a while ago. This would only be an option if you guys know a way to do so without those problems. Most likely it will remain a wish :)
 
Last edited:
  • 4
  • 1
Reactions:
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

I'd love more like this, gameplay first, style galaxies. This one looks great though obviously not very balanced for all empires but I don't think that is a big problem. Have some empires spawn locations set in the in the petals, others closer to the core.

Would it be possible to make "split" galaxies/areas which would not have direct hyperlane connections at start of the game? Eg. connected through wormholes or maybe some higher rank Hyperlane which would require mid or late game tech to access? Kind of like "alien grade" hyperlanes in David Weber/Steve White Starfire series based on Starfire board game if I remember right.
 
  • 10
Reactions: