Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

This is a really Complicated Skill :(

Hello readers, I'm a new guy from the south east.
working with Stories in RPG Maker MV is normal, but when I'm working with skills, mechanics, and gameplay I get really confused especially when working with Plugin Note tags and JavaScript

there is a lot of stuff I want to make, and it is complicated. so I hope I can work together with all very well

so lets get to it, this skill is a power up skill that let the user be able to equip two weapons that give the user 3 special states
1. "Concentrated Flames" User gain Fire Element amplification and Generate +10% ATK Every Turn
2. "Radiant Flames" User Emits an aura that give all party members a TP Regeneration Kind of thing
3. "Dynamic Flames" Replaces "Attack" with a skill that will hit the target 4 times, that skill will be available every 3 turns

all this states will be removed randomly if user has been hit with a specific amount of Damage or unequipped the weapon

the problem I have was in the description below
1. I don't know how to reset "Concentrated Flames" 's ATK Parameter Regeneration, because when I reapply the state, the bonus ATK is already in 100%
2. I don't know how to get the value of the current turn, is there a Java script command for that?
3. I can't add the "Dual Wield" trait on that skill, is there another way?

as you can see from the start, I watched a lot of Yanfly's Tips and Tricks Videos, but I can't get the coding right
I accept any critics, compliments, and alternative solutions. ty
 

Psycoris

Villager
Xy$
0.00
What plugins are you using and could you include copy of your scrip. Not sure if I can help but there isn't anything to reference.
 
What plugins are you using and could you include copy of your scrip. Not sure if I can help but there isn't anything to reference.
this is the codes for the "Concentrated Flames", I'm currently using Yanfly's Buff State Core.js and Element Core

<Element Amplify Fire: +75%>

<Custom Battle Effect>

user._flameMultiplier = 0.10;

var text = '+' + Math.floor(user._flameMultiplier * 100) + '%'

user.setStateCounter(stateId, text);

</Custom Battle Effect>



<Custom Confirm Effect>

if (this.isPhysical() && this.isHpEffect() && value > 0) {

user._flameMultiplier = user._flameMultiplier || 0.10;

value += Math.floor(value * user._flameMultiplier); }

</Custom Confirm Effect>



<Custom Regenerate Effect>

user._flameMultiplier = user._flameMultiplier || 0.10;

user._flameMultiplier = (user._flameMultiplier + 0.10).clamp(0.00, 2.00);

var text = '+' + Math.floor(user._exertionMultiplier * 100) + '%'

user.setStateCounter(stateId, text);

</Custom Regenerate Effect>

vvv code below is what I 'm troubled with vvv

<Custom Remove Effect>

user._flameMultiplier = user._flameMultiplier || 0.00;

var text = '+' + Math.floor(user._exertionMultiplier * 0) + '%'

</Custom Remove Effect>

for no.2, is the code for getting the current turn supposed to be like this?

var turns = user.stateTurns(stateId);

but for Problem no.3, I already solved it with another state that give the "Dual Wield" trait, but you can suggest another alternative solution

ow I forgot to mention another problem I having. how can the state can be removed in random order?
 
Last edited:

Psycoris

Villager
Xy$
0.00
Well I have noticed that you didn't define the ID and value in this "user.setStateCounter(stateId, text);" in the battle effect and regenerate sections.

I am still no help for your question one.

In the Yanfly help documentation found this reference: battler.getStateCounter(stateId) but that is just for the state input ID you are looking for.
I can't seem to find it for the actual battle turn. It has to exist somewhere, as you can use it as a condition for scripted battles. I am curious myself now though.

For the new question removing in a random order. The base java random is 0.0 inclusive to 1.0 exclusive returning 10 numbers 0-9 essentially. To do a custom defined min and max it needs a that special random function. If you find one you like you could probably cut and paste it into a unique plugin just put it above any plugin that might call it. After you have your random number if your skill ids are not sequential I would toss them in an array and use the index number as the ID to remove. If they are sequential then toss the random number output into the ID.
(Edit: well it may not be that simple I am not a scripter "yet". You may have to rebuild the array every time you remove a state and use the .length of the array as your max for the random function so you don't try and remove a state that has already been removed.)

"this might not be necessary I read something about Java being able to raise stuff called from below but I don't know enough about java."
 
Last edited:
In the Yanfly help documentation found this reference: battler.getStateCounter(stateId) but that is just for the state input ID you are looking for.
well on the documentation I kind of understand how odd it is to leave it like that, but I'm afraid to ask why

I can't seem to find it for the actual battle turn. It has to exist somewhere, as you can use it as a condition for scripted battles. I am curious myself now though.
but it would be cool if there is a function for that, it would like that TCG Strategy kind of RPG hahaha

"this might not be necessary I read something about Java being able to raise stuff called from below but I don't know enough about java."
I'm can call my self an awesome Story writer but I'm a total newbie in Scripting so I'm trying to avoid editing some codes that already worked (or magically worked)

even though I'm Learned Code Scripting on Collage

Thanks for the effort on trying to solve the problem : )

if I have another problem or a new idea, I'm gonna post it on this thread, or should I find threads or conversations like this in Developers Den?
 
Top