Stellaris

Stellaris

View Stats:
Honshitsu Feb 28, 2018 @ 9:03pm
Let's talk about how Stellaris "supports modding"...
Their claim of modding support tends to be nothing but a throne of lies. Nothing beyond the most simplistic & costmetic changes, yet is regarded as a "good mod game".

Sure, you can do some simple tweak's to global constants easy enough in the 00_defines.txt. Then we got some ship components, weapons and "easy" items (using stock behavior, just changing existing values, again). Next up in difficulty is adding ship sizes with custom meshs. Then, maybe, if you really understand their horrible systems you can implement a few war-goals, custom events, and so forth. But beyond that this game is dreadful to mod for.

While I and many others began trying to mod FTL support back into the game (warp & wormhole), it became quickly obvious that modding this game had some serious limitations. This was more news to me than them. They've all been modding for a long time. I'm an experienced programmer but this was my first time looking in to stellaris indepth. I always regarded Stellaris as a "mod friendly game" based sheerly on the amount of mods that exist for it.

Turns out an insane amount of behavior is hard-coded into the exe. Normally, this would be something I'd support because it lends itself to efficiency and optimization. But this takes it a step further. Most (modern) games have a core engine. A highly efficient and optimized program who's task is to render, manage memory, very low level behavior, and things that require high degrees of percision. On top of that, they have scripting languages (lua, python, ...), data-loading and parsing languages (xml, ini, ...), and some graphic related stuff (shader tweaks, meshs, textures, post-FX,...).

The scripting language tends to have a cooresponding API within the game. For example, telling the game to update object coordinates, physics, state, etc. Even with Some generic search algorithms being hard-coded into the game engine for increased runtime efficieny. That API would be bound to the scripting language, so you could instruct the low-level engine from a high-level language and define behavior in the high-level language for ease of production (a perfect case of "abstraction").

Instead of using a known-good interpreted scripting language, like Lua or Python, stellaris (for whatever reason) decided to go with... whatever the hell this is.

immediate ={ from = root fromfrom = fromfromfromfrom if ={ limit ={ AND ={ is_subject = no OR ={ is_country_type = default is_country_type = fallen_empire is_country_type = awakened_fallen_empire } NOT = { has_country_flag = silence_destroy_event } } } #...some behavior if == true... else ={ #...some behavior if == false... } } }

Now, if you have any programming experience, you're probably asking yourself "what the **** is that syntax?!". Aside from the "#" comments, that's real "code". Yes, even the "fromfrom = fromfromfromfrom" bit. No, I'm not making that up. (not sure it's valid in the country scope. don't care. it's an example).


This is perhaps the most esoteric production-language I've ever seen.
I dub thy language, "WTF" language!


For the context of these people trying to get FTLs working, we need to get the destination of the player who wants to enter FTL. Well, since there's no way to tell what the player has selecting, state of key actions, or anything of the sort; the main effort has been focused behind using "bypass"'s in 2.0 to determine the coming-from and going-to system. (Basically, gateways for all as a primary mode of travel. as proof-of-concept in "FTL Resoration Project" mod).

Normally behavior is defined in the scripting language and function bindings are used to call internal non-scripted functions. This is where functions(?) like "create_bypass" come in. Instead of this behavior being handled in WTF-language, it's dispatched to the engine itself. (Frankly, not a bad idea since the language is so **** incompetent, but that's a self-made problem and not an excuse).

Using pseudo-gateways, create_bypass (which is a 2.0 thing) would be required to work-around the inability to get FTL destinations. For the life of me and others, we can't get the bloody thing to work. Also, it's not used anywhere in the game files what-so-ever, despite being documented on a wiki and in the devnotes. On top of that, pathfinding is completely zonked from script-land and hard-coded with no bindings and is practically impossible to re-create with any degree of efficeny. (also probably completely impossible due to the limitations of WTF language).

In any other "mod friendly" game, FTL behavior, logic checks, restrictions, behavioral calls and ordering -- would all be handled in the scripting language with practically zero efficiceny cost in the grand scheme of things. But since it's handled hardcoded in engine with some dangling, dead, and completely unused or undocumented "API" calls...

It's easier to hack the game externally to get the behavior you want than it is to mod it in natively, in a so-called "mod friendly" / "mod supporting" game.

I can't tell if it's malice in an attempt to have new behavior restricted to DLC and updates, or sheer incompetence on the side of whoever decided to use WTF-language.

Hell, some of us even want to reverse engineer it and make a process-injected "Stellaris Script Extender" (similar to SKSE for skyrim) because it would probably be easier than dealing with the game's nonsense and would have VASTLY more utility than WTF-language. We decided against it because it would likely take months and be a giant pain in the butt to maintain.

There are far better games to mod where our time will be put to better use.

I have no idea how this game got viewed as a "good modding game", but if you want to do anything beyond the most basic of changes, it's a massive undertaking of work-around ingenuity.

God. What a horrible game to mod for.


Update:

Ryuku has been working on pathfinding for the FTL Restoration Project. The game's pathfinding is hardcoded and it isn't bound to any WTF-Language objects. After quite a few days of trying to find a work-round, Ryuku finally broke through. However, due to the limitations of WTFL, it required over 300 if statements. Obviously this would be near-impossible to tweak and maintain through normal means, so Ryuku wrote a C# program to write the if-statements for him...

namespace ConsoleApplication2 { class Program { static void Main(string[] args) { string currDir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); if (File.Exists(currDir + "\\output.txt")) File.Delete(currDir + "\\output.txt"); FileStream fs = File.Create(currDir + "\\output.txt"); fs.Close(); using (var sw = new StreamWriter(currDir + "\\output.txt")) { for (uint i = 0; i <= 1400; i += 14) { sw.WriteLine("\t\t\t\tif = { limit = { event_target:destination_star = { distance = { source = event_target:current_system min_distance = " + i + " } } }"); sw.WriteLine("\t\t\t\t\troot = { set_variable = { which = currDistance value = " + i + " } }"); sw.WriteLine("\t\t\t\t}"); sw.WriteLine("\t\t\t\t"); } } } } }


THIS IS WHAT I MEAN!
Even the simplest of behavior-related tasks in Stellaris requires a staggering amount of ingenuity and a pain-stakingly massive time investment.

If we had a binding, it would look like pathfind{ from= thing1 to=thing2 }...
If the language worked properly, it would look like https://pastebin.com/cuw8NDKH
But since it doesn't, the result: https://pastebin.com/9ijaPAZr


another (better) example https://pastebin.com/RTuPyyVm
Last edited by Honshitsu; Apr 14, 2019 @ 11:22pm
< >
Showing 1-15 of 113 comments
Fortuna Feb 28, 2018 @ 10:08pm 
Well, you can change the constants -- except of course certain ones that seem intended as a secret. ;-)
Invicta Mar 1, 2018 @ 12:20am 
its like it was written by a lunatic..... (who actually made a line of code that was just the word from 4 times in a row that for some insane reason equals fromfrom like that XD)

now the word from is stuck in my head.
Last edited by Invicta; Mar 1, 2018 @ 12:23am
Drages Mar 1, 2018 @ 12:32am 
I modded some games and looked other modable games too. I wanted to mod stellaris too and i thought it would be very easy and clear to do it because they say Stellaris is mod friendly..

Yeah then i saw this hell.. and this is not the end.. i tried to change constants which are clearly written at modable game files.. and when i tried to change them, i saw they are already HARDCODED..

You can't add different weapon types for example.. becauseeee it's a DLC thing they planned all along!....

Yeah stellaris is not mod friendly.. you need to give your life to crack the code to understand it..then you need to figure out, how to do what you want.. then you need to be sure it's working or not asthey are soft or hardcoded.. you need to do it at every step..

Do not miss ultra stupid visual file systems.. you can't even use normal png/jpg files for 2D aspects of the game!!! You need to change it some lame formats with right options.. then I gave up and respected big mod developers here..
Elementium Mar 1, 2018 @ 12:47am 
In what name ? In name of a balance they didn't even manage to achieve, war system is worse than before a hotfix come better than the current war system but already hated by some people, AI seem to trully cheat, marauder attack you even if you pay them...

If this is their idea for a "balanced" game, I'm quite scared for the following, but they could have keep many player if they didn't delete this.

Perhaps they don't care to abandon the people who enjoy full personnalisation, perhaps they only need the support of the hyperlane only, good for them. I'm happy to not have bought all their DLC in the hope to finance the best sandbox for a 4x I could play...

In fact I switch to Endless Space, if I played a 4x only for the battle system I would have stay on ES2, but right now, this one allow me to at least play my basic playstyle in midgame so... stellaris by removin this feature make the game more restrictive than ES2...
Just because they didn't even let a warp/wormhole mod being not a mess to create.

I hope for them they will succeed with the support of those who stay here....
Honshitsu Mar 1, 2018 @ 12:50am 
Holy crap people are agreeing with me... Normally when I make a rant like that people get very defensive about the game. Guess I struck at an opertune time with the 2.0 nonsense.

Kinda nice for a change...
Last edited by Honshitsu; Mar 1, 2018 @ 12:50am
Nemo, Forevermore Mar 1, 2018 @ 12:51am 
Originally posted by Soketsu:
In what name ? In name of a balance they didn't even manage to achieve, war system is worse than before a hotfix come better than the current war system but already hated by some people, AI seem to trully cheat, marauder attack you even if you pay them...

If this is their idea for a "balanced" game, I'm quite scared for the following, but they could have keep many player if they didn't delete this.

Perhaps they don't care to abandon the people who enjoy full personnalisation, perhaps they only need the support of the hyperlane only, good for them. I'm happy to not have bought all their DLC in the hope to finance the best sandbox for a 4x I could play...

In fact I switch to Endless Space, if I played a 4x only for the battle system I would have stay on ES2, but right now, this one allow me to at least play my basic playstyle in midgame so... stellaris by removin this feature make the game more restrictive than ES2...
Just because they didn't even let a warp/wormhole mod being not a mess to create.

I hope for them they will succeed with the support of those who stay here....

^ Truth.
Nemo, Forevermore Mar 1, 2018 @ 12:52am 
Originally posted by Alæstor:
Holy crap people are agreeing with me... Normally when I make a rant like that people get very defensive about the game. Guess I struck at an opertune time with the 2.0 nonsense.

Kinda nice for a change...

The fanboys are asleep. School in the morning and the bus comes early. They are dreaming of mom's spaghetti.

:zedtriumph::drinkinghorn:
Honshitsu Mar 1, 2018 @ 1:05am 
It's just annoying to me. I always regarded Stellaris as a prime example of the space-RTS' genre. It was my go-to game for newbies looking for this kind of experience. I also promoted the mods as a big selling point. But it seems like they barely but any effort into supporting mods outside of a few simple things they implemented a long time ago. It feels cheap. It feels like they tried to tick a box.
Last edited by Honshitsu; Mar 1, 2018 @ 1:06am
Invicta Mar 1, 2018 @ 1:09am 
Originally posted by Alæstor:
It's just annoying to me. I always regarded Stellaris as a prime example of the space-RTS' genre. It was my go-to game for newbies looking for this kind of experience. I also promoted the mods as a big selling point. But it seems like they barely but any effort into supporting mods at all outside of a few simple things they implemented a long time ago. It feels cheap. It feels like they tried to tick a box.

from what I can tell it seems that the current team also has no care/ a completly diffrent idea for what the game should be compared to what the original team designed. its clear that the team that first worked on it were gearing it more towards asymetric gameplay and player choice, the current team is gearing it more torwards unified tactics across the board, and very little in the way of player choice (all empires are little more then stat buffs and debuffs now with maybe a slight gimmick)
Last edited by Invicta; Mar 1, 2018 @ 1:09am
corisai Mar 1, 2018 @ 1:10am 
Stellaris is by design pile of crutches - it's based on quite obsolete engine that aren't supposed to be used for 3d space game at all. And yes, it's script system is extremly obsolete and designed on fly ages ago.

So nothing surprising about it.

All that mess about "mods friendly" is simple marketing.

P.S. Still disagree about ES2 mentioned here. It's even worse game with even worse dev teams. I really hate them for their save-corrupting bug that existed for ages and get ressurected recently again >_<
RodHull (Banned) Mar 1, 2018 @ 1:20am 
Originally posted by otisjasmodeus:
the current team is gearing it more torwards unified tactics across the board, and very little in the way of player choice (all empires are little more then stat buffs and debuffs now with maybe a slight gimmick)

The modding thing i cant comment on, but this is nonsense. Vanilla stellaris was so generic, sure it had 'moar choice' if your counting ftls types but those choices meant functionally very little, now races actually play very differently, asymetrically one might say, purifiers play very different from devouring swarms, who play differently from curators (etc) in vanilla stellaris for all the weird and wacky portraits most races boiled down to having a small 10% buff to something and that was it they all functioned identically. It was one of the major complaints about its scope from reviews, that despite the options available it all felt very generic and meaningless

Elementium Mar 1, 2018 @ 1:22am 
Originally posted by corisai:
Stellaris is by design pile of crutches - it's based on quite obsolete engine that aren't supposed to be used for 3d space game at all. And yes, it's script system is extremly obsolete and designed on fly ages ago.

So nothing surprising about it.

All that mess about "mods friendly" is simple marketing.

P.S. Still disagree about ES2 mentioned here. It's even worse game with even worse dev teams. I really hate them for their save-corrupting bug that existed for ages and get ressurected recently again >_<

Yeah I played when the save where corrupted in the EA. But I also played the 1st endless space, I replay recently to ES2 and have no problem. I just say their eXterminate aspect is way better than stellaris, and that from the beginning. Also the fact they have the FTL I want, just have to research then move like I want, letting my exploring without the worries to be locked.
Zsrai Mar 1, 2018 @ 1:23am 
It's the same modding "language" that PDS has used in all of their games, going back for... I dunno generations? I think EU2 at least. It's easy to mod because a chimp can write basic events for the game. There is no Creation Kit like Bethesda games, but you can still do entire overhauls (look at all of the major mods for... every other PDS game).
Honshitsu Mar 1, 2018 @ 1:33am 
Originally posted by Zsrai:
It's the same modding "language" that PDS has used in all of their games, going back for... I dunno generations? I think EU2 at least. It's easy to mod because a chimp can write basic events for the game. There is no Creation Kit like Bethesda games, but you can still do entire overhauls (look at all of the major mods for... every other PDS game).

The issue is it's only modifying existing values. You can't change behavior very much at all besides some quite limited logic in the events.

Edit: It's better than nothing. I'd rather have this than a completely hard-coded game... But it's heavily lacking for a "we support modders" kind of game.
Last edited by Honshitsu; Mar 1, 2018 @ 1:37am
Originally posted by RodHull:
Originally posted by otisjasmodeus:
the current team is gearing it more torwards unified tactics across the board, and very little in the way of player choice (all empires are little more then stat buffs and debuffs now with maybe a slight gimmick)

The modding thing i cant comment on, but this is nonsense. Vanilla stellaris was so generic, sure it had 'moar choice' if your counting ftls types but those choices meant functionally very little, now races actually play very differently, asymetrically one might say, purifiers play very different from devouring swarms, who play differently from curators (etc) in vanilla stellaris for all the weird and wacky portraits most races boiled down to having a small 10% buff to something and that was it they all functioned identically. It was one of the major complaints about its scope from reviews, that despite the options available it all felt very generic and meaningless

Generic and meaningless is having very limited FTL options. I see you have glossed over that issue in your breakdown.
< >
Showing 1-15 of 113 comments
Per page: 1530 50

Date Posted: Feb 28, 2018 @ 9:03pm
Posts: 113