Jump to content
XCOMUFO & Xenocide

Retrofitting Turn-based Mp Formula


zaimoni

Recommended Posts

I'm taking another pass at reverse-engineering turn-based MP (as realtime MP is trivial if you have turn-based MP). The master is at UFOPaedia.

 

I'm having problems reverse-engineering what Apocalypse is actually doing. The current kludge is:

* Encumbrance allowance A = 4*STR

* Encumbrance E is calculated from equipment as a weighted sum

* approximate MP = SQRT([A-E]/A)*(maximum speed)

 

This gets me within 1 MP of the in-game MP allowance per turn. For STR 55, base speed 85 I have the following data points:

E	MP	formula
85	67	66.58
86	66	66.33
87	66	66.09
88	66	65.84
89	65	65.59

Rounding fails for encumbrance 89; truncating fails for encumbrance 85.

 

So...what integer-math manipulation allows almost-replicating the square root function's effect?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...