[SOLVED] YEP_EquipCore working flawlessly, but...

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
Hello! First post here, sorry if it's not in the right place (I searched for YEP_EquipCore, read many, many posts/topics until I decided to create this one)

To make it so, that an equipment (say, a weapon, in this example):
-has a base 'str' requirement value of 25;
-'punishes' the character using it, if their 'str' value is below 35, by subtracting the difference between 35 and 'str' from current 'dex'

I'm using YEP_EquipCore and YEP_X_EquipRequirements, along with some other non-Yanfly plugins:
upload_2017-4-29_4-55-39.png
No issues so far using custom parameters (QuasiParamsPlus), here's a notetag for a weapon:
upload_2017-4-29_4-57-34.png
Yes, it reads that _cParamPlus[0] and checks, all fine. No conflicts so far.

This solved a little question I had where I wanted the base value of a custom attribute. Instead of using "user.xyz", I used "user._cParamPlus".
So, no more "equip-this-one-to-equip-that-one"
thing...

Now, I need to write another conditional notetag, which applies some kind of a "punishment", after the said weapon is equipped.
upload_2017-4-29_5-4-24.png

And this is where YEP_EquipCore comes into scene: it allows me - through Lunatic Mode - to customize this weapon effect, by checking the above condition.
So it would theoretically apply an effect of subtracting, say, 10 to 0 from 'dex'.

Again, it reads all of the above, checks and etc (I checked the console by adding the 'console.log()' thing).
But it does not write to 'user.dex'.

I'm pretty sure I'm doing something wrong here, just can't find out what...o_O
I'd appreciate any help, hint, link, guidance.
Thanks in advance! :smile::smile:
 

Attachments

Last edited:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,149
Reaction score
7,802
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,230
Reaction score
6,776
First Language
German
Primarily Uses
RMMV
But it does not write to 'user.dex'.
What is user.dex and where did you define it?
Most likely you defined it in a different context where the plugin can't access.

The engine itself doesn't have strength or dexterity or any values for it, so most probably you're using a plugin to create those values - which one?

Please give links to the websites of all plugins you're using in this context, people will have to check the exact code where is what in order to help.
 

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
[move]Plugin Support[/move]
Thanks!:smile:

What is user.dex and where did you define it?
Most likely you defined it in a different context where the plugin can't access.

The engine itself doesn't have strength or dexterity or any values for it, so most probably you're using a plugin to create those values - which one?

Please give links to the websites of all plugins you're using in this context, people will have to check the exact code where is what in order to help.
Thanks for the reply! :smile:
'user.dex', as well as 'user.str' are custom parameters¹ I defined using QPP plugin (QuasiParamsPlus):
These can be altered via notetags or plugin code, once they become properties of the 'actor' object (or Game_Actors. prototype.actor? Or $gameActors.actor()? )

I'm also using Yanfly's YEP_EquipCore and YEP_X_EquipRequirements (actually, versions 1.16 and 1.06, respectively)

There's an implementation of Alistair's AP_StatDistribution, which I copied and altered to make it so that the player can manually change custom parameters on level up (just added entries, and yes, I know it's not recommended, but I see it as a temporary solution so that I can make any progress into developing this one, until I find something more...."by the book"/suitable).
Disabling it doesn't change anything, so I'm assuming it has nothing to do with the property not being set.

Other plugins I'm currently using:
upload_2017-4-29_17-28-28.png
  • YEP_CoreEngine ("or die", meaning "mandatory");
  • QPP, for custom parameters;
  • Two ICFSoft I'd rather not use - and probably will no longer use, QPP does the trick, although a little bit limited;
  • YEP_BaseParamControl - needed to link MaxHP to a custom attribute ('user.vit', for instance - works perfectly!);
  • Will soon use YEP_ExtraParamFormula/YEP_SpecialParamFormula. It'll solve many issues with xparams/sparams;
  • YEP_EnhancedTP - makes it so that TP now works as Stamina. Again, works perfectly;
  • YEP_MainMenuManager and YEP_StatusMenuCore - disabled cause I'd have to copy/alter one of them to show custom attributes. Or I'd have to disable some menus and create new ones - which I feel not yet skilled enough to do so;
  • JAH_StatusMenuCore - solved the above issue (disabling it does not solve the issue related to this topic);
  • YEP_X_ActorVariables - useful, initially for debugging/developing purposes;
  • AP_StatDistribution (disabled to check if it causes the issue related to this topic);
  • AP_AbilityDistribution - will most probably not be used as intended. Possibly not used at all (we need Skill Distribution - not Ability - limited to a certain custom parameter. Things are getting complicated, hehe, no prob.:stickytongue:);
  • YEP_SkillCore - needed to customize skill/spell costs (i.e: costs MP and TP). Works as intended;
  • YEP_MapGoldWindow, BOB_CustomStats, MOR_RecoverOnLevelUp: the first two, I was still learning how to use plugins. The last one, I was learning how to make plugins (aaand...boss/manager (the person) did not want its implementation. Players may suffer a little bit more.:biggrin:)
  • ShowConsoleOnBoot - as I'm *expecting* some crashes-on-load, this might be useful. Anyway, I use console so often it comes in handy...

Thinking a little bit more (after finally sleeping, lol), I noticed that, with the exception of AP_StatDistribution and QuasiParamsPlus, all other plugins that deal with custom parameters only read from them.
I guess I'll have to check the codes that write values to them².

(btw: I'm having some difficulty getting the actor's ID and making it work in a notetag formula. I thought I'd never have to get the actor's ID in such situation because and item equipped by 'actor(x)' is supposedly related to that 'actor(x)')

¹(usually, I first check the plugin to see if it uses 'user' within notetags, because...well, QPP, for instance, does not)
²(addCParam(paramId, value) and setCParam(paramId, value) within QPP. Not sure if it's available to be used by other plugins, though the said plugin help says it is)
 

waynee95

Lunatic Coder
Veteran
Joined
Jul 2, 2016
Messages
645
Reaction score
542
First Language
German
Primarily Uses
RMMV
@MORINGA
The 'dex' param is read only. Use user.addCParam(CParamId, value) and replace CParamId with the id of the dex param. To substract from the
param use a negative value.
Normally, there should be no problem with using it in the notetags.

You get the actorId by calling user.actorId() if user is an actor.
 
Last edited:

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
@MORINGA
The 'dex' param is read only. Use user.addCParam(CParamId, value) and replace CParamId with the id of the dex param. To substract from the
param use a negative value.
Normally, there should be no problem with using it in the notetags.

You get the actorId by calling user.actorId() if user is an actor.
Er...hum...it crashes (so I get nothing from console) when I use either addCParam() or setCParam().
Thing is: I'm not allowed to use it within YEP_EquipCore's notetags (I'm inclined to actually prefer it that way! Since it's a QPP implementation, there should be a "QPP-like" solution for this - if I'm not mistaken! But that would require another way to call those functions, since I may not use 'user', nor 'actor' for QPP...)

(Thinking and testing before posting) Good news! [SOLVED]

Fixed Params allows you to add a fixed param value to states and equipment.
With this you can create states that will add a constant value to a param.
Or create a poison / regeneration state that ticks a fixed number.
( You can also add these in Actors, Classes and Enemies Notes)

Setting up <note tag>

<params>
Param: Value
</params>

Where Param can be: MHP, MMP, ATK, DEF, MAT, MDF, AGI, LUK and new Params

Value can be any number or even a formula. Can use a and v[] but not b!

I did miss a single letter - a statement, actually - that made all the difference: "can use a."
Which means the following is now working:

Code:
<params>
DEX: if (a._cParamPlus[0] >= 35) { 0; } else { a._cParamPlus[0] - 35; }
</params>

I'll remember this from now on: if plugin X implements feature Y, it's up to X's resources to deal with said features.
In the end, it was all about proper use of QPP and nothing to do with YEP_EquipCore.
Thanks!

(Word to the wise: drink about 3/4 of a gallon of water per day. Be grateful. Eat veggies. And do not code without proper sleeping...:biggrin:)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

convention concluded, i'm glad the books well received and sold out
not every content is decent, but i'll be better for the next work.

now back to game developing
I hope to be able to post my vxace resource edits this Wednesday.
Not sure if I'll get to the library though.
Me: Man, I'm definitely burned out this time. Time for a break. Me three hours later: I'm ready to work again, let's go! Me another hour later: Okay, I can't do this anymore. Repeat for infinity.
Just got MV and am working on porting over my new game from VX Ace to it! I haven't done much with my new game so it should be pretty quick.
I was doing forge runs on D2 with my wife last night, and singing like a leprechaun to annoy her XD. I was calling it 'The Farge'

Forum statistics

Threads
94,457
Messages
921,082
Members
124,286
Latest member
VMAndrade23
Top