AnimBat! - Animated Battlers - Comprehensive
redtri17 is now showing off. Laughing + Tongue sticking out 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.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Messages In This Thread
RE: AnimBat! - Animated Battlers - Comprehensive - by DerVVulfman - 09-17-2019, 05:28 AM
Minkoff's Animated Battlers - Enhanced - by Helel - 11-28-2009, 08:40 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-02-2009, 09:29 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-02-2009, 09:15 PM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-03-2009, 04:40 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-03-2009, 05:03 AM
Minkoff's Animated Battlers - Enhanced - by Calum - 12-03-2009, 09:02 PM
Minkoff's Animated Battlers - Enhanced - by Ace - 02-21-2010, 11:19 AM
Minkoff's Animated Battlers - Enhanced - by Ace - 02-28-2010, 02:09 PM
Minkoff's Animated Battlers - Enhanced - by Ace - 02-28-2010, 09:44 PM
Minkoff's Animated Battlers - Enhanced - by Eldur - 03-03-2010, 06:44 PM
Minkoff's Animated Battlers - Enhanced - by Crono - 06-23-2010, 04:53 AM
Minkoff's Animated Battlers - Enhanced - by Crono - 06-23-2010, 05:55 AM
Minkoff's Animated Battlers - Enhanced - by Crono - 06-24-2010, 05:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Brenda's Paperdoll Battlers DerVVulfman 2 7,859 04-18-2023, 02:05 AM
Last Post: DerVVulfman
   Full Animated Side View Battle System Cybersam 6 24,991 03-18-2011, 04:31 AM
Last Post: Ashbane
   Animated Tileset kingartur2 5 11,953 02-08-2010, 04:26 AM
Last Post: DerVVulfman
   Trickster's Animated Gradient Bars for Limit Break (DVV) DerVVulfman 2 9,809 09-15-2009, 04:43 AM
Last Post: DerVVulfman
   Minkoff AnimBat Addon: Battlefield Front/Rear Formations DerVVulfman 0 5,403 07-03-2009, 03:42 AM
Last Post: DerVVulfman
   Animated Battlers / Timed Hits Patch DerVVulfman 0 4,980 03-05-2008, 06:43 AM
Last Post: DerVVulfman
   HP/SP Animated Image Gauge cogwheel 0 5,534 03-04-2008, 06:34 AM
Last Post: cogwheel
   Arrow-Type Animated Cursor ParaDog 0 5,399 03-04-2008, 04:32 AM
Last Post: ParaDog
   Command Windows - Animated Text Selwyn 0 4,326 03-03-2008, 06:18 AM
Last Post: Selwyn



Users browsing this thread: 38 Guest(s)