Blueprint Streak Counter


Do you no longer want to keep track in your head of how many times you've already placed this Blueprint down in a row? This mod helps you only for Blueprints in your inventory and copy paste that got completely placed as ghosts (even with tiles) if you have turned on the mod setting 'count entities'. Otherwise, the first entity is already enough, which is the default setting now.

Utilities
6 days ago
1.1 - 2.0
255
Blueprints
Owner:
Icicubes
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
10 months ago
Latest Version:
1.1.7 (6 days ago)
Factorio version:
1.1 - 2.0
Downloaded by:
255 users

2.0 thoughts:
To support blueprints from the blueprint library, I would need to refactor and verify whether the entity and tiles tables of two blueprints are identical, as they currently lack an item_number ID for direct comparison. To support blueprint books, I would currently need to go through the entire blueprint book(s) to locate and identify the desired blueprint that is still in progress, as the API does not currently provide an index for efficient lookup. Blueprint books in a player's inventory remain an unsupportable "black hole" for now.

Do you no longer want to keep track in your head of how many times you've already placed this Blueprint down in a row? This mod helps you only for Blueprints in your inventory and copy paste that got completely placed as ghosts (even with tiles) if you have turned on the mod setting 'count entities'. Otherwise, the first entity is already enough, which is the default setting now.

count entities turned on:
If one Entity or tile of the Blueprint does not get placed, the Streak counter does not get increased.
That means if you have protruding power poles in the grid, as shown in picture 3, they will cause the blueprint counter to be off by 1 (as seen in picture 2), counting as two unbuilt entities each time the blueprint is placed consecutively.

I feel like this is a too 'hardcore' feature to be in the base game.

Assumes one player can not place more than one Blueprint down in one Tick and that any two players can not have the same name. Also the mod breaks if you change the mod setting count entities while in a currently active streak, but the streak after that will be fine again. (There is a way by using the on_mod_settings_changed event to solve that super edge case by invalidating (forcing time out) the currently active streak.) I don't plan to ever have a GUI because I assume It would need to be updated every tick and currently it only uses the Factorio modding API for on_built_entity (a function call). Also fun fact about Factorio modding: For some reason "LuaPlayer.create_local_flying_text" with "create_at_cursor=true" does not allow any other customization at the same time. The documentation does not explain why this is the case.