Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Time Capsule (How-to Library) » "How does it work?" Part 8: Skill Checks
Re: "How does it work?" Part 8: Skill Checks[message #204786] Wed, 24 December 2008 07:32 Go to previous messageGo to previous message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
Due to the obscurity of the formula (even the code comments are cryptic about its nature), it's quite possible that it doesn't work the way it's supposed to.

In fact, here's the code:

// Ok, this is really damn easy, so skew the values...
// e.g. if calculated skill is 84, skewed up to 96
// 51 to 84
// 22 stays as is
iSkill = (iSkill + 100 * (iSkill / 25) ) / (iSkill / 25 + 1);


Looks like you read it correctly, but I couldn't tell you why it gives the results that you say it does Razz

EDIT: Oh, please note that due to the way C++ works, there are several automatic conversions to integer within that function, of course.

[Updated on: Wed, 24 December 2008 07:34] by Moderator

Report message to a moderator

Sergeant Major

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "How does it work?" Part 1: Bullet Impact
Next Topic: "How does it work?" Part 5: Melee Combat Chance-to-Hit
Goto Forum:
  


Current Time: Mon Dec 02 10:57:52 GMT+2 2024

Total time taken to generate the page: 0.00965 seconds