Dawn of Man

Dawn of Man

View Stats:
Need some help...
So I'm trying to make a mod that has events and I cant seem to get it to work properly. Ideally I'm trying to spawn a raider attack upon reaching a new age (I tried EraUnlocked with no success) and I also want to adjust the migration rate. After several tests the raiders never attack and It's hard for me to say if the migration changes are taking effect. Also, there is an other event where I want a disease to infect the town however I cant get that to work ether. Ican provide more of the file if needed.

<event> <condition type="TechUnlocked" tech="goat_domestication"/> <condition type="TechUnlocked" tech="cereal_domestication"/> <actions> <action type="Spawn" entity_type="primitive_human" radius="2" placement="StartLocationCircular" amount="12" angle="51" gender="Male" age="Adult"/> <action type="Spawn" entity_type="primitive_human" radius="2" placement="StartLocationCircular" amount="15" angle="51" gender="Female" age="Adult"/> </actions> </event> <event> <condition type="EraUnlocked" id="pottery "/> <actions> <action type="TriggerRaiderAttack" amount="3"/> <action type="SetMigrationParameters" period="1y" max="4" min="1"/> </actions> </event> <event> <condition type="EraUnlocked" Era="cereal_domestication"/> <actions> <action type="TriggerRaiderAttack" amount="10"/> <action type="SetMigrationParameters" period="1y" max="4" min="2"/> </actions> </event> <event> <condition type="TechUnlocked" Era="copper_smelting"/> <actions> <action type="TriggerRaiderAttack" amount="25"/> <action type="SetMigrationParameters" period="1y" max="5" min="3"/> </actions> </event> <event> <condition type="TechUnlocked" Era="bronze_smelting"/> <actions> <action type="TriggerRaiderAttack" amount="35"/> <action type="SetMigrationParameters" period="1y" max="6" min="4"/> </actions> </event> <event> <condition type="TechUnlocked" Era="iron_smelting"/> <actions> <action type="TriggerRaiderAttack" amount="55"/> <action type="SetMigrationParameters" period="1y" max="8" min="5"/> </actions> </event> <event> <condition type="TechUnlocked" tech="steelmaking"/> <actions> <action type="TriggerRaiderAttack" amount="120"/> <action type="SetMigrationParameters" period="1y" max="10" min="5"/> </actions> </event>
< >
Showing 1-8 of 8 comments
Schwifty K 28 Mar, 2019 @ 4:27pm 
<event>
<condition type="TechUnlocked" tech="goat_domestication"/>
<condition type="TechUnlocked" tech="cereal_domestication"/>
<actions>
<action type="Spawn" entity_type="primitive_human" radius="2" placement="StartLocationCircular" amount="12" angle="51" gender="Male" age="Adult"/>
<action type="Spawn" entity_type="primitive_human" radius="2" placement="StartLocationCircular" amount="15" angle="51" gender="Female" age="Adult"/>
</actions>
</event>

i think this needs to be and with sub condition.

<event>
<condition type="EraUnlocked" id="pottery "/>
<actions>
<action type="TriggerRaiderAttack" amount="3"/>
<action type="SetMigrationParameters" period="1y" max="4" min="1"/>
</actions>
</event>

pottery is a tech. look at this for example how to do actions on techs: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1677893223

spawns some people everytime you unlock a tech. replace it with raiders.
For eras use eras like paleolithic, mesolethic ...

I don't know if you can alter migration with:
<action type="SetMigrationParameters" period="1y" max="5" min="3"/>

in an conditioned event. You can check if you altered them by saving and edit this save and look for the migration parameters.
Last edited by Schwifty K; 28 Mar, 2019 @ 4:29pm
MzEvilCanadian 29 Mar, 2019 @ 2:13pm 
So I've changed my code to the following

<event> <condition type="TechUnlocked" tech="goat_domestication"/> <actions> <action type="Spawn" entity_type="primitive_human" radius="2" placement="StartLocationCircular" amount="12" angle="51" gender="Male" age="Adult"/> <action type="Spawn" entity_type="primitive_human" radius="2" placement="StartLocationCircular" amount="15" angle="51" gender="Female" age="Adult"/> </actions> </event>

This code is supposed to spawn additional population. I took out the second tech requirement as it's redundant as the Goat tech requires the other one in order to researched. I haven't done much testing on this yet.


<event> <condition type="EraUnlocked" id="Mesolithic "/> <actions> <action type="TriggerRaiderAttack" amount="3"/> <action type="SetMigrationParameters" period="1y" max="4" min="1"/> </actions> </event>

This section is the one that spawns a raider attack but I seem to have made a mistake somewhere as the attack doesn't happen (done several tests).

I also noticed in the Dawn of Women mod you mentioned had a line I was confused about.

<event> <condition type="TimeElapsed" timer="GameTime" value="6y"/> <actions> <action type="SetGoalsHint" value="dawn_of_women_timedspawn6"/> <action type="Spawn" entity_type="primitive_human" amount="3" placement="StartLocationCircular" angle="35" radius="3" age="Adult" gender="Female"/> <action type="Spawn" entity_type="primitive_human" amount="3" placement="StartLocationCircular" aangle="35" radius="3" age="Young" gender="Female"/> </actions> </event>

The 2nd action has "aangle" where the first has "angle". This happens for each event between lines 189 and 278 of the dawn_of_women.scn.xml file.

Also, any advice on how I can check the same games to see if the migration rates are changing?

Schwifty K 29 Mar, 2019 @ 2:46pm 
From bottom to top:

Save your game, open saves folder: \Documents\DawnOfMan\Saves
look for your save -> unzip with winrar or 7zip or a similiar program
rename the savefile to whateveryoursavegamewasnamedoranythingelse.sav.xml
open it with atom or another good editor
search for <migration_period value=
this is a bit beneath: migration_decrease_start_population value=

... births ... and so on. check if it matches your settings.

My Dawn of Women mod had a typo! Thanks for that hin! its supposed to be angle=

but it gets ignored from the game. so they spawn in a circle at the radius and ignore the angle anyway.

id="Mesolithic " the space sign could cause problems, i'm not sure. but it has to be era= for eras
<condition type="EraUnlocked" era="Mesolithic"/>

The raiders won't spawn instant, they take a while to come.
Don't know about your keyboard settings, i am able to switch between new spawns (animals and raiders) with shift + enter and ctrl + enter (the right enter key on the NUM block)

your People Spawn looks good! set knowledge to 0 and test it:
<action type="SetKnowledgeParameters" tech_cost_multiplier="0"/>

remember to set it back after you are done.
Last edited by Schwifty K; 29 Mar, 2019 @ 2:46pm
MzEvilCanadian 1 Apr, 2019 @ 9:01am 
Thanks for all the help! I was able to change the migration rate using this method (however i forgot to set the decreasestartpopulation and decreasehalfingpopulation which caused a bug that is not fixed). The raider attacks seem to be working correctly now.

My next attempt is to add in a disease to trigger without effecting the overall disease rate.
Schwifty K 1 Apr, 2019 @ 10:08am 
If you do not set decreasestartpopulation and decreasehalfingpopulation, something is missing that leads to an error. I think the error is good, otherwise you wouldn't notice that something is missing.

The current actions don't look as if they allow something like individual diseases: http://madrugaworks.com/dawnofman/reference_actions.php

But it would be funny, then one could regulate too high numbers of animals by epidemics :-)
Let me know if you find anything!
If you still have any questions, I'd be happy to answer them again.
I can't wait to see what comes out at the end.
Last edited by Schwifty K; 1 Apr, 2019 @ 12:33pm
threethreethree 28 Jul, 2024 @ 6:07am 
Originally posted by Schwifty K:
If you do not set decreasestartpopulation and decreasehalfingpopulation, something is missing that leads to an error. I think the error is good, otherwise you wouldn't notice that something is missing.

The current actions don't look as if they allow something like individual diseases: http://madrugaworks.com/dawnofman/reference_actions.php

But it would be funny, then one could regulate too high numbers of animals by epidemics :-)
Let me know if you find anything!
If you still have any questions, I'd be happy to answer them again.
I can't wait to see what comes out at the end.

I have been trying to confirm whether or not disease chance includes an injured villager getting an infection, or is it only for crops and livestock etc (?)
Originally posted by threethreethree:
I have been trying to confirm whether or not disease chance includes an injured villager getting an infection, or is it only for crops and livestock etc (?)
Disease chance under crops and under domestic animals are separate formulas though they are coupled, so the "individual_disease_chance" parameters are for both but they behave differently.
Disease doesn't occur under humans, only infection which sort of acts like a disease but it isn't linked to the "individual_disease_chance". Infection chance can't be set customly.
threethreethree 31 Jul, 2024 @ 4:55am 
Originally posted by ᴇɪɴᴀᴜɢᴀ:
Originally posted by threethreethree:
I have been trying to confirm whether or not disease chance includes an injured villager getting an infection, or is it only for crops and livestock etc (?)
Disease chance under crops and under domestic animals are separate formulas though they are coupled, so the "individual_disease_chance" parameters are for both but they behave differently.
Disease doesn't occur under humans, only infection which sort of acts like a disease but it isn't linked to the "individual_disease_chance". Infection chance can't be set customly.
Darn it. I'd like to be able to set that. Thanks :)
< >
Showing 1-8 of 8 comments
Per page: 1530 50