StellarStellaris
Overview
In default (unmodded) Stellaris, when a player conquers a primitive planet (or ringworld segment), he/she is given free districts based on the number of Pops conquered. The city districts are the wrong type for machine and hive empires, and players receive farming districts on worlds that previously housed a lithoid primitive civilization. Despite some changes in 3.2 "Herbert" for infiltrated and enlightened primitives, most primitives still do not receive districts based on what food they consume. The AI does not receive any bonus districts or buildings except for primitive enlightenment.

It's my opinion that these free districts represent repurposing existing infrastructure for the conqueror's use. To that end, this mod gives the proper type of city, nexus, or hive districts as appropriate for the conquering empire type. Second, planets (or ringworld segments) inhabited by lithoid civilizations receive mining districts (or extra ringworld housing) as opposed to farming districts/segments. Rogue servitors get organic sanctuaries instead of some of the nexus districts, because preserving some developed areas allows bio-trophies to live in their "natural habitat." Finally, the AI benefits from these free districts in order to even the playing field.

A Bit More Detail
This mod started as a response to four very specific, small areas:
[olist]
  • When conquering primitive planets, human players get free districts to employ about half the population, but the AI does not
  • Machine Empires and Hive Empires were given city districts instead of the appropriate nexus or hive districts
  • When conquering a lithoid primitive planet, the player is given farming districts, which lithoids wouldn't need
  • Necrophage AI players have a special helper event to gain control of primitives, but it is not actually conquest and thus misses out on some things
  • [/olist]
    To address these issues, this mod implements free districts upon conquering a primitive planet for both players and AIs. It also generates the appropriate housing/urban districts based on the conquering empire (including some organic sanctuaries for Rogue Servitors). Mining districts are generated instead of farming districts if the conquered primitive species is lithoid. Finally, it triggers the aforementioned free district creation in the Necrophage AI helper event, primitive infiltration, and primitive enlightenment (including advancing on their own). In combination, these changes should help AI players be a bit more successful when acquiring primitive planets.

    While maintaining and enhancing this mod, still more places were discovered where the game did something different when converting primitives for use by a regular empire. The For the "Technological Enlightenment" observation station mission, a fixed amount of districts and buildings (including a branch office building, which was probably intended to be Commercial Zones instead) were generated. Colossus weapons that transferred planet ownership (built-in: the Nanobot Diffuser and Deluge Machine) also failed to generate infrastructure to replace the primitive buildings.

    This mod continues its trend of unification by hooking up the enlightenment finisher event and colossus weapon firing events to the same district-generation code as primitive conquest - thus ensuring enlightened or converted primitives receive infrastructure. The "primitives can into space" event also controls the planet infrastructure self-enlightened primitives receive. The districts available on shattered ring world "planets" better match the level of development primitives can achieve, so primitive ringworlds are now converted to shattered ringworlds upon conquest/infiltration/etc. Don't forget that the Sanctuary ringworld is stocked with 4 primitive empires ripe for conquest enlightenment.

    Changes
    This mod replaces six events from the base game: action.14, action.140, necroids.6, observation.3009, and primitive.16, and primitive.17. The action events are responsible for the standard military conquest of primitives, the necroids event is responsible for necrophage auto-conquest, the observation event is responsible for primitive infiltration, and the primitive events are related to technological enlightenment. These events are now altered to invoke the same code for generating buildings and districts.

    Most of the new custom logic is implemented outside of these events. This mod adds two custom on_actions: on_primitive_planet_transferring that fires before planet ownership changes and on_primitive_planet_transferred that fires after planet ownership changes. District/building generation is triggered by on_primitive_planet_transferred. The most useful part of all of this is that you can make other mods tie in to these on_actions to create new effects when primitives are conquered/infiltrated.

    Localisation

    Known Issues
    Due to how events are loaded by Stellaris, the file from this mod is named to load before the base game files. Events with duplicate IDs generate entries in the error.log file (and the first one loaded is used), so this mod is expected to generate six error lines that look similar to this:

    [01:33:07][eventmanager.cpp:355]: an event with id [necroids.6] already exists! file: events/necroids_events_1.txt line: 548
    [01:33:07][eventmanager.cpp:355]: an event with id [observation.3009] already exists! file: events/observation_events.txt line: 4480
    [01:33:07][eventmanager.cpp:355]: an event with id [action.14] already exists! file: events/on_action_events_1.txt line: 5824
    [01:33:07][eventmanager.cpp:355]: an event with id [action.140] already exists! file: events/on_action_events_1.txt line: 5890
    [01:33:07][eventmanager.cpp:355]: an event with id [primitive.16] already exists! file: events/primitive_events.txt line: 304
    [01:33:07][eventmanager.cpp:355]: an event with id [primitive.17] already exists! file: events/primitive_events.txt line: 629

    Compatibility
    You do not need the Necroids or Lithoids content packs to use this mod.

    This mod should be widely compatible with other mods. Incompatibilities would only occur if other mods also overwrite the same event IDs. If another mod is attempting to make changes to primitive planet conquest but uses a different method (for example, adding new events activated by on action events such as on_planet_transfer, on_planet_conquer, or on_planet_attackers_win) the end result could be extra districts or other nonsensical behavior after both mods apply their effects.

    Built for Stellaris version 3.4 "Cepheus." Not compatible with achievements.

    When to Install
    This mod can be safely added or removed from your savegame after the game has started. It is implemented entirely through custom events, on actions, and effects. If you remove it, your game will work normally.

    Changelog
    See Change Notes

    Source Code
    Hosted on Github

    TitlePrimitive Conquest Enhancements
    Steam ID2488154830
    Steam App281990 (steamDB)
    Steam Manifest/UGC1028067048608770765
    Creator SteamID76561198040838605
    Steam Created2021-05-15T18:22:26+00:00
    Steam Updated2022-05-23T04:30:22+00:00
    Steam Updated relative1603.9 days ago
    Revision #28
    Revision archived?Yes (fetch: 2022-05-25 01:53:11)
    Revision file date2022-05-23 04:30:21
    Tracked Steam files6
    Tracked mod files10
    Mod size330.69 KB

    Tracked mod revisions

    Title Revision # Archived? Size Metadata created Metadata last updated
    Pre-FTL Conquest & Infiltration: Enhanced 40 NO 0 B 2023-07-02 20:24:15 2026-10-10 23:05:01
    Pre-FTL Conquest & Infiltration: Enhanced 40 Yes (fetch: 2023-07-03 22:46:04) 326.82 KB 2023-07-02 20:24:15 2026-10-10 23:05:01
    Primitive Conquest Enhancements 33 Yes (fetch: 2023-01-09 17:29:02) 328.19 KB 2023-01-09 17:11:46 2023-02-07 19:05:01
    Primitive Conquest Enhancements 32 Yes (fetch: 2023-01-04 16:13:38) 327.77 KB 2023-01-04 16:12:36 2023-01-09 22:05:02
    Primitive Conquest Enhancements 31 Yes (fetch: 2022-12-19 01:12:48) 326.84 KB 2022-12-19 01:11:21 2023-01-04 16:05:02
    Primitive Conquest Enhancements 28 Yes (fetch: 2022-05-25 01:53:11) 330.69 KB 2022-05-25 01:12:41 2022-12-19 06:05:01
    Primitive Conquest Enhancements 27 Yes (fetch: 2022-05-12 13:35:22) 329.98 KB 2022-05-12 13:14:32 2022-05-22 23:05:02
    Primitive Conquest Enhancements 26 Yes (fetch: 2022-04-14 12:52:35) 329.23 KB 2022-04-10 02:57:03 2022-05-12 17:05:03


    Mod File inventory

    Path Extension File Count File Size
    common/on_actions txt 2 1.15 KB
    common/scripted_effects txt 1 6.87 KB
    common/scripted_triggers txt 1 5.24 KB
    events txt 2 27.31 KB