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

[Scripting Question] Need some help scripting a side quest

2
Posts
328
Days
    • Seen Jul 6, 2023
    Hello,

    I am a newcomer to the fan game community (as a creator at least I have played quite a few) and have been messing around with RPG Maker XP for the last few days. I have a decent working demo at the moment (wild encounters, starter mons, trainers, etc.) but I am really struggling to get the coding correct for a side quest.

    I am trying to create a quest where a person asks if you can find them a potion, to which you have the option to say yes or no. In return I want the NPC to move, granting access to their backyard garden, where you can catch some mons (yes I copied this from Reborn but it felt like a good test quest). I want the response "yes" to activate the quest.

    My script so far is intro text, and show choices, when yes I set up a conditional branch switch called Garden Quest Enabled, so if you say yes this switch turns on. I then created a second event page that is triggered by this switch activating where I set up a different dialogue akin to "have you found that potion yet?"

    This is where my first problem occurs, I can't seem to get that second page of dialogue to activate. I set my switch to number 0076 and the code reads

    Conditional Branch: Switch [0076 Garden Quest Enabled] == ON

    My second page has the switch condition set and the dialogue box "have you found that potion yet?" followed by a show choices y/n, which feels right?

    I am also struggling to understand how I would script in the need for the potion, or rather, how to get him to take an item from my inventory, and how do I make sure its a potion. I was messing with a condition branch using the script PokemonBag.pbQuantity(:POTION)>=1

    But because of the previous problem, I don't really know if this is working or not.

    Anything helps! I hope this was written too vaguely I am pretty new to scripting in general and am still getting the hang of it.

    -BraDaDiah
     
    2
    Posts
    328
    Days
    • Seen Jul 6, 2023
    UPDATE: I got everything working except for making the NPC remain in the moved position after taking the potion from me, any and all help regarding changing the starting location of an NPC please let me know!
     
    Back
    Top