(Answered) Gain ATK based on TP?

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
So I want to create a state that has the class gain Attack Power based on how high his TP is. Higher TP = more Attack Power. I have all of Yanfly's plugins (among others).


How would I go about doing this?


*edit* The answer I came up with thanks to the help of Kiriseo is this formula within a passive state:


<Custom Turn Start Effect>


user._paramPlus[2] = (user.tp / 200) * user.atk;


</Custom Turn Start Effect>


Thanks again, Kiriseo! :D
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
simplest solution would be to add a.tp into the damage formula of every skill of that class.


This only works if all skills are exclusive to that class however.
 

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
They're not. lol I have a class change and subclass system. The "Soldier" class has a skill which offers an auto passive state (this way if it's a subclass it will still be in effect, unlike a trait) that increases attack power based on TP. This way if the main class is... say.. "Assassin" with "Soldier" subclass it'll still benefit from the TP to ATK gain.
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
I have a general idea how you could do it. But I'm not sure what happens with the atk when switching classes.


You wrote, you have an auto passive state.


Try something like this inside that states note box:

Code:
<Custom Turn Start Effect>
user._paramPlus[2] = user.tp; 
</Custom Turn Start Effect>
That tag will be used everytime the actor's turn starts.


The value from the _paramPlus variable will be used when calculating the damage of physical attacks.


So it adds the value your tp has onto your atk when attacking.


But as I said, I don't know if your atk gets properly resetted when you switch to another class.
 
Last edited by a moderator:

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Tried that without the state with about 22 attack power and did around 90 damage.


Tried that with your formula in the state with about 22 attack power (and 100 TP) and still did around 90 damage.
 

kiriseo

Veteran
Veteran
Joined
Oct 27, 2015
Messages
245
Reaction score
82
First Language
German
Hmm.. that's weird.


I haven't tested it with the Class Change plugin yet, but with the standard class system it worked for me.


First attack:





Second attack with full tp:





Can you try it with higher values like user.tp * 1000 or something like that?


/EDIT:


Alright, I tested it with the Class Change and Subclass plugin, and it worked with those, too.
 
Last edited by a moderator:

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Yep it works! Now how would I use a formula to turn that into a percentage? Like at 100TP I gain 50% additional Attack.


EG: I gain 0.5% additional Attack Power per point of TP.


*edit* I have a hard time wrapping my head around math, but would this work?


<Custom Turn Start Effect>


user._paramPlus[2] = (user.tp / 200) * user.atk;


</Custom Turn Start Effect>


*edit* After some testing with a variety of classes this formula works. Thank you very much Kiriseo (Love the name, btw!).


Now that I know how to do this with parameters and formulas I can create a plethora of states for HP, MP, all kinds of stuff!


I'll update my first post with this information.
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top