Mechalico

Editing Stage Order

Apr 8th, 2017
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1. This is a text based version of my stage edit tutorial.
  2. A lot of the stuff will be quite obvious here.
  3. I just copied and pasted most of the stuff from my PDF version which I have no idea where on the web it is, but this being in my Pastebin makes it easy to find.
  4.  
  5.  
  6. Editing Stage Orders
  7. A guide to ending totalitarianism in the community
  8.  
  9. You will need:
  10.  
  11. - A Super Monkey Ball 2 ISO
  12. - GameCube Rebuilder
  13. - HxD or another hex editor
  14. - A list of stage IDs (Here’s mine: http://pastebin.com/90BERE6p)
  15. - Calculator for converting dec to hex and vice versa
  16.  
  17.  
  18. 1. Exporting the REL
  19.  
  20. Both lists of stages are in the folder named mkb2.main_loop.rel. To extract this file you need GCR. Open up your Super Monkey Ball 2 ISO with it. You should see a list of files. Scroll down a little, right click on mkb2.main_loop.rel (not main_game) and export it to somewhere you won’t lose it. HxD creates its own backups, but it might be worth creating a copy of this in case something bad happens.
  21.  
  22.  
  23. 2. Editing Story Mode
  24.  
  25. Story Mode is the easier of the two to edit, mostly due to being more compact and visible. Open your exported mkb2.main_loop,rel in HxD. Hit Ctrl-G (or whatever the combo is) to open up the Go To prompt, and type in 20B448 to go to offset 0x20B448. This will take you to the stage list. This list is each of the 100 stages used in Story Mode, in order of appearance: 1-1, 1-2, all the way up to 10-10. Each group consists of four bytes which refer to two values – the first two bytes are the integer of the stage ID, then the second two are the difficulty. To change the ID of a stage, replace the stage ID of the intended stage with the ID of your new stage.
  26.  
  27. Difficulty can also be altered by changing the difficulty value. Bear in mind that this will only display between 0 and 10, however.
  28.  
  29.  
  30. 3. Editing Challenge Mode
  31.  
  32. Challenge Mode is a bit more visually cluttered and is harder to navigate. Each set of stage data is far more lengthy than it needs to be and is at different lengths depending on what is in each stage. Again, open it up in HxD and Ctrl-G to the offset 0x2075B0. This is a list of all the stages that appear in Challenge mode. These are arranged Beginner, Advanced, Expert, Beginner Extra, Advanced Extra, Expert Extra, Master, Master Extra. What each value means is quite lengthy but here’s a quick run-down:
  33.  
  34. - Every stage starts with the value 00 00 00 02 followed by a 4-byte stage ID. This is followed by a lot of zeroes, then 01 00 00 00 00 00 00 01 describing the goal, and then more zeroes until the next
  35. - Stages at the end of a difficulty are longer and have bytes referring to the end of the difficulty
  36. - Stages with reduced time have extra bytes, one value saying to alter the time and the other saying the new time in frames. These times can be adjusted.
  37. - Stages with green and/or red goals (with the exception of Switches and Coin Slots) have a lot more bytes describing each of these goals.
  38.  
  39. What is important is these first few bytes. The easiest way to find the stage you need is to press Ctrl-F (or whatever it is for you) and type in the hexidecimal representation of the stage ID. The first value you come to should be the value you need (with the exception of Domes as that has the value 0x0100 – that starts at position 0x20A06C). Then it’s a case of replacing the value with that of the new stage.
  40.  
  41. Bear in mind that stages that only list a green goal will have red goals function improperly and vice versa.
  42.  
  43.  
  44. 4. Putting the new REL back into SMB2
  45.  
  46. Now you have a new rel with a new stage order you can put it back into the game. As the file is the same size as the old rel (and if it isn’t you’ve made a mistake) you can simply open up your SMB2 ISO in GCR and import it over the old mkb2.main_loop.rel. However, I recommend having the root files lying around somewhere for easy replacement. When the game is rebuilt and ready, we have SMB2 with an altered stage order.
  47.  
  48.  
  49. 5. Optional – Editing usa.str (or other str files) to name this stage
  50.  
  51. Let’s say you’ve replaced a stage with a debug stage. Issue is, the debug stages are all named with hyphens. Using GCR to open SMB2, open up the game’s stage_name folder and extract usa.str to someplace you’ll easily find it. Open this file in HxD. HxD should by default be set to ANSI which is the format the text is stored in. Here the stuff looks like this:
  52.  
  53. The stages are in order from 001 to 420, each separated with an 0x0A byte. All of the non-standard stages have the name “-”.
  54.  
  55. An easy way to find where the offset of the start of your name is:
  56.  
  57. - If the stage value is between 69 and 200 inclusive (ie between 0x45 and 0xC8), convert the ID into hex, subtract 0x44, multiply by 2 and add 0x2D4
  58. - If the stage value is greater than or equal to 251 (0xFB), convert the ID into hex, subtract 0xFA, multiply by 2 and add 0x9E4
  59.  
  60. Ctrl-G to this position. Highlight your hyphen, click the Edit dropdown, and select Insert Bytes. Then insert the number of bytes you need (ie the length of your stage name). These can be 0x00s for now. Now from the first byte you wrote in, type in the name of your stage using the right hand text panel. Be careful not to overwrite any 0As.
  61.  
  62. Unfortunately in all likelihood the usa.str will be longer than it was before, so you will need to put it directly into an extracted SMB2 root and rebuild it.
Add Comment
Please, Sign In to add comment