Eclipse Event System Tutorial

(In the process of updating)

Introduction

Welcome to the Eclipse Event System Tutorial! If you’re new to the Event System, this is the place for you. The Event System will become second nature to you if one does the following: read this topic, practice working in the Event System, applying what you learned, and finally asking questions when you’re stuck. Although the Event System can be overwhelming, I broke it into sections, added pictures, and finally will explain in more detail what each function does.Lastly this topic is made for people familiar with the Admin Panel, and are ready to start creating Events. If you’re not familiar with the Admin Panel, take some time to familiarize yourself with all the aspects of it.



I opened an Event, now what?

So you went to the map editor, placed an Event, now you’re wondering what do I do?

Let’s do a general overview of what everything does.

Your screen should look similar to this.

!

First set of items we’re looking at.

! Name
! This is the name of an event. It is very good practice to name all your Events. Try to name the Event so that it makes sense when you look at it.
! Bad Name Example: guy25
! Good Name: Leona Thundercaller
! New Page
! These are your pages of Events that run in numerical order; however, can be changed by the use of Conditions. On your screen you should see a tab with the number 1. Clicking the “New Page” button adds a second page with the number 2; If you continue clicking, it creates additional pages. The first page is the code that runs first, you will need to use any number of Conditions to change it to another page.
! For example, I set the Condition for page 2 to activate when the player has a certain item in their inventory. Once the new page is activated the previous page is ignored, unless you have a Condition to have it reset back to the page. I’ll go into more detail on Conditions later in the guide.
! Simply think of it as one of those choose your path adventure books. If you choose do an action it will tell you to skip to a certain page, if you choose to do something else, you go to another page.
! Copy Page
! This copies the entire page so you can paste it. This is great if you’re running the same event on every map, saves so much time.
! Paste Page
! Pastes the page you previously copied.
! Delete Page
! It deletes the current tab you’re on.
! Clear Page
! It clears all the code on the page.
! Second Set of items we’re looking at.
!
! Conditions
! There are four conditions that you can set to not allow the page to run, unless each Condition is met. I go into more detail on Conditions later in the guide.
! Movement
! Here you can set the type of movement for the event, the speed that the event moves, and how often does the event move.
! Positioning
! You have three options here; Below Character, Same Level, Above the character. If you check the “Walk Through” option it you can pass through the Event, with the Event graphic appearing below you, same level as you, or above you. Most Events are set to Same Level as it prevents clipping issues on larger sprites.
! * * *
! Trigger
! There are three triggers every event uses; Action Button, Parallel processing, and Player Touch. It is to be noted none of this Events will run if you have Conditions that are not met.
! Action Button
! The Event will not run unless you hit Ctrl (unless you changed it) on it.
! Parallel processing
! The Event will automatically run when you enter the map.
! Player Touch
! The event will automatically run when the player touches the event.
! * * *
! Options
! There are four options you can enable for the event; No Walking Animation, Direction Fix, Walk Through, and Show Name.
! No Walking Animation
! The Event when moving won’t display any walking animation, the Event will just “slide” into new tiles.
! Direction Fix
! The Event when moving will always face the default direction of when the graphic was made or changed through code.
! * * *
! Walk Through
! The Event no longer blocks pathing, and players can simply walk through it unhindered.
! Show Name
! Shows the Event’s name on the map for all to see.
! Final set of items we’re looking at.
!
! Label Variables/Switches
! This is where you name your  Player Variables
 and Player Switches
in Eclipse. When you name the  Player Variable
 or Player Switch
try to name it so that it makes sense.
! Bad  Player Variable
/Switch
Name Example: twochooseroad
! Good Player Variable
/Switch
Name: Leona’s Love Counter
! Although you can’t “Comment” right now in the Event system, a good practice is to “Comment” your code. I recommend writing in a notebook the name of your Player Variable
/Switch
and what it does. Doing this allows you to quickly check what a Player Variable
/Switch
does when you go back to it at a later date.
! * * *
! * * *
!  
! Alright, now I’m ready to add stuff to the Event!
!  
! So you hit the add button and two pages appear before you with all kinds of stuff to click. What do you do now, what does everything mean? Fear not for I’ll explain it very simply to you!
!  
! The Three Pages of Command Windows
!
!
!  
!  
! Message Area
!
! Show Text
! The Show Text feature allows you to create a message in the message box and creates a player prompt to click to continue. The Show Text feature doesn’t allow you to change text color and has a default color of white.
!
!
! Show Choices
! The Show Choices feature allows you to create a message in the message box, then creates up to four prompts for a player to choose from. The Show Choices feature also doesn’t allow you to change the text color and has a default colors of white. You can set code under each prompt to run if that choice is selected.
!
!
! Add Chatbox Text
! The Add Chatbox Text feature allows you to create a message of a chosen color in the message box. This feature also allows you to send the message just to the player, the entire map, or to everyone on the server.
!
!
! Show Chatbubble
! The Show Chatbubble feature allows you to create a chat bubble with written text over the player, a NPC, or a chosen event. The Show Chatbubble feature doesn’t allow you to change the text color and has a default color of black.
!
!
! * * *
!  
! Event Progression Area
!  
!
! Player Variable
! This allows you to call a chosen Player Variable
and edit it. You can either Add, Subtract, or Set a number to the Player Variable
. Selecting Random allows you to have a random number generated for the Player Variable.
To assign a random number to a Player Variable
you first enter the lowest number that it can be, then you set the highest number you want it to be. That is called the “Range”, after setting the “Range” the Player Variable
does all the work and randomly generates a number in the parameters you set for the Player Variable
to be.
! Please read my Player Variable
guide for a more detailed look on Player Variable
s
.
!
!
! Player Switch
! This allows you to choose a chosen Player Switch
, and either turn it on (True), or turn it off (False). Turning a Player Switch
on, or off is permanent (even upon server restart), unless you change it in an Event.
! Please read my Player Switch
guide for a more detailed look on Player Switches
.
!
!
! Self Switch
! This allows you to turn on or off a Self Switch
in an Event. Reloading the map or server resets the Self Switch
.
! Please read my Player Switch
guide for a more detailed look on Self Switches
.
!
!
! * * *
!  
! Flow Control
!
! Conditional Branch
! This allows you to create a Conditional Branch to check for certain conditions. If the conditions are met, the code below it runs. If the conditions are not met, the “Else” script runs. It is possible to put Conditional Branches within others to have multiple conditions.
! Please read my Conditional Branch guide for a more detailed look on Conditional Branches.
!
!
! Exit Event Process
! Whenever the Event comes upon this line, it automatically ends the Event.
!
!
! Label
! Will come back to this.
! Go to Label
! Will come back to this.
! * * *
!  
! Player Control
!
! Change Items
! The Change Items feature allows you to add, subtract, or set the amount of a certain item for the player. For an example you can take the “Frog Eye” quest item from the player and grant him 100 Gold Coins.
!
!
! Restore Hp
! The Restore Hp feature simply fully restores the player’s Health Points.
!
!
! Restore Mp
! The Restore Mp feature simply fully restores the player’s Magic Points.
!
!
! Level Up
! The Level Up feature grants a single Level to the player.
!
!
! Change Skills
! The Change Skills feature can either give or take away a chosen skill from the player.
!
!
! Change Class
! The Change Class feature allows you to change the player’s class to another chosen class permanently.
!
!
! Change Sprite
! The Change Sprite feature allows you to change the player’s character sprite to another chosen sprite permanently.
!
!
! Change Gender
! The Change Gender feature allows you to change the player’s gender to male or female permanently.
!
!
! Change PK
! The Change PK feature allows you to set pvp on or off for the player.
!
!
! Give Exp
! The Give Exp feature allows you to give the player a set amount of Experience Points. This feature is usually used to grant the player experience for completing a quest, exploring, or working a profession.
!
!
! * * *
!  
! Movement
!
! Warp Player
! The Warp Player feature allows you warp the player to a new location (even a new map). With this feature you’re also able to change the direction the player is facing.
!
!
! Set Move Route
! The Set Move Route allows you to set the movement route of the event (NPC usually). You can also change the graphics, speeds, and other nifty features.
!
!
! Force Spawn NPC
! The Force Spawn NPC feature allows you to instantly cause a chosen NPC to respawn.
!
!
! * * *
!  
! Animation
!
! Play Animation
! The Play Animation feature allows you to play a chosen animation at the player’s location, an event’s location, or the tile it’s on.
!
!
! * * *
!  
! Shop and Bank
!
! Open Bank
! The Open Bank feature simply opens the player’s bank window and allows them to interact with it.
!
!
! Open Shop
! The Open Shop feature opens a chosen shop’s window for the player to trade from.
!
!
! * * *
!  
! Cut-Scene Options
!
! Fade In
! The Fade In feature slowly fades the screen black.
! It is important when using the Fade In feature you also use the Fade Out feature at some point.
! Important
! I came upon an issue that should be noted here. Using the Fade In feature will make you to be unable to see Events in the map editor during the duration of the Fade In feature. If you should close the Event without using the Fade Out feature you will have a fun time opening the Event back up, you will have to reset the server.
!
!
! Fade Out
! The Fade Out feature is used in conjunction with the Fade In feature to restore sight to the player.
!
!
! Flash White
! The Flash White feature simply flashes the screen white for a second.
!
!
! * * *
!  
! Map Functions
!
! Set Fog
! The Set Fog feature allows you to choose a fog type, the fog speed, and how transparent it is. This will appear on the screen over everything.
!
!
! Set Weather
! The Set Weather feature allows you to choose what kind of weather you want the map to have and how intense it is.
!
!
! Set Map Tinting
! The Set Map Tinting feature allows you to change the tint of the map to a chosen color. This is great for setting the mood of a map. The town is on fire? Change the tint of the map to a crimson color. Possibilities are almost endless for the uses of this.
!
!
! * * *
!  
! Music and Sound
!
! Play BGM
! The Play BGM stops the current song that is playing and plays the new chosen song.
!
!
! Fade Out BGM
! The Fade Out BGM feature slowly fades out the current song that is playing.
!
!
! Play Sound
! The Play Sound feature plays a chosen sound.
!
!
! Stop Sound
! The Stop Sound feature stops all the current sounds that are playing.
!
!
! * * *
!  
! ETC
!
! Wait
! The Wait feature allows you to have the Event wait a chosen amount of seconds before continuing running the rest of the Event.
!
!
! Set Access
! The Set Access feature allows you to set how much access a certain player has to the server. For example making someone an administrator or demoting them to a regular player.
!
!
! Custom Script
! Allows you to run a chosen Script. This requires vb6 and is a source edit.
! How to create a Custom Script.
!
! Open up Server.vbp and find the below code in modCustomScripts.
! ```
Public Sub CustomScript(index As Long, caseID As Long)
Select Case caseID
Case Else
PlayerMsg index, "You just activated custom script " & caseID & “. This script is not yet programmed.”, BrightRed
End Select
End Sub

Simply add a Case 1 and put in code that you want to run. If you want to add an additional script simply add a Case 2, Case 3, etc in that order.
>! Notice all the code is after Select Case caseID and before the Case Else. Also the Cases are in numerical order.
>!  
>! ```
Public Sub CustomScript(index As Long, caseID As Long)
Select Case caseID
>! Case 1
>! MsgBox "I'm a box."
>! Case 2
PlayerMsg index, "Cool text!"
>! Case Else
PlayerMsg index, "You just activated custom script " & caseID & ". This script is not yet programmed.", BrightRed
End Select
End Sub

Whew, that was a lot to take in!

I understand that is a lot to take in, hopefully my explanations has helped you understand the Event System a little more. Thank you for reading, if you want to read up on some more advanced things keep reading.



Advanced Information

Hello once again, if you’re reading this you’re wanting to learn a little bit more about the Event System. We will be looking at
Player Variables
, Player Switches
, Self Switches
, and Conditional Branches in this tutorial.

Switches

What is a Player Switch?

! Simply think of it as a light switch. You’re able to turn it on (True) or you’re able to turn it off (False). When you turn a Player Switch
on you’re allowing that switch to activate an Event in your game and when you turn a Player Switch
off you’re simply deactivating an event in your game. It is to be noted Player Switches
only affect the player who is working it.

What is a Self Switch?

! Self Switches
are the exact same thing as a regular Switch
, just with two small differences. While Player Switches
can turn on/off Events anywhere in your game, Self Switches
are only able to affect the Event it is in. A Self Switch
resets upon re-entering the map.
! It is to be noted Self Switches
only affect the player who is working it.

Why even use a Self Switch?

! The main reason to use a Self Switch
is simply to reduce clutter in your game and use on Events that you want to have reset when you enter the map again. It is to be noted that each Event has only four Self Switches
.
! *It is to be noted if you’re familiar with rpgmaker, Self Switches
do not reset on that program, they do on Eclipse. In rpgmaker you normally use them one time uses, for example; After looting a chest, it now says it’s empty forever. In Eclipse you would use a Self Switch to have something restart when you enter the map again, such as a cloud of bats flying across the map.

Example of using a Player Switch.

So I created a simple Event that makes the NPC give the player all his gold, then after he whines about how poor he is.

Event Example

!

!

Break Down of Event

! A. First thing to notice is that I’m working in the first page and it has no conditions for it to run. Also notice there is another tab with the number 2, if you click it, it takes you to the second page.
! B. Here I set the NPC’s movement and I set it so the player to have to hit CTRL to talk to him to activate Bill’s Event.
! C. Here I added the text stating he is giving you the gold. As you can see I also used the Change Item feature to give you 10 gold. Then last I turned the Take Bill’s Gold Player Switch
on (true).
! D. Notice now that I’m working in the second page. The condition for the second page is to run is if
Take Bill’s Gold Player Switch
is on (true). If it’s not this page doesn’t run and sits idle waiting for it to be turned on.
! E. Here I change the NPC’s movement and I still have it set it so the player to have to hit CTRL to talk to him to activate Bill’s Event.
! F. Now Bill just says how poor he is. He will no longer give you gold, because you took it all!
! Note
! If you used a Self Switch
instead of a Player Switch
Bill’s Event will reset every time you re-enter the map. Since we didn’t however the change is permanent until we turn the Take Bill’s Gold Player Switch
back off.



Variables

What is a Player Variable?

! A  Player Variable 
is like an empty box, you place things in both of them for storage to be used at a later date. Like a box you usually write something to let you know whats in the box, for example “Kitchen Stuff”. Like all good boxes you can always put more stuff in or take stuff out.
! A  Player Variable
  in the Event system is capable of storing a number into it, as such you can later call on the  Player Variable 
to pull the number out at will. Like the box, you label the Player Variable
to let you know what it’s used for.

Why use a Player Variable ?

! A very good question, however I can assure you once you start using Variables
, you will wonder how you ever lived without them. Let’s say you’re wanting to create a romance system with a NPC named “Mina”. You create the dialogue, and add choices in the Event system, but how can we make her remember how much she loves us, or I dare say hate us? That’s right, a Variable
.

Player Variables With Eclipse.

! (1)First we need to name our Player Variable.
! (2) Some people prefer to name and define Player Variables
as they need them on the map. Personally to me it’s better to name and define all your Player Variables on the very first map.
! (3)Comment what your Player Variabl
e
does. Write the name of your Player Variable in the notebook. Also write a small description of what it does.
! *For this example we’re using Love Mina
and we set it to 0.
! The note I write states “Keeps tracks of Mina’s Love”.
! Now let’s say the player makes a comment to Mina, she is really enjoys it! Now we need to add one point in our Player Variable “Love Mina”.
! (1) Click Player Variable
! (2) Select Love Mina.
! (2) Have it add one point.
! (3) Done!
! Now Mina now loves us by an additional point!


Conditional Branches

What is a Conditional Branch?

A Conditional Branch can be thought of as a locked chest. As in locked chests require a key to open it and only that one key can open it. A Conditional Branch checks to see if the conditions are met for it to open, it simply asks “Is this the key that opens me?” If the answer is yes it unlocks and runs the code. If the answer is no, it skips over the locked chest doing something else entirely.

I don’t understand.

! Let’s break it down a little more then. As you can see in the below picture, I’m setting up what my condition (or key) is that will allow it to open. For my example, only if the Player Variable Light
is equal to 0 will it unlock.
!
!
! The @> with the black box is where you put the code that you want to run when your condition is met and the @> with the red box is where you put the code that you want to run if the condition is not met. It is to be noted if the condition is not met the black square code is completely ignored. However if the condition is met, the red square code is completely ignored.
! *The squares below are not actually in the event system, I just placed them there to help with my explanation.

That’s cool, now how do I use them?

! One of the first things that comes to my mind is a simple fetch system. You can have it when you talk to the NPC it checks if the player has a certain item, for example a “Red Ruby”. Using the Conditional Branch it checks if the player has the Red Ruby. If the player does, code is ran that takes the Red Ruby out of the player’s inventory, and gives the player gold. If the player doesn’t have the Red Ruby, the NPC tells him he wishes he could have a Red Ruby.
!
!
! *The “End Branch” is just letting you know that’s the very end of the Conditional Branch.
! **What is really great about a Conditional Branch is that you can place a Conditional Branch inside a Conditional Branch to make it check for another condition. You can do this this as many times as you want!

In closing

Thank you for reading the guide and I hope some of you found it very helpful. Just remember reading how to work something is great, applying and practicing what you learned will make it stick with you forever.


Additional Items Added!

Useful things you can do in the Event System

It’s good to see you once again. I just finished updating all the pictures because of the new website change and I thought this would be a good time to show some examples of cool stuff you can do with the Event System. As always I’ll show you the Event first, then break it down.

Quest

Very quick and efficient Quest System

This is a two page quest system that is very simple to use and takes no time at all.

If you’re using a quest system like this it’s based on having one of the quest item, however it clears any amount of the quest items in your bag, of course rewarding you for each item that is taken.

Page 1

!

Page 2

!

Page 1

As you can see on the first page I have it set up when you talk to the person it checks if you have at least one Warm Bread. If you possess at least one Warm Bread it activates the Self Switch A (goes to page 2). If you don’t have any Warm Bread, it informs you that you need some Warm Bread.

Page 2

There is two things of note here; The first is that I set the Condition for Page 2 to load if Self Switch A is True (On). The second is that the Trigger is a Parrallel Process (instead of an Action Button). What this means is that page 2 only loads when Self Switch A is turned on and the Parrallel Process automatically runs all the event code on page 2 as soon as it’s switched on.

As you can see I set a Conditional Branch to check if you have Warm Bread. If you have Warm Bread it takes one away and grants you 5 Experience Points, then it keeps looping because it’s a Parrallel Process. So effectively it runs really fast clearing all the Warm Bread out of your bags and grants you your experience points*. Once I run out of Warm Bread, Self Switch A is turned off and the event goes back to page 1.

  • I could as easily have it give you gold in addition of experience points for each item or create a text message outside the loop.

Some food for thought

This is a very quick and easy way to do your Quest Systems without any source edits. In addition you can easily tweak the event code to have it to check or take more/multiple items.


Zone Level Check

Zone Level Check

Although this is a very simple Event, many people seem to have problems with it. I have been asked repeatedly how to have it check your Level to see if you’re a high enough Level to enter a zone/dungeon.

Page 1

!

Page 2

!

Page 1

You first create a Conditional Branch that checks if your Level is equal or greater than a set number (in this instance Level 10). If you’re at least Level 10 it turns on Self Switch A and goes to page 2. If you’re Level 9 or lower it informs you that you need to be Level 10 to enter this area.

Page 2

I just had it simply change the door graphic to open and warps you to your new location. You can easily have it say something, make a sound play for the door opening, or any other possibilities. You can also set page 2 as a Parallel Process to have it instant warp you instead of clicking it again.


In Closing

Thank you for reading and hopefully it will help. I plan on adding more examples later of stuff you can do. If you have any suggestions of something you would like to be seen done feel free to post!

Very nice tutorial, Agoraphobic! This will definitely be of use to me…

Thanks for the tutorial. Sticky/add in the tutorial section.

You’re brilliant. I know how to work events from RPG Maker days, but this will be really helpful for some. Nice layout too, good job. 🙂

This is great! I’ve been looking for something like this.

Thank you for sharing. I was wondering what Switches and Modules did. Thanks.

This must be stickied for those who are new on event system!! very nice

@Sherwin:

This must be stickied for those who are new on event system!! very nice

+1

@Sherwin:

This must be stickied for those who are new on event system!! very nice

+2

+3

+4

This tutorial helps~

i want to add something , When you put /p at Show Text or Add Choises or anywhere … it will show the name of the player who speak with it.

@Sherwin:

This must be stickied for those who are new on event system!! very nice

I do agree as well.
Shall it be done.

Nice tutorial, this should really be stickied, as it is event system well explained for new people to understand. 🙂

Show Chatbubble

The Show Chatbubble feature allows you to create a chat bubble with written text over the player, a NPC, or a chosen event. The Show Chatbubble feature doesn’t allow you to change the text color and has a default color of black.

Where is this??? Is my client out of date or something?

Probably an addition in his DX8 nightly release rather than his official version.

This is great, do you have a pdf or word version for download?

Looks solid, needed a event system tutorial for awhile now.

You should post this on the wiki!

Sorry Natreve I don’t, I deleted the .doc after I finished the post. You could always just copy/paste it into a document.

Thanks Marshy Dearest. I’m hoping I don’t have to upload new photos, just waiting a bit to see if the old ones start working soon.

Uploaded all the photos that were missing since the forum change and added a bit more information. Anyone that has any suggestions of a tutorial that they would like to see done in the Event System, feel free to post.

Log in to reply