Posts: 2,764
Threads: 166
Joined: Nov 2009
Staff roles: Systems Developer
The equipment is calculated into total worth of the ship only when doing /givecash because then it'll say that your character has reached cash limit, even though you might be having only 1.2 billions on the account. Otherwise it won't become corrupted or anything, you can have 1.9 bill on a cap 8 cloaking battleship if you want. Also, if you reach 2.000.000.000 credits, it doesn't go up anymore but everything stays normal. Never tested it on multiplayer, but that's how it works in singleplayer.
(01-23-2016, 03:09 PM)Findarato Veneanar Wrote: Basically 2,147,483,647 is the max size a variable can get in many languages, go over that and it goes to -2,147,483,647
2,147,483,647 / 0 / -2,147,483,646
hex 7FFFFFFF
dec 2147483647
bin 01111111111111111111111111111111
hex FFFFFFFF
dec 4294967295
bin 11111111111111111111111111111111
Not to sound like a nerd or a software programmer here, but...
The (most commonly used) 32 bit signed integer, which Freelancer apparently uses to tell how much money you have, goes from -2'147'483'648 to 2'147'483'647, since 0 is considered as a number on the "positive" side.
As you can see, if you add 1 to 2'147'483'647 in a signed 32 bit integer, it rolls over to -2'147'483'648 - while the hex number has increased, the signed bit was the bit changed, putting you at a substantial debt. I don't know in what way Freelancer uses the signed bit for ship value calculations, because it makes little sense to me to have it as a signed integer. It might just have been an oversight - or it is used to represent some kind of error. Or, which is very much unlikely but still not impossible, the bit is used by some other variable and the value of the ship is stored in a 31 bit variable ... buuut that makes absolutly no sense whatsoever, so disregard this. Like, seriously, that would not just be way too complex, it would also be way too stupid and pointless.
It probably screws up the ship because a negative number is simply unexpected. Who knows where the number is used by FL and then causes problems.
Pretty sure they build in some protection in Disco in one of the updates since .85, but back then it was definatly possible to go over the limit and corrupt a character. I'd not try it out and rather stay below 2 billion overall worth on a single ship - or better yet even, below 1.8 billion. Most I have currently is a freighter with CAU 8 and 1.5 billion - keep in mind the ship and armor are not worth what you pay for them, they are worth what you would get when you sell them back.
01-24-2016, 06:39 PM, (This post was last modified: 01-24-2016, 06:41 PM by Findarato Veneanar.
Edit Reason: It's late, i'm tired, we need more batman threads.
)