Search the Community
Showing results for tags 'conditions'.
Found 7 results
-
Using Conditional Branch Event Commands for Script Input
Tsukihime posted a topic in Developing Tools
This tutorial describes how conditional branch commands are used as script input. This command is a very convenient way to ask users to specify input, especially if you're working with conditions. This may be easier to use Instead of this This tutorial shows how to use these commands in your scripts, and how you can achieve complex logic using only these commands. Recall... If you are not familiar with the conditional branch command, the image below shows all of the built-in conditions that are available for users. It also comes with a script box that has a character limit of 10000, which is enough for almost anything anyone would need to do with a script call. Ideally, if you're working with any event (map event, troop event, common event), and your script uses conditions, you want to use a conditional branch command. Script Parsing The conditional branch command is command 111 in the game interpreter. You can look at it in your script editor to see how it is evaluated. Typically, I would just copy this code into my own method and adapt it to suit my own needs. To actually get the command, you will need to parse the event list. Depending on what type of event you're working with, accessing the list would be a bit different, but once you have access to the list, you would simply iterate over each command as follows to find the command you want: list.each do |cmd| if cmd.code == 111 # do something with the conditional branch command end end Examples Here are a couple scripts that use conditional branch commands for input. Custom Page Conditions Negated Conditional Branch Logical Expressions The conditional branch command allows you to ask questions like Is Actor 3 a Soldier class? Does the party have a Hand Ax in their inventory Which can be evaluated easily. However, what happens when you want to ask more complex questions such asIs Actor 3 a Soldier AND is Actor 3 wearing a Hat? Is switch 1 on OR Switch 2 on? These are separate conditions joined one or more of the following logical operators:AND OR NOT This is very easy to accomplish using script calls, but remember the point is to make it easy for users who may not be proficient in ruby. Some users may not even have any idea how programming works. The following rules are proposed for logical expressions using conditional branch commands. Here are some examples to illustrate it: 1. One command represents one condition. 2. Every pair of commands is joined by a logical operator. 3. Two commands with the same indent are joined using OR 4. Two commands with a nested indent are joined using AND 5. All conditions with non-decreasing indents are grouped together. Condition 0 = indent 0 Condition 1 = indent 1, therefore they are grouped together Condition 2 = indent 0, so this is the start of a new group Condition 3 = indent 1 6. All conditions are parsed recursively. Parentheses are based on groups The last image basically summarizes all of the rules. It may take some time to understand it, but if you think of it as a regular boolean expression, it should become clearer: (a AND (b OR c))We are simply applying each rule one by one as you go down the conditions, grouping them based on the non-decreasing indentation rule. Note that negation is not shown here. This is because the default conditional branches do not support negation. Ending With this in mind, you should be able to provide your users with a much easier way to specify conditions if your script needs it. Originally posted at Hime Works.- 3 replies
-
- 2
-
-
- events
- conditions
-
(and 3 more)
Tagged with:
-
In RPG Maker, you can assign effects to items or skills. Effects are special behaviors that occur when the item or skill is successfully executed. For example, you can create a "Poison" skill that has a 50% chance to add a "Poison" state to the target, or you can create a "Skill Book" item that will teach a new skill to a particular actor when that actor is selected. Now, let's say you had a skill book that teaches Fire, but only magic users can learn it. Do you want non-magic users to be able to use the book as well? Maybe not. In this situation, it would be useful to be able to define "conditions" that must be met in order for the skill book to be used. This plugin allows you to define "effect conditions", which are conditions that are given to each and every effect on an item or skill. Before an effect can be applied, all conditions must be met. With these conditions, you can now check whether the actor that you would like to use it on is able to learn Fire! Effect conditions are formulas, so you can create conditions on anything that you can imagine. More information and downloads available at HimeWorks
- 1 reply
-
- 3
-
-
- conditions
- skills
-
(and 2 more)
Tagged with:
-
This plugin introduces the concept of "Self Variables" for your events. Similar to Self Switches, each event can hold its own set of self-variables, which you can use to keep track of things like how many times you've interacted with the event, or the last position of the player that this event has seen, or anything else that you would like each event to keep track of on their own. An event can have as many self-variables you want as long as you find an appropriate name for them. Unlike self-switches, which only hold a true or false value, self-variables can hold any kind of information. Because you can access them using script calls, they can be used in conditional branches and other parts of your event to create intricate events that interact with the player or the game itself! More information and downloads available at HimeWorks Self-variables can also be accessed using Custom Page Conditions, allowing you to create page conditions based on self-variables.
-
- variables
- self-variables
-
(and 3 more)
Tagged with:
-
What does it do? Adds more functionality to states. Stacking states - E.g. 10 Bleeding state stacks, 5 Poison state stacks Transforming states at stacks reached - E.g. At 5 Poison stacks, transform it into Toxic state. Author: Mr. Trivel Name: States EX Created: 2015-10-27 Version: 1.0 Screenshot: Plugin: <Link: Github> How to download the Plugin: Click the link above, there will be a button named Raw, press Right Click -> Save As. Special thanks to Harold, Therese, Marsha and Lucius for getting poisoned for hours without breaks while testing. P.S. They did survive. I'm also interested in ideas for more functionality for states. Legal: Free for non-commercial games. For commercial use contact me.
-
In RPG Maker MV, when you create shops, you start by specifying a list of items that will be sold, along with their prices. The engine then handles the rest for you so that when the player talks to the shopkeeper, the items you've set up will be displayed. However, what happens if you want to make it so that certain items are not shown depending on certain conditions? For example, if a weaponsmith offers different types of weapons, you might want to hide certain weapon types if no one in the party can use it. If your actor can only use swords, you might want to hide all the bows and spears. This plugin allows you to hide shop goods quickly and easily using a simple command. Just create your event the way you normally do and hide shop goods! More information and downloads are available at HimeWorks
- 1 reply
-
- conditions
- events
-
(and 1 more)
Tagged with:
-
CSCA Event Conditions By: Casper Gaming (Casper667) Last Update: November 15, 2012 Latest Version: 1.0.0 Features - Allows you to have unlimited event conditions. How to Use Place in your materials section. Plug and Play. Instructions for setting up additional conditions in events included in script. Script Text file is found here(copy and paste everything into your script editor in the materials section): LINK Credit Casper Gaming Terms http://caspergaming.com/terms-of-use/
- 3 replies
-
- 1
-
-
- event
- eventing tool
-
(and 1 more)
Tagged with:




