01-15-2018, 10:46 PM
(This post was last modified: 01-15-2018, 10:50 PM by DerVVulfman.
Edit Reason: syntax and stuff. *_o
)
Oh, yeah. I have a new outlook on the configuring of Animated Battlers. The entry values, though they are hashes themselves, their entries may be integers or hashes of their own. I know it sounds a bit complicated, but it really isn't. It just takes a little time and patience, but it is also a fairly cleaner method and with fewer things to actually track.
For those who are familiar with the old system, I still have eleven default action entries for the spritesheet here. But I changed the action constants into hashes. Instead of POSE_4 which defined the 'defending' pose, I used P_BLOCK[id]. If the id value is '0', I'm setting up the globally used block action to a pose, but if I'm setting the id to '6', then I'm setting up a block action pose for Felix.
But here is the FUN part. The old system only allowed you to set one pose from the spritesheet to one default action, and that was it. The default skill action was just assigned one entry... just one. Not so anymore. Now you can give an action entry a single pose, or a range of poses!!!
Many of the action entries now allow you to enter a hash array instead of an integer. These action entries are keyed to something like a weapon or a skill. So I can now set the P_SKILL[0] value to '7' or to a myriad of poses based on the skill being used! I used to have a separate config value for that, but not anymore!
If you want to see what I mean by letting an entry be either a hash or an integer, I have two snippets below:
Now the first entry from my default configuration sets the MELEE attack for all battlers to use the 7th pose. Again, this is for P_MELEE[0] with the '0' meaning all related battlers.
The second entry is set up for Gloria, the 7th actor in the list. Hence, why it is noted as 'P_MELEE[7]'. But notice that the value assigned to P_MELEE[7] isn't an integer, but a hash array in braces ({ }). This hash array is saying that it uses pose #7 under most circumstances (set to weapon #0 as a default) or will use pose #10 if the weapon used is #25 in the database.
Critical hits delivered by the battler, the type of casting pose, and other various poses will also allow the use of hashes as well as the typical integer value defining which pose is put to use. I wouldn't leave out all those already in the system, would I?
Code:
# EDITABLE TEMPLATE
#--------------------------------------------------------------------------
# This section lets you associate each of the eleven default Minkoff poses
# to the individual poses within your spritesheet. Please note that the
# system uses hash values to define each action type that holds the poses.
#
# POSE LIST DEFINITIONS CONDITION
# ---------- ----------------------------------------------- ---------
# P_READY .. The pose when the battler is on guard Weapon
# P_STRUCK .. Used when the battler was hit by the enemy Shield
# P_WOOZY .. Used when the battler is low in health ------
# P_BLOCK .. Used when the battler is defending Shield
# P_CHARGE .. Used when the battler is moving to the target ------
# P_RETREAT .. Used when the battler is returning from an attack ------
# P_MELEE .. Used when the battler performs a basic attack Weapon
# P_ITEM .. Used when the battler uses an item Item
# P_SKILL .. Used when the battler uses a skill Skill
# P_VICTORY .. Used by battlers if their side wins combat Weapon
# P_DEFEAT .. Used when the battler is dead ------
#--------------------------------------------------------------------------
#
P_READY[0] = 1 # Sets the 'Ready Pose' #1 in your template
P_STRUCK[0] = 2 # Sets the 'Struck Pose' #2 in your template
P_WOOZY[0] = 3 # Sets the 'Woozy Pose' #3 in your template
P_BLOCK[0] = 4 # Sets the 'Block Pose' #4 in your template
P_CHARGE[0] = 5 # Sets the 'Charge Pose' #5 in your template
P_RETREAT[0] = 6 # Sets the 'Retreat Pose' #6 in your template
P_MELEE[0] = 7 # Sets the 'Attack Pose' #7 in your template
P_ITEM[0] = 8 # Sets the 'Item Pose' #8 in your template
P_SKILL[0] = 9 # Sets the 'Skill Pose' #9 in your template
P_VICTORY[0] = 10 # Sets the 'Victory Pose' #10 in your template
P_DEFEAT[0] = 11 # Sets the 'Defeat Pose' #11 in your template
# Defining an actor spritesheet (Basil is ID #2, hence key 2)
# This particular setup is used for characterset spritesets.
#-------------------------------------------------------------
P_READY[2] = 2 # Most all entries in a characterset
P_STRUCK[2] = 2 # will have the battler facing in one
P_WOOZY[2] = 2 # direction, almost always to the left.
P_BLOCK[2] = 2 #
P_CHARGE[2] = 2 #
P_RETREAT[2] = 3 # The retreat pose tends to face right.
P_MELEE[2] = 2 #
P_ITEM[2] = 2 #
P_SKILL[2] = 2 #
P_VICTORY[2] = 2 #
P_DEFEAT[2] = 3 # Making it defeated (face right too).
# Defining an actor spritesheet for Gloria. Only dealing with
# one pose here. However, it is a hash entry for the P_MELEE
# pose, setting pose #7 as the default & pose #10 if the bronze
# rod is used (weapon #25)
#-------------------------------------------------------------
P_MELEE[7] = { 0=>7, 25=>10 }
# Defining an enemy spritesheet (Ghost is ID #1, hence key -1)
# This particular setup is used for characterset spritesets.
#-------------------------------------------------------------
P_READY[-1] = 2 # Enemy templates use the same poses as
P_STRUCK[-1] = 2 # actors if the 'mirrored enemies' value
P_WOOZY[-1] = 2 # is set. This makes it easier to set
P_BLOCK[-1] = 2 # both actors and enemies.
P_CHARGE[-1] = 2 #
P_RETREAT[-1] = 3 #
P_MELEE[-1] = 2 #
P_ITEM[-1] = 2 #
P_SKILL[-1] = 2 # Invalid settings (poses that don't
P_VICTORY[-1] = 2 # exist) will make the battler vanish
P_DEFEAT[-1] = 5 # So here, I made the ghost vanish.
For those who are familiar with the old system, I still have eleven default action entries for the spritesheet here. But I changed the action constants into hashes. Instead of POSE_4 which defined the 'defending' pose, I used P_BLOCK[id]. If the id value is '0', I'm setting up the globally used block action to a pose, but if I'm setting the id to '6', then I'm setting up a block action pose for Felix.
But here is the FUN part. The old system only allowed you to set one pose from the spritesheet to one default action, and that was it. The default skill action was just assigned one entry... just one. Not so anymore. Now you can give an action entry a single pose, or a range of poses!!!
Many of the action entries now allow you to enter a hash array instead of an integer. These action entries are keyed to something like a weapon or a skill. So I can now set the P_SKILL[0] value to '7' or to a myriad of poses based on the skill being used! I used to have a separate config value for that, but not anymore!
If you want to see what I mean by letting an entry be either a hash or an integer, I have two snippets below:
Code:
P_MELEE[0] = 7 # Sets the 'Attack Pose' #7 in your template
P_MELEE[7] = { 0=>7, 25=>10 }
Now the first entry from my default configuration sets the MELEE attack for all battlers to use the 7th pose. Again, this is for P_MELEE[0] with the '0' meaning all related battlers.
The second entry is set up for Gloria, the 7th actor in the list. Hence, why it is noted as 'P_MELEE[7]'. But notice that the value assigned to P_MELEE[7] isn't an integer, but a hash array in braces ({ }). This hash array is saying that it uses pose #7 under most circumstances (set to weapon #0 as a default) or will use pose #10 if the weapon used is #25 in the database.
Critical hits delivered by the battler, the type of casting pose, and other various poses will also allow the use of hashes as well as the typical integer value defining which pose is put to use. I wouldn't leave out all those already in the system, would I?