08-21-2020, 03:53 PM (This post was last modified: 08-21-2020, 07:36 PM by rekkatsu.)
So How do I add face script on cogwheel RATB? I tried writing on Window_Base and make draw_graphic_face but It didn't show or error
First of all I use custom battle system which connected to battler graphic and I wanna add something like this (edited)
Content Hidden
and I found this Battle Status script by Valcrist, I wonder how do I add cogwheel's RATB? lol
Err, if you provide us with the link to the battle system and some test graphics that look like the screenshots above, perhaps I or any other scripter would help you somehow.
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9
Maranatha!
The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.
08-22-2020, 03:31 AM (This post was last modified: 08-22-2020, 03:33 AM by DerVVulfman.)
Just a shot in the dark....
I think his script basically uses/replaces traditional battlers with faces drawn over the battlestatus window. Cogwheel did it too
Battle face graphics
Code:
# Battle face graphics (RTAB Business) Ver 1.00
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/
# NOTE BY DERVVULFMAN:
# This system is dependant on the Face Graphic Retrieval System designed by
# Cogwheel. It is that system that caches additional graphics within the
# Graphics\Faces folder and creates 'Naming Conventions' used by the system.
#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
# This sprite is used to display the battler.It observes the Game_Character
# class and automatically changes sprite conditions.
#==============================================================================
class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# ● Face graphic setting
#--------------------------------------------------------------------------
def face_select(type)
# Branch by face graphic name
case @face_name
when "f7" # If fighter 7
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_15"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_10"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_10"
when 10 # If attacking
return "_6"
when 11 # If recovery
return "_16"
when 20 # If damaged
return "_14"
when 30 # If victory
return "_12"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_2"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_3"
end
when "l2" # If lancer 2
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_7"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_2"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_2"
when 10 # If attacking
return "_8"
when 11 # If recovery
return "_12"
when 20 # If damaged
return "_16"
when 30 # If victory
return "_5"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_4"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_9"
end
when "o1" # If original 1
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_15"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_13"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_13"
when 10 # If attacking
return "_7"
when 11 # If recovery
return "_12"
when 20 # If damaged
return "_8"
when 30 # If victory
return "_10"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_5"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_6"
end
when "o3" # If original 3
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_8"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_9"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_9"
when 10 # If attacking
return "_15"
when 11 # If recovery
return "_12"
when 20 # If damaged
return "_11"
when 30 # If victory
return "_2"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_6"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_3"
end
when "o4" # If original 4
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_13"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_4"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_4"
when 10 # If attacking
return "_5"
when 11 # If recovery
return "_10"
when 20 # If damaged
return "_8"
when 30 # If victory
return "_15"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_16"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_5"
end
when "o39" # If original 39
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_11"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_14"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_6"
when 10 # If attacking
return "_9"
when 11 # If recovery
return "_13"
when 20 # If damaged
return "_7"
when 30 # If victory
return "_16"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_8"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_3"
end
when "o40" # If original 40
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_16"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_7"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_7"
when 10 # If attacking
return "_14"
when 11 # If recovery
return "_4"
when 20 # If damaged
return "_7"
when 30 # If victory
return "_3"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_9"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_2"
end
when "o41" # If original 41
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_7"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_11"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_11"
when 10 # If attacking
return "_8"
when 11 # If recovery
return "_5"
when 20 # If damaged
return "_14"
when 30 # If victory
return "_3"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_5"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_2"
end
end
return ""
end
#--------------------------------------------------------------------------
# * Update face graphic
#--------------------------------------------------------------------------
def face_update
# When delay catches
@face_delay -= 1 if @face_delay > 0
# When the damage is received
if @hp != @battler.hp
# Show attack face
if @hp > @battler.hp
@face_delay = 20
end
# Reflect HP
@hp = @battler.hp
return
end
# If performing action
if @battler.phase > 1
# Face attack indication
if @face_type != 10
# Set face type to attack
@face_type = 10
# Branch by action type
case @battler.current_action.kind
when 0 # Basic
# If attack
if @battler.current_action.basic == 0
self.bitmap = RPG::Cache.face(@face_name + face_select(10))
end
when 1..2 # Skill and Item
# Acquire scope of attack
if @battler.current_action.kind == 1
scope = $data_skills[@battler.current_action.skill_id].scope
else
scope = $data_items[@battler.current_action.item_id].scope
end
# If attack (not on self or party members)
if scope < 3
self.bitmap = RPG::Cache.face(@face_name + face_select(10))
# If recovery (on self or party members)
else
self.bitmap = RPG::Cache.face(@face_name + face_select(11))
end
end
end
return
end
# If victory
if $scene.phase == 5
if @face_type != 30
# Set face type to victory
@face_type = 30
self.bitmap = RPG::Cache.face(@face_name + face_select(30))
end
return
end
# If using the 'Skill Casting Time Counter' script
if @battler.rtp > 0
if @face_type != 40
# Sets face type to a 'delayed' skill
@face_type = 40
# In case of a delayed 'spell'
if $data_skills[@battler.current_action.skill_id].int_f > 0
self.bitmap = RPG::Cache.face(@face_name + face_select(40))
# In case of a delayed 'skill'
else
self.bitmap = RPG::Cache.face(@face_name + face_select(41))
end
end
return
end
# If damage is received
if @face_delay > 0
if @face_type != 20
# Sets face type to damaged
@face_type = 20
self.bitmap = RPG::Cache.face(@face_name + face_select(20))
end
return
end
# If guarding
if @battler.guarding?
if @face_type != 2
@face_type = 2
self.bitmap = RPG::Cache.face(@face_name + face_select(2))
end
# If normal
elsif @hp > @battler.maxhp/4 and @battler.movable? and @battler.inputable?
if @face_type != 0
@face_type = 0
self.bitmap = RPG::Cache.face(@face_name + face_select(0))
end
# If dying
elsif @battler.inputable?
if @face_type != 1
@face_type = 1
self.bitmap = RPG::Cache.face(@face_name + face_select(1))
end
# If Berserk
else
# If Berserk
if @battler.restriction == 3
if @face_type != 3
@face_type = 3
self.bitmap = RPG::Cache.face(@face_name + face_select(3))
end
# If confused
else
if @face_type != 4
@face_type = 4
self.bitmap = RPG::Cache.face(@face_name + face_select(4))
end
end
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
# If battler is nil
if @battler == nil
self.bitmap = nil
loop_animation(nil)
return
end
# If file name or hue are different than current ones
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue
# Get and set bitmap
@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
# If the face graphic file exists
if @battler.is_a?(Game_Actor)
# From character graphic name, search of face graphic name
@face_name = RPG::Face.seek(@battler.character_name)
@face_name.sub!(/_\d+$/) { "" }
@face_type = 0
@face_delay = 0
@hp = @battler.hp
if FileTest.exist?("Graphics/Faces/" + @face_name + ".png")
# Draw face graphics
self.bitmap = RPG::Cache.face(@face_name)
# If the face graphic file does not exist
else
@face_name = ""
self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
end
# Else normal battlers
else
@face_name = ""
self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
end
@width = bitmap.width
@height = bitmap.height
self.ox = @width / 2
self.oy = @height + 16
if @battler.is_a?(Game_Enemy)
@battler.height = @height
end
# Change opacity level to 0 when dead or hidden
if @battler.dead? or @battler.hidden
self.opacity = 0
end
@hp = @battler.hp
end
# Update face graphics
face_update if @face_name != ""
# When animation ID differs from present ones,
if @battler.state_animation_id != @state_animation_id
@state_animation_id = @battler.state_animation_id
loop_animation($data_animations[@state_animation_id])
end
# If actor which should be displayed
if @battler.is_a?(Game_Actor) and @battler_visible
# Bring opacity level down a bit when not in main phase
if $game_temp.battle_main_phase
self.opacity += 3 if self.opacity < 255
else
self.opacity -= 3 if self.opacity > 207
end
end
# Blink
if @battler.blink
blink_on
else
blink_off
end
# If invisible
unless @battler_visible
# Appear
if not @battler.hidden and not @battler.dead? and
(@battler.damage.size < 2 or @battler.damage_pop.size < 2)
appear
@battler_visible = true
end
end
# Damage
for battler in @battler.damage_pop
if battler[0].class == Array
if battler[0][1] >= 0
$scene.skill_se
else
$scene.levelup_se
end
damage(@battler.damage[battler[0]], false, 2)
else
damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
end
if @battler.damage_sp.include?(battler[0])
damage(@battler.damage_sp[battler[0]],
@battler.critical[battler[0]], 1)
@battler.damage_sp.delete(battler[0])
end
@battler.damage_pop.delete(battler[0])
@battler.damage.delete(battler[0])
@battler.critical.delete(battler[0])
end
# If visible
if @battler_visible
# Escape
if @battler.hidden
$game_system.se_play($data_system.escape_se)
escape
@battler_visible = false
end
# White flash
if @battler.white_flash
whiten
@battler.white_flash = false
end
# Animation
unless @battler.animation.empty?
for animation in @battler.animation.reverse
animation($data_animations[animation[0]], animation[1])
@battler.animation.delete(animation)
end
end
# Collapse
if @battler.damage.empty? and @battler.dead?
if $scene.dead_ok?(@battler)
if @battler.is_a?(Game_Enemy)
$game_system.se_play($data_system.enemy_collapse_se)
else
$game_system.se_play($data_system.actor_collapse_se)
end
collapse
@battler_visible = false
end
end
end
# Set sprite coordinates
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
if @battler.is_a?(Game_Enemy)
self.zoom_x = @battler.real_zoom * @battler.zoom
self.zoom_y = @battler.real_zoom * @battler.zoom
end
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :phase # phase
end
Which relies on this script...
Face graphic retrieval system
Code:
# Face graphic retrieval system Ver 1.01
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/
#==============================================================================
# ** RPG
#------------------------------------------------------------------------------
# It is basic module
#==============================================================================
module RPG
#============================================================================
# ** Face
#----------------------------------------------------------------------------
# It is the module which processes face graphics.
#============================================================================
module Face
#--------------------------------------------------------------------------
# * Search face graphics
#--------------------------------------------------------------------------
def self.seek(name)
# Face graphic setting of fighter system
if name[/\d+\-Fighter(\d+)/] != nil
return "f" + $1.to_i.to_s
end
# Face graphic setting of lancer system
if name[/\d+\-Lancer(\d+)/] != nil
return "l" + $1.to_i.to_s
end
# Face graphic setting of warrior system
if name[/\d+\-Warrior(\d+)/] != nil
return "w" + $1.to_i.to_s
end
# Face graphic setting of thief system
if name[/\d+\-Thief(\d+)/] != nil
return "t" + $1.to_i.to_s
end
# Face graphic setting of hunter system
if name[/\d+\-Hunter(\d+)/] != nil
return "h" + $1.to_i.to_s
end
# Face graphic setting of gunner system
if name[/\d+\-Gunner(\d+)/] != nil
return "g" + $1.to_i.to_s
end
# Face graphic setting of cleric system
if name[/\d+\-Cleric(\d+)/] != nil
return "c" + $1.to_i.to_s
end
# Face graphic setting of mage system
if name[/\d+\-Mage(\d+)/] != nil
return "m" + $1.to_i.to_s
end
# Face graphic setting of king system
if name[/\d+\-King(\d+)/] != nil
return "k" + $1.to_i.to_s
end
# Face graphic setting of queen system
if name[/\d+\-Queen(\d+)/] != nil
return "q" + $1.to_i.to_s
end
# Face graphic setting of trader system
if name[/\d+\-Trader(\d+)/] != nil
return "tr" + $1.to_i.to_s
end
# Face graphic setting of fortuneteller system
if name[/\d+\-Fortuneteller(\d+)/] != nil
return "fo" + $1.to_i.to_s
end
# Face graphic setting of grappler system
if name[/\d+\-Grappler(\d+)/] != nil
return "gr" + $1.to_i.to_s
end
# Face graphic setting of fairy system
if name[/\d+\-Fairy(\d+)/] != nil
return "fa" + $1.to_i.to_s
end
# Face graphic setting of soldier system
if name[/\d+\-Soldier(\d+)/] != nil
return "s" + $1.to_i.to_s
end
# Face graphic setting of undead system
if name[/\d+\-Undead(\d+)/] != nil
return "u" + $1.to_i.to_s
end
# Face graphic setting of snake system
if name[/\d+\-Snake(\d+)/] != nil
return "sn" + $1.to_i.to_s
end
# Face graphic setting of aquatic system
if name[/\d+\-Aquatic(\d+)/] != nil
return "a" + $1.to_i.to_s
end
# Face graphic setting of beast system
if name[/\d+\-Beast(\d+)/] != nil
return "b" + $1.to_i.to_s
end
# Face graphic setting of goblin system
if name[/\d+\-Goblin(\d+)/] != nil
return "gb" + $1.to_i.to_s
end
# Face graphic setting of bird system
if name[/\d+\-Bird(\d+)/] != nil
return "br" + $1.to_i.to_s
end
# Face graphic setting of devil system
if name[/\d+\-Devil(\d+)/] != nil
return "d" + $1.to_i.to_s
end
# Face graphic setting of angel system
if name[/\d+\-Angel(\d+)/] != nil
return "an" + $1.to_i.to_s
end
# Face graphic setting of elemental system
if name[/\d+\-Elemental(\d+)/] != nil
return "e" + $1.to_i.to_s
end
# Face graphic setting of monster system
if name[/\d+\-Monster(\d+)/] != nil
return "mo" + $1.to_i.to_s
end
# Face graphic setting of civilian system
if name[/\d+\-Civilian(\d+)/] != nil
return "ci" + $1.to_i.to_s
end
# Face graphic setting of baby system
if name[/\d+\-Baby(\d+)/] != nil
return "ba" + $1.to_i.to_s
end
# Face graphic setting of noble system
if name[/\d+\-Noble(\d+)/] != nil
return "n" + $1.to_i.to_s
end
# Face graphic setting of butler system
if name[/\d+\-Butler(\d+)/] != nil
return "bt" + $1.to_i.to_s
end
# Face graphic setting of maid system
if name[/\d+\-Maid(\d+)/] != nil
return "ma" + $1.to_i.to_s
end
# Face graphic setting of bartender system
if name[/\d+\-Bartender(\d+)/] != nil
return "bat" + $1.to_i.to_s
end
# Face graphic setting of bunnygirl system
if name[/\d+\-BunnyGirl(\d+)/] != nil
return "bn" + $1.to_i.to_s
end
# Face graphic setting of cook system
if name[/\d+\-Cook(\d+)/] != nil
return "co" + $1.to_i.to_s
end
# Face graphic setting of clown system
if name[/\d+\-Clown(\d+)/] != nil
return "cl" + $1.to_i.to_s
end
# Face graphic setting of dancer system
if name[/\d+\-Dancer(\d+)/] != nil
return "da" + $1.to_i.to_s
end
# Face graphic setting of bard system
if name[/\d+\-Bard(\d+)/] != nil
return "bar" + $1.to_i.to_s
end
# Face graphic setting of scholar system
if name[/\d+\-Scholar(\d+)/] != nil
return "sc" + $1.to_i.to_s
end
# Face graphic setting of farmer system
if name[/\d+\-Farmer(\d+)/] != nil
return "far" + $1.to_i.to_s
end
# Face graphic setting of prisoner system
if name[/\d+\-Prisoner(\d+)/] != nil
return "p" + $1.to_i.to_s
end
# Face graphic setting of storekeeper system
if name[/\d+\-Storekeeper(\d+)/] != nil
return "st" + $1.to_i.to_s
end
# Face graphic setting of captain system
if name[/\d+\-Captain(\d+)/] != nil
return "ca" + $1.to_i.to_s
end
# Face graphic setting of sailor system
if name[/\d+\-Sailor(\d+)/] != nil
return "sa" + $1.to_i.to_s
end
# Face graphic setting of animal system
if name[/\d+\-Animal(\d+)/] != nil
return "ani" + $1.to_i.to_s
end
# Face graphic setting of small system
if name[/\d+\-Small(\d+)/] != nil
return "sm" + $1.to_i.to_s
end
# Face graphic setting of original system
if name[/xpchar(\d+)/] != nil
return "o" + $1.to_i.to_s
end
return name
end
end
#============================================================================
# ** Cache
#----------------------------------------------------------------------------
# It is the module image processing.
#============================================================================
module Cache
def self.face(filename)
self.load_bitmap("Graphics/Faces/", filename)
end
end
end
Yeah, I was pretty busy translating RTAB back in 2006-2008
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
(08-22-2020, 02:29 AM)kyonides Wrote: Err, if you provide us with the link to the battle system and some test graphics that look like the screenshots above, perhaps I or any other scripter would help you somehow.
(08-22-2020, 03:31 AM)DerVVulfman Wrote: Just a shot in the dark....
I think his script basically uses/replaces traditional battlers with faces drawn over the battlestatus window. Cogwheel did it too
Battle face graphics
Code:
# Battle face graphics (RTAB Business) Ver 1.00
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/
# NOTE BY DERVVULFMAN:
# This system is dependant on the Face Graphic Retrieval System designed by
# Cogwheel. It is that system that caches additional graphics within the
# Graphics\Faces folder and creates 'Naming Conventions' used by the system.
#==============================================================================
# ** Sprite_Battler
#------------------------------------------------------------------------------
# This sprite is used to display the battler.It observes the Game_Character
# class and automatically changes sprite conditions.
#==============================================================================
class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# ● Face graphic setting
#--------------------------------------------------------------------------
def face_select(type)
# Branch by face graphic name
case @face_name
when "f7" # If fighter 7
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_15"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_10"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_10"
when 10 # If attacking
return "_6"
when 11 # If recovery
return "_16"
when 20 # If damaged
return "_14"
when 30 # If victory
return "_12"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_2"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_3"
end
when "l2" # If lancer 2
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_7"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_2"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_2"
when 10 # If attacking
return "_8"
when 11 # If recovery
return "_12"
when 20 # If damaged
return "_16"
when 30 # If victory
return "_5"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_4"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_9"
end
when "o1" # If original 1
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_15"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_13"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_13"
when 10 # If attacking
return "_7"
when 11 # If recovery
return "_12"
when 20 # If damaged
return "_8"
when 30 # If victory
return "_10"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_5"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_6"
end
when "o3" # If original 3
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_8"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_9"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_9"
when 10 # If attacking
return "_15"
when 11 # If recovery
return "_12"
when 20 # If damaged
return "_11"
when 30 # If victory
return "_2"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_6"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_3"
end
when "o4" # If original 4
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_13"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_4"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_4"
when 10 # If attacking
return "_5"
when 11 # If recovery
return "_10"
when 20 # If damaged
return "_8"
when 30 # If victory
return "_15"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_16"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_5"
end
when "o39" # If original 39
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_11"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_14"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_6"
when 10 # If attacking
return "_9"
when 11 # If recovery
return "_13"
when 20 # If damaged
return "_7"
when 30 # If victory
return "_16"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_8"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_3"
end
when "o40" # If original 40
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_16"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_7"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_7"
when 10 # If attacking
return "_14"
when 11 # If recovery
return "_4"
when 20 # If damaged
return "_7"
when 30 # If victory
return "_3"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_9"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_2"
end
when "o41" # If original 41
# Branch by action type
case type
when 0 # If wait
return ""
when 1 # If dying
return "_7"
when 2 # If guarding
return ""
when 3 # If Confused / Status Ailment (w/ 'Always attack allies')
return "_11"
when 4 # If Stunned / Status Ailment (w/ 'Can't move')
return "_11"
when 10 # If attacking
return "_8"
when 11 # If recovery
return "_5"
when 20 # If damaged
return "_14"
when 30 # If victory
return "_3"
when 40 # If using Skill Casting script (and INT_F is over 0) - Spells
return "_5"
when 41 # If using Skill Casting script (and INT_F is 0) - Physical Skill
return "_2"
end
end
return ""
end
#--------------------------------------------------------------------------
# * Update face graphic
#--------------------------------------------------------------------------
def face_update
# When delay catches
@face_delay -= 1 if @face_delay > 0
# When the damage is received
if @hp != @battler.hp
# Show attack face
if @hp > @battler.hp
@face_delay = 20
end
# Reflect HP
@hp = @battler.hp
return
end
# If performing action
if @battler.phase > 1
# Face attack indication
if @face_type != 10
# Set face type to attack
@face_type = 10
# Branch by action type
case @battler.current_action.kind
when 0 # Basic
# If attack
if @battler.current_action.basic == 0
self.bitmap = RPG::Cache.face(@face_name + face_select(10))
end
when 1..2 # Skill and Item
# Acquire scope of attack
if @battler.current_action.kind == 1
scope = $data_skills[@battler.current_action.skill_id].scope
else
scope = $data_items[@battler.current_action.item_id].scope
end
# If attack (not on self or party members)
if scope < 3
self.bitmap = RPG::Cache.face(@face_name + face_select(10))
# If recovery (on self or party members)
else
self.bitmap = RPG::Cache.face(@face_name + face_select(11))
end
end
end
return
end
# If victory
if $scene.phase == 5
if @face_type != 30
# Set face type to victory
@face_type = 30
self.bitmap = RPG::Cache.face(@face_name + face_select(30))
end
return
end
# If using the 'Skill Casting Time Counter' script
if @battler.rtp > 0
if @face_type != 40
# Sets face type to a 'delayed' skill
@face_type = 40
# In case of a delayed 'spell'
if $data_skills[@battler.current_action.skill_id].int_f > 0
self.bitmap = RPG::Cache.face(@face_name + face_select(40))
# In case of a delayed 'skill'
else
self.bitmap = RPG::Cache.face(@face_name + face_select(41))
end
end
return
end
# If damage is received
if @face_delay > 0
if @face_type != 20
# Sets face type to damaged
@face_type = 20
self.bitmap = RPG::Cache.face(@face_name + face_select(20))
end
return
end
# If guarding
if @battler.guarding?
if @face_type != 2
@face_type = 2
self.bitmap = RPG::Cache.face(@face_name + face_select(2))
end
# If normal
elsif @hp > @battler.maxhp/4 and @battler.movable? and @battler.inputable?
if @face_type != 0
@face_type = 0
self.bitmap = RPG::Cache.face(@face_name + face_select(0))
end
# If dying
elsif @battler.inputable?
if @face_type != 1
@face_type = 1
self.bitmap = RPG::Cache.face(@face_name + face_select(1))
end
# If Berserk
else
# If Berserk
if @battler.restriction == 3
if @face_type != 3
@face_type = 3
self.bitmap = RPG::Cache.face(@face_name + face_select(3))
end
# If confused
else
if @face_type != 4
@face_type = 4
self.bitmap = RPG::Cache.face(@face_name + face_select(4))
end
end
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
# If battler is nil
if @battler == nil
self.bitmap = nil
loop_animation(nil)
return
end
# If file name or hue are different than current ones
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue
# Get and set bitmap
@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
# If the face graphic file exists
if @battler.is_a?(Game_Actor)
# From character graphic name, search of face graphic name
@face_name = RPG::Face.seek(@battler.character_name)
@face_name.sub!(/_\d+$/) { "" }
@face_type = 0
@face_delay = 0
@hp = @battler.hp
if FileTest.exist?("Graphics/Faces/" + @face_name + ".png")
# Draw face graphics
self.bitmap = RPG::Cache.face(@face_name)
# If the face graphic file does not exist
else
@face_name = ""
self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
end
# Else normal battlers
else
@face_name = ""
self.bitmap = RPG::Cache.battler(@battler_name, @battler_hue)
end
@width = bitmap.width
@height = bitmap.height
self.ox = @width / 2
self.oy = @height + 16
if @battler.is_a?(Game_Enemy)
@battler.height = @height
end
# Change opacity level to 0 when dead or hidden
if @battler.dead? or @battler.hidden
self.opacity = 0
end
@hp = @battler.hp
end
# Update face graphics
face_update if @face_name != ""
# When animation ID differs from present ones,
if @battler.state_animation_id != @state_animation_id
@state_animation_id = @battler.state_animation_id
loop_animation($data_animations[@state_animation_id])
end
# If actor which should be displayed
if @battler.is_a?(Game_Actor) and @battler_visible
# Bring opacity level down a bit when not in main phase
if $game_temp.battle_main_phase
self.opacity += 3 if self.opacity < 255
else
self.opacity -= 3 if self.opacity > 207
end
end
# Blink
if @battler.blink
blink_on
else
blink_off
end
# If invisible
unless @battler_visible
# Appear
if not @battler.hidden and not @battler.dead? and
(@battler.damage.size < 2 or @battler.damage_pop.size < 2)
appear
@battler_visible = true
end
end
# Damage
for battler in @battler.damage_pop
if battler[0].class == Array
if battler[0][1] >= 0
$scene.skill_se
else
$scene.levelup_se
end
damage(@battler.damage[battler[0]], false, 2)
else
damage(@battler.damage[battler[0]], @battler.critical[battler[0]])
end
if @battler.damage_sp.include?(battler[0])
damage(@battler.damage_sp[battler[0]],
@battler.critical[battler[0]], 1)
@battler.damage_sp.delete(battler[0])
end
@battler.damage_pop.delete(battler[0])
@battler.damage.delete(battler[0])
@battler.critical.delete(battler[0])
end
# If visible
if @battler_visible
# Escape
if @battler.hidden
$game_system.se_play($data_system.escape_se)
escape
@battler_visible = false
end
# White flash
if @battler.white_flash
whiten
@battler.white_flash = false
end
# Animation
unless @battler.animation.empty?
for animation in @battler.animation.reverse
animation($data_animations[animation[0]], animation[1])
@battler.animation.delete(animation)
end
end
# Collapse
if @battler.damage.empty? and @battler.dead?
if $scene.dead_ok?(@battler)
if @battler.is_a?(Game_Enemy)
$game_system.se_play($data_system.enemy_collapse_se)
else
$game_system.se_play($data_system.actor_collapse_se)
end
collapse
@battler_visible = false
end
end
end
# Set sprite coordinates
self.x = @battler.screen_x
self.y = @battler.screen_y
self.z = @battler.screen_z
if @battler.is_a?(Game_Enemy)
self.zoom_x = @battler.real_zoom * @battler.zoom
self.zoom_y = @battler.real_zoom * @battler.zoom
end
end
end
class Scene_Battle
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :phase # phase
end
Which relies on this script...
Face graphic retrieval system
Code:
# Face graphic retrieval system Ver 1.01
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/
#==============================================================================
# ** RPG
#------------------------------------------------------------------------------
# It is basic module
#==============================================================================
module RPG
#============================================================================
# ** Face
#----------------------------------------------------------------------------
# It is the module which processes face graphics.
#============================================================================
module Face
#--------------------------------------------------------------------------
# * Search face graphics
#--------------------------------------------------------------------------
def self.seek(name)
# Face graphic setting of fighter system
if name[/\d+\-Fighter(\d+)/] != nil
return "f" + $1.to_i.to_s
end
# Face graphic setting of lancer system
if name[/\d+\-Lancer(\d+)/] != nil
return "l" + $1.to_i.to_s
end
# Face graphic setting of warrior system
if name[/\d+\-Warrior(\d+)/] != nil
return "w" + $1.to_i.to_s
end
# Face graphic setting of thief system
if name[/\d+\-Thief(\d+)/] != nil
return "t" + $1.to_i.to_s
end
# Face graphic setting of hunter system
if name[/\d+\-Hunter(\d+)/] != nil
return "h" + $1.to_i.to_s
end
# Face graphic setting of gunner system
if name[/\d+\-Gunner(\d+)/] != nil
return "g" + $1.to_i.to_s
end
# Face graphic setting of cleric system
if name[/\d+\-Cleric(\d+)/] != nil
return "c" + $1.to_i.to_s
end
# Face graphic setting of mage system
if name[/\d+\-Mage(\d+)/] != nil
return "m" + $1.to_i.to_s
end
# Face graphic setting of king system
if name[/\d+\-King(\d+)/] != nil
return "k" + $1.to_i.to_s
end
# Face graphic setting of queen system
if name[/\d+\-Queen(\d+)/] != nil
return "q" + $1.to_i.to_s
end
# Face graphic setting of trader system
if name[/\d+\-Trader(\d+)/] != nil
return "tr" + $1.to_i.to_s
end
# Face graphic setting of fortuneteller system
if name[/\d+\-Fortuneteller(\d+)/] != nil
return "fo" + $1.to_i.to_s
end
# Face graphic setting of grappler system
if name[/\d+\-Grappler(\d+)/] != nil
return "gr" + $1.to_i.to_s
end
# Face graphic setting of fairy system
if name[/\d+\-Fairy(\d+)/] != nil
return "fa" + $1.to_i.to_s
end
# Face graphic setting of soldier system
if name[/\d+\-Soldier(\d+)/] != nil
return "s" + $1.to_i.to_s
end
# Face graphic setting of undead system
if name[/\d+\-Undead(\d+)/] != nil
return "u" + $1.to_i.to_s
end
# Face graphic setting of snake system
if name[/\d+\-Snake(\d+)/] != nil
return "sn" + $1.to_i.to_s
end
# Face graphic setting of aquatic system
if name[/\d+\-Aquatic(\d+)/] != nil
return "a" + $1.to_i.to_s
end
# Face graphic setting of beast system
if name[/\d+\-Beast(\d+)/] != nil
return "b" + $1.to_i.to_s
end
# Face graphic setting of goblin system
if name[/\d+\-Goblin(\d+)/] != nil
return "gb" + $1.to_i.to_s
end
# Face graphic setting of bird system
if name[/\d+\-Bird(\d+)/] != nil
return "br" + $1.to_i.to_s
end
# Face graphic setting of devil system
if name[/\d+\-Devil(\d+)/] != nil
return "d" + $1.to_i.to_s
end
# Face graphic setting of angel system
if name[/\d+\-Angel(\d+)/] != nil
return "an" + $1.to_i.to_s
end
# Face graphic setting of elemental system
if name[/\d+\-Elemental(\d+)/] != nil
return "e" + $1.to_i.to_s
end
# Face graphic setting of monster system
if name[/\d+\-Monster(\d+)/] != nil
return "mo" + $1.to_i.to_s
end
# Face graphic setting of civilian system
if name[/\d+\-Civilian(\d+)/] != nil
return "ci" + $1.to_i.to_s
end
# Face graphic setting of baby system
if name[/\d+\-Baby(\d+)/] != nil
return "ba" + $1.to_i.to_s
end
# Face graphic setting of noble system
if name[/\d+\-Noble(\d+)/] != nil
return "n" + $1.to_i.to_s
end
# Face graphic setting of butler system
if name[/\d+\-Butler(\d+)/] != nil
return "bt" + $1.to_i.to_s
end
# Face graphic setting of maid system
if name[/\d+\-Maid(\d+)/] != nil
return "ma" + $1.to_i.to_s
end
# Face graphic setting of bartender system
if name[/\d+\-Bartender(\d+)/] != nil
return "bat" + $1.to_i.to_s
end
# Face graphic setting of bunnygirl system
if name[/\d+\-BunnyGirl(\d+)/] != nil
return "bn" + $1.to_i.to_s
end
# Face graphic setting of cook system
if name[/\d+\-Cook(\d+)/] != nil
return "co" + $1.to_i.to_s
end
# Face graphic setting of clown system
if name[/\d+\-Clown(\d+)/] != nil
return "cl" + $1.to_i.to_s
end
# Face graphic setting of dancer system
if name[/\d+\-Dancer(\d+)/] != nil
return "da" + $1.to_i.to_s
end
# Face graphic setting of bard system
if name[/\d+\-Bard(\d+)/] != nil
return "bar" + $1.to_i.to_s
end
# Face graphic setting of scholar system
if name[/\d+\-Scholar(\d+)/] != nil
return "sc" + $1.to_i.to_s
end
# Face graphic setting of farmer system
if name[/\d+\-Farmer(\d+)/] != nil
return "far" + $1.to_i.to_s
end
# Face graphic setting of prisoner system
if name[/\d+\-Prisoner(\d+)/] != nil
return "p" + $1.to_i.to_s
end
# Face graphic setting of storekeeper system
if name[/\d+\-Storekeeper(\d+)/] != nil
return "st" + $1.to_i.to_s
end
# Face graphic setting of captain system
if name[/\d+\-Captain(\d+)/] != nil
return "ca" + $1.to_i.to_s
end
# Face graphic setting of sailor system
if name[/\d+\-Sailor(\d+)/] != nil
return "sa" + $1.to_i.to_s
end
# Face graphic setting of animal system
if name[/\d+\-Animal(\d+)/] != nil
return "ani" + $1.to_i.to_s
end
# Face graphic setting of small system
if name[/\d+\-Small(\d+)/] != nil
return "sm" + $1.to_i.to_s
end
# Face graphic setting of original system
if name[/xpchar(\d+)/] != nil
return "o" + $1.to_i.to_s
end
return name
end
end
#============================================================================
# ** Cache
#----------------------------------------------------------------------------
# It is the module image processing.
#============================================================================
module Cache
def self.face(filename)
self.load_bitmap("Graphics/Faces/", filename)
end
end
end
Yeah, I was pretty busy translating RTAB back in 2006-2008
Aah!! Thank you so much! Anyway how to configure it? I'm kinda clueless with the face filename. Cogwheel's website is dead so I cant find most of their script :(
08-22-2020, 08:20 PM (This post was last modified: 08-22-2020, 08:20 PM by DerVVulfman.)
Query. As stated... "I think his script basically uses/replaces traditional battlers" ... which means you have no actor battlers in the battle system at all. Only enemy battlers. Only the enemies will be on the battlefield and all you see of the heroes would be the faces in the window.
Can I assume... you would want faces AND actor battlers???????
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
08-23-2020, 04:16 PM (This post was last modified: 08-24-2020, 03:21 PM by DerVVulfman.)
I decided to just quickly jot out this...
Cogwheel Battle Faces
Code:
#==============================================================================
# ** Cogwheel Battle Faces
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.3
# 08-24-2020 (MM-DD-YYYY)
# RGSS / RPGMaker XP (Cogwheel RTAB/CTB dependent)
#------------------------------------------------------------------------------
#
# This script places face graphics behind the actual battle statistics for
# each hero when the game developer is using one of cogwheel's battlesystems.
# It is based upon the use of the Window_DetailsStatus class in use.
#
# The Face filenames may be the hero's name, an "Actor_"+id combination, the
# hero's characterset or the hero's battler. This is a configurable option.
#
# Faces are assumed as 100x100 px in size in order to fit within each actor's
# status window. But the placement can be adjusted within the config.
#
# Faces are stored within the Graphics\Faces folder.
#
#
#==============================================================================
#
# TERMS AND CONDITIONS:
#
# Free for use, even in commercial games. This script was inspired by
# rekkatsu, so due credit is not required just for me, but for rekkatsu
# as well.
#
#==============================================================================
module BattleFace
# FACE NAMING TYPE
# ================
# This determines how the faces are named and used in the system. The faces
# may be named after the hero's name, use the ID of the hero, use the hero's
# characterset or the hero's battler to name the face.
#
# ---------------------------------------------------------------------------
# Types:
# 0 = Hero's Name (ie: "Aluxes.png", "Basil.png", etc.)
# 1 = Hero's ID within text (ie: "Actor_1.png" ,"Actor_12.png", etc.)
# 2 = Hero's Characterset (ie: "025-Cleric01.png", "042-King01.png", etc.)
# 3 = Hero's Battler (ie: "016-Thief01.png", "043-Queen01.png", etc.)
# ---------------------------------------------------------------------------
#
TYPE = 0 # Assumes character name
# X/Y COORD ADJUSTMENTS
# =====================
# This lets you center or align the faces within each Actor's window.
# The current coords are assuming a 100x100 image for the face.
#
X = 32
Y = 32
end
#==============================================================================
# ** RPG::Cache
#------------------------------------------------------------------------------
# This is a module that loads each of RPGXP's graphic formats, creates a
# Bitmap object, and retains it.
#==============================================================================
module RPG::Cache
#----------------------------------------------------------------------------
# ● Face
# filename : filename
# hue : hue (range of 0-255)
#----------------------------------------------------------------------------
def self.face(filename, hue=0)
begin
self.load_bitmap("Graphics/Faces/", filename, hue)
rescue
self.load_bitmap("Graphics/Faces/", "", hue)
end
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles the actor. It's used within the Game_Actors class
# ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :actor_id # actor ID
end
#==============================================================================
# ** Window_DetailsStatus
#------------------------------------------------------------------------------
# It is the window which indicates the status of the actor in individually in the battle picture.
#==============================================================================
class Window_DetailsStatus < Window_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias battleface_detailstatus_initialize initialize
alias battleface_detailstatus_dispose dispose
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
# id : status ID
# x : x-coordinates
#--------------------------------------------------------------------------
def initialize(actor, id, x)
# Perform the original call
battleface_detailstatus_initialize(actor, id, x)
# Draw the face and re-refresh
draw_face(actor, x)
refresh(actor, false)
end
#--------------------------------------------------------------------------
# * Draw Actor Face
# actor : actor
# x : x-coordinates
#--------------------------------------------------------------------------
def draw_face(actor,x)
@spriter = Sprite.new()
# Variations
id = "Actor_" + (actor.actor_id).to_s
name = actor.name
char = actor.character_name
batt = actor.battler_name
case BattleFace::TYPE
when 1 ; img = id
when 2 ; img = char
when 3 ; img = batt
else ; img = name
end
@spriter.bitmap = RPG::Cache.face(img) rescue clear_face
@spriter.x = BattleFace::X + x
@spriter.y = BattleFace::Y + 320
@spriter.z = 100
end
#--------------------------------------------------------------------------
# * Draw Empty Face
#--------------------------------------------------------------------------
def clear_face
face = RPG::Cache.face("")
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
# Perform the original call
battleface_detailstatus_dispose
# Dispose of sprite
@spriter.dispose
end
end
It'll work with either Cogwheel's RTAB or his CTB script (some don't realize he made a CTB script). It throws a face behind the text within Cogwheel's own 'DetailsStatus' window which is unique for each actor.
It doesn't animate the faces like Cogwheel's own script.. But it won't
demand 16 faces per actor
require direct editing of the code for each actor and class for each face
doesn't take over the battler class, preventing the AnimBat system
I have plenty of instructions in there. But in general, you make a Faces subfolder in the Graphics folder, and have it filled with face png files (all the same size). And the name of the face files should be based on either the name of the hero, the filename of the characterset, the battler or is like "Actor_1.png", "Actor_2.png", etc. But again, it's in the instructions.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
08-23-2020, 05:25 PM (This post was last modified: 08-23-2020, 05:36 PM by rekkatsu.)
Omg, thank you so much...
I think I don't deserve its credit, There are many screenshots of rmxp game which has face on their battle status lol. Anyway I've put it below RATB script and it shows like this.
I thought it's not compatible with my main battle system (Rice Field) but when I tried minkoff's. It does show too.
08-23-2020, 06:02 PM (This post was last modified: 08-23-2020, 06:03 PM by DerVVulfman.)
Raisefield's 2006? Geez... I forgot about that. Every version I had, the config was borked and it had 'undefined animation_duration for enemy' errors. It may rely on another script I do not have...
Well, I figured you were using the Minkoff/Animbat system. But I did a minor update (above) to alleviate that warning you had received.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Yes lmao, I know it's outdated but it's simple hahaha but I have some alternative too. well, I'm kinda clueless with RGSS . How did you find this battle system bug?
btw I found this error again. sorry