Repair Turret

by Klonan

Adds Repair Turrets

Content
1 year, 3 months ago
0.17 - 1.1
84.8K
Combat Logistic network

b huge processing time when there's large biter battles

4 years ago

While testing for one of my users a fix for Biter Factions mod, when the world started transitioning into the 5 different random teams, there was understandably some pretty epic battles going on.

What didn't make sense was the Repair Turret mod using a significant amount of processing time (8ms per tick) while the biters were dying enmasse.

Is there some non-friendly-force filtering of events or something which could help reduce the load caused by all the biter deaths? I haven't looked at the code, but would something like that help?

4 years ago

Can you provide a save game?

4 years ago

here it is!
https://drive.google.com/open?id=1fpaPEcrvi6qZajYV2Slqjk5ydDcBW8gl

make it sync to the mods, and load the game. Set the game speed to 2.0 just to hurry things up a little, but keep an eye on the debug mod times. Watch as the repair turret goes from < 0.1 ms and climbs up over 1ms in the first minute or so, and at one point (10 minutes in?) i had it showing at like 8ms tick update time.

as far as i could tell, it was only from large-scale biter in-fighting, nothing to do with player's force and repair turrets

4 years ago

Okie dokie

The main problem is that you are setting all the biters to start biting eachother, and that is causing a lot of events to be fired

Like 25,000 events every 100 ticks, or more than 250 damaged events every tick, and this is clogging up my mod which is trying to process all the events

I can do what I can (its not much), but I would suggest some tweaks on your side, as any mod that listens to the on_entity_died event will also have a problem in this situation.

When setting the forces, set their evolution factor to the highest of all biter forces. One problem is that they kept fighting with weak small biters. With stronger biters they killed things quicker and the civil war ended up sending less events.

The scale of the biter wars is basically insane...

4 years ago

Thanks Klonan - yes I know the scale of the biter wars is insane. it's one of the downfalls of adding it halfway into an already large map with lots of other enemy mods and moster-sized worms.

I thought there was some new mod API which can help mods not listen to every single event and can help filter out events which don't matter? Could an event which only monitors for deaths of entities belonging to forces which have active repair turrets help this situation? or is the API not quite able to achieve that level of specificity?

4 years ago

I can just tell the user to not add the mod to such an advanced progress game if they can't get the wars to settle down in any reasonable timeframe :(

4 years ago

Not really, since we need to know which entities are damaged even if there are no repair turrets, in the case that you place the first one near some damaged entities.

There isn't really much filtering we can do in this situation, we need to know when all entities are damaged, because I want to support repairing everything that is repairable.

4 years ago

Fair enough, well it's certainly an interesting issue neither of us expected to encounter

New response