Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: [0.8.1a RC8] Food shortage number is confusing  (Read 1896 times)

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
[0.8.1a RC8] Food shortage number is confusing
« on: January 19, 2018, 10:40:55 PM »

The way the rounding works causes the "approximately X units of food needed to end shortage" message to give confusing or even outright nonsensical figures.

I had a shortage on Salamanca which said "approximately 350 units". When I delivered exactly 350 units of food, the market condition said "approximately 1 units".
I then drip-fed it 1 unit of food at a time. The "approximately 1 units" message remained till I'd sold 25 more units (above the original 350), at which point the shortage ended.

Easiest fix: make it say "at least" instead of "approximately" (since getRound() never rounds up, if I'm reading it right).
It'd also help if the number wasn't rounded at low levels.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8.1a RC8] Food shortage number is confusing
« Reply #1 on: January 20, 2018, 09:48:31 AM »

Thanks for letting me know! Taking a brief look, I think there's something more confusing going on there, but since I'm probably going to re-do how these work entirely, I'll look into it then.
Logged

ZombieM0ses

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: [0.8.1a RC8] Food shortage number is confusing
« Reply #2 on: June 01, 2018, 07:47:50 AM »

I know this is super old, but can confirm it is not a fluke or due to a mod. In fact, it's even worse than being off by a couple dozen (maybe the discrepancy is multiplicative?). I sold 590 units of food into a shortage of apparently 530 and it didn't take. This is in contrast to the previous three shortages which all went away by selling exactly the amount estimated. I also re-loaded my save and tried selling it to them piecemeal and it didn't make a difference. Screenshots available in a gallery
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: [0.8.1a RC8] Food shortage number is confusing
« Reply #3 on: June 01, 2018, 09:54:26 AM »

Thanks! Yeah, the whole system is totally different at this point (and food shortages are currently turned off), so I'll probably just re-do them from the ground up when/if there's an opportunity.
Logged