This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Version 2 of Hime ATB, with support for fill rate modifiers. | |
// Code example for tutorial: http://himeworks.com/2016/01/tutorial-series-hime-atb-customizing-atb-fill-rates/ | |
var Imported = Imported || {} ; | |
var TH = TH || {}; | |
Imported.TH_ActiveTimeBattle = 1; | |
TH.ActiveTimeBattle = TH.ActiveTimeBattle || {}; | |
(function ($) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A super simple implementation of an ATB. Used for tutorial purposes. | |
// Read the tutorial here: http://himeworks.com/2016/01/tutorial-designing-a-simple-active-battle-system/ | |
var Imported = Imported || {} ; | |
var TH = TH || {}; | |
Imported.TH_ActiveTimeBattle = 1; | |
TH.ActiveTimeBattle = TH.ActiveTimeBattle || {}; | |
(function ($) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// doesn't work | |
var TH_SpritesetMap_createLowerLayer = Spriteset_Map.prototype.createLowerLayer; | |
Spriteset_Map.prototype.createLowerLayer = function() { | |
TH_SpritesetMap_createLowerLayer.call(this); | |
this.createEmitter(); | |
} | |
Spriteset_Map.prototype.createEmitter = function() { | |
var conf = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# To change class while keeping exp/level, you don't need any additional scripts. | |
# Just make the script call | |
# | |
# $game_actors[actor_id].change_class(class_id, true) | |
# | |
# Where `actor_id` is the ID of the actor you want to change classes and `class_id` is the ID of the class to change to. | |
# | |
# For example | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Preserves information about a particular class' skill tree | |
# When you change classes, your skill trees are not reset. | |
# | |
# Skill points are separate for each class, rather than pooled together. | |
#------------------------------------------------------------------------------- | |
class Data_ClassSkillTree | |
attr_accessor :class_id | |
attr_accessor :skill_points |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Usage: use the script call | |
# | |
# change_description(actor_id, new_description) | |
# | |
# Where the actor_id is the ID of the actor you want to change and the | |
# new_description is the description you want the actor to show | |
# | |
# For example | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TH | |
module Special_Map_Command | |
# The map that the player will be sent to upon choosing the special command. | |
Map_ID = 2 | |
# Name of the command that will be shown in the title screen | |
Name = "Boss Rush" | |
# A formula that determines whether the command will be displayed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By default, when a battler dies, the game simply clears out the states. | |
# However, sometimes we might want them to be actually "removed" through the | |
# appropriate remove_state method | |
class Game_Battler < Game_BattlerBase | |
alias :th_remove_states_on_death_die :die | |
def die | |
@states.each {|id| remove_state(id)} | |
th_remove_states_on_death_die | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick demonstration of how one would hold class-specific bonus parameters. | |
# Usage: make the following script call | |
# | |
# $game_actors[id].add_class_param_plus(class_id, param_id, value) | |
# | |
class Game_Actor < Game_Battler | |
alias :th_class_plus_params_initialize :initialize | |
def initialize(actor_id) | |
@class_plus_params = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Game_Battler | |
def on_action_end | |
@result.clear | |
remove_states_auto(1) | |
#remove_buffs_auto | |
end | |
def on_turn_end | |
@result.clear | |
regenerate_all |