Evolution Technology

by wodzu93

Adds a tech tree to biter force. Biter units will improve in several ways, based on configurable factors.

Content
2 months ago
1.1 - 2.0
3.62K
Enemies

g Questions

3 months ago
(updated 3 months ago)

Can you explain in more detail how pollution affects tech upgrades? Is it emitted pollution, absorbed pollution? If emitted, can you add a mod option to enable only absorbed?

The mod mentions quality buildings follow normal quality chance percentages but I see a higher quantity of high tier quality nests than I would expect given the chance percentages. I run a quality mod with 3 extra qualities and those end stage ones should be very very rare but I've seen several at that level just around my base which seems off. Does it factor in the chance based on all previous quality tier chances like quality products do?

Are there any mod dev console commands that could be used with this mod to adjust any in-game progress of the technology?

3 months ago

I do plan expanding this mod, but I'm currently playing vanilla Space Age, so anything other than bugfixes will have to wait a bit.

From the top:
1) Well, it actually scales with evolution, pollution just happens to usually be most relevant factor. Under the hood, each tick game does "(evo_factor - previous_tick_evo_factor) * research_speed map setting" and adds that to the research progress (which is a number from 0 to 1, reaching 1 completes current tech).

However, unlike actual evo, research ommits the scaling evo has - killing a nest (at default evo settings) at 0% evo adds 0.002 to evo, while doing it at 50% adds 0.0005. For research, killing a nest adds 0.002 to research progress regardless the evo. Same with time and pollution factors.

2) Above system was the simplest to implement and does the job well enough. I do plan to overhaul this and separate these factors, so you could pick which ones you want (as well as specifying if it's emitted or absorbed pollution)

3) When building is created, mod does the following loop:
- roll for quality increase
* If succesfull, upgrade quality and try again
* If unsuccessfull, stay at current quality and end the loop

It rolls a random value within [0, 1] range and compares to upgrade chance, which looks like this:
"quality chance (10% by default) * EvoFactor * 'Nest upgrade chance multiplier' map setting (5 by default)"

So, for example, at 0.5 evo, there is 0.1 * 0.5 * 5 = 0.25 to upgrade quality. Starting at Common, this gives:
- 0.25 (25%) to get at least Uncommon
- 0.25^2 (6.25%) to get at least Rare
- 0.25^3 (1.56%) to get at least Epic, etc.

Note, baseline quality of the expansion party matters. If game uses a Rare Biter to create a worm, that worm starts at Rare, so upgrade table (evo 0.5) becomes:
- 0.25 (25%) to get at least Epic
- 0.25^2 (6.25%) to get at least Legendary
- 0.25^3 (1.56%) to get at least Legendary+, etc.

4) No dedicated console commands yet, will implement in the future. You can adjust "Research speed" and "Nest upgrade chance multiplier" map settings at runtime in the pause menu as host (Settings -> Mod Settings -> Map).

2 months ago

Thank you for the detailed response!

2 months ago
(updated 2 months ago)

In script.on_event(defines.events.on_biter_base_built, function(event), I think this is bugged:

local targetRoll = game.forces.enemy.get_evolution_factor(surface) * targetQuality.next_probability * settings.global["evotech-quality-upgrade-multiplier"].value

It is calculated once but during the while loop the next qualities probability is not considered, for mods that have variable probability levels this means only the first quality chance is ever used in each iteration.

This would explain why I was seeing modded qualities at much higher frequency than expected as they have 0.01, and then 0.0001 odds but this uses the default 0.1 from vanilla for every iteration. So I think you just need to move that into the while loop so its recalculated each iteration.

2 months ago

Fixed with latest update, among other things ;)

New response