Stellaris

Stellaris

WP's Mysterious Worlds (3.14)
WP 🥔  [developer] 14 Feb @ 4:55am
Technical / Dear PDX
I just thought I'd list some of the technical hurdles I came across here and things on the engine side that would have made the mod much cooler! I know the likelihood of anyone reading this is basically zero.

3d Globes
This is the big thing, really! As you can see the exploration gui I've made has this big circular art element in the centre showing the planet. This is just a totally static .dds. The globe doesn't spin or look particularly great, it's just a dodgy crop and screenshot clumsily made by me.

What's really cool and interesting, though, is that Stellaris does actually already support natively the ability to render planets directly in to the GUI! You can see it being done on the empire creator homeworld selection screen. All the globe icons that show up there are amazing, they spin, their clouds move, they have night lights, the full works. Here are some examples:

https://imgur.com/a/Ku7e2tW (Sorry that you have to click to imgur! Trust me they're awesome.)

(In vanilla, they're drawn at a tiny size of 100px by 100px, so you don't get to appreciate it. But if a modder manually bumps them up to, say, 1000x by 1000x, you get the above! How amazing!)

This is the element I really wanted to use for my mod here! Not only would it look incredible but the UI would be showing the actual planet that's being clicked on, too. For example, in Vanilla there are actually like 3 different forms of Continental worlds - but my GUI will only ever show the one. What if it's earth (or any of it's variants) I clicked on, for example? Well, my UI won't actually render earth. What about modded classes? I have a blood-red crimson seas world in one of my other mods - I'd love it to properly show up on the UI, and it does on empire creator, but it can't here without a lot more data as I manually hook it all up. And it'll never be animated.

Because sadly the 3d globe elements can't be called in every interface file. The rendering is all there, and it's perfect, Stellaris can do it, but it only works on the empire creation screen due to hardcode.

Check out any instance of the spriteType "GFX_dummy_3d_home_world_new" in the codebase to see what I mean. I know these icons also used to appear on the outliner and on regular planet view in earlier versions of the game - there is precedent for them being used elsewhere.

I asked the modders in the GUI modding channel of the stellaris modding den about this if you want more information and to see the ensuing conversation. They ended up recommending a I learn HSLS ... to do something the game already supports! Argh! Just head to the channel and control-f for "GFX_dummy_3d_home_world_new", you'll see my post.

To put a point on my request:
I'd like to be able to use "GFX_dummy_3d_home_world_new" in any area of the interface.When there is a planet scope, of course. Not just the home-world picker.

Animation Scrolling Rotation
The other major art element I have on this gui is the scrolling planet background. It's pretty cool and pretty simple, all I'm doing is taking one of the planet diffuse layers already in the stellaris installation, not changing it any way, and asking it to scroll gently with a basic animation = {} block in a .gfx file. Easy! What's in theory great about this is that those surface diffuse textures are pretty big, and I don't have to add any of that data myself - I can just point to the existing ones to repurpose them for my use freely. I can even easily set up animated surfaces from other mods, including those massive ones from 4k texture packs, for just a couple of lines of text! Super cool.

But unfortunately it's impossible because of one tiny thing. When defining an animation_layer for a spritetype right now all you can do is add "animationtype = scrolling" - which by default makes the linked texture scroll vertically. Top to bottom. This makes the surface animate in the wrong direction: The poles roll down to the equator, then back up again. My use-case is looking for left to right horizontal scrolling. The only solution for this at all is for me to copy the entire diffuse layer (and planet textures are fairly large), open it in image editing software, rotate it 90 degrees and save it. Then it'll scroll in the right direction, and I can add a counter-rotation back 90 degrees left again in engine to align the whole thing how I actually want it.

(The game does support an "animation rotation" control, which would at first seem to do the job, but it really just spins the entire texture. Not useful.)

So, what does this mean? I have to wastefully copy-paste / duplicate every planet texture I want to use. Cloud layers, too. And there are a lot of those. All huge file sizes! So the mod contains barely any and, like I mentioned above about the globe representing earth, my scrolling planet backgrounds also don't represent the REAL surface because it would just be too expensive and insane to double-supply all those diffuse layers simply to turn them slightly.

To put a point on my request:
I'd like to be able to define "animationtype = scrolling_horizontal" in spriteTypes.

That would be amazing!

Deposit Position Priority

Just a simple one. If you run this mod on it's own with just Vanilla the deposits get listed in a really cool way in the planetary features list of the vanilla planet viewer: Real deposits at the top of the list, and my unexplored continents below. That's how I want the mod to work!

However, when a player runs this mod with other mods that add deposits (like my "Planetary Features Expansion") the order gets all messed up, with the unexplored ones on top.I don't realy want them up there, it obscures the more important info and just looks kind of bad. I cannot for the life of me change this!

A simple "position_priority = x" control in deposit script would be really amazing. It already exists for buildings and ship components and various other areas of the game.

Deposit Flags Debugtooltips
This might be more of a bug. "Debugtooltips" will show planet flags when mousing over a planet, but NOT show deposit flags when mousing over a deposit. Made coding this a bit tricky as I was somewhat in the dark!
Last edited by WP 🥔; 24 Feb @ 2:13pm