Dev Notes: Notes to self - openly-retro/stellaris-machine-robot-expansion GitHub Wiki

Notes to self:

Quick references for renames:

Placeholders for monkeypatching the plumbing so it works again There are only 4 subclasses per class to go around, some of the previous ones will have to go.

3.9 -> 3.10

subclass_scientist_analyst -> subclass_scientist_scholar
subclass_scientist_explorer -> (same)

subclass_governor_pioneer -> subclass_official_governor
subclass_governor_economist -> subclass_official_economy_councilor
subclass_governor_visionary -> subclass_official_diplomacy_councilor
subclass_governor_? -> subclass_official_delegate

3.10 veteran classes:
subclass_commander_general      subclass_scientist_explorer
subclass_commander_councilor    subclass_scientist_councilor
subclass_commander_governor     subclass_scientist_governor
subclass_commander_admiral      subclass_scientist_scholar

subclass_official_economy_councilor
subclass_official_diplomacy_councilor
subclass_official_governor
subclass_official_delegate

3.9 veteran classes:
subclass_general_invader    -> subclass_commander_general
subclass_general_protector  -> subclass_commander_governor
subclass_general_none       -> subclass_commander_none  <- check for dupes
subclass_general_marshall   -> X (subclass_commander_general) <- dupes

subclass_admiral_strategist -> subclass_commander_councilor
subclass_admiral_aggressor  -> X (subclass_commander_admiral) <- dupes
subclass_admiral_none       -> subclass_commander_none  <- check for dupes
subclass_admiral_tactician  -> subclass_commander_admiral

Names for a group of modders dedicated to reviving old mods:

Stellaris Mod Resupply (or Refurbishing) Fleet: (SMRF)


Collect base game traits files and convert the data to something we can iterate over (WIP)

The traits files we will process for this mod are in base Stellaris, under \common\traits:

  • 00_admiral_traits.txt
  • 00_general_traits.txt
  • 00_generic_leader_traits.txt
  • 00_governor_traits.txt
  • 00_scientist_traits.txt
  • 00_starting_ruler_traits.txt

Open your favorite terminal. Make sure Python 3.12+, pyyaml are installed

  1. Convert a Stellaris Clausewitz traits file to "something resembling YAML"

If you use this converter on anything but a traits file, expect to get useless garbage back.

python .\mre_code_tools\stellaris_yaml_converter.py --infile <STEAM_INSTALL_FOLDER>\steamapps\common\Stellaris\common\traits\00_governor_traits.txt -o "00_governor_traits_parsed.txt"

We'll do this for each traits file.

Further trim down and sort data into a simple format we can later iterate over to generate GUI code, effects code, and tooltips (WIP)

  1. Crunch the traits in this converted file:
  • Trim down the trait data to just the values we care about
  • Sort traits into the three classes
  • Duplicate common traits if a trait can be applied to more than one type of leader class
  • Output as YAML for smaller file size

python .\mre_code_tools\stellaris_trait_cruncher.py --infile .\00_governor_traits_parsed.txt --outfile 00_useful_governor_traits.yaml

Sort and merge files

There isn't a script for this, there is a method in the pipeline script.

Regex-fu

Find trait modifier translation keys that are uppercase: MOD_([A-Z_]*:\d\s)

Code idiosyncracies

log = "Clicked Leader Assembly button. Want to deduct [This.xvcv_mdlc_leader_making_trait_costs_count_alloys] alloys." <-- correct. Using $ is not

Gestalt node portraits

located in \Stellaris\gfx\models\portraits\paragon

Amenities vs CG

Amenities: services like libraries, gym, laundromat, school

Consumer goods: soap, tools, clothing

this is great news

I finally figured out how XVCV's original system for world machines, the heating/cooling penalty/bonus, works. no custom planet modifier is needed because xvcv_mdlc_world_machines_districts is declared in economic categories. each district has a triggered modifier that increments/decrements the mult for the economic category.. that is how the world-machine districts decrease output and cooling districts increase it.