redtri17 is now showing off.

He reported another error, related to the first. I saw this at midnight, and figured it out 15 minutes later. How's that for analysis and system design?
We have to revisit the same method, the animbat_function_update_phase4_step3_pose_attack method. Just for cleanliness sake, just use THIS in its place. Yeah, it's the same line... but why take chances?
Code:
#--------------------------------------------------------------------------
# * Frame Update (main phase step 3 : animation for action performer)
# * Select Attack Pose
# battler : battler
#--------------------------------------------------------------------------
def animbat_function_update_phase4_step3_pose_attack(battler)
base_pose = hash_obtain2(battler, 7, AnimBat::POSE_07)
temp_hash = hash_obtain2(battler, nil, AnimBat::ATTACK_WEAPONS)
unless temp_hash.nil?
temp_pose = hash_obtain2(battler.weapon_id, nil, temp_hash)
end
base_pose = temp_pose unless temp_pose.nil?
return base_pose
end
But we're not done yet.
Look at the Hash Obtain2 method and how it looks. A clean method, it accepts a 'battler' as its initial value, recognizing it as an actor or enemy, and obtains the actor/enemy ID from it. But look further and see that it also accepts the ID of weapons or skills.
OOPS! I LEFT THAT PORTION OUT!
The fault does not lie within the hash_obtain2 method, but the base hash_obtain method which it uses. I needed to let it recognize if the value being sent into the method is an actual battler, or just some value to search... so replace the actual hash_obtain method with this! Erm, leaving hash_obtain2 untouched. That one's fine.
Code:
#--------------------------------------------------------------------------
# * Hash Value Obtain
# battler : battler being tested against (or ID if it is not a battler)
# default : default value
# testval : hash array
# minval : (optional) minimum value
# maxval : (optional) maximum value
#--------------------------------------------------------------------------
def hash_obtain(battler, default, testval, minval=nil, maxval=nil)
if battler.is_a?(Game_Battler)
id = (battler.is_a?(Game_Enemy)) ? -battler.id : battler.id
else
id = battler
end
returnval = default
return returnval if testval.nil?
returnval = testval[0] if testval.has_key?(0)
returnval = testval[id] if testval.has_key?(id)
unless default.nil?
returnval = minval if minval != nil && returnval < minval
returnval = maxval if maxval != nil && returnval > maxval
end
return returnval
end
And now, it's version 1.2!!! Dated 9/17/2019 (mm/dd/yyyy).
It'll take some time to generate all the demos. I have obligations to perform tomo--- this morning.