Mog Hunter Battler Hud Script: State Icon Issue.

610jester

Villager
Member
Joined
Apr 22, 2014
Messages
21
Reaction score
1
First Language
english
Primarily Uses
Hi everyone, Ive been working hard on my project, but ive stumbled upon a small issue. In short, my game requires multiple active states to be applied on one single target at any given time. and so I need a way to convey to the player what states they are afflicted under. Im using mog hunters battle hud ex script to achieve this.
[ https://atelierrgss.wordpress.com/rgss3-battle-hud-ex/ ]

help.png
I have 4 slots available for states to be shown, but I can only seem to get one state icon to appear under an actor. the most ive been able to do is get is the multiple states to slide and rotate through one box only, but id like them to just appear in the next box over when they are afflicted. If anyone knows if there is a way to add additional state icons to the battle hud, please let me know, any help is greatly appreciated.
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,633
Reaction score
5,163
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

610jester

Villager
Member
Joined
Apr 22, 2014
Messages
21
Reaction score
1
First Language
english
Primarily Uses
thank you so much, bump
 

610jester

Villager
Member
Joined
Apr 22, 2014
Messages
21
Reaction score
1
First Language
english
Primarily Uses
PROGRESSIVE BUMP!

Hey everyone, been tinkering around with the script, specifically around the states department,
this code starts at line 894
#============================================================================
#============================================================================
# * STATE
#============================================================================
# Ativar as condições.
#---------------------------------------------------------------------------
STATES_VISIBLE = true
#---------------------------------------------------------------------------
# Definição da prioridade do sprite.
#---------------------------------------------------------------------------
STATES_Z = 1
#---------------------------------------------------------------------------
# Definição da posição das condições. [X,Y]
#---------------------------------------------------------------------------
STATES_POSITION = [7,65]
#---------------------------------------------------------------------------
# Ativar o efeito animado das condições deslizando.
#--------------------------------------------------------------------------- STATES_SCROLLING_ANIMATION = true
#---------------------------------------------------------------------------
# Definição do ângulo do sprite.
#---------------------------------------------------------------------------
STATE_ANGLE = 0
#---------------------------------------------------------------------------
# Definição das condições que serão ocultadas pela hud.
# EX - HIDE_STATES_ID = [9,10,12,14]
#---------------------------------------------------------------------------
HIDE_STATES_ID = []
#============================================================================
#============================================================================


And line 5238
#==============================================================================
#==============================================================================
# ** Battle Hud EX
#==============================================================================
#==============================================================================
class Battle_Hud_EX

#--------------------------------------------------------------------------
# * Create States
#--------------------------------------------------------------------------
def create_states(viewport)
return if !STATES_VISIBLE
@status_old = nil
@status_flow = [-24,0]
@status_size_real = 0
@status = Sprite.new
@status.bitmap = Bitmap.new(24,24)
@status.x = @hud_position[0] + STATES_POSITION[0]
@status.y = @hud_position[1] + STATES_POSITION[1]
@status.z = HUD_Z + STATES_Z
@status.angle = STATE_ANGLE
@status.viewport = viewport
@status.opacity = 0
end

#--------------------------------------------------------------------------
# * Refresh States
#--------------------------------------------------------------------------
def refresh_states
check_icon_image
@status_size_real = set_real_states_size
@status_old = @actor.states
@status_flow = [0,0]
@states_size = @status_size_real > 0 ? (26 * @status_size_real) : 24
@actor_status.dispose if @actor_status != nil
@actor_status = Bitmap.new(@states_size,24)
index = 0
for i in @actor.states
next if HIDE_STATES_ID.include?(i.id)
rect = Rect.new(i.icon_index % 16 * 24, i.icon_index / 16 * 24, 24, 24)
@actor_status.blt(26 * index , 0, @icon_image, rect)
index += 1
end
end

#--------------------------------------------------------------------------
# * Set Real States Size
#--------------------------------------------------------------------------
def set_real_states_size
n = 0
for i in @actor.states
next if HIDE_STATES_ID.include?(i.id)
n += 1
end
return n
end

#--------------------------------------------------------------------------
# * Flow_Status
#--------------------------------------------------------------------------
def flow_states
return if @actor_status == nil
@status.bitmap.clear
return if @actor.states.size == 0
st_src_rect = Rect.new(@status_flow[0],0, 24,24)
@status.bitmap.blt(0,0, @actor_status, st_src_rect)
if STATES_SCROLLING_ANIMATION
@status_flow[0] += 1
@status_flow[0] = -24 if @status_flow[0] >= @states_size + 2
else
@status_flow[1] += 1 unless @actor.states.size <= 1
if @status_flow[1] > 30
@status_flow[1] = 0
@status_flow[0] += 26
@status_flow[0] = 0 if @status_flow[0] >= (@states_size - 0)
end
end
end

#--------------------------------------------------------------------------
# * Update States
#--------------------------------------------------------------------------
def update_states
return if @status == nil
sprite_visible(@status)
refresh_states if @status_old != @actor.states
flow_states
end

end

I feel like this is the area I need to be focusing on to add additional states to the boxes,
but im not sure what to really change, or what to even add or where to add it.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
675
Reaction score
437
First Language
English
Primarily Uses
RMVXA
I made something, but haven't tested too extensively. Let me know how you get on with this:

 

610jester

Villager
Member
Joined
Apr 22, 2014
Messages
21
Reaction score
1
First Language
english
Primarily Uses
This is perfect! you gave me options for everything I needed thank you so much you're a life saver!

With your permission would it be possible for me to use this script addon? this is my first commercial project and id be more than happy to compensate you for use of this script in my game.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
675
Reaction score
437
First Language
English
Primarily Uses
RMVXA
Yep, that's no problem. Just make sure you check Moghunter's terms and conditions as well.
 

610jester

Villager
Member
Joined
Apr 22, 2014
Messages
21
Reaction score
1
First Language
english
Primarily Uses
Thanks a bunch, Ill definitely be adding your name to my credits, I really appreciate your help man.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Where do i have to play Heisei Pistol Show the same creator that made Re: Kinder Parun
I really get the feeling I should be doing regular YouTube videos whenever I make something cool in my game, instead of waiting for massive changes. But not going to lie... I always feel like it's never quite enough to merit an update, until it's a drastic change. :kaoswt:
Going to submit to this game jam...struggling with the time crunch...
Have to keep compromising...
Just released a new OST for my game and a new place to purchase it!

Ah, things to do when you finish a game.
Ami
Me: It's dark cloudy! I hope it's Rain…
(2-3 Hours Later,Changed To Sunny)
Me: :kaolivid:

Forum statistics

Threads
104,537
Messages
1,007,013
Members
136,031
Latest member
fontschoice
Top