• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] [Fire Red]: Change Multibox Selection at Laboratory

  • 7
    Posts
    3
    Years
    • Seen Aug 6, 2022
    Hello everybody,

    currently i'm working on an Pokemon FR Hack where I obtain both Fossils at Mt. Moon and also get the old Amber from the man in the museum. Now there's a problem. When I go to the lab on the Cinnamon Island, I can only select 1 ot of two fossils from the Multichoice Box. Although I've got 3 in my bag. I guess I have to create a new Multichoice Box with the option show all three Items in the Box. Can you help me with that ? I'm working with XSE Script, Advanced Map Editor and HexManiacAdvance.

    One last note; I'm working on the german version of FR, but i guess that should't make a signifcant difference - i guess some offset values may differ.
     

    Asith

    Uwao
  • 237
    Posts
    3
    Years
    • Seen yesterday
    Yes you'd have create a new multichoice box, but you'd also have to rewrite a lot of that script since it only expects 2 choices. The script is at 0x16E4F5 in the English version, but you can just go to the scientist in advanced map to find the script yourself. Try to understand that script and use it as a base for a script that allows the player to choose one of three multichoice values.
    A multichoice box is just a glorified yes/no box in that it doesn't matter what the options are - these are only labels for the player. The game just handles the choices as 0x0, 0x1, and 0x2. That means you can repurpose any 3 item multichoice box already in the game that you don't need and put it in your new script.
    There's a tool to do that here (which I haven't personally tested), or you could simply hex edit the labels if you could find their offsets. After that, this piece of code should handle the three choices:
    multichoice 0x0 0x0 [multichoice ID] 0x0
    copyvar 0x8000 LASTRESULT
    compare 0x8000 0x0
    if 0x1 goto @choice1
    compare 0x8000 0x1
    if 0x1 goto @choice2
    compare 0x8000 0x2
    if 0x1 goto @choice3
    compare 0x8000 0x7F
    if 0x1 goto @cancel
    end


    You'll have to rebuild the fossil scientist's script around this new 3 choice code.
     
    Last edited:
  • 7
    Posts
    3
    Years
    • Seen Aug 6, 2022
    First of all, thanks for ya help :)
    unfortunatly the tool doesn't work for me (Win10) maybe also becuase of the different offsets.

    Anyway, I understand what the XSE Script and how it works. What I dont understand is how to add a new MultiCoice Box ingame. What i did so far:
    - Opened up Hex editor
    - Changed the 3 found "DOMFOSSIL" to: D1MFOSSIL, D2MFOSSIL and D3MFOSSIL.
    - When talk to the man in the Lab the multibox says "D3MFOSSIL". This is stored in "0x417CCCC" so this must be the Variable which is used in the Multbox. The "D3MFOSSIL2" got 2 Anchors: 0x3DF3D0 and 0x3DF408

    But now I dont know what do to ...
     

    Asith

    Uwao
  • 237
    Posts
    3
    Years
    • Seen yesterday
    First of all, thanks for ya help :)
    unfortunatly the tool doesn't work for me (Win10) maybe also becuase of the different offsets.

    Anyway, I understand what the XSE Script and how it works. What I dont understand is how to add a new MultiCoice Box ingame. What i did so far:
    - Opened up Hex editor
    - Changed the 3 found "DOMFOSSIL" to: D1MFOSSIL, D2MFOSSIL and D3MFOSSIL.
    - When talk to the man in the Lab the multibox says "D3MFOSSIL". This is stored in "0x417CCCC" so this must be the Variable which is used in the Multbox. The "D3MFOSSIL2" got 2 Anchors: 0x3DF3D0 and 0x3DF408

    But now I dont know what do to ...

    Gonna attempt to clarify here:
    The game has a set number of multichoice boxes predefined in its memory. Adding a brand new one to the table is tricky, so I recommend you repurpose a default one that you don't need. This is a list of all of the choiceboxes and their labels:
    Spoiler:


    The fossil lab scripts use 15, 16, 17, 18, and 19. Repurposing these won't do it for you, since they have a max of 2 options, and you need 3. Pick one with 3 (for example, [26] - Fresh Water, Soda Pop, Lemonade), search for those labels in a hex editor, and rename them to your fossils. (I would be replacing "Fresh Water" with "Dome Fossil", and etc, in my example). Remember that this will change this choice box throughout the game, so it's only viable if you don't actually need the original labels anywhere. Now that you've put the fossil labels in that choicebox, use multichoice 0x0 0x0 0x26 0x0 in any script to get it to appear in-game.

    That's the easiest method. If you want to keep all the original choiceboxes as they are, then you'd need to create your own new one and insert it into a new table with additional space, which is a bit trickier and not something I've done, so I can't help you there. Try googling other tutorials for that, if you need
     

    Blah

    Free supporter
  • 1,924
    Posts
    11
    Years
    Just repoint the MC structure and change the max number of choices.
    1. Find the table of multiple choice menus
    2. Find the MC you're trying to edit (it's the ID you call with the script)
    3. Change the max options count to the number you need
    4. Repoint the structure

    Alternatively, there are plenty of menus with only 4 options you can edit for your purposes. The Lemonade one for example (id 27).
     
  • 7
    Posts
    3
    Years
    • Seen Aug 6, 2022
    Alright thanks for ya help. The original Script is pretty complex to understand (because the decision which mulitbox will pop up is based on multiple flags)

    I nearly rewrote the complete code without flags and based on the Items in the bag. I used the multichoice Box [25] and [26] keep in mind to change the Names in HEX.

    Additionally the Pokemon you will get from the Lab-Man will hold the fossil which it is made of. So if you want, you can create as much Fossil-Pokemon as you want. Its german, but this should't be a problem, just replace the textstrings. If you have any questionf, feel free to contact me.

    Spoiler:
     
    Last edited:
    Back
    Top