[Rseding91] [0.15.35] Remove achievement prototype -> crash on load save

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[Rseding91] [0.15.35] Remove achievement prototype -> crash on load save

Post by eradicator »

Attempting to load a savegame after removing all entries from an achivement prototype crashes the game.

For example:

Code: Select all

data.raw['construct-with-robots-achievement'] = nil
The log says:

Code: Select all

Attempt to use different prototype to traverse save of already removed entity called "you-are-doing-it-right" failed.There is no other prototype of the same type (construct-with-robots-achievement) to be used to load the entity.
Demo mod is attached.
Attachments
er-ocd-fix_1.0.0.zip
(3.12 KiB) Downloaded 48 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13149
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.15.35] Remove achievement prototype -> crash on load save

Post by Rseding91 »

Thanks for the report. That's working as intended (and an error and going back to the menu isn't crashing :P).

However, I'll see about adding support to disable all achievements for 0.16.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Rseding91] [0.15.35] Remove achievement prototype -> crash on load save

Post by eradicator »

Support to disable them all would be greatly appreciated. :) If there was a prototype flag for it there would be no need to actually remove them i guess.


For completitions sake some additional comment:
It's not "going back to the menu", that error message is extracted from the the log file after APPCRASH (windows dialogue).
Checking again...ok, the mod actually only demonstrates a "normal" crash with a standard factorio "Error" dialogue asking to solve the problem by sending the log. Initially i just nil'ed all prototypes in the loop (in data-final-fixes.lua) and that caused an appcrash on loading a savegame.

So change to something like this:

Code: Select all

--fumble with existing achievements
for _,typ in pairs(alist) do  
  data.raw[typ] = nil
  end
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Resolved Problems and Bugs”