• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Pancakelord

Lord of Pancakes
44 Badges
Apr 7, 2018
3.375
12.292
  • Cities: Skylines - Green Cities
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Ancient Relics
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Imperator: Rome
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Cities: Skylines Industries
  • Imperator: Rome Deluxe Edition
  • Magicka: Wizard Wars Founder Wizard
  • Stellaris: Nemesis
  • Europa Universalis IV
  • Stellaris: Necroids
  • Sword of the Stars
  • Crusader Kings III
  • War of the Roses
  • Cities: Skylines
  • Stellaris: Federations
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris: Lithoids
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Stellaris - Path to Destruction bundle
  • Stellaris: Megacorp
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • Sword of the Stars II
  • March of the Eagles
  • Darkest Hour
Hello, i've been working on something i've had on my mind for a while. Essentially a feudal civic overhaul that allows you to use branch offices to spawn, what I'm calling, "Knightly Orders". Script/edict driven special vassals that spawn in their ships & certain space stations - yes it's bootleg holy orders from crusader kings. + Other changes to vassals generally.

My eventual plan is to have an archaeology-like chain tracking the orders founding
Development of the order.
  • You create one by giving over a branch office,
  • an event spawns each building once every few years, with it informing you of the progress.
  • They'll spawn knight armies and follow you into wars.
  • Then they raise funds for an "order" enclave station in the system from the branch office.
  • Once it's finished they'll spawn ships and guard your space. Their ships will follow you into wars at this point.
  • And they may go on quests e.g. killing a drake, recovering a relic or crusades Vs xenos, machines, whomever you tell them to.
  • You can give them more branch offices to increase their fleetpower as time goes on.
  • Or put them out for hire in wars not against yourself. Earning cash whenever an AU hires them.
  • You can also tell them to build defense stations in certain chokepoint systems (the old military stations)
.

It's rough, but got everything in place and working... sort of.
Screenshot (4605).png
Screenshot (4606).png
Screenshot (4607).png
Screenshot (4608).png
Screenshot (4609).png
Screenshot (4610).png
Screenshot (4611).png


I use a decision to create a shiny new empire with a special "Country_type", assign it the local branch office, civics etc, and then 1 tick/ later it vanishes/despawns.

Now I know the regular empire has a property to kill any empires that have no colonies. However my special "knightly order" country type disables that. This is what the faction block looks like.
Code:
    faction = {
        auto_delete = no                #if yes, country will be automatically be deleted when considered dead ( usually when out of colonies and colony ships ). Should be yes in most cases but can be useful to turn off for some countries that are created by events.
        needs_border_access = no            #decides if a country needs to have explicit border access from another country to enter its borders.
        generate_borders = no                #decides if a country generates borders or not
        needs_colony = no                #decides if a country needs a colony ( or a colony ship ) to be considered alive.
        primitive = no                    #primitive countries can have observation stations build by others in orbit of their planets
         hostile_when_attacked = yes            #toggles if country turns hostile against attacker.
        #show_borders_in_us = no                #if no, borders for countries of this type will not be shown if in uncharted space
    }

Now i think somethings gone wrong, and ive got 3 ideas so far:
  1. The auto_delete = no and/or needs_colony = no doesnt work - unlikely as global_events does that too.
  2. somehow those above two properties are being switched back to yes by the game (idk how but read that faction variables can be changed midgame) if so, would moving them outside/above the faction block prevent that?
  3. the knightly_order is not allowed to hold branch offices so its being killed off?
Here is the create country script I use, also:
Code:
create_country = {
                auto_delete = no
                name = "The Order of Light" #random            #### GIVE CUSTOM ORDER OF '[PHENOTYPE DEPENDANT]' NAME
                name_list = from.name_list
                ship_prefix = "Ser"
                #ignore_initial_colony_error = yes
                #day_zero_contact = no
                authority = auth_dictatorial
                species = event_target:overlord_species
                flag = random
                ethos = random
        
                origin = origin_knightly_order_npc
                civics = {
                    civic = civic_oathbound_institution
                    civic = civic_knightly_order
                }

                effect = {
                    copy_ethos_and_authority = event_target:overlord_emp
                    set_subject_of = { who = event_target:overlord_emp subject_type = knightly_order }
                    copy_techs_from = { target = event_target:overlord_emp }
                    set_country_type = knightly_order
                }
        }
Even if I comment out "set_country_type = knightly_order" I still get the destruction of the order, so I dont think it's related to the country type specifically (probably defaults to default, when not specified)

I also own all DLC (i.e. inc. megacorp) and am getting no meaningful errors in the error log for this (just it moaning about localisation strings).

Anyone have any ideas on how to get my knightly order to stop vanishing after a single day?

Edit: Half fixed it, the empire hangs around now, but the branch office is still immediately deleted.
1612071172090.png

When I tag to the KO I see it cannot hold a branch office (probably a game rule or pulsed/housekeeping-event that wipes out the one my event is creating then? - figures in pic are intentional, I dont want the order to expand on its own, the feudal realm gives it land.)
 
Last edited:
In the game rules file search for “branch” I believe that has the coding to limit branch offices
 
In the game rules file search for “branch” I believe that has the coding to limit branch offices
Yeah I eventually figured it out, however it appears there is no set of instructions to spawn buildings (not like you can with planets and starbases) unless there is a special way to select branch office building slots rather than planetary ones?

The idea I was going for was to bypass the economy and have code spawn in sets of buildings (Knight command, barracks etc) rather than the AI electing what to build with resources
 
Yeah I eventually figured it out, however it appears there is no set of instructions to spawn buildings (not like you can with planets and starbases) unless there is a special way to select branch office building slots rather than planetary ones?

The idea I was going for was to bypass the economy and have code spawn in sets of buildings (Knight command, barracks etc) rather than the AI electing what to build with resources
Try using the following:

add_building = <building_key>

Theoretically if the knightly order buildings are set to be branch office buildings they should fall into the right slots.
 
  • 1
Reactions:
oh interesting, I didnt think the system would be intelligent enough for just working off the BO_flag to be valid. I'll give it a go.
Careful, I wouldn’t be using the term “intelligent”, if it works, it works. Let’s not get too hasty ;)
 
  • 1Like
Reactions: