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
776
Reaction score
488
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,842
Reaction score
5,227
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 Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top