Baseparamcontrol by yanfly(plugin)

Status
Not open for further replies.

Xyonel

Indie Developer, All-in-one artist.
Veteran
Joined
Jul 22, 2018
Messages
183
Reaction score
37
First Language
Italian
Primarily Uses
RMMV
I got errors with this formula and don't know why.
I checked multiple times and tweaked in different manner but still not works.
the variables are additional parameters as variable which allow me to implement a scaling addition to base param.
just tell me if something is wrong with this formula..


(base + plus + (if (user.actorId == 1) v[42]*Math.sqrt(v[42]); elsif (user.actorId == 2) (v[52]*Math.sqrt(v[52]))*2/3; elsif (user.actorId == 3) (v[62]*Math.sqrt(v[62]))*4/3; elsif (user.actorId == 4) (v[72]*Math.sqrt(v[72]))*2/3; elsif (user.actorId == 5) (v[82]*Math.sqrt(v[82]))*2/3; elsif (user.actorId == 6) (v[92]*Math.sqrt(v[92]))*2/3; elsif (user.actorId == 7) v[102]*Math.sqrt(v[102]); end)) * paramRate * buffRate + flat
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
772
Reaction score
482
First Language
English
Primarily Uses
RMMV
I got errors with this formula and don't know why.
I checked multiple times and tweaked in different manner but still not works.
the variables are additional parameters as variable which allow me to implement a scaling addition to base param.
just tell me if something is wrong with this formula..


(base + plus + (if (user.actorId == 1) v[42]*Math.sqrt(v[42]); elsif (user.actorId == 2) (v[52]*Math.sqrt(v[52]))*2/3; elsif (user.actorId == 3) (v[62]*Math.sqrt(v[62]))*4/3; elsif (user.actorId == 4) (v[72]*Math.sqrt(v[72]))*2/3; elsif (user.actorId == 5) (v[82]*Math.sqrt(v[82]))*2/3; elsif (user.actorId == 6) (v[92]*Math.sqrt(v[92]))*2/3; elsif (user.actorId == 7) v[102]*Math.sqrt(v[102]); end)) * paramRate * buffRate + flat
Well without knowing what the error you're actually getting is, it's gonna be real hard to diagnose this for you. I am immediately seeing that instead of using 'else if' you're using 'elsif' which is incorrect and is likely to cause a problem, though if that is the only problem that is caused I can't be sure.
 

Xyonel

Indie Developer, All-in-one artist.
Veteran
Joined
Jul 22, 2018
Messages
183
Reaction score
37
First Language
Italian
Primarily Uses
RMMV
i found in different posts online that in formula the else if is truncated in elsif, btw in the console there isn't any error, just a warning and a citation of the wrong formula.

edit: even with else if doesn't work. and this is the only error message i get " CUSTOM PARAM FORMULA ERROR"

ok additional error info :
YEP_EventTimerControl.js:387 SyntaxError: Unexpected token if
at Game_Actor.Game_BattlerBase.param (YEP_BaseParamControl.js:681)
at Game_Actor.Game_BattlerBase.param (YEP_StatAllocation.js:859)
at Game_Actor.get (rpg_objects.js:2133)
at Game_Actor.Game_BattlerBase.recoverAll (rpg_objects.js:2621)
at Game_Actor.Game_BattlerBase.recoverAll (YEP_BattleEngineCore.js:3569)
at Game_Actor.initEquips (YEP_EquipCore.js:408)
at Game_Actor.setup (rpg_objects.js:3443)
at Game_Actor.setup (YEP_BaseParamControl.js:1041)
at Game_Actor.setup (YEP_ClassChangeCore.js:586)
at Game_Actor.setup (YEP_X_Subclass.js:793)




EDIT:

I got this error with this formula: (user.actorId() === 1) ? v[41]+1:22

YEP_CoreEngine.js:1098 TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
at Bitmap.gradientFillRect (rpg_core.js:1289)
at Bitmap.gradientFillRect (YEP_CoreEngine.js:1014)
at Window_MenuStatus.Window_Base.drawGauge (YEP_CoreEngine.js:2418)
at Window_MenuStatus.Window_Base.drawGauge (YEP_SectionedGauges.js:170)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_AbsorptionBarrier.js:1417)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_SkillCore.js:1190)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_X_SkillCostItems.js:903)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_SectionedGauges.js:142)
at Window_MenuStatus.Window_Base.drawActorSimpleStatus (YEP_CoreEngine.js:2478)
at Window_MenuStatus.Window_Base.drawActorSimpleStatus (YEP_JobPoints.js:671)


i tried without variable and it works, so there's a problem with variables used inside this formula inside the yep plugin, if someone knows why just share, thanks
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,812
Reaction score
5,212
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

I checked out Genshin Impact gameplay out of curiosity. I can't believe it's available as a mobile game too. Smooth animation, great music, and stellar sound effects (the ambient sounds are pretty detailed).

I'm flabbergasted to see games have becoming more and more advanced. Maybe also because I'm oblivious to current trend for a long time, it almost feel like I'm being sent into distant future. xD
xDRAGOONx wrote on WaywardMartian's profile.
Your artwork is amazing!!!
:ewat:
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
I should finish the cat video I'm editing and finish the indesign stuff. So far only 1 is done and 4 to go
Made a video showcasing 56 plugins I've installed and used in the first 5 minutes of my game. (No battle related plugins involved.) :LZScheeze:

Forum statistics

Threads
105,662
Messages
1,015,360
Members
137,338
Latest member
greatgamegal
Top