Grey Goo


The day we've all been dreading! A gameplay-focused mod that adds treasure chests and random caverns to explore.

Scenarios
4 years ago
1.0 - 1.1
832

b Research resetting

3 years ago

Saving the game on 1.1.11 with ANY progress in research and loading the game back up, research is set back to no technologies researched. When I remove Grey Goo, the behavior stops.

3 years ago

Same here, I even got back lost techs when I turned this off. Can you update this with a fix? Grey Goo's pretty cool.

3 years ago
(updated 3 years ago)

fog-of-war.lua:

local function HideMap(Player)
    local surface = Player.surface
    local force = Player.force
    force.reset()
end

This might be the problem. https://lua-api.factorio.com/latest/LuaForce.html#LuaForce.reset

3 years ago

Okay... is that something we can fix ourselves? What does that even do?

3 years ago

Without knowing the mod or looking at any code beside whats posted above, it looks like that function is supposed to unchart the map so it's unexplored. Resetting a force does that for all surfaces, as well as resetting technologies and force bonuses.

What they probably wanted was force.clear_chart(surface) which would only unchart the map. You can unzip the mod and edit the fog-of-war.lua file to change that line and it should work, assuming that was the intention.

3 years ago

So I change it to this?

local function HideMap(Player)
local surface = Player.surface
local force = Player.force
force.clear_chart(surface)
end

I won't even try without giving a coding guide a cursory read so I don't break anything, but yeah. I don't which line I'd replace. XD

3 years ago
(updated 3 years ago)

EDIT: Code looks good i think. You will notice, when it breaks, it usually cant hurt, if you don't overwrite your original savegame
Yep. This sounds reasonable. The method seems to be called once after some ticks.
Another alternative is to do remove the call. Maybe it's not so crucial for gameplay, but I don't know the mod.

3 years ago
(updated 3 years ago)

It worked! Nice!

Though it keeps resetting the map, which is annoying... Maybe if I...

Actually, nevermind. I get it. We're supposed to use radar to keep scanning the map, hence the name: "Fog of War". Fine fine, I WOULD like an option to disable that function, but I'll tolerate it... for now... and I won't try to disable it when I still don't know what I'm doing.

3 years ago

Just add -- to the front of the force.clear_chart(surface) line and it'll disable it - that's how you mark something as a comment in LUA, so it won't run. Won't break anything.

3 years ago

Alright, I'll try that.

3 years ago

It worked, thanks!

2 years ago

thanks fixxed it for me too

New response