Introduction
This script allows you to configure the equipment slots for each actor or class. This script tweaks the Equip menu to show all stats and changes color depending on the change in stats. Also comes ready merged with my Multi-Attack script.
Screenshots
Yeah just look at Arshes but with two swords Oooh. How about two rings wow.
Get Winzip, Ultimatezip, or some other crazy program to open zip files, and install it.
Find the downloaded file
Right Click on the file and select Extract or Open your Unzipping program and Extract the files from the archive
Open RPG Maker XP if you haven't already
Open the Project File
Copy Each Script from the demo or paste them all into one script and add that, I only have it in multiple script form for organization.
Find the Setup Portion of the Multi Equip Script
Get yourself a snack
Setup and Customization
Now I am going to explain this a second time, the code in the setup is already commented once with the instructions, but I'm going to explain it again code by code
The Loading of Data System This Line
Code:
$data_system = load_data("Data/System.rxdata")[/list]
Is one of those "Do Not Touch Lines unless you know what you are doing" lines, but FYI it is used to get the defaults at the end of the setup.
[*][code] #--------------------------------------------------------------------------
# * How Many Weapon Slots Needed (Maximum)
#--------------------------------------------------------------------------
Weapon_Slots = 2
This is the Maximum Number of weapon slots needed, if you don't set this value correctly you will receive an error (probably a NilClass error)
Code:
#--------------------------------------------------------------------------
# * How Many Armor Slots Needed (Maximum)
#--------------------------------------------------------------------------
Armor_Slots = 6
This is the Maximum Number of armor slots needed, if you don't set this value correctly you will receive an error (probably a NilClass error)
Code:
#--------------------------------------------------------------------------
# * Equip Names For Slots for Actors
# syntax - actor_id => [names] or %w( names )
#--------------------------------------------------------------------------
Actor_Names = {
1 => %w( Sword Sword Shield Helm Armor/Plate Ring Ring ),
2 => %w( Spear Shield Helm Armor/Plate Ring ),
7 => ['Mace','Hat','Robe','Ring'],
8 => ['Rod','Hat','Robe','Ring']
}
These are the slot equip names per actor. This is a hash using actor ids as keys and a array of strings as a value. Take the actor ids from the database without leading zeroes, now choose the names of each equip slot now type this (whatever actor id) => %w( name name name name ) or (whatever actor id => ['name', 'name', 'name'] the %w( ) is just a fancy easier way to create an array of strings you don't need the ' ' or " " or commas just use a space to separate elements if you need a space however just type \s
Code:
#--------------------------------------------------------------------------
# * Equip Names For Slots Classes
# syntax - class_id => [names] or %w( names )
#--------------------------------------------------------------------------
Class_Names = {
1 => %w( Sword Sword Shield Helm Armor/Plate Ring Ring ),
2 => %w( Spear Shield Helm Armor/Plate Ring ),
7 => ['Mace','Hat','Robe','Ring'],
8 => ['Rod','Hat','Robe','Ring']
}
See above and subsitute actor_id for class_id and actor with class. I'm not typing all of that again
Code:
#--------------------------------------------------------------------------
# * Equip Types For Slots
# syntax - actor_id = [types]
# note - w = weapon an = armor kind n
#--------------------------------------------------------------------------
Actor_Types = {
}
This is the Equip Types for each slot. It is setup in the same manner as the Actor_Names and Class_Names except this time you are deciding what can be equipped in each slot. This must correspond to the Slot Names defined. Now if you want to equip a weapon in the slot type w if you want a shield type a1 helmets a2 body armor a3 accessories a4 Hidden feature Other an where n is greater than 4 now I remember a script that lets you configure the database further now if you edit the armor's kind to be another value then maybe you make use of this feature.
Code:
#--------------------------------------------------------------------------
# * Equip Types For Slots
# syntax - class_id = [types] or %( types )
# note - w = weapon an = armor kind n
#--------------------------------------------------------------------------
Class_Types = {
1 => %w( w w a1 a2 a3 a4 a4 ),
2 => %w( w a1 a2 a3 a4 ),
7 => ['w', 'a2', 'a3', 'a4'],
8 => ['w', 'a2', 'a3', 'a4']
}
See Actor Types replace actor id with class id and actor with class also reread Actor Names and Class Names on the hash setup
[*][code] #--------------------------------------------------------------------------
# * Initial Equipment
# syntax - actor_id => {slot id => equip id}
#--------------------------------------------------------------------------
Init_Equip = {
1 => {0=>1, 2=>1, 3=>5, 4=>13},
2 => {0=>5, 1=>1, 2=>5, 3=>17},
7 => {0=>25, 1=>9, 2=>21},
8 => {0=>29, 1=>9, 2=>21}
}
Now Let me tell you something important, the database equipment functions fail with this script added to your project, so you will have to redefine your initial equipment here. Again this is a hash with the actor ids as the key, but the inner values are also hashes as well with their key being the slot id (refer to the Names and Slot types Defined), if you do not define a slot then it is assumed that nothing is equipped in it when you start the game.
This is the Fixed Equipment Option, again the database equipment functions fail after you add this script, and here you can define which slots are fixed again a hash (see a connection here?) with the actor ids as keys and with the value being another hash with the slot id (refer to Names and Slot Types)
Now Reaching the Do Not Touch Section
Code:
#--------------------------------------------------------------------------
# * Set Class Types Default to Corresponding words for each slot
#--------------------------------------------------------------------------
Class_Names.default = $data_system.words.weapon, $data_system.words.armor1,
$data_system.words.armor2, $data_system.words.armor3, $data_system.words.armor4
Remember that line I pointed out at the beginning well here is where its needed. Its just the lame old Weapon, Shield, Helmet, Body Armor, and Accessory.
Code:
#--------------------------------------------------------------------------
# * Set Class Names Default to The Normal Five Slots
#--------------------------------------------------------------------------
Class_Types.default = %( w a1 a2 a3 a4 )
Just the normal five slots here. nothing else.
Sidesteps
I mentioned that the Database's equipment functions fail after adding this script. This means that you can not use the Starting Equipment section in the actor tab in the database, in the battle test menu the Equipment Section, The Event Command Change Equipment, Conditional Branch Section Actor conditions weapon equipped and armor equipped.
Now the first two you can sidestep by the script setup
Now for Changing Equipment use the call script event command
.equip(slot_id, id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
slot_id is the slot id refer to equip slot_types
id is the id of the weapon or armor to equip see slot_types
Now for Conditional Branch Weapon Equipped
Use the Script Condition of the Conditional Branch
.weapon_ids.include?(id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
id is the id of the weapon to check if equipped
Now for Conditional Branch Armor Equipped
Use the Script Condition of the Conditional Branch
.armor_ids.include?(id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
id is the id of the armor to check if equipped
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
Increased Compatibility with all of my other scripts.
May not be compatible with your CMS, I may merge the two if you ask.
Will be compatible with the next version of Seph's Equipment Skills script. *looks at Seph*
Incompatible with my equipment weights script NOW A PATCH IS INCLUDED
Incompatible with RTAB (don't ask for me to merge)
SDK compliant (don't ask to remove dependancy)
Requires Method and Class Library V1.5 or higher
Credits and Thanks
All Betatesters who tested this script, I forget if anyone tested it *coughRavencough*
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 allows for skills/weapons/enemies/items to hit multiple times. This script is similiar to the KGC script of the same name, but isn't the same as it.
Instructions
All you have to do is edit the animation and add blank Timing events (no SE and no Flashes) (if you don't get what this is there are examples given in the demo) at the frame where you want damage to show if it is just one hit and you want it to show at the last frame of the animation don't do anything the script automatically takes care of it, but If you want two or more hits then and you want it to show damage at the last frame then you have to add a Blank Timing event at the end of the animation. You don't have to do any mods to anything else the script takes care of that for you.
Compatibility
SDK 2.x compliant
Requires Method and Class Library V1.5 or greater
Patches
Sg's Counter Attack Script (Outdated)
Script
The Actual Problem was that SG used a phase4_step value of 1337 which shuts off my script, He also placed it right after phase4_step5 (probably not enough time in between damage pops) so I moved this to phase4_step6 (common events will happen before the counter attack now).
I have also fixed the inaccurate damage problem, instead of giving back hp. doing the math after the damage is calculated and then lose hp again. the calculations are done while it is running (By aliasing hp= and checking if the difference was damage and if so apply the calculations and then deduct hp).
Patch SG Counter and My Multi-Attack
Code:
class Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :counter_power
attr_accessor :countered
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias multi_counter_initialize initialize
def initialize
# The Usual
multi_counter_initialize
# Counter Power Setup
@counter_power = 1.0
# Countered Flag
@countered = false
end
#--------------------------------------------------------------------------
# * Set Hp
#--------------------------------------------------------------------------
alias counter_hp= hp=
def hp=(hp)
# Get Old and New Hp
old_hp, new_hp = self.hp, hp
# If Damage is a Number and Difference is damage and counter flag
if (self.damage.is_a?(Numeric) and old_hp - new_hp == self.damage and
@countered)
# Get Damage
n = self.damage
# Multiply By Counter Power
damage_hp = (n * @counter_power).to_i
# The Usual with new Hp
self.counter_hp = old_hp - damage_hp
# Set Damage
self.damage = damage_hp
else
# The Usual
self.counter_hp = hp
end
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# * Update Phase4 Step5
#--------------------------------------------------------------------------
def update_phase4_step5
# Disable Edits (The Usual)
sandgolem_counter_battle_up4s5
end
#--------------------------------------------------------------------------
# * Update Phase4 Step6
#--------------------------------------------------------------------------
alias sandgolem_counter_battle_up4s6 update_phase4_step6
def update_phase4_step6
# The Usual
sandgolem_counter_battle_up4s6
# Skip if no Counter Attack Target
return if @sg_countertarget == nil
# Set Phase4 Step to some value not used
@phase4_step = 1337
# Set Attack Counter Wait
@sg_atkcounter = 28
end
#--------------------------------------------------------------------------
# * Sg Counter Update (Rewrite)
#--------------------------------------------------------------------------
def sg_counter_update
# If Counter Target Dead or Counter is 0
if @sg_countertarget.dead? or @sg_atkcounter == 0
# Reset All
@sg_atkcounter, @sg_counter, @sg_countertarget = nil
# Phase 1
@phase4_step = 1
# Return
return
end
# Decrease Counter
@sg_atkcounter -= 1
# Skip ff Counter is not 10
return if @sg_atkcounter != 10
# Get Random Index
sg_temp = rand(SG_Counter_Messages.size)
# Get Message from Index
sg_temp = SG_Counter_Messages[sg_temp].clone
# Replace \m \M with with counter attackeers names
sg_temp.gsub!(/\\[Mm]/) { @sg_countertarget.name }
# Set Help Window Text
@help_window.set_text(sg_temp, 1)
# Set Counter Power
@active_battler.counter_power = @sg_counter / 100.0
# Set Counter Flag
@active_battler.countered = true
# Run Attack Effect
@active_battler.attack_effect(@sg_countertarget)
# Reset Counter Power
@active_battler.counter_power = 1.0
# Reset Counter Flag
@active_battler.countered = false
# If Damage is a Numeric Refresh Window
@status_window.refresh if @active_battler.damage.is_a?(Numeric)
# Set Animation IDs
@sg_countertarget.animation_id = @sg_countertarget.animation1_id
@active_battler.animation_id = @sg_countertarget.animation2_id
# Set Damage Pop Flag
@active_battler.damage_pop = true
end
end
module RPG
class Sprite < ::Sprite
#---------------------------------------------------------------------------
# ? Start Animation
# inputs: animation, battler or animation_hit
#---------------------------------------------------------------------------
def animation(*args)
# Dispose Old Animation
dispose_animation
# Return if Animation is nil (First Argument)
return if args[0].nil?
# Flag for Damage Popping
@damage_pop = false
# Animation is the first Argument
@_animation = args[0]
# If A Game_Battler Object was sent
if args[1].is_a?(Game_Battler)
# Save Battler
@_animation_battler = args[1]
# Get Animation Hit
@_animation_hit = @_animation_battler.animation_hit
# If Animation is Multi-Hit
if @_animation.multi
# Get all of the Damage and Critical Hits
@_animation_damage = @_animation_battler.damage_hits.to_a
@_animation_critical = @_animation_battler.critical_hits.to_a
# Recreate Animation Hit
@_animation_hit = []
# Run Through Each Damage
@_animation_damage.each do |damage|
# Push Hit State
@_animation_hit << (damage != "Miss")
end
end
else
# Hit is the second argument
@_animation_hit = args[1]
end
# No Damage Pop if After Second Animation Id Phase
@damage_pop = true if ($game_temp.in_battle and
[5,9, 1337].include?($scene.phase4_step))
# Setup Animation Like usual
@_animation_duration = @_animation.frame_max
animation_name = @_animation.animation_name
animation_hue = @_animation.animation_hue
bitmap = RPG::Cache.animation(animation_name, animation_hue)
if @@_reference_count.include?(bitmap)
@@_reference_count[bitmap] += 1
else
@@_reference_count[bitmap] = 1
end
@_animation_sprites = []
if @_animation.position != 3 or not @@_animations.include?(@_animation)
16.times do
sprite = ::Sprite.new(self.viewport)
sprite.bitmap = bitmap
sprite.visible = false
@_animation_sprites << sprite
end
@@_animations << @_animation unless @@_animations.include?(@_animation)
end
update_animation
end
end
end
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.
Credits and Thanks
Raziel for what little betatesting he did (lol just kidding Raz :P you did a great job helping)
Kurisu and Raven for betatesting as well.
Author's Notes
Enjoy
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 scriptlet adds a few functions to the Window_Base class that allows windows to move.
Script
Code:
class Numeric
def sign
return 0 if self.zero?
return (self / self.abs).to_i
end
end
class Window_Base
#--------------------------------------------------------------------------
# * Move the sprite
# x : x coordinate of the destination point
# y : y coordinate of the destination point
# speed : Speed of movement
#--------------------------------------------------------------------------
def move(x, y, speed = 1)
# Set Destination Points speed and move count set moving flag
@destination_x = x
@destination_y = y
@move_speed = speed
@moving = true
# Get the distance + (negative if to left or up positive if down or right)
@distance_x = (@destination_x - self.x).to_f
@distance_y = (@destination_y - self.y).to_f
# Get slant distance (hypotenuse of the triangle (xf,yi) (xi,yf) and (xf,yf))
@distance = Math.sqrt(@distance_x ** 2 + @distance_y ** 2)
# Calculate angle of movement which is later used to determine direction
# If X distance is 0 (Prevent Infinity Error)
if @distance_x == 0
# The Angle is sign(distance_y) * - ? / 2 (90ð or 270ð)
@angle = @distance_y.sign * Math::PI / 2
# If Y distance is 0 (Prevent Incorrect Direction for later)
elsif @distance_y == 0
# The Angle is sign(distance_x) - 1 * ? / 2 (0ð or 180ð)
@angle = (@distance_x.sign - 1) * Math::PI / 2
else
# The Angle is the Arctangent of @distance_y / @distance_x (slope)
# Returns [-?,?]
@angle = Math.atan2(@distance_y, @distance_x.to_f)
end
# Convert the angle to degrees
@angle *= 180 / Math::PI
end
#--------------------------------------------------------------------------
# * Update Move
#--------------------------------------------------------------------------
alias moving_window_update update
def update
moving_window_update
update_move
end
#--------------------------------------------------------------------------
# * Moving?
#--------------------------------------------------------------------------
def moving?
return @moving
end
#--------------------------------------------------------------------------
# * Update Move
#--------------------------------------------------------------------------
def update_move
# If not moving
if (self.x == @destination_x and self.y == @destination_y) or not @moving
@moving = false
return
end
# move increase x = the cosine of the arctangent of the dist x over dist y
# move increase x = cos(arctan(disty/distx)) simplified by trigonometry
# to distance_x / slant_distance, the sprite moves (move speed)
# along the slanted line (if it is slanted)
movinc_x = @move_speed * @distance_x.abs / @distance
# same reasoning with y increase except it is the sine of the arctangent
# move increase y = sin(arctan(disty/distx)) simplified by trigonometry
# to distance_y / slant_distance
movinc_y = @move_speed * @distance_y.abs / @distance
# Move the sign of the distance left + move increase or the remaining distance
# left if it will go past that point
if @move_speed != 0
# Get distance remaining
remain_x = (@destination_x - self.x).abs
remain_y = (@destination_y - self.y).abs
self.x += (@destination_x - self.x).sign * [movinc_x.ceil, remain_x].min
self.y += (@destination_y - self.y).sign * [movinc_y.ceil, remain_y].min
end
# If Destination Reached stop moving
if self.x == @destination_x and self.y == @destination_y
@moving = false
return
end
end
end
Instructions
Add in a new script above main
to move a window just call
.move(x, y, speed)
where x is the destination x coordinate
y is the destination y coordinate
speed is the speed of the movement
Other functions are
.moving? => True if window is moving false otherwise
Within the Window Class
@angle => returns the angle of the movement in degrees
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
Should be compatible with any script
Credits and Thanks
J-Street for requesting.
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
As soon as an actor gains a fifth skill (if set), it will promptly take you to Scene_Max where you can delete one of your skills The actual Scene_Max was spawned out of the Scene_Skill code and now for what was updated Create an element named undeletable give skills you want to be unable to delete with this element checked remember the id change the part in this script to the element id you created now Undeletable Skills will appear in red
Script
Maximum Skill Limits
Code:
#=============================================================================
# * Maximum Skill Limits
#=============================================================================
# Trickster
# Version 1.1
# 10.3.05
#=============================================================================
# Introduction
# - This script allows you to limit the number of skills each actor may have
# rather than allowing them to have an enormous number of skills available
# to them. Each time a skill is acquired, they must choose one to remove.
# Setting up the system
# - There are three configurables:
# 1) SKILL_SIZE This sets how many skills they can have at any one time.
# 2) SKILL_UNDELETABLE The element to tag unremovable skills.
# 3) SKILL_DELETE_TEXT Text to let the player know they filled their quota.
# To Use
# - It's automatic. Once you reach the limit, the screen pops up.
#
#=============================================================================
# Configurables
SKILL_SIZE = 4
SKILL_UNDELETABLE = 17
SKILL_DELETE_TEXT = " has too many skills select one to delete"
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Learn Skill
# skill_id : skill ID
#--------------------------------------------------------------------------
def learn_skill(skill_id)
if skill_id > 0 and not skill_learn?(skill_id)
@skills.push(skill_id)
@skills.sort!
if @skills.size > SKILL_SIZE
$scene = Scene_Max.new
if $game_temp.in_battle
$game_temp.in_battle = false
end
end
end
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Get Undelete Text Color
#--------------------------------------------------------------------------
def undelete_color
return Color.new(175, 0, 5, 255)
end
end
#==============================================================================
# ** Window_SkillDelete
#------------------------------------------------------------------------------
# This window displays removeable skills on the skill screen.
#==============================================================================
class Window_SkillDelete < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Acquiring Skill
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
# If item count is not 0, make a bit map and draw all items
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
self.contents.font.color = normal_color
if skill.element_set.include?(SKILL_UNDELETABLE)
self.contents.font.color = undelete_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
end
#--------------------------------------------------------------------------
# * Help Text Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text( @actor.name + SKILL_DELETE_TEXT)
end
end
#==============================================================================
# ** Scene_Max
#------------------------------------------------------------------------------
# This class performs skill-limit screen processing.
#==============================================================================
class Scene_Max
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Get actor
@actor = $game_party.actors[@actor_index]
# Make help window, status window, and skill delete window
@help_window = Window_Help.new
@status_window = Window_SkillStatus.new(@actor)
@skill_window = Window_SkillDelete.new(@actor)
# Associate help window
@skill_window.help_window = @help_window
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@help_window.dispose
@status_window.dispose
@skill_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@help_window.update
@status_window.update
@skill_window.update
# If skill window is active: call update_skill
if @skill_window.active
update_skill
return
end
end
#--------------------------------------------------------------------------
# * Frame Update (if skill window is active)
#--------------------------------------------------------------------------
def update_skill
# If C button was pressed
if Input.trigger?(Input::C)
# Get currently selected data on the skill window
@skill = @skill_window.skill
# Prevent removal if denied
unless @skill.element_set.include?(SKILL_UNDELETABLE)
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Delete skill
@actor.skills.delete(@skill.id)
# Switch to map screen
$scene = Scene_Map.new
return
else
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
end
end
end
end
Note
Be warned because using this in the wrong way could leave the player unable to delete a skill and thus trapped and unable to continue playing (The script doesn't check if all of the skills are undeletable)
Limitations of this script:
If a character gains a level to where two skills are learned and the player already has 4 skills only one will be deleted this will give them 5 skills
Doesn't check to see if all of the skills are undeletable
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.
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 mini-script, loads data from RPG::Map into RPG::MapInfo. I wasn't pleased to see that you have to load a file just to get data that should have been in RPG::MapInfo, so I scripted this up pretty quickly to load all information (except event data and tileset data, I may add event data in a future update)
Screenshots
ok visualize the copying of data to one memory location to another memory location there is your screenshot
Demo
See next topic by me for a demo
Script
I despise the families...
Code:
=begin
=============================================================================
? Map Info
=============================================================================
Trickster
Version 1.2
3.21.07
=============================================================================
=end
#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Map Info', 'Trickster', 1.2, '3.21.07')
#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1, 2, 3])
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?('Map Info')
#--------------------------------------------------------------------------
# * Save RPG::MapInfo Data
# Set to To True to Save MapInfo Data this moves the RPG::Map stuff to
# RPG::MapInfo so maps will not be loaded frequently to get the map info.
# Set it to True run project at least once then set to false, set to
# true again if you changed any of your maps
#--------------------------------------------------------------------------
Save_MapInfoData = false
#--------------------------------------------------------------------------
# * Update RPG::MapInfo Data
# Set this to true if you changed any of your maps
#--------------------------------------------------------------------------
Update_MapInfoData = false
class RPG::MapInfo
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :tileset_id
attr_accessor :width
attr_accessor :height
attr_accessor :autoplay_bgm
attr_accessor :bgm
attr_accessor :autoplay_bgs
attr_accessor :bgs
attr_accessor :encounter_list
attr_accessor :encounter_step
end
class Scene_Title
#--------------------------------------------------------------------------
# * Main Database
#--------------------------------------------------------------------------
alias_method :trick_mapinfo_title_main_database, :main_database
def main_database
# The Usual
trick_mapinfo_title_main_database
# Create $data_mapinfos object
$data_mapinfos = load_data("Data/MapInfos.rxdata")
# Setup encounter info
setup_map_info
end
#--------------------------------------------------------------------------
# * Battle Test Database
#--------------------------------------------------------------------------
alias_method :trick_mapinfo_title_battletest_database, :battletest_database
def battletest_database
# The Usual
trick_mapinfo_title_battletest_database
# Create $data_mapinfos object
$data_mapinfos = load_data("Data/MapInfos.rxdata")
# Setup encounter info
setup_map_info
end
#--------------------------------------------------------------------------
# * Setup Map Info
#--------------------------------------------------------------------------
def setup_map_info
# Return if test value is not nil or updating info
return if $data_mapinfos[1].width != nil and !Update_MapInfoData
# Begin
begin
# Do from 1 to 999 (Maximum number of maps)
1.upto(999) do |map_id|
# Load Map
map = load_data(sprintf("Data/Map%03d.rxdata", map_id))
# Set Map Info Object
$data_mapinfos[map_id].tileset_id = map.tileset_id
$data_mapinfos[map_id].width = map.width
$data_mapinfos[map_id].height = map.height
$data_mapinfos[map_id].autoplay_bgm = map.autoplay_bgm
$data_mapinfos[map_id].bgm = map.bgm
$data_mapinfos[map_id].autoplay_bgs = map.autoplay_bgs
$data_mapinfos[map_id].bgs = map.bgs
$data_mapinfos[map_id].encounter_list = map.encounter_list
$data_mapinfos[map_id].encounter_step = map.encounter_step
end
rescue Errno::ENOENT
# If Save Map Info Data Save Data
save_data($data_mapinfos, "Data/MapInfos.rxdata") if Save_MapInfoData
end
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
Instructions
Add above main that's it, It also has a save data feature so you will only have to set it to true once, load your project and set it to false. you will have to set it to true again if you edit your maps or else...
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
Requires SDK Part 3
Author's Notes
The first person who posts "What does this script do?" will get a surprise from me (and it won't be a good surprise) if you don't know what this does then you won't have a use for it
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 will allow a scripter to load data from a text file. Great for scripts that require large amounts of data and you don't want to define things using the database or the script editor. The script will catch many different errors while reading from the file (Syntax Errors, Missing } for hashes and Missing ] for arrays) and tells the line(s) and data where the error was found. Also This Tool can load data on multiple lines. And Organizes the information loaded.
Screenshots
Yeah that will help.
Script
Code:
module Trickster
class File_LoadRxdata < File
attr_accessor :line
def format_readline
data = self.readline
@line = data.dup
data = data.split(/\s/)
data.delete("")
return data
end
def requirements(data, required, properties)
for i in required
if data[i].nil? and i < properties.size
s1 = "Error Loading Data"
s2 = "\n#{properties[i]} is undefined"
Kernel.print(s1+s2)
exit
end
end
end
def error_incorrect_name
s1 = "Error Loading Data at Line number #{file.lineno}"
s2 = "\nIncorrect defining name"
s3 = "\nLine data: #{self.line}"
Kernel.print(s1+s2+s3)
exit
end
def error_array(extra)
s1 = "Error Loading Data at Line number#{extra}"
s2 = "\nMissing ']' for Array"
s3 = "\nLine data: #{self.line}"
Kernel.print(s1+s2+s3)
exit
end
def error_hash(extra)
s1 = "Error Loading Data at Line number#{extra}"
s2 = "\nMissing '}' for Hash"
s3 = "\nLine data: #{self.line}"
Kernel.print(s1+s2+s3)
exit
end
def error_syntax(extra)
s1 = "Error Loading Data at Line number#{extra}"
s2 = "\nSyntax Error"
s3 = "\nLine Data: #{self.line}"
Kernel.print(s1+s2+s3)
exit
end
def load_next_line
return false if self.eof?
data = self.format_readline
return true if data == [] or data[0].include?("#")
return data
end
def test_type(data, line, lineno, multi = 0)
# make a copy of the data
temp = data.dup
# set extra text if an error is found
extra = (multi > 0) ? "s #{lineno}-#{lineno+multi}" : " #{lineno}"
if temp == "nil" #If a nil reference
data = nil
elsif temp.slice(0..0) == "[" #if an array
if !temp.include?("]")
self.error_array(extra)
end
begin
data = eval(data)
rescue SyntaxError
self.error_syntax(extra)
end
elsif temp.slice(0..0) == "{" #if a hash
if !temp.include?("}")
self.error_hash(extra)
end
begin
data = eval(data)
rescue SyntaxError
self.error_syntax(extra)
end
elsif test_int(temp) #If a number or "0"
data = data.to_i
end
#else it is a string so just return
return data
end
def test_int(data)
flag = true
for i in 0...data.length
test = data.slice(i..i)
if test == "0" or test.to_i != 0
flag = flag && true
else
flag = false
end
end
return flag
end
end
#loading data from a text file
#inputs: file_name = file name to load
# properties = defining values (see example)
# required = required values to be loaded
# multi_lined = defining values that accept multiple lines (strings only)
#returns: an array with the data from text file
def self.load_data_from_txt(file_name, properties, required = [0], multi_lined = [])
# Initialize local variables
final_data = []
data_txt = []
index = 1
# Load File
file = Trickster::File_LoadRxdata.open(file_name)
# Loop until End of File (EOF)
until file.eof?
# Get line data
data = file.format_readline
# Get Line
line = file.line
# Next if no data or commented line
next if data == [] or data[0].include?("#")
# Get id from the properties
id = properties.index(data[0])
# If a new id
if id == 0 and data_txt != []
# Check requirements and return error if not fulfilled
file.requirements(data_txt, required, properties)
# Finished reading a piece of data
final_data[index] = data_txt.dup
# Increase index and reset data
index += 1
data_txt = []
elsif id == nil
# Incorrent Defining name error message
file.error_incorrect_name
end
# Remove defining name and join together
data.delete_at(0)
data = data.join(' ')
# Get line number
lineno = file.lineno
# Start multi line information checking
multi = 1
if multi_lined.include?(id)
# Load next line
next_line = file.load_next_line
# Get first data
first = next_line.is_a?(Array) ? next_line[0] : ""
# Reset flag
flag = false
# While an invalid property and the file is not eof? or data loaded
while (properties.index(first) == nil and (next_line != false or next_line.is_a?(Array)))
# While was excuted once
flag = true
position = file.pos
# add to data if an array
if next_line.is_a?(Array)
# Get property data
first = next_line[0]
if properties.index(first) == nil
data += ' ' + next_line.join(' ')
end
end
# Load next line and reset first
next_line = file.load_next_line
first = ""
# increase multi line count
multi += 1
# break if file.eof? continue if line was a comment
break if next_line == false
next if next_line == true
first = next_line[0]
end
if flag
file.pos = position
end
if next_line.is_a?(Array)
if properties.index(first) == nil
data += next_line.join(' ')
end
end
end
data = file.test_type(data, line, lineno, multi)
data_txt[id] = data
end
# Reached End of File Get last data if any
if data_txt != []
# Check requirements and return error if not fulfilled
file.requirements(data_txt, required, properties)
# Finished reading a piece of data
final_data[index] = data_txt
# Increase index and reset data
index += 1
data_txt = []
end
# return all data compacted
return final_data.compact
end
end
Instructions
To call just use use
data = Trickster.load_data_from_txt(file, properties[, required, multi_lined])
file is the file to load for reading
properties are the defining names of the data you want to load
required is the names that must be defined (by default the first item is required)
multi_lined are the defining names whose data can be defined on multiple lines
An Example Call
Code:
Scene_Title method main additions
load_mission_info
if @load_mission
if Mission::Constants::SAVE_DATA
save_data($data_missions, "Data/Missions2.rxdata")
end
else
$data_missions = load_data("Data/Missions2.rxdata")
end
def load_mission_info
properties = []
properties[0] = "id"
properties[1] = "name"
properties[2] = "icon"
properties[3] = "cost"
properties[4] = "rank"
properties[5] = "switch"
properties[6] = "area"
properties[7] = "skills"
properties[8] = "items"
properties[9] = "mission"
properties[10] = "random"
properties[11] = "cancel"
properties[12] = "penalty"
properties[13] = "reward"
properties[14] = "description"
filename = "Data\\Missions.rxdata"
@load_mission = true
begin
$data_missions = [nil]
missions = Trickster.load_data_from_txt(filename,properties,[0,1],[14])
for mission in missions
$data_missions[mission[0]] = RPG::Mission.new(mission)
end
rescue
#project is encrypted the file can't be found
@load_mission = false
end
end
and the corresponding text file will look like this
Code:
id 1
name Ghosts!?!
icon battle_icon
cost 200
rank 1
switch 1
description A C[C0C0C0]GhostC[N] has been spotted near the lake can someone please
get rid of him. Meet me outside this building if you take this request.
N[]T[]~Some random guy
area [1]
skills nil
items nil
mission nil
random nil
cancel false
penalty nil
reward {'gold' => 500,'combat' => 10, 'weapons' => 2}
id 2
name Help Me!!
icon note_icon
cost 150
rank 1
switch 2
area [1]
skills {'negotiate' => 1}
items nil
mission [1]
random nil
cancel true
penalty {'gold' => 50}
reward {'negotiate' => 3, 'weapons' => 2, 'items' => 3}
description Can someone please buy this item off of me. My shop is going out of business
and I need the money to feed my family. Meet me near the river if you choose to take this request.
N[]T[]~Shop owner
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
Compatible with everything
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 allows you to break the limits set by the default scripts. This script goes quite well when used by my stats that level up script. Note:: This is not my overdrive-skills type script if you were looking for that instead then see my Advanced IP skills script.
Script
The Script was here?!!? how did that happen?!?! Well the families will not be breaking any limits today
Instructions
Add above main but below SDK
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
Requires SDK Part 1
Credits and Thanks
Twilight for requesting
Author's Notes
Update/repost
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.
Script
Seriously I have nothing to say, you don't really know how hard it is to come up with what to say here since I am not in anyway going to post the script because I am lazy, download the demo and get over it. THERE'S YOUR MESSAGE SOMEHOW RELATED TO THE FAMILIES!!!
Instructions
Just add above main
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
The Phase5 methods of Scene_Battle were rewritten for this script.
SDK 2.x compliant
Uses MACL 2.0
Credits and Thanks
ME
Author's Notes
Scripted in less than an hour
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.
Script
Scripts are rare. they are in a color Color.new(0, 0, 0, 0) in case you don't know that is clear invisible if you will :p
Instructions
Instructions given in the setup section of both scripts.
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
Author's Notes
Scripted in less than an hour
5 scripts in one day :p!
Note that Item colors may not come up in all scenes
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 transforms the DBS (Group Turns System) Into an Individual Turns Battle System. This Battle System lets actions be selected individually and they are performed immediately.
Script
Script? there was never a script here if you are a family member then you must be surely seeing things get the demo. The FAMILIES MUST DECIDE IN A GROUP
Instructions
Add the SDK and the Method and Class Library if not present
There are no options or customizations as this script is plug and play
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
May not be compatible with some Battle Addons (I know for a fact it is not compatible with my Ally AI script) if you happen to find incompatibility ask me nicely and I may merge them (Depends though)
SDk 2.x compliant
Credits and Thanks
Me
Author's Notes
Scripted in less than an hour :)
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.