Introduction
This script is an addon for the my CTB, ATB, or RTAB script. It improves the Built-In Version of Action Timer and allows actions to be interrupted when Attacked. (Note you need the most recent version of either CTB ATB or RTAB for this script to function correctly). You may use this script with the DBS as well. This script also includes an action bar (optional) which counts down to an action.
Instructions
The scripts you need to copy are Setup, Timer Base Addons, Action Timer Addon, the last one Action Wait Bar Addon is optional
These scripts go below my CTB, ATB, or RTAB Battle System or above main if you are using the DBS just add above main.
Note if you are using the DBS set this
Code:
Effect = 2
to -1 or anything other than 0-2 or else you will get an error
The Instructions are given in the Setup script and all options are configurable there
FAQ Note:Permission granted by Trickster to post:
Quote:And if you post what you have now of my stuff then you don't have the latest versions. I'm too lazy/busy to post stuff.
As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.
Compatibility
SDK 2.x compliant
Action Wait Bars requires Timer Battle System Base (comes with the latest version of CTB ATB or RTAB)
Credits and Thanks
Myself for testing.
Author's Notes
By RTAB here I do not mean Cogwheels RTAB.
Terms and Conditions
Hey, I posted this publicly. You can use it. What do you expect? But if you do use it, I do expect you to spell my name correctly in your game. And yes you can use it in commercial games too.
Introduction
This script Displays a message whenever an action is performed, you can define a message for each battler for attacks (w/wo weapon), skills, items, defends, escapes, waiting, and other actions. Also supports individual messages for skills and items.
Screenshots
Type some text, put it in a window, display it and what do you have. The Screenshot ^_^
Script
The families don't like messages. It said NO SCRIPT FOR THE FAMILIES.
Instructions
See the Setup Script
FAQ Note:Permission granted by Trickster to post:
Quote:And if you post what you have now of my stuff then you don't have the latest versions. I'm too lazy/busy to post stuff.
As this is his material, it is deletable upon his request. Due to his current absense, no support is available. Please do not PM or eMail him for support.
Compatability
Requires SDK Part I
Requires MACL Libraries -> Action Test*, Array.list*, and Actor and Party Info
* Updated Version can be found in the demo
Credits and Thanks
Twilight for the idea
Twilight and Raven for pestering me about individual messages for skills and items
Raven for catching an error
Author's Notes
Scripted in less than two hours :p
Terms and Conditions
Hey, I posted this publicly. You can use it. What do you expect? But if you do use it, I do expect you to spell my name correctly in your game. And yes you can use it in commercial games too.
EDIT 02/05/07 : new version
EDIT 03/05/07 :"$game_system.reset" corrected
EDIT 05/05/07 : English version (variables with English names, and a few comments). Old versions removed.
EDIT 06/05/07 : ZTBS compatibility script updated for Mac's version. Removed bug with autotiles in Mode7 script.
EDIT 07/05/07 : Bug with vertical tiles removed.
EDIT 21/05/07 : Flat-drawn events support, and some other small features.
Introduction This new mode7 script is written from an old french script I created, and it is far different from Mewsterus's Mode07 script.
Features
flat maps (not curved)
high resolution (each screen line is independent)
map looping (x or/and y)
animated autotiles
(new version) Tiles with fixed terrain_tag not drawn flat with the map
You must add to the map's name :
- [M7] : to activate Mode7
- [#XX] : XX is the slant angle (in degree). Default value is 0 (it looks like normal maps)
- [Y] : Y-map looping
- [X] : X-map looping. This option needs resources (lower fps).
- [A] : animated autotiles (with 4 patterns). This option increases significantly the loading time, so it may crash for large maps (SystemStackError)
- [C] : to center the map on the hero (even for small maps)
- [P] : to have a fixed panorama
- [H] : to have a white horizon (screenshot's horizon)
- [OV] : Overworld Sprite Resize (a Mewsterus's script feature)
Or :
Prepare your own settings for mode7 maps (script : l.48).
Add for example
and just add in the map's name "Worldmap" to have these settings applied.
New version
The map is drawn from all the tiles of the three layers that do not have a terrain_tag's value of 1 or 2.
The other tiles (terrain_tag = 1 or 2) form elements that are drawn vertically, like the 3rd-layer elements in the old version.
The two values used by my script (1 and 2) can be modified line 6 ($num_terrains = [1,2]).
There are two values so that we can create two distinct vertical elements in contact in one layer.
Example :
With these terrain_tags :
screenshot
The three layers:
screenshot
screenshot
screenshot
We obtain :
screenshot
Other commands (for events) (EDIT : modified for the English version) :
Code:
$scene.spriteset.tilemap.mode7_set (new_angle)
To redraw the map with the new_angle
Code:
$scene.spriteset.tilemap.mode7_set_p(new_angle)
To redraw progressively the map from the current angle to the new
Code:
$scene.spriteset.tilemap.mode7_redraw
To redraw the map (useful with the following commands)
Code:
$game_system.opacite = value
To define the opacity for Mode7 maps (it needs to redraw)
To define a gradual tone for Mode7 maps (it needs to redraw, and it doesn't work with horizontal looping)
Code:
$game_system.map_gradual_opacity = value
To define a gradual opacity for Mode7 maps (it needs to redraw, and it also bugs with horizontal looping)
- To obtain flat events :
just add a comment in the event's commands list with : "Flat"
Moving flat events are supported, but it will take resources.
- To handle the height of a vertical event :
add a comment in the event's commands list with : "Heigth X", where X is the height value ("Heigth 2" will draw the event 64 pixels above its original position - you can use floats)
Compatibility
This script redefines a lot of classes, so it is probably not compliant with most of other scripts
English version : ZTBS compatibility
The compatibility is not perfect, but it doesn't crash.
EDIT 21/05/07 : the sprites used for ranges and areas are flat-drawn
Mode7 script must be above ZTBS, and this script below :
- ...
- Scene_Debug
- SDK
- Mode7
- ZTBS scripts
- Macs addons
- This script
- Main
compatibility script
Code:
#============================================================================
# This script gives a compatibility between the "New Mode7 Script" (MGCaladtogel)
# and the "Zenith Tactical Battle System" (Mac's version)
# Written by MGCaladtogel, for English version of mode7 (21/05/07)
# Mode7 script must be above ZTBS, and this script below :
# - ...
# - Scene_Debug
# - SDK
# - Mode7
# - ZTBS scripts
# - Macs Addons
# - This script
# - Main
#============================================================================
class Game_Map
#--------------------------------------------------------------------------
# ? TBS Setup
#--------------------------------------------------------------------------
def setup(map_id)
# Set Up Map ID
ztbs_setup(map_id)
# Load map info data from Data Folder
$data_mapinfos = load_data("Data/MapInfos.rxdata") if $data_mapinfos.nil?
map_name = $data_mapinfos[@map_id].name2
# Get tactic map end ID
@tactics_end_map = get_tactics_end_map(@map_id)
# If tactical battle map must include [T]
$game_system.in_tactics = map_name.include?("[T]")
end
end
class Sprite_Character < RPG::Sprite
def update
if $game_system.in_tactics
if @flat_indicator and $game_system.mode7
if (!@character.flat or @character.moving? or
@tile_id != @character.tile_id or
@character_name != @character.character_name or
@character_hue != @character.character_hue)
@flat_indicator = @character.flat
# redraw the original ground
maps_list = $scene.spriteset.tilemap.maps_list
map_ground = $scene.spriteset.tilemap.map_ground
rect = Rect.new(@flat_x_map, @flat_y_map, @flat_width, @flat_height)
for map in maps_list
map.blt(@flat_x_map, @flat_y_map, map_ground, rect)
if $game_system.loop_x and @flat_x_map.between?(0, 19 * 32)
map.blt(@flat_x_map + 32 * $game_map.width, @flat_y_map, map_ground,
rect)
end
end
else
return
end
end
super
# Changes old tile id, characer name or character hue to new
if @tile_id != @character.tile_id or
@character_name != @character.character_name or
@character_hue != @character.character_hue
# Changes old tile id, characer name and character hue to new
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_hue = @character.character_hue
# If tile id is bigger than orequal to 384 create tile ID and Character Hue
if @tile_id >= 384
self.bitmap = RPG::Cache.tile($game_map.tileset_name,
@tile_id, @character.character_hue)
self.src_rect.set(0, 0, 32, 32)
self.ox = 16
self.oy = 32
# Or in else cases create character
else
self.bitmap = RPG::Cache.character(@character.character_name,
@character.character_hue)
@cw = bitmap.width / 4
@ch = bitmap.height / 4
self.ox = @cw / 2
self.oy = @ch
self.oy -= 4 if $game_system.mode7
end
end
# Visible when character in not transparent
self.visible = (not @character.transparent)
# Is tile ID is equal to 0
if @tile_id == 0
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
end
if $game_system.mode7 and @character.flat # event must be flat drawn
return if $scene.spriteset == nil
if @tile_id == 0
@flat_x_map = @character.real_x / 4 - (@cw - 32) / 2
@flat_y_map = @character.real_y / 4 - @ch + 32
@flat_x0 = sx
@flat_y0 = sy
@flat_width = @cw
@flat_height = @ch
else
@flat_x_map = @character.real_x / 4
@flat_y_map = @character.real_y / 4
@flat_x0 = 0
@flat_y0 = 0
@flat_width = 32
@flat_height = 32
end
# modify the maps graphics
maps_list = $scene.spriteset.tilemap.maps_list
rect = Rect.new(@flat_x0, @flat_y0, @flat_width, @flat_height)
for map in maps_list
map.blt(@flat_x_map, @flat_y_map, bitmap, rect, @character.opacity)
if $game_system.loop_x and @flat_x_map.between?(0, 19 * 32)
map.blt(@flat_x_map + 32 * $game_map.width, @flat_y_map, bitmap, rect,
@character.opacity)
end
end
@flat_indicator = true
self.opacity = 0
return
end
# Define x, y and z character screen
x_intermediate = @character.screen_x
y_intermediate = @character.screen_y
y_intermediate -= $game_temp.pivot + 4 if $game_system.mode7
if $game_system.loop_y
h = 32 * $game_map.height
y_intermediate = (y_intermediate + h / 2) % h - h / 2
end
if $game_system.mode7
self.y = (($game_temp.distance_h * y_intermediate *
$game_temp.cos_angle).to_f / ($game_temp.distance_h - y_intermediate *
$game_temp.sin_angle) + $game_temp.pivot)
self.zoom_x = $game_temp.slope_value * y + $game_temp.corrective_value
self.zoom_y = zoom_x
self.x = 320 + zoom_x * (x_intermediate - 320)
if $game_system.loop_x
offset = ($game_map.width >= 24 ? 64 * zoom_x : 0)
l = 32 * $game_map.width * zoom_x
self.x = (x + offset) % l - offset
end
else
self.zoom_x = 1.0
self.zoom_y = 1.0
self.x = x_intermediate
self.y = y_intermediate
end
self.z = @character.screen_z(@ch)
# If set opacity is equal to 0 the character is defined as invisible
if self.opacity == 0
@character.invisible = true
end
unless @character.effect
if @character.acted
self.opacity = (self.y < $game_temp.height_limit ? 0 :
@character.opacity - 100)
elsif @character.invisible
self.opacity = 0
else
self.opacity = (self.y < $game_temp.height_limit ? 0 :
@character.opacity)
end
self.y -= 32 * @character.height * zoom_y # height correction
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
end
@character.effect = effect?
if @character.is_a?(Game_Player)
return
end
# Loops state animation for character inflicited
if @character.damage == nil and
@character.state_animation_id != @state_animation_id and
($game_system.tactics_step < 6 or $game_system.tactics_step > 9) and
ZTBS::STATE_ANIMATION
@state_animation_id = @character.state_animation_id
loop_animation($data_animations[@state_animation_id])
end
# When character animation ID is 0 use default hit animation
if @character.animation_id != 0
animation = $data_animations[@character.animation_id]
animation(animation, @character.animation_hit)
@character.animation_id = 0
end
# When characters turn the characters opacity returns to normal
if @character.appear and
($game_system.tactics_step < 6 or $game_system.tactics_step > 8)
@character.refresh
@character.invisible = false
self.opacity = @character.opacity
appear
@character.appear = false
end
# If character blink is on defined to character if not blink is off
if @character.blink
blink_on
else
blink_off
end
# Character white flash cannot happen if already whitened
if @character.white_flash
whiten
@character.white_flash = false
end
# Display character damage as normal if not critcial
if @character.damage_pop
damage(@character.damage, @character.critical)
@character.damage = nil
@character.critical = false
@character.damage_pop = false
end
# If character dies play actor die sound effect
# If enemy dies play enemy die sound effect
if @character.damage == nil and @character.collapse > 0
case @character.collapse
when 1
$game_system.se_play($data_system.actor_collapse_se)
when 2
$game_system.se_play($data_system.enemy_collapse_se)
end
collapse
@character.collapse = 0
@character.effect = true
end
else
# TBS Update
ztbs_update
end
end
end
Posted by: PK8 - 02-28-2008, 11:31 AM - Forum: Scripts Database
- No Replies
I decided to take a small break from my project and work on a small script.
Autoswitcher by Punkid89
Introduction
After years of creating event systems, one thing I had grown tired of was having to make a map event activate some switch just to start a couple of my common events. No more having to activate the switch via some random map! *celebrates*
This script allows the game creator to activate the switches they want to activate AND alter the values of the variables they want altered.
Features
Easy to use.
Activates switches you want activated.
Alters variables you want altered.
Activates and alters BEFORE your game starts
You no longer have to rely on an event in a particular map to activate a few switches and change the variables.
Screenshots
No demo needed. Instructions are easy to follow, the script is easy to use.
Script First, go to Scene_Title. Find:
Code:
$scene = Scene_Map.new
and replace it with
Code:
$scene = Scene_Autoswitcher.new
Next, create a new script above main and name it "Scene_Autoswitcher" then copy the script below.
Code:
#------------------------------------------------------------------------------
# AutoSwitcher by Punkid89.
# This script automatically activates the switches you want it to activate and
# alters the value of the variables you want altered before the game starts.
# Possibly a useful tool for eventers.
#------------------------------------------------------------------------------
class Scene_Autoswitcher
def main
#--------------------------------------------------------------------------
# activating the switches you want activated.
# $game_switches[id] <- ID being the switch ID.
$game_switches[1] = true
# Insert more "$game_switches[id] = true below...
#--------------------------------------------------------------------------
# Alters values of the variable IDs you want altered.
# $game_variables[id] = value <-- ID: Variable ID, Value: Variable integer.
$game_variables[1] = 20
# Insert more "$game_variables[id] = value below...
#--------------------------------------------------------------------------
# Now it redirects to Scene_Map. Have fun!
$scene = Scene_Map.new
end
end
Instructions
"Wait a sec, what are those!?" Don't worry, let's take a look at a couple of things you may not be so sure of.
$game_switches
First, $game_switches.
ID: Switch ID. Boolean: true or false (True: ON, False: OFF)
$game_variables
ID: Switch ID. Value: A number, any kind of number for your variable.
Activating more switches...
To activate more switches, look for this:
Code:
# Insert more "$game_switches[id] = true below...
Below that line, add a switch you want to activate. (Please refer to $game_switches section.)
Changing more than one variable...
To change more variables, look for this:
Code:
# Insert more "$game_variables[id] = value below...
Below that line, add a variable you want to alter. (Please refer to the $game_variables section.)
FAQs
Awaiting question...
Compatibility
Definitely not SDK compatible.
Author's Notes
I created this because I was tired of having to activate a common event by making an event on a particular map which activates a certain switch just to start a common event.
SephirothSpawn did suggest a few things when I submitted this onto his forums.