General Modding

Scripted Triggers & Effects, Chained Event Targets

Code: from = { owner = { establish_communications = root } }

Code: from.owner = { establish_communications = root }

Anomalies

\Stellaris\common\anomalies\00_anomaly_categories.txt \Stellaris\common\anomalies\00_anomalies.txt \Stellaris\events\00_anomaly_events.txt \Stellaris\localisation\events_l_english.yml

Hello, earthlings. My name might be unfamiliar to some dev diary readers; I’ve been working on Stellaris for some time now and am in charge of scripting/content design duties for Stellaris while the eminentis away rearing his brood. This week’s dev diary is the first in a two-part series on modding, which you will read, enjoy, and be enlightened by. We’re here to get our hands dirty, so don’t expect any pretty screenshots! Only functional screenshots.Stellaris is built on the Clausewitz engine, and has had a lot of functionality ported over from our other games. Since we use a random galaxy generated at game start (unless you mod in a static one) we have to approach things a bit differently than you would in a game with a pre-set map of Europe - if you’ve modded a Paradox Development Studio title before you may come across a few surprises, but you should feel right at home soon enough.Like our other games, Stellaris is very mod-able. Take a look in thefolder and you’ll see. It contains mostly everything that determines how the game functions. Edicts, ethics, game rules, army attachments, name lists, country types, planet classes, modifiers, buildings and so on can all be found here. Inyou will find a LUA script file that regulates a lot of basic game behaviors and settings, like the base soft cap on the number of core planets () or the camera field-of-view () available for easy tweaking. Most of these values come with fairly informative comments!We recently inherited scripted triggers and effects from Hearts of Iron IV! They’re very good. One addition to the scripting language that originated in Stellaris and may or may not find its way to other games in the future is event target chaining. It allows us to chain targets/scopes/saved event targets together in a way not unlike how we do it in localization. For example, what was once writtencan now be rendered as the much more digestibleAmazing!Swiftly moving on to Anomalies, the lifeblood of early game exploration in Stellaris. Incidentally, anomalies are also rather unlike the events found in our other games You can and should make your own! I will show you how.An anomaly is made up of a minimum of four components; the anomaly category, the anomaly, the event and localization.Anomaly categories define what planets are viable for a certain category of anomalies to spawn on. Anomalies refine this selection further and link to specific events. The event that is eventually fired… does stuff. The localization file provides the text for the event and the category window.I feel that a picture is worth more than a thousand words, so I’m going to show you pictures of words to maximize efficiency. See if you can follow along!And the end result!That’s all for now, planet-dwellers. Next week, art director Aerie will explain how to get your own art into the game. Exporters! Graphics! Spaceships