New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
Description: The various add-ons included in this project, do a multitude of different things. For example, the core engine has a minor fix regarding enemies using skills. Others mimic functions from the Fire Emblem franchise, including the "Talk" command for actors. Others merely provide greater functionality and/or control over the engine itself, such as forced movement. This is an ongoing project to expand on GTBS's horizons via scripting and eventing.
# Welcome, to ???nOBodY???'s GTBS Add-Ons! # The following scripts are included... # # ++dricc's Actor Clones # ++dricc's Actor Clones Hue # # ++KGC_LargeParty # # ++GTBS_Extra_Tile_Cost # # Scene_Battle_Default v1.1 # Scene_FakeGameover v1.0 # SGEN: Bridges v0.9 # Spell System: Spell Levels Add-On v1.5 # # GTBS Skill Learning Enhancement v1.01 # GTBS Reach Extension v1.1 # GTBS Talking/FE Battling (Compatibility) v1.21 # GTBS Spell Levels v0.9 [DISABLED & OUTDATED] # GTBS Talking/FE Battling v1.0 [DISABLED & OUTDATED] # GTBS Universal Patch: tbs_phase_1 # compat IceDragon's IEX - Limited Inventory GTBS patch # compat Talking/FE Battling(=Compat) GTBS add-on # compat Escape!!! add-on # compat Ziffee's Submenus GTBS add-on # GTBS Universal Patch: tbs_phase_4 # compat Ziffee's Submenus GTBS add-on # GTBS Universal Patch: tbs_phase_9 # compat Talking/FE Battling(=Compat) GTBS add-on # compat Weapon Unleash GTBS add-on # GTBS Ziifee's Spin Menu - Submenus v1.0 # GTBS-Ziifee's Submenus(VX) # compat GTBS Talking/FE Battling # compat GTBS Ziifee's Spin Menu - Submenus # GTBS-ZiiSpinMenu(VX) [DISABLED & OUTDATED; function passed to GTBS-Ziifee's Submenus(VX)] # # *GTBS-Fog of War [MODIFIED by Nelderson for compat GTBS; by ModernAlgebra] # ++GTBS-Fog of War Patch(VX) (Nelderson's additional patch) # ++Shorthand active_battler # Shorthand create_vision_field [ADDED to Nelderson's patch] # Shorthand Get/Set Self Switch # # ++GTBS-BaseCamp Setup # ++GTBS-BaseCamp v1.1 # ++GTBS-ZoneEffects # # ++GTBS-StateAuras # # Scene_EnemyStatus # GTBS Enemy Status v1.0 # GTBS Weapon Unleash v1.0 # # *iPenguin's Force Move [MODIFIED for teleport OR run_route types of movement] # ++iPenguin's Patches # ++iPenguin's Unite/Support System # ++iPenguin's Change View Range # # ++ICY_Colors # ++ICY_HM_Window_Selectable # ++ICY_Window_Base_Extended # ++IEX - Actor Inventory # # ++GTBS-Limited Inventory(VX) # *IEX-LI GTBS patch [MODIFIED IceDragon's patch, for compat GTBS Talking/FE Battling] # # ++Escape!!! # # !!!Wall Tile Extension 4.13 [DISABLED; EXTREMELY BUGGY] # !!!Wall Tile Extension Manual # # --Isometric Views(VX) v1.5.1 (2d_iso_x3) # --GTBS (2d_iso_x3) # --TilemapRuntime (2d_iso_x3) # --Iso_Tilemap (2d_iso_x3) # --multi_anim (2d_iso_x3) # # Other scripts, marked by a prefix of ++, are not my own, but might have a patch # or two in the script editor. Others were added to add spice and flavour to the # somewhat bland demo. For a remodelled demo, that is. >w< # # Other scripts, marked by a prefix of !!!, are disabled; usually for a good # reason... # # Other scripts, marked by a prefix of !~, are not much more than debug scripts # for debugging and testing purposes. # # Other scripts, marked by a prefix of --, are neither my own nor included in # this version. Other versions: # [beta_iso] GTBS VX v1.5.1.4 & Add-Ons # OR # [beta_iso] GTBS VX v1.5.1.4 & Add-Ons [PATCH] # # # # Line 6341 of GTBS_v1.5.1 Battle_Scene changed to: # # if skill.base_damage == 0 #status change skill # # To fix a NoMethodError saying "power" didn't exist for the enemy's skill, even # though it had already passed the nil test. In short, this was a small error # having to do with the system thinking it was running on XP. # # # # Game_Actor initialize method changed to: # initialize(actor_id,actor_model_id=nil) # in: # KGC_CategorizeSkill # Spell Levels # Talking/FE Battling # to provide compatibility with dricc's Actor Clones scripts. # # # # (GTBS v1.5.1 - Part2) # Game_Map rewritten and Game_Battler: unit_size rewritten by Nelderson for # compatibility with En_Large_Units & GTBS_Extra_Tile_Cost. # # # # Added $imported["GTBS_v1.5.1"] function at the top of the Compatibility Module.
1) FE sideview implementation 2) Common Event support to the Treasure System (part of the Reach Extension) 3) Advance Wars-esque battles 4) Valkyria Chronicles-esque/Disgaea-esque reinforcements 5) A customizable DnD Formulas add-on 6) FFTA, FE, or Enemy growth modes (Selectable option in-game) 7) Night/Day improvements 8) States that affect an area around the inflicted (like, say, a disease) 9) Support System effects
GTBS Spell Levels Patch OUTDATED (untested at this point), but available nonetheless. I think it's officially the first script of mine that I no longer support...
Spoiler:
CODE
#=============================================================================== # GTBS Spell Levels v0.9 # by ???nOBodY??? (aka sUBzeR_0) # Requested By: lvlercenary & Nelderson # Last Updated: 12/9/10 #=============================================================================== # This Script is made specfically for usage with GTBS version 1.5.1.4 by GubiD. #=============================================================================== # # This script simply provides GTBS with functionality from the Spell Levels # script. A patch, if you will. # # If you are using my GTBS-Talking/FE Battling add-on as well, DO NOT USE THIS # SCRIPT. Use the compatibility script instead, which merges both together. The # individual add-ons are not compatible. # #===============================================================================
class Game_Temp
attr_accessor :sz_spell_uses_compat_counter # for compatibility
#-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias sz_spell_level_gtbs_initialize initialize def initialize sz_spell_level_gtbs_initialize @sz_spell_uses_compat_counter = 0 end
end
class Scene_Battle_TBS
#---------------------------------------------------------------------------- # Phase 1 - Actor Menu #---------------------------------------------------------------------------- def tbs_phase_1 if @active_battler != nil or @battle_exiting return if @active_battler.moving? if @active_battler.dead? if $game_system.cust_battle == "ATB" @wait = false @temp_acted += 1 else $game_system.acted.push(@active_battler) end # Natural removal of states @active_battler.remove_states_auto @active_battler.has_doom? @active_battler.blink = false @active_battler.moved = false @active_battler.perf_action = false @active_battler = nil @cursor_active = true @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 0 @freeze_scroll = false if @turn == "player" next_actor end return end if @windows["actor"].active set_active_cursor @freeze_scroll = false if GTBS::Force_Wait if @active_battler.perf_action and @active_battler.moved?
@tbs_phase = 6 @windows["actor"].active = false @windows["actor"].visible = false return else @windows["actor"].visible = true end else @windows["actor"].visible = true end end end
if Input.trigger?(Input::B) and @windows["actor"].active == true Sound.play_cancel @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 0 @cursor_active = true return end
if Input.trigger?(Input::B) and @windows["detail"].active == true Sound.play_cancel @windows["detail"].active = false @windows["detail"].visible = false @windows["actor"].active = true @windows["actor"].visible = true return end
if Input.trigger?(Input::B) and @windows["confirm"].active == true Sound.play_cancel @windows["confirm"].active = false @windows["confirm"].visible = false @windows["confirm"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true return end
if Input.trigger?(Input::B) and @windows["skill"].active == true Sound.play_cancel @windows["skill"].active = false @windows["skill"].visible = false @windows["skill"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true @windows["help"].move_to(1) end
if Input.trigger?(Input::B) and @windows["item"].active == true Sound.play_cancel @windows["item"].active = false @windows["item"].visible = false @windows["item"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true @windows["help"].move_to(1) end
if Input.trigger?(Input::C) and @windows["confirm"].active == true case @windows["confirm"].index when 0 # yes Sound.play_decision @windows["confirm"].active = false @windows["confirm"].visible = false @windows["confirm"].index = -1 @tbs_phase = 6 when 1 # no Sound.play_decision @windows["confirm"].active = false @windows["confirm"].visible = false @windows["confirm"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true end return end
if Input.trigger?(Input::C) and @windows["item"].active == true @item = @windows["item"].item if !GTBS::VX if @item == nil or not $game_party.item_can_use?(@item.id) Sound.play_buzzer @item = nil return end else if @item == nil or not $game_party.item_can_use?(@item) Sound.play_buzzer @item = nil return end end Sound.play_decision @active_battler.current_action.kind = 2 @active_battler.current_action.item_id = @item.id draw_ranges(@active_battler, 9) @step = 0 @tbs_phase = 2 @cursor_active = true @enable_target_cursor = true @windows["item"].active = false @windows["item"].visible = false @windows["help"].visible = false @windows["help"].move_to(1) @windows["help"].visible = true end
if Input.trigger?(Input::C) and @windows["skill"].active == true # Get currently selected data on the skill window @spell = @windows["skill"].skill # If it can't be used if !GTBS::VX if @spell == nil or (not @active_battler.skill_can_use?(@spell.id)) # Play buzzer SE Sound.play_buzzer return else for actor in $game_party.members active_battler_cur_spell_uses = nil if @active_battler.id == actor.id active_battler_cur_spell_uses = actor.cur_spell_uses[@spell.sz_spell_level] unless @spell.sz_spell_level == 0 break end end if active_battler_cur_spell_uses == 0 # Play buzzer SE text3 = sprintf(SUBZERO_MODULE::SPELL_USES_EXHAUSTED_MESSAGE.to_s) $game_message.texts.push(text3) Sound.play_buzzer return end end else if @spell == nil or (not @active_battler.skill_can_use?(@spell)) # Play buzzer SE Sound.play_buzzer return else for actor in $game_party.members active_battler_cur_spell_uses = nil if @active_battler.id == actor.id active_battler_cur_spell_uses = actor.cur_spell_uses[@spell.sz_spell_level] unless @spell.sz_spell_level == 0 break end end if active_battler_cur_spell_uses == 0 # Play buzzer SE text3 = sprintf(SUBZERO_MODULE::SPELL_USES_EXHAUSTED_MESSAGE.to_s) $game_message.texts.push(text3) Sound.play_buzzer return end end end # Play decision SE Sound.play_decision # Set action @active_battler.current_action.kind = 1 @active_battler.current_action.skill_id = @spell.id @step = 0 # Make skill window invisible
case @spell.scope when ATTACK_RANGES draw_ranges(@active_battler,6) when 0,HELP_RANGES draw_ranges(@active_battler,7) end @enable_target_cursor = true @cursor_active = true @windows["skill"].visible = false @windows["skill"].active = false @tbs_phase = 3 @windows["help"].move_to(1) return end
if Input.trigger?(Input::C) and @windows["actor"].active == true common_event = [] cmds = GTBS::MENU_COMMAND_Translation for key in cmds.keys if cmds[key].include?(@windows["actor"].data(@windows["actor"].index)) cmd = key.clone end end case cmd when "Move" if @active_battler.moved? Sound.play_buzzer return end Sound.play_decision draw_ranges(@active_battler, 3) @windows["actor"].active = false @windows["actor"].visible = false set_active_cursor @cursor_active = true @drawn = false @tbs_phase = 5 when "Attack" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @enable_target_cursor = true draw_ranges(@active_battler, 8) update_target_cursor(true) #forces refresh of @step = 0 @tbs_phase = 4 @windows["actor"].active = false @windows["actor"].visible = false @cursor_active = true
when "Skill" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @windows["skill"].refresh(@active_battler) @windows["skill"].active = true @windows["skill"].visible = true @windows["skill"].index = 0 @windows["actor"].active = false @windows["actor"].visible = false @windows["status"].visible = false set_active_cursor @windows["help"].visible = true @windows["help"].move_to(0) when "Item" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @windows["item"].active = true @windows["item"].visible = true @windows["item"].index = 0 @windows["item"].refresh @windows["actor"].active = false @windows["actor"].visible = false @windows["status"].visible = false set_active_cursor @active_battler.current_action.kind = 2 @windows["help"].visible = true @windows["help"].move_to(0) when "Wait", "Defend" if GTBS::WAIT_CONFIRM Sound.play_decision @freeze_scroll = true if @active_battler.perfaction? and !@active_battler.moved? text = "Do not move this turn?" elsif @active_battler.moved? and !@active_battler.perfaction? text = "Do no attack this turn?" elsif !@active_battler.moved? and !@active_battler.perfaction? text = "Do not move or attack this turn?" elsif @active_battler.moved? and @active_battler.perfaction? @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 6 return end @windows["confirm"].refresh(text) @windows["confirm"].active = true @windows["actor"].active = false @windows["actor"].visible = false else @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 6 return end
when "Status" Sound.play_decision @windows["detail"].refresh(@active_battler) @windows["detail"].active = true @windows["detail"].visible = true @windows["actor"].active = false @windows["actor"].visible = false @windows["help"].visible = false @windows["status"].visible = false end $game_troop.interpreter.setup(common_event, 0) return end end
#---------------------------------------------------------------------------- # Process Actions (Attack/Skill/Item) #---------------------------------------------------------------------------- def tbs_phase_9 case @step when 0 return if update_screen @step = 1 when 1 if @attack_animation_index.nil? and @animation2.is_a?(Array) @attack_animation_index = 0 end if @attack_animation_index != nil animation2 = @animation2[@attack_animation_index] else animation2 = @animation2 end animation = $data_animations[animation2] if !animation.nil? @turnable = animation.name.downcase.include?("[turn]") else @turnable = nil end #Turn to target location if @targets[0] != nil @active_battler.turn_to(@targets[0]) else @active_battler.turn_to(@cursor) end @hit_count = 0 #Play user Animations if @animation1 > 0 @active_battler.animation_id = @animation1 @wait_count = get_wait_guess_for_animation(@animation1) end check_projectiles @step = 2 @apply_all = nil @spell = nil if @active_battler.current_action.skill_id > 0 and @active_battler.current_action.kind == 1 @spell = $data_skills[@active_battler.current_action.skill_id] @windows["help"].set_text(@spell.name,1) if ALL_TYPES.include?(@spell.scope) @apply_all = true end if @spell.dual? @targets += @targets end end if @active_battler.current_action.item_id > 0 and @active_battler.current_action.kind == 2 item = $data_items[@active_battler.current_action.item_id] @windows["help"].set_text(item.name,1) if ALL_TYPES.include?(item.scope) @apply_all = true end if item.dual? @targets += @targets end end @gained = @targets.clone if @targets.size == 1 @melee = true unless @active_bat_temp != nil end return when 2 return if @active_battler.projectile_in_motion? unless @active_battler == nil #Play target animations/damage display if @attack_animation_index != nil animation2 = @animation2[@attack_animation_index] else animation2 = @animation2 end
if GTBS::POP_DAMAGE_IND if @apply_all anim = Anim_Miss.new(2, animation2) anim.place(@cursor.x, @cursor.y) anim.start_anim @wait_count = [1,$data_animations[animation2].frame_max].max rescue @wait_count = 1 @target = @targets[0] @step = 3 @apply_all = false elsif @apply_all == false @target = @targets[0] @step = 3 elsif @apply_all == nil @target = @targets[0] unless @target.nil? @target.attacker_dir = @active_battler.direction if @turnable == true @target.animation_id = animation2 unless @target.nil? unless $data_animations[animation2] == nil @wait_count = [1,$data_animations[@animation2].frame_max].max rescue @wait_count = 1 end end if @attack_animation_index == nil @step = 3 else @attack_animation_index += 1 if @attack_animation_index == @animation2.size @step = 3 end end end else for target in @targets target.animation_id = animation2 @wait_count = [1,$data_animations[animation2].frame_max].max rescue @wait_count = 1 end if @attack_animation_index == nil @step = 3 else @attack_animation_index += 1 if @attack_animation_index == @animation2.size @step = 3 end end return end
if @targets.size == 0 @enable_target_cursor = false if GTBS::is_summon?(@active_battler.current_action.skill_id) > 0 and $game_map.passable?(@cursor.x, @cursor.y, 0) #Crease Miss object, but play summon animation anim = Anim_Miss.new(1) anim.place(@cursor.x, @cursor.y) anim.start_anim @target = anim #Set character sumid = GTBS::is_summon?(@active_battler.current_action.skill_id) if @active_battler.is_a?(Game_Actor) and actors.include?(@active_battler) set_character("actor", sumid, @cursor.x, @cursor.y,0,true) @targets.push(actors.last) elsif @active_battler.is_a?(Game_Actor) and neutral.include?(@active_battler) set_character("neutral", sumid, @cursor.x, @cursor.y,0,true) @targets.push(neutral.last) elsif @active_battler.is_a?(Game_Enemy) and enemies.include?(@active_battler) set_character("enemy", sumid, @cursor.x, @cursor.y,0,true) @targets.push(enemies.last) end sum = @targets.last sum.hp = sum.maxhp sum.mp = sum.maxmp @gained = @targets.clone else #Play Miss Animation @target = anim anim = Anim_Miss.new anim.place(@cursor.x, @cursor.y) anim.start_anim end else if GTBS::is_summon?(@spell.id) > 0 #Play Miss Animation - since a summon cannot occupy any location already occupied. anim = Anim_Miss.new anim.place(@cursor.x, @cursor.y) anim.start_anim @step = 5 end end when 3 #performs action! @attack_animation_index = nil @wait_count = 25 if @target != nil if @target.is_a?(Anim_Miss) @step = 4 return end case @active_battler.current_action.kind when 0 #attack/defend/etc case @active_battler.current_action.basic when 0 t=make_attack_result(@target, @active_battler) @hit_count += 1 if $data_skills[@active_battler.weapon_id].element_set.include?(GTBS::CHAIN_LIGHTNING_EFFECT_ID) rescue nil if @melee == true @counter = @target.counter_result(@active_battler) unless @target == @active_battler end when 1 #defend when 2 #escape end when 1 #skill # sUBzeR_0's Patch if !@target.actor? || @active_battler.is_a?(Game_Actor) unless @active_battler.sz_cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level] == 0 t=make_skill_result(@target, @active_battler) @hit_count += 1 if $data_skills[@active_battler.current_action.skill_id].element_set.include?(GTBS::CHAIN_LIGHTNING_EFFECT_ID) rescue @active_battler.sz_subtract_spell_uses($data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i) unless $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i == 0 for actor in $game_party.members if actor.id == @active_battler.id unless SUBZERO_MODULE::SPELL_USES_DECREASE_ONCE_PER_CAST == true actor.cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i] -= 1 else if $game_temp.sz_spell_uses_compat_counter == 0 actor.cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i] -= 1 unless actor.cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i] == nil $game_temp.sz_spell_uses_compat_counter = 1 end end break end end if SUBZERO_MODULE::USE_SPELL_USES_MESSAGE && $game_temp.sz_spell_uses_compat_counter == 1 if $data_skills[@active_battler.current_action.skill_id].sz_spell_level == 0 if SUBZERO_MODULE::USE_SPELL_LEVELZERO_MESSAGE text = sprintf("Actor used a level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " spell!") $game_message.texts.push(text) text2 = sprintf("Spell level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " uses left = " + @active_battler.sz_cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level].to_s + " !") $game_message.texts.push(text2) end else text = sprintf("Actor used a level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " spell!") $game_message.texts.push(text) text2 = sprintf("Spell level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " uses left = " + @active_battler.sz_cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level].to_s + " !") $game_message.texts.push(text2) end $game_temp.sz_spell_uses_compat_counter = 2 end if @melee == true @counter = @target.counter_result(@active_battler) unless @target == @active_battler end else text3 = sprintf(SUBZERO_MODULE::SPELL_USES_EXHAUSTED_MESSAGE.to_s) $game_message.texts.push(text3) end else t=make_skill_result(@target, @active_battler) @hit_count += 1 if $data_skills[@active_battler.current_action.skill_id].element_set.include?(GTBS::CHAIN_LIGHTNING_EFFECT_ID) rescue if @melee == true @counter = @target.counter_result(@active_battler) unless @target == @active_battler end end # sUBzeR_0's Patch when 2 #item if @active_battler.current_action.skill_id != 0 t=make_itemskill_result(@target, @active_battler) else t=make_item_result(@target, @active_battler) end end
if GTBS::USING_MULTISLOT and @active_battler.current_action.kind == 0 and @targets.size == 1 and !@active_battler.is_a?(Game_Enemy)
@active_battler.attack_count += 1 # If all attacks have been made if @active_battler.attack_count == @active_battler.attacks.size or @active_battler.current_action.kind != 0 or @active_battler.current_action.basic != 0 # End of turn, and return attack count to 0 @active_battler.attack_count = 0 else # Return for extra attack @animation1 = @active_battler.animation1 @animation2 = [@active_battler.atk_animation_id,@active_battler.atk_animation_id2] @step = 1 return end end if [GTBS::Dodge_Text,GTBS::Miss_Text].include?(t) and !GTBS::GAIN_EXP_ON_MISS @gained.delete(@target) end check_knock_back @targets = clear_target if @targets.size != 0 @step = 2 if @attack_animation_index.nil? and @animation2.is_a?(Array) @attack_animation_index = 0 end return end else for target in @targets case @active_battler.current_action.kind when 0 #attack/defend/etc t = make_attack_result(target, @active_battler) if @melee == true @counter = target.counter_result(@active_battler) unless target == @active_battler end when 1 #skill # sUBzeR_0's Patch if !target.actor? || @active_battler.is_a?(Game_Actor) unless @active_battler.sz_cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level] == 0 t=make_skill_result(target, @active_battler) @hit_count += 1 if $data_skills[@active_battler.current_action.skill_id].element_set.include?(GTBS::CHAIN_LIGHTNING_EFFECT_ID) rescue @active_battler.sz_subtract_spell_uses($data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i) unless $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i == 0 for actor in $game_party.members if actor.id == @active_battler.id unless SUBZERO_MODULE::SPELL_USES_DECREASE_ONCE_PER_CAST == true actor.cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i] -= 1 else if $game_temp.sz_spell_uses_compat_counter == 0 actor.cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i] -= 1 unless actor.cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_i] == nil $game_temp.sz_spell_uses_compat_counter = 1 end end break end end if SUBZERO_MODULE::USE_SPELL_USES_MESSAGE && $game_temp.sz_spell_uses_compat_counter == 1 if $data_skills[@active_battler.current_action.skill_id].sz_spell_level == 0 if SUBZERO_MODULE::USE_SPELL_LEVELZERO_MESSAGE text = sprintf("Actor used a level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " spell!") $game_message.texts.push(text) text2 = sprintf("Spell level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " uses left = " + @active_battler.sz_cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level].to_s + " !") $game_message.texts.push(text2) end else text = sprintf("Actor used a level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " spell!") $game_message.texts.push(text) text2 = sprintf("Spell level " + $data_skills[@active_battler.current_action.skill_id].sz_spell_level.to_s + " uses left = " + @active_battler.sz_cur_spell_uses[$data_skills[@active_battler.current_action.skill_id].sz_spell_level].to_s + " !") $game_message.texts.push(text2) end $game_temp.sz_spell_uses_compat_counter = 2 end if @melee == true @counter = target.counter_result(@active_battler) unless target == @active_battler end else text3 = sprintf(SUBZERO_MODULE::SPELL_USES_EXHAUSTED_MESSAGE.to_s) $game_message.texts.push(text3) end else t=make_skill_result(target, @active_battler) @hit_count += 1 if $data_skills[@active_battler.current_action.skill_id].element_set.include?(GTBS::CHAIN_LIGHTNING_EFFECT_ID) rescue if @melee == true @counter = target.counter_result(@active_battler) unless target == @active_battler end end # sUBzeR_0's Patch when 2 #item if @active_battler.current_action.skill_id != 0 t=make_itemskill_result(target, @active_battler) else t=make_item_result(target, @active_battler) end end if [GTBS::Dodge_Text,GTBS::Miss_Text].include?(t) and GTBS::GAIN_EXP_ON_MISS @gained.delete(target) end check_knock_back end @targets.clear end @step = 4 return when 4 #gain_exp #---------------- # Target now counters if they are set to do so #---------------- # sUBzeR_0's Patch if $game_temp.sz_spell_uses_compat_counter >= 1 $game_temp.sz_spell_uses_compat_counter = 0 end # sUBzeR_0's Patch @exp_gained.push([3, @active_battler, @gained]) unless @active_battler.dead? or @gained.size == 0 @hit_count = 0 if @targets.size == 0 and @counter != nil if @counter[0] and @counter[1] != @active_battler and !@counter[1].dead? #if counter flag is true @active_bat_temp = @active_battler #save current battler info so they can be restored when complete @active_battler = @counter[1] #return countering party of active_battler @active_battler.turn_to(@active_bat_temp) #turn towards attacker @active_battler.clear_tbs_actions #reset actions for battler @active_battler.current_action.kind = 0 #set for physical action @active_battler.current_action.basic = 0 #set for attack @targets.push(@active_bat_temp) #set current battler as target @melee = false #reset melee so there is no chance of counter happening over and over @counter = nil #reset counter so it doesnt pull this again unless conditions meet. if @active_battler.animation1 > 0 #if attack animation set @animation1 = @active_battler.animation1 @active_battler.animation_id = @animation1 #setup animation for battler @wait_count = get_wait_guess_for_animation(@animation1) end @animation2 = [@active_battler.atk_animation_id,@active_battler.atk_animation_id2] #set attack target animation @step = 1 #set step back to 2 so it can redo attack and animations return end if @counter[1] != nil and @counter[1].dead? @counter = nil end end #Clears counter info when ready if @active_bat_temp != nil @active_battler = @active_bat_temp @active_bat_temp = nil @counter = nil end @gain = nil @turnable = nil @targets = [] @apply_all = nil @attack_animation_index = nil @wait_count = 25 @step = 5 return when 5 if !@common_event_id.nil? @common_event_q += @common_events[@common_event_id].list @common_event_id = nil return end if @return_phase == 1 #if return to battler phase, reset windows to open @windows["actor"].active = true #set actor menu to active, visible and refresh contents @windows["actor"].visible = true @windows["actor"].refresh(@active_battler) @tbs_phase = 1 @step = 0 elsif @return_phase == 7 #return to AI controlled phase @tbs_phase = @return_phase @step = 0 elsif @return_phase == 0 #if return phase 0 when wait skill, update wait skill info and return skill_cast = @use_spell[0][1] @use_spell.delete([@active_battler, skill_cast]) @enable_target_cursor = false @tbs_phase = 0 @step = 0 @using_skill = false end if @active_battler.dead? #if active battler died during transaction, reset wait functions and proceed with battle. if $game_system.cust_battle == "ATB" @wait = false end @active_battler.blink = false @active_battler.moved = false @active_battler.perf_action = false @active_battler = nil @cursor_active = true @tbs_phase = 0 @freeze_scroll = false @enable_target_cursor = false @using_skill = false return elsif @return_phase == 0 @active_battler = nil end clear_tr_sprites return end end
end
GTBS Limited Inventory Patch
Spoiler:
CODE
#=============================================================================== # IEX - Limited Inventory GTBS Patch ~ By ???nOBodY??? #=============================================================================== # Fixes compatibility issue between IceDragon's patch and the Talking/FE Battling # GTBS add-on. #===============================================================================
class Scene_Battle_TBS #---------------------------------------------------------------------------- # Phase 1 - Actor Menu #---------------------------------------------------------------------------- def tbs_phase_1 if @active_battler != nil or @battle_exiting return if @active_battler.moving? if @active_battler.dead? if $game_system.cust_battle == "ATB" @wait = false @temp_acted += 1 else $game_system.acted.push(@active_battler) end # Natural removal of states @active_battler.remove_states_auto @active_battler.has_doom? @active_battler.blink = false @active_battler.moved = false @active_battler.perf_action = false @active_battler = nil @cursor_active = true @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 0 @freeze_scroll = false if @turn == "player" $game_temp.talkability = talkability? next_actor end return end if @windows["actor"].active set_active_cursor @freeze_scroll = false if GTBS::Force_Wait if @active_battler.perf_action and @active_battler.moved?
@tbs_phase = 6 @windows["actor"].active = false @windows["actor"].visible = false return else @windows["actor"].visible = true end else @windows["actor"].visible = true end end end
if Input.trigger?(Input::B) and @windows["actor"].active == true Sound.play_cancel @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 0 @cursor_active = true return end
if Input.trigger?(Input::B) and @windows["detail"].active == true Sound.play_cancel @windows["detail"].active = false @windows["detail"].visible = false @windows["actor"].active = true @windows["actor"].visible = true return end
if Input.trigger?(Input::B) and @windows["confirm"].active == true Sound.play_cancel @windows["confirm"].active = false @windows["confirm"].visible = false @windows["confirm"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true return end
if Input.trigger?(Input::B) and @windows["skill"].active == true Sound.play_cancel @windows["skill"].active = false @windows["skill"].visible = false @windows["skill"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true @windows["help"].move_to(1) end
if Input.trigger?(Input::B) and @windows["item"].active == true Sound.play_cancel @windows["item"].active = false @windows["item"].visible = false @windows["item"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true @windows["help"].move_to(1) end
if Input.trigger?(Input::C) and @windows["confirm"].active == true case @windows["confirm"].index when 0 # yes Sound.play_decision @windows["confirm"].active = false @windows["confirm"].visible = false @windows["confirm"].index = -1 @tbs_phase = 6 when 1 # no Sound.play_decision @windows["confirm"].active = false @windows["confirm"].visible = false @windows["confirm"].index = -1 @windows["actor"].active = true @windows["actor"].visible = true end return end
if Input.trigger?(Input::C) and @windows["item"].active == true @item = @windows["item"].item
if !GTBS::VX if @item == nil or not $game_party.item_can_use?(@item.id) Sound.play_buzzer @item = nil return end else if @item == nil or not @active_battler.item_can_use?(@item) Sound.play_buzzer @item = nil return end end Sound.play_decision @active_battler.current_action.kind = 2 @active_battler.current_action.item_id = @item.id draw_ranges(@active_battler, 9) @step = 0 @tbs_phase = 2 @cursor_active = true @enable_target_cursor = true @windows["item"].active = false @windows["item"].visible = false @windows["help"].visible = false @windows["help"].move_to(1) @windows["help"].visible = true end
if Input.trigger?(Input::C) and @windows["skill"].active == true # Get currently selected data on the skill window @spell = @windows["skill"].skill # If it can't be used if !GTBS::VX if @spell == nil or (not @active_battler.skill_can_use?(@spell.id)) # Play buzzer SE Sound.play_buzzer return else for actor in $game_party.members active_battler_cur_spell_uses = nil if @active_battler.id == actor.id active_battler_cur_spell_uses = actor.sz_cur_spell_uses(@spell.sz_spell_level) unless @spell.sz_spell_level == 0 break end end if active_battler_cur_spell_uses == 0 # Play buzzer SE text3 = sprintf(SUBZERO_MODULE::SPELL_USES_EXHAUSTED_MESSAGE.to_s) $game_message.texts.push(text3) Sound.play_buzzer return end end else if @spell == nil or (not @active_battler.skill_can_use?(@spell)) # Play buzzer SE Sound.play_buzzer return else for actor in $game_party.members active_battler_cur_spell_uses = nil if @active_battler.id == actor.id active_battler_cur_spell_uses = actor.sz_cur_spell_uses(@spell.sz_spell_level) unless @spell.sz_spell_level == 0 break end end if active_battler_cur_spell_uses == 0 # Play buzzer SE text3 = sprintf(SUBZERO_MODULE::SPELL_USES_EXHAUSTED_MESSAGE.to_s) $game_message.texts.push(text3) Sound.play_buzzer return end end end # Play decision SE Sound.play_decision # Set action @active_battler.current_action.kind = 1 @active_battler.current_action.skill_id = @spell.id @step = 0 # Make skill window invisible
case @spell.scope when ATTACK_RANGES draw_ranges(@active_battler,6) when 0,HELP_RANGES draw_ranges(@active_battler,7) end @enable_target_cursor = true @cursor_active = true @windows["skill"].visible = false @windows["skill"].active = false @tbs_phase = 3 @windows["help"].move_to(1) return end
if Input.trigger?(Input::C) and @windows["actor"].active == true common_event = [] cmds = GTBS::MENU_COMMAND_Translation for key in cmds.keys if cmds[key].include?(@windows["actor"].data(@windows["actor"].index)) cmd = key.clone end end case cmd when "Move" if @active_battler.moved? Sound.play_buzzer return end Sound.play_decision draw_ranges(@active_battler, 3) @windows["actor"].active = false @windows["actor"].visible = false set_active_cursor @cursor_active = true @drawn = false @tbs_phase = 5 when "Talk" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @enable_target_cursor = true draw_ranges(@active_battler, 10) update_target_cursor(true) #forces refresh of @step = 0 @tbs_phase = 10 @windows["actor"].active = false @windows["actor"].visible = false @cursor_active = true when "Attack" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @enable_target_cursor = true draw_ranges(@active_battler, 8) update_target_cursor(true) #forces refresh of @step = 0 @tbs_phase = 4 @windows["actor"].active = false @windows["actor"].visible = false @cursor_active = true
when "Skill" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @windows["skill"].refresh(@active_battler) @windows["skill"].active = true @windows["skill"].visible = true @windows["skill"].index = 0 @windows["actor"].active = false @windows["actor"].visible = false @windows["status"].visible = false set_active_cursor @windows["help"].visible = true @windows["help"].move_to(0) when "Item" if @active_battler.perfaction? Sound.play_buzzer return end Sound.play_decision @windows["item"].change_actor(@active_battler) @windows["item"].active = true @windows["item"].visible = true @windows["item"].index = 0 @windows["item"].refresh @windows["actor"].active = false @windows["actor"].visible = false @windows["status"].visible = false set_active_cursor @active_battler.current_action.kind = 2 @windows["help"].visible = true @windows["help"].move_to(0) when "Wait", "Defend" if GTBS::WAIT_CONFIRM Sound.play_decision @freeze_scroll = true if @active_battler.perfaction? and !@active_battler.moved? text = "Do not move this turn?" elsif @active_battler.moved? and !@active_battler.perfaction? text = "Do no attack this turn?" elsif !@active_battler.moved? and !@active_battler.perfaction? text = "Do not move or attack this turn?" elsif @active_battler.moved? and @active_battler.perfaction? @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 6 return end @windows["confirm"].refresh(text) @windows["confirm"].active = true @windows["actor"].active = false @windows["actor"].visible = false else @windows["actor"].active = false @windows["actor"].visible = false @tbs_phase = 6 return end
when "Status" Sound.play_decision @windows["detail"].refresh(@active_battler) @windows["detail"].active = true @windows["detail"].visible = true @windows["actor"].active = false @windows["actor"].visible = false @windows["help"].visible = false @windows["status"].visible = false end $game_troop.interpreter.setup(common_event, 0) return end end end
GTBS Reach Extension
Spoiler:
CODE
#=============================================================================== # GTBS Reach Extension v1.1 # by ???nOBodY??? (aka sUBzeR_0) # Requested By: cunningham1991 # Last Updated: 4/19/11 #=============================================================================== # This Script is made specfically for usage with GTBS version 1.5.1.4 by GubiD. #=============================================================================== # # This script allows you to setup a GTBS battle's victory condition to reach, for # multiple locations. For example, let's say you have hallways 2+ tiles wide, and # you want the victory condition "reach" to span the entire width of the hallway # (2+ tiles). By default, the GTBS does not offer this feature, which is where # this script comes in: # # tbs_victory("reach", [14,27], 87) => tbs_victory("reach", [14,27,15,27], 87) # ONE TILE TWO TILES # # In this example, the goal is to reach either (14,27) or (15,27); adjacent tiles. # There is support for unlimited "reach" locations. To add more possible "reach" # locations, go to lines 201-222 and add the following: # # elsif battler.x == @vic_val[8] and battler.y == @vic_val[9] # add_vic_com # # AFTER # # elsif battler.x == @vic_val[6] and battler.y == @vic_val[7] # add_vic_com # # See the pattern? To add more, you simply add the conditionals for more array # elements, which you can then add into your tbs_victory script call, using the # format of [x1,y1,x2,y2,x3,y3] and so on... # #=============================================================================== # # This script also includes something I like to call the "FE Treasure System". I # remember playing the first Fire Emblem game (GBA) to hit North America's shores, # and remember sending my thief to every corner of the deserts to find treasures, # rare and valuable. Well, this system does just that. When a character steps onto # a specific tile, they will recieve the rewards associated with this script's # setup. # # Also included, is iPenguin's (creationasylum.net) Neutral Patch, which fixes a # game breaking bug involving movement of neutral characters when all enemies are # dead. # #===============================================================================
module SUBZERO_MODULE # Hash of strings to determine what text will be shown... GTBS_REACH_KEYS ={ # Reach Key => String, 0 => nil, 1 => "Reach the mysterious man's plaza!", 2 => "Reach the far side of the island!", } # Do not remove this.
# Hash of arrays of arrays, to determine what treasures can be found where, on # which maps... GTBS_TREASURE_SYSTEM_KEYS ={ # Map Key => {[X-Coordinate,Y-Coordinate,item_type,item_id,amount], # [X-Coordinate,Y-Coordinate,item_type,item_id,amount],} 0 => nil, 1 => [[12,3,'I',2,1],[13,4,'I',1,1],[14,5,'I',3,1]], } # Do not remove this.
# Fixes a crash that occured when Neutrals would have no more enemies to fight. # -(iPenguin@creationasylum.net) NEUTRAL_PATCH = true end
#~ class Game_Temp #~ #-------------------------------------------------------------------------- #~ # * Public Instance Variables #~ #-------------------------------------------------------------------------- #~ attr_accessor :fe_treasure_system_switches # Ensures reward's gained only once #~ #-------------------------------------------------------------------------- #~ # * Object Initialization #~ #-------------------------------------------------------------------------- #~ alias sz_gtbs_reach_extension_initialize initialize #~ def initialize #~ sz_gtbs_reach_extension_initialize #~ @fe_treasure_system_switches = [false,false,false] #~ end #~ end
class Game_System #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :reach_key # Determines which reach key to use on # battlestart attr_accessor :reach_special # Area reach victory, rather than points attr_accessor :fe_treasure_system_switches # Ensures reward's gained only once attr_accessor :fe_treasure_system_ex_switches # Ensures event occurs only once #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias sz_gtbs_reach_extension_initialize initialize def initialize sz_gtbs_reach_extension_initialize @reach_key = 0 @reach_special = 0 @fe_treasure_system_switches = [false,false,false] @fe_treasure_system_ex_switches = [false,false,false,false] end end
#---------------------------------------------------------------------------- # Judge - This determines battle results setup within victory/failure conditions #---------------------------------------------------------------------------- def judge #------------------------------------------------------------- # Check FE Treasure System #------------------------------------------------------------- fe_treasure_system #------------------------------------------------------------- # Check Victory Conditions #------------------------------------------------------------- case @vic_condition when nil #All enemies dead if enemies.size == 0 add_vic_com end when "reach" for battler in actors # If true, and there's four or more locations, automatically use a custom # formula for triangulating an area, versus a point to reach. if @vic_val[6] != nil && @vic_val[7] != nil && $game_system.reach_special == 1 #Area, not point victory... if battler.x >= @vic_val[0] and battler.y >= @vic_val[1] if battler.x <= @vic_val[2] and battler.y >= @vic_val[3] if battler.x >= @vic_val[4] and battler.y <= @vic_val[5] if battler.x <= @vic_val[6] and battler.y <= @vic_val[7] add_vic_com end end end end elsif battler.x == @vic_val[0] and battler.y == @vic_val[1] add_vic_com elsif battler.x == @vic_val[2] and battler.y == @vic_val[3] add_vic_com elsif battler.x == @vic_val[4] and battler.y == @vic_val[5] add_vic_com elsif battler.x == @vic_val[6] and battler.y == @vic_val[7] add_vic_com end end when "boss" present = 0 boss = $data_enemies[@vic_val].name for battler in enemies if battler.name == boss present = 1 end end if present == 0 add_vic_com end when "critical_enemy" en = $data_enemies[@vic_val[0]].name for battler in enemies if battler.name == en perc = battler.hp/battler.maxhp.to_f * 100 unless @vic_val[1] == nil if perc <= @vic_val[1] add_vic_com end end end end when "critical_actor" actor = $game_actors[@vic_val[0]] perc = actor.hp/actor.maxhp.to_f * 100 unless @vic_val[1] == nil if perc <= @vic_val[1] add_vic_com end end when "holdout" if $game_temp.battle_turn == @vic_val add_vic_com end end #------------------------------------------------------------- # Check Failure conditions #------------------------------------------------------------- case @fail_condition when "holdout" if $game_temp.battle_turn > @fail_val add_fail_com end when "death" exist = 0 actor = $game_actors[@fail_val].name for battler in actors + neutral if battler.name == actor exist += 1 end end if exist == 0 add_fail_com end end #If all Actors dead if actors.size == 0 add_fail_com end end
def fe_treasure_system if SUBZERO_MODULE::GTBS_TREASURE_SYSTEM_KEYS.include?($game_map.map_id) for array in SUBZERO_MODULE::GTBS_TREASURE_SYSTEM_KEYS[$game_map.map_id] for battler in actors if battler.x == array[0] and battler.y == array[1] case array[2] when "I" if $game_system.fe_treasure_system_switches[SUBZERO_MODULE::GTBS_TREASURE_SYSTEM_KEYS[$game_map.map_id].index(array)] == false $game_party.gain_item($data_items[array[3]], array[4]) $game_system.fe_treasure_system_switches[SUBZERO_MODULE::GTBS_TREASURE_SYSTEM_KEYS[$game_map.map_id].index(array)] = true end when "W" $game_party.gain_item($data_weapons[array[3]], array[4]) when "A" $game_party.gain_item($data_armors[array[3]], array[4]) end end end end end end
#=============================================================================== # Neutral bugfix by iPenguin@creationasylum.net #=============================================================================== if SUBZERO_MODULE::NEUTRAL_PATCH def find_approach_move(move_positions) battler = @active_battler if battler.is_a?(Game_Enemy) away = actors + neutral else away = enemies end
closest = 9999 close = nil t_pos = [] # Temporary position container tmove_pos = [] # target move position safe_dist = battler.base_move_range # distance in which is 'safe' targeten = closest_enemy[0] # Chosen enemy to approach (closest)
dist = pos_distance(targeten,battler) if battler.is_a?(Game_Enemy) and actors.size < enemies.size and dist > battler.view_range return [battler.x, battler.y] #no move end
# Advanced position select method positions = calc_pos(battler,30,0,"move")
for pos in positions ### Edit for neutral if targeten != nil##added if targeten.front == pos and t_pos == [] t_pos = pos elsif targeten.lside == pos and t_pos == [] t_pos = pos elsif targeten.rside == pos and t_pos == [] t_pos = pos elsif targeten.front == pos t_pos = pos else#added t_pos = [] #added end#added end ### end edit for neutral end if t_pos != [] route = @route[positions.index(t_pos)] max_route = [] for i in 0...route.size max_route.push(route[i]) if i < battler.base_move_range #pushes only positions in which you can move to end path_pos = get_move_positions_from_route(battler, max_route) #gets x,y coords of recommended movement route
for pos in path_pos #cycles through each position, starting with closest to ensure it is 'safe' and not occupied next if !can_occupy?(battler, pos) #skip pos if cannot occupy tdist = (targeten.x-pos[0]).abs + (targeten.y-pos[1]).abs #get distance if (tdist > safe_dist) #is safe? close = targeten closest = tdist tmove_pos = pos #set move position end end end
closest = 999 close = nil if battler.ai_level < 2 or tmove_pos == [] for pos in move_positions for target in away tdist = (target.x-pos[0]).abs + (target.y-pos[1]).abs if (closest > tdist) and (tdist > safe_dist) and battler.ai_level > 1 close = target closest = tdist tmove_pos = pos elsif (closest > tdist) and battler.ai_level == 1 close = target closest = tdist tmove_pos = pos end end end end return tmove_pos end
#---------------------------------------------------------------- # Pos Distance - Compares the two objects x,y to determine distance #---------------------------------------------------------------- def pos_distance(p1, p2) #neutral edits here if (p1 != nil and p2 != nil)#added here return ((p1.x-p2.x).abs + (p1.y-p2.y).abs) else#added return 999#added end #added #end neutral edits end
end # end Neutral Patch
end
GTBS Talking/FE Battling
Spoiler:
CODE
Get from the demo. It's outgrown "spoilers" and "codeboxes"... The non-compatibility version is included, but disabled, and outdated.
Now hosted on mediafire, since I don't have enough allotted space on this site to make it an attachment. >.<
*As of 10-12-12 there are now two versions of the demo; [non-ISO demo] + [Beta ISO maps /w editor]. *[Beta ISO maps /w editor - PATCH] only contains the files needed to patch the non-ISO demo to the other version, but keep in mind that if you do so, it'd be advised to keep a backup pre-patching to avoid unnecessary... complications.
Q: Why is this called GTBS Customs Project? A: Actually, I'm not sure. How about you test it, and let me know? (If you're diligent to notice what I did there, I applaud you.)
Q: That doesn't answer the question... What kinds of things does the demo have? A: The various add-ons included in this project, do a multitude of different things. For example, the core engine has a minor fix regarding enemies using skills. Others mimic functions from the Fire Emblem franchise, including the "Talk" command for actors. Others merely provide greater functionality and/or control over the engine itself, such as forced movement. This is an ongoing project to expand on GTBS's horizons via scripting and eventing.
Q: How do I make Spell Levels compatible with GTBS? A: Why don't you try my patch?
Q: Why doesn't GTBS Talking/FE Battling work with the GTBS Spell Levels Patch? A: The individual scripts are not compatible. Use the compatibility version of GTBS Talking/FE Battling. It has both scripts merged for compatibility.
Credit and Thanks:
- ???nOBodY??? - ModernAlgebra (for his Fog of War script - Nelderson (for his Fog of War GTBS patch, and various "little contributions") - Clarabel (for her Isometric Tilemap editor) - iPenguin (from creationasylum.net) && dricc (from rmvk.net) - GuBiD
Author's Notes:
Heyyy! My GTBS Add-Ons finally have their own topic! My Talking/FE Battling (Compatibility) script includes the most recently updated version of my Spell Levels patch, so if you use GTBS, I highly recommend... not using the other one. As a little present, GuBiD's demo island has... Ahhh! It's too horrible to say! ;)
This post has been edited by ???nOBodY???: Oct 12 2012, 07:07 PM
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
I had the urge to quick test for no particular reason, and found three methods that were wrong; if you're one of the three who downloaded before this post, re-download. Else, you should be fine.
Edit: Screenshots Added! Edit_2: Yes, teleporting back to the island is meant to land you in the lava; if you're not in debug mode... *restart*
This post has been edited by ???nOBodY???: Jul 25 2011, 07:01 PM
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
I actually have a couple more things to add when I get a chance......
1. State auras - This allows maps to have certain places give states when either players or enemies land on them.
2. Extra Tile cost - The allows certain tiles to cost extra movement. So let's say forest tiles will now cost 2 squares to move, etc.......
3. En_Large_Unit fix - This is a quick and dirty fix for the large enemy units.....
Hopefully I'll get to this tonight.....but if I don't it'll definitely be this week
Nice; your contributions are generally pretty neat. Hmm... I think i'll have to link back to your dnd configuration as well...
Edit: *linked*
This post has been edited by ???nOBodY???: Jul 26 2011, 05:06 PM
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
If you want more colors, go check out the Engine Settings...
=end
#-----------------------------------------------------------------------# #Skill_ID => [is_zone_effect?, AoE, state, anim, initial_effect?, color] # #is_zone_effect = duh....set it to true if you want it to work #AoE is the mount of squares from the center you want it #state is the State ID #anim is the Animation ID you want #color is the Color you want the zone to be... #-----------------------------------------------------------------------#
DEFAULT_ZONE_COLOR = "YELLOW" #NOT USED
def self.zone_effect(skill_id) case skill_id when 95; return [true, 1, 32, 57, true, "ORANGE"] else; return [false, 0, 0, 0, false, nil] end end
alias main_update_zone_effect main_update def main_update zphase = @tbs_phase main_update_zone_effect if zphase == 9 and zphase != @tbs_phase @zone_count = 0 if @zone_index != [] check_zone_effect end end end def check_zone_effect for a in 0...@zone_index.size a_battler = @active_battler_last positions = @current_zone_effects[a][0] state = @current_zone_effects[a][1] anim = @current_zone_effects[a][2] id = @current_zone_effects[a][2] for battler in actors + neutral + enemies if a_battler != battler then next end for zpos in positions if battler.x == zpos.x && battler.y == zpos.y battler.add_state(state, true) if !GTBS::VX battler.add_state(state) if GTBS::VX if anim > 0 and battler.state?(state) battler.animation_id = anim @wait_count = get_wait_guess_for_animation(anim) end else next end end end end end
alias make_skill_result_zone_effect make_skill_result def make_skill_result(target, battler = @active_battler) make_skill_result_zone_effect(target, battler = @active_battler) spell = $data_skills[battler.current_action.skill_id] if @zone_count != 1 make_zone_effect(spell, battler) end end
def make_zone_effect(spell, battler) zone = GTBS.zone_effect(spell.id) is_zone = zone[0] if is_zone == false return end if @zone_area != [] @zone_area = [] end aoe = zone[1] dist = aoe + 1 x = @cursor.x #Center x for zone effect y = @cursor.y #Center y for zone effect state = zone[2] anim = zone[3] init_effect = zone[4] color = zone[5] max_x = x + dist min_x = x - dist max_y = y + dist min_y = y - dist for a in min_x..max_x for b in min_y..max_y if (a - x).abs + (b - y).abs < dist @zone_area.push(POS.new(a, B)) else next end end end @current_zone_effects.push([@zone_area, state, anim, battler.id]) for tile in @zone_area effect_tile.push(Sprite_Zone_Effects.new(@spriteset.viewport4, 1, tile.x, tile.y, color, true)) end @zone_index.push(effect_tile) #--------------------------------------------------------------- #@zone_index and @current_zone_effects, should be the same index #--------------------------------------------------------------- #Stops from casting multiple areas, for the same skill instance #--------------------------------------------------------------- @zone_count = 1 #-------------------------# #INITIAL EFEECTS FOR AREA # #-------------------------# if init_effect == true for a in 0...@zone_index.size if a != @zone_index.size - 1 then next end positions = @current_zone_effects[a][0] state = @current_zone_effects[a][1] anim = @current_zone_effects[a][2] id = @current_zone_effects[a][2] for battler in actors + neutral + enemies for zpos in positions if battler.x == zpos.x && battler.y == zpos.y battler.add_state(state, true) if !GTBS::VX battler.add_state(state) if GTBS::VX if anim > 0 and battler.state?(state) battler.animation_id = anim @wait_count = get_wait_guess_for_animation(anim) end else next end end end end end return end
def effect_tile #Similar to def tiles method @spriteset.effect_tiles end
end
#---------------------------------------------------------------------------- # Sprite Zone Effects - Used to display all "RANGES" during battle #---------------------------------------------------------------------------- # Check class Sprite_Range, it's the same thing #----------------------------------------------------------------------------
class Sprite_Zone_Effects < Sprite_Base attr_accessor :ox attr_accessor :oy #---------------------------------------------------------------------------- #Constants #---------------------------------------------------------------------------- ANIM_FRAMES = 4 #---------------------------------------------------------------------------- # Object initialization #---------------------------------------------------------------------------- # type = 1-7, passed by 'def draw_ranges' from Scene_Battle_TBS #---------------------------------------------------------------------------- def initialize(viewport, type, x, y, color, visible = true) super(viewport) self.visible = visible self.bitmap = Bitmap.new(32,32) self.opacity = 50 @wait = 6 @pattern = [0,1,2,3] @p_index = 0 #pattern index @h = 0 @type = type @color = color @x = x, @y = y @oy = y; @ox = x @iso = $game_map.iso? @anim = GTBS::ANIM_TILES moveto(@ox, @oy) refresh end #---------------------------------------------------------------------------- # Map is Iso? #---------------------------------------------------------------------------- def iso? return @iso end #---------------------------------------------------------------------------- # Refresh - Process to update/set the bitmap for the object #---------------------------------------------------------------------------- def refresh #create rectangle to fill is not using a picture rect = Rect.new(1, 1, 30, 30) if iso? case @type when 1; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_color}_iso_range")) when 2; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.move_color}_iso_range")) when 3; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.help_skill_color}_iso_range")) when 4; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_skill_color}_iso_range")) when 5; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_skill_color}_iso_range")) when 6; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.help_skill_color}_iso_range")) when 7; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_color}_iso_range")) end if self.bitmap.width > self.bitmap.height @anim = true end else #non iso if @anim case @type when 1; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_color}_range")) when 2; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.move_color}_range")) when 3; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.help_skill_color}_range")) when 4; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_skill_color}_range")) when 5; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_skill_color}_range")) when 6; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.help_skill_color}_range")) when 7; self.bitmap = RPG::Cache.picture(sprintf("GTBS/#{$game_system.attack_color}_range")) end else case @type when 1; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) when 2; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) when 3; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) when 4; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) when 5; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) when 6; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) when 7; self.bitmap.fill_rect(rect, GTBS::get_color(@color)) end end end if [1,2,3].include?(@type) self.opacity = 120 end if [5,6,7].include?(@type) self.opacity = 255 end if @anim @cw = self.bitmap.width / ANIM_FRAMES else @cw = self.bitmap.width end @ch = self.bitmap.height self.opacity = 0 if visible == false update end #---------------------------------------------------------------------------- # Dispose process #---------------------------------------------------------------------------- def dispose unless self.bitmap == nil self.bitmap.dispose self.bitmap = nil end super end #---------------------------------------------------------------------------- # MoveTo - sets the current X,Y location on the map #---------------------------------------------------------------------------- def moveto(x, y) @ox = x; @oy = y @x = x % $game_map.width @y = y % $game_map.height @real_x = @x * (GTBS::VX ? 256 : 128) @real_y = @y * (GTBS::VX ? 256 : 128) end #---------------------------------------------------------------------------- # Screen X - sets X based on current map position #---------------------------------------------------------------------------- def screen_x if @iso if GTBS::VX x = ((@real_x - @real_y)/8 + (32 * $game_map.height) - 0 - $game_map.display_x/8) - 32 else x = ((@real_x - @real_y)/4 + 32*$game_map.height - 0 - $game_map.display_x/4)-27 end else if GTBS::VX x = ($game_map.adjust_x(@real_x) + 8007) / 8 - 1000 # else x = ((@real_x - $game_map.display_x + 3) / 4) end end x += (@direction == 8 ? @offset : @direction == 6 ? -@offset : 0) return x end #---------------------------------------------------------------------------- # Screen Y - sets Y based on current map position #---------------------------------------------------------------------------- def screen_y if @iso if GTBS::VX y = (@real_y + @real_x) / 16 + 24 - $game_map.display_y/8 - (@h * 8) - 24 else y = ((@real_y + @real_x) / 8 + 24 - $game_map.display_y / 4 - (@h * 8)) -25 end return y else if GTBS::VX y = ($game_map.adjust_y(@real_y) + 8007) / 8 - 1000 # else y = ((@real_y - $game_map.display_y + 3) / 4 ) end return y end end #---------------------------------------------------------------------------- # Get Z coords #---------------------------------------------------------------------------- def screen_z(height = @h) if @iso z = (0 + (height * 64)) z = z < 0 ? 0 : z return z else return 0 end end #---------------------------------------------------------------------------- # Get the current screen Tile Height #---------------------------------------------------------------------------- def screen_th(x=self.ox,y=self.oy) return 0 if !iso? tile_id = $game_map.map.data[x,y,0] return 0 if tile_id == nil if GTBS::VX if tile_id > 1623 and tile_id < 1664 return tile_id-1624 else return 0 end else t_x = (tile_id - 384) % 8 t_y = (tile_id - 384) / 8 th = t_x + t_y * 8 return th end end #---------------------------------------------------------------------------- # Update Process #---------------------------------------------------------------------------- def update super unless self.disposed? update_animation update_bitmap update_height update_location end #---------------------------------------------------------------------------- # Update animation - used to progress the animation frame index #---------------------------------------------------------------------------- def update_animation if @wait != 0 @wait -= 1 if @wait == 0 @wait = 6 #update frame every six updates @p_index += 1 if @p_index == @pattern.size @p_index = 0 end end end end #---------------------------------------------------------------------------- # Updates the height to that of the tile it is over #---------------------------------------------------------------------------- def update_height if @h != screen_th @h = screen_th end end #---------------------------------------------------------------------------- # Update bitmap based on pattern #---------------------------------------------------------------------------- def update_bitmap if @anim sx = @pattern[@p_index] * @cw rescue sx = 0 self.src_rect.set(sx, 0, @cw, @ch) else #if not using animated tiles, but using ISO, use first frame only. if iso? self.src_rect.set(0, 0, @cw, @ch) end end end #---------------------------------------------------------------------------- # Updates X, Y, Z coords #---------------------------------------------------------------------------- def update_location self.x = screen_x unless self.disposed? self.y = screen_y unless self.disposed? self.z = screen_z unless self.disposed? end end
#============================================================================== # ** Spriteset_Battle_GTBS #------------------------------------------------------------------------------ # This class creates the battle map and renders the battle scene/actors/enemies #==============================================================================
#---------------------------------------------------------------------------- # * Create Tile/Range sprites #---------------------------------------------------------------------------- alias zone_effect_create_tr_sprites create_tr_sprites def create_tr_sprites zone_effect_create_tr_sprites @effect_tiles = [] end
#-------------------------------------------------------------------------- # * Dispose of Viewport #-------------------------------------------------------------------------- alias zone_effect_dispose_viewports dispose_viewports def dispose_viewports zone_effect_dispose_viewports @viewport4.dispose end
#-------------------------------------------------------------------------- # * Update Tile/Range Sprites #-------------------------------------------------------------------------- alias zone_effect_update_tr_sprites update_tr_sprites def update_tr_sprites zone_effect_update_tr_sprites for sprite in @effect_tiles sprite.update end end
#-------------------------------------------------------------------------- # * Update Viewport #-------------------------------------------------------------------------- alias zone_effect_update_viewports update_viewports def update_viewports zone_effect_update_viewports @viewport4.update end
end
Put this BELOW the battle system....and probably most other scripts. If you have any questions or suggestions, just post them on this thread.....
Enjoy! :D
EDIT:I just noticed you need this script above it to work. The Demo above has this already in it....but if you want just this you need this little script! Don't worry......it's small!
CODE
#By dricc at rmrk class Scene_Battle_TBS attr_accessor :active_battler_last
#-------------------------------------------------------------------------- # Short hand method calls #-------------------------------------------------------------------------- def active_battler return @active_battler_last end
alias dricc_set_active_battler set_active_battler def set_active_battler(battler) @active_battler_last = battler dricc_set_active_battler(battler) end end
This post has been edited by Nelderson: Aug 26 2011, 05:15 AM
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
*smacks forehead* Of course it does. It contains the same script twice. Delete "**Scene_Battle_Default" script entry...
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
Download the demo again? (removed the intruding scripts)
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
-Scene_Battle_Default v1.1 has now been incorporated to provide for GTBSv1.5.1's modification to call_battle, by allowing the battle system scene to be called to be chosen based on which is active; either Scene_Battle_TBS, Scene_Battle_Default, or whatever the state of Scene_Battle. Also added (not throughly tested for bugs), is the Wall Extension v4.13 script, allowing for wall tiles to be highly customizable...
-I also added $imported["GTBS v1.5.1"] to the top of the Compatibility Module, for another compatibility reason.
-Nelderson's updated his Base Camp script to v1.1, and added some extra snippets and shtuff...
-Some other minor script additions and modifications that I can't remember... (see the spoiler for "Features" in the OP; and scripts with the "NEW!" .gif)
This post has been edited by ???nOBodY???: Oct 19 2011, 11:39 PM
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
QUOTE (Betasoft productions @ Oct 26 2011, 11:44 PM)
Your demo produces numerous errors, please fix.
Yeah.....
You're gonna have to be a little more specific than that man....
There's a lot of duct tape holding this thing together. What are you trying to do? I know the scripts do work, but some of the features might need a little re-working to fit your specific needs......
EDIT: Wow.....I haven't seen it since the last update. You are 100% correct that things need to be fixed for this script compilation.....
???nOBodY???......I summon thee!!!!
This post has been edited by Nelderson: Oct 27 2011, 03:16 AM
Lol; apparently someone summoned me to the rmvx realms... I thought duct tape would fix everything, but it has failed. The solution? We're going to need more duct tape.
Anywho, I think I'll actually bugtest it to the fullest today. The only script I can see causing issues is the new(ish) wall extension one. It does seem to be quite the beaat, and is laggy and buggy enough to be flagged as the probable cause... Plus, it's the only real "new(ish)" script I added. My two custom scenes don't count. They don't overwrite anything...
Nelderson is correct in saying "i get numerous errors" is a little vague; listing even a couple would go a long way towards solving the problem quickly and efficiently. A single script may also cause, say, five errors... Once, I used bulletxt's audio engine, and couldn't figure out for the life of me why I got random game crashes with a random error, from about 3 different error msgs... Anyways, that's just my two cents' worth... Oh, and 5 minutes ago I started on another fire emblem-esque addition, lol.
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.
ROFL; that error makes perfect sense now... You see, I aliased the initialize method in Game_Actor in Scene_Battle_Default, the DEFAULT way... which doesn't work, 'cause of the Actor Clones script, which changes that method to require TWO arguments versus the default ONE... so, change this:
CODE
alias sz_scene_battle_default_initializer initialize def initialize(actor_id) sz_scene_battle_default_initializer(actor_id)
to this:
CODE
alias sz_scene_battle_default_initializer initialize def initialize(actor_id,actor_model_id=nil)#(actor_id) sz_scene_battle_default_initializer(actor_id,actor_model_id)#(actor_id)
in Scene_Battle_Default, and the error is fixed. Sorry guys, I completely forgot that I had modified the Game_Actor class's initialize method in all the other scripts, neglecting to do the same for this one (rather "new").
--------------------
*It is time to update the Master Script List! Stop by and help out at the Master List Update Project. *Oh? You have feedback for me? Take it to The Shadowed Topic. *By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.
My Scripts
Spoiler:
*All of my publicly released RGSS2 scripts are free to use noncommercially, provided that credits are given where due. *If you want to use any of them commercially, contact me via PM. *All of my publicly released RGSS2 scripts are rpgmakervx.net exclusive, and should not be posted elsewhere without my permission.