"Inherent" planetary stealth

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Post Reply
Message
Author
User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

"Inherent" planetary stealth

#1 Post by MatGB »

Where is this defined? The stringtable has it as "TT_INHERENT" but I can't find that in species.txt, shared_macros (where there's a lot of confusing stealth stuff) or any of the other text files, and the (oh so very reliable) Windows Explorer Search doesn't find it either.

It's currently set at 0.010, which is pointless and annoying, I'd like to either remove it completely or set it to 5.0, as that would be consistent with the way I set all the ship values and I said I'd try to standardise them in time for 0.4.5.

If it's in the C++ code, can someone set it to 5 before Vezzra makes the next test build please? If it's in Default somewhere, where am I missing it?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: "Inherent" planetary stealth

#2 Post by vincele »

I found a few places where "stealth" and "0.01" are mentioned together...

Code: Select all

./universe/Building.cpp:        stealth->AddToCurrent(0.01f);
./universe/Planet.cpp:        stealth->AddToCurrent(0.01f);
./universe/System.cpp:        stealth->AddToCurrent(0.01f);
./default/techs.txt:            effects = SetStealth value = Value + 0.01
./default/fields.txt:    stealth = 0.01
And I may even have missed some...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: "Inherent" planetary stealth

#3 Post by MatGB »

Three of which are in the C+ code that I can't really change my end, the 4th I'd overlooked (thx) and the 5th is a definition that ought to be standardised with the rest but isn't what I'm looking for.

Basically, the Inherent value is hardcoded, so it needs to be changed so it's a macro or similar, thx.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: "Inherent" planetary stealth

#4 Post by Geoff the Medio »

I can remove inherent stealth increases when resetting meters, but then you'll have to make sure that every object, that should, has some always-active stealth-adding effects.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: "Inherent" planetary stealth

#5 Post by MatGB »

That's basically the plan, what I want to do is get either get rid of "Inherent +0.010" or have it set to "Inherent +5", the latter would be preferable to be honest, if everything starts with a base 5 stealth and gets modified it makes getting all the scripts line up a lot easier (I think), as I want everything to have a stealth value ending in 5, regardless of all bonuses (ergo bonuses always add whole decades) and all Detection stats/bonuses to end in 0, that means you never have any confusion as to whether something is or isn't detected and you don't need a tiny fraction added in order to deal with any conflicts.

Of course, tracking down what bonuses apply where and when stuff like

Code: Select all

PLUS_PLUS_STEALTH
'''[[PLUS_STEALTH]] + [[PLUS_STEALTH]]'''
is used (let alone why) is a different task entirely, but at least that's completely in FOCS so I can understand it and, normally, find it.

In my current test game I've managed to give all non-orbital builds a fairly significant stealth bonus by putting a +5 in one place only, not quite sure why that's translated into +45 depending on planetary bonuses, but I'll work it out.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: "Inherent" planetary stealth

#6 Post by Geoff the Medio »

MatGB wrote:That's basically the plan, what I want to do is get either get rid of "Inherent +0.010" or have it set to "Inherent +5", the latter would be preferable to be honest...
If the inherent amount isn't nearly 0, I'd rather it not exist at all. 5 is an arbitrary number that raises undesirable, to me, questions about its value.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: "Inherent" planetary stealth

#7 Post by MatGB »

Fine by me, I can put it into a script to have it setup properly, and it's almost certainly better to have all numbers user-editable if at all possible.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: "Inherent" planetary stealth

#8 Post by Bigjoe5 »

Aren't 0-stealth objects still visible to the entire galaxy?
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: "Inherent" planetary stealth

#9 Post by Geoff the Medio »

Bigjoe5 wrote:Aren't 0-stealth objects still visible to the entire galaxy?
(Edited answer...)

No. In GetEmpiresPositionsPotentiallyDetectableObjects it appears that if stealth is 0, then the requirement that the empire's detection strength be equal or greater than the stealth is skipped. Detection range requirements always apply though, I think...

Post Reply