Well, I have a lot of my game already designed and I decided to add some transformation magic. This is how it works...
The actor can transform into a number of different things. For example, if he transforms into a rat, that will give him access to new areas (he can crawl into holes in walls, etc). However, being a rat, I do not want the player to have the ability to use weapons, etc.. (its an ABS). So I make it change the actual character of the player from Actor 1 (main character) to Actor 5 (the rat). Actor 5 has limits (cannot hold any items, use weapons, etc).
The one problem I have is that I also want to prevent the player (when he is a rat, or bat, or anything other than a human) from being able to open chests, and get items that only the human player would be able to do (How would a rat open a chest?). Is there a simple way that anyone can think of handling this. The only way I could think is to manually add a conditional branch to EVERY SINGLE ITEM.
Thank you for your time
Dymdez
Begging for an Easy Fix for Transformation Magic Issue
● ARCHIVED · READ-ONLY
-
-
Yep, that's about it.
Instead of changing the actor to a different actor, you could just change the actor's class and picture. But that has issues (you need a script fix to unlearn/learn skills for the new class, and by default, EXP is not preserved between classes so you start the new class with 0 EXP) and you'd still be left with your original problem.
You could try creating a common event to do the check, and if they're a rat, show a message and use Exit Event Processing, and then put in a call to the common event at the top of your chest event commands. But I'm not sure if "Exit Event Processing" from a common event would only go to the end of the common event or to the end of the chest event, so that may not work. If it does (go to the end of the chest event), it might be a quicker fix to make, but you'd still have to edit every chest event to add it. Pity we can't change the template for the quick events.
The other alternative, is to give your chest events a specific name, and then have a script look at the event name prior to triggering it, and if it's a chest and the player is in 'rat' form, turn on a switch and skip triggering the event. The switch would then be used as a condition on an autorun common event, which shows the text and turns the switch back off. -
All of this seems so daunting (like I originally thought). Hmm, I really do like this feature but this seems like an insurmountable amount of work for a relatively low impact (albeit very fun) feature. There's no way to do this by adding a state? Thanks for the response, Shaz, btw...
-
You would still have to edit every event to look for the state.
No matter how you "identify" whether the player is a rat or not, you STILL have to have a way to specify which events care about it, and that can only be done by editing every single one individually. -
there is no easy way, but it can be made easier than using conditional branches.
The condition "actor exists" basically is a short form for "actor is in party", so you can condition events to function only when a specific actor is in the party.
For example, the rathole event can have two pages, one impassable (no condition) and the other passable (condition rat-actor in party).
It will not work for all cases, but adding a condition to an event is easier than adding a conditional branch to the event -
For a single one, it might be, but not if you have 100 scattered over all your maps already.
To do it as a condition on the event page, you have to:
- edit the event
- copy first page and paste to create 2 duplicate pages
- add condition to second page
- remove existing event commands
- add Show Text event command
times 100.
And you can't just copy and paste the text over and over, as you've done a copy of an event page between each one, so that's what will be in the buffer.
To do it as a conditional branch, you have to:
- edit one event
- add a Conditional Branch - if Actor 5 exists then Show Text, Exit Event Processing
- copy that conditional branch
- edit the next event
- paste the conditional branch
repeat the last 2 steps 98 times, and in this case you CAN use copy and paste because you're not putting something different into the buffer beforehand.
Okay, an alternative, if you REALLY don't want to go to the trouble of editing the events ... IF you can say "all events I want to restrict will use this sprite, with this index" (so ALL chests, from the same spritesheet and index), you could put that into a script, and say "when the player interacts with an event, check if it uses THIS spritesheet and THIS index (a chest), and if the player is in a rat form, turn on this switch (that controls the autorun common event to display the message) and don't trigger the event, otherwise if the player is not in rat form or the event doesn't use that graphic, go ahead and trigger it".
That would be the least difficult for you to implement, but it will require someone writing a script, and the more "types" of events you want it to apply to, the more complex that script is going to be. -
I'd really suggest that you just edit your chest events so that they check for the rat state or actor or whatever...
-
One way to do it, though you will need to redo all your chests if you do this:
1) Create a chest as normal, with the conditional branch to determine if the character is a rat or not. Make sure the second page is also set up for when the chest is open. You could do this with quick event creation, then add the conditional branches to it.
2) Copy and paste this event everywhere you want a chest. Now the conditional check will be on all your chests.
3) Edit each chest event individually to have the chest give the character the proper treasure.
It isn't too bad once you set up the first event, as the copy/paste is really fast. The worst part is the editing, especially if you already have many chests already set up in your game, as you will need to erase them (as you can't copy/paste a new event where one is already), then reset them up. -
This is why sometimes, it's really good to have everything that you want already in place before you start working on it... then if something comes across, you just then decide if it's gonna be worth the trouble of adding it or not.
-
Adi, that's unrealistic.. Of course you get more ideas as you learn and expand, etc..
Ok, I have resigned myself to the fact that I will have to edit my over 300 events that can be interacted with.
Will the following idea work: I add a switch "transformed to rat" and set it to ON when the player is transformed and add a new page to every event that basically has a page triggered by this switch. This to me seems like the simplest way to address the problem. No conditional branches, just one switch that will be set to ON when the player is transformed. If this idea works then at least I can save time because I will just be pasting one event page to all my events, should take 10 minutes tops. -
Yes. Make it the second page. If you open the chest as a human, then transform to a rat, you still want to see the opened chest. So it should be immediately after the default page on the event where the chest is opened and the item given.
-
Alright, thanks, solved -- I should say finally that it isnt just chests. It is also interacting with other NPCs, triggering certain events (like drop bridges) and basically any interaction I don't think a rat should be doing. Thanks guys!