Jump to content


Photo

Region Effects


  • Please log in to reply
61 replies to this topic

#1 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 15 September 2012 - 03:42 PM

Region Effects - Version 1.7
By Galv

Introduction
I created this script for myself as a "learning ruby" project. It was designed to activate effects when the player stands on designated regions so there's no need to spam events across the ground to do things.


Features
Specify effects you want to happen on designated region tiles.
Region effects can include:
-- A sound effect (automatically varies volume and pitch so not to be repetitive)
-- An event that appears at the player's location (for example, footprints. These events are stored on a designated map)
-- Activating a common event
I figure with access to these three things (and some eventing knowledge), you can create a region effect that does nearly anything you want so you don't have to spam events everywhere.

Included in the demo are some basic pre-made effects as examples - footprints, water splashes, fire trap, dust trail, bushes rustling, footstep sounds on different surfaces.


Screenshot
A screenshot of just a few of the pre-made effects in the demo:
region-effects.jpg


How to Use
Place script under Materials and above Main.
See top of the script for instructions and settings.

To transfer pre-made effects to your game:
1. Copy image from /Graphics/Characters/!Other-specials.png to your project (into same folder)
2. Copy the "EFFECTS TO SPAWN" map from this demo into your game. (Ctrl+C on the map and Ctrl+V into your game maps is quickest)
-- this map has events set up for the pre-made effects
3. Check the map ID of the copied map as it appears 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.
7. Make sure you start a new game. It will not work loading a pre-script save file.


Script
Get it here


FAQ
None yet.


Credit and Thanks
- Galv
- Yanfly and Quack for the method to spawn an event


Author's Notes


Updates
2012-11-15 Version 1.7 - made the effects work during forced move routes
2012-11-15 Version 1.6 - fixed a major bug that caused events to disappear
2012-11-04 Version 1.5 - bug fix and efficiency updates suggested by Quack
2012-10-24 Version 1.4 - updating alias naming to be compatible with my own scripts... heh.
2012-10-19 Version 1.3 - re-wrote some of the code make it more effecient when using large amounts of effects.
2012-10-09 Version 1.2 - fixed up some dumb code that should reduce lag on low-end pc's
2012-09-16 Version 1.1 - now works with Yanfly's spawn event script

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#2 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,240 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 15 September 2012 - 03:50 PM

Footsteps in the snow and shallow water. Small things that makes your game much more realistic.

Edited by Tsukihime, 15 September 2012 - 03:50 PM.

My Scripts. Go here for Bugs and Requests.

himeworks011.png

Like on Facebook: HimeWorks
Follow on Twitter: @HimeWorks

#3 Falcao

Falcao

    Advanced Member

  • Ace Member
  • 336 posts
  • RM Skill - Musician

Posted 15 September 2012 - 04:01 PM

The effects looks very nice

I asked myself how did add those effect sprites (cuz in the script there is not sprite class defined) then i noticed that you spawn events from another maps, very good idea

Edited by Falcao, 15 September 2012 - 04:02 PM.

For my latest scripts updates go to

http://falcaorgss.wordpress.com/

You will find a lot of interesting things!

#4 HotfireLegend

HotfireLegend

    Advanced Member

  • Ace Member
  • 395 posts
  • RM Skill - Writer

Posted 15 September 2012 - 06:27 PM

A very nice script, and easy to edit too. However, I tested it by walking over dust and got this:

Posted Image

I'm sure I followed all the steps correctly, so what could be happening?

EDIT: Upon re-reading the scripts, it's based on regions. These regions are not tied to the tile itself, but rather, the regions in the region editor. Could this be occuring because I have 9 regions on my world map and am (testing) with region 5 on another map? Currently, the regions are there for determining the location of monster encounters... If this is not the case, then can you enlighten me? Thanks.

Edited by HotfireLegend, 15 September 2012 - 06:39 PM.


#5 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 15 September 2012 - 06:39 PM

I see, thanks for telling me.
I'll add a step. You need to start a new game. I am guessing you loaded a save file?

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#6 HotfireLegend

HotfireLegend

    Advanced Member

  • Ace Member
  • 395 posts
  • RM Skill - Writer

Posted 15 September 2012 - 06:40 PM

I see, thanks for telling me.
I'll add a step. You need to start a new game. I am guessing you loaded a save file?


Yes, I loaded. Good catch. Let me go try a new game.

EDIT: Works beautifully now. Kudos!

Edited by HotfireLegend, 15 September 2012 - 06:40 PM.


#7 Kegasaur

Kegasaur

    Newbie

  • Ace Member
  • 4 posts

Posted 18 September 2012 - 01:30 AM

I believe I have followed the steps properly but this error message comes up when i try to launch the game
I have started a new game also
Line 92 : class Game_Player < Game_Character
I hope you can help

Attached Files



#8 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 18 September 2012 - 01:47 AM

I haven't seen this one before. I'm not sure how it could happen on new game or launching a game.
Double check that you copied the entire script.

If you can upload your project somewhere I will happily check if you've done it correctly.

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#9 Kegasaur

Kegasaur

    Newbie

  • Ace Member
  • 4 posts

Posted 18 September 2012 - 02:46 AM

I'm quite sure I copied the entire script, just to be safe i tried again on a new project but the same error occurs
Here is a link to the .exe of the project
http://www.mediafire...cxxacijq4hamux5
I hope you can help

#10 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 18 September 2012 - 03:14 AM

I see what you've done - you have pasted the script at the top of them all. You need to paste it below the "Materials" heading and above the "Main" heading.
That's where all scripts you try will go.

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#11 Kegasaur

Kegasaur

    Newbie

  • Ace Member
  • 4 posts

Posted 18 September 2012 - 03:47 AM

Thank you, i guess I'm shit at reading, i just found where it says to put it in materials :P
It launches now so thanks again.
I noticed that the water you used can be walked through but not on mine,I was wondering how you change that

Edited by Kegasaur, 18 September 2012 - 03:50 AM.


#12 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 18 September 2012 - 03:58 AM

You can change the passability in the tileset.
Go to the database and the Tilesets" tab to find that :)

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#13 Kegasaur

Kegasaur

    Newbie

  • Ace Member
  • 4 posts

Posted 18 September 2012 - 04:39 AM

Thanks man, Iv'e been using RPG maker for a while but only just got into RPG maker Ace :D
You've been a great help

#14 Caveras

Caveras

    Advanced Member

  • Ace Member
  • 558 posts
  • RM Skill - Designer

Posted 18 September 2012 - 09:22 AM

Ah, I'm never going to finish my project when people like you post fine stuff like this every other day! ... but I was really looking for something like that, and it's pretty sweet! Nice & thanks!

Hello there!

Here are some of my icon resources ยป http://www.rpgmakerv...apons-and-more/

Posted a new set on 16 June!


#15 Snake

Snake

    Advanced Member

  • Ace Member
  • 79 posts
  • LocationGermany
  • RM Skill - Jack of All Trades

Posted 18 September 2012 - 10:04 AM

Thats a very nice script! :)
Kudos to you.

#16 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 09 October 2012 - 06:46 AM

Just an FYI - Updated to v.1.2.
I found that low-end PC's lagged a bit while event effects were happening. A small change to the code reduces that significantly.
At least... my old dodgy test laptop likes areas using this in Pirate Rush a whole lot better now haha.

EDIT: And another efficiency update to v.1.3 to run better when using large amounts of effects.
EDIT: 1.4... heh.

Edited by Galv, 23 October 2012 - 08:01 PM.

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#17 Jinjo

Jinjo

    Member

  • Ace Member
  • 29 posts
  • RM Skill - Musician

Posted 02 November 2012 - 05:56 AM

It's great, but I'd only use it if there were an option to use BGS instead of SEs...that'd be a good feature.

#18 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 4,934 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 02 November 2012 - 07:00 AM

What are you wanting to do that requires changing BGS with every step?

Those who toy with pure hearts
will someday be tried by pure hearts!

xwGfmy9.png


Spoiler

#19 Jinjo

Jinjo

    Member

  • Ace Member
  • 29 posts
  • RM Skill - Musician

Posted 02 November 2012 - 08:10 AM

Well, here's what I mean. (Forget using BGS, I have a better idea.)

There are X different SEs for each region, instead of just 1 as in your script at the moment. With each step the character takes, it randomly plays one of the X SEs. This would vary the sound of the footstep, making it far more realistic + enjoyable.

Edited by Jinjo, 02 November 2012 - 08:19 AM.


#20 Quack

Quack

    Advanced Member

  • Ace Member
  • 81 posts

Posted 02 November 2012 - 03:44 PM

Nice script, love it.

However, the way you choose ids for the events you spawn make it kind of incompatible with Spawn Event script.
Also, using Yanflys method of loading the data for a whole map everytime you spawn an event just sounds very inefficient to me.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users