Resource Map Label Marker

by kizrak

Creates resource map label markers when chunks get generated and charted. See resources through fog of war. Please review settings and consult details below before starting!! πŸš€ #icon #resources #map #reveal #label #markers #chunks #generated #chart #tag #map #ore #count #fog of war

Utilities
5 months ago
0.17 - 1.1
54.1K

g Mod fails on unknown resource name

1 year, 4 months ago

Map created with Resource Spawn Overhaul and full set of pyanodon mods (with alien life) - with version below 2. Then py* mods were upgraded to version 2 and now RMLM throws error:

The mod Resource Map Label Marker (0.7.28) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event resourceMarker::on_chunk_charted (ID 103)
Unknown fluid name: drilling-waste
stack traceback:
    [C]: in function 'add_chart_tag'
    __resourceMarker__/control.lua:306: in function 'updateMapTags'
    __resourceMarker__/control.lua:348: in function '_on_chunk_charted'
    __resourceMarker__/control.lua:361: in function <__resourceMarker__/control.lua:354>
1 year, 4 months ago

Simplest fix would be something like:

    local ok, tag = pcall(force.add_chart_tag, surface, tagData)
    if not ok then
        tag = nil
    end
1 year, 3 months ago
(updated 1 year, 3 months ago)

Same error, but with: "LuaGameScript doesn't contain key surfaces." (SE mod enablled)

81551.304 Error MainLoop.cpp:1284: Exception at tick 145880058: The mod Resource Map Label Marker (0.7.28) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event resourceMarker::on_chunk_charted (ID 103)
LuaGameScript doesn't contain key surfaces.
stack traceback:
    [C]: in function '__index'
    __resourceMarker__/control.lua:360: in function <__resourceMarker__/control.lua:354>
81551.304 Time travel logging:
 129.315 Popped blueprint record (player-index: 0, ID: 288)
 131.109 Popped blueprint record (player-index: 0, ID: 289)
38549.837 Popped blueprint record (player-index: 0, ID: 290) from book (player-index: 0, ID: 248)
38554.172 Popped blueprint record (player-index: 0, ID: 291)
38557.636 Popped blueprint record (player-index: 0, ID: 290)
39763.439 Popped blueprint record (player-index: 0, ID: 292)
81551.304 Error CrashHandler.cpp:635: Received SIGSEGV

This exception thrown leading to SIGSEGV appears ~ once per day

1 year, 3 months ago
(updated 1 year, 3 months ago)

Simplest fix would be something like:

trying same pcall fix:

control.lua :354

local function on_chunk_charted(event)
    local surface_index = event.surface_index -- uint
    local chunkPosition = event.position -- ChunkPosition
    local area = event.area -- BoundingBox: Area of the chunk.
    local force = event.force -- LuaForce

    -- local surface = game.surfaces[surface_index] 
    -- fixing "LuaGameScript doesn't contain key surfaces."
    local status, surface = pcall(function () return game.surfaces[surface_index]  end);
    if not status then
         return;
    end
...
1 year, 3 months ago
(updated 1 year, 3 months ago)

Have a bunch code fixes for different mods, some of them (if possibe) was embedded in separate (post fix other mods) mod,
howto handle other fixes if mod authors start to update their mods ?

Add mods to git and when authors update their mods apply my patches ?

Wanna play factorio - prepare for code integration/maintaining tasks.

5 months ago

Can you provide the exact pyanodon version(s) of the before and after?

Ideally include a save file that reproduces the error with the before versions please. 🍰

5 months ago
(updated 5 months ago)

0.7.31 may or may not fix other mods changing their resource names...

Anytime there is a configuration change, icons get recalculated.

New response