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: Tri-Tach station does not get new ships  (Read 23190 times)

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Tri-Tach station does not get new ships
« on: March 08, 2012, 05:44:06 PM »

Over two games I have noticed they never received any new ships.

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Tri-Tach station does not get new ships
« Reply #1 on: March 09, 2012, 08:49:20 AM »

Has anyone else countered this?

icepick37

  • Admiral
  • *****
  • Posts: 1788
  • Go.
    • View Profile
Re: Tri-Tach station does not get new ships
« Reply #2 on: March 09, 2012, 09:26:06 AM »

I honestly haven't paid that much attention to the TT station. I will watch for it, though. Seems true at the moment.
Logged
“I [may] not agree with a word that you say, but I will defend to the death your right to say it”
- Voltaire

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Tri-Tach station does not get new ships
« Reply #3 on: March 09, 2012, 10:29:18 AM »

Ok, I think I found the bug while crawling through the java files.

"      addRandomShips(fleet.getCargo(), (int) (Math.random()));"

If this typecast works the way I think it does [(int) performs a floor function on the number being cast before it gets changed to an int]*, there is a 1 in 2^(number of bits in a float, forget how many that was) chance that it will return a "1" and not a "0"

Thus the script is basically telling it to add 0 ships 99.99999...% of the time.

*This is how its done in the languages I use anyways.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Tri-Tach station does not get new ships
« Reply #4 on: March 09, 2012, 10:41:06 AM »

Yeah, this has been fixed... it's actually always 0 :)

Changing it to (Math.random() * 2f) would make it do what was actually intended.
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Tri-Tach station does not get new ships
« Reply #5 on: March 09, 2012, 10:44:23 AM »

Yeah, I figured as much & was testing that out right now.

icepick37

  • Admiral
  • *****
  • Posts: 1788
  • Go.
    • View Profile
Re: Tri-Tach station does not get new ships
« Reply #6 on: March 09, 2012, 10:48:14 AM »

Yeah, this has been fixed... it's actually always 0 :)
Yeah I was going to say, haha.
Logged
“I [may] not agree with a word that you say, but I will defend to the death your right to say it”
- Voltaire

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Tri-Tach station does not get new ships
« Reply #7 on: March 09, 2012, 10:50:02 AM »

I also noticed they will never sell astral carriers, because they are not in the list. This intended or an oversight?

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile
Re: Tri-Tach station does not get new ships
« Reply #8 on: March 09, 2012, 10:58:33 AM »

I think that was intended, because the tritachs usually spawn with an astral in their battle fleets :)
Logged

icepick37

  • Admiral
  • *****
  • Posts: 1788
  • Go.
    • View Profile
Re: Tri-Tach station does not get new ships
« Reply #9 on: March 09, 2012, 11:05:28 AM »

Yeah I managed to capture one in my first real battle with them. Granted most people won't get so lucky.  :)
Logged
“I [may] not agree with a word that you say, but I will defend to the death your right to say it”
- Voltaire

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: Tri-Tach station does not get new ships
« Reply #10 on: March 09, 2012, 11:27:28 AM »

I have a bunch of paragons and odysseys, but I have yet to capture an astral this game... >.>

Upgradecap

  • Admiral
  • *****
  • Posts: 5422
  • CEO of the TimCORP
    • View Profile
Re: Tri-Tach station does not get new ships
« Reply #11 on: March 09, 2012, 11:41:38 AM »

Well, he said it was going to get harder to get ships.... :D
Logged