Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Thank you for your response and update.

I'm sorry to take your time because of my lack of experience but I still have a few questions.

If I use 'Plus Eval' parameter in the plugin it's a global setting on all my classes that will apply.

I would like to have specific parameters for each of my classes.

In the help file, if I understood correctly I have to use <NPARAM: NParam Base Grow HGrow Cap> in the class notetag.

However I'm a bit lost for the calculation I have to do.

With the Yanfly plugin my calculations look like this:

<Custom Class Parameters>
maxhp = 79 + Math.pow(level, 1.92)
maxmp = 30 + Math.pow(level, 1) * 3
atk = 29 + Math.pow(level, 1.45)
def = 39 + Math.pow(level, 1.17)
int = 2 + Math.pow(level, 1.12) / 1.5
res = 25 + Math.pow(level, 1.1)
agi = 20 + Math.pow(level, 1)
luk = 3 + Math.pow(level, 1.05) / 1.5
</Custom Class Parameters>

With your plugin I don't know what and how to put to have the same result.

I'm trying this:

<PARAM: mhp 79>

But after 79 I'm lost :/

Maybe I'm wrong.
 

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
41
Reaction score
18
First Language
English
Primarily Uses
RMMV
It's a bit weird. There is a bug that I have to find.

EDIT: Found it and reuploaded plugin.
It works now! Thank you so much!
If an attack affects multiple cparams is it possible to make all affected numbers appear? At the moment it seems to only show the first affected cparam.
 

ICF-Soft

Veteran
Veteran
Joined
Aug 15, 2015
Messages
261
Reaction score
128
First Language
Spanish
Primarily Uses
RMMV
@Bertrand
You can use something like:
<CUSTOM PARAM BASE mhp>
value = 79 + Math.pow(level, 1.92);
<CUSTOM PARAM BASE mmp>
value = 30 + Math.pow(level, 1) * 3;
</CUSTOM PARAM BASE>

@Destra47
Currently not. MV by default only shows one thing but shows all in battle log.
 

Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Thank you very much
 

Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Finally it doesn't work, I don't know what I'm doing wrong.

Class.PNG

Ordre.PNG

mhp.PNG
 

Attachments

  • Ordre.PNG
    Ordre.PNG
    298.4 KB · Views: 2

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
41
Reaction score
18
First Language
English
Primarily Uses
RMMV
@Destra47
Currently not. MV by default only shows one thing but shows all in battle log.
Is it possible to call the actual code that the RECOVER CPARAM notetag triggers?
Yanfly's action sequences seems to allow an "eval" command. So in theory if I use that to call each cparam recovery then wait a few frames it should display them all.
 

Matrien

Villager
Member
Joined
Aug 23, 2020
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
I saw the bug but the solution is a bit different. This bug only affects obj.customNParam and obj.customCParam because I forget a step that allow the use of higher indexes.
I'll prepare version 1.09c

I installed version 1.09c and I still have the same problem with it ignoring the custom nparam base notetags for any beyond the first 30, unless I manually add additional '' to the obj.customNParam array. Just to be sure, I also created a fresh project with only this and your main utility plugin (v1.05b) and got the same result.
 

ICF-Soft

Veteran
Veteran
Joined
Aug 15, 2015
Messages
261
Reaction score
128
First Language
Spanish
Primarily Uses
RMMV
@Bertrand
It must be:
value = 79 + Math.pow(this.level, 1.92);
I forgot to add "this.level" to it. Sorry.

@Destra47
Yes. It should.
If as example you made a cparam called stm you can use gainStm(value) to do it.

@Matrien
Then is better to use that provisional solution.
I personally preffer to avoid these type of solutions because if for some reason I want to change max number of NParams to 1000 it wouldn't be a clean solution.
I'll find a way to use array vertatility correctly.
 

Matrien

Villager
Member
Joined
Aug 23, 2020
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
Then is better to use that provisional solution.
I personally preffer to avoid these type of solutions because if for some reason I want to change max number of NParams to 1000 it wouldn't be a clean solution.
I'll find a way to use array vertatility correctly.

I went ahead and tried some more troubleshooting because I am trying to learn javascript and thought working this out might help.

I am still not certain how to fix the problem, but I think I found the location of the current bug, or at least am headed in the right direction. Playing around with the code, I found that a line you added to 1.09c (obj.customNParam[nIndex] = ''; ) seemed to fix the issue with correctly building the obj.customNParam array, which led me to wonder if there is a second problem where the data in the array is being utilized.

Under your Game_Actor.prototype.NParamBase function, there are two if statements (the first one for $dataActors and the second for $dataClasses), with try statements to return the values from obj.customNParam for each nparam if they are valid. I found that for whichever of these two if statements runs first, all values from that section are added properly, while for whichever of the if statements runs second, only values in that section for the first 30 nparams are added properly.
So, in my project I have the custom nparam base notetags in the classes section, and with v1.09, they still only work for my first 30 nparams, but if I move the notetags to the actors section, they all work. When I change your code so that the if statement for $dataClasses runs first, and the one for $dataActors runs second, the opposite is true, with notetags only working for the first 30 nparams if they are in the actors section, but all of them working if they are in the classes section.

I hope this is helpful and fairly clear. I am getting pretty tired so I am not sure if I explained things very well...
 

ICF-Soft

Veteran
Veteran
Joined
Aug 15, 2015
Messages
261
Reaction score
128
First Language
Spanish
Primarily Uses
RMMV
@Matrien
I'm not sure where is the problem but it works with an order.

First it chechs for actor's custom value. If found it it ends returning a value.
If not it chechs for actor's class custom value. If found it it ends returning a value.
Then tries with actor's base value, actor's class base value and finally default value.

If you use both actor's custom value and actor's class custom value it will use first one and ignore second.
 

Matrien

Villager
Member
Joined
Aug 23, 2020
Messages
8
Reaction score
3
First Language
English
Primarily Uses
RMMV
@ICF-Soft

Yeah, between being new to javascript/coding and pretty tired by the time I got to that point last night, I forgot that functions stop running code after a return statement, which made things seem pretty confusing... After sleeping and thinking on it a bit at work I came up with a pretty good idea of what was happening, and eventually made it home and confirmed. The problem seems to be resolved by adding a null check to the if statements in your prototype functions for nparams and cparams.

For example:
Line 4706 under Game_Actor.prototype.NParamBase would be updated to:
if ($dataActors[this._actorId].customNParam[paramId] != '' && $dataActors[this._actorId].customNParam[paramId] != null) {

In v1.09c, the Game_Actor.prototype.NParamBase function is run for each nparam id, checking if a value exists in the relevant obj.customNParam array at the corresponding index. The if statements for $dataActors and $dataclasses (and similar for enemies) filter out cases where the array element = '', but they allow cases where the array element = null, which includes all cases where the nparam id > 30 and no custom base notetag exists. The try statement does not catch these cases either, because the first line declares var value = 0 before trying to get the value from the array, which makes return value; a valid line even when the array element's value is null. Because of this, Game_Actor.prototype.NParamBase runs the code under the if statement for $dataActors for all nparams with an id > 30 (those that have null values in the obj.customNParam array), and is only capable of running the code under the if statement for $dataClasses for nparams with an id of <= 30.

By adding a null check, the if statements filter out cases where the corresponding obj.customNParam element equals '' or null, allowing the function to properly move past the if statement for $dataActors if there is no relevant notetag in the actor section, and check the if statement for $dataClasses as intended. I also doubt this addition is likely to create any new bugs.

Removing the line var value = 0; from the try statements also seems to resolve the issue, since that makes the line return value; invalid when the array element is null, but I believe this may result in value becoming a global variable, which is generally undesirable, so adding the null check to the if statement seems like a safer fix to me.
 

Andyest

Villager
Member
Joined
Jul 7, 2020
Messages
15
Reaction score
0
First Language
Portuguese
Primarily Uses
RMMV
Hi.
How can I use set'Param'Base(n) for an specific character? For example: I have an warrior, and every time he changes to mage, he gains the params of the mage, lets say, <NPARAM: row 75 4 2 1000>.
BUT if the mage has the skill "magic plus" (idk), it calls setMagBase(100). I tryed put it in a skill, with a common event, to use in him, but didin't work.
Thanks in advance. :)


EDIT: I know EXACTLY how to do that. I was just tired. Ignore it and thanks. xD

EDIT2: Ok, I have a new question:

I put this in a class:


<CUSTOM NPARAM BASE mak>
if ($gameActors.actor(1).isLearnedSkill(29)) {
value = base;
value += 25;
};
</CUSTOM NPARAM BASE>

But it don't recognize "base" nor "mak" as a value/variable.

What I want is to gain a bonus in a stat if a have a skill. The base changes with the class, but the bonus persists, so a mage have mak=100+(2*level) and a warrior mak=25+(1*level). But if the character have the skill 29, then it becomes mak=100+(2*level)+25 if he is a mage OR mak=25+(2*level)+25 in case being a warrior. The thing is that I want that each character have a bonus byself. So If Harold is a mage with the skill 29 he have: mak=100+(2*level)+25+5. But If Lucy is a mage with the skill 29 he have: mak=100+(2*level)+25+15.
(mak=base+grow+skill+charbonus)

EDIT 3:
Ok, só a created a NParam called vit for the character and another called res for the class. And the res Base eval is this.vit*8. But it give me a Nan result for res. What could it be?

EDIT4: I did It! Thank you! HAHAHA
 
Last edited:

Andyest

Villager
Member
Joined
Jul 7, 2020
Messages
15
Reaction score
0
First Language
Portuguese
Primarily Uses
RMMV
I will double post because my previous post was becomming stupid. lol

So, I created a NParam (vtt) whose value will be given by the character. Then I created another NParam (res), wich uses "this.vtt * 8" as eval formula. Then, in the class I put:
<NPARAMPLUS: res 100>

It worked once. But when I tried again, It gave me an error.

I created another project and tried again, and it happened again.
Maybe its a bug? Or am I doing something wrong?

EDIT: the error persists even if I delete all the notetags and even deleting the nparams on the pluggin.
 

Attachments

  • 01.png
    01.png
    150.9 KB · Views: 9
  • 02.png
    02.png
    123.3 KB · Views: 10
  • 03.png
    03.png
    279.3 KB · Views: 10
  • 04.png
    04.png
    228.7 KB · Views: 8
  • 05.png
    05.png
    349.2 KB · Views: 6
  • 06.png
    06.png
    350 KB · Views: 4
Last edited:

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
308
Reaction score
97
First Language
English
Primarily Uses
RMMV
@ICF-Soft Besides the suggestion about supporting XParams in the weapons / states notetags, I have a problem.

I'm using your Params Core and it plays nice with Hime's enemy class and enemy equips. Enemies can access custom stats through a class no problem.

Enemy Class: Enemy Classes MV – 姫HimeWorks

Enemies can read this in their class:

Code:
<Custom NParam Base x>
value = 75;
</Custom Param Base>

But if it's a base parameter, enemies can't read it in their class:

Code:
<Custom Param Base atk>
value = 75;
</Custom Param Base>

There's no crash or conflict. They can't read this notetag if it's a base param in their class.
------------
Edit
------------
Actually, I'll disregard the problem. Placing Hime's plugin over your plugin solved the problem. Sorry about that!
 
Last edited:

Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Hello,

I'm not sure I understood everything (I don't speak English), but I wanted to know if it was possible to manage xparam in class notetags like nparam.

From what I understood it's not possible but I wanted to know if it's possible to do something like that for individual classes or something similar.

<CUSTOM XPARAM BASE Cri >
value = 60 + Math.pow(this.level, 1.92);
value += this.agi* 20
</CUSTOM PARAM BASE>

I know it doesn't work, but is there another way to do it?

Thank you for your response.
 

ICF-Soft

Veteran
Veteran
Joined
Aug 15, 2015
Messages
261
Reaction score
128
First Language
Spanish
Primarily Uses
RMMV
Actually there is not a way to do this.
I'll add it in next version.
 

Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Great, thank you very much!
 

passmoreNOPE

Warper
Member
Joined
Jan 8, 2014
Messages
4
Reaction score
1
First Language
English
Primarily Uses
Hello,

I'm running into some trouble here. Sorry I'm completely new at this. I'm using the MZ version of the plugin. I've created a CPARAM called AP (Armor Points). The concept is that enemies will have armor points that you can damage to break their defense. I'm wanting to add the AP param to enemies but I'm not sure how to do the tag exactly. In the help section it gives this as an example for a tag:

<CPARAM: CParam Base Grow HGrow Cap>

I have: <CPARAM: ap 30 1 1 1> in the notes of the enemy, but when I playtest my game it gives me "Cannot read property 'toLowerCase' of undefined. Am I doing the tag completely wrong? Thanks for your help!

Edit:
I was able to do some more digging into this last night. Due to my wife and I's work from home setup, I can't really access my main computer until late in the evening, so I'll have to edit again to add more details.

The problem was I believe line 1680, where the plugin grabs the 'Use Damage Icons' value. For some reason this parameter was undefined, even though I did in fact have a value in the plugin and there didn't seem to be any typos. Since the value I wanted was true, I just hard set the variable to true in the plugin code and that got around it.

I still don't have my new CPARAM working though. I have the <CPARAM: ... > tag on my enemy and the <DAMAGE TYPE: ap> tag on a skill, but the monster doesn't appear to have the CPARAM and the skill is still doing HP damage. Oh well, I'll have more time tonight hopefully to take another crack at it.
 
Last edited:

J-G

Veteran
Member
Joined
Oct 4, 2019
Messages
622
Reaction score
151
First Language
English
Primarily Uses
RMMV
Not sure but the lowercase underdefined usually meant for me tht something in spelling was off. Maybe the ap should be AP or AP
 

passmoreNOPE

Warper
Member
Joined
Jan 8, 2014
Messages
4
Reaction score
1
First Language
English
Primarily Uses
Sorry, meant to update my comment again. I noticed the underlying issue and contacted the developer. I had downloaded an older version of the plugin, the current version has this fixed. He went ahead and updated the bad link I had used.
 

Latest Threads

Latest Posts

Latest Profile Posts

I've decided "Attack on Equestria" should be released first... hence this new ARG channel! https://www.youtube.com/channel/UClKiUI8xOVx9dsF4kRXUmxw
Check it out, and subscribe! The ARG will lead up to the video game. It's not a creepy game, but I just thought it should follow ARG standards.
For anyone interested in my project M - i finally made a gamethread about it :D

Yay. I turned 39 today. Another year older, another year closer to the grave.
I'm sure the latest post/thread in the sidebar used to have 5 posts. Was it always been like this?

Made it to the 10th video doing this! :kaocry:

renderTimingPixel.png

Forum statistics

Threads
110,407
Messages
1,053,065
Members
143,469
Latest member
ClementPanchout
Top