Infectonator : Survivors

Infectonator : Survivors

Not enough ratings
Merchant quest bug workaround/fix
By RedShadow
A workaround so you can complete the quest regardless of this game breaking bug.
2
   
Award
Favorite
Favorited
Unfavorite
The bug
Hey there, I am from the future.

The game has been abandoned since about 2016 (or 2014? who knows).
No fixes are coming. We are on our own.

Like many people I experienced the merchant quest bug:
  • I find the merchant (on day 10 for me, so I explored many places by that time)
  • I ask for the detergent
  • He gives a quest where we need to find a dude who has a package
  • Get the package and deliver it to the merchant in exchange for the detergent

Well, I found the guy on an already explored area, I right click on the dude and... game freeze.

That's a big deal as that detergent is REQUIRED to fix the car and hence to finish the game. That's a game breaking bug.
The plan
I'm a busy guy, I aint got time to start a new game in the hopes that after 5 or 6 hours the same bug won't happen again.

So here's what we gonna do:
  • Hack the merchant
  • Make him sell the package directly
  • Buy the package
  • Give it back to him hence completing the quest

That way, we can ensure that we have a "coherent" save file, with a completed quest.
We could, like, give ourself directly the detergent. But then we won't have completed the quest, and the merchant dialog would stay stuck on that quest.

So yeah, giving ourself the package, NOT the detergent, feels like the best approach to me.

Hacking the game
Go to the game files. Use steam, right click, "Manage" > "Go to local files"

Extract the file named "data"
Use a zip file program to extract the file named "data", it's a sort of zip file without extension.
Use 7zip[www.7-zip.org] or something similar, doesn't matter

After extracted you should have a file named "data~.swf".
Yes, the game is a flash game.
And that file, is the entire game content.
Everything is in there, images, resources, code.

Now we gonna decompile this SWF file
Dowload JPEXS Free Flash Decompiler[github.com]. It's a Java software, so you will need to have Java[www.java.com] installed.

Run JPEXS using the "ffdec.bat" file.
The program opens with a crappy blueish interface from office 2013.
That's normal don't freak out.

Use file menu and open the SWF.

Now, we are going to do 2 things:
- make it so that all quest items are sellable by the merchant
- make it so that the merchant sells more items than usual
Hack the merchant inventory
Go to "binaryData" and find the line where there is "MaterialList"
Right click and select "Export selection"


Save anywhere on your computer.
Something like "179_MaterialList_xml$e8c3cf5844812f3f565b12e20b7b28361440822264.bin" will be saved, and it's actually an XML file.

Now edit this file with your favorite text editor.
Use Notepad++[notepad-plus-plus.org] or VS Code[code.visualstudio.com] or Notepad. Doesn't matter.

What you want to do is to find is the "Orange pacakge" and all of the following lines:
<showInStore>0</showInStore>


Now, replace
<showInStore>0</showInStore>
with
<showInStore>1</showInStore>

Change the 0 to a 1. Like so:

Save.

Now go back to JPEXS and "Replace" the game XML with your edited version:

Good. Now all the quest items are unlocked and available to buy in the merchant.


Hack the merchant ressuply logic
You could actually stop there, but...

The merchant sells only a maximum of 4 weapons and 10 different items every 3 days.
If the same item is rolled multiple times, then the quantity increases,
So yeah... you could in theory have only 1 weapon sold with a quantity of 4.
Or 4 different weapons. Every 3 days.

Same for the materials. Which there are 10, every 3 days.
So, we gonna increase these limits so we have more chance that the quest items get rolled.

Go to "scripts" > "p_data" > "TG_MerchantData"
This contains the merchant's inventory game logic.

See the "scheduleNextRestockDay()" function
Here it is:

See, the "3" in there? We need to change it.
On the right pane at the bottom there is a "Edit P-Code", click on that, go to "pushbyte 3" (which seems to be at line 20) and change it to "pushbyte 1".
And save.

The code in the middle should reflect that change, like so:


Now the merchant will ressuply EVERY DAY, instead of 3.
Maximizing rerolls in case you don't get any quest items.


See the "restockMerchant()" function
Here we see the 4 / 4 / 10 values in these while loops:

We change the number of times the weapons get drawn, from 4 to 127:

We change the number of times the gears get drawn, from 4 to 127:

We change the number of times the meterials get drawn, from 10 to 127:

Once you have edited the P-Code for all these guys, you should have this:


Save.
And now we are ready, all the modifications are done.
Running the game with the hacks
Make a copy of your local save game. Just in case.
The file is located in:
%appdata%\com.togeproductions.survivors\Local Store\#SharedObjects

Now in JPESX.
Click "Save as..." and save your edited SWF to something like "data.hacked.swf".
Name doesn't matter.

Go to your game folder, and rename the original "data" to something else.
Like "data.original". It's just a backup copy.

Now grab your "data.hacked.swf" and put it in the game folder, and rename it as "data".

Pretty much, you want to game to load YOUR data, the one you hacked, not the original.

Run the game, go to the merchant and enjoy the new inventory.
Proof:

There you go:
  • Buy the Orange Package
  • Talk to the merchant and complete the quest!

You don't have to interact with the missing dude or anything.
Complete the quest and leave the area so this will save your game.
Exit the game.

Restore the original "data" and continue playing normally.
You can also keep playing with your hacked version. Your choice!

You are done
It probably took you a solid hour to do all of this, but you didn't have to start a new game and wasting many hours of gameplay. With no guarantee the bug doesn't happen again on your new run.
Cheers!

My game is broken!? WTF DID YOU DO!
You broke it, not me.
But fear not, just re-validate the game files using Steam.
This will restore everything just like before.
You messed up somewhere, so start again from scratch.

Why u dont give me hacked data directly!?
Because the "data" files contains the entire game.
Should I redistribute this file, this would be PIRACY.
So I can't.
I could give a patch file... but I'm lazy.


5 Comments
Ozzy Mann Deeyas Dec 12, 2022 @ 5:34am 
Thanks for the save, mate. A bit ridiculous that we have to go such lengths to beat the game on our first playthrough. A bit annoyed at the devs that they left such a gaping hole in their game, especially on the main quest, no less. In any case, cheers.
Apocyl May 5, 2022 @ 7:42am 
Hmm, fair. I tried looking at a copy of my sava data with notepad++ and i was able to somewhat read it but not find the actual info i was looking for. a .sol-editor displays basically nothing (at least for me).
Thanks for the help tho <3
RedShadow  [author] May 5, 2022 @ 7:26am 
Hmmm I think these you will find inside the save file. But I haven't checked it out
Apocyl Apr 30, 2022 @ 1:23pm 
Turns out i can mod my game this way. Great!
Now the only thing i haven'r really figured out is how do i see my own stats (like weapons crafted, zombies killed and such?)
Apocyl Apr 29, 2022 @ 12:10pm 
Could you use this to mod the game to, say, make a new team of survivors and make their stats extremely bad?