Add new Character Stats (searching for plugin)

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
Hey Guys,


first time asking something in this forum, I hope you can help me out.


I would like to add a few new character / class stats to extend the default ones. I want to use these new stats in the damage formular of some of my abilities. So far, I know that I can implement this by using game variables and by accessing those in the damage formular with "&gameVariables.value(x)".


The problem with that being is, that I need different skills for each of my actors, using the different variables for each actor. If I had "real" stats or attributes I could just make one skill, which every actor could use by setting the damage formular to something like "4 * a.atk - 2 * b.def + a.kun", where a.kun would be a stat, which increases dmg done by kunais. Since I don't know how to create new character attributes, I tried succeding with the game variables method.


For example:


I have about 20 additional Stats, that influence different skills, such as "Kunai skill stat", which increases the damage done by kunais. Now I set a variable called "kunai skill of actor 1" to ... maybe 20, and make a skill called "Kunai Hit". Now I add the value of the variable to the damage of the skill: "4 * a.atk - 2 * b.def + &gameVariables.value(1)".


So far so good. If I now have a second actor, he needs another game variable "kunai skill of actor 2" and he has to use another "Kunai Hit" skill where I use "&gameVariables.value(2)". Because if every actor used the same "Kunai Hit" skill, each actor would use the "kunai skill of actor 1" game variable.


Now, doing that would get a bit messy and exhausive, but it would work and I tried doing it in that way.


But then I faced another problem: As I said, depending on what type of weapon the actor uses, the actor performs different "normal" hits (I use Yanfly's weapon unleash to accomplish this. Each weapon just sets the "normal" hit of the actor to the fitting attack skill. For ten different weapon types, I would have ten different attack skills.)


Since I can only replace the normal hit of a weapon to one specific skill, there is no way to determine which skill of which actor to use. As I said, each actor has his own kunai hit skill, because I have to set the correct variable in its damage formular. So when I create a new weapon I don't know which of the actors is going to use it, so I can't say which skill it should replace the normal hit with. I don't know how to make it variable. (Sorry, I don't know how to explain the procedure better)


If I make weapons, that only specific actors can use, the problem would be solved, but this is something I do not want to have in my game.


What I am doing is overly complicated and I guess there are plugins that help me out.


So long story short:


I only use Yanfly's plugins. If you know how to implement these additional character stats with the Yanfly's plugins OR if you know any plugin which does NOT interfere and work correctly with the Yanfly's plugins, please let me know.


In addition:


If you know how to access the number of the actor via a shortcut such as "&gameActors.actor(this).getPosition", please let me know as well. By "the number of an actor" I mean the position of the actor in my database (actor nr. 1, 2, 3, 4, ... ), that is using the weapon or skill or whatever. Like this I could make just one skill for each different weapon type and access the kunai hit variable of the actor by something like this: "... + &gameVariables.value(&gameActors.actor(this).getPosition * 50 + 4)". I then just use the game variable on position 54 as the kunai skill of actor one, variable on position 104 as kunai skill of character two and so on (154, 204 ....). Hope you got the idea of what I would be trying to do there ^^. If not, no problem.


Thanks in advance,


Romepizza
 

DogeWorm

That Insomniac
Veteran
Joined
Apr 30, 2016
Messages
68
Reaction score
3
First Language
English
Primarily Uses
Couldn't you just make a new class?
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
Couldn't you just make a new class?


I could, but two different actors with this same class could still have different stats. Equipment or other things change the additional stats stored in the game variables.


Did I understand that question correctly?^^ Or do I miss something essencial?
 

DogeWorm

That Insomniac
Veteran
Joined
Apr 30, 2016
Messages
68
Reaction score
3
First Language
English
Primarily Uses
Then make two classes that are the same thing except for the stats.
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
Uum what do you mean?


The additional stats are not stored inside of classes or actors. The default stats such as atk, def, mat and the extraparameter and specialparameters are stored inside the classes and actors, but my additional stats (or parameters, which is properbly a better word for it) are stored in the game variables.


I don't know how to access these additional parameters in the damage formular, other than with the "&gameVariables.value(x)" command. Having these parameters attached to the actor or class performing an attack is what I am trying to archieve.
 

DogeWorm

That Insomniac
Veteran
Joined
Apr 30, 2016
Messages
68
Reaction score
3
First Language
English
Primarily Uses
Make two classes. Then, add the base stats and the parameters into the base stats of each. If you do this, then the two classes' skills will be the same, but the stats will be different. This way you can avoid making separate stats entirely.
 
Last edited by a moderator:

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
I don't know how you explanation solves my problem. This is what I understood:


I should make two classes, that are exactly the same. Or in general, I have to make a new class for each new actor I create, even if they actually have the same class right? So I have two actors that are both warriors, but I still make two different classes for each warrior that have the same stats. Both classes also learn the same skills. Is that correct so far?


Now comes the point where I don't get why this solves the problem. If you don't "create" new parameters, how do you influence the damage done by different weapons for different actors?


For example: Two warriors have exactly the same base parameters, extra parameters and special parameters, but they have different "sword knoledge" (as an example of a new parameter I'd like to add). So even though they have the same value of atk, they still deal different damage when wielding the same sword, because one of them has more sword knoledge.


THIS is exactly the effect I'd like to archieve. What I wrote about the game variables was one idea how to create this effect.


So the main thing I have to do for sure (!?) is to change the damage calculation of the sword hit skill. I would somehow have to tell the sword hit skill that there is a stat, or a parameter or whatever, that changes the damage of the skill depending on the user himself (if I understood it correctly, you want me to make this skill depend on the stats of a class?). But we don't have something like this "sword knoledge" parameter by default. Not in the class section, nor in the actors section, nor anywhere in the game. By default we only have the base parameters (and the only usable parameter here is the atk parameter, which is too general), the extra parameters and the special parameters. So there is no such parameter I can use to tell the damage calculation of the sword skill how to evaluate the final damage output.


That is the reason why I came up with the idea of using game variables. I can tell the damage calculation of each independant skill to use a specific game variable to alter the calculation and evaluate the damage output. But this idea is, as I said, just one Idea to make archieve my goal (or not, if noone can help me).


Please tell me you understood my problem and my goal! If so, please tell me what I don't understand about your idea.


Can you explain your whole idea? Maybe then we know at what point we are struck.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,503
Reaction score
12,792
First Language
English
Primarily Uses
RMVXA
I *think* this can be done with Yanfly's plug-ins with lunatic mode. How much javascript do you know? I know none myself (except what Yanfly posted in tips and tricks), but I think if you added a weapon check to the attack command, it could add a value to a variable stored on that actor, which then you can access in the damage formula, and it would be unique to each actor.


However, I'm not sure on how to implement this due to my lack of JavaScript knowledge. Maybe a coder can say more? I just know it can be done as I've seen Yanfly add unique variables to actors in her tips and tricks videos. Maybe using those as a base can get you (or a JavaScript coder) started?
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
Ok nice, thats a good idea. I don't know much about JavaScript, but I know a lot about other computing languages, so I could possibly accomplish it. This way, I wouldn't even have a unique skill for each weapon type, but just one, right?


One thing: How do I store variables to actors^^? That would actually be exactly what I am serching for. :D Yet I know how to access independent game variables, but not how to access variables stored on an actor. &gameVariables.value(x) is literally the only "fancy" command when it comes to damage calculation, and sadly I haven't used the variables at all in my previous projects.


If you could tell this, it would pretty much solve my problem :)
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,503
Reaction score
12,792
First Language
English
Primarily Uses
RMVXA
Hmmm...I'm not sure either, but Yanfly managed to create a new variable when they posted how to make the toxic state. Maybe mimic what they did?


And if that works, you can have as many variables as you wish. So if you want one for every weapon, go ahead.


One other idea though...see if someone has made a weapon skill plug-in. I know one existed for Ace, and maybe someone has made it for MV? If that exists that should solve the entire problem, hopefully.


Wish I could say more, but what I know is C and Ruby, which is little help for MV.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,996
Reaction score
6,676
First Language
German
Primarily Uses
RMMV
Make two classes. Then, add the base stats and the parameters into the base stats of each. If you do this, then the two classes' skills will be the same, but the stats will be different. This way you can avoid making separate stats entirely.
romepizza isn't talking about different values to the same stats - he's talking about different stats with different functions in the game.
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
All right, thanks a lot anyways.


I guess I will watch the tipps and tricks by Yanfly again, now that I know what I would like to do. Good to know that its possible.


I was hoping that someone would name a working plugin or something, but I guess if I want to have it done correctly, I will have to do it myself ;)


Have a good day!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
28,996
Reaction score
6,676
First Language
German
Primarily Uses
RMMV
@romepizza there were several scripts like that for Ace (for example N.A.S.T.Y.'s extra stats), but I don't know if any of them has been ported to MV yet.
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
romepizza isn't talking about different values to the same stats - he's talking about different stats with different functions in the game.
Ty now I understand what DodgeWorm was trying to tell. What you are saying is correct


I just rewatched the Toxic video and sadly it had not much to do with the game variables. But nevermind!

@romepizza there were several scripts like that for Ace (for example N.A.S.T.Y.'s extra stats), but I don't know if any of them has been ported to MV yet.
Ok I guess that is my last chance. I'm sure there are any out there, the only question is whether they are compatible with Yanfly's plugins or not.


Ty guys
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,503
Reaction score
12,792
First Language
English
Primarily Uses
RMVXA
Ty now I understand what DodgeWorm was trying to tell. What you are saying is correct


I just rewatched the Toxic video and sadly it had not much to do with the game variables. But nevermind!
No? Did you not look at the code? The variable toxic_counter doesn't exist in the engine by default. So somewhere in that code she created the variable and assigned it to the actor. I think it might be the line of code that reads:


this._toxic_counter = 1;


which initializes it. As far as I can tell it does, and adds it to the target as a new variable which sticks around, set at 1 initially.


Now the only question I cannot answer is does this variable stay after you save and load a game, as I don't know. Maybe one of our javaScripts can say more when they see this thread?


Otherwise, see if someone has ported over an extra stats plug-in or an weapon skill plug-in. Maybe someone will suggest one once they see this thread?
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
No? Did you not look at the code? The variable toxic_counter doesn't exist in the engine by default. So somewhere in that code she created the variable and assigned it to the actor. I think it might be the line of code that reads:


this._toxic_counter = 1;


which initializes it. As far as I can tell it does, and adds it to the target as a new variable which sticks around, set at 1 initially.


Now the only question I cannot answer is does this variable stay after you save and load a game, as I don't know. Maybe one of our javaScripts can say more when they see this thread?


Otherwise, see if someone has ported over an extra stats plug-in or an weapon skill plug-in. Maybe someone will suggest one once they see this thread?


Ooooh now I see. Just when I was about to write why the _toxicCounter variable is not a game variable, since you properbly can't see it in the game variables menu, I realized what you were up to. It acually really might not be a game variable, but it still is a variable connected to a unique actor.


This kind of member variable might not be seen in the game variables menu and I guess it has to be reinitialized each fight, but by typing "this._toxicCounter = &gameVariables.value(x)" we can always set it to the desired stat value of the actor. I also might be totally wrong.


I really wonder what type of variable _toxicCounter actually is and if its an actual game variable or just a temporary variable such as "var value = ...".


I am going to try this out tomorrow and tell you what I get to know.


And I actually did find a plugin for additional stats " Bobstah's Custom Stats 1.3.2" but i haven't tried it out yet. I happened to remember that I already used it in VX Ace and it didn't work properly in combination with Yanfly's plugins, but now dices are rolled again.


Ty, you really give some good ideas!


A JavaScript coder who knows about this stuff really could do something good in here :D
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,503
Reaction score
12,792
First Language
English
Primarily Uses
RMVXA
Haha, true! Too bad learning JavaScript is way back on my to do list (still need to finish my 2 Ace Projects before I add an MV project to my plate), else I'd probably do this as I could use a plug-in like this too for a couple of my other game ideas.
 

romepizza

Veteran
Veteran
Joined
Nov 9, 2015
Messages
40
Reaction score
1
First Language
German
All right, I managed to do it. What I did is pretty simple.


First of all, By using Yanflys Damage Core plugin I can access the user of a skill. With "user.actorId()" I get access to the position of the user of the skill in my database. So if the user of the spell is the first actor in my data base (position 001) "user" returns 1, 002 returns 2 and so on. Then I placed a game variable on position 102, which represents my new stat "sword knoledge" or whatever. The damage calculation of my sword skill now is the following:


<damage formula>


  var weaponSkillModifier = 1 + $gameVariables.value(102 + 40 * (user.actorId() - 1)) / 100;


  value = a.atk * weaponSkillModifier;


</damage formula>


This way skills damage calculation determines which game variable to use depending on the actor using the skill.


The thing I have to do now consequently is to put the stats I am going to use on each actor exactly 40 positions apart in my game variables database. Thats no problem! I simply store the stats of actor one in the variables 101-140, the stats of my second actor in variables 141-160 and so on.


Problem solved, thread closed :D


One thing to mention: If I want to change these variables - for example by changing my gear - I also have to use this method. A Armor, that increases my sword knoledge has to be handled similar: $gameVariables.setValue(105 + 40 * (user.actorId() -1), 30); This would set the stat to 30.


I just realized, that this only sets the variables to a specific value, but doesn't increase it. Well guess I'll figure that out somehow.


Thanks, bgillisp for helping me out.


Have a nice day!


Edit: Thats also easy: $gameVariables.setValue(102 + 40 * (user.actorId() - 1), 20 + $gameVariables.value(102 + 40 * (user.actorId() -1)));


Edit: Sadly I don't know how to deincrement the variables when declothing ... I can just add negative values, but I don't know where to add this line of code. Nevermind, I'll figure it out.
 
Last edited by a moderator:

Lilian

Villager
Member
Joined
May 30, 2015
Messages
23
Reaction score
4
First Language
German
Primarily Uses
i would say this is the plugin you seek. 


you can creat new Parameter at them to many different sorces and use them in formulars.


4 * a.atk - 2 * b.def + a.kun


if kun is one of your parameters and the actor hase that parameter if you want to increas it in % ther formular woudl be like


(4 * a.atk - 2 * b.def)*(100 + a.kun)/100





if you want to see that stats in equip and stats window you would need additional plugins i am using.


http://yanfly.moe/2015/10/15/yep-10-equip-core/


http://bmscripts.weebly.com/mv-vk-equip.html (need to be modded a littel)


(


Zeile : 968       case 'Costumstate':Zeile : 1357     case 'Costumstate':Zeile : 474       BM.Vocab.ParamNames['Costumstate'] = String('Name');


)


http://forums.rpgmakerweb.com/index.php?/topic/48635-the-statusmenucore-v-111/
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Why is it that every time I take a short break from here, we get a new moderator?
Stream will be going live early today as I will be working on some music before I transition to art! When I switch to art, I will be focusing on making a new stream avatar~ Feel free to drop by!
For anyone who has uploaded a game to Steam and wonders if they actually check your game's build when you first upload it, I can personally vouch for Steam.
6 more towns to make in my game. SIX. not done with interiors yet but SIX EXTERIORS.
what to do when you come across a person that has stated "What if I say, f*** their EULA? I could probably get away with it." concerning asset packs sold here... on this site ...

Forum statistics

Threads
93,497
Messages
913,022
Members
123,033
Latest member
LageCL
Top