Yui

Rond's Personal Grammar Nazi
Veteran
Joined
May 2, 2015
Messages
201
Reaction score
31
First Language
English
Primarily Uses
Okay first of all I want to apologize for not having a screenshot of this, but I doubt that it will be necessary to ask this inquiry. I've recently been messing around with the base functions of rpg maker to get a feel for using it and I encountered an annoying problem.

When you make a mistake with an event, for example forgetting to set a common event, you have to go back and redo every instance of that event that you created. Is there a way to set up inheritance in RPG Maker to facilitate quicker trouble shooting? So that if you encounter such a problem that you only have to edit the parent object.

For those who don't really understand what I'm asking, In some programing languages you can create a "Parent" object that has all the major code, variables, and "switches" embedded into code. For example lets pretend rpg maker didn't have NPCs pre-programed into the interface and you wanted to have NPCs in your game, you would create a Parent NPC, or Base NPC, to interact with your player/hero object. Then when you went to create other npcs the source code would be set and you'd just need to change the string variables to change conversations, and switch the switches as needed on or off.

I'm not making NPCs I was trying to create an in game item that raises a variable's value. Which already became irritating since I can't directly state that "variable (x) = Item (x)" because the interface only gives options for  "if item exists" and not "Do you have (x) amount of the item"

I have the event I want working properly, but I would love to know if there is a way to set up inheritance for future reference to make things easier. Though hopefully when I start experimenting with scripting this will be a moot point. But for now can anyone tell me if there is a way to set up inheritance for objects (events) in RPG Maker, it'd be most helpful.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Not automatically, no - and the editor cannot be changed, so such function cannot be added.


However, you can make a "master map" with placeholders for often-used events, and then only copy those events to the maps where they are needed.


It's still a lot of work, but that way you only need to open the event once.

Which already became irritating since I can't directly state that "variable (x) = Item (x)" because the interface only gives options for  "if item exists" and not "Do you have (x) amount of the item"
Then you didn't look deeply enough.
OK, I admit that you'll need two commands and can't directly make it a single condition, but then it's easy.


1) Control variable : game data : [item XY] in inventory


This loads the current number of the item in inventory into that variable


2) conditional branch - compare variable with number


Additionally, there are some scripts that allow fixed and automatically updating variables - by default the number is only updated when the control variable command is executed.
 
  • Like
Reactions: Yui

Warpmind

Twisted Genius
Veteran
Joined
Mar 13, 2012
Messages
936
Reaction score
578
First Language
Norwegian
Primarily Uses
While there certainly are Common Events in the Database (third tab from the right) which can have some of the properties you outline, the Events really don't quite work like the Ruby scripting system, which does feature inheritance in the manner you describe.

I would suggest you try to use a script call as the condition you want - unfortunately, I don't recall the exact line of code off the top of my head - but I'm quite certain a single line of script can check for the quantity of any item one might have in the inventory.

I believe this thread should have what you need. http://forums.rpgmakerweb.com/index.php?/topic/25040-ace-useful-script-call-reference/
 
  • Like
Reactions: Yui

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I have a clone script that achieves what you're trying to do, but of course you've got to use it right from the start, or go back and convert all your events to clones. If you want to change something, you just change it in the "master" event and all the cloned events subsequently adopt the changes. You may not want them all to be EXACT clones though, which would make it difficult.


There's nothing you can do in the editor itself though.
 
  • Like
Reactions: Yui

Yui

Rond's Personal Grammar Nazi
Veteran
Joined
May 2, 2015
Messages
201
Reaction score
31
First Language
English
Primarily Uses
@Andar - I ended up setting an common event of "(x)+1" linked to the item itself, but learned I need to update the event if acquiring the item to "common event Orbs" as well.... I was hoping there was an easier way. The way you suggested is helpful too!!!!

@Warpmind - I'll check the thread, I'm really hoping once I get into the scripting portion/learning ruby all of this will be easier.

edit:

@Shaz - That sounds very much like what I'm looking for do you have this script in a thread on the site? Though its a relief to see that Ruby is fairly similar to most OoL!! That's going to make things easier to pick up.

edit2: This is how I did it andar --->





It works but it feels like a lot more effort then it should be
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
http://forums.rpgmakerweb.com/index.php?/topic/18727-clone-events/


There are other clone scripts out there, if this isn't quite what you're after.


Having a common event just to increment a single variable seems overkill to me. Unless you want to do something else in that common event (like play a sound or flash an animation or something). What's the likelihood that you'll want to change the variable it increments? I'd say fairly low. In that case I'd just increment the variable within the event.
 
Last edited by a moderator:
  • Like
Reactions: Yui

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
edit2: This is how I did it andar --->


It works but it feels like a lot more effort then it should be
Yes, it is too much.


1) delete the common event


2) delete the call to a common event on the event EV032


3) in the event EV090, doubleclick on the first line to add a new command


4) select control variable


5) set the command to control variable 001: orbs (if not there by default)


6) select operand option "game data"


7) click on the three dots to the far right of that box (should read "Map ID ..." by default)


8) in the next window, select "Item" (first option) and then choose the [special orb] as the item.


9) confirm everything with OK


That should do it for you
 
  • Like
Reactions: Yui

Yui

Rond's Personal Grammar Nazi
Veteran
Joined
May 2, 2015
Messages
201
Reaction score
31
First Language
English
Primarily Uses
@Shaz - thank you, I'll also look for the others for safe measure. I also feel the same way which lead me to ask this question to begin with, but it didn't really occur to me to place the variable in the event itself, well it did but I assumed that it would be local to the event itself and wouldn't carry over to other instances of the event. I actually did this at first

and as all of you know, this did absolutely nothing. (I assumed that this would set the function of the item to be item = +1orb which was what caused me to assume all variables were local. I feel like such a nub, cause I was searching for a "global" variable function and settled on common events! Also I had events like this to auto-run when a condition with the variable was met.

Thank you for clearing this up for me, I was planning on testing that later, but its a relief to know that all variables are global (for the most part)

@Andar - thanks!!! that actually helps a lot, but just to clarify, this sets that variable only for the selected map right? I know this is a silly question but I want to be sure.

Also I'd like to say, I really like RPG Maker, its easy to use, yet complex enough to carry out fancy operations I'm so glad I bought it.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
but its a relief to know it all variables are global (for the most part)
All regular variables and switches are project-based, that is completely global for your intentions.
The SELF-switches of map events are event-based, which means that switch A in one event doesn't affect anything in any other event. That is the only "local" storage in events.
 
  • Like
Reactions: Yui

Yui

Rond's Personal Grammar Nazi
Veteran
Joined
May 2, 2015
Messages
201
Reaction score
31
First Language
English
Primarily Uses
Thank you for clearing that up Andar!!! This really helps my understanding a lot!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top