Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Alright so I have this same/similar question in the Steam discussion boards for Javascript.

What I want to be able to do is change how the Stats work in the game, or the Attributes and add some others.

So the current stats/attributes are as follows (Max HP, Max MP, Attack, Defense, M.Attack, M.Defense, Agility, Luck) as you all already know.

I want to change all that to a more traditional RPG set. Such as (Strength, Endurance, Agility, Dexterity, Perception, Intelligence, Wisdom, Luck, etc.) and have the new attributes interact with each other and various skills to set the number for another set of Stats that are separate, such as (Attack, % To Hit, % to block, Defense, Magic Damage, Resistances etc.).

So my question is. Where in the code that you get with the game maker, in the original code, are the "Parameters" (Max HP, Max MP, Attack, Defense, M.Attack, M.Defense, Agility, Luck) handled? You know when I drag the "js" folder into a program like Sublime Text. So that I can go about making an Alias and plugin.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,463
First Language
Portuguese
Primarily Uses
Except by the Agility and Luck, the other parameters (Attack, Defense, M.Attack and M.Defense) have absolutely no mechanical function, they are just numbers that can be used for whatever you want. By default, the are only used on damage formula, and as such, you can just change their names and what they do by just changing the damage formulas.


Agility have influence on turn order, and Luck have influence on negative status resistance.
 

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Okay so how do I make it so I can have my list of Attribute names and add functions to them and replace the Attack and defense and such and move them to another window? This is all I want to know. Where the M attack, attack, Agility etc. reside in the Javascript code.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
35,877
Reaction score
9,511
First Language
German
Primarily Uses
RMMV
Where the M attack, attack, Agility etc. reside in the Javascript code.

They don't reside in the javascript code - with the exception of Agility and Luck, they are only displayed in the status screen and used only in the damage formulae - which are not in the javascript, but in the editor.


In the database, terms tab, you'll see their parameter names - at that place you can change the displayed names, for example from Attack to Strength.


Then you can go to the skills tab and the items tab, that is where the damage formulae are and that is the only place where those values are coded.


For example the base attack skill has the damage formula a.atk * 4 - b.def * 2.


There is no other place where the parameters atk, mat, def and mdf are used in the entire engine - you still have to use those abbrevations as they're part of the code, but their function is that what you make them do in your damage formulae.


If you want to change agility and luck or want dependencies between the parameters or something like that, I suggest you take a look at Yanfly's plugins - he wrote several that can be used for such variants.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,190
Reaction score
15,274
First Language
English
Primarily Uses
RMVXA
They don't exist in the code, except as param[0] - param[7], they are whatever you call them. Change the name under the system tab. For the stuff like to hit and such, look under xparams and sparams.


Now if you need more than 8 parameters (and keep in mind HP is the first one and MP is the second, and I don't think you can change those without wrecking everything, since all damage is done to the first parameter by default) you'll need to add more to the code. For exact location, it should be under the Game_BattlterBase class, as that is what the players and monsters inherit. At least that is where it is under ACE, and it should be in a similar location in MV.
 

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Okay thanks guys. I think I've got it now. All of your answers were good. Led to what I think I needed to know.

 

They don't exist in the code, except as param[0] - param[7], they are whatever you call them. Change the name under the system tab. For the stuff like to hit and such, look under xparams and sparams.


Now if you need more than 8 parameters (and keep in mind HP is the first one and MP is the second, and I don't think you can change those without wrecking everything, since all damage is done to the first parameter by default) you'll need to add more to the code. For exact location, it should be under the Game_BattlterBase class, as that is what the players and monsters inherit. At least that is where it is under ACE, and it should be in a similar location in MV.


Okay so what do you mean I may wreck something? Can I add to the Param array without having complications? Such as making a param[8], param[9] and so on? And can I make those new parameters effect the value of param[0](Which you say is HP)?

And thanks again for all the info guys. I was confused at first not anymore :p
 
Last edited by a moderator:

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Object.defineProperties(TextManager, {
    level           : TextManager.getter('basic', 0),
    levelA          : TextManager.getter('basic', 1),
    hp              : TextManager.getter('basic', 2),
    hpA             : TextManager.getter('basic', 3),
    mp              : TextManager.getter('basic', 4),
    mpA             : TextManager.getter('basic', 5),
    tp              : TextManager.getter('basic', 6),
    tpA             : TextManager.getter('basic', 7),
    exp             : TextManager.getter('basic', 8),
    expA            : TextManager.getter('basic', 9),
    fight           : TextManager.getter('command', 0),
    escape          : TextManager.getter('command', 1),
    attack          : TextManager.getter('command', 2),
    guard           : TextManager.getter('command', 3),
    item            : TextManager.getter('command', 4),
    skill           : TextManager.getter('command', 5),
    equip           : TextManager.getter('command', 6),
    status          : TextManager.getter('command', 7),
    formation       : TextManager.getter('command', 8),
    save            : TextManager.getter('command', 9),
    gameEnd         : TextManager.getter('command', 10),
    options         : TextManager.getter('command', 11),
    weapon          : TextManager.getter('command', 12),
    armor           : TextManager.getter('command', 13),
    keyItem         : TextManager.getter('command', 14),
    equip2          : TextManager.getter('command', 15),
    optimize        : TextManager.getter('command', 16),
    clear           : TextManager.getter('command', 17),
    newGame         : TextManager.getter('command', 18),
    continue_       : TextManager.getter('command', 19),
    toTitle         : TextManager.getter('command', 21),
    cancel          : TextManager.getter('command', 22),
    buy             : TextManager.getter('command', 24),
    sell            : TextManager.getter('command', 25),



Okay so is this it? Starting at Line 1454 in "rpg_managers.js"?

If I add say for example another ('basic', 10)? In there after the one that says ('basic', 9) at line 1464?

Also found Object.defineProperties(Game_BattlerBase.prototype, { ...............}

At line 2115 in "rpg_objects.js".

So are these the two places I need to add more code?
 
Last edited by a moderator:

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,190
Reaction score
15,274
First Language
English
Primarily Uses
RMVXA
Okay thanks guys. I think I've got it now. All of your answers were good. Led to what I think I needed to know.

 



Okay so what do you mean I may wreck something? Can I add to the Param array without having complications? Such as making a param[8], param[9] and so on? And can I make those new parameters effect the value of param[0](Which you say is HP)?

And thanks again for all the info guys. I was confused at first not anymore :p

You should be able to. Just be sure that if you move the one that is assigned to HP that you change how damage is applied (and anything else that uses HP).


For that reason, I would suggest you leave the HP and MP where they are, as chances are you will use those anyways. But you should be able to add onto the array, as you can do it in other languages so can't see why it wouldn't work here. As for where, not sure, as I don't use JavaScript (yet), but the one you posted looks more specific to a specific object. You may wish to backtrace and see which object(s) it is used with. Or, maybe find the battler class, and backtrace from there to find the master class where they inherit the parameters.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,463
First Language
Portuguese
Primarily Uses
@Aurelius


You're being too simplistic about how do you expect to change the base mechanics of the maker. It is not a matter of editing one or two lines. Or changing a number or two.


For example my plugin Hit Formula, it was needed about 100 lines of code to simply be able to use custom formulas for the hit success. You on the other hand want to revamp all the mechanics related to parameters.


Also it seems that you're not very experienced with javascripting so I suggest that you don't mess with the code, since what you want is not a matter of a single line edit.


Instead search for full plugins to acheive whatever you want. 
 

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Ah, there are no plugins to achieve what I want. I have programming experience. I just needed to find where the values were stored. I can take care of the rest.

I guess perhaps Yanfly's "Status Menu Core" mixed with "Actor Variables" Plugin and perhaps some others might achieve what I want, but I'm not sure. I wanted to use as least many plugins as possible as I want to be making my own Windows and layouts for those menus, with their own art style etc.


I don't really want to change mechanics per se, just add some attributes with some formulas that effect the already existing "attack, magic attack, etc. and resists and stuff. And interaction with skills. I'll get it working eventually. I backup all my work. No big deal.

What's going to be hard is when I go to make a tactical battle system :p.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,463
First Language
Portuguese
Primarily Uses
You really have experience? Because someone with experience knows that It's not just a matter of knowing where the values are stored. (not to mention that someone with experience wouldn't have a hard time finding where the values are stored).


Anyway, you said you want to know where the values are stored... you want to change the values of the actors? right, A good start would be looking at Game_Actor and its parent classes.


Also, you say that you want to add formula to parameters and mention plugins like status menu core and actor variables... and simply ignore the  Base Parameter Control  and also the  Class Base Parameter. Not to mention also the  Extra Parameter Formula  and  Special Parameter Formula. So basically you can add formulas to every single parameter.


Sometimes it just a matter of looking at the rigth places for simple solutions, rather than trying to complicate things.
 
Last edited by a moderator:

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Ya I did that. Game_BattlerBase seems to be the parent class of the all the parameters. I have SOME experience with Java and C++. Takes me longer than someone who went to school for the stuff but I can get things done eventually lol. I can write some basic programs. Get triangles on a screen and run update methods and stuff. I would say that is sufficient experience to tinker around in the JS on this and get some of my ideas working. Just going to take time is all. 

I knew what I was looking for originally but couldn't find the "attributes" now that I know what they are called.... I probably should have just used the search function to look for "HP" from the get go. But was searching for Agility, or attributes or "stats" stuff like that. Pretty sure I found my starting point now though thanks to everyones help.

I know I'll need more than just to add another function for the new attributes :p Also have to make them interact obviously
 
Last edited by a moderator:

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
LINE: 2076 "rpg_objects.js"


// Game_BattlerBase
//
// The superclass of Game_Battler. It mainly contains parameters calculation.


function Game_BattlerBase() {
    this.initialize.apply(this, arguments);


So everything under this is where I need to be, gonna need to link it to other things too. What I haven't figured out yet is what the (args #/ID) is for these 

Game_BattlerBase.TRAIT_ELEMENT_RATE   = 11;
Game_BattlerBase.TRAIT_DEBUFF_RATE    = 12;
Game_BattlerBase.TRAIT_STATE_RATE     = 13;
Game_BattlerBase.TRAIT_STATE_RESIST   = 14;
Game_BattlerBase.TRAIT_PARAM          = 21;
Game_BattlerBase.TRAIT_XPARAM         = 22;

etc.

Not sure what the numbers pertain to yet.
 

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
Okay so I watched those Plugin videos.
 
Last edited by a moderator:

Aurelius

Villager
Member
Joined
May 17, 2016
Messages
15
Reaction score
2
First Language
English
Primarily Uses
So they can do almost everything I want to do. However there are still a few I'd like to add.

Such as


Ranged Damage and Melee Damage - (Separated from each other, but both still considered Physical Damage)

Separate Critical chance - for Spells/Skills than basic attacks


- {% To Block (Which I guess is just technically guard)


% To Parry}>>>>    


                     I'd like to have these applied ONLY when using either a Shield (For BLOCK) or Parry (2 Handed Weapon or No Shield equipped)


- % Chance to Reflect PHYSICAL Damage ( Applied by an Equipped Item or Cast Spell (Shield of Thorns/Brambles (A BUFF). Etc.

Those things I want to add.

Along with a list of Attributes that increase with Levelling up as well as a base set of points the Player gets to choose at Character Creation.

Now will I be able to use those Plugins you showed me :

 Base Parameter Control  and also the  Class Base Parameter. Not to mention also the  Extra Parameter Formula  and  Special Parameter Formula "

Along with http://yanfly.moe/2015/12/04/yep-37-status-menu-core/
and http://yanfly.moe/2015/12/10/yep-41-actor-variables/ To achieve my goal?

I'm going to attempt it now. Going to see if I can create Actor Variables with that plugin as (Strength, Agility, Wisdom etc.) and see if I can get them to interact with all the other Plugins above using those notetags.

Also. When it comes to all of Yanfly's plugins. Are the Windows that are created customizable? For shape, button functionality and fonts and textures and such?
 
Last edited by a moderator:

Latest Threads

Latest Profile Posts

Working on Project Zelda!

The title screen lacked enough sparkles... this oversight has been rectified. :kaopride:
67 frames for a dragon transformation? Eh, seems about right. XD
It's not about your writing, it's about your mapping.
Newbie, please be gentle

Forum statistics

Threads
122,085
Messages
1,146,398
Members
160,374
Latest member
voxet
Top