Adapting the Holders Addon for Symphony to use Enter stance

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
Hey! I'm using Yanfly's Base Troop Events to force an "entering battle" pose to work in Symphony, basically I've got the troop using force actions to call a skill to play the pose.

It "works" in the sense that all the characters take a step forward and do a thing at the beginning of battle, but for some reason it plays a hodgepodge of random frames instead of row 12. 

My problem is that the Holders addon for Symphony doesn't natively have an "enter" stance call. I tried adding it to the script like so:


#==============================================================================
# ¡ Direction - Advanced Configuration
#==============================================================================

module Direction

#--------------------------------------------------------------------------
# self.index_hb
#--------------------------------------------------------------------------
def self.index_hb(pose)
case pose
# array = [row, frames]
# frames is optional, default is 15
when :idle
array = [0, 12]
when :struck
array = [3, 10]
when :woozy
array = [2, 12]
when :enter
array = [12, 15]
#---
when :victory
array = [10]
when :enter
array = [12, 15]
when :defend
array = [1, 5]
when :dead
array = [12]
#---
when :attack
array = [4, 4]
when :skill
array = [6, 6]
when :magic
array = [7, 6]
when :item
array = [5, 6]
when :enter
array = [12, 15]
#---
when :advance
array = [8, 5]
when :retreat
array = [9, 5]
when :enter
array = [12, 15]
else; array = [0, 12]
end
return array
end

the "when :enter" lines are what I added. The skill has these tags:

<target action>

move user: forward, 6

stance: user, enter

skill effect: dmg, calc

move user: origin

stance: user, idle

</target action>

 

I've got next to no scripting knowledge, the edits I made just seemed logical. I can't begin to fathom why it's playing... frames from different rows. I don't know nearly enough about this to hazard even a guess. Anyone got an idea how I could get this to work?

 

I'm also open to other approaches to making an enter stance work, but it'd need to be available for commercial use.
 
Last edited by a moderator:

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
I'm looking for this too, haven't managed it so far.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
I wish I knew more about scripting because I can't figure out why it isn't playing row 12...
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
How are you calling it in the troop events?


What's the condition?


I'm testing something myself, but need to know how you called it.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
I'm using Force Action to call a skill with the Symphony tags I put in the OP, basically just trying to get it to run the stance.

The condition is "turn no.0" set to run once per battle, so it triggers before any player input as soon as the battle initiates. The whole thing is working just fine, but the script isn't calling row 12 even though I put 12 in the row part of the array (see OP).
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Well, I managed to get it to work, but it doesn't look pretty..


What I did was a Force Action for all my chars, this is what I put in it:


<target action>


stance: user, extra


wait: 40


stance: user, idle


</target action>


Added


when "EXTRA" #Janice nieuwe pose


pose_key = :extra


To battle symphony


And


when :extra


array = [11]


to Holder, because the enter pose is 11, not 12, 12 is the death pose.


But the problems are this


a) My character still have the idle stance before they use the enter pose, so they already have their weapons out which looks just weird..


B) My characters won't do their force action at the same time, so there's a second delay every time which looks ugly too.


I think the problem is, is because symphony automatically starts with the :idle pose, if you edit it you'll see the enter battle pose plays immediately, but then it's stuck in an infinite loop. Basically to get it perfect we'd need a scripter to script to play array 11 first just _once_, then play array 0 from then on.
 
Last edited by a moderator:

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
Oh nice - though according to Holder's sheet information, row 12 is enter, not 11. 12 is also where I have it on all my battlers. 13 is death, 14 is credits.

So... I'm not sure where to add that snippet for Symphony... and will I need to edit it at all? Looks like it's Dutch haha

EDIT: I'm a dunce, it's just a note you put in for yourself I guess. Lol. Found it.
 
Last edited by a moderator:

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Oh yeah you don't need the #Janice stuff, it's just my own note.


Thing is, you still call two arrays, you call 12 twice, as enter pose and death pose.


So that leads me to believe that 11 is your enter pose too. Remember, the first pose, idle, is counted as 0.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
Ah yeah I got it working now, you're right, 11 worked. I keep forgetting things count the first frames/rows/whatever of images as 0 all the time.

Okay, what's weird about that is it's playing the first two frames of the "Magic" row, then the enter animation. Any idea why it's doing that? Is it doing that for you?
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Yes, as I said before:


a) My character still have the idle stance before they use the enter pose, so they already have their weapons out which looks just weird..


In your case your idle stance is probably the magic thing.


It'll always play the default pose when you start a battle and then does the force action after like a second, hence it looks ugly.


And I'm afraid we need a scripter to fix that.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
I'm not tooooo bothered by the default pose thing - you've helped me a ton by getting this basically working, so thank you very much for that!

I dunno about the magic default thing - it's been doing that with various other poses as well, and I don't get why, because this seems pretty pristine to me:

#-------------------------------------------------------------------------- # self.auto_pose_hb #-------------------------------------------------------------------------- def self.auto_pose_hb(battler) return :dead if battler.dead? return :woozy if battler.hp < battler.mhp / 4 return :idle end end # DirectionSo I don't quite get why it's playing half the magic row first. I might try with a clean project (I've got some other scripts in this one atm) and see if that solves it.
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Hm then I am not sure, your array seems fine to me.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
Yeah I don't get it either... I'll fiddle with it. For the moment I just wanted to be able to make some entrance animations for the battlers I'm working on. Thank you! I'll keep the thread open in case anyone happens by with a perfect solution :p
 

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Hah, I hope so. People been asking for a fix to this issue for ages, but so far no-one has made any.
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
Yeah, I noticed that. I'm working on it - gonna see if I can't luck my way into a solution.. haha
 
  • Like
Reactions: BCj

BCj

Veteran
Veteran
Joined
Jun 19, 2014
Messages
1,731
Reaction score
929
First Language
Dutch
Primarily Uses
N/A
Let me know how it goes :)
 

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
Small update, I've figured out why it was playing the "magic" thing. I had the skill set to "certain hit", changing it to "physical attack" removed the magic frames.
 

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
477
Reaction score
682
First Language
English
Primarily Uses
RMVXA
I did some experimenting, and I was able to modify the Battle Symphony and Holder Add On scripts to use the Enter pose! No forced skills needed. It looks pretty cool!

It automatically plays the Enter animation at the start of the battle. You don't need to do add any special tags anywhere, set up any special skills/actions, or do anything except make a few modifications to the scripts.

Here are the edits that you need to make to each script. Add the lines that have a "# TROY" comment on the end to the specified classes/functions.

Yami's Battle Symphony:

class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :origin_x attr_accessor :origin_y attr_accessor :screen_x attr_accessor :screen_y attr_accessor :pose attr_accessor :immortal attr_accessor :icons attr_accessor :direction attr_accessor :force_pose attr_accessor :reverse_pose attr_accessor :hb_entered_battle # TROY def hb_entered_battle? # TROY return @hb_entered_battle # TROY end # TROY #-------------------------------------------------------------------------- # alias method: initialize #-------------------------------------------------------------------------- alias bes_initialize initialize def initialize bes_initialize @hb_entered_battle = false # TROY
Code:
  alias bes_on_battle_start on_battle_start  def on_battle_start    @hb_entered_battle = false # TROY    reset_position    #---    bes_on_battle_start    #---    return if self.actor? && !$game_party.battle_members.include?(self)    set_default_position    @force_pose = true         # TROY  end
Holder Battler Add-on:

module Direction #-------------------------------------------------------------------------- # self.index_hb #-------------------------------------------------------------------------- def self.index_hb(pose) case pose # array = [row, frames] # frames is optional, default is 15 when :idle array = [0, 12] when :struck array = [3, 10] when :woozy array = [2, 12] when :enter # TROY array = [11] # TROY
Code:
  def self.auto_pose_hb(battler)    if battler.hb_entered_battle? == false # TROY      return :enter                        # TROY    end                                    # TROY    return :dead if battler.dead?    return :woozy if battler.hp < battler.mhp / 4    return :defend if battler.guard?    return :idle  end
Code:
  alias bes_hb_update_src_rect update_src_rect  def update_src_rect    bes_hb_update_src_rect unless @battler.use_hb?    return unless @battler.use_hb?    @timer -= 1    if @battler.force_pose      if @timer <= 0 && @pattern < 3        array = []        array = Direction.index_hb(pose)        @pattern += 1        @timer = array[1].nil? ? 15 : array[1]        if @battler.hb_entered_battle == false && @pattern >=3  # TROY          @battler.hb_entered_battle = true                     # TROY          @battler.force_pose = false                           # TROY          @battler.set_default_position                         # TROY        end                                                     # TROY      end    else      if @timer <= 0        @pattern += 1        @pattern = 0 if @pattern > 3        @timer = 15      end    end    #---    line_no = Direction.index_hb(pose)[0]    sx = @pattern * @cw    sy = line_no * @ch    self.src_rect.set(sx, sy, @cw, @ch)  end
I'm not a scripter, and there are probably better ways to do what I did. But I've been experimenting with this for about an hour, and haven't seen any side effects.

Basically, the idea is that I'm adding a new flag to the GameBattler class that tells me when it has entered battle. The flag is defaulted to false. When it selects the initial pose for the battler, it will check this new flag and select the Enter pose instead of the idle pose.

That part was easy. The trick was figuring out when to set the new flag to true so it would switch to the idle pose after the enter animation finished. In a lot of the places I initially tried, the idle pose ended up being set too quickly, and the enter animation was preempted. The solution I eventually came up with was to set the force_pose flag in on_battle_start() - after the initial battler pose is selected, in order to make it get into the right if statement in the update_src_rect() function. I tried it without setting the force_pose flag (putting the logic into the else statement below, but I couldn't get that to work - apparently, if the force_pose flag isn't set to true, the update_src_rect() function only gets called once (until the skill/attack animations cause the battlers to move). Anyway, the logic I added to update_src_rect() will trigger once the Enter animation has finished - it will set the new hb_entered_battle flag, reset the force_pose flag, and select a new pose (this time, the idle pose). From there, everything works the way it always has.

Hope that works for you!
 
Last edited by a moderator:

Dirge

Sound Engineer
Veteran
Joined
Apr 5, 2015
Messages
413
Reaction score
284
First Language
English, German
Primarily Uses
N/A
GolfHacker, you're an absolute gem, it totally worked! 

People have been looking for this solution for AGES. You hero! +10 internets to you, sir!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top