I recently discovered a bug in my game that prevented any kind of slipdamage while in a battle from actually doing any damage. After some testing I have found the problem: the Battlesystem I am using and a script that will show a SP popup if they're healed are causing this error if they're both installed. I have added a sample project with both scripts inside in the Attachments. Note: The Battlesystem was aparently made for the Postality Knights Edition which is probably the reason for this bug. If someone could come up with a patch to fix that, that would be great =) If it can't be done, I will accept that.
I have a second request regarding this battlesystem as well which is completely optional but something I'd like.
I put it in a spoiler since it is not necessary but would be very much appreciated. Also I belive it might be better of in the Request section but since it would require the patch from above anyway...
I know that this is a huge thing to ask for and I'm entirely fine with doing something in return for whoever is going to help me with this. I don't know what that "something" might be just yet but that I belive will depend on what that someone who will help me will want me to do. (And I belive the grammar in that last sentence was probably not accurate XD)
This is my request: If you are familiar with the Tanketai SBScan be found here (The page is in german but you will find the Demo at the very bottom named "Enu_SBS_Tanketai_XP.rar") you are probably familiar with it's Advanced Collapse Add-on (which in turn was based of the early Final Fantasy Games). Once the last hit was given to the enemy, the music would fade out. Monster and screen would then flash white and the enemy would slowly crumble away.After that, the victory theme starts playing. It is customizable which enemys would have this so it is perfect for bossbattles. I have recorded that particular part from the Demo in case you don't know what I'm talking about. As you have probably guessed allready, my request would be to have something similar thtat is compatible with the battlesystem above. Again: I know this is a huge request. I did try to work something out myself but with that little knowledge about scripting that I have it could just not be done.Again: I know this is a huge request. I did try to work something out myself but with that little knowledge about scripting that I have it could just not be done.
This post has been edited by yamina-chan: Oct 9 2011, 03:33 PM
I just noticed that the one of the links I added stopped working in the last few days aparently, so I changed it. If that was the reason that nobody replied, I apologize.
__________________________
There is a game out there for everyone. All you have to do is to find it.
For various reasons. One of them beeing that the DBS is meant for four people, but my game is set up for three party members. Second: I wanted a simple Battlesystem that was not the default one and I want one that not that many people use. Third: I really like the way this system looks and works with my other customisations - exept for the SP Popup as of now. Fourth: Might be a silly reason but I simply adore the fact that while this script uses battlers, it will also draw the sprite belonging to it next to the character. Fifth: While it is not the DBS I have found out that most scripts designed to work with that are also compatible with this. "Bigger" systems sometimes have problems with that. Reason number six would be that I have asked for help with this script before and I wouldn't want to let the effort the other person was taking go to waste by simply abandoning the script now. The last reason as of now will sound as if I'm really lazy, but I really don't want to go trough to setting up a new battlesystem from scratch. Over the last weeks I have tried to work out a vehicle system that will work with my game and that allready is taking way more time then I was hoping it would. I am just one person, if I overdo myself in this I will never finish this game at all and I don't intend to let that happen. If it's to complicated to find a patch of some sort and if my second request can not be done as well, I will give up on those ideas. While I would love to use them, when it comes down to it they are Add-ons. I do not "need" them to finish my game as I would with mentioned vehicle system above. But since I can be a perfectionist sometimes I would like to create the best game I can so that those who will play it actually enjoy the experience.
__________________________
There is a game out there for everyone. All you have to do is to find it.
Well the script you attched is the default system, with ATB adn fancy bars. And there's a LOT of other scripts that do this better. Unless you have something different from the demo you posted.
I'm not telling you to change to an whole full animated battle system, like tankentai. But this atb is really bad and outdated... and there is better options for ATB than that. But if that's your choice... whatever, i was just pointing an option that might solve your question.
This post has been edited by Atoa: Oct 5 2011, 03:25 PM
And I thank you for that =) For a scripter at your level this must look like a really stupid choice I bet. I was told before by a scripter that I have made a strange choice. Still: since it is close to the DBS it works with many other scripts as well and it has this unice feeling to it. I don't mind asking for help, but I hate to do it again and again so before I made this thread I took the time to search for a diffrent battlesystem that would work with other scripts I have installed and still look good and be fun to play while not overly complicated to add at the curent state of my projcet. When I could not find anything I decided to ask for help after all.
__________________________
There is a game out there for everyone. All you have to do is to find it.
#============================================================================== # KGC Active Count Battle # By KGC #==============================================================================
module KGC
# Set wait mode # 0 = full active # 1 = semi-active time stop to choose items and skills # 2 = full wait, time stop to choose any action ACB_WAIT_MODE = 2 # Can be changed with script calls during games # call $game_system.wait_mode = 0/1/2
# Set if time bar will stop during actions ACB_ACTION_WAIT = true # Can be changed with script calls during games # call $game_system.action_wait = true/false
# Set the battle speed ACB_BATTLE_SPEED = 600 # Can be changed with script calls during games # call $game_system.battle_speed = 100~800
# Set wait time for nornal attacks, value higher than 0 ACB_ATTACK_WAIT = 1
# Set wait time for defend, value higher than 0 ACB_GUARD_WAIT = 0.5
# Set wait time for skill, if you use skill chant, set it 0, othewise # this should be higher than 0 ACB_SKILL_WAIT = 0
# Set wait time for items, value higher than 0 ACB_ITEM_WAIT = 0.1
# Set chant wait time ACB_CHANT_WAIT = 0.75
# Set if skills will have chant time, if true skills will have chant time # based on the following settings ACB_SKILL_CHANT = true
# All Skill with Int_f X or higher will have chant ACB_CHANT_SKILL_INT_F = 1
# All Skill with Atk_f X or higher will not have chant ACB_NOT_CHANT_SKILL_ATK_F = 2
# Set individual chant time for skills. # { Skill_ID => Chant, Skill_ID => Chant, ...} ACB_CHANT_TIME = {}
# SE played when the ATB is full ACB_MAX_SE = RPG::AudioFile.new("105-Heal01", 100, 150)
# Message displayed when trying to escape (to escape, keep Z pressed) ACB_ESCAPE_MESSAGE = "Escaping..."
# Message displayed when it's not possible to escape ACB_CANT_ESCAPE_MESSAGE = "Can't escape!!"
# Delay time if hit during input ACB_INVALID_DELAY_INPUT = false
# Slip damage setting # 0 = Slip damage will occur before action # 1 = Slip damage will occur all at the turn end (wich occur after a # set number of actions) ACB_SLIP_DAMAGE = 0
module RPG::Cache #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def self.acb(filename, hue = 0) self.load_bitmap("Graphics/ACB/", filename, hue) end end
#============================================================================== # ** Game_Temp #------------------------------------------------------------------------------ # This class handles temporary data that is not included with save data. # Refer to "$game_temp" for the instance of this class. #==============================================================================
class Game_Temp #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- attr_accessor :turn_acb_count attr_accessor :acb_count_speed #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias initialize_KGC_ActiveCountBattle initialize def initialize initialize_KGC_ActiveCountBattle @turn_acb_count, @acb_count_speed = 1000, 10 end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def set_turn_acb_count(speed) @turn_acb_count = speed * $game_system.battle_speed @acb_count_speed = speed * 4 / $game_party.actors.size end end
#============================================================================== # ** Game_System #------------------------------------------------------------------------------ # This class handles data surrounding the system. Backround music, etc. # is managed here as well. Refer to "$game_system" for the instance of # this class. #==============================================================================
class Game_System #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- attr_accessor :wait_mode attr_accessor :action_wait attr_accessor :battle_speed #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias initialize_KGC_ActiveCountBattle initialize def initialize initialize_KGC_ActiveCountBattle @wait_mode = KGC::ACB_WAIT_MODE @action_wait = KGC::ACB_ACTION_WAIT @battle_speed = KGC::ACB_BATTLE_SPEED end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def battle_speed=(speed) @battle_speed = [[speed, 100].max, 800].min end end
#============================================================================== # ** Game_Battler (part 1) #------------------------------------------------------------------------------ # This class deals with battlers. It's used as a superclass for the Game_Actor # and Game_Enemy classes. #==============================================================================
class Game_Battler #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- attr_reader :acb_gauge attr_accessor :chant_gauge_max attr_accessor :turn_count #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias initialize_KGC_ActiveCountBattle initialize def initialize initialize_KGC_ActiveCountBattle @acb_gauge, @acb_gauge_max = 0, 1000 @chant_gauge_max, @turn_count = 0, 0 end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def acb_max return @chant_gauge_max > 0 ? @chant_gauge_max : @acb_gauge_max end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def acb_gauge=(value) @acb_gauge = [value, 0].max end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def acb_gauge_max return @acb_gauge_max end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def set_acb_gauge self.make_action_speed n = $game_temp.turn_acb_count / 4 case @current_action.kind when 0 case @current_action.basic when 0 n *= KGC::ACB_ATTACK_WAIT when 1 n *= KGC::ACB_GUARD_WAIT end when 1 if KGC::ACB_SKILL_WAIT > 0 n *= KGC::ACB_SKILL_WAIT else skill = $data_skills[@current_action.skill_id] rate = skill.sp_cost + skill.power.abs + (skill.atk_f + skill.str_f + skill.dex_f + skill.agi_f + skill.int_f) / 4.0 rate = Math.sqrt(rate) / 20 + 1 n *= rate end if KGC::ACB_SKILL_CHANT && @chant_gauge_max > 0 skill = $data_skills[@current_action.skill_id] chant = skill.int_f >= KGC::ACB_CHANT_SKILL_INT_F && skill.atk_f < KGC::ACB_NOT_CHANT_SKILL_ATK_F n *= KGC::ACB_CHANT_WAIT if chant end when 2 n *= KGC::ACB_ITEM_WAIT end @acb_gauge = 0 @acb_gauge_max = [n.round, 1].max @chant_gauge_max = 0 end end
#============================================================================== # ** Game_Enemy #------------------------------------------------------------------------------ # This class handles enemies. It's used within the Game_Troop class # ($game_troop). #==============================================================================
class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def make_action self.current_action.clear return unless self.movable? available_actions = [] rating_max = 0 self.actions.each { |action| n = @turn_count a = action.condition_turn_a b = action.condition_turn_b next if (b == 0 && n != a) || (b > 0 && (n < 1 || n < a || n % b != a % b)) next if self.hp * 100.0 / self.maxhp > action.condition_hp next if $game_party.max_level < action.condition_level switch_id = action.condition_switch_id next if switch_id > 0 && $game_switches[switch_id] == false available_actions.push(action) rating_max = action.rating if action.rating > rating_max } ratings_total = 0 available_actions.each { |action| if action.rating > rating_max - 3 ratings_total += action.rating - (rating_max - 3) end } if ratings_total > 0 value = rand(ratings_total) available_actions.each { |action| if action.rating > rating_max - 3 if value < action.rating - (rating_max - 3) self.current_action.kind = action.kind self.current_action.basic = action.basic self.current_action.skill_id = action.skill_id self.current_action.decide_random_target_for_enemy return else value -= action.rating - (rating_max - 3) end end } end end end
#============================================================================== # ** Window_Help #------------------------------------------------------------------------------ # This window shows skill and item explanations along with actor status. #==============================================================================
class Window_Help < Window_Base #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias set_text_KGC_ActiveCountBattle set_text def set_text(text, align = 0) last_actor = @actor set_text_KGC_ActiveCountBattle(text, align) @actor = last_actor end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def text return @text end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def reset @text, @actor = nil, nil end end
#============================================================================== # ** Window_Item #------------------------------------------------------------------------------ # This window displays items in possession on the item and battle screens. #==============================================================================
class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias refresh_KGC_ActiveCountBattle refresh def refresh(itemkind = 0) if $imported["ItemGrouping"] refresh_KGC_ActiveCountBattle(itemkind) else refresh_KGC_ActiveCountBattle end Graphics.frame_reset end end
#============================================================================== # ** Window_Skill #------------------------------------------------------------------------------ # This window displays usable skills on the skill and battle screens. #==============================================================================
class Window_Skill < Window_Selectable #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias refresh_KGC_ActiveCountBattle refresh def refresh(skillkind = 0) if $imported["SkillGrouping"] refresh_KGC_ActiveCountBattle(skillkind) else refresh_KGC_ActiveCountBattle end Graphics.frame_reset end end
#============================================================================== # ** Window_BattleStatus #------------------------------------------------------------------------------ # This window displays the status of all party members on the battle screen. #==============================================================================
class Window_BattleStatus < Window_Base #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- @@_acb_gauge = RPG::Cache.picture("acb_gauge.png") #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias initialize_KGC_ActiveCountBattle initialize def initialize @acb_gauge_x = 0 @acb_gauge = @@_acb_gauge.dup @acb_g_width = @acb_gauge.width / 3 @acb_g_height = (@acb_gauge.height - 2) / 4 @sprite_acb = [] (0...($imported["LargeParty"] ? KGC::LP_MAX_MEMBER : 4)).each { |i| @sprite_acb[i] = Sprite.new @sprite_acb[i].bitmap = Bitmap.new(@acb_g_width + 7, @acb_g_height + 2) @sprite_acb[i].y = 462 @sprite_acb[i].z = 2000 } initialize_KGC_ActiveCountBattle end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def _acb_gauge return @@_acb_gauge end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def _acb_gauge=(new_bitmap) @@_acb_gauge = new_bitmap @acb_gauge.dispose @acb_gauge = @@_acb_gauge.dup end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def acb_gauge return @acb_gauge end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def acb_gauge=(new_bitmap) @acb_gauge = new_bitmap end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias dispose_KGC_ActiveCountBattle dispose def dispose for sprite in @sprite_acb.compact sprite.bitmap.dispose sprite.dispose end @sprite_acb = nil dispose_KGC_ActiveCountBattle end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias refresh_KGC_ActiveCountBattle refresh def refresh refresh_KGC_ActiveCountBattle actor_max = $imported["LargeParty"] ? KGC::LP_MAX_MEMBER : 4 (0...actor_max).each { |i| if (actor = $game_party.actors[i]) == nil @sprite_acb[i].bitmap.clear next end draw_actor_acb_gauge(actor) } end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_KGC_ActiveCountBattle update def update update_KGC_ActiveCountBattle if @sprite_acb != nil @acb_gauge_x -= [@acb_g_width / 20, 1].max @acb_gauge_x = @acb_g_width << 1 if @acb_gauge_x < 0 $game_party.actors.each { |actor| draw_actor_acb_gauge(actor) } end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def draw_actor_acb_gauge(actor) @sprite_acb[actor.index].x = actor.screen_x + 68 - @acb_g_width if !$imported["HPSPAlter"] || ($imported["HPSPAlter"] && !KGC::HPSP_DRAW_NAME_LUMP) @sprite_acb[actor.index].x -= 16 end if actor.chant_gauge_max > 0 gw = actor.acb_gauge * @acb_g_width / actor.chant_gauge_max else gw = actor.acb_gauge * @acb_g_width / actor.acb_gauge_max end if KGC::ACB_GAUGE_SLANT @sprite_acb[actor.index].bitmap.fill_rect(0, 0, @acb_g_width + 7, @acb_g_height + 2, Color.new(0, 0, 0, 0)) gy = @acb_g_height + 1 (@acb_g_height + 2).times { |i| @sprite_acb[actor.index].bitmap.blt(i, gy - i, @acb_gauge, Rect.new(0, gy - i, @acb_g_width + 2, 1)) } gy -= 1 (0...@acb_g_height).each { |i| if gw < @acb_g_width if actor.chant_gauge_max > 0 gy2 = @acb_g_height * 4 + 1 else gy2 = @acb_g_height * 2 + 1 end else gy2 = @acb_g_height * 3 + 1 end @sprite_acb[actor.index].bitmap.blt(2 + i, gy - i, @acb_gauge, Rect.new(@acb_gauge_x, gy2 - i, gw, 1)) } else @sprite_acb[actor.index].bitmap.fill_rect(0, 0, @acb_g_width + 2, @acb_g_height + 2, Color.new(0, 0, 0, 0)) @sprite_acb[actor.index].bitmap.blt(0, 0, @acb_gauge, Rect.new(0, 0, @acb_g_width + 2, @acb_g_height + 2)) if gw < @acb_g_width if actor.chant_gauge_max > 0 gy = @acb_g_height * 4 + 2 else gy = @acb_g_height * 2 + 2 end else gy = @acb_g_height * 3 + 2 end @sprite_acb[actor.index].bitmap.blt(1, 1, @acb_gauge, Rect.new(@acb_gauge_x, gy, gw, @acb_g_height)) end end end
#============================================================================== # ** Interpreter (part 4) #------------------------------------------------------------------------------ # This interpreter runs event commands. This class is used within the # Game_System class and the Game_Event class. #==============================================================================
class Interpreter #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias command_129_KGC_ActiveCountBattle command_129 def command_129 if command_129_KGC_ActiveCountBattle $game_actors[@parameters[0]].set_acb_gauge return true else return false end end end
#============================================================================== # ** Interpreter (part 7) #------------------------------------------------------------------------------ # This interpreter runs event commands. This class is used within the # Game_System class and the Game_Event class. #==============================================================================
class Interpreter #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def command_339 unless $game_temp.in_battle return true end if $game_temp.battle_turn == 0 return true end iterate_battler(@parameters[0], @parameters[1]) do |battler| next unless battler.exist? battler.current_action.kind = @parameters[2] if battler.current_action.kind == 0 battler.current_action.basic = @parameters[3] else battler.current_action.skill_id = @parameters[3] end if @parameters[4] == -2 if battler.is_a?(Game_Enemy) battler.current_action.decide_last_target_for_enemy else battler.current_action.decide_last_target_for_actor end elsif @parameters[4] == -1 if battler.is_a?(Game_Enemy) battler.current_action.decide_random_target_for_enemy else battler.current_action.decide_random_target_for_actor end elsif @parameters[4] >= 0 battler.current_action.target_index = @parameters[4] end battler.current_action.forcing = true battler.acb_gauge -= 1 if $scene.input_battler == battler $scene.command_input_cancel(true) end $scene.input_battlers.delete(battler) $scene.action_battlers.delete(battler) if battler.current_action.valid? and @parameters[5] == 1 battler.acb_gauge = battler.acb_max - 1 @index += 1 return false end end return true end end
#============================================================================== # ** Scene_Battle (part 1) #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- attr_accessor :input_battler attr_accessor :action_battler attr_accessor :input_battlers attr_accessor :action_battlers #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias main_KGC_ActiveCountBattle main def main @troop_id = $game_temp.battle_troop_id $game_troop.setup(@troop_id) all_speed = 0 for battler in $game_party.actors if $imported["BattlerEffect"] battler.effect_reset end battler.blink = false all_speed += battler.agi if battler.is_a?(Game_Actor) end all_speed /= $game_party.actors.size $game_temp.set_turn_acb_count(all_speed) for battler in $game_party.actors battler.turn_count = 0 battler.set_acb_gauge battler.acb_gauge = rand(battler.acb_gauge_max * 2 / 3) battler.chant_gauge_max = 0 end @input_battlers, @action_battlers = [], [] @input_battler, @action_battler = nil, nil @turn_acb_count = @escape_count = 0
main_KGC_ActiveCountBattle end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_KGC_ActiveCountBattle update def update if @phase == 1 for battler in $game_troop.enemies battler.set_acb_gauge battler.acb_gauge = rand(battler.acb_gauge_max / 2) battler.chant_gauge_max = 0 end $game_temp.battle_main_phase = true @actor_command_window.opacity = 0 @phase = 0 elsif @phase != 5 @phase = 0 end if $game_system.battle_interpreter.running? @event_running = true end update_KGC_ActiveCountBattle if (@action_battler == nil && @wait_count > 0) || (@bonus_wait != nil && @bonus_wait > 0) || (@preempt_wait != nil && @preempt_wait > 0) return end if $game_system.battle_interpreter.running? return elsif @event_running @status_window.refresh @event_running = false end if $game_temp.gameover return if @spriteset.effect? $scene = Scene_Gameover.new return end if @phase == 5 update_phase5 return end if Input.press?(Input::A) if $game_temp.battle_can_escape if !@help_window.visible && KGC::ACB_ESCAPE_MESSAGE != nil @help_window.set_text("") @help_window.set_text(KGC::ACB_ESCAPE_MESSAGE, 1) @escaping = true end @escape_count += 1 if @escape_count >= $game_temp.turn_acb_count / 600 @escape_count = 0 update_phase2_escape unless $game_party.all_dead? end else @help_window.set_text(KGC::ACB_CANT_ESCAPE_MESSAGE, 1) end else if @escaping @escaping = false @help_window.visible = false end @escape_count = [@escape_count - 1, 0].max end acb_add if @input_battlers[0] != nil && @input_battler == nil && !@wait_on @input_battler = @input_battlers.shift if @input_battler.current_action.forcing || @input_battler.restriction == 2 || @input_battler.restriction == 3 if @input_battler.restriction == 2 || @input_battler.restriction == 3 @input_battler.current_action.kind = 0 @input_battler.current_action.basic = 0 end @action_battlers << @input_battler @input_battler = nil elsif @input_battler.inputable? if KGC::ACB_MAX_SE.is_a?(RPG::AudioFile) $game_system.se_play(KGC::ACB_MAX_SE) else Audio.se_play("Audio/SE/" + KGC::ACB_MAX_SE[0], KGC::ACB_MAX_SE[1], KGC::ACB_MAX_SE[2]) end @actor_index = $game_party.actors.index(@input_battler) @input_battler.current_action.clear @input_battler.blink = true else @input_battler.set_acb_gauge @input_battler = nil end end if @input_battler != nil @active_battler = @input_battler if @actor_command_window.opacity == 0 phase3_setup_command_window end update_phase3 end if @action_battlers[0] != nil && @action_battler == nil @action_battler = @action_battlers.shift if @action_battler.dead? || !@action_battler.movable? @action_battler.acb_gauge = 0 @action_battler = nil else if @action_battler.is_a?(Game_Actor) && !$game_party.actors.include?(@action_battler) @action_battler.set_acb_gauge @action_battler = nil else start_phase4 end end end if @action_battler != nil && !@spriteset.effect? @active_battler = @action_battler update_phase4 end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def acb_add if $game_system.wait_mode == 1 && (@skill_window != nil || @item_window != nil) @wait_on = true elsif $game_system.wait_mode == 2 && @input_battler != nil @wait_on = true elsif $game_system.wait_mode >= 1 && $game_system.action_wait && @action_battler != nil @wait_on = true else @wait_on = false end return if @wait_on @turn_acb_count += $game_temp.acb_count_speed if @turn_acb_count >= $game_temp.turn_acb_count $game_temp.battle_turn += 1 @turn_acb_count = 0 if $imported["BonusGauge"] $game_temp.bonus_rate -= 10 $game_temp.bonus_rate = [$game_temp.bonus_rate, 0].max end for battler in $game_party.actors + $game_troop.enemies battler.remove_states_auto if battler != nil if KGC::ACB_SLIP_DAMAGE == 1 && battler.hp > 0 && battler.slip_damage? battler.slip_damage_effect battler.damage_pop = true end end @status_window.refresh if @action_battler == nil setup_battle_event end
($game_party.actors + $game_troop.enemies).each { |battler| unless battler.movable? battler.acb_gauge = 0 battler.chant_gauge_max = 0 next end if $imported["CooperationSkill"] && cooperation_exec?(battler) battler.set_acb_gauge @input_battlers.delete(battler) @action_battlers.delete(battler) next end if $imported["EquipExtension"] && battler.is_a?(Game_Actor) && battler.attack_count > 0 next end gauge_max = battler.chant_gauge_max == 0 ? battler.acb_gauge_max : battler.chant_gauge_max next if battler.acb_gauge == gauge_max inc_gauge = battler.chant_gauge_max == 0 ? battler.agi : battler.int battler.acb_gauge += inc_gauge if battler.acb_gauge >= gauge_max battler.acb_gauge = gauge_max battler.turn_count += 1 if battler.current_action.forcing @action_battlers << battler next end if battler.is_a?(Game_Actor) if battler.chant_gauge_max > 0 @action_battlers << battler elsif battler.inputable? @input_battlers << battler else if battler.restriction == 2 || battler.restriction == 3 battler.current_action.kind = 0 battler.current_action.basic = 0 end @action_battlers << battler end else if battler.chant_gauge_max == 0 i = 0 loop { battler.make_action if i == 2 battler.current_action.kind = 0 battler.current_action.basic = 0 end if battler.current_action.kind == 1 && !battler.skill_can_use?(battler.current_action.skill_id) i += 1 next end break } if KGC::ACB_SKILL_CHANT set_chant_time(battler) else @action_battlers << battler end else @action_battlers << battler end end end } end end
#============================================================================== # ** Scene_Battle (part 2) #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_phase2_escape_KGC_ActiveCountBattle update_phase2_escape def update_phase2_escape(skill = nil) if skill != nil update_phase2_escape_KGC_ActiveCountBattle(skill) return end enemies_agi, enemies_number = 0, 0 for enemy in $game_troop.enemies next unless enemy.exist? enemies_agi += enemy.agi enemies_number += 1 end enemies_agi /= enemies_number if enemies_number > 0 actors_agi, actors_number = 0, 0 for actor in $game_party.actors next unless actor.exist? actors_agi += actor.agi actors_number += 1 end actors_agi /= actors_number if actors_number > 0 prob = 50 * actors_agi / [enemies_agi, 1].max success = rand(100) < prob if success if @input_battler != nil if @enemy_arrow != nil @enemy_arrow.dispose @enemy_arrow = nil end if @actor_arrow != nil @actor_arrow.dispose @actor_arrow = nil end if @skill_window != nil @skill_window.dispose @skill_window = nil end if @skill_group_window != nil @skill_group_window.dispose @skill_group_window = nil end if @item_window != nil @item_window.dispose @item_window = nil end if @actor_command_window != nil @actor_command_window.active = false @actor_command_window.visible = false @actor_command_window.opacity = 0 end @input_battler.blink = false end @help_window.visible = false @help_window2.visible = false if @help_window2 != nil $game_system.se_play($data_system.escape_se) $game_system.bgm_play($game_temp.map_bgm) battle_end(1) return else return end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias start_phase5_KGC_ActiveCountBattle start_phase5 def start_phase5 if @input_battler != nil if @enemy_arrow != nil @enemy_arrow.dispose @enemy_arrow = nil end if @actor_arrow != nil @actor_arrow.dispose @actor_arrow = nil end if @skill_window != nil @skill_window.dispose @skill_window = nil end if @skill_group_window != nil @skill_group_window.dispose @skill_group_window = nil end if @item_window != nil @item_window.dispose @item_window = nil end if @actor_command_window != nil @actor_command_window.active = false @actor_command_window.visible = false @actor_command_window.opacity = 0 end @input_battler.blink = false if @input_battler != nil end @help_window.visible = false @help_window2.visible = false if @help_window2 != nil start_phase5_KGC_ActiveCountBattle end end
#============================================================================== # ** Scene_Battle (part 3) #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def phase3_next_actor if KGC::ACB_SKILL_CHANT set_chant_time(@active_battler) else @action_battlers << @active_battler end @active_battler.blink = false @actor_command_window.active = false @actor_command_window.visible = false @actor_command_window.opacity = 0 @input_battler = nil @actor_index = nil @active_battler = nil end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def set_chant_time(battler) chant = false if battler.current_action.kind == 1 && battler.chant_gauge_max == 0 skill = $data_skills[battler.current_action.skill_id] chant = skill.int_f >= KGC::ACB_CHANT_SKILL_INT_F && skill.atk_f < KGC::ACB_NOT_CHANT_SKILL_ATK_F end if chant if KGC::ACB_CHANT_TIME[skill.id] != nil chant_time = KGC::ACB_CHANT_TIME[skill.id] elsif skill.power != 0 chant_time = Math.sqrt( skill.sp_cost + skill.power.abs + [skill.int_f, 1].max) / 30 else chant_time = Math.sqrt(skill.sp_cost + skill.int_f) / 20 end chant_time *= $game_temp.turn_acb_count / 4 battler.chant_gauge_max = Integer(chant_time) battler.acb_gauge = 0 elsif KGC::ACB_CHANT_TIME[skill.id] != nil chant_time = KGC::ACB_CHANT_TIME[skill.id] chant_time *= $game_temp.turn_acb_count / 4 battler.chant_gauge_max = Integer(chant_time) battler.acb_gauge = 0 else @action_battlers << battler end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def phase3_prior_actor end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def command_input_cancel(delay = false) if @enemy_arrow != nil @enemy_arrow.dispose @enemy_arrow = nil end if @actor_arrow != nil @actor_arrow.dispose @actor_arrow = nil end if @skill_window != nil @skill_window.dispose @skill_window = nil end if @skill_group_window != nil @skill_group_window.dispose @skill_group_window = nil end if @item_window != nil @item_window.dispose @item_window = nil end @help_window.visible = false @help_window2.visible = false if $imported["HelpExtension"] if @actor_command_window != nil @actor_command_window.active = false @actor_command_window.visible = false @actor_command_window.opacity = 0 end @input_battler.blink = false @input_battler.set_acb_gauge unless delay @input_battler = nil end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- unless $imported["SeparationCommand"] def phase3_setup_command_window @party_command_window.active = false @party_command_window.visible = false @actor_command_window.dispose if @actor_command_window != nil s1 = $data_system.words.attack s2 = $data_system.words.skill s3 = $data_system.words.guard s4 = $data_system.words.item @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4]) @actor_command_window.y = 160 @actor_command_window.back_opacity = 160 @actor_command_window.active = true @actor_command_window.visible = true @actor_command_window.x = [@active_battler.screen_x - 80, 640 - @actor_command_window.width].min @actor_command_window.index = 0 end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_phase3_KGC_ActiveCountBattle update_phase3 def update_phase3 if @active_battler.current_action.forcing || !@active_battler.inputable? || @active_battler.restriction == 2 || @active_battler.restriction == 3 || !$game_party.actors.include?(@active_battler) if @active_battler.current_action.forcing || @active_battler.restriction == 2 || @active_battler.restriction == 3 if @active_battler.restriction == 2 || @active_battler.restriction == 3 @active_battler.current_action.kind = 0 @active_battler.current_action.basic = 0 end @action_battlers << @active_battler end command_input_cancel return end update_phase3_KGC_ActiveCountBattle end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_phase3_basic_command_KGC_ActiveCountBattle update_phase3_basic_command def update_phase3_basic_command if Input.trigger?(Input::X) $game_system.se_play($data_system.decision_se) @input_battlers << @active_battler @active_battler.blink = false if @actor_command_window != nil @actor_command_window.active = false @actor_command_window.visible = false @actor_command_window.opacity = 0 end @input_battler = nil @actor_index = nil @active_battler = nil return end update_phase3_basic_command_KGC_ActiveCountBattle end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_phase3_enemy_select_KGC_ActiveCountBattle update_phase3_enemy_select def update_phase3_enemy_select enemy_none = true $game_troop.enemies.each { |enemy| unless enemy.dead? enemy_none = false break end } if enemy_none end_enemy_select return end update_phase3_enemy_select_KGC_ActiveCountBattle end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias start_enemy_select_KGC_ActiveCountBattle start_enemy_select def start_enemy_select enemy_none = true for enemy in $game_troop.enemies unless enemy.dead? enemy_none = false break end end if enemy_none $game_system.se_play($data_system.buzzer_se) return end start_enemy_select_KGC_ActiveCountBattle end end
#============================================================================== # ** Scene_Battle (part 4) #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def start_phase4 @phase4_step = 1 end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- def update_phase4_step1 @help_window.visible = false return if judge @animation1_id = 0 @animation2_id = 0 @common_event_id = 0 if KGC::ACB_SLIP_DAMAGE == 0 && @active_battler.hp > 0 && @active_battler.slip_damage? @active_battler.slip_damage_effect @active_battler.damage_pop = true end if $imported["DelaySkill"] && @active_battler != nil for i in 0...@active_battler.delay_skill.size @active_battler.delay_skill[i][0] -= 1 end end if @active_battler.current_action.kind == 0 && @active_battler.current_action.basic == 3 @phase4_step = 6 else @phase4_step = 2 end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias make_basic_action_result_KGC_ActiveCountBattle make_basic_action_result def make_basic_action_result make_basic_action_result_KGC_ActiveCountBattle if @active_battler.current_action.basic == 0 dmg = 0 for i in @active_battler.element_set.compact if $data_system.elements[i] =~ $game_special_elements["acb_delay"] dmg += $1.to_i end end if dmg > 0 battlers = $game_party.actors + $game_troop.enemies @target_battlers.each { |target| next if !target.damage.is_a?(Numeric) || target.damage <= 0 (0...battlers.size).each { |i| next if battlers[i] != target acb_dmg = $game_temp.turn_acb_count / 4 if $game_special_elements["acb_delay_resist"] != nil acb_dmg *= target.element_rate($game_special_elements["acb_delay_resist"]) acb_dmg /= 100 end acb_dmg = [acb_dmg * dmg / 200, 0].max target.acb_gauge -= acb_dmg if !KGC::ACB_INVALID_DELAY_INPUT && target.is_a?(Game_Actor) && target == @input_battler && target.acb_gauge < target.acb_max command_input_cancel(true) end @input_battlers.delete(target) @action_battlers.delete(target) break } } end end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias make_skill_action_result_KGC_ActiveCountBattle make_skill_action_result def make_skill_action_result make_skill_action_result_KGC_ActiveCountBattle dmg = 0 @skill.element_set.compact.each { |i| if $data_system.elements[i] =~ $game_special_elements["acb_delay"] dmg += $1.to_i end } if dmg > 0 battlers = $game_party.actors + $game_troop.enemies @target_battlers.each { |target| next if !target.damage.is_a?(Numeric) || target.damage <= 0 (0...battlers.size).each { |i| next if battlers[i] != target acb_dmg = $game_temp.turn_acb_count / 4 if $game_special_elements["acb_delay_resist"] != nil acb_dmg *= target.element_rate($game_special_elements["acb_delay_resist"]) acb_dmg /= 100 end acb_dmg = [acb_dmg * dmg / 200, 0].max target.acb_gauge -= acb_dmg if !KGC::ACB_INVALID_DELAY_INPUT && target.is_a?(Game_Actor) && target == @input_battler && target.acb_gauge < target.acb_max command_input_cancel(true) end if target.acb_gauge < target.acb_max @input_battlers.delete(target) @action_battlers.delete(target) end break } } end end #-------------------------------------------------------------------------- # #-------------------------------------------------------------------------- alias update_phase4_step6_KGC_ActiveCountBattle update_phase4_step6 def update_phase4_step6 @help_window.reset update_phase4_step6_KGC_ActiveCountBattle if !$imported["CooperationSkill"] || !@cooperation_skill_exec setup_battle_event @action_battler.set_acb_gauge @action_battler.current_action.forcing = false @action_battler = nil judge end end end
you will need the image attached on the Pictures folder, you can edit it. Give a try and see if this one works with your script.
The HP/MP bars can be edited with one of the many scripts to edit the battle window out there.
This post has been edited by Atoa: Oct 6 2011, 09:29 PM
Looks nice enough, but it has two drawbacks. One: You don't have the option to run away from a battle. And I get an error even in a blank project which then crashes. Right at the end of the battle it shows this:
__________________________
There is a game out there for everyone. All you have to do is to find it.
Well, it doesn't crash anymore, which is an improvement =) And it does work with the SP Popup, just as you said. And I really appreciate your effort tring to help me. I honestly do. It works in my game, but isn't really copatible with it if that makes any sense. If I try to center the battlers it will move all the information, such as Name, HP and so on, but the battlers and the ATB gauge stay where in their normal position. If I try to add any bars to the HP and SP (I have tried diffrent ways to do this) they will show up just fine, but should I get hit or use SP I'll suddenly have two numbers on top of each other which oddly enough display a diffrent value. I think, it's hard to tell becuase you can't read either one. Once my Battle Result window shows up (which is also a script) the atb will still be displayed. Trying to change to a diffrent system seems to do exactly what I feared it would: one problem get's solved but a bunch of new ones show up. And I refuse to keep asking for correction after correction, I can not and will not be that greedy.
__________________________
There is a game out there for everyone. All you have to do is to find it.
Well, but let us think one thing: wich is a easier request? - Make compatible two scripts, considering that one of them is completely outadated - Change de position o a couple of bars?
Also this bug in the display... wich script are you using to center the battlers?
QUOTE
Trying to change to a diffrent system seems to do exactly what I feared it would: one problem get's solved but a bunch of new ones show up.
it's better have to kill 100 slimes, than a single behemoth =P
I will try to make a add on to center the battlers and the bars correctly.
Also you should stat all scripts you using, i've suggested the script change based on the demo you attched on the topic. if there's a lot of other scripts that might conflict with it... then you should state them.
This post has been edited by Atoa: Oct 7 2011, 05:04 PM
it's better have to kill 100 slimes, than a single behemoth =P
But killing 100 slimes would probably take way longer...I admit I know next to nothing about scripting, maybe enough to make some slight edits but that's about it so I was hoping that finding a patch or a small coding conflict would not be that hard for those who do understand these things.
I did not post the other scripts I am using for a reason. When i made this thread I decided that should any kind of help not be compatible with what I have and eventually cause more problems, I would give up on the SP Popup script for this project alltogehter. Without it everything works fine after all. I think I have said that before but I can't be so selfish to keep asking for help and solutions again and again...and again which is likely to happen if you have to take a certain amount of scripts into account. I allready felt bad about having three in the sample I uploaded.
If it turnes out that you really need to kill the 100 slimes as you put it to get the same reward - let's call it item for the sake of this metaphor - that you would get for beeting the behemoth, and the only one who will eventually be able to recive that item would be me but not you while you had all the work, then quite frankly I'd say leave that treasure where it is, I can live without it. I am quite certain that you have your own projects to work on and I wold hate to steal even more of your time if it turnes out that it would be quite a bit. If you with your experience in the way of scripting can tell me that it would be complicated to find a patchlike thing such as requested in the first post of this thread then I will kindly thank you for spending all that precious time tring to help me and I will consider this question of mine as settled with the result of disclaiming the use of the second script. I would feel bad tough if all your effort results in nothing -which it does not, but it kind of feals that way- so I'd happily help you with something in return if I can. Or at least try. I have not mastered any of the skills I possess not doing anything seems unfait to me.
(On a sidenote: should there be any mistakes in this post, I apologize. It's past 4am right now and I wouldn't put it past my imagination to mess something up.)
__________________________
There is a game out there for everyone. All you have to do is to find it.
I am quite certain that you have your own projects to work on and I wold hate to steal even more of your time if it turnes out that it would be quite a bit.
in fact this route is the less efortless for me, as i can simply look and make 5 minutes adjustment during the breaks of whatever i'm doing (wich in this case is playing Pesona 2 PSP *-*) Trying to fix the compatibility issue that would require me to stop everything i'm doing to focus on it.
The main fact is: at last by now, all errors that poped we know the cause, and knowing the cause the fix is easy. I take a fast look on the other script and i couldn't see any evident cause for the error, so it would be a more deep study of the script... wich i really don't want to do.
QUOTE
But killing 100 slimes would probably take way longer...
Try telling it to Aluxes at level 1 =P
But well it's your call, you can try your luck and hope for someone to fix the other script.
With more detailed info and the other scripts i can fix it really fast since they're small adjustment anyway.
Reading countless lines of codes would be the easier way? Really? Sounds strange to me but then again, I don't know how you work. I trust your knowledge on that area when you say they are small adjustments and it would be easier to do that then finding a patch. And if it is not as much work as I feared it would be, then I will copy the scripts over to an other samle and send it to you in a PM. I don't want to post it on the forums since it includes a script that i promised I would not share since it was custommade for a project of someone else who allowed me to use in under the conditions that i would not release my project before him. (Which is also a reason why I did not post all scripts together at first.) If it turns out that it would be to much work after all, please say so =)
__________________________
There is a game out there for everyone. All you have to do is to find it.