The Ruins Mod 2.0 deprecated


This mod is now deprecated and merged with `AbandonedRuins_updated_fork`.

Content
a month ago
2.0
3.15K
Environment

i [DONE] Proposal to work together?

2 months ago
(updated 2 months ago)

Hello! I am one of the creators of the updated fork of the ruins mod https://mods.factorio.com/mod/AbandonedRuins

The fork package includes 3 main mods:

https://mods.factorio.com/mod/AbandonedRuins_updated_fork - the main ruins mod
https://mods.factorio.com/mod/ruin-maker_updated_fork - the ruins creation tool
https://mods.factorio.com/mod/AbandonedRuins-base/discussion/6826a853aa803e50507c0b0b - a template for a separate ruins package

At the moment, the only problem with this fork is the need to limit the appearance of various ruins packages to specific planets.

Unfortunately - the programmer who helped me with this fork is too busy and no longer gets in touch.

How would you feel about working together to support and improve this fork?

2 months ago

My mod only adds some small features and mostly debug messages for (mod) developers. I have no problem that you git cherry-pick or git rebase on my commits your changes.

2 months ago

Unfortunately, I didn't quite understand your answer.

I'm not obliging you to do anything. I just asked about the possibility of cooperation on issues of supporting my fork.

Because, as I understand it, my and your forks duplicate each other.

But if you refuse, I don't demand anything from you.

a month ago
(updated a month ago)

Ah, git is a command-line (Windows) or console/terminal (Linux) tool to "clone" GIT repositories. You can find all information and tutorials here: https://git-scm.com

And sorry that I cannot help you with supporting your mod. I already have ported many mods to Factorio 2.0 . I thought more that we can merge our code together so there is only one ultimate 2.0 fork.

a month ago

Unfortunately, it is unclear about https://git-scm.com - because I am not a programmer and do not plan to be one. My knowledge of programming is extremely limited.

I assumed the possibility of giving you co-authorship in my fork, and then, if everything goes well, transferring my fork to you for further development. Since I am not sure that I will be able to provide its support in the future. Because this mod is too complicated for me.

a month ago

This is not a regular mod. It's a whole ecosystem, for which other modders are already creating their own ruin packs.

And it was easier for players to use one common mod, instead of choosing between several incompatible mods.

a month ago

Same with mine, I have created it after I searched for a 2.0-compatible replacement and didn't find one at that time. Then I fixed it myself and even improved it a lot. My first commit on it was on Thu March 27, 2025.

a month ago
(updated a month ago)

The question is not who made their fork first.

It's just that my fork already has several ready-made ruins packages:

https://mods.factorio.com/mod/AbandonedRuins-ruinsnova/dependencies?direction=out&sort=idx&filter=all
https://mods.factorio.com/mod/OldAbandonedSettlements/dependencies?direction=out&sort=idx&filter=all
https://mods.factorio.com/mod/FortressRuins/dependencies?direction=out&sort=idx&filter=all

And I don't have the right to just delete it. Even if I want to.

That's why I want to offer you my fork for further administration and development.

I can:

  1. Either directly allow you to edit all the mods of my fork.

  2. Or allow you to make copies of all the mods of my fork. After which I recommend your copies on my mods and mark them as obsolete.

a month ago

Hmm, then we talked past each other as we meant the same. It is okay for me to take over your mod and push my changes into yours as my programming experiences in general is for a very long time and with LUA I'm getting more used to. So if that's what you wish?

I have looked through your changelog.txt and saw that you only touched spawning.lua. And I didn't notice a big change there. Do you remember what you have touched?

I would propose the following steps:
- I change my info.json to your mod name and title (not to confuse gamer)
- I mark my mod as deprecated (I need to check if I can set yours as "follow-up"?)
- as my mod's version is already beyond 1.2.0 other mod developers should not notice anything except some debug options which they might need
- I can credit your contribution in e.g. changelog.txt

a month ago
(updated a month ago)

Got it. Unfortunately, Google Translate doesn't translate everything correctly.

My fork was mainly solving the problem of mod compatibility with the latest version of the game.

The only thing I did on my own was to move all the ruins from the main mod to a separate package so that players could choose for themselves which ruins they need in the game.

It doesn't really matter to me how our cooperation will be implemented. I just don't want to multiply entities where it's unnecessary.

If you agree, I will give you access to my Ruins mods on the site today...

a month ago

Okay, then.

a month ago

I've sent you invites as a co-author to three mods of my fork:
Base Ruins mod: https://mods.factorio.com/mod/AbandonedRuins_updated_fork
Ruins editor: https://mods.factorio.com/mod/ruin-maker_updated_fork
Ruins template: https://mods.factorio.com/mod/AbandonedRuins-base

I hope this solution will be useful for everyone. Thank you!

a month ago

Thank you for the invitations.

Today I have important things to attend to so it might take some time until I start the actual merger.

a month ago
(updated a month ago)

I see. This is not a rush. The only thing is - I want to clarify. Do you want to participate as a co-author? Or should I give you these mods right away?

a month ago

I'm fine with co-author first. Do you really want to handle it fully over?

a month ago
(updated a month ago)

I want this mod to be in good hands. Technically, I can't support it. And if for some reason there are problems with it, it will be difficult for me to deal with them.

You already have several mods and, of course, I count on your integrity. Because this concerns not only me, but also the creators of ruins packs and, of course, the players who use this mod...

In principle, so that we have complete trust and mutual understanding, you can indicate what kind of changes you are going to make to the mod.

At first, we can agree on this. And then we will decide what to do with the mod further.

a month ago
(updated a month ago)

That's understandable. So I can take the programming over - if my time permits. I have maintained your Russian inline comments so you don't have to translate my English. I have used DeepL for it. I speak a few words, but I cannot read it.

EDIT: Let's see what happens when I install no ruin set. Does it crash?

a month ago

Small change:
- I want to get rid of the local base_ruins = remote.call("AbandonedRuins", "get_ruin_set", "base") remote call as this costs performance only to get a nearly empty table back.
- For now, mod developers must simply initialize the local variable: local base_ruins = {}

a month ago
(updated a month ago)

The language of comments is not critical. So you can write them as you like.

Regarding the change you suggested - I am not against it. You can change it.

The only thing I will need to do is write the corresponding recommendations to the package developers.

I will write them your text - that the new update will remove the function local base_ruins = remote.call("AbandonedRuins", "get_ruin_set", "base") of the remote call, since it reduces performance, and the table remains almost empty. And that they will need to initialize the local variable: local base_ruins = {}

Will that be clear enough?

a month ago

This change would only affect AbandonedRuins-base and it would reset the current contents. Still doing that in dev's own mods is no hindrance. I have however added the old behavior as a commented-out alternative to the new default. So mod devs can easily choose what behavior they want.

a month ago

Okay, thanks!

I've listed you as a full co-author in the description of all three mods.

In the future - if you're ready and willing to fully support these mods - I can transfer them to your full use. You just need to let me know about it.

a month ago
(updated a month ago)

I have updated documentation in docs/run_sets.md as the remote function add_ruin_set() with 3 hard-coded ruin sizes is deprecated. Better use add_ruin_sets() (notice the extra s?) instead to handle your whole ruins table over. More ruin sizes than the default are partly supported. Adding a new one (you have to take care of the configuration entry) and get_ruin_sizes().

PS: I got a crash with changed mod and no ruins around. So I can now investigate the case when no ruins are loaded but the "core" mod is used alone.
EDIT: Missing storage.spawn_changes initialization only.

a month ago
(updated a month ago)

Hmm, nope. Wasn't the case. But I'm getting near why the init() function isn't invoked during loading a save game:

This is only called when a new save game is created or when a save file is loaded that previously didn't contain the mod. During it, the mod gets the chance to set up initial values that it will use for its lifetime. It has full access to LuaGameScript and the storage table and can change anything about them that it deems appropriate. No other events will be raised for the mod until it has finished this step.
https://lua-api.factorio.com/latest/classes/LuaBootstrap.html#on_init

I marked the important line. So on_init() is not executed on loading the save-game. So I need to add script.on_load(init) to my control.lua as this code has to be executed EACH time the save-game is loaded.

EDIT: Gee! on_load() is not initializing global game?! So on_load() is wrong all together.

a month ago
(updated a month ago)

Ah, I now see how it works! Sorry for wild guessing:
https://lua-api.factorio.com/latest/auxiliary/data-lifecycle.html#save-startup

So my introduced change from storage.spawn_table to storage.spawn_chances are not magically done. I need to migrate that on my own.

Also the mod realistic-ruins at https://mods.factorio.com/mod/realistic-ruins needs to be ported, too.

a month ago

Unfortunately, I don't understand all of your reasoning. As I understand it, you are currently trying to optimize the code and improve the mod's performance.

I am not against such changes - the main thing is that the final version of the edits is stable and working.

Thank you very much!

a month ago
(updated a month ago)

Regarding https://mods.factorio.com/mod/realistic-ruins - the developer seems to have abandoned his mods.

Therefore, if you are interested in this mod - you can make an updated fork indicating the author of the original mod.

The author indicated as the license of his mod - The Unlicense (Public Domain). https://unlicense.org/

I think he will not be against such a fork.

a month ago

I'm currently testing my changes out on these scenarios:
- new fresh game started
- old save-game loaded (migration will apply)
- current save-game with no migrations will be applied
- debug world

a month ago

Strange that now only debug world is failing with a single ruin with random splitters (a small ruin).

a month ago

I upload now and then the rest is later fixed. Maybe someone else knows what's wrong (it worked here for some time).

a month ago

Okay. Thank you!

This thread has been locked.