Stellaris Dev Diary #204: Scripting Language and Moddability Improvements

  • Crusader Kings II Expansion Subscription

    Subscribe to the CK II Expansion and enjoy unlimited access to 13 major expansions and more!


  • Paradox Space Exploration Sale has arrived! Up to 75% off

    How's the space on your hard drive? Paradox wants to challenge your galaxy brain with a great selection of space exploration games - and they're all on sale for some very down-to-earth prices! The sale runs from May 4th until May 10th at 17:00 CEST / 08:00 PDT.


    May 4th - May 10th
  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

V-Metamorph

Colonel
13 Badges
Feb 7, 2019
1.067
279
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
Hi all! I’m Caligula, our resident scripting language magician. As someone who works with our scripting language - both using it and improving it - on a daily basis, I’m very happy to be able to show off some of the new stuff that modders (and us inhouse) will be able to use going forwards, once the upcoming patch hits.

I’ll begin with a rundown of the new features:
  • Espionage: modders can add new operations, much like arc sites
  • First Contact: script driven, so modders can change much of the system, but all first contact is now technically one long event chain, so overwriting could be an issue. Luckily we have a new effect, “fire_on_action”, which has been inserted into various places that should alleviate this
  • Become the Crisis: code features e.g. the interface are all activated by script. So in theory, one could overwrite the whole feature to be whatever sort of progression to a goal you happen to want to mod in.
  • Emperor/Custodian: feature designed by the most experienced Content Designer at PDS. Brought with it many collateral scripting improvements, such as far more flexibility with galcom resolutions and the ability to spawn federation / community fleets via script.

Now, it’ll be exciting to see what modders do with this, but there’s so much more that we’ve done since 2.8 hit, so...

General improvements and standardisations

It would be fair to say that the Stellaris scripting language has grown incrementally according to the game's needs. This is not unexpected - Stellaris itself has grown incrementally. But it has had the side effect that a lot of different people have contributed to it, and so inconsistencies between different implementations have arisen. On the user side, this would show itself in, for example, things which work in one place but do not work in other, equivalent places.

For the upcoming patch, we had time to take a holistic view of certain things and implement some general improvements and standardisations.

A quick win in this regard is what is known internally as "script lists". These are a code system which generates random/every/any/count_whatever_object from a single section of code - guaranteeing that the way that array is built is the same between them, i.e. any_owned_pop checks exactly the same pops as every_owned_pop would execute on. We have been using these for quite a while, but there were still some very old implementations for certain scopes that predated them. The result of this was in some cases confusion - for example, x_pop and x_planet did sometimes radically different things depending on whether you used every, random, any or count (e.g. working in different scopes, sometimes referring to all the objects in the game and sometimes all of those belonging to the current scope...). Disturbingly, it was found that any_ship referred to "any ship in the game" and was in fact used wrong 100% of the time in our scripts. Another result was that in some cases one of the versions (usually the "count" version) was simply missing.

With the next patch, nearly all of the pre-script list implementations have been removed and replaced with script lists. In some cases, the opportunity was taken to clarify what the script list did, e.g. the "planet" script list is now split between "galaxy_planet" and "system_planet". (This will break some mods, for which I am a bit sorry, but not very :D It was worth it, and the patch notes will give details on what changed. In most cases, a batch-replace will suffice. Also, because of script lists, a fair few count_x triggers have changed names to lose an "s" at the end, which is slightly regrettable from a grammatical point of view). Some have also had some functionalities expanded, e.g. owned_pop, owned_planet and system_within_border now all work in sector scope.

A further area singled out for improvement was references to scopes in effects and triggers, e.g. create_pop = { species = <whatever> }. It turned out that there were quite significant variations as to what <whatever> in that example could be, depending on the effect or trigger. In some cases, only the species was allowed; in others, perhaps species or leader or country or pop; in others, the same but not pops… In some cases, we even used something called “owner_main_species”, which worked in just those places (unlike “owner_species”, which was the same but worked everywhere…). Our solution was to go through each and every trigger and effect and enforce standardisation - with the same code functions used in each case - for any script call to a species, country, planet, leader, or solar system location. No more shall we be confused that something works in one place but not in another!

This also lets us make sure that errors are correctly (and usefully) logged each time a scripter gets one of these wrong. (N.B. for modders not in the know: the error log can be found in Documents/Paradox Interactive/Stellaris/logs/error.log). In a similar vein, error logging has generally been improved across the whole scripting language. A large number of error messages lacking essential information (e.g. file location) have been updated to include that - as guardian of our overnight testing error logs, I have gone on a personal crusade against useless error log messages. Furthermore, we have fixed a disturbing number of cases where something didn't work but didn't warn you - e.g. doing something wrong in a trigger so it is always false, or messing up an effect so it did nothing. I'm not going to promise that this will never happen anymore, but a concerted effort has been made to eliminate such cases. Modders should expect the error log to warn them of a lot more issues both during startup and during the campaign. This has also made us somewhat more effective in fixing script bugs, since many more are now caught in the aforementioned overnight tests.

Variables

Onto something a bit different. On Stellaris, inhouse scripters and modders alike have long looked with envy upon the capabilities of the newer PDS game engines, compared to our own ability to do maths in script. We did have variables, but their functionality has been a bit more limited than we may have desired. In fact, I’ve seen some of the ways that modders get around their limitations, which have been incredibly motivating to make such horrible scripts no longer be necessary!

In 2.8, the following was possible with variables:
  • You can check, set, add, subtract, divide or multiply variables against values, other variables on the same scope, or the same variable on other scopes
  • You can export various galaxy generation settings as variables
  • You can refer to variables in localisations, but if the variable’s value is 0, it will show as blank because the variable is cleared
  • Variables can be used as a parameter in a handful of places, such as the count in a “while” effect

Quite a lot of improvements have been made since then, and further ones are planned for the near future. In the upcoming patch:
  • You can also check, set, add, subtract, divide or multiply variables against different variables on other scopes
  • There are new effects to modulo (% operator), round up, round down and round to the closest full number
  • A new trigger check_variable_arithmetic checks the value of a variable if you’d perform some arithmetic to it in a certain way, e.g. multiply it by another value or variable (add, subtract, multiply, divide and modulo all work)
  • New effects to export various game values to variables have been added. These are: export_modifier_to_variable (check_modifier_value trigger also exists now), export_resource_stockpile_to_variable, export_resource_income_to_variable
  • add_modifier, add_resource, resource_stockpile_compare now have “mult” parameters where a variable is accepted. So you can scale resource costs and bonuses in effects by a variable now.
  • Variables are no longer cleared when they are 0, but instead when you use the clear_variable effect, so they can be reliably used in localisations.
  • Certain usages of variables now have error logging, in case you try and use one that hasn’t been set.

Additionally, we have started making it possible to use variables way more widely. The idea is that we want to change how simple numerical effects and triggers (i.e. ones which accept a number as the right hand side parameter and do not have any “{ }”) work:
  • Effects should allow you to use a variable, and should grab the number from that variable
  • Triggers should also let you use a variable, and should check themselves against the value of that variable
  • Triggers should by default also let you check them against another scope for which that trigger would work. So “num_pops > from” should check if the current object has more pops than “from” does
  • It should be possible to export the current value of a trigger to a variable via an effect, i.e. “export_trigger_value_to_variable = { trigger = num_pops variable = my_var }” => sets the my_var variable to the number of pops the current scope has.

Unfortunately, it only recently became possible for us to pursue these changes, and while the groundwork has been set for them, they are not yet fully implemented - finishing the Nemesis expansion and accompanying patch has rightly taken priority (the changes are not without danger: it’s a lot of lines of code that have to be modified for it). So consider this a preview for how it will look in the hopefully near future, and in the meantime, the fleet_power trigger already works in the way specified, and export_trigger_value_to_variable is in the patch, albeit working with only that trigger.

Button Effects

Inhouse, we made the UI by assigning a function to buttons in the source code. But there’s also support for interface buttons that you mod into the game. In previous versions, these did not take the scope of the object that they were attached to, so if you added a button to a planet, it would still execute the effect on your country rather than that planet. We have fixed that for a bunch of cases: they will now be able to deduce their interface's planet, fleet, ship, system, ambient object, megastructure, federation, archaeology site, first contact site, spy network or espionage operation. (Incidentally, debug console commands like “effect …” and “trigger …” now work in those same scopes)

Disclaimer: The way it works is a tad hacky and it may be possible to confuse it by opening multiple interfaces at once. I recommend checking “is_scope_type = planet/whatever” in the allow and/or effect sections of the button effect. But the signs are that it should work with no problem in most cases, which is better than none!

More nice things
  • In most places where you could previously use logical operators such as >, >=, =<, <, you can now use != for “is not equal” too.
  • Message types now have their own folder, so mods can add to them without overwriting the file (great for intermod compatibility, and also for modders being able to add QoL without overwriting each other)
  • Messages spawned by the create_message effect now support using loc commands such as [This.GetName] (where “This” is the specified target of the message).
  • Also, since we had to fix a large number of cases where there were references to the “Galactic Community” rather than the “Galactic Imperium”, [ ] locs now work in quite a variety of extra places.
  • The effects “add_victory_score = <number>” and “win = yes” now exist. I’m sure no one will misuse them.
  • Added new event types: leader_event, system_event, starbase_event, first_contact_event, and espionage_operation_event. Though mean time to happen does not work for any of them at the moment - fixing that wasn’t a priority, as it is generally better to avoid mean time to happen anyway.
  • Hardcoded juggernaut behaviour is now tied to a ship size being a starbase that is mobile, rather than the “juggernaut” key. I.e. mod-made juggernauts are now possible without crippling bugs
  • It’s now possible to hide a static modifier from the list of country modifiers
  • You can check the distance of objects within the same solar system now by adding “same_system = yes” to the distance trigger
  • There’s quite a lot of new on_actions, and you can make your own ones with fire_on_action effect
  • And a lot more.

Finally, I'll leave you with the new trigger docs (as of today), which are now found in their own file called trigger_docs.log, and which really speak for themselves. Also, don't forget Paradox Insider will premier this Saturday at 8 PM CET (7 PM UK, 2 PM ET, 11 AM PT) on http://twitch.tv/twitchgaming
Technical, but from what i could understand this is a huge boost to not only this release, but the next ones, and modders too.
 
  • 5Like
Reactions:

Inny

Sergeant
51 Badges
Mar 31, 2013
72
71
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Sword of the Stars II
  • Majesty 2 Collection
  • Magicka
  • Leviathan: Warships
  • Knights of Pen and Paper +1 Edition
  • King Arthur II
  • Europa Universalis IV: Conquest of Paradise
  • A Game of Dwarves
  • Europa Universalis III
  • Dungeonland
  • Stellaris: Necroids
  • Age of Wonders
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Surviving Mars: Digital Deluxe Edition
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Galaxy Edition
  • Europa Universalis IV
  • The Showdown Effect
  • Warlock: Master of the Arcane
  • War of the Roses
  • Pillars of Eternity
  • Knights of Pen and Paper 2
  • Stellaris
  • Stellaris: Galaxy Edition
  • Age of Wonders III
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Crusader Kings Complete
  • Surviving Mars
  • Tyranny - Bastards Wound
  • Stellaris: Ancient Relics
  • Stellaris: Distant Stars
I'm not sure I know what you mean, would that be like saying "my_trigger = yes" where "my_trigger" does not exist?
Yes, this happens when a mod uses triggers from other mods, if one of the mods is not present, the trigger won't exist, and should return false. Instead, it is always true.
We have to sanitize the code to also check for a global flag to be sure the other mod is present, but if one mod doesn't have a global flag set at startup, were're basically stuck with an unusable trigger. This would improve compatibility a lot.
 
  • 6
  • 1Like
Reactions:

Olterin

Colonel
68 Badges
Jul 15, 2015
852
1.576
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Parklife Pre-Order
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Stellaris: Distant Stars
  • Stellaris: Federations
  • Surviving Mars
  • Cities: Skylines - Parklife
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Crusader Kings II: Holy Fury
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Conclave
  • Europa Universalis IV
  • Europa Universalis IV: Golden Century
  • Stellaris: Megacorp
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Victoria 2
  • Europa Universalis 4: Emperor
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Surviving Mars: First Colony Edition
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings III
  • Stellaris: Lithoids
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Europa Universalis IV: Cossacks
  • Stellaris
  • Stellaris - Path to Destruction bundle
Ahhh excellent, a dev diary addressing tech debt! The stuff of dreams this is - good to hear about it. Though not a modder myself, I am looking forward to the reduction in accidental bugs this is sure to bring.
 
  • 8Like
  • 2
Reactions:

ThexLoneWolf

Recruit
19 Badges
Oct 22, 2019
5
1
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Surviving Mars: First Colony Edition
  • Prison Architect
  • Stellaris: Megacorp
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Stellaris
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Surviving Mars
  • BATTLETECH
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Synthetic Dawn
  • Stellaris: Ancient Relics
I am sorry to be stupid but I cannot understand a single term in this dev diary. Can anyone explain in short sentence. What is the script?
In a nutshell, they've standardized some of Stellaris' scripting language and added in new scripting keywords for modders to mess around with. Some existing mods will break due to these changes, so expect that logging in after the patch drops.
 
  • 1Like
Reactions:

UTPriest

Recruit
48 Badges
Feb 21, 2019
2
2
  • Imperator: Rome
  • Stellaris: Leviathans Story Pack
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun: Dragonfall
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall - Revelations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Battle for Bosporus
  • Stellaris: Necroids
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Mount & Blade: Warband
  • Cities: Skylines
  • Warlock: Master of the Arcane
  • Victoria 2
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Victoria: Revolutions
  • Sword of the Stars II
  • Stellaris: Megacorp
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Pillars of Eternity
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II
Is there anything equivalent to the trigger doc here for modifiers? It would be nice to have a consolidated list for modding civics/origins. I've seen one on the wiki but it doesn't seem to be maintained through 2.8.3.
 

FiddleSticks96

Colonel
16 Badges
Sep 28, 2017
1.135
285
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Sword of the Stars
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
This is all very technical and most of it is over my head, but it sounds like the engine was polished.

@Caligula Caesar Could you provide an example of something these changes will allow you to do? Something that you and the team wanted to do before, but couldn't until now.
 

Ryika

Major
48 Badges
Apr 16, 2018
716
1.146
In 2.8, the following was possible with variables:
  • You can check, set, add, subtract, divide or multiply variables against values, other variables on the same scope, or the same variable on other scopes
  • You can export various galaxy generation settings as variables
  • You can refer to variables in localisations, but if the variable’s value is 0, it will show as blank because the variable is cleared
  • Variables can be used as a parameter in a handful of places, such as the count in a “while” effect
I'm literally crying right now. This is like three Christmases happening simultaneously, without Corona Regulations, and with Uncle Alfred not being a creep for once.
 
  • 11Haha
  • 3Like
  • 1
Reactions:

FiddleSticks96

Colonel
16 Badges
Sep 28, 2017
1.135
285
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • BATTLETECH
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Sword of the Stars
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
I'm literally crying right now. This is like three Christmases happening simultaneously, without Corona Regulations, and with Uncle Alfred not being a creep for once.

What would those changes allow you to do from a modding perspective?
 

Unendingfear

Second Lieutenant
52 Badges
Mar 26, 2014
123
168
  • Crusader Kings II: Charlemagne
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Rights of Man
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Sign Up
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Lithoids
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Federations
  • Stellaris: Necroids
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
Question personally related to one of my little mods; have there been any updates to the “any_owned_species” function? I have a mod that adds a new faction and the checks all broke when I switched any_owned_species in for any_owned_pop.
 

OldEnt

First Lieutenant
44 Badges
Aug 12, 2019
241
314
  • Magicka
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Dharma
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Necroids
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Pre-order
  • Stellaris: Megacorp
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
Is there anything equivalent to the trigger doc here for modifiers? It would be nice to have a consolidated list for modding civics/origins. I've seen one on the wiki but it doesn't seem to be maintained through 2.8.3.
You can generate them yourself in game via console command or use my GitHub library specifically for that. Today's trigger_doc document is on beta branch.


Question personally related to one of my little mods; have there been any updates to the “any_owned_species” function? I have a mod that adds a new faction and the checks all broke when I switched any_owned_species in for any_owned_pop.
Check my messages in this thread, the one on the first page links you to a comparison between 2.8.1 and the new one.
 
  • 3
Reactions:

Mr. Morague

Second Lieutenant
13 Badges
Dec 19, 2017
127
27
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
  • Stellaris: Synthetic Dawn
I've only been able to skim through the docs, but I saw some interesting stuff with ship designs. Is it possible to copy an empire's ship design via an event now?
 

Colonizor48

Colonel
12 Badges
Feb 5, 2021
837
817
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
Its kinda sad that most of this stuff will be used to make redundant anime mods instead of being used to do cool new stuff.(mostly kidding but partly serious) Still awesome and a step in the right direction.
 

Dragatus

Field Marshal
34 Badges
Jul 29, 2015
5.456
3.513
  • Crusader Kings II
  • Stellaris: Necroids
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Stellaris: Ancient Relics
  • Stellaris
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Megacorp
  • Age of Wonders III

Dekent

Second Lieutenant
102 Badges
May 12, 2002
193
62
Visit site
  • Warlock 2: The Exiled
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Europa Universalis III Complete
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Stellaris: Necroids
  • Divine Wind
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Ancient Space
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
So mods will be extra broken but the great ones that come back will be stronger than ever.

At least that's how I read this, it went over my head too lol
 
  • 1
Reactions:

Dr_Quackzalver

Recruit
35 Badges
Apr 14, 2019
1
3
  • Stellaris: Distant Stars
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Warlock: Master of the Arcane
  • Europa Universalis IV: El Dorado
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Res Publica
  • Magicka
  • Impire
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Dungeonland
Good to see some effort being put towards addressing tech debt and getting a better error log. I don't know how bad this one was, just wish I got to improve the ones I've worked with. ;)
 
  • 3
Reactions:

Unendingfear

Second Lieutenant
52 Badges
Mar 26, 2014
123
168
  • Crusader Kings II: Charlemagne
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Rights of Man
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Prison Architect
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Sign Up
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Distant Stars
  • Cities: Skylines - Parklife
  • Stellaris: Lithoids
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Federations
  • Stellaris: Necroids
  • Crusader Kings II: Monks and Mystics
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV
Check my messages in this thread, the one on the first page links you to a comparison between 2.8.1 and the new one.
Ah, thanks for the write up there. I'm a very novice level coder though so I'm not exactly sure what the differences therein entail.

New version is:
Code:
any_owned_species - Check if any of the species <on the planet/in the country> meet the specified criteria - checks whether the enclosed triggers return true for any of them
any_owned_species = { <count=<num/all>> <triggers> }
Supported Scopes: planet country

Old version is:
Code:
any_owned_species - Check if any of the species <on the planet/in the country> meet the specified criteria
any_owned_species = { <triggers> }
any_owned_species - Check if any of the species <on the planet/in the country> meet the specified criteria - checks whether the enclosed triggers return true for any of them
any_owned_species = { <count=<num/all>> <triggers> }
Supported Scopes: planet country
Supported Targets: THIS ROOT PREV FROM OWNER CONTROLLER CAPITAL SOLAR_SYSTEM LEADER RANDOM FROMFROM PREVPREV PREVPREVPREV PREVPREVPREVPREV

Are you able to summarize the difference here for me?
 

mial42

Colonel
16 Badges
Sep 28, 2020
1.072
2.073
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Horse Lords
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Stellaris: Necroids
PSA for any modder: looks like every_planet and any_planet will no longer work, as they have been replaced by _galaxy_ every/any planet.
Lesser scopes are still here.
random_planet is gone and replaced as well with _galaxy_
Just to be clear, does this apply to every_owned_planet and any_owned_planet?