povodny zastaraly vzorec:
tValueF utils::ComputeStatF(const tTierF& _Tier, const tValue& _Basis, const tPercent& _Percent)
{
return ( BASE + _Tier * TIERSTEP - _Basis ) * _Percent / PSCALE + _Basis;
(_Basis - 1 hodnota pre auto, _Percent - 1 hodnota pre diel)
Moj vzorec je dlhsi. Rozmyslam ako skatit,aby som nemusiel do jednej return funkcie pisat dlhe omacky.
Bud ich napisem do jedneho dlheho neprehladneho vzorca (3x)
Alebo po jednom vzorci...Len neviem ako. Ten _Basis som nikde nenasiel , kde ma definicou.
Niekolko vzorcov:
handlingcent= HandlingSUM*0,01
accelerationcent= AccelerationSUM*0,01
topspeedcent= TopspeedSUM*0,01
allsum= (1/(((HandlinCent+AccelerationCent+TopspeedCent)*ValueHalf)+1))
hndcalc= AllSUM*HandlinCent
acccalc= AccelerationCent*AllSUM
tspcalc= TopspeedCent*AllSUM
frag= ((ValueOne-HndCalc)-AccCalc)-TSPCalc
handling Frag*H_Stock+H_Attribute_Handling*HndCalc+H_Attribute_Acceleration*AccCalc+H_Attribute_Topspeed*TSPCalc
acceleration Frag*A_Stock+A_Attribute_Handling*HndCalc+A_Attribute_Acceleration*AccCalc+A_Attribute_Topspeed*TSPCalc
topspeed Frag*T_Stock+T_Attribute_Handling*HndCalc+T_Attribute_Acceleration*AccCalc+T_Attribute_Topspeed*TSPCalc
Gulas :(napr. pre Handling)
qFloor (((1-((1/((( HandlingSUM*0,01+ AccelerationSUM*0,01+ TopspeedSUM*0,01)*ValueHalf)+1)) * HandlingSUM*0,01 )- ((1/((( HandlingSUM*0,01+ AccelerationSUM*0,01+ TopspeedSUM*0,01)*ValueHalf)+1)) * AccelerationSUM*0,01 ))- ((1/((( HandlingSUM*0,01+ AccelerationSUM*0,01+ TopspeedSUM*0,01)*ValueHalf)+1)) * TopspeedSUM*0,01 )*H_Stock+ ((1/((( HandlingSUM*0,01+ AccelerationSUM*0,01+ TopspeedSUM*0,01)*ValueHalf)+1)) * HandlingSUM*0,01 )*H_Attribute_Handling+ ((1/((( HandlingSUM*0,01+ AccelerationSUM*0,01+ TopspeedSUM*0,01)*ValueHalf)+1)) * AccelerationSUM*0,01)*H_Attribute_Acceleration+ ((1/((( HandlingSUM*0,01+ AccelerationSUM*0,01+ TopspeedSUM*0,01)*ValueHalf)+1)) * TOPSPEEDSUM*0,01)*H_Attribute_TopSpeed)
(TopSpeedSUM = fValue Topspeed; AccelerationSUM = fValue Acceleration ; HandlingSUM = fValue Handling)
Vacsina z to je Int ,budu musiet byt Float (pre Floor funkciu)
*Neviem vazne ako to spravit aby to fungovalo. Po poslednej uprave mi nic nepocitalo iba ikonky ukazovalo.