Modding Discoveries (part 3)...

Finally, after multiple tries and rewrites, I'm finished dealing with terrible regular expressions and was able to parse a sample discovery mod file. There will be some limitations on how to write valid boolean expressions for gain/hold conditions but I believe this won't be a deal breaker for any would-be modder.

So I got to start integrating the parsed mod contents into the simulation by first adding code to generate discovery events for groups that pass the discovery's gain conditions and assign an event trigger date using the rules defined by the time-to-trigger factors. Now I'm working on actually generating a discovery attribute for those groups for which the discovery event triggers. If everything goes well, I'll be able to run some tests next weekend where the sample modded discovery get's used within the simulation.

Once again, I have not much else to say regarding progress so I'll take this opportunity to talk about the (very short) list of discoveries that are currently hard-coded within the game (as of 0.3.2):

Boat Making : This discovery is accessible to groups that settle on cells bordering sea cells. Once discovered, groups gain access to shipbuilding knowledge, which allows them to traverse sea tiles and settle on cells across the sea. This discovery can be transferred to adjacent groups that do not border sea tiles, but, for these groups, shipbuilding knowledge is lost over time, prompting the boat making discovery to be lost too.

: This discovery is accessible to groups that settle on cells bordering sea cells. Once discovered, groups gain access to shipbuilding knowledge, which allows them to traverse sea tiles and settle on cells across the sea. This discovery can be transferred to adjacent groups that do not border sea tiles, but, for these groups, shipbuilding knowledge is lost over time, prompting the boat making discovery to be lost too. Sailing : This discovery is accessible to groups bordering sea tiles that have increased their shipbuilding knowledge to level 5 or above. Once acquired, groups can increase their shipbuilding knowledge up to a new level cap of 30 (the base cap is 10). Higher shipbuilding levels give a greater chance of success to migration attempts through long sea routes. This discovery is lost if shipbuilding knowledge ever falls below level 3.

: This discovery is accessible to groups bordering sea tiles that have increased their shipbuilding knowledge to level 5 or above. Once acquired, groups can increase their shipbuilding knowledge up to a new level cap of 30 (the base cap is 10). Higher shipbuilding levels give a greater chance of success to migration attempts through long sea routes. This discovery is lost if shipbuilding knowledge ever falls below level 3. Plant Cultivation : This discovery grants the knowledge of agriculture to any discovering group. To gain the discovery, the group must be on a cell with high arability (arable land) and accessibility (ease of travel, flat land). Having the knowledge of agriculture allows the group too participate in farming as an activity. The productivity of farming as an activity is tied to the group's level of agriculture knowledge.

: This discovery grants the knowledge of agriculture to any discovering group. To gain the discovery, the group must be on a cell with high arability (arable land) and accessibility (ease of travel, flat land). Having the knowledge of agriculture allows the group too participate in farming as an activity. The productivity of farming as an activity is tied to the group's level of agriculture knowledge. Tribalism: This discovery gives a group the chance to form a new tribe or become part of one. To have access to this discovery, a group must have social organization knowledge at level 6, and the discovery will be lost if the knowledge drops below level 2. This discovery also increases the social organization knowledge level cap to 100 (from the base cap of 10).

As you can see, the list of currently available discoveries is very small. The main reason being that it takes quite a bit of effort to code each one of them. Additionally, each one of them is full of custom-tailored code that is hard to reuse in other parts of the simulation. This is one of the reasons I want to move all of that code into mod scripts, which will force me to encapsulate and standardize many code segments. Therefore making it easier to add many more discoveries later.

Since now you have a good idea of what discoveries are currently implemented in the game and what they do, I would like to hear your suggestions for discoveries and their possible effects. So please share your thoughts!