The Ruins Mod - OldAbandonedSettlements


1 scenario, 16 small ruins, 68 medium ruins and 28 large ruins consisting of minable buildings that contain various resources and the odd biter here and there.

Content
8 days ago
2.0
610
Environment

b Stopped working after Base Mod got updated

a month ago
(updated a month ago)

The Base mod got updated and they changed a name in the settings.lua file:

{
type = "string-setting",
name = "AbandonedRuins-set",
...
}

->

{
type = "string-setting",
name = "current-ruin-set",
...
}

To get this mod working again, replace "AbandonedRuins-set" with "current-ruin-set" in the settings.lua file.

Actually there is another Error so nvm...

a month ago

I saw the update, the changelog is quite vague so im unsure whats changed.

a month ago

I'm poking around the source code for the updated base mod, base ruins, and your mod (by just opening the zip), in control.lua, line 254, you're doing
"remote.call("AbandonedRuins", "add_ruin_set", "OldAbandonedSettlements", base_ruins.small, base_ruins.medium, base_ruins.large)"

They merged all the ruins into a array like this ruins = {small = {}, medium = {}, large = {}}.
They made a small doc to try to explain it here: https://github.com/Quix0r/AbandonedRuins-base/blob/master/docs/ruin_sets.md

This is how they implemented it in the base pack:
https://github.com/Quix0r/AbandonedRuins-base/blob/master/control.lua (Line 37)
https://github.com/Quix0r/AbandonedRuins-base/blob/master/ruins/ruin_set.lua

If you'd like help with updating it, I'd be happy to ^^

a month ago

this doc is wrong https://github.com/Quix0r/AbandonedRuins-base/blob/master/docs/ruin_sets.md it states to do the following:
table.insert(data.raw["string-setting"]["AbandonedRuins-set"].allowed_values, "my-ruin-set")
however AbandonedRuins-set is now current-ruin-set and the following works:
table.insert(data.raw["string-setting"]["current-ruin-set"].allowed_values, "OldAbandonedSettlements")
but there is another issue after fixing this error I get more when trying to add my ruin at runtime, im not sure why but its telling me base_ruins is a nil value on line 216 of my control script yet I define it as local base_ruins = remote.call("AbandonedRuins", "get_ruin_set", "base") on line 209

29 days ago

Sorry for taking so long to check back, with your permission I can try to edit it on my side and see if I can get it working, and let you know what I find out.

29 days ago

I already fixed it, If its not working for you perhaps you have not updated?

27 days ago
(updated 27 days ago)

Please refrain from directly pushing your values. It making changing code harder over the time. What you can do now is to change that code to something like this:

local utils = require("__AbandandonedRuins_updated_fork__/lua/utilities")
utils.register_ruin_set("your-name", false)
-- Optionally use `true` if you want that your ruin-set is now the default value.

And don't forget to add a string in your locales files and set 1.3.3 at least in your info.json. There that feature had been added.

New response