Save-Point
Atoa Custom Battle System: Popup when status change - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Atoa Custom Battle System: Popup when status change (/thread-5698.html)



Atoa Custom Battle System: Popup when status change - Noctis - 01-06-2016

Yes - it is me again. But this will be my last request regarding the acbs by atoa. Promise ))
I've a final request which is in my mind for very long time but I  forgot suggest it. Good that I remember about that.

As you know from my last request, im using the Atoa Custom Battle System alongside his CTB (FFX like addon he made)

I want basically a little new feature/addon on his script.

Whenever someone is inflicted with a negative status effect like poison or any other status effect, a text saying "poison" should appear next to the inflicted one in red color font. The text should start left of the target and vanish while moving to above.

And in addition: Whenever someone is inflicted with a positiv status effect like strength up or any other status effect, a text saying "strengh up" should appear next to the inflicted one in green color font. The text should start left of the target and vanish while moving to above.

If a skill inflicts a target with more than 6 status effects at the time only the first 6 status effects should be visible. It would stupid if every status inflict is shown when a certain skills gives for example 20 status effects. Means: 6 visible status effects is max. If something goes against max: a "......" should be displayed under last status effect popup. But only one time a "........"
But I want me to actually able to determine which status effect is poped up and what text would be displayed: I'd think of something like this:

So not every status effect should shown Up only once I would determine in the list:
So, for example if the status 4 is not on the list it should not be popped up when someone is inflicted with status 4 (blind)

3 => {'text' = poisoned  =>,'font',color,font size => arial,00FF00,10},
This is only a very bad example what I want to score: It would mean: Status effect 3 (poison), when somene gets poisoned the popup will be "poisoned" with arial font and 00FF00 color and font size. Same should be for positive effects.

And, yes: Max status effect pop ups should be 6. If a target gets more than 6 status effects only the first six should be displayed and beyond the last popup should be a "..........." with the ""'s.
And: The same should be done for monsters, only that for monsters the popup should be on the right side of the enemy.
I've a picture as a example how I'd like to see it.
Sorry for my english, im german its already late and Im sleepy.
btw: Theres a attachment as a picture to give you an example. Only that the pose should look smooth in game. lol


RE: Atoa Custom Battle System: Popup when status change - DerVVulfman - 01-10-2016

Adding new touches to an already existing damage pop tends to be problematic. However, I was able to actually add 'status effects' to his damage pop system. I was surprised how easy it was to use his already existing system. But the caveat is that by using his system, I was also using his pop damage animations. That means, no floating up... no floating down... the status pops would be bouncing with the rest of the victim's damage (or however you have it configured in the Config 1 - Basic page lines 440-488).

And instead of being shifted to the left/right, the system is more attuned towards having them above or below the remaining pops. BUT controls were put in place so you can adjust position, both vertical and horizontal.

BUT!!! You may like this, because it does accomplish many things:

1) Permits the renaming of damage pop names when shown in battle. You may have it set to Venom in the database, but have the name appear as 'Poisoned' when rendered as a pop.

2) Allows the loading of damage pop graphics from the same Graphics\Digits folder as the rest of his graphics if one is detected. If you have a 'Smackdown' status ailment, it will load the 'smackdown.png' file and render it. Otherwise, it will draw 'Smackdown' as usual.

3) Individual colors for the status ailment pops if it is rendered with text commands. Not something you need to worry about if all your status ailment pops are loaded graphic files.

4) You can skip some status ailments! You don't want to let someone see that the target is inflicted with the 'Hidden Curse' state? Put the State ID for that ailment in the array that hides em. OR, you can turn off the 'use default name option' switch and not give that state a custom name. If there is no custom name for a state defined AND you're turning default names off... it won't show at all as a pop!

5) Set how many custom states to show at a time!!! Yep, you can set it to 6 if you want. But personally, I think three is enough. Vertically rendered, that should be fine. It chooses which ones to display by ID order.

Give it a shot! Right... (>HERE!<)


RE: Atoa Custom Battle System: Popup when status change - Noctis - 01-24-2016

While I tetsted this for a quite while now it works perfeclty. But theres only 1 thing, that disturbs me a bit. Satus pop ups on enemies also pop up from the right side like it is for heroes.
Is there a chance to change it, so it can pop from the left side just on enemies?


RE: Atoa Custom Battle System: Popup when status change - DerVVulfman - 01-24-2016

The setting of "Dmg_State_X_Adjust" adjusts the horizontal alignment of the pops. And when set to '0'. the horizontal alignment should be centered with the rest of the damage assuming the pops use the same drawing methods as the rest of the damage. I say that because the damage pops align themselves differently between the bitmap rendered pops and the text-rendered pops. It looks real weird and out of place.

The 'normal' damage pops system with RMXP (and its predecesors) did not need to show whether the target was for either actor or enemy. However, Atoa was ingenious and performed a little test (which I myself just did), and saw that the actual target affected (ie the @battler) could just be passed into the damage routine itself!

Code:
module RPG
  class Sprite < ::Sprite
    alias i_am_a_goofball damage
    def damage(value, critical)
      # My addition
      (@battler.is_a?(Game_Actor)) ? p 'actor' : p 'enemy'
      # The original code
      i_am_a_goofball(value, critical)
    end
  end
end
Like my little snippet there?

So in "damage_state_sprite_drawing" (where it finally renders the pops to the screen, you may adjust the x-position of the damage pops by "X" amount, just by adding that little test right when the method starts.
Code:
# Change X position if actor (0px) or enemy (left 45px)
x += (@battler.is_a?(Game_Actor)) ? 0 : -45

Mind you, if you are shifting the damage for an enemy to the left by an extreme degree, you could likewise do this for the y-height too. Winking

Any other queries about this particular plugin can be asked in the plugin's thread.


RE: Atoa Custom Battle System: Popup when status change - Noctis - 01-29-2016

thanks for the fast answer but in which line is the line that needs to be changed / added.
There are many
damage_state_sprite_drawing line in ATOA Status Effect Pops script.


RE: Atoa Custom Battle System: Popup when status change - DerVVulfman - 01-30-2016

When I said...

(01-24-2016, 06:41 PM)DerVVulfman Wrote: So in "damage_state_sprite_drawing" (where it finally renders the pops to the screen), you may adjust the x-position of the damage pops by "X" amount, just by adding that little test right when the method starts.

... I meant to go straight to the 'damage_state_sprite_drawing' method around line 320, and adding below bit of code to the start of the method.

(01-24-2016, 06:41 PM)DerVVulfman Wrote:
Code:
# Change X position if actor (0px) or enemy (left 45px)
x += (@battler.is_a?(Game_Actor)) ? 0 : -45


So it would look like...

Code:
  def damage_state_sprite_drawing(bitmap, state_dur, delay, count, x, y)

    
    # Change X position if actor (0px) or enemy (left 45px)
    x += (@battler.is_a?(Game_Actor)) ? 0 : -45
    
    dmg_delay = Multi_Pop ? i : 1
    dmg_adjust = Damage_Sprite ? 32 : 96
    @_damage_sprites[count] = ::Sprite.new(self.viewport)



RE: Atoa Custom Battle System: Popup when status change - Noctis - 02-01-2016

Worked perfectly, sorry for my stupidity!