Jump to content


Photo

Battle Summon


  • Please log in to reply
135 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 18 May 2012 - 10:53 PM

Battle Summon
Author: Tsukihime

note: this script is no longer supported. You can use it for reference.

Overview

Want to summon actors into the battle?

Features
  • Summon an actor to battle, by summon ID
  • Obtain new summons through events
  • Manage summons through a specialized summon scene
  • Call summons using skills or items
  • Manage enemy summon skills
  • Summon menu scene with equip and skills
  • Monster Hunter extension: captured monsters are added to summons list
Usage

First you start by creating a summon

add_actor_summon(actor_id)


Now that you have an actual summon, you can proceed to calling the summon.

btgWy.jpg

In order to call a summon, you must first setup a summon skill or item.
In your database, create a skill or item that will have the summon effect.
Then go to the configuration and enter the ID's into the appropriate lists.
Set the scope of the skill/item to "user" to avoid strange behaviors.

When you use the summon skill, you will be shown a summon window

PRebZ.jpg

Select your summon and continue.

Managing up your summons

You can manage your summons by going to the summon menu scene.

SceneManager.call(Scene_Summons)


It is also accessible in your menu.

A8WfE.jpg

Adding and removing summons

Similar to actors, summons also support similar script calls for adding or removing summons.

$game_party.add_summon(summon_id)
$game_party.remove_summon(summon_id)


Where summon_id is the same as the actor_id in the database.

Enemies calling summons

Enemies can also call summons, provided that they have a summon skill.
Just tag the enemy with

<summons: 1,2,3,4>


To provide a list of enemy ID's that will be summoned.
The enemy will then select a random enemy to call if it chooses to invoke the summon skill.

vqcDs.jpg

Download

Script: http://db.tt/tt3w8MfL

Notes

If you want to use Monster Hunter add-on (captures will directly go to your summons list), Monster Hunter script must be placed above.

If you're using FP Inventory System, that script must be placed above as well.

Edited by Tsukihime, 23 March 2013 - 11:05 AM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#2 Harmill

Harmill

    Advanced Member

  • Ace Member
  • 64 posts
  • RM Skill - Jack of All Trades

Posted 18 May 2012 - 11:30 PM

I got this error:

Script 'BattleManager' line 114: NoMethodError occurred.

undefined method `>=' for nil:NilClass


I had started a test battle with one actor. He used the summon ability twice, to summon the same actor twice (I think you shouldn't be able to summon the same summon until the previous one expires). The error/crash came after the first summon left the party.

Also, every time you summon something, if you're using Yanfly's Battle Engine, then the face graphic has the "+DeathIcon" appear over them.

#3 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 18 May 2012 - 11:43 PM

I can't reproduce the error. I had one actor summon the same actor twice, and then waited until they disappeared, and it went fine. Same with ace battle engine

I'm not sure about the death state.
It could be the fact that when a new actor is created, it starts with 0 HP and then is setup. I think that's the only reason, and so it is a bug on ace engine's side.

New battlers are always initialized with 0 HP and there really isn't a way around it.
The other option is to pull summons from an existing set of summons, which would bypass the initialization, but then consider enemies calling the summon skill to summon their own enemies; you would still run into the same issue.

Edited by Tsukihime, 18 May 2012 - 11:48 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#4 Galv

Galv

    Forum Defender

  • Staff Manager/Global Mod
  • 5,265 posts
  • LocationAustralia
  • RM Skill - Jack of All Trades

Awards Bar:

Users Awards

Posted 18 May 2012 - 11:50 PM

It would be beneficial to have an option to specify if you can summon the actor once or multiple times. (Summon the goblin or you army of main heroes to battle! Or wait... is it the other way around?)

And what about using variables to determine how many turns they last, so it can be customisable for each persons different game. Then they could store whatever they needed into the variable... user's level, how much gold they have... any number they want.

galv-plea.png sig-kickstarter_zpsda2cb57e.png


gs-banner_zpsfc59b073.png bb-logo_zps34dc32d8.pngconstellation1_zps9e598b08.png


#5 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 May 2012 - 10:37 AM

I've updated it so that your summons are actual actors (ie: not created when you call the summon), but they're stored in a separate "$game_summons" variable (as opposed to $game_actors)

To create a summon, use the script call

add_actor_summon(actor_id)

To call the summon in battle, use

summon_battler(summon_id)

Whenever you summon, you will summon by summon_id, which is assigned based on the order you add them.
So if you added actor 4 first, then that is summon 1.

This is to support both actors and enemies later on.

For now, your summons will level up just like you, but they won't stay in your party.
I'll make a custom "summon" scene where you can manage your summons.

Also, summon turns is controlled by a variable. By default it is variable 1. You can change it if you want.

I've added a "dupe" attribute that determines whether you can summon duplicates.
By default it's false, because right now I only support actors.

When enemy summons are available I would make it true, and probably add another variable that indicates how many of them you can summon (so you won't have like, 200 Demon Kings)

Edited by Tsukihime, 19 May 2012 - 11:13 AM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#6 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 May 2012 - 02:26 PM

Script updated

I've added a new Summon Scene along with a Summon battle command.

Posted Image

You can view your summon stats by going to the summon scene in your party menu.

In battle, you can call summons straight through the summon window.
I'm thinking of adding a "summon time", enabling/disabling the summon command, and treating summons as actors by allowing you to equip them and stuff.

You can still assign it to a skill if you want; they both call the same "summon_battler" method.

All summons are separate from your main party. Summons do not appear in battle until you call them.

Summons automatically withdraw from battle when their summon time has elapsed.
Or they die.

I have also added an extension to Monster Hunter where captured monsters are added to your summons list rather than your party list. So if someone wanted that pokemon style game where you capture stuff and summon stuff, this would be used.

Monster Hunter must be placed above this script.

Note that the window/scene edits may not be compatible with custom menus and battle HUDs.
You will need to add the correct options to the respective scripts if you want to add the commands.

Of course, the scripts you're using should be written flexibly and allow you to easily add a couple entries to the command list.

Edited by Tsukihime, 19 May 2012 - 03:39 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#7 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 19 May 2012 - 11:06 PM

If it possible to use this to replace a actor with a summon like FF X?

#8 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 19 May 2012 - 11:41 PM

Don't remember what FFX is like.
Just make your summon an actor?
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#9 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 06:01 AM

When there was a summon all the other characters left the battle and the summon fought by itself? is this possible with this would be really nice for what I"m working on.

#10 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 May 2012 - 08:26 AM

So basically summon enters, actors leave. Summon leaves, actors come back?
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#11 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 08:44 AM

Yup exactly.

#12 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 May 2012 - 09:04 AM

Making the regular characters disappear was not hard, but they don't receive exp after battle.
Should they be getting exp?
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#13 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 12:04 PM

That would be preferable.

#14 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 01:02 PM

Also you should include an option to also switch out the summon as well. When the summon dies the remaining original actors return too.

#15 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 May 2012 - 01:06 PM

I've made it so that when the summon appears, all of the actors will disappear, and when the summon disappears all of the actors will re-appear.

But I want to make it so that you can choose whether all actors will disappear, or only the one that summoned will disappear, or none will disappear.

Anyways I can't think of a way to make it so that all original battle members and summons will get exp. Maybe someone else can add support for it.

Edited by Tsukihime, 20 May 2012 - 01:16 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#16 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 01:21 PM

I've made it so that when the summon appears, all of the actors will disappear, and when the summon disappears all of the actors will re-appear.

But I want to make it so that you can choose whether all actors will disappear, or only the one that summoned will disappear, or none will disappear.

Anyways I can't think of a way to make it so that all original battle members and summons will get exp. Maybe someone else can add support for it.


Thats fine, what about the option to bring the original actors back?

#17 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 May 2012 - 01:23 PM

That has been implemented and updated in the script.
My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks

#18 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 01:54 PM

Ahh so the summon is what levels up. That is still pretty cool thanks!

Also is it possible to call the summon back like if its low on health you can bring it back to preserve it? also can the summon command be locked to one character? I know I'm asking a lot from this but it is almost the perfect script for my game.

Edited by whitedahlia, 20 May 2012 - 02:02 PM.


#19 whitedahlia

whitedahlia

    Advanced Member

  • Ace Member
  • 142 posts
  • RM Skill - Jack of All Trades

Posted 20 May 2012 - 03:35 PM

It seems this does not work with Victor animated battlers or Ao no Kiseki battle. I understand if you can't find a fix for either though. Still an amazing script.

#20 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 6,430 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 20 May 2012 - 03:53 PM

There seems to be two issue with the animated battlers script on a couple runs

1: it freezes. This has happened to me before while writing the script, and it looks like I need to create some action objects for the summon. It worked after I did it, but not sure why it's freezing on that one. Freezing occurs when there are multiple summons.

Some quick tracing looks like the issue is that the summon is still "active", and the engine doesn't proceed until all battlers are no longer active. I wonder why it would still be active though. "Active" occurs when you're doing a battle animation. It's automatically off after the animation is complete. Not sure what the issue is right now.

2: line 3975 nil error. I'm not sure why victor commented out the rescue, but if you just uncomment it so that it catches errors then it should be fine.

eval("update_pose_#{@pose[:type]}") rescue "" 

Edited by Tsukihime, 20 May 2012 - 04:04 PM.

My Scripts. Go here for Bugs and Requests.
Want to write a tutorial? Submit a community tutorial!

himeworks011.png

Like on Facebook: HimeWorks
Follow me on Twitter for the latest updates! @HimeWorks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users