Planet Stealth integer overflow bug

For topics that do not fit in another sub-forum.

Moderator: Oberlus

Message
Author
faiuwle
Krill Swarm
Posts: 14
Joined: Fri Sep 11, 2015 11:19 pm

Planet Stealth integer overflow bug

#1 Post by faiuwle »

I recently remembered this game exists and started up a game on the easiest difficulty to remember how things worked and to see if I could actually get the tech victory in relative peace. I've discovered a planet that must belong to an AI empire, because it's in the middle of their supply lines, has a name starting with "Monastery" in italics and underlined, has many ships of that empire near it, has visible buildings on it, etc. but it won't register as that empire's planet because "Planet is obscured from sensors. This planet has never been thoroughly scanned by your empire. Latest known stealth (65536.000000) exceeds Detection Strength (30.000000)." Since that number is near the max unsigned short int, I guess they are experiencing some stealth debuff that tried to reduce stealth below zero, and it wrapped around?

Also, can someone remind me, is there a way to toggle off other empires' supply lines? Mine now overlap with several peaceful empires and I'd like to know how far they actually extend so I know where I can continue exploring.

BlueAward
Small Juggernaut
Posts: 742
Joined: Mon Aug 08, 2022 3:15 am

Re: Planet Stealth integer overflow bug

#2 Post by BlueAward »

Not a bug, but I can see how it can be confusing. It means that for one reason or another you know a planet is there, but never actually seen it, so don't know what's its actual stealth level is - only know your detection is below the threshold. So the level shows as "big value", max unsigned two bytes in this case

An example of how it may happen is when you see orbital structures (like shipyards) which puts the planet on your radar generally, at very basic visibility level, but you don't actually see the planet itself because its stealth level is higher (perhaps it has natives or stealth specials that put planetary stealth above your detection). Yes, some buildings stealth is separate to planet's stealth (orbital buildings)

Hm I don't think there's a way to turn off other empires' supply lines. If your lines don't go somewhere, it means you DO NOT have the supply there. It might change if you put some military here and there to win over the supply, but "theoretical" supply range and "actual" supply are different things and the game only shows the latter

User avatar
Atreides
Space Kraken
Posts: 174
Joined: Sat Jun 24, 2023 1:46 am
Location: 40 Eridani

Re: Planet Stealth integer overflow bug

#3 Post by Atreides »

Heh, yeah problem is all us old gamers remember games where overflows were almost standard so when we see that hated 65535 we panic! I believe I also tried to report this as a bug when I started out playing.

Maybe it could be changed to 60,000 just so that it stops alarming new players who remember those days...

faiuwle
Krill Swarm
Posts: 14
Joined: Fri Sep 11, 2015 11:19 pm

Re: Planet Stealth integer overflow bug

#4 Post by faiuwle »

You're right, I got the neutron scanner and now it is visible. I guess if I never scanned it in the first place "last known stealth" would be nothing. But it might make more sense to say "last known stealth was unknown" or something. The planet doesn't have any specials. The species has +40 planetary stealth, but I'm slightly confused, since there's another empire in the game with the same species, and I was able to see their planets just fine.

Another question: what is the Species InterDesign Academy meant to do? I built several of them on research-focused planets, and what seems to be happening is that all of these planets get a +4 increase in research output per turn, regardless of what the research target actually is. Some of them now have a research output over double the target, and the bonus doesn't seem to stop getting applied. The pedia just says it gives a one-time +5 bonus.

BlueAward
Small Juggernaut
Posts: 742
Joined: Mon Aug 08, 2022 3:15 am

Re: Planet Stealth integer overflow bug

#5 Post by BlueAward »

Pedia says:
Increases the imperial stockpile use limit by increasing the stockpile use capacity on this planet by 10.0 when it has Stockpile Distribution Focus, Target Research by 5.00 when it has Research Focus, or Target Influence by 2.00 when it has Influence Focus
The research bonus requires a stability of 12.0.
So it is not one time +5 research? It is +5 to Target Research. Current Research tends towards Target Research each turn by a step that by default is +1 but can be changed through things like Colonial Bootstrapping (for new colonies) or by Force-Energy Structures, that increases the rate by +3 to +4, and I guess that's what you see, the rate of +4

nb. if you hover over planet's research icon, you get breakdown of target research constituents and there should be noted that SIDA gives you +5 there

Your total research per turn is sum of current research meters from all your objects in your empire (mostly planets, sometimes can be ships in meteor blizzard or under Exploration policy), and those current meters each turn tend towards their target, where they stop. Other meters in game (like production, influence etc) work similarly but can have different baseline rate, and different policies/techs that influence the growth rate (and target)

faiuwle
Krill Swarm
Posts: 14
Joined: Fri Sep 11, 2015 11:19 pm

Re: Planet Stealth integer overflow bug

#6 Post by faiuwle »

Well, that's not what it says for me. For me, it says "Increases stockpile extraction on its planet by 10, if that planet has stockpiling focus. Increases Research on its planet by 5, if that planet has research focus." I don't know if I have the latest version, it's whatever version was in synaptic. It's also not affecting the target research at all, there's no entry for it there. The actual research output is also not trending towards target research anymore, it's just increasing by 4 points at a time seemingly without limit. I don't have Force-Energy Structures yet. I've attached a picture of what it shows for me.
Attachments
research.png
research.png (57.69 KiB) Viewed 902 times

User avatar
Oberlus
Cosmic Dragon
Posts: 5839
Joined: Mon Apr 10, 2017 4:25 pm

Re: Planet Stealth integer overflow bug

#7 Post by Oberlus »

faiuwle wrote: Fri May 24, 2024 6:36 am I don't know if I have the latest version
Tell us what version it is. You have the number in the corner of the client window.

But if you got it from synaptic, yes, it's an old version.

BlueAward
Small Juggernaut
Posts: 742
Joined: Mon Aug 08, 2022 3:15 am

Re: Planet Stealth integer overflow bug

#8 Post by BlueAward »

Hmm so I guess the current state of pedia was indeed an attempt to clarify the behavior. I could only think of stability of your planet being 15 originally, so you could build the SIDA, but then falling below 12, so it doesn't actually work, which could happen if it was some capital you've conquered that originally was very high on stability, allowing you to build SIDA, but then severely falling down in stability with time under your rule. You could try sharing savegame, too

But otherwise from what you say it looks rather bugged, indeed (not stopping at target)

faiuwle
Krill Swarm
Posts: 14
Joined: Fri Sep 11, 2015 11:19 pm

Re: Planet Stealth integer overflow bug

#9 Post by faiuwle »

Looks like it is version 0.4.8. The pedia article on the SIDA doesn't mention stability, but happiness, but it doesn't give a specific number that it needs to be at. That screenshot is from my original homeworld/capital, it has a happiness of 35.

User avatar
Oberlus
Cosmic Dragon
Posts: 5839
Joined: Mon Apr 10, 2017 4:25 pm

Re: Planet Stealth integer overflow bug

#10 Post by Oberlus »

I strongly suggest you to download and install the latest version.

In Linux you will have to compile it, not a problem if you have a rather recent Linux version that supports the latest Python versions (i.e. Ubuntu 20.04 is too old).

Ophiuchus
Programmer
Posts: 3524
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Planet Stealth integer overflow bug

#11 Post by Ophiuchus »

faiuwle wrote: Fri May 24, 2024 9:27 am Looks like it is version 0.4.8. The pedia article on the SIDA doesn't mention stability, but happiness, but it doesn't give a specific number that it needs to be at. That screenshot is from my original homeworld/capital, it has a happiness of 35.
the thing it increases by 5 and is decreased by 1 (so thats 4)

yes, we rebranded happiness to stability in 0.5 (inbetween were major versions 0.4.9 and 0.4.10)

in 0.4.8 order to build you need happiness 15; 19 if the focus is set to the preferred focus. you should get the info in a mouse-over if you are not able to build it. No minimum happiness for getting the buff.

anyway it seems nobody used it in real game (introduced in 2a82de322e7e19b985442d82637670eb2094eedc, 2018-01-07) for months cause the code is clearly wrong; using SetResearch instead of SetTargetReseach.
probably only smoketest for one turn, where it (almost) does the correct thing.

this was fixed in 0.4.9 . Somewhen later the nerf to preferred focus was dropped, also minimum happiness/stability for getting the effects was introduced.

release notes.
  • I think 0.4.8 was the imperial stockpile release.
  • gameplay wise 0.4.9 added mostly combat targeting (for different fighter types) and fuel efficiency.
  • 0.4.10 added arc disruptors and slowed down explosive empire growth by cost adjustments; also stability started to matter for meter growth
  • 0.5 is a bigger step, the anti-exponential-empire-growth feature; it adds influence resource stockpile, policies to pick up, species stability depends a lot on those and other dis-/liked stuff, with too low stality rebels on planets appear and might make the planet go neutral; the number of owned planets increases influence cost; also note also the ship numbers were scaled up to make it possible to switch from 3 bouts to 4 bouts without changing balance much
  • 0.5+ (in-development) adds annexation of neutral and enemy planets by paying influence
Latest release 0.5 is available from apt in not-too-old debian or ubuntu (releases also exist as flatpak by some other guy; or as a snap by me). Current (in-development) version is available as a snap or as source code.

If you go the compile road, happy to have you on the trip.
Last edited by Ophiuchus on Fri May 24, 2024 10:48 am, edited 1 time in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

faiuwle
Krill Swarm
Posts: 14
Joined: Fri Sep 11, 2015 11:19 pm

Re: Planet Stealth integer overflow bug

#12 Post by faiuwle »

Thanks, those updates look really interesting. It's been a hot minute since I was on this partition and it looks like I am still running 20.04. I guess it's time to update, haha.

User avatar
Oberlus
Cosmic Dragon
Posts: 5839
Joined: Mon Apr 10, 2017 4:25 pm

Re: Planet Stealth integer overflow bug

#13 Post by Oberlus »

faiuwle wrote: Fri May 24, 2024 10:43 am Thanks, those updates look really interesting. It's been a hot minute since I was on this partition and it looks like I am still running 20.04. I guess it's time to update, haha.
No need to update!
I forgot there is also the snap, that Ophiuchus maintain.

User avatar
Atreides
Space Kraken
Posts: 174
Joined: Sat Jun 24, 2023 1:46 am
Location: 40 Eridani

Re: Planet Stealth integer overflow bug

#14 Post by Atreides »

Latest Debian 10 version is 0.4 or so
Latest Flatpak is 0.5
Latest Snap is 0.5.0.1 (or something like that) - I have this currently although I prefer flatpak in general

faiuwle
Krill Swarm
Posts: 14
Joined: Fri Sep 11, 2015 11:19 pm

Re: Planet Stealth integer overflow bug

#15 Post by faiuwle »

Thanks, I was able to get the latest snap version working, no problem!

Post Reply