Random NumberEvery game must have an element of randomness to it, not only to add an element of surprise to the game, but also to increase its re-playability.
In Smile Game Builder, assigning a random number to a variable is as easy as setting its minimum and maximum values. So, setting the range between 5 and 100 will do just that and generate a random number between those values.
In fact, you can have negative values in Min., thereby greatly increasing the range and impacting randomness and any operators applied to it.
The maximum ranges are actually between -9,999,999 and 9,999,999, so this gives a pretty good range to work with.
Random Contents in ChestsAlthough there are many uses for random numbers, one notable use is randomizing contents in chests (referencing one of my Tips & Tricks video tutorials, #28, on chests).
You can either use a single sheet with corresponding Variable Box Check branches or multiple sheets with the Event Sheet Conditions set to its variable values. The former is more useful for smaller ranges and the latter is better for a much broader range (as I’ve done in Random Conversation below).
Another use could be for NPCs giving you random items, perhaps as rewards for completing quests. In fact, this same setup can be used as a template for any other event with randomized content.
Random ConversationIn most RPGs, people usually say the same things each time you speak to them. The only time conversations change is usually when certain conditions become true, such as during quest lines.
To add some realism to your game, add randomized conversation snippets. However, to increase the range you can set your "between" values on separate sheets.
Sheet 1 is the "randomizer", triggered once only, with the random number range set in the Advanced Variable Box.
On subsequent sheets, you’d add the conditional minimum and maximum variable ranges with the conversation snippet in its Event Details. The triggers for each of them is When Main Hero Talks; it’ll automatically select the appropriate sheet accordingly.
When you talk to the NPC, they’ll say something more random, based on the randomized number range from Sheet 1.
Random Events or Encounters
For additional dynamic contents, adding random events or encounters will provide an element of surprise, as I did in Tutorial #26.
Doors of Possibility
The random element in games opens the doors of possibility wide open.
"The doors to possibilities are limited only by your imagination and creative flair."
In addition to random treasure, conversation, and encounters, randomness can be used for so many different things; the possibilities are only limited by your imagination and creative flair.
Anything from reading a random passage in a book to displaying a random image to randomizing monster encounters via events can add that uniqueness and unexpectedness to your games. You can also combine random elements, such as using the Environmental Effects Conversation Choices from Tutorial #19 to randomize things that NPCs say about the weather.
I’ll follow this article up with a video tutorial some time later.
In Part 1 of the Variables in Smile Game Builder series, I went through what variables are, the two types of variables (Basic and Advanced) and their roles in Smile Game Builder.
PreambleAlthough I already did a video tutorial on Advanced Variables in Tutorial #11, as a continuation of this series, this is simply a synopsis of all the things you can store in variables, as well as my own findings.
With each section, I’ll try to be as comprehensive as possible in future articles. And I’ll also add links directly to them here as and when they’re finished.
I’m only focusing on Variable Box in the To What? section for now, but will focus on Number Displayed in Variable Box much later. I’m also not going through all of them because these will be covered more in-depth in later parts.
There will also eventually be an index page for all of these articles for easier access to the parts that interest you.
The Fixed Value is exactly that! You can set variables to specific amounts. These can then be manipulated with the operators in Do What?, also with specific amounts.
With Random Number, you can generate a random number between a minimum and maximum value and store the result in a variable. This can then be used in conjunction with the Variable Box Check to randomize contents, rewards, conversation snippets, or even random events.
Unlike the random number operator in Variable Box, which adds a random number to a variable, this gives you the option to create a random number from a range of numbers.
Amount of MoneyExactly as it states, this stores the total Amount of Money you have. You need to set up an auto-run synchronize event trigger for each map you want to check it on.
The money amount itself (in the Increase/Decrease Money section) is a fixed value, so you can’t directly add or subtract anything to or from it through variables.
Instead, you can reference the amount of money you have in messages using \Variable[x], where x is the variable number for the stored money.
Be aware that, as a potential bug I recently found, if you increase or decrease the amount of money in the same event, the variable’s new value may not update to this new value in the message if it’s placed immediately after the increase/decrease. You’ll need to place your message first and then the increase/decrease event command for it to be in sync.
Held Item Number
Store the number of certain items carried in Held Item Number. This is notably useful for any of the Crafting systems I did on my YouTube Channel, where you need specific amounts of ingredients to be able to craft new items.
Character InformationThis allows you to store the values of characters’ stats in variables.
As you can see from Fig. 6, level and experience, current and maximum HP and MP, and so on, can be assigned to variables.
This is particularly useful for some kind of skills system. As an example, lockpicking would be based on Accuracy, dodging traps on Evasion and Agility, and so on. You can then use a comparative percentage variable to check if the stats are high enough.
I’ll go more in depth with math calculations in a future tutorial.
The Map X Size and Map Y Size can be referenced by variables. I have no practical use for this; however, one use could be for a fake windows error message, based on map size.
Map Environmental Effect
Each map can have its own environmental effect (in the Map Settings) – whether rain, snow, confetti, etc. – and using the advanced variables, you can store the Map Environmental Effect.
I did a video tutorial on conversations based on weather. But this can be used for other things as well.
In Part 3
In Part 3, I’ll go into randomization and what you can do with random numbers, including the skill-testing I mentioned before, with a follow-up video tutorial later.
A Variable is simply somewhere to store numbers or values so that they can be referenced later. There are two types of variables in Smile Game Builder: Basic and Advanced.
I’m going to be as comprehensive as possible with this series. However, you can skim through the parts you already know and, as the series progresses, skip to the parts you’d like to know more about.
Basic VariablesBasic Variables are used for simple operations to directly affect the targeted Variable No. with whatever number is set in its Value.
You can assign a fixed value to the variable with Put into variable box as-is. Another value can then be added to or subtracted from this value, or multiplied by or divided by it with another Variable Box referencing it. And this new value is placed into the variable.
Besides the usual math operators, you can also add a random number in variable box between 1 and whatever number is placed in Value up to a maximum 999,999. This does exactly as it states and adds the random number to the variable; it doesn’t create a random number (that’s in the Advanced Variables section).
The basic Variable Box is primarily used for setting up quick, simple variables and manipulating them with the operators.
ALL values are fixed and can’t be directly influenced by other variables. It can kind of be done, but I’ll cover that in a later tutorial.
In the Advanced Variable Box Op. section, you can do much more with variables (as you can see in Fig. 3 below).These are values specific to various parts of the game and they can be stored and manipulated in the same way as basic variables. And we’ll go through each of them over the course of this tutorial.
This is where you set the variable you want to use. The maximum allowed variables in a single game is 999, although you can reuse other established variables on different maps if you’re not using them elsewhere on the same map.
Variable Box is used and referenced the same as in the Basic Variables. There is another option in the dropdown, Number Displayed in Variable Box, but we won’t worry about that for some time.
This section is for selecting the type of operator to use with the variable. In addition to the usual math operators, you (obviously) set the variable’s value with Assign.
There’s one other operator, Substitute Divided Remainder, which divides the variable’s value by the assigned number and uses the remainder as the value. I covered modulo operations already in a previous tutorial.
You can use advanced variables to set "fixed" variables instead of the basic Variable Box. The two are the same and do the same thing.
Personally, I like using the basic Variable Box if my variables are simple values not reliant on anything except for fundamental calculations. And then I use the Advanced Variable Box for more complex operations. It may be just a matter of preference when setting up the basics for more advanced stuff later.
In Variables Part 2
I’ll continue the series in the next article and, over the course of the tutorial, will go through each one in turn. Included will be explanations on how and where they can be used, along with examples as necessary.
I covered Advanced Variables in my video series in Tutorial #11 (as well as some later videos), so aim to expand on that in this series, with additional video references as they crop up.
Although I won’t go into as much detail (except perhaps in a future article), I’ll utilize the event’s Conditions in conjunction with variables. And I’ll share some of the techniques I’ve learned in the process, such as how to properly set up a cut scene using only variables.
In Part 2, I expanded on Automatically Start (Synchronize and Run Repeatedly), which I shortened to Auto-Start Sync, and how it operates in Smile Game Builder.
In this, the final part, I’ll continue with the other auto-run triggers: Triggered Automatically (1 Time Only) and Triggered Automatically (Repeated).
Triggered Automatically (1 Time Only)The purpose of the Triggered Automatically (1 Time Only) (referred to from now on as Auto-Run Once) is to run an event or condition once only on each map. In other words, very time the player enters the map, an Auto-Run Once event will trigger and process its Event Details. While the player is on that map, it won’t trigger again until the next time the map is visited.
A good model for using Auto-Run Once can be found in my tutorial #29: Skyrim Styled Book-Reading. Each page of the books is triggered once only when the left and right keys are pressed to flip between the pages.
When you add Event Sheet Conditions, the Auto-Run Once trigger will only activate once those are true. And you can manually reset them in conjunction with an Auto-Start Sync trigger. They’re reset by default when you leave the map and re-activated when you visit the map again.
To truly activate once only, add another blank sheet with the Local Switch turned ON (not forgetting to place the Event Switch command, of course).
This means that any triggers in events, regardless of their own triggers and conditions, player movement and control, and other things running in the background, will halt until it’s cycled through its Event Details.
By that token, I don’t really consider this as a parallel event trigger, unlike Auto-Run Sync and Auto-Run Once, because it doesn’t run in the background. However, I’ve included it in this article because it was probably intended as such.
And that being said, one very handy use for the Auto-Run Repeat trigger is to display something on-screen where you don’t want anything interfering with it.
An example of this is to display an image (such as displaying the map name) for a set amount of time. A variable can be used in conjunction with a Wait command to add to a timer and then a Variable Box Check for when the variable equals a certain value. Within that branch, a switch can be activated to turn the Auto-Run Repeat trigger OFF.
Using Parallel Events
When you use any of these parallel event triggers, each one serves a specific purpose in SGB.
As a general rule:
Auto-Run Sync is used for constantly checking for changes on the map, notably with variables and, when any of its conditions is true, it triggers other conditions and triggers.
Auto-Run Once is primarily for running something once only, either independently or when certain conditions are true. If these are reset, when those conditions become true again they’ll re-trigger.
Auto-Run Repeat is for when you want semi-permanent loops, disabling all other events and background events until specific conditions are met. Once they are, you can break the loop and continue as normal.
In The Next Articles
The next set of articles, I’ll delve further into variables (more specifically Advanced Variables) and what you can do with them. They will also include how to use and re-purpose them, how to achieve specific tasks using variables, and how to manage variables efficiently.
In Part 1 of this series, I discussed what parallel events are and briefly each of their functions. In this second part, I’ll expand on Automatically Start (Synchronize and Run Repeatedly), which I’ll refer to as Auto-Start Sync from now on.
The Auto-Start Sync TriggerAn Auto-Run Sync trigger starts automatically on the map and runs continuously in the background, processing whatever is in the event’s Event Details. And, while it’s running, other events, actions and triggers can take place as normal.
You’d typically use this when you want to synchronize certain things on maps, such as checking variables, graphics or timers, to name a few things.
Another example use is checking certain keys are pressed, as I did in Tutorial #12: Tips & Tricks (Part 1). Here I featured a routine where you cancel an image by pressing a key.
Using Switches with Auto-Start SyncRather than setting the Auto-Start Sync to trigger right away, you can also activate it using Conditions.
This will then run and synchronize in the background when a switch or other conditions is true. And then somewhere else you can toggle the switch OFF or reset the conditions to disable it.
Note that SGB doesn’t have a "common event", so Auto-Run Sync events need to be placed on each map that you want its Event Details to run synchronously and update from previous maps.
This is particularly useful when you’re using variables to store things like player stats from Character Information or Playtime for timers.
Multiple Auto-Start Sync in Events
While you can have multiple Auto-Start Sync triggers in the same event, bear in mind that order is important!
This is because SGB will go through each sheet to check for its triggers and conditions, and then prioritize any auto-run trigger it encounters. Auto-Run Sync triggers on different sheets will override the previous ones, meaning that you can only technically have one Auto-Run Sync trigger activated in the same event.
Hence using switches or variables to set the conditions under which they run. When these conditions are true, then the sheet on which they apply will take priority over the other sheets until they’re reset or no longer apply.
So, if you’re trying to build a HUD to display stats or the time (as examples), you can either have a single event with conditional auto-run sheets or have multiple one Auto-Run Sync events on each map to guarantee they’re all processed together. The latter is inconvenient and maybe isn’t the best method, but it is the most efficient.
In Part 3
In Part 3, I’ll cover the other two auto-run triggers, Triggered Automatically (1 Time Only) and Triggered Automatically (Repeated).
In this week’s tutorial, I give some insight into customizing more of the system graphics in Smile Game Builder, specifically message windows. This includes normal message windows, dialogue windows and the status window.
Message windows are only the tip of the iceberg when it comes to customizing system assets. In Tutorial #30, I covered graphics not directly importable via Add Assets. They are the Game Over image, equipment items (status screen) and message wait cursor (animated).
Also mentioned in this tutorial is Branneg Guthinol, an ex-gladiator grown fat from his successes. He will be a character in a game planned RPG Maker MV game, The Gladiator Program: Genesis (some time in the future).
In this new series, I’m going to discuss parallel events in Smile Game Builder: how they work and their relationships with other events on the maps.
What Is A Parallel Event?A parallel event is any of the three automatic triggers in an event’s Event Details.
These run in the background until one or more conditions becomes true to trigger the sequence of events. Each one is used for different purposes and to launch events at certain times when certain conditions are true.
Each event trigger is codependent on its additional Event Sheet Conditions. If none are set, then the event triggers as soon as the player enters the map.
In this article, I’ll go through the functionality of each one and how they’re used and will continue exploring them in future parts.
Automatically Start (Synchronize and Run Repeatedly)
This is a "true" parallel event in the sense that, as it states, it automatically starts on the map and runs continuously in the background, checking the state of its conditions.One notable use is to check if the player has a certain item and, if so, then trigger something like a message or another event. For reference, I did something like this in Tutorial #5: Working with Conditions (Part 2).
Another use is to check and update variable values, such as modulo operations or player coordinates.
As a general rule, the Automatically Start (Synchronize and Run Repeatedly) doesn’t usually have conditions to trigger it, so as soon as the player enters a new map, it auto-starts and runs in the background until its conditions become false, depending on what it’s used for.
This can be activated with conditions, such as turning a Switch ON, but I’ll cover that in the next part.
Triggered Automatically (1 Time Only)As self-explanatory as it sounds, this triggers an event on the map once only. If it has no Event Sheet Conditions, then it won’t trigger again while you’re on that map, but will recur the next time you visit the map.
One possible use is to trigger a once-only event to display a message giving details on surroundings, personal thoughts or furthering the story line.
If you want the event to trigger just once, without it repeating on subsequent visits to the map, you can toggle it with either a normal Switch or a Local Switch. On a second sheet, its Event Sheet Conditions would have the switch turned ON and with the contents blank.
I’d recommend always using the Local Switch for this, however, as each event can have its own independent Local Switch that doesn’t affect other events. And this way, you can keep normal Switches free for other things.
Triggered Automatically (Repeated)With the Triggered Automatically (Repeated) Start Event, the event runs repeatedly in the background, essentially overriding all other triggers until its conditions become false.
This is because it operates as a loop, where you’d need to add conditions to disable it. While it’s activated, the auto-repeat trigger will halt other events, including player movement.
One notable use for it is to display information, such as the map name or more of the story line, and then use a Switch (normal or local) to disable it after a set amount of time and re-enable other events and player control.
In Part Two
In Part 2 of this article, I’ll expand on the Automatically Start (Synchronize and Run Repeatedly) trigger and go into more detail on how to use it effectively.
And in subsequent parts, I’ll similarly go more in-depth with the other Start Event triggers and their uses.
Jacob has finally released his Monster Pack! Get the DLC on Steam. I can’t wait to get this and try it out. Payday isn’t that far away.
There are 10 different 3D monsters in total included in the package, with some models having several color options and sizes. Moreover, as a bonus model you will also receive the "Talking Tree"!