Bluebuild

by Mylon

Allows blueprints to be used much earlier. Once a blueprint is placed, nearby entities will be auto-placed at 5/second so long as you have the objects in inventory and are standing still. Once items are marked for deconstruction, they will be auto-removed and put into inventory so long as you are standing still. Press b to toggle building, press n to toggle demolishing.

Utilities
3 years ago
0.14 - 1.1
6.16K
Blueprints

g Scriptupdate

7 years ago

Hello there,
I did some testing with increasing the reach Distance but ran into giant lag as soon as I use some higher Amoutn of reach Distance. It was caused by Bluebuild Script update.
I assume its cause by searching for Blueprints.
Is there a way to reduce the Interval before Bluebuild checks for Blueprints?

Thx!

7 years ago

Bluebuild distance is fixed at 8 tile radius. Reach distance isn't used.

7 years ago
(updated 7 years ago)

Thanks for your replie, thats why I changed the Bluebuild distance in the control file (lines 73 and 127).

But as I said, this impacts performance heavily. I tried to adjust the "game.ticks" (e.g. lines 52 and 66) but it didnt seem to have any effect.

How (and where) did u specify the fonction update interval?

7 years ago

I guess my code is pretty crazy. The main update happens on line 48 where I check "game.tick > global.blueBuildFirstTick[builder.index] + 5"

This limits it to checking once every 6 ticks. Change 5 to n-1 to update every n ticks.

7 years ago

Yes, changing this does effect the speed of placed and demolished items (which uses almost no performance).
It does not affect the interval of "scanning" for Blueprints, which uses most performance and runs all the time while u dont move.

As u probabbly have seen the Scriptupdate increases drastically when u sand in your factory. The less entities the less is the performance Impact (e.g. 40ms when standig in the middle of resource smelting). The performances gets drastically better (0.7-1ms) as soon as the script finds something to do.

You know what I mean? Thats why i trie to reduce the "scan" interval.

New response