02-25-2015, 08:34 PM (This post was last modified: 09-03-2024, 01:20 AM by DerVVulfman.)
ELSA (Event Layering Script Advance Version:1.3
(formerly Events Always Under)
Introduction
Layered Events!! This script, originally titled 'Events Always Under' allowed for the ability to have events actually break through the floor, sitting above the panorama layer, but below the Tiles, still using the Tiles passability. As the new Event Layer Script Advanced (ELSA), we have increased the z-index to nine total flattened positions, allowing for more mapping options for RPG Maker XP and VX
Three Events can go UNDER the tiles. Now, you'll probably never need more than that, but this allows you to have large event floor tiles, smaller accents on top of them, and then maybe even smaller accents on the accents! Or use the layers for water effects, lava effects and more, as the events can be animated!
Next, Use Mid-layer events to add embelishments on the floor, that stay under the player but above tiles with priority level 0. You get three so, you can add
a nice rug or something, add some overlapping stool, and a pair of boots on that stool, all without having to render a parallax map.
Next for my own personal benefit, I created the Variations of Always Over Events because for me personally, if I'm creating rooftops for houses, I want to be able to customize them without locking myself into a specific tile layer and priority set. Make a Huge Windmill, and then use another event layer to add the moving arms. Put a tower that stands over the city, with a seperate layer for the flag or banners that drape from it, (animated or not). The possibilities!!! Now you can have the pre-rendered or hand-drawn map you want, without the massive parallax images needed for maps with any large size.
Features
Add the feature to either the Event Name or a Event Comment
Events can still be bound by map tileset passability even while underneath the map!
Attressors that will not conflict with other event attressors
[code ]
# ,--,
# ,---.'|
# ,---,.| | : .--.--. ,---,
# ,' .' |: : | / / '. ' .' \
# ,---.' || ' : | : /`. / / ; '.
# | | .'; ; ' ; | |--` : : \
# : : |-,' | |_| : ;_ : | /\ \
# : | ;/|| | :.'\ \ `. | : ' ;. :
# | : .'' : ;`----. \| | ;/ \ \
# | | |-,| | ./ __ \ \ |' : | \ \ ,'
# ' : ;/|; : ; / /`--' /| | ' '--'
# | | \| ,/ '--'. / | : :
# | : .''---' `--'---' | | ,'
# | | ,' `--''
# `----'
#
#==============================================================================
# ** Event Layer Script Advanced (ELSA)
#------------------------------------------------------------------------------
# by DerVVulfman and Jay Ray
# version 1.3
# 02-24-2015
# RGSS & RGSS2 / RPGMaker XP & RPGMaker VX
#==============================================================================
#
# INTRODUCTION:
#
# More Event Layers. This script, originally titled 'Events Always Under' allowed
# for the ability to have events actually break through the floor, sitting above
# the panorama layer, but below the Tiles, still using the Tiles passability.
# As the new Event Layer Script Advanced (ELSA), we have increased the z-index to
# nine total flattened positions, allowing for more mapping options for RPG Maker
# XP and VX
#
# Three Events can go UNDEr the tiles. Now, you'll probably never need more
# than that, but this allows you to have large event floor tiles, smaller accents
# on top of them, and then maybe even smaller accents on the accents! Or use the
# layers for water effects, lava effects and more, as the events can be animated!
#
# Next, Use Mid-layer events to add embelishments on the floor, that stay under
# the player but above tiles with priority level 0. You get three so, you can add
# a nice rug or something, add some overlapping stool, and a pair of boots on that
# stool, all without having to render a parallax map
#
# Next for my own personal benefit, I created the Variations of Always Over Events
# because for me personally, if I'm creating rooftops for houses, I want to be able
# to customize them without locking myself into a specific tile layer and priority set.
# Make a Huge Windmill, and then use another event layer to add the moving arms. Put
# a tower that stands over the city, with a sperate layer for the flag or banners
# that drape from it, (animated or not). The possibilities!!! Now you can have the
# pre-rendered or hand-drawn map you want, without the massive parallax images needed
# for maps with any large size.
#
#
#
# With ELSA and this can increase your layers from the seven possible before
# (Panorama, Tile Layers (3), Event Layer, Above Event Layer, Fog)
# to a total of FIFTEEN layers
# (Panorama, Unders (3), Tile Layers (3), Mids (3), Aboves(4), and Fog)
#
#
#
#
# ------------------------------------------------------------------------------
#
# USAGE:
#
# Simply put, add one of the Event Words (Given below) to your event's name
# (EX: EV003 Under 1), or create a comment in your event's list of commands
# and have that comment be one of the words given below (again, without quotes). This
# will flag the event as an 'Always Under' or a 'Stacked Layers' or an 'Above All' event
# and place it in one of now ten layers.
#
# On personal preference, I would recommend using it within a comment as the
# event can have the 'Always Under' flag turned on/off if the event erased,
# gone from one event page to another, or the like.
#
# Event Comments and Effects
# Comment: Under 1 - Puts event below tiles (z-depth: -3)
# Comment: Under 2 - Puts event below tiles (z-depth: -2)
# Comment: Under 3 - Puts event below tiles (z-depth: -1)
# Comment: Mid 1 - Puts event above layer1 tiles (z-depth: 1)
# Comment: Mid 2 - Puts event above layer1 tiles (z-depth: 2)
# Comment: Mid 3 - Puts event above layer1 tiles (z-depth: 3)
# Comment: Over 1 - Puts event above all other events (z-depth: 985)
# Comment: Over 2 - Puts event above all other events (z-depth: 990)
# Comment: Over 3 - Puts event above all other events (z-depth: 995)
#
# Remember that the 'Always On Top' Flag can be clicked without a comment to
# make even another layer!
#==============================================================================
#
# NOTE:
#
# While one can apply a characterset graphic to an event, the 'through' flag
# in an event will not let the player step upon any such tile. So if it is
# the intention of the game/map designer for the player to walk upon such
# tiles, only use graphics from the tileset for these events. Additionally,
# setting the 'through' flag on may actively hamper movement and disable the
# passages flags. Remember that this is mainly meant as a cosmetic change.
#
#==============================================================================
#
# TERMS AND CONDITIONS:
#
# Free for use, even in commercial games. This script was originally created
# as 'Events Always Under' by DerVVulfman. I went through and buffed it up for
# more layers, other Event functions, so credit goes to DerVVulfman and JayRay
#
# (Doesn't HAVE to be in that order, just saying...)
#
# COMPATIBILITY ISSUES: THis script SHOULD work with other event changing scripts
# as long as those scripts do not change
#==============================================================================
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
# This class handles the map. It includes scrolling and passable determining
# functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias eventadvanced_setup setup
#--------------------------------------------------------------------------
# * Setup
# map_id : map ID
#--------------------------------------------------------------------------
def setup(map_id)
eventadvanced_setup(map_id)
for e in @events.values
next if e.nil?
e.eventadvanced1 = true if e.name =~ "Under 1"
e.eventadvanced2 = true if e.name =~ "Under 2"
e.eventadvanced3 = true if e.name =~ "Under 3"
e.eventadvanced4 = true if e.name =~ "Mid 1"
e.eventadvanced5 = true if e.name =~ "Mid 2"
e.eventadvanced6 = true if e.name =~ "Mid 3"
e.eventadvanced7 = true if e.name =~ "Over 1"
e.eventadvanced8 = true if e.name =~ "Over 2"
e.eventadvanced9 = true if e.name =~ "Over 3"
image_flag = false
if RUBY_VERSION.slice(0,3) == "1.6"
image_flag = true if e.character_name != ""
else
image_flag = true if e.character_name != "" or e.tile_id != 0
end
unless image_flag == false or e.list.nil?
for i in 0...e.list.size
next if e.list[i].code != 108
e.eventadvanced1 = true if e.list[i].parameters[0] =~ "Under 1"
e.eventadvanced2 = true if e.list[i].parameters[0] =~ "Under 2"
e.eventadvanced3 = true if e.list[i].parameters[0] =~ "Under 3"
e.eventadvanced4 = true if e.list[i].parameters[0] =~ "Mid 1"
e.eventadvanced5 = true if e.list[i].parameters[0] =~ "Mid 2"
e.eventadvanced6 = true if e.list[i].parameters[0] =~ "Mid 3"
e.eventadvanced7 = true if e.list[i].parameters[0] =~ "Over 1"
e.eventadvanced8 = true if e.list[i].parameters[0] =~ "Over 2"
e.eventadvanced9 = true if e.list[i].parameters[0] =~ "Over 3"
end
end
end
end
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
# This class deals with characters. It's used as a superclass for the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :eventadvanced1 # Event Advanced UnderLayer 1
attr_accessor :eventadvanced2 # Event Advanced UnderLayer 2
attr_accessor :eventadvanced3 # Event Advanced UnderLayer 3
attr_accessor :eventadvanced4 # Event Advanced MiddleLayer 1
attr_accessor :eventadvanced5 # Event Advanced MiddleLayer 2
attr_accessor :eventadvanced6 # Event Advanced MiddleLayer 3
attr_accessor :eventadvanced7 # Event Advanced OverLayer 1
attr_accessor :eventadvanced8 # Event Advanced OverLayer 2
attr_accessor :eventadvanced9 # Event Advanced OverLayer 3
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias eventadvanced_initialize initialize
alias eventadvanced_screen_z screen_z
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
eventadvanced_initialize
@eventadvanced1 = false
@eventadvanced2 = false
@eventadvanced3 = false
@eventadvanced4 = false
@eventadvanced5 = false
@eventadvanced6 = false
@eventadvanced7 = false
@eventadvanced8 = false
@eventadvanced9 = false
end
#--------------------------------------------------------------------------
# * Get Screen Z-Coordinates
# height : character height
#--------------------------------------------------------------------------
def screen_z(height = 0)
return -4 if @eventadvanced1
return -3 if @eventadvanced2
return -2 if @eventadvanced3
return 1 if @eventadvanced4
return 2 if @eventadvanced5
return 3 if @eventadvanced6
return 980 if @eventadvanced7
return 985 if @eventadvanced8
return 990 if @eventadvanced9
if RUBY_VERSION.slice(0,3) == "1.6"
return eventadvanced_screen_z(height)
else
return eventadvanced_screen_z
end
end
end
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
# This class deals with events. It handles functions including event page
# switching via condition determinants, and running parallel process events.
# It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Get Event Name
#--------------------------------------------------------------------------
def name
return @event.name
end
end
[/code ]
Instructions
Quite simply, all you do is just add the script, and on events that you want to either be BELOW the z-index of tiles, above the tiles but under the players, or
over the players but not have the 'always on top flag' you just enter the following commands to either the event name or the comment.
FAQ
This script hasn't been around enough to have FAQ yet, but here we go...
"My event is Through, but I still can't walk across this tileset!"
A. Events are still bound (for now), as one tile by one tile events. Just because you build this big bridge, doesn't mean it's passed civil inspection enough for you to walk across it to the mainland.
Compatibility
Works well with DerVVulfman's Event Transparency, except... don't put trans comments on events that are underneath, unless you're remaking the Michael Jackson Billie Jean video. Otherwise, I'm not sure how this would work with any tile-map rewrites, but it works well vanilla
Credits and Thanks
Big thanks to DerVVulfman, who took my idea and made it into a script.
Author's Notes
I AM working on a variation of Toby Kerner's Event Size script that will allow those events higher than you to have their own passability independant of tilesets, which will allow a lot more mapping possibilities, but that can come in a future version.
Terms and Conditions
Free for Commercial and Non-Commercial Use, but I do ask that you make a donation to one of these fine charities within the next year. I donate to them yearly. it'll make you feel good, and most donations are tax-writeoffs for your upstart indy game company!