Raised This Month: $ Target: $400
 0% 

Logical help needed


Post New Thread Reply   
 
Thread Tools Display Modes
reinert
Veteran Member
Join Date: Feb 2007
Old 10-16-2011 , 17:58   Re: Logical help needed
Reply With Quote #11

Well I don't understand it, even if my surname is Dutch, but I'm officialy Estonian.
reinert is offline
8088
Veteran Member
Join Date: Jan 2008
Old 10-16-2011 , 18:01   Re: Logical help needed
Reply With Quote #12

Oh, too bad. For some reason I assumed you were Flamish. However, I hope the article fysiks linked to is sufficient.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-16-2011 , 18:11   Re: Logical help needed
Reply With Quote #13

Well my PlayerSkill values are way lower, ( -100 ~ 500 ). So what optimum value of exponentiation should I use ?
reinert is offline
Scone
Senior Member
Join Date: Apr 2010
Location: England
Old 10-16-2011 , 18:18   Re: Logical help needed
Reply With Quote #14

You could just knock one of the zeroes off and use 1.005 instead of 1.0005. You can experiment a bit with Wolfram Alpha (or a calculator). But I think skill values in the 1000's would be better because otherwise you'll get lots of players with the same scores (unless you don't have many players, or you use a floating point value for the skill).
__________________
Scone is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-16-2011 , 18:25   Re: Logical help needed
Reply With Quote #15

Well yea, maybe you are right.

But on server start, every player will start with 0 Skill, so wouldn't it be a problem for that calculating ?
reinert is offline
Scone
Senior Member
Join Date: Apr 2010
Location: England
Old 10-16-2011 , 18:28   Re: Logical help needed
Reply With Quote #16

Nope. 0 - 0 = 0, and x^0 = 1 (no matter what x is).

Basically, if two players have the same skill, the multiplier will always be 1, even if they both have zero skill.
__________________
Scone is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-16-2011 , 18:32   Re: Logical help needed
Reply With Quote #17

Ok. I will try it, thank you for your answer, I'd never though about exponentiation.
reinert is offline
Scone
Senior Member
Join Date: Apr 2010
Location: England
Old 10-16-2011 , 18:43   Re: Logical help needed
Reply With Quote #18

No problem, hope it works out.
__________________
Scone is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 10-17-2011 , 08:51   Re: Logical help needed
Reply With Quote #19

Somewhy when both Attacker and Victim skills are equal to 0, the result of iSkill is = -32768 or 32767
iSkill is smallint(6) in MySQL.
Where is the problem ? My code :
Code:
new Float:pKillerDifference = iSkill[victim] - iSkill[attacker] + 0.0; new Float:pKillerKof; pKillerKof = 1.0008^pKillerDifference; iSkill[attacker] += floatround(pKillerKof);

Last edited by reinert; 10-17-2011 at 08:54.
reinert is offline
Scone
Senior Member
Join Date: Apr 2010
Location: England
Old 10-17-2011 , 09:40   Re: Logical help needed
Reply With Quote #20

I think the problem is that the difference isn't being implicitly converted to a float, it's just being tagged as one.

Personally, I would make iSkill a floating point value, and only round it when displaying it to the user - otherwise players don't get any skill when killing someone with less skill than themselves (or always get 1 skill no matter how skilled they are). Doing that should fix both problems, and you'd get more accurate results.
__________________
Scone is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode