• 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.

Multichoice List that contains a variable number of selections? (pokeemerald)

17
Posts
2
Years
    • Seen Dec 14, 2022
    So I'm in the process of making the scientist in Devon Corp that revives the fossil you pick up in Mirage Tower be able to revive any fossil from Gens 1-6 (since the gen 8 fossils are acquired differently). I noticed there was a map script in the base game that accounted for the situation where you bring both fossils to him, and it calls a multichoicelist that lets you choose which one you want to revive. However, since multichoicelists are a predefined structure, if I were to go about this the traditional way I would have to make 2048 different multichoice lists to account for every combination of fossils you could bring to him (which obviously isn't feasible). Is there a way to create a single multichoice list that checks which fossils you have, and then presents you with those options as a multichoicelist? Or do I have to solve this problem another way (like just picking the first one in the bag or something). I'm still kinda a novice at scripting, so any help is appreciated
     
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    One way to do this would be to call a custom C function from your script to generate a multichoice menu based on the fossils you have in your bag.
    Take a look at DizzyEgg's BW Repel modification, which does exactly that with different repels.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • So I'm in the process of making the scientist in Devon Corp that revives the fossil you pick up in Mirage Tower be able to revive any fossil from Gens 1-6 (since the gen 8 fossils are acquired differently). I noticed there was a map script in the base game that accounted for the situation where you bring both fossils to him, and it calls a multichoicelist that lets you choose which one you want to revive. However, since multichoicelists are a predefined structure, if I were to go about this the traditional way I would have to make 2048 different multichoice lists to account for every combination of fossils you could bring to him (which obviously isn't feasible). Is there a way to create a single multichoice list that checks which fossils you have, and then presents you with those options as a multichoicelist? Or do I have to solve this problem another way (like just picking the first one in the bag or something). I'm still kinda a novice at scripting, so any help is appreciated
    If you want to do something like this in a smooth manner, you'll probably have to dive into C code.
    I wanted to do something like this with a multichoice that listed options dynamically, but that didn't go well for me.
    If you're interested enough, Emerald has one instance of a multichoice that is filled dynamically; the ship at Lilycove City. You could probably use that as a reference.
    Check out the ScriptMenu_CreateLilycoveSSTidalMultichoice and GetLilycoveSSTidalSelection functions in src/script_menu.c for more info.
     
    Back
    Top