Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

State Displaying

Can anyone make a script that displays all state animations inflicted in battle at the same time? I already know that there's one that cycles through the animations, but that's not what I want. I need it for XP.

I don't think I need to explain anymore.
 
Friend this system you want is for XP or VX  :shock:, if for XP SephrothSpawn has a system by name of States Cycling in his TestBed. Just look here in the forum you will find.
And the next time you make a claim, is clearer, so you will be answered more quickly (without the need for several BUMPS :thumb:)
 
Carrot Works":wizx6u72 said:
I already know that there's one that cycles through the animations, but that's not what I want.

Sorry, I forgot to specify that it was for XP. I already know about the state cycling one, but I need one that shows all at once.

I guess if there's no way to produce a such script, I'll just go with the state cycling.
 
Well, I tried State Cycling (by Trickster), and my game is pretending that the script doesn't exist. I made sure every required script was in the right place, I'm saving, and I made sure the two states I'm using to test don't use the same animation. I'm not getting an error message or anything, it just isn't doing anything. Does anyone have any idea what's wrong?
 
Wish I could say for sure, but I'm just making a wild guess here. Maybe it requires a part of the SDK you don't have in your project? Most likely it would be something like SDK Part 3 Scene_Battle, or a part dealing with SDK definitions for RPG::Sprite or something of that nature. Also, don't forget to include the MACL parts that it uses, like RGSS.Bitmap.memory, because those are used for the script.

If all else fails, upload a demo of your project scripts so one of us can take a look at whats going on.
 
Carrot Works":hblhpn2m said:
I used all of those scripts, but upon making the test, I realized that it skips some states that are applied. I have no idea why.

I appologize if I can't view the demo right now, but I'll definately look at the demo tonight, but I'm guessing maybe you have a Priority state (I think Poison is a priority state by default), which overrides other states, or maybe something of that nature. Check your customizable constants in the script, and add/remove state IDs from the arrays, see what happens.

Well, Seph hasn't uploaded a Tree Docs thing for it yet I don't think, but SDK 2.4 (the current version) has it so that 90% of the individual parts of each Main Part can be used on its own. The only thing that sucks is, for now, you'll just have to dig (or I can upload a project with them split up if you want)

My guess is it would include the individual parts listed as...

Part 1 obviously (altogether)
"RPG::SPRITE#UPDATE" (listed individually in Part 2)
"PART 3#SCENE_BATTLE" might be used.

And then MACL Part...

RGSS.Bitmap.memory

I could possibly write my own version for you, but it'd probably be a week or two because I've got 50 hrs at my job, and lots of other crap to do on my time off (that and I'm already busy re-writting my CMS). If all else fails, you can always post a topic in RGSS Support asking which parts of the SDK is required to run the Cycle States script, perhaps maybe Seph knows what the minimum SDK reqs are for that script.
 
Hmm... I'm not sure if that's the problem. A state such as poison will show up on one actor, but not on the other, depending what states are applied in what order. It's all completely random, it works when it wants to.
 

Atoa

Member

I wanted it in my game, but the state sycling didn't work well for me too...
I'm trying to understand the state cycling to make an different version of it.

If I finish it, i'll share with you.
 

Atoa

Member

it's been a long time since i said i was going to do an state cycing.
I didn't expected to be so easy '-'
Code:
#==============================================================================

# Atoa State Cycling

# by Atoa

#==============================================================================

module Atoa

  # Increase the time between the animation change.

  State_Cycle_Time = 4

end

 

#==============================================================================

# Game_Battler

#==============================================================================

class Game_Battler

  #--------------------------------------------------------------------------

  include Atoa

  #--------------------------------------------------------------------------

  attr_accessor :state_animation_id

  #--------------------------------------------------------------------------

  alias atoa_state_initialize initialize

  def initialize

    atoa_state_initialize

    @state_frame = @state_animation_id = 0

    @anim_states = []

  end

  #--------------------------------------------------------------------------

  def state_animation_id

    return 0 if @states.empty?

    return 0 if @states.include?(1)

    @state_frame -= 1 if @state_frame > 0

    return @state_animation_id if @state_frame > 0

    if @anim_states.empty?

      for state in @states

        @anim_states << state if $data_states[state].animation_id > 0

      end

    end

    now_state = @anim_states.shift

    return 0 if now_state.nil?

    @state_animation_id = $data_states[now_state].animation_id

    return 0 if $data_animations[@state_animation_id].nil?

    @state_frame = $data_animations[@state_animation_id].frame_max * State_Cycle_Time * 2

    return @state_animation_id

  end

end
I tested with 3 Battle system: the default, an minkoff based, and the XP Tankentai side battle.
It worked fine in all.

I hope it help if you still need it.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top