- 2
- Posts
- 1
- Years
- Seen Apr 7, 2025
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
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