Logo Platform
logo amplifiers simplified

how about the floating point operation in game value and the calculation's order

Copied to clipboard!
11 years ago
Jul 3, 2013, 5:39:29 AM
In the first, I want to ask:

1. Is it not support to thousandth in the floating point operation in the game?

I have calculated a formula: 150 * 0.001, it appeared 1.5 in the game.

And I have tried a formula for 1150*0.001 again, it appeared 11.5 in the game.



2. How about the order in multiple SimulationObjectPropertyModifierDescriptor/SimulationObjectPropertyBinaryModifierDescriptor formula in a value?

Because I want to do some complex calculations.



Let's talk details.



It happened some problems when I had tried to adjust the upkeep value in ShipDescriptor.xml.



It is the original formula:

[CODE]





[/CODE]



I think it meas: Upkeep=*initial value* - CommandPoint*0.4



But in the later game, it costs nothing.



and I adjusted the formula:

[CODE]





[/CODE]



Of course I think it meas: Upkeep = *inital value* - (MilitaryPower + MilitaryPowerInvasion) * 0.001



If I have had a 150 MilitaryPower ship, it should costs 0.15.

HOWEVER, It had calculated 1.5, btw, It appeared 2 upkeep in the game.

Because I tried to disband 2 ships (150 MilitaryPower), it appeared 3 upkeep.



Well, I think it isn't support smaller than a percent, so I have adjusted the formula again:

[CODE]



-->



[/CODE]



I think it means: Upkeep = *inital value* - [(MilitaryPower+MilitaryPowerInvasion)-1000] * 0.001



BUT, It has created a amazing thing, it had calculated 11.5 in the game.



ok, fine, it just a little too expensive...
0Send private message
11 years ago
Jul 4, 2013, 2:29:05 PM
I have solved the 1st question today but found a new question.

I also adjusted the formula of fleet's upkeep and it works.

So I cannot understand why it works in fleet's upkeep but no use in each ship.

It is cheaper to establish a fleet than placed in the port in my world now. lol

Thanks!
0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message