In the end, they’ll only make you more money, and you’ll be in the exact same spot you are now, except with more things to manage. Lots of Money won’t stop bothering you with more money until you just decide not to give a damn. This is actually the core reason why money doesn’t make you happy in real life. If you keep piling it up it will just demand more and more of your time, your life, and eventually your soul.
In-game Test
I figured to test what would happen when selling items worth more than the max value of a signed 32bit integer. The result is not quite what I expected, although it shows how Hello Games has actually implemented their prevention.
I edited a creative mode save to have 0 Units to start with. I filled all 48 slots in exosuit cargo, with Fusion Ignitors. I filled 12 slots in exosuit main inventory. This makes a total of (48 + 12) * 5 = 60 * 5 = 300 Fusion Ignitors. I wanted to double-check if selling from exosuit includes both main inventory and cargo, which it does. So it is certainly possible to even overflow an unsigned 32bit integer when it comes to total value of what you may have to sell.
I built a quick room with a Trade Terminal to see what would actually happen:
Selling 144 Fusion Ignitors at a market average of -13.2%, shows a value of 2,145,961,344 Units.
Selling 145 Fusion Ignitors at a market average of -13.2%, shows a value of -2,147,483,648 Units!
This is clearly showing an overflow value for a signed 32bit integer (-232).
However, the difference in value between 144 and 145 Fusion Ignitors, is only just over 1.5M, if overflow is the case. The value per Fusion Ignitor should be 2,145,961,344 / 137 ~ 14,902,509 (rounded). So why does it show the value for the negative limit of a signed 32bit integer and not a slightly less negative value?
Let’s try 150 Fusion Ignitors …
This shows the same value! Once again, the value for the max negative limit of a signed 32bit integer! So no matter how many more I try to sell, once it overflows, it is stuck at -2,147,483,648 Units.
We know that selling at a normal value works fine. Now what happens when we actually sell with a negative value shown?
Two images required to see the full value, but it clearly shows positive value added to my balance.
So as soon as the value you get for selling items, overflows this signed 32bit integer, it just takes the max negative limit to prevent further overflow, regardless of how much it actually overflows. Because that value is then added to an unsigned 32bit integer for calculating your new Unit balance, it is converted to unsigned, resulting in a positive outcome. So Hello Games did implement an overflow restriction for calculating what your items are worth when selling. You will however be able to sell as many items as you want, but never being able to gain more than 2,147,483,648 Units.
I double checked at a Space Station and the same thing happens:
- 137 Fusion Ignitors at -8.8% = 2,143,233,792
- 138 Fusion Ignitors at -8,8% = -2,147,483,648
Even attempting to sell all 300 results in the same, even though this would be worth ~4,693,212,683
I then decided to sell 138 Fusion Ignitors at the Space Station, then sell another 145 at the planet, to end up at the max value for an unsigned 32bit integer, 4,294,967,295
Max Units, unable to get more, no matter what I sell!
That’s all folks
Your last two posts have been immensely enlightening! We now know what happens in C and in NMS, and the NMS experiment yielded surprising results. In short:
No matter how many expensive items you sell, you can never get more than 2,147,483,648 units from the trade terminal in any single transaction. This is about half the overall unit limit of 4,294,967,295.
It seems to me that those two posts are a definitive answer to my original question, complete with a good understanding of what happens in C and what error correction HG has put into place.
Thank you for all the effort you put into this.
But as we have seen in this thread, it brought up the question of whether anyone should be running into these limits in the first place, or whether doing so sucks the fun from the journey.
You’re welcome, it was an interesting endeavour.
I believe Hello Games has not put enough effort into actually creating a Unit sink. With the addition of various new ways to make lots of Units, combined with an overall decrease of value for ships, freighter, etc., it has become even easier to reach the maximum amount of units. Just adding more to buy is only a temporary solution and other solutions should in my opinion at least have been explored. I am still hopeful to see additional changes for that matter, as the limit can be reached way too soon in my opinion. Although I don’t value my Units at all, the ease at which you gain units does affect the experience in-game. Many will soon find themselves avoiding anything that makes units or gives them resources required to sell. No more farming, no longer exploring the new fleet leveling and stories, refining becomes an almost useless feature, etc. There soon is no incentive or any true effort required to earn Units.
I’d love to see repair cost, rent, taxes, hiring, paying for a new look of character, ship, or multitool. Offer payment as an alternative to resources and effort (time), to allow those with a big wallet to have an easy way out. I’d like to see frequently returning costs, resulting in a long lasting effect. Anything that negatively affects my balance, giving me a reason to earn more again. I have seen quite a few suggestions, but not all that many actually resulting in a sink, besides temporary. I really hope Hello Games can think of creative ways to regularly make me spend more. I don’t mind some time and effort just to make sure I stay on top of the bill. There will always be a limit, which no doubt can be reached, but please try to delay it as much as possible
When it comes to selling items at the Trade Terminal and the value limits specifically, I think Hello Games should consider making a change. With the release of NEXT, they increased the possible slot count quite a bit. This has increased the odds that someone runs into this, quite significantly, where pre-NEXT it likely required more effort and was less likely to happen. I would at least suggest to put a warning in place as soon as the ‘sell’ value overflows. I would also recommend a warning if the result is going to exceed the max amount of units a player can have. In both cases the player is then made aware of reaching a limit and losing items without profit. It may even be preferable to change the value to an unsigned 32bit integer instead for the total value of what is being sold. I can however imagine the same calculation being used for both buying and selling, complicating a change to the implementation. I can not imagine an overflow to happen when buying, as supply is limited, therefor unlikely to overflow and no issue to remain a signed 32bit integer to represent negative value for subtraction.