08-03-2023, 10:16 AM (This post was last modified: 10-28-2024, 11:05 PM by kyonides.)
OtherLayers XP
by Kyonides
Introduction
This script allows you to use a static picture or a series of pictures as a custom upper layer for the current map.
I am sure there gotta be other scripts that provide similar features and you know what?
I don't care about that!
Embedded Notes
First of all, RMXP has no Map Note Box so you must use the Map's Name as a substitute.
Code:
# This script lets you add another layer where you can place images that can
# be either static or animated.
# Create a directory called Layers inside the Graphics folder.
# Thereafter you can add as many images as deemed necessary.
# Examples: fall_1.png, fall_2.png, fall_3.png
# The state of a specific Game Switch will determine whether or not a given
# layer is visible at that moment.
# - Set a Map's Total Number of Upper Layers
# - Pattern: <LUMn> - Example: <LUM2>
# - Predefine an Upper Layer
# - It must follow one of these patterns:
# The n's there stand for LayerID, No. Pictures, Frames and SwitchID (if any)
# <LUn filename n n>
# <LUn filename n n Sn>
# - Examples Using the fall_ image files:
# <LU1 fall 3 20>
# <LU2 fall 3 20 S10>
Optional Script Calls
Code:
# - Change the Map's Upper Layer - It will replace any previous one!
upper_layer(Number).name = "BaseFileName"
# - Change the Upper Layer's Number of Pictures - if Animated
upper_layer(Number).total = TotalPictures
# - Change the Upper Layer's Timer (in Frames)
upper_layer(Number).timer = Frames
# - Change the Upper Layer's Switch ID
upper_layer(Number).switch_id = SwitchID
# - Change the Upper Layer's Data With a Single Call
upper_layer(Number).set_data(TotalPictures, Frames, SwitchID)
# - Freeze or Thaw the Upper Layer
# upper_layer(Number).freeze!
# upper_layer(Number).thaw!
# - Check whether or not the Upper Layer is Frozen
# upper_layer(Number).frozen?
Starting today, you can add several upper layers to a specific map!
The initial release only let you add a single upper layer but this has changed in the latest installment of my script.
Set a Map's Total Number of Upper Layers
Pattern: <layers n>
Code:
<layers 2>
I have updated the previous posts accordingly.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
08-09-2023, 05:42 AM (This post was last modified: 08-17-2023, 12:12 AM by kyonides.)
Changes and Improvements Now Available!
In the latest edition of my script I have modified the way the map spriteset would look for any given layer note to make sure it would not skip any layer at all.
Now it's also possible to freeze and thaw the only waterfall that has ever existed in the demo!
Freeze or Thaw the Upper Layer
Code:
upper_layer(1).freeze!
upper_layer(1).thaw!
Check whether or not the Upper Layer is Frozen
Code:
upper_layer(1).frozen?
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
Important Bug Fix: I forgot to update an internal call to a method after a name change. I simply replaced it with the actual contents of that method for simplicity's sake.
I'm sorry for the small inconvenience this might have caused your virtual pet actors to endure during the playtesting of the demo.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
11-17-2023, 02:37 AM (This post was last modified: 11-17-2023, 02:39 AM by kyonides.)
Interesting Update
Valid for All RGSS-based Engines!
Now that version 0.7.0 has been released, you can also count on lower layers to further modify the appearance of your maps. This is why you can now use the lower_layer(SomeNumber) call in the script box at any given time. Just make sure you have read the embedded instructions on how to configure them.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.