How to delete or deny access to a part of an event.
RPG Maker VXAce SupportThe most basic option woudl be to turn on a switch when it is completed and have a conditional for the switch.
This can get quite convoluted with ALOT of quest options.
~ Dinhbat
This can get quite convoluted with ALOT of quest options.
~ Dinhbat
I was actually writing up a quick event page to screenshot and show how it would be done, dinhbat, and mother of God, it is so incredibly complicated at the moment. Now, it's just a challenge to me instead of simple advice - like, can I do it.
There might be some significantly easier way to do it with scripting, but to my knowledge, you can't dynamically change show messages or show choices according to switches. That is, you can't have a show choice with "if switch.1 == on;Potions;if switch.2== on;Slimes;if switch.3==on;Stingers." You have to actually create separate conditional branches for every possible combination of:
1) Which of the 3 quests have been accepted
2) Which of the 3 quests have been accepted and turned in
I feel like there should be an easier way to do it, but I'm kind of coming up short on one. It would probably be significantly easier to have separate events handle each quest, instead of a single quest board that changes according to the switches.
There might be some significantly easier way to do it with scripting, but to my knowledge, you can't dynamically change show messages or show choices according to switches. That is, you can't have a show choice with "if switch.1 == on;Potions;if switch.2== on;Slimes;if switch.3==on;Stingers." You have to actually create separate conditional branches for every possible combination of:
1) Which of the 3 quests have been accepted
2) Which of the 3 quests have been accepted and turned in
I feel like there should be an easier way to do it, but I'm kind of coming up short on one. It would probably be significantly easier to have separate events handle each quest, instead of a single quest board that changes according to the switches.
Don't delete the selections then. Just use conditionals to control what message shows up when they're selected.
If switch for quest completion is on: "You have already completed this quest.", or similar.
In the Else box put the usual quest message in based on if you can turn it in yet or not.
Alternatively, have variables for each quest. 0=unaccepted, 1=in progress, 2=turned in.
If switch for quest completion is on: "You have already completed this quest.", or similar.
In the Else box put the usual quest message in based on if you can turn it in yet or not.
Alternatively, have variables for each quest. 0=unaccepted, 1=in progress, 2=turned in.
Yeah.. Show option screens are a bit more limited. BUT as convoluted as it is. It can be done xD
~ Dinhbat
I like jq's idea! +1
~ Dinhbat
I like jq's idea! +1
Yeah, this can get pretty complicated if you want to give them several choices but only have some of them turn up depending on what's been done and hasn't.
I wrote a little script that would let me build the list then go to whatever label to show what options are available at that time. But you can also do it with conditional branches (if you don't want to follow the suggestion above). I'm using pseudocode below - you'll have to fill in the switches / options depending on how you would do these tests. Basically the first section is to decide what choices to show, the second section is to show the choices and let the player select one, and the third section is to action whatever they've selected. The fourth, optional section is to do further processing after the quest-related stuff that doesn't depend on what quest they looked at.
I wrote a little script that would let me build the list then go to whatever label to show what options are available at that time. But you can also do it with conditional branches (if you don't want to follow the suggestion above). I'm using pseudocode below - you'll have to fill in the switches / options depending on how you would do these tests. Basically the first section is to decide what choices to show, the second section is to show the choices and let the player select one, and the third section is to action whatever they've selected. The fourth, optional section is to do further processing after the quest-related stuff that doesn't depend on what quest they looked at.
Code:
Comment: Section 1 - determine what choices are availableConditional Branch: Quest 1 Available Conditional Branch: Quest 2 Available Conditional Branch: Quest 3 Available Jump to Label: Quests1-2-3 Else Jump to Label: Quests1-2 Branch End Else Conditional Branch: Quest 3 Available Jump to Label: Quests1-3 Else Jump to Label: DoQuest1 Branch End Branch EndElse Conditional Branch: Quest 2 Available Conditional Branch: Quest 3 Available Jump to Label: Quests2-3 Else Jump to Label: DoQuest2 Branch End Else Conditional Branch: Quest 3 Available Jump to Label: DoQuests3 Else Jump to Label: NoQuests Branch End Branch EndBranch EndComment: Section 2 - present the choices to the playerLabel: Quests1-2-3Show Choices: Quest1, Quest2, Quest3When Quest1 Jump to Label: DoQuest1When Quest2 Jump to Label: DoQuest2When Quest3 Jump to Label: DoQuest3Label: Quests1-2Show Choices: Quest1, Quest2When Quest1 Jump to Label: DoQuest1When Quest2 Jump to Label: DoQuest2Label: Quests1-3Show Choices: Quest1, Quest3When Quest1 Jump to Label: DoQuest1When Quest3 Jump to Label: DoQuest3Label: Quests2-3Show Choices: Quest2, Quest3When Quest2 Jump to Label: DoQuest2When Quest3 Jump to Label: DoQuest3Comment: Section 3 - take action on the choicesLabel: DoQuest1 ... add your stuff for quest 1 hereExit Event Processing (or jump to a label after all of the quests)Label: DoQuest2 ... add your stuff for quest 2 hereExit Event Processing (or jump to a label after all of the quests)Label: DoQuest3 ... add your stuff for quest 3 hereExit Event Processing (or jump to a label after all of the quests)Label: NoQUests ... do whatever you need here if none of the quests are availableExit Event Processing (or jump to a label after all of the quests - in reality, this is the last quest-related thing, so you could just leave this line out and let it drop through itself)Comment: Section 4 - any post-quest processing that's common to all questsLabel: QuestsDone (include this and extra commands if you want the NPC to say something else after the quest-specific stuff has finished, and make the above DoQuestx blocks jump to here
And Shaz posted pretty much what I'd been working on, but just could not keep track of in my head for the life of me. The labels were a good idea, I hadn't thought to use those.
I already spent so much time trying to create a demo event page for you to look at, it was bugging me not to have a complete, working version. So I finished it out (it's pretty much an exact copy of Shaz's pseudocode) and took a screenshot in case it helps you.
There's no way in the editor to apply conditions for each option individually. The best you could do was to filter everything else out, which ended up with an expotential number of conditions.
Which is why this script exists, so you can control each option individually.
http://www.himeworks.com/2013/03/06/choice-options/
Which is why this script exists, so you can control each option individually.
http://www.himeworks.com/2013/03/06/choice-options/
Thanks all. I think ill just go with making a Quest Complete switch to make life a little bit easier for now. X3
Control variables -> Set to -> Game Data -> Item: "Potion" in inventory.
That will set the variable's value to the number of potions you have in your inventory. Then, in the quest complete section of the event (with the conditional branch "PotionVariable >= X"), just do Change Items -> Potion -> Decrease -> the number of potions you required to turn in.
That will set the variable's value to the number of potions you have in your inventory. Then, in the quest complete section of the event (with the conditional branch "PotionVariable >= X"), just do Change Items -> Potion -> Decrease -> the number of potions you required to turn in.
Thank you very much. ^w^
Please post unrelated questions in their own thread, rather than putting "everything I want to know" in a single thread. Makes it much easier to keep track of. Thank you.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-delete-or-deny-access-to-a-part-of-an-event.25888/

