Advertisement
smasher32

Furnace Fun now has a calculator!

Apr 6th, 2014
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.72 KB | None | 0 0
  1. THIS IS NOT A MOD, THIS IS AN EXTERNAL PROGRAM
  2.  
  3. tl;dr: Furnace Fun has 256 answer sets. Certain answers naturally have higher probability than others. Using right and wrong answers from previous questions can give updated probabilities to better guess future questions. Download the program here: https://t.co/hdYCVLtKib
  4.  
  5. https://twitter.com/kirkq/status/452575098642243584
  6.  
  7. Hi, I am BonaparteZ.
  8. This is my short readme!
  9.  
  10. Contents:
  11. 1) How this came about
  12. 2) How to use
  13. 3) How YOU can help find a setup to break Furnace Fun even more
  14. 4) How to use, advanced
  15. 5) Thanks
  16.  
  17.  
  18. 1) How this came about
  19.  
  20. Kirkq asked me to help checking if there was any way to break Furnace Fun. What had already been known at that point was that the answers of any given save file will be determined the moment you enter the first note door. However, he failed at finding the answers anywhere in memory. Since he knew I could disassemble, he decided to ask me for help.
  21.  
  22. I was first a bit reluctant, thinking that the chance of my efforts bringing about something useful would be quite low. However, he managed to talk me into it.
  23.  
  24. After having had some initial trouble as well, I figured the best place to look for that value would be the save file! It's obvious that all of the relevant information has to be stored there, or how else would the game remember the answers? So I looked for a value that is written to the save file, and that also only gets set in the game's memory when entering that room. And it turned out that was only 2 bytes. That was quite strange though! 2 bytes aren't enough to store 30 questions with 3 different possible answers (2 bytes can store 2^16 different values, the answers would require 3^30 though). So after double-checking my result, I decided that this would have to mean that some combinations of answers are more likely than others! And so I started to disassemble.
  25.  
  26. First, I traced back the code that writes to those 2 bytes upon entering the room. What's the algorithm behind that? After a cup of coffee, and making my way through an RNG-function, I was shocked to find that these 2 bytes can only be set in one of 256 possible ways! That's a lot less than I expected. So that makes... only 256 possible patterns, of course.
  27.  
  28. However, knowing that wasn't enough. I still had to find out how the game converts this into the actual answers. So I decided to trace code that reads from these 2 bytes, to hopefully find something. Much to my dismay, I found that the game reads from these 2 bytes every single frame for some reason. Does it decode them every single frame? Nope,it turned out what that code did was calculate a checksum, probably for the save file.
  29.  
  30. What I did to get around that was simply patch out the lines of code that read from these 2 bytes but don't convert it into answers. So hopefully, only that one line of code I'm actually looking for would remain. And so it did.
  31.  
  32. After a lot of coffee and many lines of code, I found out the game sends those 2 bytes through a seperate RNG-function, in quite a convoluted way, to somehow receive at those 30 answers in the end. And it still took a while till I got around to those points in the code that actually let me read out the answers after that.
  33.  
  34. So... my options would have been to replicate that RNG-funciton in an external program to calculate all possible patterns there. But that didn't seem like the best of ideas to me. Too easy to mess up with that approach. While taking a break, it suddenly hit me that I could just make the game do it for me! I could inject a function into the game that sets those 2 bytes in all 256 possible ways, one after the other, then I'd make it call that function that converts them to actual answers for each of them, and store the results to some unused bytes! That way, the data was practically guaranteed to be accurate.
  35.  
  36. Not the easiest task in the world, but certainly doable. And it succeeded! ^o^
  37. Contact me, if you want to have a look at that function I injected, or if you want to learn how to do those kinds of things as well.
  38.  
  39. So now that I had absolutely everything, all that was left for me to do was write a little tool. Did I mention there was an insanely huge bias towards one set of answers from the getgo?
  40.  
  41.  
  42.  
  43. 2) How to use
  44.  
  45. Open FurnaceFun.exe
  46.  
  47. It will highlight the most probable answers to be true in blue. Once you know any new information about your pattern, you can feed it into the program and it will update you with new probabilities!
  48.  
  49. If you know an answer is wrong, double right-click it to mark it as wrong. The program will eliminate all patterns where this answer is right and recalculate what are the most probable answers now.
  50.  
  51. If you know an answer is definitely right, double left-click it!
  52.  
  53. To undo your misclicks, just repeat your misclick, or click the UNDO button.
  54.  
  55. If you have trouble finding the right line in time, click the QUESTIONS button to make the tool display Grunty's questions instead of the answers to them. Then, once you have found the question she's asking, click it to switch back to displaying answers and your mouse pointer will be in the right line.
  56.  
  57. As Kirkq remarked, and I couldn't help but agree, this might still be too slow to make full use of the program in a run. So, as per his suggestion, I added a search string feature. You can type in part of Grunty's question you are trying to answer, and after correcting for typos, the program will then underline what it thinks should be your answer. To quickly delete your search string, press "Enter". One more thing, if there are several equally good matches, probably because you entered something stupid or stuff like "COLOR" or "MY PET", which both come up twice, then it won't underline anything at all. So beware of that!
  58.  
  59. To enable sounds, do as the zip file says. If you want to partially disable sounds, just delete or rename those files that you don't want to be played. F.e. you can delete bgm.wav to disable the background music, or rename exit.wav to not hear a sound when closing the program.
  60.  
  61. The rest should hopefully be self-explanatory.
  62.  
  63.  
  64.  
  65.  
  66. 3) How YOU can help find a setup to break Furnace Fun even more
  67.  
  68. One of Kirkq's ideas was to find a setup for entering the room the questions get set in (first note door) in such a way as to rule out some possible combinations of answers. Such a setup could indeed be found by YOU! What I recommend is saving and resetting the game before entering that door, then mashing A and Start to load back your file, as I have confirmed that will reset the RNG to always the same value.
  69.  
  70. From that point on, you want to find a setup to reach the note door in almost always the same frame with almost always the same inputs. But how do you then know, if you were successful?
  71.  
  72. You need not worry, my friend, as I, the almighty BonaparteZ, will bestow upon you the following Gameshark code that will aid you in your quest!
  73. USE AT YOUR OWN RISK!
  74. (I haven't tested this on an actual N64)
  75.  
  76. 81320064 080a
  77. 81320066 1840
  78. 81286100 ac86
  79. 81286102 2dc8
  80. 81286104 0c0c
  81. 81286106 8072
  82. 8128610c 080c
  83. 8128610e 801b
  84.  
  85. Note: To use this code in PJ64, you have to first enable it, then reset using F1.
  86. The code is for the US version.
  87.  
  88.  
  89. What does it do? Well, it injects a few lines of code that will write the exact pattern number you got when entering that room into your gold feathers count! Just enter the room and hit start to read out the pattern number you got!
  90.  
  91. The obvious goal is to always get the same one. Can you do it?
  92.  
  93.  
  94.  
  95.  
  96. 4) How to use, advanced
  97.  
  98. So... You have a setup that will only get you one of X possible patterns? Great! Hit the ADVANCED button in FurnaceFun.exe
  99.  
  100. By default, it will allow all 256 patterns. Allowed patterns are black, ruled out patterns are red.
  101.  
  102. Let's say you got a setup so the only patterns you'll ever get are 4, 20, 69, 101, 134, 169, 216 and 218. Hit ALL to first mark all patterns as red. Then click the patterns you can get from executing your setup to turn them black again. Next, hit the SAVE button to save that list of patterns to a file called FurnaceFun.hex
  103.  
  104. You will probably have to hit RESET in the main window after that, and you'll be good to go!
  105.  
  106. The next time you open the program, click ADVANCED again, then click LOAD, and it'll reload your set of allowed/ruled out patterns.
  107.  
  108. If it wasn't obvious, to undo all playing around with that advanced mode, all you have to do is hit NONE in the advanced window, then RESET in the main window.
  109.  
  110. That's all there is to it!
  111.  
  112.  
  113.  
  114.  
  115. 5) Thanks to
  116.  
  117. Rareware - for making this awesome game
  118. BonaparteZ - for being a dog
  119. Kirkq - for making me do this
  120. yoshielectron - for teaching me some tricks
  121. Nemu64 - for having disassembly tools
  122. CheatEngine - for being an excellent tool
  123. Stivitybobo - for running this game too much
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement