Bay 12 Games Forum

Dwarf Fortress => DF Dwarf Mode Discussion => Topic started by: TheLotusKing on December 03, 2021, 06:49:15 pm

Title: How to change when sieges occur.
Post by: TheLotusKing on December 03, 2021, 06:49:15 pm
I'm trying to find out how much of a population you need to cause sieges to occur, and how to change that number, but can't find it in the raws, and I couldn't see it on the wiki (I might just be blind in both cases.) Does anyone know how to find this?
Title: Re: How to change when sieges occur.
Post by: vjek on December 03, 2021, 08:07:00 pm
This is what has worked for me. YMMV.

In the save game folder (let's say it's region1), open this file with your favorite text editor:
region1/raw/objects/entity_default.txt

In that file, change these lines under the [ENTITY:EVIL] heading from:

   [PROGRESS_TRIGGER_POPULATION:2]
   [PROGRESS_TRIGGER_PRODUCTION:2]
   [PROGRESS_TRIGGER_TRADE:2]
   [PROGRESS_TRIGGER_POP_SIEGE:3]
   [PROGRESS_TRIGGER_PROD_SIEGE:0]
   [PROGRESS_TRIGGER_TRADE_SIEGE:0]


to, for example:

   [PROGRESS_TRIGGER_POPULATION:0]
   [PROGRESS_TRIGGER_PRODUCTION:1]
   [PROGRESS_TRIGGER_TRADE:0]
   [PROGRESS_TRIGGER_POP_SIEGE:0]
   [PROGRESS_TRIGGER_PROD_SIEGE:1]
   [PROGRESS_TRIGGER_TRADE_SIEGE:0]

To have goblin sieges show up once your created wealth exceeds 5000.

This is enumerated in the wiki here (https://dwarffortresswiki.org/index.php/DF2014:Entity_token#PROGRESS_TRIGGER_POPULATION).
You can certainly use the other triggers, but for me, creating 5000 wealth is extremely easy, and so makes ensuring the trigger is met also very easy.
You cannot specify a particular population value, but as per the wiki, there are specific thresholds you can use. 
20 is the minimum, but, not all forts get 20 dwarves, so.. that's why I use created wealth.

If you change this value in the default raws instead of the saved game folder raws, all subsequent worlds will inherit this value.
Title: Re: How to change when sieges occur.
Post by: TheLotusKing on December 03, 2021, 08:50:12 pm
Thank you!
Title: Re: How to change when sieges occur.
Post by: Mobbstar on December 04, 2021, 04:35:17 am
If you change this value in the default raws instead of the saved game folder raws, all subsequent worlds will inherit this value.

Just to clarify, most changes to entity_default.lua do not work in saved games and require you to change the default raws and create a new world.  This particular case is an exception to the rule, it seems.