Requires demo for the pre-made effects – Demo – Version 1.9 > (Demo uses older version)
#------------------------------------------------------------------------------# # Galv's Region Effects #------------------------------------------------------------------------------# # For: RPGMAKER VX ACE # Version 2.0 # Credit to Yanfly and Quack for event spawning method #------------------------------------------------------------------------------# # 2022-07-21 - Version 2.0 - removed non-working script call from description # 2014-01-07 - Version 1.9 - upgrade to not stop animations playing when a # region effect is drawn. # 2013-01-24 - Version 1.8 - minor tweaks # 2013-01-22 - Version 1.7 - Made effects work during forced move routes # 2012-11-15 - Version 1.6 - Fixed a major bug caused with last update. # 2012-11-04 - Version 1.5 - streamline updates and bug fix suggested by Quack # 2012-10-23 - Version 1.4 - updated alias naming convention for compatability # 2012-10-09 - Version 1.3 - re-wrote the code to be more efficient when # - using many different region effects. # 2012-10-09 - Version 1.2 - code tweak that may reduce lag on low-end pc's # 2012-09-16 - Version 1.1 - now compatible with Yanfly's spawn events # 2012-09-15 - Version 1.0 - release #------------------------------------------------------------------------------# # Designed to activate effects when regions are stood on. # An effect can include: # - Sound Effect # - An event that appears at the player's location # - Activating a common event # # # INSTRUCTIONS: # 1. Copy image from /Graphics/Characters/!Other-specials.png to your project # 2. Copy the map from this demo into your game. # - this map has events set up for the pre-made effects # 3. Check the map ID of the map you copied in your game # 4. Change the SPAWN_MAP_ID number to this map ID # 5. Change REGION_EFFECT_SWITCH to a switch you are not using in your game. # 6. Add some regions to your map to test. # # # # To disable region effects use the region effect switch you specify below. # #------------------------------------------------------------------------------# $imported = {} if $imported.nil? $imported["Region_Effects"] = true module Region_Effects #------------------------------------------------------------------------------# # SCRIPT SETUP OPTIONS #------------------------------------------------------------------------------# REGION_EFFECT_SWITCH = 1 # Turn this switch ON to disable the effects. MAX_EFFECTS = 20 # Number of effects that can be on screen # before being removed. (To prevent lag) SPAWN_MAP_ID = 2 # Map ID of the map you store event effects in. #------------------------------------------------------------------------------# # ENVIRONMENT REGIONS SETUP #------------------------------------------------------------------------------# #------------------------------------------------------------------------------# # # region => ["sound", vol, pitch, event_id, common_event_id] # # region - the region ID the effect will activate on # sound - the name of the SE file. "" for no sound # vol - the volume of the SE (0 - 100) # pitch - the pitch of the SE (50 - 150) # event_id - event ID called from the spawn map. 0 for none. # common_event_id - common event ID to call. 0 for no common event. # #------------------------------------------------------------------------------# EFFECT = { # ! don't touch this #------------------------------------------------------------------------------# 0 => ["", 0, 0, 0, 0], # No Effect (no region) # Pre-made effects (requires demo events) 1 => ["", 0, 0, 5, 0], # Dirt dust 2 => ["Blow7", 60, 150, 0, 0], # Wood surface noise only 3 => ["Water1", 60, 110, 1, 0], # Shallow Water 18 => ["Earth2", 40, 130, 0, 0], # Hard surface noise only 5 => ["Damage3", 40, 150, 2, 0], # Footprints 6 => ["Ice9", 50, 130, 3, 0], # Walking over thick grass 7 => ["", 0, 0, 0, 1], # Calls common event 1 only 8 => ["Fire3", 80, 120, 4, 2], # Calls fire trap 37 => ["", 80, 120, 6, 0], # Dust cloud # You can add more as required. eg: # 42 => ["", 0, 0, 0, 0], # 18 => ["", 0, 0, 0, 0], # etc. etc. # Only one effect per region number will work #------------------------------------------------------------------------------# } # ! don't touch this #------------------------------------------------------------------------------# # END SCRIPT SETUP #------------------------------------------------------------------------------# end # Region_Effects module DataManager #-------------------------------------------------------------------------- # alias method: load_normal_database #-------------------------------------------------------------------------- class <<self; alias="" load_normal_database_spawn_alias="" load_normal_database;="" end="" def="" self.load_normal_database="" $data_spawn_map="load_data(sprintf("Data/Map%03d.rvdata2"," region_effects::spawn_map_id))="" class="" game_player="" 0 $game_map.region_event($game_player.x, $game_player.y, eve, Region_Effects::SPAWN_MAP_ID) end $game_temp.reserve_common_event(com_eve) unless com_eve == nil end end # Game_Player class Game_Map attr_accessor :effectlist attr_accessor :r_events alias galv_region_effects_setup setup def setup(map_id) @effectlist = [] @r_events = {} galv_region_effects_setup(map_id) @eid = 0 end def region_event(dx, dy, event_id, map_id) map_id = @map_id if map_id == 0 map = $data_spawn_map event = generated_region_event(map, event_id) @eid += 1 @effectlist.push(@eid) @effectlist.shift if @effectlist.count > Region_Effects::MAX_EFFECTS @r_events[@eid] = Game_Event.new(@map_id, event) @r_events[@eid].moveto(dx, dy) SceneManager.scene.spriteset.refresh_region_effects @eid = 0 if @eid >= Region_Effects::MAX_EFFECTS end def generated_region_event(map, event_id) for key in map.events event = key[1] next if event.nil? return event if event.id == event_id end return nil end alias galv_region_effects_gm_refresh refresh def refresh @r_events.each_value {|event| event.refresh } galv_region_effects_gm_refresh end alias galv_region_effects_gm_update_events update_events def update_events @r_events.each_value {|event| event.update } galv_region_effects_gm_update_events end end # Game_Map class Spriteset_Map def refresh_region_effects dispose_region_sprites create_region_sprites end alias galv_region_effect_sm_sb_create_characters create_characters def create_characters create_region_sprites galv_region_effect_sm_sb_create_characters end alias galv_region_effect_sm_sb_update_characters update_characters def update_characters galv_region_effect_sm_sb_update_characters @region_sprites.each { |sprite| sprite.update } end alias galv_region_effect_sm_sb_dispose_characters dispose_characters def dispose_characters dispose_region_sprites galv_region_effect_sm_sb_dispose_characters end def create_region_sprites @region_sprites = [] $game_map.effectlist.each_with_index { |id,i| @region_sprites[i] = Sprite_Character.new(@viewport1,$game_map.r_events[id]) } end def dispose_region_sprites @region_sprites.each { |sprite| sprite.dispose } end end class Scene_Map < Scene_Base attr_accessor :spriteset alias galv_region_effects_start start def start galv_region_effects_start SceneManager.scene.spriteset.refresh_region_effects end end # Scene_Map
reupload the demo please
I wasn’t sure why you asked me to do this, but then I read that mediafire free only allows 10 downloads of a file
per dayper week. Ouch. Come back and try again later, I’ll fix it up :)Sorry for bothering you. It might be rude to ask this, however, can I reproduce this script to a Chinese website? Because as you know, in China, we cannot go to wordpress websites because the government blocks it. This is the first time I do something about this. Could you give me some advice about this?
By the way, here is the website url I am going to reproduce this script: bbs.66rpg.com
It’s not rude, thank you for asking permission. Yes, you may reproduce it on another site as long as you give credit :)
Galv,
Thank you for this awesome script. Is there a way that I could add specific battlebacks to the existing tags?
It would ease the tedium of setting them for individual battles on a map that has desert, beach, snow & grass.
i.e.:
region => [“sound”, vol, pitch, event_id, common_event_id, battleback_1_id, battleback_2_id]
# region – the region ID the effect will activate on
# sound – the name of the SE file. “” for no sound
# vol – the volume of the SE (0 – 100)
# pitch – the pitch of the SE (50 – 150)
# event_id – event ID called from the spawn map. 0 for none.
# common_event_id – common event ID to call. 0 for no common event.
# battleback_1 – floor of battleback
# battleback_2 – background of battleback
I tried to figure it out myself, but I am no scripter.
Don’t forget about the common event feature of this script. It was added so you could do pretty much whatever you want and this is something you can do. All you’d need is one common event that uses conditional branches to check what region the player is on (or even terrain tag if you preferred) and change the battlebacks accordingly.
Wow, what a nice script! Would you mind if I disclose it in a brazilian forum? :)
Thanks. I don’t mind at all, go for it.
I may sound stupid for asking this but it doesn’t work for my game. :/
I uploaded the script and did everything it told me to do (images, copy the map and place regions etc)
but it doesn’t do anything.
I don’t really know what you mean by “Change REGION_EFFECT_SWITCH to a switch you are not using in your game.”.
(again sorry, I’m new to this)
At the top of the script there are settings you can change. One of those settings says “REGION_EFFECT_SWITCH =” and then has a number next to it. That number is the number of a switch in your game. The switch you want to use to turn the script ON or OFF.
If you did everything correctly, it will work. I don’t know what you’ve done wrong as I can’t see it.
ummm… the demo link is gone?
Nope, the demo link has not moved. It is at the top of this page.
Can you make it work for followers too? Not the sounds, but the animations, like when walking through water your followers make the water move too
Sorry, I have no plans on making it work for followers
Ok, I have a dumb problem… (I guess)
How can i low the Volume… i know the script says something about it, but in game when I try to low it a little, it doesn’t work.. When I walk on water the spash sounds way to high compared to the rest of the BGS and Music.
Sorry to bug you with a noob question.
In the settings, the number after the sound effect name is the volume.
region => [“sound”, vol, pitch, event_id, common_event_id]
the water region is:
3 => [“Water1”, 60, 110, 1, 0],
so you change 60 to change the volume.
I had a lot of problems trying to use this script because I DID NOT realized that you had to change the SPAWN_MAP_ID value to the value of the map called “effects to spawn” that you copied into your project. I used the Map ID from the “test Map”. I think that is really necessary to say this to anyone who wants to implement your cool project. That’s why i leave it on the comments.
Great Stuff!! Thank You :)
Sorry Kovain to ask a silly question but I just recently bought RPG Maker VX Ace and I’m not so certain of how to work scripts. Could you explain to me how to “change the SPAWN_MAP_ID value to the value of the map called “effects to spawn”” please? Thank you so much :)
Each map in your game has an ID (a number).
One way to see what the number is, is right click on the map and go to “map properties” and you will see a number in the title bar like: 003
If it’s 003, that means the map ID = 3
So you need to copy the map from the demo to your project and then check it’s map ID in your project.
Then in the script, you would change it to the ID you find.
Hi Galv, awesome script! :) I was wondering if you considered using “Terrain tag” from the database’s tileset. This way, the script would be much more easy (and quick) to set-up!
Someone wrote a patch that does this but it doesn’t appear to be there any more.
I didn’t originally use terrain tags because I wrote this for myself and I do full parallax mapping. I’m actually very busy of late so I cannot make this change for you soon, but I will one day.
how can I make a region impassable?
This script doesn’t do that. Yanfly has one that does:
http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/
Hi Galv, this is really ridiculous-sounding but it doesn’t work for me. Whenever I move it makes the desired tracks, but they overlap several times and don’t go away until I move a certain amount of steps, so it’s like I’m carrying a tail of tractor trails behind me :\ I’m using Victor’s Pixel Movement and Diagonal Movement scripts, do you think that’s why? Thanks in advance.
Yeah it’s not compatible with pixel movement
Ok, ty.
Hello, Galv! I love this awesome script of yours, but I have a little problem about the script.
while the the sound effect when the character moving is perfect. But when I make them run (pressed SHIFT) the sound of footsteps sound too fast and unnatural. Is there any way to “slow down” the frequency of the footsteps when the character is running?
Not without some scripting unfortunately and I don’t have a time to make edits at the moment
Ah..okay
I hope you can update the script soon~
thank you for your quick reply :3
The download link doesn’t work for me, can anyone help with that?
Hey Galv, I had a bit of a problem with your script, you see I was using an SE that isn’t from the Resource Audio folder. I was wondering if there’s a way to use imported SE rather than the default ones. Ty for reading
There is a resource manager in rpgmaker that allows you to import your own SE. Then you just need to add the right sound effect name into the script settings.
To be honest, it took me quite some time to figure this out, but after a while I did start to get it. However, I was wondering about how the effect section of the script says not to touch it. Does that include adding our own thing without actually erasing any part of the script? I’m sorry if it’s a stupid question.
That only means don’t touch that line… you can edit/add your own effects as required
I’m sorry to bother you again, but I was wondering:
I noticed that when I interact with an event that changes the player’s graphic the sound effects I used for walking disappears. Did I do something wrong or is there something I missed?
Never mind. I’m an idiot. I just realized that I had a switch set up in the spot that disables the effects.
thank you very much for this script and others
Hi! Whenever i try to enter game.rvproj2 is gives me an error “Failed to load actor data.” If you could help that would be great. Thanks.
I recommend asking in forums about that or trying to google a solution. Sounds like you may have corrupt files but I don’t do rpgmaker support here, sorry.
I know it’s been 8 years, but in case someone wonders: you need to extract the files from the .zip first before running Galv’s project, else you’ll get this error.
Hello. This is an awesome script when I can get it to work, but occasionally I will try to enter a map and I get the following: line 198: NoMethodError occurred. undefined method ‘each_value’ for nil:NilClass. Not sure why I get this on some maps but not on the tester map I created to try the script out.
It looks like you have another script that is refreshing the map before the region effects script creates the @r_events hash.
Check for script incompatibilities
Thanks for the reply! Narrowed it down to Tsukihime’s Overlay Maps, which is too bad because I really like both scripts.
try changing that line from:
@r_events.each_value {|event| event.refresh }
to:
@r_events.each_value {|event| event.refresh } if @r_events
See what happens
Replaced it, then the error popped up on another line. But it was the same line of code so I replaced it there, too. I was able to access the map, but I noticed for the water region the splash graphic wasn’t disappearing correctly after each step. It acted more like snow footprints. When I tried to leave the map I got an error on line 244 for undefined method ‘each’.
Ah well, was worth a try at a quick fix. Unfortunately I don’t have time to do compatibility changes
Understand. Fortunately I managed to duplicate a similar effect even if not quite the same. It will have to do. Thanks anyway.
Great script, Thank You very much!
But I have a little problem with it:
I have a lags, when this scrpt is working. What could be a reason?
Check for script conflicts. You might have another script that processes more each time the region events are created
Yes, I tryed to make a new project, without any others scripts, but the lag is still there ( Especially the first step on region – about a second).
Sorry =( It so sad. I love this script, but do not know what happens.
Do other things take a long time to load like transferring to a new map in your game?
What are the specs of the computer you are using?
Oh sorry, I messed up the page = (
Strangely, I do not know how to explain it.
I added to the project a new sound. And named it, for example “water” – I had a lags.
When I replaced this sound on “water7″ – lags disappeared!
The problem was in the numbers?!!! (I tested it several times)
“Do other things take a long time to load like transferring to a new map in your game?
What are the specs of the computer you are using?”
I’m sorry that I did not answered on these questions.
I just asked a question and at the same time experimenting with a script’s settings.
Galv. I love u! I like your scripts a lot. I ‘m working on rpg maker from a week, so maybe this question can be stupid because im not so expert.
However, here my problem: i did all you told to set up and all work fine except that the animation of splash, or fire and others do not appear. When i try the game i listen to just the sounds.
Not sure what is happening there but try going through this checklist of things to check for:
https://galvs-scripts.com/errors-using-scripts/
I downloaded the demo where should I put it?>
You can put the demo wherever you like. Then extract it, start it up and look around to learn how it works. Read instructions and comments above to try to solve anything you don’t understand.
Soo, uhh, still no way to slow down the frequency of the footstep sounds?? Everything works and looks very good, the frequency only problem :(
The script hasn’t been changed because I’m busy and don’t do requests. So no… still no way and I don’t plan to add that function any time soon.
Hi :D
I would just like to know what you can do with this script.I haven’t found anything on YouTube,so I’m goin to ask you :3
You can do a lot of things. For a few examples, try the demo.
i tried it..but i not understand nothing…even on the demo..if i try add some more snow..nothing appear
Unfortunately I do not have time to teach everyone who doesn’t understand :( Keep trying, look at everything in the demo and look up some tutorials on what regions are to maybe help out
thanks for the reply.i checked everythin but not able to make it worl..i thinked it was just and add this tile ..i tryend even on the dmo adding more snow but nothing appear…the tile skin was the same u used o i thinked it was the right tile
Hello Galv,
I am using your script. But for some reason the right images are not loading. I try to use the water splash, but it loads a picture of my staris instead. im not sure why. any help would be very nice.
Thank you.
Mathew,
P.S.
not sure if you need to know but i have not changed or edited
any part of your script.
The ID of the events you use might have changed. Check the event ID’s on the map
Galv,
Not to double post. but when i run your demo all images show up as a plant. Images being footprints, splashs and all that. Thanks again
In the demo they all show as plants?
no im sorry the demo works fine. i copied over the 2 maps the regoins are the same ( region 3 for water is region 3)
still unable to get it to show the foot prints or splashs. i have the graphics copied and they have the correct names,
Make sure to change the map ID in the settings
and i change it to? the map name i will be using it on? and do i place all map names seperated by a ( , )? sorry about all the questions
# INSTRUCTIONS:
# 1. Copy image from /Graphics/Characters/!Other-specials.png to your project
# 2. Copy the map from this demo into your game.
# – this map has events set up for the pre-made effects
# 3. Check the map ID of the map you copied in your game
# 4. Change the SPAWN_MAP_ID number to this map ID
# 5. Change REGION_EFFECT_SWITCH to a switch you are not using in your game.
# 6. Add some regions to your map to test.
Please spend some time examining the demo and trying to work this out. I cannot see what you are doing and I write all these instructions and make a demo to help out
Galv,
Lol. I would like too thank you for the massive help you have given me.
My problem the whole time was ” SPAWN_MAP_ID = 19 ” I had it left as ” 2 ” not knowing
that it was which map Number it was on my lists of maps. Yes a rather noob mistake lol.
I have used RPGM sense RPGM 98. So i feel rather foolish. It works fine. If anyone else has this problem i hope this helps.
Thank you,
Mathew B. a.k.a Crono Blazer
P.S. i am also using your Character effects script
Having a little problem getting it to work right
but so far so good. thanks again Galv, Love all of your scripts
Glad you worked it out :D
Hey, Galv
Can i ask you something? I’d like to have my character player have the footsteos sound effect. But I want her to be able to change graphic. When I change her outfit, the effect dissapear. I’ve tried it with your demo, but it worked perfectly fine. Do you know what happen? And also I don’t understand a single bit about the spawn map ID what’s that for? Sorry, i’m not someone who’s good at scripting…
I would really appreciate it if you want to reply this comment of mine. Thanks ^^
Changing graphic shouldn’t affect this script.
I have included instructions and a demo for you to examine and work out how to use this. Please spend the time working this out for yourself. It’s the best way to learn.
Hi Galv!
I’m having trouble with this script when combined with the Effectus: Performance Enhancer script. Your script has been a great improvement to a project i have been working on and i really hope i don’t have to take it out. The problem is that when i have the Effectus script in my project as well as your script when i enter a battle i get this error message:
Script ‘Effectus’ line 1556: NoMethodError occured.
undefined method ‘viewport1’ for nil:NilClass
I know that this is an error from the Effectus script and i’m not sure how familiar you are with it. All i’m asking is if you could perhaps point me to what part of your script might be causing this problem or maybe it’s actually an easy fix. Anyway if you can’t help its not harm done i just wanted to get your opinion.
Thanks
Unfortunately I don’t have time to do compatibility with effectus. I recommend contacting the author of that script instead as it is changing how default rpgmaker works.
Hey, I know this is a pretty old script but I’m pretty confused.
What does “4. Change the SPAWN_MAP_ID number to this map ID” mean? How can I do that?
I also checked the demo for any switch use but there is none even though the script says ” 5. Change REGION_EFFECT_SWITCH to a switch you are not using in your game.”
Nevermind, I just scrolled down a bit on the script and magically found it. There was no mention of it being under though so I got confused.
Most scripts usually have settings in the code at the top of them in the script editor. You will find those things in the settings.
Hello I made an add on for this script and wanted to know if I am allowed to post it
As long as you post it as a patch and not the whole script modified.
Would you be able to disable region effects using
$game_player.region_effects = false
in a script call event? I tried activating it by a script call in an event but the region effects are still there. I imagine it’s something simple I’m doing wrong?
Yes, you should be able to do that. Do you have another event that is turning it back to true running at the same time?
This is really moronic, but I was mixing up another one of your region effect scripts and using the command to turn off in this one to try turn off the other script, sorry.
Wait, no I had it correct. I’m using the command to try get rid of the graphic effects when stepping on sand or grass or water temporarily. I tried using it in the demo but it still doesn’t turn it off
The event looks like this. I don’t see any common events or parallel events that seem to be turning it off either
https://prnt.sc/103qgh7
Assume it’s a bug. I haven’t touched VX Ace in many years now. Sorry for the confusion.
Is it easy to fix? It is fine if not
Not sure how difficult it would be, a quick look and I don’t think it’s implemented at all… but so long ago, I don’t recall a lot of VX Ace’s coding.
Hi, I’m developing a game.
I am using this plugin for my game.
Can I put your nickname (Galv) in the game’s ending credit?
Yes, please do. Thanks
Hey Galv, I use your script with 2 tile high sprites, im curious if there is a way to make the footsteps appear below the character. I have the event set to below char, but that doesnt work. I need to somehow change the character z layer or the event z layer..or make it display on a tile 1 behind the one the character is on. Any help with this would be awesome, thanks!
The event appearing below the character should work unless you have other plugins stopping that functionality?
Hi Galv from japan, thanks your great script.
I would like to ask you a very minor question.
I have too-little understand of RGSS3, so I’m not sure how to change this.
please let me know how to set up about how to leave footprints when the “map-event” walks.
Sorry, this one works only for the player
your script worked absolutely good.
but in addition to it, I would like to know how to apply the effect on movement to the “specified” map-events like as the player!
Sorry, the script was only written for the player
Hello. Could I make a request to have the “disable region effects” feauture working? I have avoided or worked around not being able to turn off region effects for a while now, but there have been many scenarios where if I had the ability to simply turn it off it would solved many problems effortlessly rather than spending more time with creative and inefficient workarounds.
Examples:
. For a large map with many events dust effects when walking, and then for parts of the map to change where there would be no dust effect any longer. Unless there is a way to change the Region of a map in-game, which I do not know how, my only solution was to create a copy of the map and create a fadeout as to not make the map transition obvious. Then I’d have to make sure that any events with SELF SWITCH would be changed to be done with normal switches. It’s troublesome, but it was worked around
. If the player can change from ghost to human at any time in map, and I don’t want footstep SE for ghost only…
I could not find a solution to this
( there have been others but these are the two I could think of)
I appreciate that this is released for free to everyone, but I think that if enough people have installed this, some may have also wasted time figuring out if they have done something wrong for this feature not to work, or could have saved time from having the region effects be able to be turned off. At the bare minimum, the “$game_player.region_effects = false” should be removed if it doesn’t work at all as to not misguide people. I will paypal 10USD if you’d like for the trouble, although I understand if you’d just rather remove the “$game_player.region_effects = false” from the script that hasn’t been implemented
Ah, you are right – I seem to have left that there by mistake when I implemented it as a switch instead. If you specify the switch number you want to use to disable the region effects in the setting:
REGION_EFFECT_SWITCH = 1 # Turn this switch ON to disable the effects.
Then when you turn that switch ON, it will disable the effects.
Thanks for letting me know about this, I will remove the old code that doesn’t do anything.