Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

[SGE] [Guide] The Art of Eventing Logic

Was this Guide Helpful?

  • No it was not!

    Votes: 0 0.0%

  • Total voters
    11

Status Gear Entertainment

Praised Adventurer
!! This guide is not yet complete. If you wish to contribute to largely help explain everything there is about this topic please contact personally or reply in this thread. !!


The Art of Eventing Logic

Full Guide From Novice To Master
Version 1.4.5.2
StatusGearEntertainment

Chapter 0: Summary

This will be a full guide to fully understanding how to event in RMMV as well as other video game systems. This will mainly focus on the RPG Maker Software. Chapter 1 covers the understanding of and importance of its' existence. Chapter 2 covers how to integrate it on a low level quality game. Chapter 3 covers how to integrate highly more intelligent ways to create the game for it's flow. Chapter 4 covers how to create artificial intelligence and logic that makes your game incredibly interactive to keep it's quality level above the standard. Chapter 5 covers how to fully redesign the entire flow of your game through eventing. Regard the following with more than a grain of salt. Keeping an open mind helps spark creativity. Never once doubt that something can't be done, you just haven't found the way to do it.

Chapter 1: Novice

When it comes to video game development, there are a lot of parts that must be put into a complete game. Mastering each will surely help you develop games solo for sure and also become a very liable and dependable partner. One of these major components is the eventing/logic process of the video game. It only makes sense that the quality of a game's intelligence is just as important as it looks. [ More To Be Available Soon ]
Well in the realm of the RPG Maker series, it is simplified code put into smaller and easier sets of code that we label as "events". Each event has the set of parameters and logic that goes into it and for the more advanced users, are not limited by using the Script and Plugin Command options. Among these sets offer you the opportunity to create objects in the game itself that you can set up to be living, intelligent beings or laws of life that invisibly set limits to your game's life.
Let it be known that you can create anything you desire with the right tools. Events give you a vast amount of tools that only support the limitations of your imagination. With that said, don't think if you're game is limited you must resort to other people's abilities to create scripts/plugins to save your life. It makes your life much easier but it doesn't mean that you can't work your way around things especially if you're one for learning how to master the programs you use. You can create small things as simple as an on/off switch for a light bulb down to the most complex Active Battle System like no other and with knowing simple tips and tricks to bend the idea easier for you like shortcuts.

Conditional Branches are the core syntax to your eventing. They are a must if you are trying to learn how create logic. They come in 2 flavors here: IF and ELSE IF and it's even presented to you in 4 pages of the most simple ways. It's common sense in the form of text.
Logic. Nothing more needs to be said but examples will be given.

Say if your hero had an option in his life. Either eat an Orange or an Apple. Which would you choose? The Conditional Branch is the logic that checks your options and choices. Say I choose an Apple, the conditional branch in a nutshell would say "IF you picked the Apple, perform this action. ELSE IF (meaning if you didnt) then you perform this OTHER action. " ELSE IF is optional.
Lots of preparation and pre-staging is in order before you begin your work. If you're serious about making something complex in the future, it's better to start now at the beginning levels to make it a habit of organizing your work. For example is think about how many variables and events you're going to use in the future. Say if knew ahead of time that I will make a game that allows you to unlock 5 different characters in the game, I would already save 5 slots in your variables section specifically for your characters and keep them in order accordingly. You don't want your variables to jump around such as having character unlocks on variables 1, 2, 5, 12, and 27. You would want them on variables 1,2,3,4 and 5.

This goes the same for cut scenes. Some cut scenes might be different or will only be triggered if specific variables are met. You may not have an exact number or guess for your cut scenes in a game unless you plan it out that much. For those who don't, at least save a whole section of your variables specifically. Let's say variables 1 - 10 are for characters, variables 11 - 20 are for cut scenes, variables 21 - 30 are for miscellaneous things that you may have over looked.
Ideas are the wonders of life. Any given moment you can come up with an idea unsuspectingly while others can't come up with something simple. One way for you to jump start on processing ideas would be like as if you were a kid playing with other kids in some imagination game. That's what this is, you're creating a game with your rules and logic to go with it. Take into consideration everything you can and can't do in your game. Some ideas may sound good, but just might not fit with the game's plot or logic. Let's keep a basis here. We need to make sure that your game isn't all willy nilly and things can do as they please.

Say if I was creating your typical magic-fantasy RPG game you would limit yourself by not allowing your playable character to have some godly power, then the game would be rather boring if you could just use it consistently. If you insist on doing godly, unnatural things to it, make sure you balance it out with restrictions. Too much restrictions and it's no fun. Too much leeway and it'll lose it's touch.

Processing Logic ideas are a bit different. Logic is a simple yes or no matter and is needed to be extremely accurate as it will define the laws of your game's universe. For instance, you wish to randomly generate enemies on 1 map that's fine. Make sure you limit the amount that appear and even set each and every single individuals spawn time or appearance different every time.
You may one day want to create a game with a large quantity of something. Chances are each of that something needs to be different such as a large random character audience or a bunch of items to choose from. Depending on how serious you make of your game will determine how much time you spend on it. You get what you put out. Put out little to no effort, you may get little to no likes or notices. Put in lots of work and effort and you may get lots of appraise from those that take notice. If you have to construct a random crowd that walk through your town, it would be clear and obvious you would want to make them different to mimic the idea of a town full of variety. Guess what, you may have to tweak and give each and every single one of them a personality specifically. The Elder Scrolls are a fine example of what giving everyone a personality is like.

Fear not for there are shortcuts. For example on more advanced levels when you master eventing logic, you can simple randomize all your variables together and simply add a few more variables to boot to get a more kick out of your game. For instance, if you make random conversations with people and you want them all to be different, you can create one mega list of things to say and give them all variable IDs. You can then have an event simply use variables that you set. This kills a lot of time and still puts out work. Remember though it may not always be fun but that's part of life. Deal with it.

Chapter 2: Intermediate

With this level of knowledge, you should be able to create simple logic and events to get your game going and run a fairly simple game. [ More To Be Available Soon ]
Step by step processes that you build upon will create a more efficient enemy. For example let's simply break down what the enemy can do. He attacks you. Okay what else? Well if he isn't attacking you then he might be just roaming around mindlessly until he discovers you. From there let's ask "What does he do in his free time?" Is it simply just move around randomly or specifically have a set move route as if he was patrolling?

If we move on to when he attacks you let's ask "What else will he do besides just simply run up and hit you?" You could for example, make him take a step back after he attacks, after all, it's killed or be killed and if we want to make this a smart enemy, we will need to break down his survival instinct. When he steps back he might be plotting his next move, maybe using a fire move or a special move if given the chance.
Coding AI is not as easy as it sounds. It is indeed easy when you take it step by step but in the long run can be very confusing if you are not already thinking of it's outcome and results compared to the rest of the game.

You code longer IF statements for days but yet some of it may mess up because specific parameters just don't match up evenly with other events. This can be problematic for troubleshooting so keep in mind everything that is done when you proceed to improve upon your AI.
Especially if you're one of those who like to create fairly large projects and then all of a sudden decide to take a day off from working on your project. We know that your memory isn't perfect and some is better than others but on the safer side you want to take notes of were you left off. Normally these are one of those things that you take with a grain of salt and say "oh yes of course I do that I don't need to worry." Well let's say that may not always be the case.

Laziness is a powerful enemy and it too can come problematic in all sorts of sizes from small to large. If you're a procrastinator then it's best you take notes to where you left off because you most likely won't remember where you left off with all the logic. Even if the project is small just remember, it's the little things that count.

Chapter 3: Advanced

With this level of knowledge, you should be able to have a good idea on how to create much more intelligent logic to your game. [ More To Be Available Soon ]

Example Links
Random Event Terrain Variable Generation (RETVG)


Chapter 4: Expert

With this level of knowledge, you should be able to create how the higher theory levels of flow your game has such as Artificial Intelligence and Generation interact with your game. [ More To Be Available Soon ]

**NEW BELOW**
If you wish to fit everything on a single event page, you're going to need to master at least 2 things: Conditional Branches + Labels.

Conditional Branches are a must. It is almost the core syntax to your logic.

Labels are optional but are highly recommended as shortcuts. That's what they practically are. If outcome A happens, forget everything else and jump over to this label and continue running logic. If outcome B happens continue running and don't jump labels. If outcome C happens and no one seen that coming just skip it all. Yes you can name your labels anything you want, even if it has a space in it's name like Label "Poop Sock". Just make sure to write it exact when you want to jump to it. This doesn't not work if you're trying to jump from 1 event page to another on that event.
The laws of your game depend on your eventing skills. You can event things all day long and copy and paste them on every single map OR you can refer to Common Events as your universal guide to success. You will have a hard time if you attempt to use them with Self Switches so let's not do that. Instead, use them for your common event purposes as their name states, they are common events.

Of course when I put it here on the Expert level part I am not referring to just simple events like having a common event randomly set generation variables 1 - 10 set randomly from 0 - 10. I'm referring to checking player states and actions, tracking player variables, pre-stage parameters and so forth. For example, say I created a complex battle that can only be fought when the player has achieved both finding the sword of legends and he's made special decisions that make him a good guy. I would create a common event to always check on the player's Light/Dark side points, this will openly decide his type of encounters within the game that he will experience based on his own decisions and it won't just be a simple check at the given time to see if he's good or bad, I may want to make a crime system that always checks to see that even if you were good and all of a sudden you turn bad, everyone will know. They create their own path towards good or bad.

Chapter 5: Master

With this level of knowledge, you should be able to redesign how the entire flow of your game works from it's entire Economy, Artificial Intelligence, Battle System, Interpretation and so forth. By this time you should have a full understanding on how logic works and are completely ready to integrate the knowledge over to a more advanced version of video game logic and that's using the actual bare code of a programming language. [ More To Be Available Soon ]


Mastery Progression Chart Theory

Below demonstrates how you should be thinking at your skill level. For something like creating an enemy on the map in the game.
How do I create enemies to fight with? Create Event > Name Enemy
Create Event


      • Name Enemy > Set Move Route: Step towards Player
      • Event Touch: Inflict Damage To Player
Create Event


      • IF Player Alliance ON/OFF > Fight or Don't Fight
      • IF Enemy > Set Move Route: Step Towards Player
      • IF HP IS LESS THAN 20% > Check Potion Availability
        • IF Potion is Available: Use Potion
      • IF Player Lose > Randomly Decide 50-50 Of Sparing Player
Create Event [ 1 ]

      • IF Player = Team 1 > Attack Player
        • SET Move Route: Toward Player
        • Event Touch: Inflict Damage To Player
        • IF Damaged > SET Move Route: 1 Step Back > Decide Next Move
          • IF HP More Than 50% > SET Move Route: Toward Player
          • IF HP Less Than 50% > Turn Switch: Defense [ ON ]
            • Wait 60 Frames
            • Parameter: DEF + 50
            • Turn Switch: Defense [ OFF ]
            • Parameter: DEF - 50
          • IF HP Less Than 20% > Check Potion Availability
            • IF Potion is Available: Use Potion
            • IF Potion is NOT Available > SET Move Route: Step Towards Player
              • IF In Range Of Player > Use Ability: Steal Potion
      • IF Player Alliance ON > Check Type Of Alliance
        • IF Player = Team 0 > Question Player Neutrality
        • IF Player = Team 2 > Don't Attack
      • IF HP Player Less Than 20% > Change Frequency Of Event
      • IF Player Lose > Randomly Decide 50-50 Of Sparing Player
      • IF Lose > Variable: EnemyDefeated + 1
        • IF Variable: EnemyDefeated > Check Variable: Death
          • IF Variable: Death = 0 > Display Text: " Not even a scratch?! "
          • IF Variable: Death = 1 > Display Text: " You got lucky! "
          • IF Variable: Death = 2 > Display Text: "Almost had you too! "
          • Add Player To Party: 2
        • IF Variable: EnemyDefeated Less Than 4 > Create New Event [ X ]
        • Erase Event
Create Event

      • IF Player = Team 1 > Attack Player
        • SET Move Route: Toward Player
        • Event Touch: Inflict Damage To Player
        • IF Damaged > SET Move Route: 1 Step Back > Decide Next Move
          • Parameter: EVA + 50%
            • SET Move Route: Jump 2 Steps Back
              • Ignore If Can't Move
          • IF HP Less Than 20% > Check Potion: Agility Availability
            • IF Potion: Agility is Available: Use Potion: Agility
            • IF Potion: Agility is NOT Available > SET Move Route: Step Towards Player
              • IF In Range Of Player > Use Ability: Steal Potion: Agility
          • IF HP More Than 50% > SET Move Route: Toward Player
          • IF HP Less Than 50% > Turn Switch: Defense [ ON ]
            • Wait 60 Frames
            • Parameter: DEF + 50
            • Turn Switch: Defense [ OFF ]
            • Parameter: DEF - 50
          • IF HP Less Than 20% > Check Potion: HP Availability
            • Change Opacity: 25%
            • IF Potion: HP is Available: Use Potion: HP
            • IF Potion: HP is NOT Available > SET Move Route: Step Towards Player
              • IF In Range Of Player > Use Ability: Steal Potion: HP
      • IF Player Alliance ON > Check Type Of Alliance
        • IF Player = Team 0 > Question Player Neutrality
        • IF Player = Team 2 > Don't Attack
      • IF HP Player Less Than 20% > Change Frequency Of Event
      • IF Potion: STR+ is Available: Use Potion: STR+
      • IF Potion: STR+ is NOT Available > SET Move Route: Step Towards Player
        • IF In Range Of Player > Use Ability: Steal Potion: STR+
      • IF Player Lose > Randomly Decide 50-50 Of Sparing Player



StatusGearEntertainment © 2016. All Rights Reserved.
StatusGear and StatusGearEntertainment in America and in Japan, are all for the development of video games and any digital projects in general. AetheriaLimitlessWorld, LimeLife, Perception, Modus Operandi and Parsanity are projects funded by StatusGearEntertainment and Omniscience Inc. Omniscience Incorporated is a supporter for all things knowledge and against the abuse in knowledge.
 
Last edited:

Status Gear Entertainment

Praised Adventurer

HOW TO MAKE AND CREATE THINGS
In case you were interested.
Reputation systems are easily made with 2 things: Variables + Conditional Branches. All you need to do is set up at least 1 variable.

Say for instance you want to make a Crime system that tells how bad you've been and how it'll effect people interacting with you.
1. Simply set up a variable and name it as you would to something like "Crime".
2. Anytime you do something good or bad, use the control variable command and either add/subtract.
3. Use a conditional branch to check the level of "crime" and proceed to do your actions in the IF statement section.
Relationship systems are no different than the Reputation systems. Simply set up a variable for the intended "lover" or friend and check the variable. **REFER TO REPUTATION SYSTEM SPOILER.
Foreign currency can be set up with a simple variable, however if you wish to learn how to do a gold to foreign currency conversion, then read on.

1. Foreign currency will need it's own variable.
2. You can set a variable to have the value of gold that you carry.
3. Once you have that, you can set the foreign currency variable with a formula. The formula can first start off with setting the foreign currency variable equal to the gold variable. This way we mimic over the amount of gold at the time this was being done.
4. The second part of the formula will need to either multiple or divide the foreign currency variable. That way the currency has it's own value separated from gold. This is useful to for example, having another town in game that only takes a special currency. Since your foreign currency is not seen in it's own window, it's highly recommended you let the user know through text chats using the syntax \V[n]where n is the number of the variable of your foreign currency.
**NEW BELOW**
Creating currency is fairly easy. The most simplest form of creating currency is by using a variable. You can use Conditional Branches to check to see if you have enough of that variable. If you're wishing to get more out of this like creating your own window specifically for this currency, you will need to look at a more advanced section of this guide that explains about altering code from the game itself.
This isn't as hard as it sounds. MV has different code settings than the previous versions but it offers a script section that allows you to use bare code if you can find it.

You create 2 events, a 2-Player Event and a hidden event set to parallel-processing. The hidden variable will run a bunch of Conditional Branches that check for button pressing. If the keyboard key button "j" or whatever you set it to is pressed then move the 2-player event. Apply the same methods to the other keys as needed. If you wish for this to be more universal, you can set that code into a Common Event and then have the hidden variable use that 1 common event on every map.



EVENT LOGIC DIAGRAMS

[ Reserved Post For The Future ]
More is sure to come don't worry! I'm trying not to make this dry!




SPECIFIC TROUBLE SHOOTING QUESTIONS

[ Reserved Post For The Future ]
More is sure to come don't worry! I'm trying not to make this dry! This part will be questions you can ask directly and if it is solved then it will be updated here as part of an FAQ.
 
Last edited:
Wow !! And no comment since !!! I'm really waiting for you to complete this. Very interresting peace of work. I'm working on a complex system now and any advice on how to organise your work, how to process ideas is welcome. But I think this tutorial has much more in store. Do not give up please this will be very useful.
 
Last edited:

Xyphien

Owner
Staff member
Administrator
Resource Team
Xy$
9.57
Very nice, and extremely straightforward, detailed and easy to understand layout. I have to say SGE, you really outdid yourself on this one! Keep up the great work man, and glad to have you taking the time to make tutorials like this!
 

Status Gear Entertainment

Praised Adventurer
Wow !! And no comment since !!! I'm really waiting for you to complete this. Very interresting peace of work. I'm working on a complex system now and any advice on how to organise your work, how to process ideas is welcome. But I think this tutorial has much more in store. Do not give up please this will be very useful.
[doublepost=1460137743,1460137714][/doublepost]Wow !! And no comment since !!! I'm really waiting for you to complete this. Very interresting peace of work. I'm working on a complex system now and any advice on how to organise your work, how to process ideas is welcome. But I think this tutorial has much more in store. Do not give up please this will be very useful.
I am back from my deployment and will continue as such! I thank you for the time to read what I've had so far. It means a lot to me and doesn't make me feel like I've gone to waste! (cheeky)
[doublepost=1460639453][/doublepost]
Very nice, and extremely straightforward, detailed and easy to understand layout. I have to say SGE, you really outdid yourself on this one! Keep up the great work man, and glad to have you taking the time to make tutorials like this!
I also liked to thank you as well Xyphien. I promise I will get this finished!
 

ejronin

Villager
Xy$
0.00
This is the kind of guide that empowers a forum. Whether I get anything from it (I did) is irrelevant - it shows willingness and a desire to both be helpful and extend a service to others.

That aside, I'm bookmarking this for future reference.

Thank you, as a novice - it's helpful
 

xJMBx88x

Villager
Xy$
0.00
Wow !! And no comment since !!! I'm really waiting for you to complete this. Very interresting peace of work. I'm working on a complex system now and any advice on how to organise your work, how to process ideas is welcome. But I think this tutorial has much more in store. Do not give up please this will be very useful.
I totally agree. Im new to mv, but had messed around with 2k a bunch when I was younger. This is a great refresher, and also good instructional material:-)
 
Top