New account registration is temporarily disabled.

[RMVX ACE] IS THERE A WAY TO DISABLE USE (OF AT LEAST CERTAIN ITEMS) WITHOUT FORCE REMOVING THEM?

Posts

Pages: 1
After the events in my last post, the user is taken to an "unknown place" where you play as a Moltres, the aforementioned bird mentioned in my last post.

The user will now play as the Moltres. However, there is one small but game breaking problem.

Prior to this, there was an optional boss fight where if at least one character had the shrunken status effect, and you talk to a person in a town, he will ask the shrunken ones to enter his bird's stomach to fight a virus that manifested as a live creature. upon defeating this virus, the man rewards you with a "Return Eagle" which teleports you to the starting point of the adventure (outside this one house on the world map) and moves your Lugia (the ship) to the nearest shore. This is done by a common event.

The problem with that is the item is reusable. When the game has you play Moltres, and you have done the virus battle, the Return Eagle is still there in your inventory. If the user uses it while as Moltres but before Moltres rescues the party from the aforementioned predicament, it could potentially break the game—especially due to the fact that we are now dealing with new areas not yet connected to the world map. This includes a different world map I plan to use. It would also break the game if the user used it on that 3x3.

So, I need a way to disable use of that item temporarily until Moltres is reunited with Justin and his party.

I cannot just put a conditional branch to check if Moltres is in the party because that would prevent it from working when Moltres joins the rest of the party for a bit. If there was a way to check if persons are NOT in the party, that would be different. That is where the PS1 version of RPG Maker was superior. It had that ability. In RPG Maker VX Ace, you can only check if someone is in the party, you cannot do an absent member check.

There are a couple of other items I would need to disable at this point as well in order to not break the game.

If there is a way to have all current items be put on hold and have Moltres only use the items she finds until she is reunited with Justin, that would be even better.

I see no disable items command or anything.

Is there a way to do either thing?
In regards to checking whether someone is NOT in the party, you could do that in a conditional branch. Simply check if the person IS in the party, and enable handling when conditions are not met. Then, in the ELSE statement of the conditional branch, execute the code you want to run if that person is NOT in the party. You can leave the first part of the branch empty if you don't want anything to happen if they ARE in the party.

There may also be a way to disable item usage temporarily in a script call, but I'd have to be at my computer to check. I'm not sure what the values are for assigning "occasion" in the database, or if the code works the same in ace as it does in VX, but if it's similar then I can write a simple code that can do what you're looking for.

EDIT: Assuming that VXA has a similar data structure to VX, you could potentially do this. Run this code in a script call when you want to disable the use of the item.

$data_items[x].occasion = 3

Where you replace "x" with the id of the item you want disabled. Then, to re-enable it, you would use this code in a script call.

$data_items[x].occasion = y

And you'd replace "x" with the id of the item, and "y" with the occasion id. For items that can be used all the time, change "y" to 0. For items that can only be used in battle, change "y" to 1. And for items that can only be used in the menu, change "y" to 2. Keep in mind, I'm speculating about VXA's data structure, but from what I can tell this would work.

There is one caveat to this, however. Because item data is not saved with file data, when you save and quit and reload, the occasion for all the items would be reset as well, nullifying the effectiveness of this solution. You COULD alter the engines File script to save item data with the file data, but doing so would involve changing the source code of the engine, and mistakes would basically destroy your game. Not worth the risk if you don't know what you're doing. However, if this sequence you're looking at is fairly short, you could simply disable saving during this period, and then you wouldn't have to worry about saving item data.

Those are the two solutions I could come up with, although I would strongly recommend simply using the conditional branch method, since script calls can be unpredictable if you don't know what you're doing, and could cause errors that can be even harder to fix. Regardless, this is just to say that yes, it's TECHNICALLY possible to disable item usage, just not very easy or practical when there are alternative methods available. Hope this helps.
The problem with the conditional branch you gave, as I already said, is that the item needs to be usable once Moltres rejoined the party. The conditional branch would still prevent use if Moltres is in the party but so is everybody else.


As for the script code, would running that in a global parallel process in common events with a conditional branch where it disables after a certain switch is enabled fix the save/reload issue?

Edit: RPG Maker VX Ace will not let me add a script. There is no option to create a new line. All spots are filled and there is no + or anything to add a new line

Edit 2: I figured it out. You add the script from the event menu
Would something like this work?



Bear in mind that switch 999 is just a filler until I know exactly what switch will be the re-enabler.
Hypothetically, yes that would work, assuming VXA has the same data structure. I looked up the RGSS3 reference manual before sending that, and from everything I can see it would work, but I can't give a 100% guarantee. It's worth trying though, and if it doesn't work you could try the branch method, which as I said before actually DOES let you check if someone is not in the party, simply by doing this:



So, if you have multiple party members, your code could look something like this:



It's maybe not as clean or efficient as the script call, but it should hypothetically be just as effective. And if you really only need to check for one party member, then you only need the one branch, not several. So you could check if all the other party members (or maybe just Justin) is NOT in the party, and only let you use the item when he IS, and items that Moltres gets during this period would be usable by putting the code in the opposite part of the branch. It also reduces the risk of potentially breaking an item in-game if something goes wrong. With the script call, you're literally changing the hard-coded item data in the database. That also means that every item you get with the same ID is also affected. So it's not a matter of "This one potion is disabled but the others aren't." It's more like, "While this code is active, every single potion found everywhere in the game for the rest of the game is disabled until I manually re-enable it."

Does that explanation about conditional branches make more sense?
I can figure a lot of conditional branch stuff out myself to an extent. RPG Maker for the PS1 was different as far as conditional branches, but I am able to apply the knowledge to RPG Maker VX Ace to an extent.

I have programmed a casino in RPG Maker for PS1 by nesting conditional branches (known in the PS1 version as two way or three way choices with probability) but nesting was not indented so I would use Take Over events to the next page to make it easier to keep track of.

I have been using RPG Maker for PS1 for the last five years and I consider myself an expert in it. But RPG Maker VX Ace is an entirely different can of worms.

The game I am working on now is just so I can learn VX Ace so I am not repeating a lot of similar events. I am venturing out into unknown territory with each new situation.

I still do not know how Take Over events work in VX Ace so I am unable to make a second NPC move immediately following the first. In the PS1 version, You would just take over command pointing to the event with the other NPC and the second event would trigger right after the first. It is how one event led to another in the PS1 version. I do not know how that works in RPG Maker VX Ace.

If I could figure that out, it would be a game changer.
Ah, gotcha. I'm not familiar with how the PS1 version works, so I'm not entirely sure what you mean, but it sounds like the functionality was a little more in depth for detailed control over certain situations. Still, I've yet to see anything that CAN'T be done in VX with enough ingenuity and practice. And anything VX can do, Ace can do better, so you've got a good platform to work with.

Either way, hope this solution works. Let me know if the script call doesn't work for some reason and I'll take a better look at the RGSS3 data structure to see what I might have missed.
Pages: 1