# Economic Categories # ----------------------- # # Economic categories are used to categorize *everything* that produces or consumes resources of any kind. # The player country, buildings, planets, ships, jobs and megastructures all use categories, defined in the objects themselves with: # category = # # Categories are used to: # - Generate new modifiers # - Help the AI plan its economic budget (defined in ai_budget) # # # GENERATING MODIFIERS FROM ECONOMIC CATEGORIES # ----------------------- # Modifiers generated from an economic category are applied to every single building/planet/job/etc part of said category. # For example, planet_miners_minerals_produces_mult will increase the production of every job in the planet_miners category, like # miners, scrap miners, mote harvesting drones etc. # # Let's say I want to make a new modifier to specifically increase the output of scrap miners. # I create a new economic category, set planet_miners as the parent category, and generate the modifier: # # planet_scrap_miners = { # parent = planet_miners # generate_mult_modifiers = { # produces # } # } # # I then find the scrap_miner job (in pop_jobs) and change its category from planet_miners to planet_scrap_miners. # Since planet_scrap_miners is a child of planet_miners, Scrap Miners will now receive the effects of both # planet_miners and planet_scrap_miners modifiers. # IMPORTANT! _add modifiers don't apply to children categories, only _mult ones do. This is working as intended. # Limiting _add inheritance is necessary to avoid unintentional cascade effects. # # You can also define triggered modifiers, which will apply in the same way as mult and add modifiers normally do, but with the extra condition that a trigger must return true. # The format for these is triggered_produces_modifier, etc (see below) # These are useful if e.g. you want to apply an effect only to biological pops. Note however that if you do something too complicated in these, and then use the modifiers in a lot # of places, then it can have a bit of a performance impact (it will check these triggers whenever it is working out what resources a resource table contains, and there is a non-zero # value for this triggered modifier. So not the worst, but don't go crazy!). # # Modifiers created by economic category can then be applied through edicts, static modifiers, etc. # # You can decide the category of the modifier via "modifier_category =