post-oil changes, some technologies impossible. (modded)

Place to get help with not working mods / modding interface.
Post Reply
usafphoenix
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sun Aug 06, 2017 9:42 am
Contact:

post-oil changes, some technologies impossible. (modded)

Post by usafphoenix »

After the oil update, some mods broke, but i realized, this could be resolved with a base-game update.

Technology prerequisites, if removed, renamed, or altered in data-updates or data-final-fixes causes some technologies to be unreachable. This can be fixed by having "prerequisite" logic mandate that the named technology exists runtime. if a pre-requisite is set up during data.lua or data-updates.lua stages, but points to a technology that gets removed in the final stage, currently, that technology can't be researched because the necessary prerequisite is missing:

but if the game runtime stage is set up so that any techs with prerequisite pointers point to a technology that has been removed (or is otherwise impossible), that entry in the prerequisites table should be ignored/skipped.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: post-oil changes, some technologies impossible. (modded)

Post by DaveMcW »

usafphoenix wrote:
Sun Aug 11, 2019 1:43 am
Technology prerequisites, if removed, renamed, or altered in data-updates or data-final-fixes causes some technologies to be unreachable.
Don't do that.

If another mod does that, tell the author to stop or mark it as incompatible.

usafphoenix
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sun Aug 06, 2017 9:42 am
Contact:

Re: post-oil changes, some technologies impossible. (modded)

Post by usafphoenix »

Yes, that WOULD be nice, if everyone that made mods practiced best methods, but sometimes a mod comes along and it DOESN'T.

This shouldn't be an issue, however, if the logic were changed slightly, such that, if a technology has a prerequisite named, that no longer exists, rather than marking it as "red" and impossible to research, ignore the reference to a non-existant tech. This shouldn't even cause a crash, as there is no functional-reasoning why it shouldn't work this way: If the tech exists, obey the prerequisite; if the technology listed has been removed---ignore the prerequisite.

otherwise, i have about 15 bug reports to send off to various mod authors right now >_>

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2534
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: post-oil changes, some technologies impossible. (modded)

Post by FuryoftheStars »

You probably should report them anyway, though in principle I don’t disagree with you.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: post-oil changes, some technologies impossible. (modded)

Post by slippycheeze »

usafphoenix wrote:
Sun Aug 11, 2019 2:30 am
Yes, that WOULD be nice, if everyone that made mods practiced best methods, but sometimes a mod comes along and it DOESN'T.

This shouldn't be an issue, however, if the logic were changed slightly, such that, if a technology has a prerequisite named, that no longer exists, rather than marking it as "red" and impossible to research, ignore the reference to a non-existant tech. This shouldn't even cause a crash, as there is no functional-reasoning why it shouldn't work this way: If the tech exists, obey the prerequisite; if the technology listed has been removed---ignore the prerequisite.

otherwise, i have about 15 bug reports to send off to various mod authors right now >_>
Actually, best practice would be that Wube implement a hard-fail check at the end of the data phase. This would mirror the various other ways that something "wrong" will fail. Given that a technology with a prerequisite that doesn't exist, and is visible to the user, is logically impossible, it'd match that sort of thing that also causes mods to hard-fail.

Which means your 15 bug reports will be submitted by a wide range of people when the mod stopped working entirely. :)

Post Reply

Return to “Modding help”