Abandoned Ruins - Updated (core)

by Keysivi

This mod doesn't do anything by itself. You need to install ruin-set mods or no ruin will be spawned. It then can spawn randomly choosen ruins in the world. These ruins are destroyed fragments of bases, forts, small oases, and more. (Now co-authored with roland77)

Content
5 days ago
2.0
4.50K

i [DONE] Space age compat

6 months ago

As fulgora has its own ruins alredy, and some ruins may negatively affect gameplay of other planets, the better option, rather than making space age incompatible, may be to add the space age surfaces to the excluded surfaces list, or alternatively make ruins only spawn on nauvis by inverting the list checks. If either option is too complicated, i can make the changes you prefer later today or on Saturday. Let me know what you think.

6 months ago
(updated 6 months ago)

Thank you for your suggestion.

I agree with you that Fulgura can be added to the exception.

The problem is that the error in https://mods.factorio.com/mod/AbandonedRuins_updated_fork/discussion/67aca890818c2f31dd63d517 is not clear to me, which means there is every chance of it being repeated on other planets.

Plus there is a logical error in https://mods.factorio.com/mod/AbandonedRuins_updated_fork/discussion/6798ac3f1bc43429d61c2808 . There they suggested a way to solve the problem with Vulcanus. But it is not quite suitable, because there may be people who want to create their own ruins on Vulcanus.

I roughly understand how it should be done. I even created a corresponding request on the forum https://forums.factorio.com/viewtopic.php?p=662413&sid=96498cccf686ddb26842cd0f8fc4d6ad . But I can't implement it myself.

In principle, I wouldn't even mind adding you or any more experienced modder as a co-author, so that you would have direct access to editing and publishing all three ruins mods. Because I can't provide full technical support for the mods. And the person who helped me update this mod, unfortunately, can't help yet...

So if you have the desire and ability to support this mod, I am ready to provide you with access to all three ruins mods:
https://mods.factorio.com/mod/AbandonedRuins_updated_fork
https://mods.factorio.com/mod/AbandonedRuins-base
https://mods.factorio.com/mod/ruin-maker_updated_fork

6 months ago

Although im happy to help out how i can, I'm far from a skillful programmer myself.

I can muddle my way through a bit of modding, and can probably help with some of these issues, but actually solving the fulgora crash may be beyond me. I'll try to look into it tonight at least.

Based on the other issues, I would propose 3 updates for better compatibility with space age that i think i can accomplish.
1st, make all surfaces except nauvis blacklisted by default.
2nd, generate a config option to enable ruins on each surface.
3rd, (and im not certain i can accomplish this one but might be able to.) Add a config option to select ruins pack for each enabled surface, so each plant, including modded can have its own custom ruins that work with that worlds progression.
If this sounds like a good solution, ill start work on it once im home today

6 months ago

Good luck to you!!! Although I think it is easier to limit each submod with a set of ruins to specific planets.

For example, limit the spawn of ruins from https://mods.factorio.com/mod/AbandonedRuins-base only to Navius ​​and Gleba... To do this, it is enough to write only one script in this submod... Because this submod is, in fact, a template...

The Fulgura can be limited globally if desired. There is a special script for this in control.lua:

local function init()
util.set_enemy_force_cease_fire(util.get_enemy_force(), not settings.global["AbandonedRuins-enemy-not-cease-fire"].value)
spawn_chances()
if storage.spawn_ruins == nil then
storage.spawn_ruins = true
end
storage.ruin_queue = storage.ruin_queue or {}
if not storage.excluded_surfaces then
storage.excluded_surfaces = {
["beltlayer"] = true,
["pipelayer"] = true,
["Factory floor"] = true, -- factorissimo
["ControlRoom"] = true -- mobile factory
}
end
end

script.on_init(init)
script.on_configuration_changed(init)
script.on_event(defines.events.on_runtime_mod_setting_changed, init)

I'll just repeat myself - while the reasons for the failure are unknown, there is every chance of it happening again on any of the planets...

6 months ago

If you get something working, I will either make the changes you suggest into the mod, or I can give you access as a co-author and you can make the changes yourself.

6 months ago
(updated 6 months ago)

After looking in to https://mods.factorio.com/mod/AbandonedRuins_updated_fork/discussion/67aca890818c2f31dd63d517 I believe I've found the cause and if Hoochie can confirm what i've found, no change is required on your part. AbandonedRuins-ruinsnova appears to be causing the crash due to requiring mods not in it's dependencies. it's attempting to spawn entities with items that don't exist, thus the nil error when getting the entity type of the entity.

6 months ago

if you want to fix this error handling though, you can change

if extra_options.items then
local items = {}
for name, count_expression in pairs(extra_options.items) do
local count = expressions.number(count_expression, vars)
if count > 0 then
items[name] = count
end
end
util.safe_insert(e, items)
end
end

to

if extra_options.items then
local items = {}
for name, count_expression in pairs(extra_options.items) do
if not prototypes[name] then
util.debugprint("item " .. name .. " does not exist")
return
end
local count = expressions.number(count_expression, vars)
if count > 0 then
items[name] = count
end
end
util.safe_insert(e, items)
end
end

that will stop the crash, though the ruins generate broken and missing even without the crash due to the missing dependencies.

6 months ago
(updated 6 months ago)

Got it. Thank you! If the error is caused by missing dependencies in third-party mods, I don't see much point in changing anything.... Because this problem is primarily for a third-party mod... And its author needs to make the appropriate edits. Because otherwise his mod will not work correctly...

But, since the edits you suggested do not break the work of the ruins mod itself, and if you insist on it, I agree to make them in the next version of the mod.


Okay. After your answer, I will remove the negative dependence on Space Age. But as I wrote earlier, I will unfortunately not be able to provide technical support for this mod package without third-party help....

6 months ago

Im glad i could actually help solve this issue. And i think people are generally greatful that you were able to get this updated at all.

I don't have a lot of free time or much skill to speak of, but ill try to help out a little as I'm able to if you like, and I won't be insulted if you decide to pass on any changes i present.

6 months ago

I updated the mod: cancelled the negative dependence on the Space Age and added the edits you suggested...

Unfortunately, I can't fully test the changes, since I haven't reached Fulgura yet and don't plan to in the near future...

I've been messing around with updating the Factorio mods for the last six months and am a bit tired of this game... But, despite this, I try to check the portal every day. And I haven't abandoned my mods...

So feel free to write if you have any suggestions, or find any errors... I'll try to do everything, to the best of my modest abilities.

Thank you for your help!

6 months ago

No crashes, but the chests that should contain resources are empty. ruinsnova is now fully fixed. I’ll stick with version 1.2.8 for now.

a month ago

This mod is now fully compatible with SA. Please update to latest version (currently 1.3.1).

This thread has been locked.