Make state hidden

● ARCHIVED · READ-ONLY
Started by Macmaxi 11 posts View original ↗
  1. Hey guys i have a quick question and a not so quick question.

    1.) I have a dummy state that gets applied in order to check for something else. But that dummy state is shown in the state window even if there is no icon. Is there a possiblity to make certain states (by ID) invisible or just have it not an icon drawn at all so the player can't see it?

    Now you might say that i could just put the priority high / low to have it shown at the end of the list, but there is the second issue coming in. 

    2.) I use the MOG Ultra HUD script which allows me more control about how the combat UI looks like. 

    For reference this is what it looks like:

    Spoiler
    thepor.png

    Now the states are going to get shown on the left side besides the HP bars but the MOG Ultra Hud has only one rectangle assigned for the states and cycles through them. A state without an icon will now make the states flash for a bit, because it is still in the list of states to be cycles through. 

    The script part which does that should be the following:

    Spoiler
    #==============================================================================#==============================================================================# ** 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 = 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  end    #--------------------------------------------------------------------------  # * Refresh States  #--------------------------------------------------------------------------          def refresh_states      check_icon_image      @status_old = @actor.states      @status_flow = [0,0]      @actor_status.dispose if @actor_status != nil      @states_size = @actor.states.size > 0 ? (26 * @actor.states.size) : 24       @actor_status = Bitmap.new(@states_size,24)      index = 0      for i in @actor.states         rect = Rect.new(i.icon_index % 16 * 24, i.icon_index / 16 * 24, 24, 24)         @actor_status.blt(26 * index , 0, @icon_image, rect)         @status.x = @hud_position[0] + STATES_POSITION[0] - 24         index += 1      end  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      refresh_states if @status_old != @actor.states      flow_states  end    end
    I would like to have the states starting on the right and just add the new states to the left side so it forms a simple row of icons instead of cycling through them. I'm not sure whether this is easy to achieve with how the current script looks like. That would make the first problem solve itself because if i have the dummy always left-most it would never be visible. Though if there is an easy solution for the first i would take that too / regardless of the second problem because i might run into other troubles later on. 

    I'm sure there is a way to handle my skill different without the dummy state, but if i can't find a solution for the second issue i will probably drop that script altogether because having the states cycled through really is inconvenient for the player.

    And even if the common event i used for the skill is suboptimal, i rather have something done myself (and something i can understand), so if you were thinking "why use a dummy state" this would be a short answer to it. 

    I appreciate any kind of insight on this issue. 

    Here would be the entire MOG Ultra HUD script for the case i have overseen something: 

    http://pastebin.com/XzaiQLvh
  2. As far as I know, by default states with zero priority are absolutely hidden. Did you try that? If that`s not happening, probably Mog`s script overwrote that, but... Try testing it with zero priority just to make shure!
  3. I did test it real quick and it seems like it doesn't work. For further testing, when i use an item i get the default RPG Maker status screen on the bottom for the actors and the state is shown there as well even with the priority set to zero. 
  4. Is your state is applied by a skill?

    If so, you can use the skill to call a common event which will turn switch x ON.

    Create a second common event set to parallel process when that switch is on.

    That way, the common event can do your checks for you.

    Make sure to switch it back OFF once the battle is over.
  5. The problem with this method, though, is that the system wouldn't be able to check who was targeted by the skill.

    Mmm... But I'm pretty sure there's a Tsukihime script that could circumvent that! I'll take a look.
  6. Alright if you want to tackle it that way and have me work without the dummy state i will explain what my skill does. 

    Basically i want to have a defense increasing buff that stacks up to 5 times. Every time a skill is cast that should increase the defense of one or more targets a common event is called that checks if the dummy state is applied. 

    At the beginning obviously the actor doesn't have the dummy state so it is applied alongside with Level 1 of the defense buff and a + 1 in the defense variable. 

    Now the next time a defense increasing buff i cast he checks again if the dummy state is applied. Now that it is, conditional branches check which level is applied (by checking the variable) and removes the old one while applying the next level and also refreshing the dummy state. 

    Since after 5 turn without recast the buff should expire, i need something to tell the common event that the buff indeed has been run out. I can't do it with the variable nor with the defense buff so i need a static defense dummy that runs out at the same time. Now the next time the event is called, and it can't find the dummy state (because the buff has run out with it) it will reset the variable to 1 and apply level 1 again.

    If that isn't clear, here is the common event that is called:

    buff.jpg

    Note: After the 2 frames of wait time it's the same with the other actor. I only have two static actors which make these things easier even if it's inconvenient to not have a global check (for enemies). I wouldn't mind doing the extra work though, this is as good as i could tinker it up without external help.
  7. It sounds like you are emulating states stacking using the common event.

    Barring incompatibility, maybe you can consider using Yanfly's Buff & State Manager.
  8. Since i do have some time on my hands, i will quickly see if i can recreate this skill with the script, but the first issue i see here is that i can't have custom icons for each stack applied, since i do have a range of icons i want to use instead of just a number.

    After having it tried a bit, it seems like the stacking part is only meant to work with the default stat buff of VX Ace, which means i can't show it to the user, unless i use a dummy state yet again, but this time for the stacking part.

    I could probably do a quick script line that checks the level of the buff (used by the script [bUFF_BOOST_FORMULA = "buff_level(param_id) * 0.25 + 1.0"]) and then add the correct level icon for that, but that would need a quick script line that i can't write. 
  9. I'm not too sure about the script working only with the default stat buffs.

    If you scroll down the webpage related to that script, it shows the ability to add and remove states :

    <state x turn: +y>

    <state x turn: -y>

    Where x is the state ID on the database.

    Remember to add the relevant states into your skills.
  10. I had some time to check again and as far as i'm concerned it only allows these things: 

    - A stacking efficiency and turn mechanic for the innate boost feature of VX Ace, only for the effect part on the skill. 

    - A turn mechanic for states. The boost formula gets ignored if you put it in a state, thus making it useless for what i want to achieve. Actually i don't need the flexible turns at all because i'm using the basic refresh to 5 turns formula.

    Also the way the boosting works is really restricted, for me i feel like it's better when i have more control about it. This still leaves me with my two initial problems. If anyone feels like they need to give me advice on how to make an easier skill here is what i need in short: 

    1.) A stacking state for 5 turns

    2.) I can adjust what each level does exactly (which would mean 5 individual states for each level) + the icon changes

    I have the whole thing down and working. It's just the two issues mentioned in the OP that make me fail in this. Well technically it's only the dummy state that has something to do with this skill, the Mog Ultra Hud adjustment is basically another issue. 
  11. Maybe you have a custom script that changes how states/displaying happens? Because my states with no icon (default priority settings) never show when they occur. (you know, where actor states show on the default battle system HUD next to their name and HP)  When multiple states are applied and their icons cycle, there are never any blank icon spots.