Gates of Arimyth
http://forum.arimyth.com/

ISO a second eye (formula)
http://forum.arimyth.com/viewtopic.php?f=25&t=4536
Page 1 of 1

Author:  PureRage-DoD [ Thu Sep 01, 2011 3:03 pm ]
Post subject:  ISO a second eye (formula)

This ass hole formula has been bugging me for days and I'm not sure wtf I'm missing. It works fine if i use it for a skill description, but isn't being applied in game so it must be off somewhare. some extra eyes/brains taking a look will help i hope.

(skill('Frenzy'.blvl)>=1)?(18+(lvl*2)): ((skill('Berserk'.blvl)>=1)?(17+(lvl*3)):(ln34+(skill('Barb Block'.blvl)+skill('Focus'.blvl)+skill('Crowd Stun'.blvl)+skill('Concentrate'.blvl)+skill('Barb Life'.blvl))))

Its supposed to cut the life bonus of a passive to 20 + 2 per level if you have a point in frenzy. cut it to 20 + 3 per level if you have a point in berserk and follow the regular gains + get a synergy bonus from some other skills if there is no point in frenzy/zerk.

Note* I put a space between the : and the ( to avoid a :(

Author:  Baerk [ Thu Sep 01, 2011 3:14 pm ]
Post subject:  Re: ISO a second eye (formula)

Immediately after the first colon you have an opening parenthesis that is not closed before the next colon. It's probably playing havoc with your order of operations. Admittedly the closing one is right at the end but does the game engine take well to a parenthesis surrounding the 2nd colon?

Author:  PureRage-DoD [ Thu Sep 01, 2011 3:17 pm ]
Post subject:  Re: ISO a second eye (formula)

its not unclosed, the first ( is to wrap the rest of the formula up as the "if no" outcome.

Ie. it's a conditional with a conditional as one of the outcomes.

((skill('Berserk'.blvl)>=1)?(17+(lvl*3)):(ln34+(skill('Barb Block'.blvl)+skill('Focus'.blvl)+skill('Crowd Stun'.blvl)+skill('Concentrate'.blvl)+skill('Barb Life'.blvl))))

is the "if no" outcome inside ()

Author:  Baerk [ Thu Sep 01, 2011 3:25 pm ]
Post subject:  Re: ISO a second eye (formula)

What I meant was what if the fact there's a colon condition thing inside causing the game engine to mishandle that outermost parenthises of what you just relisted. Maybe give it a shot without that pair of parenthises?

Author:  Steel [ Thu Sep 01, 2011 3:27 pm ]
Post subject:  Re: ISO a second eye (formula)

Quote:
(ln34+(skill('Barb Block'.blvl)
remove ( after +... or dunno, seems like too much )

Author:  PureRage-DoD [ Thu Sep 01, 2011 3:36 pm ]
Post subject:  Re: ISO a second eye (formula)

I have to use multi conditionals for multiple outcomes. To break it down.

(skill('Frenzy'.blvl)>=1)?calculation 1:Calculation 2




Calculation 1:
(18+(lvl*2))

Calculation 2:
((skill('Berserk'.blvl)>=1)?(17+(lvl*3)):(ln34+(skill('Barb Block'.blvl)+skill('Focus'.blvl)+skill('Crowd Stun'.blvl)+skill('Concentrate'.blvl)+skill('Barb Life'.blvl))))

@ Steel. I can't, i need that ( so I can increase the synergy bonus from all those skills if needed by adding a *x outside the coresponding )

Edit: The outcome it is ALWAYS giving is the third outcome:
(ln34+(skill('Barb Block'.blvl)+skill('Focus'.blvl)+skill('Crowd Stun'.blvl)+skill('Concentrate'.blvl)+skill('Barb Life'.blvl)))

Author:  Baerk [ Thu Sep 01, 2011 3:41 pm ]
Post subject:  Re: ISO a second eye (formula)

If removing the green parenthises doesn't work... it may just be the game engine hates nested conditionals and you need to rework the equation to have only one conditional.

Author:  PureRage-DoD [ Thu Sep 01, 2011 3:46 pm ]
Post subject:  Re: ISO a second eye (formula)

It handles multi conditionals for sure, I have some bigger conditional formulas with 5-6 conditions all running together, this one hates me though...

Phrozen Keep Forumlae Guide wrote:
(lvl<3)?3: ((lvl<5)?4: ((lvl<7)?5: ((lvl<9)?6: ((lvl<11)?7: ((lvl<13)?8: ((lvl<15)?9: ((lvl<17)?10: ((lvl<19)?11:12)))))))) if placed into column “skpoints” and appropriate skill row of SK, this formula will make the skill require 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12… skill points to advance to 0..20th skill level (view details in “One skill point per two levels, per skill...” post in GMM)

Author:  Baerk [ Thu Sep 01, 2011 3:53 pm ]
Post subject:  Re: ISO a second eye (formula)

Well this is a rework I figured out. Should have the exact same outputs.

((skill('Frenzy'.blvl)+skill('Berserk'.blvl))>=1)?(max(17,18-skill('Berserk'.blvl))+(lvl*max(2,3-skill('Berserk'.blvl)))):(ln34+(skill('Barb Block'.blvl)+skill('Focus'.blvl)+skill('Crowd Stun'.blvl)+skill('Concentrate'.blvl)+skill('Barb Life'.blvl)))

Author:  PureRage-DoD [ Thu Sep 01, 2011 4:10 pm ]
Post subject:  Re: ISO a second eye (formula)

That will add a penalty for every point in zerk. It must just cut the bonus by 2% per level in the passive no matter how many points are in zerk (as long as they have 1 hard point in them) and by 3% as long as frenzy has at least 1 point. It can't go down further if you add more points to those skills. Just a static drop if those skills have at least 1 point in them. :(
I was thinking of something along those lines to begin with but abandoned it for that reason.

Ie. If you put a point in zerk, instead of getting 6% hp per level on the passive, you get 4%. If you put a point in frenzy, you only get 3% hp per level from the passive.

I'm using a crude work around atm by simply giving zerk/frenzy -2% hp and -3% respectively to hp per soft level on the passive while they are active. Thats a bit messy though and i'd like to clean it up

The issue must be in the early part of it since it is always using the third outcome, but that makes no sense as if there was a critical problem in the early parts, the formula would simply return 0 or another outcome. :?

Author:  Steel [ Thu Sep 01, 2011 4:13 pm ]
Post subject:  Re: ISO a second eye (formula)

Quote:
Edit: The outcome it is ALWAYS giving is the third outcome:
(ln34+(skill('Barb Block'.blvl)+skill('Focus'.blvl)+skill('Crowd Stun'.blvl)+skill('Concentrate'.blvl)+skill('Barb Life'.blvl)))

Then change it to 999 and focus on calc 1 and 2. Are you sure you used right symbol ' ' for skills, try using lvl instead of blvl? Hm, it's late now, I'll try to use custom formula tomorrow after work if you don't figure it by then.

Author:  dew [ Thu Sep 01, 2011 4:36 pm ]
Post subject:  Re: ISO a second eye (formula)

did u try changing >=1 to >0 i never had luck with multiple conditionals with >= so i always use >0

Author:  PureRage-DoD [ Thu Sep 01, 2011 4:46 pm ]
Post subject:  Re: ISO a second eye (formula)

yeh i tried >0 but got the same result. :x


@ Steel:

deff using the right symbols
using .lvl is no good as I don't want it getting canceled simply for wearing an item with +zerk/frenzy. Must be hard points only.

No danger of me figuring it out i don't think. I've been screwing around with it for like 3 days :x

I don't get why it's outputting the skilldesc perfectly but not the stat. They are using the same calc. (I also tried putting the whole thing in () for the skill but that didn't work either.

aarg!

Author:  Verb [ Sat Sep 03, 2011 5:45 am ]
Post subject:  Re: ISO a second eye (formula)

isnt it a problem somewhere else then and not with the calculations?

Author:  Zorax [ Wed Oct 05, 2011 3:58 pm ]
Post subject:  Re: ISO a second eye (formula)

what happens if you try the first part with hard numbers?

Author:  PureRage-DoD [ Wed Oct 05, 2011 4:20 pm ]
Post subject:  Re: ISO a second eye (formula)

What part? the skill names or the ln?

Author:  Zorax [ Wed Oct 05, 2011 5:01 pm ]
Post subject:  Re: ISO a second eye (formula)

I mean based on how it's ALWAYS giving the third outcome, troubleshoot/debug the formula by replacing variables with actual numbers so you can manipulate (without a doubt) what you want to happen.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/