Fractal Softworks Forum

Starsector => Bug Reports & Support => Bug Reports & Support (modded) => Topic started by: YeaokIlldoitlater on May 26, 2021, 02:51:45 AM

Title: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: YeaokIlldoitlater on May 26, 2021, 02:51:45 AM
So I earn 5 million credits a month, I use beyond the sector to get cool rare *** to trade in bulk. I've given every cryo world I could find an orbital lamp while making sure I am the largest producer in volatiles.

I make money like crazy. Eventually my earnings outstrip my spendings and I just leave it alone, it's been that way for a long enough time that eventually... While at 2.1 billion my next 5 million credits rolled me into the negative. I am so screwed.

I request that the limit be something so obnoxiously big that this can't realistically happen. Since my colonies earn a diminished income and now I can't even use their earnings to pay it off.

:(

P.S the file size limit is really, really small. I had to retake that screenshot 3 times to get it within parameters.

I wrote a fanfic about the stupid situation and the consequences in my game, at least for some entertainment out of it.

Spoiler
The pig pen of Gindraum: circa 227.9.1

Taking a similar approach to the Avionics reprisal, Ahland Treth sent their core fleet with 20,000 men to take Gindraum. Their orders were simple, take the planet with no damage to its defences, there would be no backup in time for the inevitable Hegemony counterattack. Even with cataphract support the reinforcement of Gindraum’s ground forces with heavy batteries and a star fortress would prove suicidal in a frontal engagement. High Archon Roman Elysium taking personal command of the operation decided instead they would raid it for munitions and weapons, making their support ineffective.

While a prudent idea, both the batteries and fortress were architectured to head off hostile intrusions. And the operation proved just so, the opening shots to sabotage the planet’s defences cost a thousand Ahland Treth lives. In the servicing hangers and munition rooms defenders piled hallways and offices high with the raider’s corpses, a grim tactical advantage for the remaining forces who were able to use their friends as cover. However in some areas there were so many corpses the offensive prong had to be abandoned entirely, for the dead made passage impossible. Their success was limited, though they did succeed.

Yet still the task of taking the planet loomed before them, which despite being short of ammunition had time to prepare for the inevitable planetfall. Gindraum was still a major industrial centre, it had plenty enough to fire their guns. Roman knew this and set up 4 waves of about 5 thousand to land and make progress, each wave, using the stepping stones of the one before to push further in. Sending them all in would allow the remaining batteries to be too effective, they needed to bleed themselves upon this bed of knives to blunt them for the one who would finally rest upon it. Deploying extensive cataphract compliments to engage the heavier guns, unaided marines took bloody ground wave after wave. Without money Ahland Treth paid for this invasion in blood, for the sections of the Gindraum polity were laid waste in the fighting as the fumes of blood and pulsar carbines broke down the air filters for entire districts.

The first wave made it past the spaceport but were stopped at the mining shuttles, the defenders had hauled mining rigs off the planet surface and established firing lines from their shuttle bays. Every marine was killed, but there was no respite. The second wave secured the spaceport and burned the dead to crash the air filtration in the trader’s district, it was then they pushed into the mining bays through the suffocated trading post, outflanking the lethal mining blasters. A pyrrhic victory for the miners and security forces, the defensive equipment used to counter luddic sabotage and workers’ routs were put to great effect against the rushing forces, yet much of their preparation was flanked and what followed was utter chaos. Both sides were completely slaughtered and the few Hegemony auxiliaries left fled to the mines upon the planet’s surface.

The third wave was aided by cataphract forces and even some garregat heavy ASM’s, having secured the guns in 7 ruthless deployments. The third wave landed directly on the salvage gantries, ignoring the scrambling defenders and the pressure they were putting from the open floor. Taking air the garregats and their dreaded mutilator autocannons slaughtered the yard defenders that were exposed from low cover and the deployed ground forces opted for a cqc engagement using blancher shields and scatter beams to take the survivors at their weak points. This crushing sweep however was open to a counter attack from the supply warehouses, where the Hegemony main force was waiting. Loading hepheastus assault guns attached to junker ships, the Hegemony Reborn destroyed the gantry and killed nearly everyone inside the yard. Viscera, smouldering cataphract chassis’ and awful moans were all that was left of the enormous-sector supplying salvage yards.

Ahland Treth expected to suffer losses but at this point of the operation Elgard high command was shocked to hear it had costed 15 thousand lives of their finest and demanded to know the reason this invasion had become such a slaughter. Roman cited the Hegemony’s newfound love of scorched earth tactics and mused that perhaps their sponsoring of the luddic path 150 cycles ago rubbed off on them now. Roman neglected to mention his sabotage of civilian infrastructure caused immense destruction and mutual casualties in it’s own right, the Hegemony Reborn was clearly hiding auxiliary forces among the populace and as much as he disliked it he did not have the resources to allow unknown factors. Switching tactics to prevent an uproar at home, Roman ordered the remaining 5,000 to merely secure the batteries and remaining infrastructure to prevent harassment of his fleet. He ordered the Coeurl, a one of a kind scathach-class custom dreadnought to engage the storage warehouses of the salvage yards. He ordered a missile ordinance so thick the propulsion thrusters drowned out com chatter of half the polity. If this new Hegemony was going to use capital class weapons to slaughter ground forces, he would simply even the odds.

Roman Elysium took the rest of the complex with 5000 and the air support of enormous plasma batteries, although it cost him another 2,100. Gindraum was his. He ordered the public historians to not record this victory, normally vicious fights like this one are glossed over and relations experts are not taken along, if they had the money to coordinate proper fleets that was.

The pig pen operation was over, although the battle still not done. With remaining special forces being scrambled to defend against the Hegemony Reborn's counter invasion.
[close]

[attachment deleted by admin]
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: WeiTuLo on May 26, 2021, 12:40:05 PM
An item that is available everywhere, cannot be raided for, and buys/sells for 1 billion credits could solve this issue.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Alex on May 26, 2021, 02:41:59 PM
Thanks for the report! I've got a note to have a look at some point, but it's annoying enough to fix (and not a big enough issue) that it hasn't got enough of a priority yet. I think you might be able to get this sorted in your game via console commands, though - I'd imagine there's an AddCredits or similar?
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: YeaokIlldoitlater on May 26, 2021, 11:43:21 PM
Yeah Alex the discord guided me on the right path in that regard, kinda cool how active you are here though. I like that the dev is so connected with the game still.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Alex on May 27, 2021, 09:48:11 AM
Glad you got it squared away - and, thank you! <3
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: JUDGE! slowpersun on May 30, 2021, 11:34:38 AM
Thanks for the report! I've got a note to have a look at some point, but it's annoying enough to fix (and not a big enough issue) that it hasn't got enough of a priority yet. I think you might be able to get this sorted in your game via console commands, though - I'd imagine there's an AddCredits or similar?

Sounds like a stack overflow issue.  Same issue supposedly gave the original Civ game Nuclear Gandhi, but Sid Meier apparently only gets annoyed when this gets suggested/pointed out (there is a funny interview from some game magazine that basically details exactly this).

Although increasing memory availability for having more money would temporarily fix the issue, increasing the cap to like 1 trillion will only delay the inevitable issue.  Prolly gonna have to come up with some in-game reason why player can't have more than X number of credits... with X still being a crazy large number.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: YeaokIlldoitlater on May 31, 2021, 03:18:42 AM
T

Sounds like a stack overflow issue.  Same issue supposedly gave the original Civ game Nuclear Gandhi, but Sid Meier apparently only gets annoyed when this gets suggested/pointed out (there is a funny interview from some game magazine that basically details exactly this).

Although increasing memory availability for having more money would temporarily fix the issue, increasing the cap to like 1 trillion will only delay the inevitable issue.  Prolly gonna have to come up with some in-game reason why player can't have more than X number of credits... with X still being a crazy large number.

This is true but it is possible to run out of things to spend money on and slowly reach your demise, making it slower than an actually feasible amount would be nice
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: AiDec on April 25, 2022, 07:01:49 AM
Hello :)
At first thanks for amazing game!!!
(thanks to the developer and all contributors, modders...)
 
I've played Starsector quite a while ago. I had a lot of fun :)  until I reached this "money cap".
I thought it's some bug or my mistake, so I started again from the beginning. With different setup. And again, with different setup. And again.
And after quite few times (and many days playing the game) I concluded that it must be some serious issue. So, being dissapointed, I stopped playing.
I didn't expected that there could be any financial cap in a financial game... :(
 
Recently I wanted to give Starsector one more try and I've found this thread :)
 
My question is if this "money cap" still exist or have it been fixed/removed?
One day I'd like to colonize all available planets. And I need money to do that! :)
I'd like to be able to collect an unlimited amount of funds.
 
 
EDIT: It's still here :(
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: chedabu on September 14, 2023, 10:46:46 PM
Has anyone found a fix to this bug?
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Hatter on September 16, 2023, 11:32:29 AM
Has anyone found a fix to this bug?
Console command mod to add back your 'proper' amount of credits.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: chedabu on October 01, 2023, 06:12:18 PM
It still reverts back to negative after 1 cycle
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: AiDec on November 27, 2023, 09:51:35 AM
And another year later, I ask again; has the "money cap problem" finally been solved?
I am waiting for a proper fix, to play Starsector again.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Histidine on November 27, 2023, 05:11:42 PM
The technical fix is to copy and paste this into console (this doesn't make the cap go away but the debt will):
Code: java
runcode import com.fs.starfarer.api.impl.campaign.shared.SharedData;
Global.getSector().getPlayerFleet().getCargo().getCredits().set(0);
SharedData.getData().getCurrentReport().setDebt(0);
SharedData.getData().getCurrentReport().setPreviousDebt(0);

The actual fix is to find something to do in the game that isn't making a number go up at rates far beyond what it's designed to do.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Uther Phobos on November 27, 2023, 08:39:09 PM
The technical fix is to copy and paste this into console (this doesn't make the cap go away but the debt will):
Code: java
runcode import com.fs.starfarer.api.impl.campaign.shared.SharedData;
Global.getSector().getPlayerFleet().getCargo().getCredits().set(0);
SharedData.getData().getCurrentReport().setDebt(0);
SharedData.getData().getCurrentReport().setPreviousDebt(0);

The actual fix is to find something to do in the game that isn't making a number go up at rates far beyond what it's designed to do.
No, that's a workaround, not a fix. A fix would be to implement a cap. If you have billions of credits, money has become meaningless anyway.

Since numbers above 999,999,999 credits don't fit in the UI, that'd probably be a good spot to cap it and solve two issues at once.

It's not like it's impossible to reach that limit even in vanilla Starsector. It just takes longer.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: AiDec on November 28, 2023, 10:00:11 AM
@Histidine:
Hello mate :)
I was wondering for a moment whether I should express my opinion on your opinion or not.
I decided to share my thoughts and I just hope you can handle it.
My intention is not to attack you, but to present my POV (!!!).
 
The actual fix is to find something to do in the game that isn't making a number go up at rates far beyond what it's designed to do.

Buuuuuuuuuuuuuuuuaahahahahahahahahahahahahahahahahahaha. Like seriously I can't stop. Can't at all.
Please, pretty please, forgive me for not being able to hold it.
Buuuuaaahahahahaha :)  <- with all do respect nevertheless ofc! :) :)
 
1. It's not a fix.
2. It wasn't helpful at all.
3. Please, please, please, try to think for a little longer about what you wrote.
 
(Btw, if you write your above statement to the modders, I'd like to see their reaction :)  )
 
I really don't need advices, I don't need to be told how to play the game and I don't care if UI shows me 999,999,999 or -999,999,999 or XXX,XXX,XXX or ERROR or 000,000,000.
As long as I have 1,000,000,000+  :)
 
I remember playing "Supreme Ruler", where if one of the players have acumulated a lot of currency or products, he have seen something like 9.99999998E+17. And we kept playing. Of course.
It was about 40 years ago.
The game have been written in Basic.
On Atari 800XL with 62kB available RAM.
 
Impossible to fix Stack overflow???   :o
Haaaaaaaaaaaahahahaha
Calculator in my watch deals with bigger numbers :)
 
Btw, did you enjoyed SW prequels and sequels? Did you enjoyed all-powerful Rey "Skywalker" ( :D) ? Did you enjoyed Luke giving up on Jedi, force, people...?
Did you enjoyed Han Solo being killed by his son? Did you enjoyed the pace of recent Ahsooka series?
If not, then well, you have watched it wrong ;)
Just like I play the game wrong :)
You got this? I hope you do :)
 
No, that's a workaround, not a fix.
Yes :)
A fix would be to implement a cap.
No. It would be a workaround :P  :D   ;)
(...) numbers above 999,999,999 credits don't fit in the UI (...)
Oh :(
My Windows calculator can 9,999,999,999,999,999...
It's not like it's impossible to reach that limit even in vanilla Starsector. It just takes longer.
Yes!
First time I encountered this issue was in vanilla. And it din't took long rly. I think I played about a week, or maybe 10 days (not sure, don't remember well, it was long ago).
 
 
@Everybody
One of the things I like in live the most (sarc ofc), is when folks say how many things CAN'T BE DONE ;D    [Written by AiDec. A long-time professional production manager]  8)

 
Peace, love, fun, laughter and neverending progression    :-*
Live long and prosper.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: AiDec on November 28, 2023, 10:16:57 AM
I was going to write more...
Now I'm wondering if this is a good idea...
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Uther Phobos on November 28, 2023, 10:44:11 AM
No. It would be a workaround :P  :D   ;)
(...) numbers above 999,999,999 credits don't fit in the UI (...)
Oh :(
My Windows calculator can 9,999,999,999,999,999...
No, it's the standard fix to overflows. Prevent the value from getting bigger than the code can handle. Just using bigger variables does not actually fix the issue but just delays it and may not be suitable for other reasons.

Also, the UI can display numbers bigger than that, they'll just overlap other elements.

And you really need to work on your tone.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Alex on November 28, 2023, 11:02:58 AM
Spoiler
@Histidine:
Hello mate :)
I was wondering for a moment whether I should express my opinion on your opinion or not.
I decided to share my thoughts and I just hope you can handle it.
My intention is not to attack you, but to present my POV (!!!).
 
The actual fix is to find something to do in the game that isn't making a number go up at rates far beyond what it's designed to do.

Buuuuuuuuuuuuuuuuaahahahahahahahahahahahahahahahahahaha. Like seriously I can't stop. Can't at all.
Please, pretty please, forgive me for not being able to hold it.
Buuuuaaahahahahaha :)  <- with all do respect nevertheless ofc! :) :)
 
1. It's not a fix.
2. It wasn't helpful at all.
3. Please, please, please, try to think for a little longer about what you wrote.
 
(Btw, if you write your above statement to the modders, I'd like to see their reaction :)  )
 
I really don't need advices, I don't need to be told how to play the game and I don't care if UI shows me 999,999,999 or -999,999,999 or XXX,XXX,XXX or ERROR or 000,000,000.
As long as I have 1,000,000,000+  :)
 
I remember playing "Supreme Ruler", where if one of the players have acumulated a lot of currency or products, he have seen something like 9.99999998E+17. And we kept playing. Of course.
It was about 40 years ago.
The game have been written in Basic.
On Atari 800XL with 62kB available RAM.
 
Impossible to fix Stack overflow???   :o
Haaaaaaaaaaaahahahaha
Calculator in my watch deals with bigger numbers :)
 
Btw, did you enjoyed SW prequels and sequels? Did you enjoyed all-powerful Rey "Skywalker" ( :D) ? Did you enjoyed Luke giving up on Jedi, force, people...?
Did you enjoyed Han Solo being killed by his son? Did you enjoyed the pace of recent Ahsooka series?
If not, then well, you have watched it wrong ;)
Just like I play the game wrong :)
You got this? I hope you do :)
 
No, that's a workaround, not a fix.
Yes :)
A fix would be to implement a cap.
No. It would be a workaround :P  :D   ;)
(...) numbers above 999,999,999 credits don't fit in the UI (...)
Oh :(
My Windows calculator can 9,999,999,999,999,999...
It's not like it's impossible to reach that limit even in vanilla Starsector. It just takes longer.
Yes!
First time I encountered this issue was in vanilla. And it din't took long rly. I think I played about a week, or maybe 10 days (not sure, don't remember well, it was long ago).
 
 
@Everybody
One of the things I like in live the most (sarc ofc), is when folks say how many things CAN'T BE DONE ;D    [Written by AiDec. A long-time professional production manager]  8)

 
Peace, love, fun, laughter and neverending progression    :-*
Live long and prosper.
[close]

I was going to write more...
Now I'm wondering if this is a good idea...

It is not and was not. Please familiarize yourself with the forum rules (https://fractalsoftworks.com/forum/index.php?topic=2668.0), and remember to treat the other uses with respect - especially when they're trying to help you! And, please remember that threads in the bug reports forum need to stay very rigidly on-topic and not spill over into broader discussions. Also, please consider this an official warning.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: Alex on November 28, 2023, 11:16:07 AM
I made a quick "fix" to this, btw, where it shouldn't cause the debt issue when this happens. Obviously all sorts of other issues such as the credits display being frozen when the credit value is above the max integer value, the value not fitting in the UI, and so on still remain, but none of that is stuff I can justify spending time on.
Title: Re: So I've hit the credit cap at 2 billion, but now I'm in debt.
Post by: AiDec on November 28, 2023, 11:39:13 AM
Prevent the value from getting bigger than the code can handle.

I understand. I still don't buy current solution as the best one / definitive one / the only one / correct one / etc.
 
(...) it's the standard fix to overflows.

I'd call it the standard workaround :)

Also, the UI can display numbers bigger than that, they'll just overlap other elements.

I am sure there are workarounds :)   ;)
How about writing just 7 numbers followed by k, then M, then G, then T?  <- have you seen this solution ever before? ;)   
 
And you really need to work on your tone.

Considering that I used in my post 10 of  :)  few of  :D and some other positive emoticons. And how much time I spent writing and modifying my post (It took over 2 hours - english isn't my language), IMHO you really need to work on your ability to understand written statements :)
 

But, considering that this has become an unnecessary offtopic, please spend 1 more minute to think again about my tone.
I came here to get a solution to 1 problem, not to make a new one...
So, if you are absolutely sure that my tone is wrong, let me know please and I won't bother anybody anymore.

 
 
EDIT:
(...) It is not and was not. (...)

 :'(
OK then. Not happy to read that, but well... You are the boss and I apologize.
 
Feel free to delete any of my posts or parts, I won't mind.