RMMV making a skill work differently in and out of battle?

Larokin

Villager
Member
Joined
Nov 27, 2015
Messages
7
Reaction score
0
First Language
Portuguese
Good day to all.

Please, bear with me, this will be kinda wordy...

I'm currently working in a game in which the major mechanic are "Runes"

They'd affect pretty much everything of their (so to speak) "chosen one", and of course that includes skills.

The catch is: I need those "rune skills" to work differently in and out of battle, e.g.: A character called Danillo has the Light rune. Inside battle, the skill "Aurora" should work as a regular " Light all" spell, except that it consumes both MP and TP (Or else fighter types wouldn't be able to use their rune skills much, and mages would be able to spam them, or vice-versa). Up to that part, we're good. Now, let's imagine Danillo found himself and his party in a dark cave, and no torches are in sight, but as stated, he's the Light rune chosen, and there's also Hera, the flame rune wielder, who's also in the team. Logic thing to do: A- Have Danillo use his "Aurora" skill and light the way; or B- Have Hera create a fire with her "Inferno" skill. 

Actually, that is exactly the situation I was trying to make when I hit a wall: Their skills don't work out of battle. Yes, they're set to call a common event that changes a variable related to each character's skills, and yes, there are events in the map set to react to those variables, but it isn't working. Whenever I open the  skills menu out of battle, the skills are just greyed out and if I try to use them, they simply buzz. I press F9, check their variables, and no changes either. I suppose it may be because the skill's formula require stats from both caster and target, and when using it out of battle, the second one is missing, so I thought maybe if there's a way to make a custom damage formula that checks if the character is in or out of battle, and uses the according formula, pretty much a regular "If... Else..." thing. I know doing such a formula was possible in Ace, but since I'm almost completely uneducated when it comes to javascript

(And even less in Ruby, actually...), I have little idea of what to do. Anyone has any suggestion or hint to give?
 

Dalamar

Veteran
Veteran
Joined
Apr 29, 2013
Messages
370
Reaction score
61
First Language
English
Primarily Uses
RMMV
Do you have the skill's occasion set to always?
 

Dalamar

Veteran
Veteran
Joined
Apr 29, 2013
Messages
370
Reaction score
61
First Language
English
Primarily Uses
RMMV
Could you post screenshots of the skill database with 1 of the skills showing and the common events used as well?
 

Larokin

Villager
Member
Joined
Nov 27, 2015
Messages
7
Reaction score
0
First Language
Portuguese
Could you post screenshots of the skill database with 1 of the skills showing and the common events used as well?


 



 



 

 

All the other skills work the same, except they set different values for different attacks (0 being "no move"), each character has their own variable.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
The problem is the skill is set to target all enemies, so when you use it outside of battle, it's looking for an enemy to target, and since there are no enemies present (as not in a battle), it's buzzing and not letting you use it. 
 

Larokin

Villager
Member
Joined
Nov 27, 2015
Messages
7
Reaction score
0
First Language
Portuguese
The problem is the skill is set to target all enemies, so when you use it outside of battle, it's looking for an enemy to target, and since there are no enemies present (as not in a battle), it's buzzing and not letting you use it. 
I guessed that was the problem, as I stated before, the thing is: how to get it to target nothing while out of battle? Well, other than making another skill with same name and description that would be swapped with this one as needed (Or else I'd have an absurd load of duplicate moves to deal with, my cast is of almost 40 characters!)
 

Dalamar

Veteran
Veteran
Joined
Apr 29, 2013
Messages
370
Reaction score
61
First Language
English
Primarily Uses
RMMV
I don't think TP is stored outside of battle and since your skills require TP as well as MP that is why you can't use them outside of battle.  The common event variable is different than the one used in the conditional branch pictured so you may want to check that as well.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I don't think you can make it target differently in vs out of battle...not without a plug-in designed for that, and you'd have to notetag how the different targeting systems work more than likely.
 

Larokin

Villager
Member
Joined
Nov 27, 2015
Messages
7
Reaction score
0
First Language
Portuguese
I don't think TP is stored outside of battle and since your skills require TP as well as MP that is why you can't use them outside of battle.  The common event variable is different than the one used in the conditional branch pictured so you may want to check that as well.
About the variable: As said, all "rune" skills have that kind of common event, only the variable number change, that specific event had conditionals for 4 diffferent skills, and another conditional a bit below the one shown used the pictured variable, but since pretty much everything but the color of the tint and the text displayed was the same, I thought that was a bit unnecessary. I'll check it anyway, just to make sure.

About the TP: Well... I guess it's time to make a couple tests about that. If it really isn't stored out of battle, I'll have to figure some other way...

I don't think you can make it target differently in vs out of battle...not without a plug-in designed for that, and you'd have to notetag how the different targeting systems work more than likely.
If that's the case, I guess I'll have to either learn to script, or ask someone who knows to make that sort of plug-in for me. 

Although I'd really like to find a way to do it only by eventing, it's easier to deal with events when bughunting.

Edit: After a few extra tests, I've come to some conclusions...

Contrary to my first assumption and bgillisp's suggeston, the targeting is NOT the problem here, but the use of TP is!

I've tested making a skill modify a variable, and made 3 skills with that characteristic, one that was simply the default "heal" spell, but called the common event to change the variable (let's call it "Heal-Default"); a second skill similar to the first, but using TP instead of MP(I'll refer to it as "Heal-TP"; and a third one with modified damage type (from HP heal to HP damage), formula (from [200+a.mat] to [200+a.mat+b.def]), and scope (from "1 ally" to "all enemies") ("Heal-atk;All").

As it happens, both Heal-Default and Heal-Atk;All worked right, both in and out of battle, while Heal-TP worked right in batttle, but was greyed out and buzzed when I tried to use it out of battle. 

Now, the million-goldpieces (sorry,couldn't resist...) question is: how to use TP OUT of battle? Is there any way to assign the current TP an actor has to a variable, and/or assign the value of a variable to an actor's TP? That way, I'd only need to make the skills subtract a set value from TP through a common event, and make them MP-based so they could be used both in and out of battle.
 
Last edited by a moderator:

Dalamar

Veteran
Veteran
Joined
Apr 29, 2013
Messages
370
Reaction score
61
First Language
English
Primarily Uses
RMMV
To use TP out of battle would require either a plugin or an event in each troop with a variable for each actor's TP and you would need the script call to get the TP into a variable.
 

Larokin

Villager
Member
Joined
Nov 27, 2015
Messages
7
Reaction score
0
First Language
Portuguese
To use TP out of battle would require either a plugin or an event in each troop with a variable for each actor's TP and you would need the script call to get the TP into a variable.
Eventing is the preferred method here, even if that means having to work it in each troop, and actually, since even with 40 characters, I plan to use 10 preset teams of 4 characters,only one team at a time, the TP variables wouldn't be too much of a hassle,I could use each one for up to 10 characters. Now, that script call would be a problem, since as I stated before, I have near-zero knowledge of javascript.
 
Last edited by a moderator:

Dalamar

Veteran
Veteran
Joined
Apr 29, 2013
Messages
370
Reaction score
61
First Language
English
Primarily Uses
RMMV
Nevermind about the script call, go into the database, actors tab, other tab, special flag, preserve TP.
 

Larokin

Villager
Member
Joined
Nov 27, 2015
Messages
7
Reaction score
0
First Language
Portuguese
Nevermind about the script call, go into the database, actors tab, other tab, special flag, preserve TP.
That would make TP be recorded to be used for the next battle, AFAIK, but I don't see how it would help here... I'll go try it anyway.

Edit: I feel extremely dumb for not trying this before... Really, simplicity is the name of the game here..

It solved the problem, thanks! 
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,238
Members
137,608
Latest member
Arm9
Top