Dawn of Man

Dawn of Man

View Stats:
Black Jesus 31 Aug, 2019 @ 7:55pm
A few modding questions...
I was curious about a few things.

1.) What does "SetTraderPeriod" do? And what does the value x.xy do? Is it some kind of interval?
2.) What are the "Increase/Decrease start" and "Increase/Decrease halfing population" variables in the "SetMigrationParameters" and "SetBirthParameters"?
3.) Has anyone found a way to edit the capacity value for mines? I mean if I could find a way to make traders come more often I could probably sustain indefinitely in end game otherwise I hit a point where I can't grow anymore.
< >
Showing 1-14 of 14 comments
Ronald Gordo 1 Sep, 2019 @ 7:10pm 
"SetTraderPeriod" means the interval between trader visits.

With a low interval, it is possible to sustain ore consumption with the trader.

It is used like this:

<action type="SetTraderPeriod" value="0.7y"/>

The value here can be whatever you want, integer or fraction: 0.1, 0.5, 1, 1.5, 2, 10.

____________________

"Increase/Decrease start" and "Increase/Decrease halfing population" variables in the "SetMigrationParameters" and "SetBirthParameters" means the number of villagers in which migration and birth rates begin to decline. This serves to limit the total population (and avoid lag).

It is used like this:

<action type="SetMigrationParameters" min="2" max="4" period="0.8y" decrease_start_population="500" decrease_halfing_population="150"/>

This line means that every 0.8 year, between two and four migrants will arrive (if there is home, food and clothing and the prestige is high), until the population reaches 500 villagers, when the migration will start to decrease.

<action type="SetBirthParameters" decrease_start_population="500" decrease_halfing_population="150"/>

The birth rate cannot be fixed in the script because it depends on the number of adult women (and on houses, clothes, food and prestige).
Last edited by Ronald Gordo; 1 Sep, 2019 @ 7:15pm
Schwifty K 3 Sep, 2019 @ 10:37am 
Originally posted by Black Jesus:
I was curious about a few things.

2.) What are the "Increase/Decrease start" and "Increase/Decrease halfing population" variables in the "SetMigrationParameters" and "SetBirthParameters"?

3.) Has anyone found a way to edit the capacity value for mines? I mean if I could find a way to make traders come more often I could probably sustain indefinitely in end game otherwise I hit a point where I can't grow anymore.


1. see gordos answer.

2. <action type="SetBirthParameters" decrease_start_population="10" decrease_halfing_population="5"/>

would mean:

after 10 people population you get less births like before.
after 15 people (10+5) you would get even less births.
after 20 or 25 people birth should almost be 0. of course it never gets to 0 because it only works with multipliers in a mathematical sense.

3. Devs added deep mines and even deeper mines. are you sure you need even more capacity?

you can edit a existing savegame. [unzip savegame with winrar or something. open with text editor]
look for <entity_type value="iron_mine"/>
scroll down to
<resources_left value="80"/>
<total_resources value="115"/>

values might be others in your save ;-) alter them and save.

you can even use the modified save as start for a new scenario. read pinned discussion.
threethreethree 30 Jul, 2024 @ 3:28pm 
There is very little traffic in these forums these days, but I'm hoping someone can help nonetheless -

I have this:

<action type="SetTraderPeriod" value="2.25y"/>

and it is in the same code-brackets of actions/events that everything else is in, and all of those other things work as coded.

However, I get a trader approximately just over a year apart...one in spring, and the next one in summer of the next year. Not about 2.25 years later.

Anybody have a solution or explanation? Thanks :)
Perhaps there's a later SetTraderPeriod tag overriding it, or it's not inside a valid event?
You could check if it happens in the Flatlands scenario, the trader period is set to 2.3y in there.
threethreethree 31 Jul, 2024 @ 5:07am 
Originally posted by ᴇɪɴᴀᴜɢᴀ:
Perhaps there's a later SetTraderPeriod tag overriding it, or it's not inside a valid event?
You could check if it happens in the Flatlands scenario, the trader period is set to 2.3y in there.
what is the name of the flatlands scn file? i don't see it. i can see the environments, but not the scn, and that's where the trader period would be.
flatlands_v2.scn.xml
If you've subscribed to it in the Workshop it should be saved to your hd inside that main folder 858810, Flatlands_v2 is folder 1693186543.
Last edited by ᴇɪɴᴀᴜɢᴀ; 31 Jul, 2024 @ 5:35am
Originally posted by ᴇɪɴᴀᴜɢᴀ:
flatlands_v2.scn.xml
If you've subscribed to it in the Workshop it should be saved to your hd inside that main folder 858810, Flatlands_v2 is folder 1693186543.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1693186543
threethreethree 31 Jul, 2024 @ 6:15am 
Originally posted by ᴇɪɴᴀᴜɢᴀ:
flatlands_v2.scn.xml
If you've subscribed to it in the Workshop it should be saved to your hd inside that main folder 858810, Flatlands_v2 is folder 1693186543.
ok thanks. hadn't subscribed to it. but i've looked at other scn files for other scenarios and the trader period is the same in all of them...where it's at, and how it's coded. which is also how I have it in my scenario.
Originally posted by threethreethree:
ok thanks. hadn't subscribed to it. but i've looked at other scn files for other scenarios and the trader period is the same in all of them...where it's at, and how it's coded. which is also how I have it in my scenario.
You're right, I gave it a spin with Yonder Island at 1x and checked gametime moments in the save file with first hearth @ 160, trader arrived @ 8800 (¹/₃ of 2nd winter).
One year is 4800 gametime (seconds at 1x), default trader eta starts when you put down a hearth or tent(?) so 8640 = 1.8y which is quite off from 2.25y.

I couldn't think of anything reasonable that would change the trader eta, unless there's a variable added when the number exceeeds 2.0y but it wouldn't make sense. It's weird.
pdoan8 2 Aug, 2024 @ 6:43pm 
There are more than one trader. Did you check for all of them? Is the time period applied separately for each trader?

Edit: also, the time period is between spawning at the edge of the map, not when they arrive at your hearth. So, it might depend on how close your settlement is to the spawn point. One trade might arrive sooner than expected because of the shorter walking distance?
Last edited by pdoan8; 2 Aug, 2024 @ 6:51pm
threethreethree 2 Aug, 2024 @ 11:32pm 
Originally posted by pdoan8:
There are more than one trader. Did you check for all of them? Is the time period applied separately for each trader?

Edit: also, the time period is between spawning at the edge of the map, not when they arrive at your hearth. So, it might depend on how close your settlement is to the spawn point. One trade might arrive sooner than expected because of the shorter walking distance?
I had no idea about different traders. And how would I check for different ones? Where is it I'd check?
pdoan8 2 Aug, 2024 @ 11:35pm 
Note the name of the trader? I'm not sure if they age, die and being replaced.

Edit: the same trader will usually approach from the same direction every time. You can also take note on that.
Last edited by pdoan8; 2 Aug, 2024 @ 11:38pm
threethreethree 7 Aug, 2024 @ 3:35am 
Originally posted by ᴇɪɴᴀᴜɢᴀ:
snip

How would I be able to see what year a game is in, or something like if it's the 5th or 8th summer? (i looked at things like 'properties' etc in my save file, but don't see anything like what you speak of for a gametime units number)
Last edited by threethreethree; 7 Aug, 2024 @ 3:40am
Originally posted by threethreethree:
How would I be able to see what year a game is in, or something like if it's the 5th or 8th summer? (i looked at things like 'properties' etc in my save file, but don't see anything like what you speak of for a gametime units number)
If you rename a copy save file .sav to .zip and unzip the xml you get the current status of your savegame. Line 8 contains the total played game_time (GameTime), so if you divide the value of game_time with 4800 you'll get the number of years and a little.

4800 units of GameTime is the equivalent of what 'normal' time is 1.0y no matter what speed. If you play at 1x speed, a full year of 4800 is the same amount in seconds, so 80 minutes of playing time or 10 mins at 8x speed.

GameTime is also one of the timer units in the condition TimeElapsed, so instead of period="0.25y", period="1200" works as an alternative time unit size.
It also takes decimals so you can pinpoint events to the exact moment you want them to happen.
Last edited by ᴇɪɴᴀᴜɢᴀ; 10 Aug, 2024 @ 3:53am
< >
Showing 1-14 of 14 comments
Per page: 1530 50