[0.10.0] save game crafting bug

Bugs that are actually features.
Post Reply
User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

[0.10.0] save game crafting bug

Post by SuperSandro2000 »

I loaded my save game from 0.9.8 and Now I can craft all Items.
save game: https://www.dropbox.com/s/x8s44wapxlbty ... Play02.zip

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [0.10.0] save game crafting bug

Post by SuperSandro2000 »

Note: I can also craft the plane and the player-port. I think that was not so intended.
Note 2: Image

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.10.0] save game crafting bug

Post by FreeER »

Hm, when I loaded your save I didn't have that issue...but then I didn't have all the mods you did (the 'removed' items list was off my screen :) luckily pressing escape cleared it...I tried enter first and that did nothing lol).
So...maybe try using the console (~) and typing "game.player.force.resetrecipes()" (without the quotes). If that doesn't work maybe try

Code: Select all

game.player.force.reset()
for _, tech in pairs(game.player.force.technologies) do tech.researched=true end
which should reset all tech to un-researched as well as reload the recipes, the for loop then 'researches' all of them again, since I noticed in the save that everything was researched. Hope one of those are helpful.

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [0.10.0] save game crafting bug

Post by SuperSandro2000 »

I load the game and now it's working. I think it's working because I updatet TreeFarm-Mod

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: [0.10.0] save game crafting bug

Post by drs9999 »

I highly doubt that!

cranphin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 07, 2014 10:35 am
Contact:

Re: [0.10.0] save game crafting bug

Post by cranphin »

Hi!

I think I've got the same/similar issue

My 'Custom Scenario' 'base/freeplay' save from 0.9.8, loaded in 0.10.0, suddenly allows me to craft everything.
But I do not have all tech researched (the 'T' menu still shows not all tech is researched).

I'm using -no- mods (except for scenario and trailer :) ).

I'm adding two savefiles:
21_optimulti.zip The old 0.9.8 save.
22_techissue.zip The same save, loaded and saved in 10.0.0, with all the techs enabled.

The mentioned console (~) commands seemed to have no effect (can still craft everything in 'E' menu), do they require a save/reload or so to have an effect?

Thanks! :)

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.10.0] save game crafting bug

Post by FreeER »

cranphin wrote:I think I've got the same/similar issue
hm loading the 9.8 save does not give me this effect...so no idea what's causing it...
but! I definitely see what you mean when I load the 0.10 save, AND I've created a (manual) fix for it ;)
You should be able to copy and paste this into the console (~) and have it fix itself :P

Code: Select all

unrecipes = { 
  "railgun-dart", 
  "player-port", 
  "computer", 
  "railgun", 
  "small-plane" 
} 
 
untech = {} 
for _, tech in pairs(game.player.force.technologies) do 
  if not tech.researched then table.insert(untech, tech.name) end 
end 
 
for _, tech in ipairs(untech) do 
  if game.player.force.technologies[tech] then 
    game.player.force.technologies[tech].researched = true 
    game.player.force.technologies[tech].researched = false 
  end 
end 
 
for _, recipe in ipairs(unrecipes) do 
  if game.player.force.recipes[recipe] then 
    game.player.force.recipes[recipe].enabled = false 
  end 
end 
drs9999 wrote:I highly doubt that!
While I haven't managed to duplicate this, it's quite possible that changing a mod and then reloading the save would force Factorio to recalculate the recipes/techs, which could very likely solve the problem...but since I haven't gotten a 9.8 save to load and unlock the recipes I can't test to see if a mod change would do so for sure.

@devs, for some reason resetrecipes, reset(), and reload on each tech/recipe did nothing at all (that I could tell)...not entirely sure the reason there but then I've no idea how all of the recipes got enabled in the first place)...And trying to loop through and set all tech to researched = false crashed Factorio (further testing showed I could disable and renable the ones that showed in the menu as researched without a problem, but setting the unresearched tech to 'false' to try and clear them crashed Factorio, maybe because they were already false?). So I ended up finding out which shouldn't be researched, setting them to researched and then resetting them to unresearched (which removed their recipes) without a crash, after that it was just finding out which recipes existed that shouldn't (no automated way to do that that I'm aware of, unfortunately, of course fortunately there are not many of them).

cranphin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 07, 2014 10:35 am
Contact:

Re: [0.10.0] save game crafting bug

Post by cranphin »

Whee! Your script does manage to fix it :)

No idea why this is happening for me, and not for you though..
I'm happy to help if anyone wants my help to diagnose that :)

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [0.10.0] save game crafting bug

Post by SuperSandro2000 »

I have an Idea. I don't know but it could be that I had enabled the trailer mod.

cranphin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 07, 2014 10:35 am
Contact:

Re: [0.10.0] save game crafting bug

Post by cranphin »

Ha!

I found the culprit, it's even something I mentioned XD

Trailer mod on: issue happens every time (when loading an old save).
Trailer mod off: issue no longer happens (when loading an old save).

No idea why tho.. :D
So guess I'm leaving the trailer mod off for now :)

Oh hey, and he had to steal my thunder just while I was double checking.. XD

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.10.0] save game crafting bug

Post by FreeER »

I suppose that would explain it...but then I'd enabled it when I loaded cranphin's 9.8 save and didn't see it happen...or I thought I had :lol: Apparently I failed to restart after enabling (because I know that I enabled it and checked if I could get those results), so..... I'll move this to 'Not a Bug' now (and if you think it is a bug read the release post here)

cranphin
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 07, 2014 10:35 am
Contact:

Re: [0.10.0] save game crafting bug

Post by cranphin »

Hmm, I don't think it's a bug as such then. But it might be worth keeping this open a bit as a reminder to put a big scary warning in the description text of the 'trailer mod' :)
Cause lots of people may/will get the new version without looking at the change log too closely, and it's easy to then enable the default included trailer mod not expecting it to break things in other games :)

I think the mod description would be more noticeable :)

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.10.0] save game crafting bug

Post by FreeER »

It'll be removed from the 0.10.1 release and it has instead been released in the Mods subforum (as such it won't be part of the official 'stable' release or future experimental ones, and should cause less confusion). There's actually been relatively few people who had trouble with it so hopefully everyone else has been made aware of the issue or aren't interested in trying it out by now :)

Post Reply

Return to “Not a bug”