Jump to content


Photo

Targeting an empty Actor slot in battle.

YEA Battle Engine Battle Symphony Summoning

  • This topic is locked This topic is locked
22 replies to this topic

#1 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 12:13 PM

Hello, everyone~ Another day, another thread~ xD Today, I, after some searching the net, managed to allow my Necromancer, Ryana, to summon a zombie (another Actor) in battle. And, thanks to a post by Shaz, managed to get that zombie to be removed after battle without having to copy&pasta the life out of my Troops events. Here's the main problem:
I want to make it so that, when I'm selecting Ryana's summon skill, only an empty Actor slot can be selected. Reason for this is that it doesn't make sense for a summon to be used on an actor, then another actor appears. Doing this all causes an unsightly "Failed" to appear, THEN my zombie appears.
 
Any help is appreciated~
 
Thanks~
 
Original thread with Shaz's post: http://forums.rpgmak...-end-of-battle/
 
*Note

Spoiler

 

*Bonus

Spoiler

 

[Edit] If I can add one more thing, how can I make a skill unusable in cases like this? Like, I summon my zombie, and so long as it's alive/on the field, I can't use that summoning skill again.


Edited by Estellise Roekes, 25 September 2013 - 09:50 AM.

MugenNN-1.png


#2 Yato

Yato

    (aka Racheal)

  • Early Adopter
  • 536 posts
  • LocationCanada
  • Primarily UsesRMVX Ace

Posted 24 September 2013 - 12:25 PM

Why not set the scope to "none"? With my limited testing, this doesn't produce a "failed" message and still runs the common event (which I assume is what you're using to add the party member).

If you're worried about only being able to select the skill when there's room in your party, then you'd probably need something that adds custom conditions for skill use.

sig-HB.png HFbar.png

Spoiler

#3 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 12:29 PM

I initially had it set to None, but then no animation is played. While I could do without, I'd like to have an animation for the summoning, preferably in a place where this is no current battler. I'm just being petty. xD


MugenNN-1.png


#4 Yato

Yato

    (aka Racheal)

  • Early Adopter
  • 536 posts
  • LocationCanada
  • Primarily UsesRMVX Ace

Posted 24 September 2013 - 12:38 PM

Fair enough. The ability to select an empty slot is definitely going to require scripting since by default the "item max" for the actor selection window is only the size of the current party.

[Edit] As for your edit, you could add an invisible state to the caster that seals the summon skill in the common event of the skill. You could then remove the state when you un-summon or when the summon dies. As for how to tell when the summon is dead, you could have a battle event with the condition of Actor [Summon]'s HP is 0% or below, but you'd need this in every troop.

Edited by Racheal, 24 September 2013 - 12:44 PM.

sig-HB.png HFbar.png

Spoiler

#5 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 04:27 PM

Is there really no other way to signify that my summon is dead without pasting in every troop?


MugenNN-1.png


#6 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 08:32 PM

If you check out this thread, I have a way to dismiss the summoned actor after the battle in a common event running in parallel, in case you want to integrate other commands alongside the summoned actor being dismissed.

 

To dismiss the summoned actor mid-battle when he/she dies, add this scriptlet after Materials:

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Processing at End of Action
  #--------------------------------------------------------------------------
  def process_action_end
    @subject.on_action_end
    refresh_status
    @log_window.display_auto_affected_status(@subject)
    @log_window.wait_and_clear
    @log_window.display_current_state(@subject)
    @log_window.wait_and_clear
    
    ##### Is summoned actor dead? #####
    $game_party.members.each do |member|
      if member.id == 2 && member.dead? # replace 2 with zombie actor id
        $game_party.remove_actor(member.id)
      end
    end
    ###################################
    
    BattleManager.judge_win_loss
  end
end

I don't really like doing it this way, but since parallel processes don't run during battles, this is the easiest way I've found. I'll keep looking, though!

 

[EDIT] So after some trial and error, here's a scriptlet that allows you to disable the skill while it's active. Just add this into a script call in the common event called by the summon skill (or wherever you end up adding the actor):

summoner = $data_actors[1]
f = RPG::BaseItem::Feature.new(44, 130, 1)
summoner.features.push(f)

Breakdown:

$data_actors[1] - replace the 1 with the id of your summoner.

f = RPG::BaseItem::Feature.new(44, 130, 1) - 44 is the code for sealing skills, replace 130 with the id of your summon skill, the 1 is just for setting disabled to true.

summoner.features.push(f) - add the new feature (disable skill 130 in this case) to your summoner!

 

To re-enable the skill when the summoned actor dies, add these lines to wherever you dismiss the actor:

summoner = $data_actors[1]
ft = summoner.features.pop

If you plan on having multiple summons, I can come up with a better way of handling this - this approach only really allows for 1 summon to be active at a time.

Note that if you want to summon the same actor more than once per battle, you'll need to initialize the actor when summoned (there's a checkbox when adding the actor in an event, not sure about through the script).

 

Hope that helps :P.

 

Cheers,

Duncan


Edited by DuncanS, 24 September 2013 - 09:58 PM.

Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)


#7 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 08:56 PM

Oh, that would work nicely. If I have more than one zombie on the field, I assume I can add additional ifs to this? Sorry, the answer to this is painfully obvious. xD

 

[Edit]While this is exactly what I could use to not have to copy and paste throughout my troops (which I already did), I already have it set so that when my zombie dies, the summoner is put in a state where the summon skill is sealed, and that's only unsealed when the zombie dies. I actually tried putting that into the script as $game_actor(2).remove_state(34). Not sure if I did that right. xD I also get an error when trying to load the game with it in.


Edited by Estellise Roekes, 24 September 2013 - 09:34 PM.

MugenNN-1.png


#8 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 10:01 PM

Ah ok, that's actually a much easier way of handling it than what I did! XD

 

The line should be $data_actors[2].remove_state(34) to accomplish what you're aiming for, I think.


Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)


#9 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 10:09 PM

WOOOOO~ Finally got it after multitudes of errors! /o/ It was $game_actors[2].remove_state(34).

 

But why do you say going through the troops would be easier? (Aside from scripting headaches. xD)


MugenNN-1.png


#10 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 10:11 PM

Oh, I was referring to my edit for disabling the skill :P. Doing it in a state is definitely easier!


Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)


#11 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 10:24 PM

Oh, I see. Yeah, I current have my summon skills common event set up like this:

Attached File  Hina'sStartUp.png   70.6KB   0 downloads

The switch is for a forced action in battle where my zombie resurrects the summon should the summoner die. But, as you can see, I got a state set up to seal Hina's summoning skill (Hina being the zombie). I did what was previously suggested and had that state removed (from Ryana) when Hina died in battle (Hina's switch turns off at that point too). What I wanted to avoid was having to go through all the troops and paste an event to have Hina removed from the party upon her death and the State on Ryana be lifted.

 

With the mini-script you posted, Hina's removal and her summoning skill being unsealed are both taken care of immediately, which is exactly what I wanted. I'ma test that part to see if adding another if let's me work this out for a second zombie as well. If all goes well, that's one problem taken care of~ I'll then have to go back to my original problem.


MugenNN-1.png


#12 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 10:40 PM

To your original question, you can have a conditional in your common event for summoning:

Conditional Branch: Script: $game_party.battle_members.size < $game_party.max_battle_members

If the party is already full, you can have some other calls in the else statement, or just have it fizzle.


Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)


#13 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 10:52 PM

Hm. If I did that right, it should look this:

Attached File  Elena'sStartUp.png   71.93KB   0 downloads

right? If so, nothing changed; I can still only selected my own actors


MugenNN-1.png


#14 Xypher

Xypher

    Advanced Member

  • Members
  • 130 posts
  • Primarily UsesN/A

Posted 24 September 2013 - 10:57 PM

You cant target something that isnt there.



#15 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 11:01 PM

Ahh ok, sorry! I misunderstood your original question :S. If I understand correctly, the issue is the Failed message popping up when you target a party member with the skill?

If so, you can set the scope to The User, and put the following into the damage formula: 

a.result.used = false; 0

If that isn't what you want, let me know :P.


Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)


#16 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 11:08 PM

That would've come in handy for something else I was doing a few days ago. xD No, the original problem was that I wanted to select an empty actor slot for the summons. Basically, the skill's Scope is "One Ally", and I wanted to select (or only be able to select) and empty actor slot as the target, with that slot being where my zombies will be assigned. So your script call solution was in the right direction. xD It's just that, even with that conditional branch, nothing changed.

 

I've run into another problem too. It's just one thing after another. xD


MugenNN-1.png


#17 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 11:16 PM

Haha yeah, that's always the way it goes ><". I see what you're saying, but I guess Xypher's rather blunt observation is kinda true here - you can't really target an empty slot (not easily anyway, as far as I know). The conditional call is to check that an empty slot still exists, so you can perform calls based on the result.

 

Is there a reason you need to target the individual slots specifically? If so, I can look into selecting a specific empty slot, but I don't really know where to start xP.


Edited by DuncanS, 24 September 2013 - 11:16 PM.

Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)


#18 Estellise Roekes

Estellise Roekes

    Advanced Member

  • Members
  • 86 posts
  • LocationStoryland
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 11:21 PM

Well, it's basically because I want an animation to be played when I summon. As I said somewhere near the top of this thread, I can just set the scope to None, but if there's a means of getting this to work, I'd like to get at it. If that proves to be too difficult, I can just do without.


MugenNN-1.png


#19 Yato

Yato

    (aka Racheal)

  • Early Adopter
  • 536 posts
  • LocationCanada
  • Primarily UsesRMVX Ace

Posted 24 September 2013 - 11:26 PM

Another alternative might be to set the scope to none and play the animation where you want it via a script in the common event. I'm going to look into how feasible this is now. Either that, or have an animation that targets the "entire screen" but is actually centered on an actor spot.

sig-HB.png HFbar.png

Spoiler

#20 DuncanS

DuncanS

    Advanced Member

  • Members
  • 148 posts
  • LocationToronto, Ontario, Canada
  • Primarily UsesRMVX Ace
  • First LanguageEnglish

Posted 24 September 2013 - 11:44 PM

Oh, that's where this line comes in:

a.result.used = false; 0

If you have this, the animation will display (without the Failed message). Setting the scope to User with that in the Formula (set Type to HP Damage, it will deal 0 but won't register anyway) means that you don't need to select a slot at all. The only issue then is that the skill can fizzle if the party is full, but you can handle that scenario in the else condition of the conditional.

 

If your worry is about where the animation is being played, Rachael is right that you can call the animation in the common event you use to summon.


Credit for my avatar goes to my good friend and game development partner Taka: WordPress | DA

WordPress site: cp-blogpic-31.png   |   GMD March 2014 MAGES - Because MAGIC aiOAsFG.png

My games: hxSfvDI.gifedo-banner.png (Happy pirate courtesy of palladinthug! YARR HAR HARR!)






Also tagged with one or more of these keywords: YEA Battle Engine, Battle Symphony, Summoning

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users