First, comments: Really enjoying the amount of customization available in this system. Having the battle system and the animation system tied together internally allows for some things that I haven't seen with many other setups, like having actions that move the battler to multiple custom locations and execute multiple locations.
Next up, bug hunting, my favorite part of development: I've located (and fixed) a few relatively small issues that I figured might be worth posting. Appologies if these are repeats, I'm relatively new to the RMXP community. This is all based on the v3.0 demo, as the scripts-only download appears to be down at the moment.
Items use problems:
-Items can't be used from the menu when out of battle. They'll either simply fail when they should work (try using a potion) or actually cause a crash (try an elixer). I tracked the problem to the script ACBS | Game_Battler, where a small change to 2 methods solves it (changes marked with the "#CHANGED" comment in all code samples):
def item_effect(item, user = self)
self.critical = self.sp_damage = false
if ((item.scope == 3 or item.scope == 4) and self.hp == 0) or
((item.scope == 5 or item.scope == 6) and self.hp >= 1)
return false
end
effective = false
effective |= item.common_event_id > 0
if (rand(100) < item.hit)
effective |= make_item_damage_value(item, user, effective)
effective |= set_item_state_change(item, user, effective) #CHANGED need to send user
else
attacker.target_damage[self] = Miss_Message
end
user.target_damage[self] = nil unless $game_temp.in_battle
return effective
end
That needs to be sent because user will be used in this method, which just needs 1 line change:
def set_item_state_change(item, user, effective) #CHANGED add user param
Finally, I noticed that "make_item_damage_value" isn't returning anything even though its return value is being used in "item_effect". I added:
as the last line of make_item_damage_value.
-Second item issue: Items can only be used on self in battle. This one ended up being a really simple fix, but it took me a while to locate it since I'm just getting started with RGSS. The "item_effect" method takes a value for "user" however this value is never sent. Because damage is tied into the damage animation system, the user value must be set in order for the whole thing to go off correctly.
I went to ACBS | Scene_Battle4 and changed the line where item_effect is called to include the user:
def make_item_action_result(battler)
battler.current_item = $data_items[battler.current_action.item_id]
return unless $game_party.item_can_use?(battler.current_item.id)
if battler.current_item.consumable and not battler.multi_action_running
$game_party.lose_item(battler.current_item.id, 1)
end
battler.multi_action_running = battler.action_done = true
@status_window.refresh if status_need_refresh
battler.animation_1 = battler.current_item.animation1_id
battler.animation_2 = battler.current_item.animation2_id
@common_event_id = battler.current_item.common_event_id
index = battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
for target in battler.target_battlers
target.item_effect(battler.current_item, battler) #CHANGED send user
end
end
That's it for items, next up is the ATB code. There's functionality for casting time in place, however casting time is always 0 because of a missing line:
alias step2_part1_atb step2_part1
def step2_part1(battler)
<<...SNIPPED START OF FUNCTION...>>
if (battler.now_action.is_a?(RPG::Skill) or battler.now_action.is_a?(RPG::Item)) and
battler.cast_action.nil? and active_cast.nil?
battler.cast_action = battler.now_action
battler.cast_target = battler.current_action.target_index
cast_speed = battler.now_action.cast_speed(battler)
battler.cast_action = nil if cast_speed == 0
unless cast_speed == 0
battler.movement = false
battler.current_phase = 'Phase 5-1'
battler.atb = 0 #CHANGED reset the ATB for casting
end
end
if cant_use_action(battler) and battler.cast_action != nil
battler.cast_action = nil
battler.moviment = false
battler.current_phase = 'Phase 5-1'
end
end
That seems to work correctly, resetting the ATB to 0 when a casting action is set. Otherwise the ATB will already be full next frame and the action will fire regardless of cast speed.
There's also a glitch with the ATB meter positions if you place them under the battlers and enable them for enemies. Kind of obscure, but still worth fixing since it's fairly easy. Basically when enemies start to die their bars end up getting placed in the wrong location. Code first, then I'll explain what I was doing:
def initialize
@meters = []
@skin = RPG::Cache.windowskin(Meter_Skin)
i = 0
c = 0 #CHANGED two counters
for enemy in $game_troop.enemies
#CHANGED>
#next if enemy.dead?
if (enemy.dead?)
c += 1
next
end
#<CHANGED
@meter = MeterSprite.new(@skin, 5)
refresh_meter(i, c) #HNT
i += 1
c += 1 #CHANGED
end
refresh
end
And:
def refresh_meter(mIndex, index) #CHANGED added mIndex
enemy = $game_troop.enemies[index]
case Enemy_Meter
when 1
@meter.x = enemy.base_x - @skin.width / 2
@meter.y = enemy.base_y - @skin.height / 5
@meter.z = 100
when 2
@meter.x = enemy.base_x - @skin.width / 2
@meter.y = enemy.base_y - @skin.height / 5 - 64
@meter.z = 1000
when 3
@meter.x = 32
@meter.y = 80 + index * 32
@meter.z = 3000
end
@meters[mIndex] = @meter #CHANGED use mIndex
end
Basically, as monsters die their ATB meters will be removed, but they still exist in the battle (they're just at hp 0). So as they die, the meter index and the enemy index will no longer match up, thus the refresh function needs to know both numbers.
Finally there are the 2 issues with the demo, one of which seems to be common knowledge now. The line Random_Move = false (actually could be set to true or false, but needs to be set) is missing from the config in the demo so it crashes as soon as anyone takes damage.
The other issue is the throw animation graphic, which apparently didn't get translated. The demo looks for "throw" however the file in the animations folder has an untranslated name. Changing it to "throw" solves this issue.
Anyway, that's all I've got for the moment. Just want to restate that I'm really liking this system regardless of the fact that it needs a small amount of poking and prodding to get it running the way you want. Thanks for making this. =)