A request to help summoning ^ ^

Status
Not open for further replies.

KawaiiKid

Veteran
Veteran
Joined
Oct 13, 2015
Messages
151
Reaction score
38
First Language
English
Primarily Uses
I'll first add the request, and then explain why I need it to keep things concise ^ ^

I'm looking for a script that runs while under the effects of a state that would check the actor's MP who is under said state. If their MP is 0 it removes actor X from the party and removes the state.

The details on why:
Currently I am using a summon system in my game using SRD's summon core found here: http://sumrndm.site/summon-core/
Basically what it does is that when you use a spell, it adds a member to your party that lasts for X amount of time where X is determined by the info you enter into the notetag, although they can also last indefinitely. What I'm aiming for is casting the summon spell which will add a state to the caster. This state will drain MP for X amount. The summon will stay out as long as the caster still has MP. If the caster's MP reaches 0 the summon leaves and the state is removed. The caster must have the state on them for the summon to be out, that way I can add a spell that removes the state called something like "UnSummon" or some such to be able to get rid of the summon at will.

Hopefully we could just add this in the notetags of the actor summoned for the plugin, but I have no idea.

Thanks for the help! ^ ^
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,944
Reaction score
1,050
First Language
Dutch
Primarily Uses
RMMV
if you want to gain a state when summon, and when its gone, the actor is gone,
you might take alook at YEP_Buff&State core, you might need another one and
use lunatic code what happens (ideal for losing MP each turn).

although SRD summon core might a tiny addon to make this happen or to yanfly
plugin to take this effect, but I think it would be already enough if you know how
to code in lunatic.
 

KawaiiKid

Veteran
Veteran
Joined
Oct 13, 2015
Messages
151
Reaction score
38
First Language
English
Primarily Uses
So I ALMOST figured out a method of doing this, although since I don't know how to code it's all in game. There is just one problem.

First off I set the summon skill to run a common event and a state. The state does nothing but exist for the time being. The common event first sets the caster's mp to a var[n]. Next it checks to see if the summoned actor is in the party. If not, it removes the state. If the summoned actor IS in the party then it has a nested conditional branch. The condition is "If Caster's mp is greater or equal to 1" then. If the mp is less than 1 the summoned party member is removed and the state is removed. If the mp IS greater or equal to 1 then the caster has X mp removed and it ends. as

Now here is the trouble, this works great for the first turn, however since it rely's on running the common even from the skill it only works on cast. What I need to do is to have the common event run every time the state is run AKA every turn while under this state. As far as I can tell there is no way to call a common event every time a state cycles. I could have a global call to the common event that just checks to see if state exists, but since I'm going to have quite a number of summons at different levels it would probably amount to 40ish parrallel common events being called at all times. Not good for memory. Pretty sure this could also be accomplished by having the common event trigger on the end of the state, have it just last for 1 round, and have the common event reapply the state. I found this: https://forums.rpgmakerweb.com/index.php?threads/state-common-events.57853/
Which does just that, but it seems to crash my game when I run it giving me the error:
TypeError
line.match is not a function

So yeah, that's the trouble now, just need to figure out a way to call a common event from a state. Any help would be awesome!
 
Last edited:
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,037
Messages
1,018,464
Members
137,821
Latest member
Capterson
Top