Event System Support (expert users only)

Status
Not open for further replies.

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
*rolleyes*

Don't know why I didn't see this before.

Just condition the event tab with Switch 5, and get rid of the condition from within the event itself.
 

Caranore

Villager
Member
Joined
Dec 21, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Just a question before I run it, would keeping the Self switch on keep the event from repeating itself by doing that? Or... wait... I should jsut turn the switch off at the end shouldnt I..?

Edit: I figured it out... I thought it kept freezing because there was a wrong tile in the way... And all I did was change the switch off when the event was done. Thank you Shaz!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
You could do it that way, but is there anything in that cave that could cause the switch to be turned on again?
 

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
Hey, so I'm trying to add an evented hunger/thirst/sleep system in my game, and if I can just crack one of them then I'll be able to copy the event for each parameter.

OKAY SO basically, each parameter has four levels. Here's how the thirst one is set up so far.

@>Conditional Branch: Variable [0043:Dehydration] ==200

@>Change State: Entire Party + [Minor Dehydration]

@>Change State: Entire Party - [Advanced Dehydration]

@>Change State: Entire Party - [Critical Dehydration]

@>Change State: Entire Party - [Deadly Dehydration]

@>

: Else

@>

: Branch End

@>Conditional Branch: Variable [0043:Dehydration] ==400

@>Change State: Entire Party + [Advanced Dehydration]

@>Change State: Entire Party - [Minor Dehydration]

@>Change State: Entire Party - [Critical Dehydration]

@>Change State: Entire Party - [Deadly Dehydration]

@>

: Else

@>

: Branch End

@>Conditional Branch: Variable [0043:Dehydration] ==600

@>Change State: Entire Party + [Critical Dehydration]

@>Change State: Entire Party - [Minor Dehydration]

@>Change State: Entire Party - [Advanced Dehydration]

@>Change State: Entire Party - [Deadly Dehydration]

@>

: Else

@>

: Branch End

@>Conditional Branch: Variable [0043:Dehydration] ==800

@>Change State: Entire Party + [Deadly Dehydration]

@>Change State: Entire Party - [Minor Dehydration]

@>Change State: Entire Party - [Advanced Dehydration]

@>Change State: Entire Party - [Critical Dehydration]

@>

: Else

@>

: Branch End
The states add on just fine when I reach said level of dehydration, but the issue is erasing them again when the dehydration variable drops. Making the conditional branch set to 'greater than or equal to' the game drops to 2FPS and freezes up like a madman, so I dunno how else to do it. It's running as a parallel process common event, if that's any help.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You use less than. In this example, I haven't put the conditional branches in the else branch (simply because if you want to add more, it runs off the page), so I used exit event processing instead, which works just as well. Note that to get stage one of minor dehydration, the conditional branch must say less than 400, because at 400, you are at stage two. The last stage should be greater than or equal to 800. Run it on a parallel process and you're good to go :)
 

Quigon

electric boogaloo
Veteran
Joined
Mar 17, 2012
Messages
1,982
Reaction score
954
First Language
English
Primarily Uses
N/A
Ah I see, feel quite silly now. Thanks a lot for that Cel :)

Quick question, if I do the same process with the hunger/fatigue variables as well, I presume I can just stack them all on the same common event?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
No, since exit event processing will prevent it from processing anything else. So just create a common event for each system.

If you want to conserve on parallel processes, you could create a common event for hunger, thirst and fatigue, and one main common event. In the main common event, call the other 3 common events, and set it to parallel process, don't set the other common events to a parallel process.
 

Caranore

Villager
Member
Joined
Dec 21, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
No shaz, since I turned the switch to go off once the event happened, and the only thing that could turn it back on again is beating the boss in the dungeon.. Once you beat the boss it turns on a switch that leads to a conditional branch, where if the switch is on, the crystal (event icon) merely says theres nothing going on now.
 

RzrBladeMontage

Eventer
Member
Joined
Mar 17, 2012
Messages
26
Reaction score
2
First Language
English
Primarily Uses
Hopefully I can post this question without confusing myself, or anyone else. I'm currently creating an alchemy event system and I'm stuck at the very beginning of the main event. When the player uses an alchemy set they are given (teleported to) a screen with a mixing bowl, and the alchemy ingredients floating around it. I currently have the alchemy ingredient events set to be shown floating around only if the player has 1 of the item in their inventory, otherwise it's not shown at all. When you press ENTER on the mixing bowl you get the options to Mix a Potion, Use a potion recipe and quit. Mixing a potion allows you to add random ingredients and see what result you get, and a potion recipe is a quick way of brewing a potion you've already created. When the player starts off, they'll have no recipes and need to experiment to make something. What I'm trying to figure out what to do, is give the player a list of ingredients they have currently, and allowing them to pick which one they want to add. I was thinking of using conditional branches and variables to check for what items the player has, and in the end give them a custom list after it checks their inventory. The problem is that I currently have 7 ingredients and there's an excessive amount of combinations you could have.

So, in summary I'm trying to do the following:

Check the players inventory for alchemy ingredients and display a "Choice" list of which ones they want to add, and then removing the ingredient they chose, and showing the list again so they can pick another.

I have no idea if this is waaaaaay out of Eventings league or not, but I'd really like to have an event only alchemy system. Perhaps I'm just making this a bigger deal than it needs to be?

Also, if it helps, the potions are created like this:

Water filled Vial + yellow flower + (ingredient) = (type) Potion

So the yellow flower (temporary name of course), is a necessary part of the alchemy stage.
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
@RzrBladeMontage: completely possible, but unless you know scripting, you're going to have to make do with images only (so a menu made up purely out of images to fool you). I've created my own crafting system, but I used images to show the 'recipe'. So you'll have to create a new unique image for each possible recipe.

How far have you gotten with this system? Only someone who understands variables a lot and button input will be able to follow my instructions.
 

RzrBladeMontage

Eventer
Member
Joined
Mar 17, 2012
Messages
26
Reaction score
2
First Language
English
Primarily Uses
I've started to put together some different ways of getting this to work. The first way is the one I described where I gather all info about ingredients in the inventory, and display a large list, the second was splitting each ingredient into separate categories, such as Herb, Spore, and Animal, and then gathering the info and displaying a smaller list. I haven't picked a certain way to do it yet, mostly because each of them involve and insane amount of conditional branches. I'm quiet experienced in Eventing, but I'm also very willing to learn, so if you post something that I don't know much about I'll be sure to take it to heart and do my best and use it ~ I don't want people to waste their time on me :p .

EDIT: I understand variables really well, button input, however, I have really played with. Either way I'm down to hear your way of doing this.
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
If you have many recipes, you could have a 'recipe book' of some sorts. If the player opens it, he will see a list of images that either have a recipe on, or is greyed out. The player can select only the known recipes, whereas the greyed out ones (that shouldn't display any recipe), won't do anything. This is do-able if you work out how many recipes you want to show on the screen at once (you can go for multiple pages). For example, let's say you show 10 recipes per page, then you'd need 20 images for each page (1 for the greyed out version, and 1 for the learned version). This is a lot of work, so I advice you to cut down on the amount of recipes the player can make.

The recipe book would be easy to make, if you make use of this script made by Neon Black, which allows you to show pictures on the screen based on the value of a variable (as well as switches), extremely useful for this type of eventing. I have an example project here that shows you how you can use this script to make an evented picture menu.

Obviously you need to create these pictures yourself.



an example of an evented picture menu in-game.As for the actual crafting part, you need to make every item you can use a key item, then use the 'select key item' command from the event menu and use those variables to check against a recipe list. This recipe list would contain a lot of conditional branches if you allow the player to select a lot of items at once. I advice only 3 items max to combine.
 
Last edited by a moderator:

RzrBladeMontage

Eventer
Member
Joined
Mar 17, 2012
Messages
26
Reaction score
2
First Language
English
Primarily Uses
I took a look at both the video and the demo, it seems easy enough to do. I just need to create some pictures and put 'em in. I'll give it a try, thank you very much :) .
 

doriantoki

Veteran
Veteran
Joined
Dec 20, 2012
Messages
115
Reaction score
29
First Language
English
Primarily Uses
RMMV
Does anyone know if this is possible?

I want my game to check the total amount of an item before proceeding to use that item. It's a creation system of sorts, that will only create an item when there are sufficient materials. The "problem" at the moment is that I can't simply check for the item to be in the inventory, since some recipes require more than one of that item. Also, it's difficult to set variables amounts attached to the item since the item itself can be dropped by enemies, where AFAIK, you can't (easily?) set the variable. Maybe I am over thinking it, or am not familiar enough yet with the system.
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Set a variable to game data > item in inventory. Then use that variable in a conditional branch to see how many the player has in their inventory.
 

doriantoki

Veteran
Veteran
Joined
Dec 20, 2012
Messages
115
Reaction score
29
First Language
English
Primarily Uses
RMMV
Ah, right, right. Gotcha. I was over thinking it. Thanks Celianna :)
 

Redweaver

Veteran
Veteran
Joined
Dec 23, 2012
Messages
117
Reaction score
42
First Language
English
Primarily Uses
I apparently posted incorrectly to find this help and Celianna locked my thread http://forums.rpgmakerweb.com/index.php?/topic/8239-master-eventer-help-needed/'>http://forums.rpgmakerweb.com/index.php?/topic/8239-master-eventer-help-needed/ , so I'm posting the link for reference rather than trying to retype the whole thing.  (This is not snark or anger, just simple statement of facts. Do not read tone into this, please)

Before I say another word, I need to get this out of the way: NO SCRIPTS.  I'm fully aware the scripts to do this exist.  I know I'm making it harder on myself doing it this way.  I know it will be messy and use a lot of variables.  I know it is important to know how to use the scripts where appropriate, and I fully intend to learn the scripts...right after I learn how to do it with events.  I hate to sound like a total jerk about this, but any replies that involve scripts will simply be ignored.

With that said:

The problem I need help with is getting an event to see the player when in range, give chase and start a combat if it catches the player but give up and go back to random movement if the player gets out of range.

https://docs.google.com/file/d/0B1mYcSSR7dRuQUk0R2FJTnNpWGM/edit'>https://docs.google.com/file/d/0B1mYcSSR7dRuQUk0R2FJTnNpWGM/edit

Here is the file with a map and a monster.  If anyone has a minute to open that up and check it out, I'd appreciate it.  It very nearly does exactly what I want it to do...I've almost got it figured out.  Just missing the "stop chasing if the player moves out of range" bit.  The autonomous movement of the parallel process page that checks the distance seems to overwrite any other movement I try to give the event.
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,269
Reaction score
1,423
First Language
English
Primarily Uses
RMXP
I'll follow up with my modification: http://www.webgel.net/bf/Group%20Work.zip

Note the difference between the Euclidean distance and Manhattan distance.

I recommend using the Manhattan distance to calculate the distance between the monster and the player because it is an accurate measure of how long the enemy will have to move. (Unlike the Euclidean sqrt(x^2 - y^2))

As a boon it is also easier to calculate.

With your goal of learning I suggest you tell me how I made my modification work.

Also why do my restructuring of your original calculation yield the same result?

As Ocedic wrongly said:

The thing about this behavior is that it's logically easy
A better categorization is deceivingly simple.

There is a subtlety related to the distance checking which may lead to unwanted behavior. Can you guess what that is?

On a final note I'll mention that there are certain issues with the scalability of the system, but I am not telling you want they are.

You'll learn more by actually experiencing them yourself.

Good luck

*hugs*

 - Zeriab
 

Titanhex

Do-It-All
Veteran
Joined
Jan 3, 2013
Messages
577
Reaction score
216
First Language
English
Primarily Uses
N/A
Hey, this is a general math question.  It mainly has to do with rotating pictures along a radius. My problem is the menu rotates once correctly and then stops rotating properly.

I'm designing a spin menu using events and (mostly) event scripts. I want to release this to the public as a plug and play event.

First I establish our center point, which for this purpose is our screen center. I create a variable that stores the number of menu options we have, because I want that to be factored into the math. I also store the correct spacing in radians between each item.  I use only 1 variable to manipulate each item's X and Y place. I also store the index.

That event script looks like this:

@options = 5@centerx = 258@centery = 208@itemx = @centerx@itemy = @centery@mindex = 1@rotate = 360/@options/20*Math::pI/180screen.pictures[0].show('Menu BG', 0, 0, 0,100, 100, 160, 0)

I show the background for the menu, and then draw all the pictures at the center X and Y.

From here I move all my pictures out to their proper spot, so they sort of burst from the center. It's simply aesthetic.

The formula here is done fine, and each item on the menu goes to it's proper x and Y coordinate.

I then establish button press checking via the standard loop, wait, conditional branch.

It register left, right, esc, and enter.

I have a problem with left/right rotating the wheel though. It seems to go the right amount the first time, but stops moving after 1 press. It's not frozen. I can hit esc and enter and left and right. Going the other direction rotates it a very tiny amount before stopping.

Also it's not discerning a difference between left and right rotation despite me subtracting the rotation variable instead of adding it.

Here is the code in text format:

@count = 0Loop @count += 1 @frame = 0 Loop @frame += 1 @dx = @itemx - @centerx @dy = @itemy - @centery @dist = Math.sqrt(@dx*@dx + @dy*@dy) @angle = Math.atan2(@dy, @dx) + @rotate n = @centerx+@dist*Math.cos(@angle) @itemx = n n = @centery+@dist*Math.sin(@angle) @itemy = n screen.pictures[@frame].move(0, @itemx, @itemy, 100, 100, 255, 0, 15) @dist = Math.sqrt(@dx*@dx + @dy*@dy) n = 360/@options*Math::pI/180 @angle = Math.atan2(@dy, @dx) + n n = @centerx+@dist*Math.cos(@angle) @itemx = n n = @centery+@dist*Math.sin(@angle) @itemy = n Conditional Branch: @frame >= @options Wait: 1 frame(s) Break Loop Branch End Repeat Above Conditional Branch @count > 20 Break Loop Branch EndRepeat AboveI know it's mostly scripting, which I have some basis in, but this is in an evented menu, not a script. I have no intentions of making it a script. I'd rather keep it a plug in-able Evented menu.

I know almost all this could be done with just events, the math stuff is the only thing you can't do without an Evented Script. I decided to go with scripts to avoid long conditional branches and tons of variables. I'll plug in a easy interface to the wheel once it's done.

This is a demo of where I'm stuck at now:

http://dl.dropbox.com/u/5536575/Custom%20Picture%20Menus.exe

Anyways, help appreciated! Apparently I'm doing something incorrectly.
 

Redweaver

Veteran
Veteran
Joined
Dec 23, 2012
Messages
117
Reaction score
42
First Language
English
Primarily Uses
I'll follow up with my modification: http://www.webgel.net/bf/Group%20Work.zip

Note the difference between the Euclidean distance and Manhattan distance.

I recommend using the Manhattan distance to calculate the distance between the monster and the player because it is an accurate measure of how long the enemy will have to move. (Unlike the Euclidean sqrt(x^2 - y^2))

As a boon it is also easier to calculate.

With your goal of learning I suggest you tell me how I made my modification work.

Also why do my restructuring of your original calculation yield the same result?

As Ocedic wrongly said:

A better categorization is deceivingly simple.

There is a subtlety related to the distance checking which may lead to unwanted behavior. Can you guess what that is?

On a final note I'll mention that there are certain issues with the scalability of the system, but I am not telling you want they are.

You'll learn more by actually experiencing them yourself.

Good luck

*hugs*

 - Zeriab
Yeah, you got it set up in one of the ways I tried. Right around the time I realized how many variables it was going to take me to do a full sized game this way. I'm probably wrong, but I thought it would cut down on variables and be somehow more "elegant" for the event to be self contained.  So I guess I wasn't specific enough with what I was trying for, nor was I thorough enough describing what I'd already did.

I was just being bloody minded not taking the fix I already had.

I see what you mean about the Manhattan distance...that is easier to calculate.

"With your goal of learning I suggest you tell me how I made my modification work"

Its what I said it was.  By moving the parallel process of checking distance to a different event, the autonomous movement changed by page call the way it should.  I knew it did that, but I was bashing me head against forcing it all into one event...ooooo self inflicted stupidity hurts.

'Also why do my restructuring of your original calculation yield the same result?'

Never been terribly good at explaining maths.  Mine was checking each variable in turn for range, with the inversions included in case the player was coming from the other side.  Yours is just math-ing some variables around, so it doesn't matter which side he's coming from.  Clever that bit turning the number positive if it was negative to make the rest of the maths easier.  And that last conditional branch: Total Distance < 5.  Very smooth.

"There is a subtlety related to the distance checking which may lead to unwanted behavior. Can you guess what that is?"

Don't know if this is what you mean, but the slime's reaction (behavior change) seems delayed under the Manhattan method.  It won't always beeline at me immediately when I'm in range.  Seems to happen more often when I'm behind it.

"On a final note I'll mention that there are certain issues with the scalability of the system, but I am not telling you want they are.

You'll learn more by actually experiencing them yourself."

Well, the main issue I see, aside from the number of variables needed to track multiple monsters, is the processing needed to track them all.  Each monster is going to be pinging the event looking to see if the player is in range.

Thanks for your help.  I see where I made some mistakes.  This may not be a solution for an entire game, but it can certainly be a strong base for a puzzle or special encounter!
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,359
Members
137,803
Latest member
andrewcole
Top