Plant Cultivation and Tribalism


This weekend I finished the base mod implementation of sailing and also added the mod implementation of plant cultivation. I'm halfway through the implementation of tribalism, which is the last of the original hard-coded discoveries. With any luck, I'll be able to finish that during the next weekend and do a series of tests to make sure the discovery mods are compatible with the game's save/load system.

Aside from implementing a bunch of new conditions, effects, and factors, I also had to revise some of the effects that I had previously implemented to simplify their behavior. For example, modify_group_knowledge_limit will increase or decrease the limit value of a knowledge instead of setting an absolute limit value. This means if two discoveries try to modify the same knowledge limit, their values will be added together instead of picking the greater value of the two. Adding the effects of multiple discoveries is not only more realistic, it is also way easier just to add and subtract limit values rather than building and maintaining a list of all limit values applied to a knowledge at any given time, which was what I was doing before and and also a total headache.

Before I wrap things up with discovery modding I will try to add a bunch of new discoveries (I aim to add at least 4 new discoveries to double the current number), and also I want to add a set of extra conditions, effects and factors that can be used to mod-in new discoveries. My hope is that I can give modders, and myself, enough components to add content to the game without having to wait for me to add more features to the simulation. Still, I think 0.3.3's modding capabilities will be a little bit too limited for some people's taste, including mine.

Anyway, just to wrap things up with this post, here's a preview of the contents of the discoveries.json base mod file with all the game's current base discoveries added to it:

{
  "discoveries": [
    {
      "id": "boat_making",
      "name": "boat making",
      "gainConditions": "'[NOT]group_has_knowledge:shipbuilding','[ANY_N_CELL]cell_has_sea'",
      "holdConditions": "'group_has_knowledge:shipbuilding,0.1'",
      "gainEffects": "'add_group_knowledge:this,shipbuilding,10'",
      "lossEffects": "'remove_group_knowledge:this,shipbuilding'",
      "eventTimeToTrigger": 91250000,
      "eventTimeToTriggerFactors":"'[INV]neighborhood_sea_presence'"
    },
    {
      "id": "sailing",
      "name": "sailing",
      "gainConditions": "'group_has_knowledge:shipbuilding,5','[ANY_N_CELL]cell_has_sea'",
      "holdConditions": "'group_has_knowledge:shipbuilding,3'",
      "gainEffects": "'modify_group_knowledge_limit:this,shipbuilding,20'",
      "lossEffects": "'modify_group_knowledge_limit:this,shipbuilding,-20'",
      "eventTimeToTrigger": 91250000,
      "eventTimeToTriggerFactors":"'[INV]neighborhood_sea_presence'"
    },
    {
      "id": "plant_cultivation",
      "name": "plant cultivation",
      "gainConditions": "'[NOT]group_has_knowledge:agriculture','cell_arability:0.3','cell_accessibility:0.3'",
      "holdConditions": "'group_has_knowledge:agriculture,0.1'",
      "gainEffects": "'add_group_knowledge:this,agriculture,10', 'add_group_activity:this,farming'",
      "lossEffects": "'remove_group_knowledge:this,agriculture', 'remove_group_activity:this,farming'",
      "eventTimeToTrigger": 5475000000,
      "eventTimeToTriggerFactors":"'[INV]cell_accessibility', '[INV]cell_arability'"
    },
    {
      "id": "tribalism",
      "name": "tribalism",
      "gainConditions": "'group_has_knowledge:social_organization,6','group_population:500'",
      "holdConditions": "'group_has_knowledge:social_organization,2'",
      "gainEffects": "'add_group_attribute:this,CAN_FORM_TRIBE','form_tribe_on_group:this'",
      "lossEffects": "'remove_group_attribute:this,CAN_FORM_TRIBE'",
      "eventTimeToTrigger": 912500
    }
  ]
}

See you next week!

Get Worlds - History Simulator

Leave a comment

Log in with itch.io to leave a comment.