Kizby / FactorioReplay

Inspect, modify, and generate replay files for Factorio
MIT License
11 stars 5 forks source link

out of index for inventory #16

Closed doodoori2 closed 5 years ago

doodoori2 commented 6 years ago

An error occurred while trying to extract the multiplayer replay file. (i was a host)

It seems to be a data error in the replay file, In the slotInInventory function (parse.mjs: 255)

The count of inventories is 5, and the inventoryContext value requires 5 const inventory = inventories [inventoryContext] [whichInventory]; then TypeError has occurred.

Kizby commented 6 years ago

Could I have a copy of the save with the replay and the Factorio version you used? I'd prefer to update the inventories array with a reasonable name for the inventory you were manipulating.

Kizby commented 6 years ago

You should at least not get that error now, though it won't give you a useful name for the inventory slot.

doodoori2 commented 6 years ago

Thanks for quick response! ofcourse, it's over 18MB. I share replay.dat via dropbox link. https://www.dropbox.com/s/qccoajdtig13ar6/replay.dat?dl=0 now, exception is not occur, but some binary is not correctly interpreted.

doodoori2 commented 6 years ago

Btw, can I extract chat log ? It seems that some chat history is in the replay binary.

Because I (host) was AFK, remain players destroyed the game and left. So I wonder what an interesting thing happened. XD but CRC check failure occurs when playing replay in game. :(

Kizby commented 6 years ago

I could probably make a script to strip the Checksums from the game so it would at least play it back. That ConnectionInfo? frame is really finicky and seems to break a lot of replay parses, so I'll hopefully figure that one out this weekend so you can just look for all the Chat frames in the replay.txt :)

Kizby commented 6 years ago

@doodoori2 Try https://kizby.github.io/FactorioReplay/ChecksumStripper.html and let me know if it works for you. Did someone on your server use a console command? I know that breaks checksums in replays.

Kizby commented 6 years ago

@doodoori2 I got a decent parse of your replay I've uploaded at https://we.tl/dgwsPnWowl - the new work is still kind of buggy (so not on the main site yet), but it's handling most of your replay reasonably well. You also inspired me to actually give progress feedback for large files and not try to render 86MB of replay 😸

doodoori2 commented 6 years ago

@Kizby sry for late response. I did not use it except that (Surely this is not the Lua command). Somebody sent to me whisper, and I response with '/r'. and I used /kick, /permissions. I think I hosted not allow Lua to be used, but I can not be sure.

Very big overwhelming thanks for ChecksumStripper. I will try it after work.

doodoori2 commented 6 years ago

I tried it, update replay.dat and re-zip factorio can't find info.json file. isn't it normal zip archive format?

Kizby commented 5 years ago

You added the replay.dat back to a copy of your previous zip file? I'd recommend just dragging the whole original save file into the ChecksumStripper so you don't have to mess with replay.dat's directly. Anyway, I just merged the LoadSavedBlueprints work to master, so you should be able to look at your whole replay if you'd like.

Kizby commented 5 years ago

18 was the PR that fixed this