Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
Hello everyone,

I am quite new to the RPG maker scene, so please excuse my question if it is trivial.

I have been intensively looking for a mean to introduce casting times in a game. This should push characters intending to use powerful skills to be vulnerable for a certain duration requested to cast the spell.

I am still experimenting with RMMV, and I have no preference yet between turn-based or active-turn/ATB (I tested the Yanfly's plugin to that purpose).

The casting duration shall depend on an attribute of the spell (such as the skill's speed, so I thought), and may eventually be influenced by the character's agility (for example if the game uses an "ATB" system). If the fighting system is turn-based, it shall of course be possible to have a casting duration greater than one round.

So far I found no solution to realize this mechanics. Maybe someone here would have a clue on how to realize that :)
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
702
Reaction score
297
First Language
English
Primarily Uses
RMMV
This is precisely what the "speed" attribute of a skill is for. I'm not sure how that applies to non-standard battle systems (or MZ's ATB, though that's irrelevant for you), but with the default battle system, giving a skill a negative speed will cause the action to occur later in the turn, while a positive speed will cause it to occur earlier in the turn. The order of actions is also influenced by the character's agility.
 

AphoticAmaranth

An Ordinary Human
Veteran
Joined
Mar 29, 2020
Messages
240
Reaction score
326
First Language
English
Primarily Uses
RMMV
If you're using the default turn based system, Victor has a plugin that can add casting times

 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
371
Reaction score
124
First Language
English
Primarily Uses
RMMV
If you're looking into ATB, I'd be more than happy to help you out with it, I worked rather extensively on my game's ATB battle system and have achieved what you want
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,045
Reaction score
2,465
First Language
English
Primarily Uses
RMMV
This is precisely what the "speed" attribute of a skill is for.
Well, kind of. It does determine when in the round the skill goes off, but it doesn't make the actor vulnerable in any way, nor can the skill be interrupted.

The Victor plugin mentioned above also doesn't do any of that (although it looks like it's state-based, so you could always add damage modifiers to the charging state to create vulnerability). It also doesn't look like it would be a good fit unless you want the spells to take multiple rounds, it doesn't seem to have any effect within one round.

Yanfly's CTB does a bit of this, wherein a non-zero speed in the skill gives it a charging time that you can see in the turn order, and there are notetags for skills that can affect that charge (so you could have skills that push back or reset someone who's charging a spell).

You could combine that with passive states on the magic-using characters that make them take additional damage if they're in a charging state.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
702
Reaction score
297
First Language
English
Primarily Uses
RMMV
Well, kind of. It does determine when in the round the skill goes off, but it doesn't make the actor vulnerable in any way, nor can the skill be interrupted.
That's not entirely true. The skill can be interrupted if the actor dies or is affected by a state that restricts movement.
 

Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
I would prefer to stay round-based, but was looking into ATB because it seems to be what people use the most to address "duration-based" game mechanics... thus hoping to find off-the-shelf solutions.

Ideally, I would want a round-based combat system that works like that:
  • Within a round, position within round would be defined based on AGI, like per default.
  • However, some skills would take multiple rounds, requiring a charge that is defined mostly by the skill itself, but also to some extend by the character's AGI or some other hidden attribute (that way, duration might be shorted by a buff influencing this attribute associated to the character).
  • Some weapons(*) would also have the same mechanics (like a crossbow or an old-fashioned gun).

If you're using the default turn based system, Victor has a plugin that can add casting times


Your suggested plugin seems to be a good start. I'll have a look a it and test it a little, especially if the charging time might be defined by a formula.


This is precisely what the "speed" attribute of a skill is for. I'm not sure how that applies to non-standard battle systems (or MZ's ATB, though that's irrelevant for you), but with the default battle system, giving a skill a negative speed will cause the action to occur later in the turn, while a positive speed will cause it to occur earlier in the turn. The order of actions is also influenced by the character's agility.

For what I understand and tested, the "speed" attribute of a skill only delays the position of the character within a round.

..., but it doesn't make the actor vulnerable in any way, nor can the skill be interrupted.
That's not entirely true. The skill can be interrupted if the actor dies or is affected by a state that restricts movement.

I do not plan on introducing a way of interrupting the skill charge (e.g. like a concentration roll if a casting character receives damages). So, yeah, that would suffice.


(*) EDIT: since one of the original built-in plugins allows to have a weapon execute a skill (WeaponSkill by Sasuke Kannazuki), the question on how to realize the desired game mechanics would only concern skills.
 
Last edited:

Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
So, I've been testing the plugin suggested by @AphoticAmaranth . It appears to fully delivers the mechanics I wanted to have in the game.

The action sequences feature of the plugin doesn't work however, because Victor's BattleMotions plugin is requested for that, and does not work for some reason.
But that's ok. It is aesthetically appealing enough to my taste. Plus, if I start to introduce battle motions, I'll never see the end of it.

So thanks RPG Maker Community for your help ;)
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
702
Reaction score
297
First Language
English
Primarily Uses
RMMV
Maybe you could make the skill just apply an invisible state to the user, which then triggers the real skill when the state expires? This clearly only works for skills that don't allow you to select a target though (random target or all enemies). It would need a plugin. I assume you could do it with Yanfly's state plugin somehow.

If that's not good enough (you need targeted spells to delay until a later round), then that probably means a dedicated plugin for this feature. I don't know of any, though.
 

Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
The approach you suggest @Solar_Flare is also the first thing I naively though of:
1. Player selects skill in menu.
2. This launches a "cast" skill with an incantation animation, which applies a "casting / charging" state on the character.
3. The character stays in that state for the casting/charge duration.
4. On leaving the state, a skill (the "real skill" which brings the effect) is launched with its effect animation etc... However, like you said, there is at that point no user input to select the target, which makes the solution unsuitable in my opinion.

I would very much like to tweak an existing plugin or attempt to write something from scratch... I don't mind refreshing the few javascript skills I have left unused for years, but so far I have really been struggling to find any good quality API documentation.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
702
Reaction score
297
First Language
English
Primarily Uses
RMMV
There is some API documentation in the manual, which you can view by selecting Help > Contents in the editor. Just scroll to the bottom of the contents panel and expand "JS Library". It's not very detailed, though, and it doesn't cover the game objects at all.
 

AphoticAmaranth

An Ordinary Human
Veteran
Joined
Mar 29, 2020
Messages
240
Reaction score
326
First Language
English
Primarily Uses
RMMV
4. On leaving the state, a skill (the "real skill" which brings the effect) is launched with its effect animation etc... However, like you said, there is at that point no user input to select the target, which makes the solution unsuitable in my opinion.

How about instead of launching the real skill, apply a state which removes every other command and allows you to use the real skill?
 

Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
How about instead of launching the real skill, apply a state which removes every other command and allows you to use the real skill?
That sounds like something one would do in RM2k :guffaw:... But worth a try I think. I am a bit dubitative about the ergonomics thought, but we'll see.

I'll probably start with some of the JavaScript tutorials of this forum this weekend anyway, they seem well written (I am just not used to search forums for information... But find it better than YouTube tutorials anyway. I'm an old fashioned guy XD)
 

Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
How about instead of launching the real skill, apply a state which removes every other command and allows you to use the real skill?
So... tried that, it makes the game crash....

HOWEVER: I came up with an idea I am going to test out tomorrow... The idea is the following:
  1. On initiating the encounter, all enemies get an invisible state "not casting" (this would be done with a battle event).
  2. Enemy action pattern is set so that enemy only uses a spell when in the state "not casting".
  3. Enemy chooses to use a spell => enemy gets the "casting" state for n turns (using the Victor Engine's script).
  4. Enemy action pattern is set so that enemy only uses a "do nothing" skill when in the state "casting" => the enemies effectively does nothing while casting (this has been the main bug of the script).
  5. Every spell an enemy uses also has an additional effect that gives this enemy the "not casting" state (additional effect probably doable using a plugin like this one: https://himeworks.com/2016/02/formula-effects-mv/)
 

Franz_Pantalon

Veteran
Veteran
Joined
Jan 5, 2022
Messages
34
Reaction score
18
First Language
French
Primarily Uses
RMMV
Short feedback: it works! :biggrin:

The only thing I didn't think of was the transition from the "not casting" to the "casting" state, which I solved by putting a resistance to the "not casting" state when in the "casting" state. Apart from that, it worked according to plan.

Sole drawback is that checking the "casting / not casting" condition for every enemy action does not allow for adding more conditions, which makes some stupid enemies... So next step will be to find a way to put multiple conditions for selecting enemy actions.
(Something similar to that VX script: https://forums.rpgmakerweb.com/index.php?threads/enemy-action-conditions.24060/ )

... Gonna be testing that the upcoming next days...

I am thinking of putting what I did to paper (primarily so that I can reproduce it in the future). I'll be sharing the small "tutorial" after it's done I guess. Who knows, maybe it will be useful to someone else...
 
Last edited:

Latest Threads

Latest Profile Posts

Somehow that granny topic got me... maybe I can come up with some more thematic stuff :3
Going live for tonight's stream! Kytt isn't feeling 100% tonight so the wifestream will be tomorrow and I'll be playing Final Fantasy XIV for this one instead. Twitch
i got bronchitis ; n ;
I've been trying very hard to distance myself from my inspirations, but maybe It would be better just to accept it.
3uL5XnP.gif
For my 100th post, I wanted to thank this forums community for the generosity and respect that each of you show.

I'm always impressed when I see the 6x veterans (in number of years compared to my presence here on these forums) continue to help and support all the community members on a daily basis, the awesome artists who share their creations with so much passion...

Forum statistics

Threads
121,929
Messages
1,145,241
Members
160,204
Latest member
kittythedragon
Top