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 #204894] Thu, 25 December 2008 16:59 Go to previous messageGo to previous message
Headrock

 
Messages:1760
Registered:March 2006
Location: Jerusalem
In the above example I gave, one of the following will give the correct result, but I'm not sure which:

Result = ((float)Base_Chance / 100.00) * Percentage_Value
Result = (float)(Base_Chance / 100) * Percentage_Value
Result = (float)((float)Base_Chance / 100.00) * Percentage_Value

The last line works for sure, but again I haven't thoroughly tested which one is the most correct formula, so whenever my code absolutely needs floats, I end up using a LOT of (float) conversion commands... So I'd love to find the answer too, but too busy ATM.

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 09:04:44 GMT+2 2024

Total time taken to generate the page: 0.01589 seconds