• 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✓] Lilycove City Department Store Vending Machine Items

44
Posts
9
Years
    • Seen Mar 10, 2024
    Where is the script to edit the items that you can obtain from the vending machine? Thanks.

    So, I found the script for it.

    Spoiler:


    With this, you can have only Lemonade, Soda Pop, and Fresh Water.

    What would I do to add Moomoo Milk (500P ea) and Berry Juice (100P ea)
     
    Last edited:
    44
    Posts
    9
    Years
    • Seen Mar 10, 2024
    So, apparently, this requires a multichoice editor or something similar to hex editing. How would I find the exact location for this?

    I see that 0x2A is the indicator for multichoice. But where do I edit this?

    In LSA's multichoice editor, the table is pointed at 0858AEC0

    The rest goes like this:

    0858AEC3 FRESH WATER\cÛ [$]200
    0858AED6 SODA POP\cÛ [$]300
    0858AEE9 LEMONADE\cÛ [$]350
    0858AEEA Exit

    I want the table to look like this:

    0858AEC3 BERRY JUICE\cÛ [$]100
    0858AED6 FRESH WATER\cÛ [$]200
    0*85EAEE9‬ SODA POP\cÛ [$]300
    0858AEFB LEMONADE\cÛ [$]350
    *0858AF0D‬ MOOMOO MILK\cÛ [$]
    *0858AF22 ‬Exit

    However, if I input those values and click save, they get repointed.
     
    44
    Posts
    9
    Years
    • Seen Mar 10, 2024
    Ok, so, I got the multi-choice selections down. Now I just need help implementing the script.

    This is the new formula. I used Hex Maniac to edit the locations of the tables.

    Multi Choice 0x2A
    Table 085EAEC0
    08FF8030 Berry Juice\cÛ $100
    085EAEC3 Fresh Water\cÛ $200
    *085EAED6 Soda Pop\cÛ $300
    *085EAEE6 Lemonade\cÛ $400
    *08FF8043‬ Moomoo Milk\cÛ$500
    085EB7EA Exit



    Here's the script once more.

    Spoiler:
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Here's a version of the vending machine script that should work with the longer multichoice that you've made. The text is a bit weird whenever you receive the Berry Juice/ MooMoo Milk as the script says that you get a can, when the sprites are a coconut(?) and bottle respectively. You could change the text string to something like "You received a [ITEM]!" or something like that, but it should still work either way.

    Spoiler:
     
    Last edited:
    44
    Posts
    9
    Years
    • Seen Mar 10, 2024
    Here's a version of the vending machine script that should work with the longer multichoice that you've made. The text is a bit weird whenever you receive the Berry Juice/ MooMoo Milk as the script says that you get a can, when the sprites are a coconut(?) and bottle respectively. You could change the text string to something like "You received a [ITEM]!" or something like that, but it should still work either way.

    Spoiler:

    Oh wow.

    So, I've edited the rom so it can verify that the actual multiple choice is pointing to the Moomoo Milk and Berry Juice.

    [URL Removed]

    I've worked with a script already established in the game. But everytime I attempt to edit it, it reverts most of the script to only 4 choices instead of 6

    Spoiler:
     
    Last edited:
    44
    Posts
    9
    Years
    • Seen Mar 10, 2024
    Here's a version of the vending machine script that should work with the longer multichoice that you've made. The text is a bit weird whenever you receive the Berry Juice/ MooMoo Milk as the script says that you get a can, when the sprites are a coconut(?) and bottle respectively. You could change the text string to something like "You received a [ITEM]!" or something like that, but it should still work either way.

    Spoiler:


    Also, I have this in the script. Is it ok to overwrite?

    '---------------
    #org 0x9C0B20
    nop1
    clearflag 0x0
    if 0x0 call 0x1C01001F
    nop
    nop
    nop1
    nop
    end

    Or am I doing this wrong? Because by dynamic 9C0B20, you want me to place the script in $009C0B20, right or no?

    Err, scratch that. I have a lot more data in other areas nearby. And FF32E0 and beyond are all FFs.

    Actually, I just realized, after expanding the ROM to 32 MB, I still wind up with a Not Enough Free Space Error after using #dynamic 1000000
     
    Last edited:
    44
    Posts
    9
    Years
    • Seen Mar 10, 2024
    Here's a version of the vending machine script that should work with the longer multichoice that you've made. The text is a bit weird whenever you receive the Berry Juice/ MooMoo Milk as the script says that you get a can, when the sprites are a coconut(?) and bottle respectively. You could change the text string to something like "You received a [ITEM]!" or something like that, but it should still work either way.

    Spoiler:

    Well, shoot, I tried your method, I even used the same script location as the Dynamic address, and the code still doesn't work.
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • I tested my script on the link you had before it was deleted (no linking to ROMs please, we only allow patches) and it worked just fine.

    Spoiler:


    You've correctly edited the multichoice box which is great, but you don't need to insert the script at 0x9C0B20 exactly, its just the beginning of some free space in Emerald. Whatever you have at that specific offset seems to be corrupt so just compile my script and C+P the resulting offset into a signpost script in A-Map. Whenever I compiled my script it was inserted 0x9C2634 so don't worry if something similar happens to you.
     
    Back
    Top