Staged Blueprint Planning


The ultimate mod for designing staged blueprints.

Utilities
a day ago
1.1 - 2.0
4.62K
Blueprints Cheats

i Ruins might spawn on your surface?

6 days ago
(updated 6 days ago)

Hi there,

I'm the maintainer of the mod called AbandonedRuins_updated_fork: https://mods.factorio.com/mod/AbandonedRuins_updated_fork

I would like to have your attention as my mod might spawn ruins on your blueprints. To prevent this from happening, please add the following simple code to yours:

if script.active_mods["AbandonedRuins_updated_fork"] then
  -- Prevent any spawning on hidden/internal surface
  remote.call("AbandonedRuins", "exclude_surface", "bp100-stage-temp")
end

Please be aware of that your surface then is not allowed to be assigned to any planets (and I guess it won't be?). Can you also please test my mod while a space platform is created? It looks like that platform's surface has a different name?

Thank you

You can find further documentation here:
https://github.com/Quix0r/AbandonedRuins/blob/master/docs/SURFACES-PLANETS.md

And then please add an optional dependency on my mod to your info.json file as then your mod optionally supports it.

5 days ago
(updated 5 days ago)

Hi, thanks for reaching out!

I investigated this a bit more:
peeking at the mod code, I anticipate a problem: surface exclusion indexes surfaces by it's name. However a surface's name can change, and this mod renames surfaces a lot, so the exclusion would no longer apply. Surfaces may be better indexed by their surface index (a number) instead, which will not change for a given surface.

For space platforms, instead of game.create_surface, this mod uses force.create_space_platform() and platform.apply_starter_pack(); if your mod handles normal space platforms already then maybe we don't need to do anything for that specifically.

A thought on another approach: would it make more sense to exclude non-planet surfaces by default, and have other mods opt-in instead of opt out? That would automatically make this mod and maybe many other mods compatible. Or not, depending on desired behavior with other mods.
The AbandonedRuins mod could support other mods by itself, without other mods needing edits, by automatically adding certain surface names.

4 days ago

Hmm, that requires a heavy refactoring on my side and many remote-call functions will then heavily change or even disappear. So far I "only" fixed bugs with Factorio 2.0 API and rewrote a few parts or adding some smaller features, not breaking many old features (e.g. exclude_surface is now incompatible with old code).

What you are asking here is for a huge concept change, breaking ruin-set mods, like asking the PHP group to "just" switch from interpreter to compiler which isn't a trivial thing to change. The whole ecosystem then needs to change as many servers are having the source code installed and not compiled byte-code.

And: Humans are "familiarized creates". That means players are feeling used to the old well-known behavior and now suddenly a huge change came. This isn't trivial compared to some mods have to invoke exclude_surface (and optionally reinclude_surface to save some memory) and then their surface is excluded.

4 days ago

And changing from surface.name to surface_index isn't a trivial thing to do, too. exclude_surface requires a string (name) and changing the type-check from string to number is maybe trivial at my side but it breaks other mods as an error will be raised. I won't add some "lazy-butt" code like if type(name_or_index) == "string" then and similar to number to my code. Either index or name, not both.

I can however add a remote-call function exclude_surface_index and reinclude_surface_index. That is very trivial. Yet still the above described dogma-change won't take place so quickly. It needs long consideration and not just by a forum reply.

New response