Planetary stealth specials

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

Moderators: Oberlus, Committer

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

Planetary stealth specials

#1 Post by MatGB »

OK, I'm working on a patch as discussed. And something's weird.

Currently in trunk, we have the space cloud/void monster thing that wanders around adding stealth specials to planets, the reason for this is so that it isn't obvious that an empire is researching the techs. When an empire researches the next stealth tech the cloud replaces itself with the next one up and starts adding that special as well.

I thought I'd change that, mix it up a bit, so that while I sorted the numbers out on the stealth specials, in addition to that the clouds would replace themselves when empires go up in detection techs, so that there's always a few planets out of reach until either you kill off the clouds or get Omni Scanner. This is partially because the AI doesn't tend to research the stealth techs and partially as, I think, it might be better to have some places out of reach on occasions regardless.

However, I've done this just for testing purposes, on my machine, I'm not sold it needs doing permanently yet, this isn't a solid proposal it's, well, either I've found a bug or I'm completely misunderstanding an area of code.

Here's the important part of the cloud ship part that does the work

Code: Select all

Part
    name = "SP_CLOUD"
    description = "SP_CLOUD"
    class = General
    mountableSlotTypes = Internal
    buildcost = 1
    buildtime = 1
    location = All
    effectsgroups = [
        EffectsGroup
            scope = NumberOf number = 1 condition = And [
                Planet
                InSystem id = Source.SystemID
                Not Planet type = [Asteroids GasGiant Barren Desert]
            ]
            activation = And [
                            Random probability = 0.15
                            InSystem
            ]
            effects = AddSpecial name = "CLOUD_COVER_MASTER_SPECIAL"

        EffectsGroup
            scope = Source
            activation = Number low = 1 condition = OwnerHasTech name = "SPY_DETECT_2"
            effects = [
                CreateShip designname = "SM_ASH" empire = Source.Owner
                Destroy
            ]
(the last bit repeats to create void or dimensional rift monsters in the right circumstances)

The only bit I've changed is triggering it off SPY_DETECT instead SPY_STEALTH.

However, and I'm sure I've confirmed this through testing, when I go up in tech in Detection, the higher level special is not only being added to new planets, it's also upgrading the specials on all the existing planets with them. and I can't see anything in the code that should be doing this.

I definitely don't want this to be happening. I suspect it was also happening before I made the changes (ie I remember thinking it was odd) but it didn't matter then (but needs to stop if so). There's nothing in the relevent code for the specials themselves that should be triggering this.

So, either I'm missing something in one of the many files that mess around with stealth, especially the planetary specials themselves, or there's a bug. Can someone either point me at what I'm missing or see if it could be a bug?
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Planetary stealth specials

#2 Post by Dilvish »

MatGB wrote: Can someone either point me at what I'm missing or see if it could be a bug?
I don't think it's a bug. The Cloud Monster and its upgraded versions all act the same basic way-- it roams around with a 15% chance of adding its level of stealth special to planets, and if it finds any planets with the lower level of stealth special then it always upgrades the stealth special on that planet to the monsters particular stealth special. The behavior you're describing sounds consistent with that and I think it's as intended.

The trigger you modified is what upgrades the Monster to its next higher level. If on any turn there is any object owned by an empire having the particular gating tech (the various levels of stealth tech in the original, or detection tech in your mod), then the monster upgrades itself to the next level.

It sounds to me like what you want is that the monsters wouldn't necessarily always upgrade an existing lower level stealth special that they find. Simply adding a "Random probability = 0.xx" line to that EffectsGroup might cover that ok. Then you'd wind up with some planets having multiple levels of the stealth special which the current scripting clearly avoided, but I'm not sure that's a problem; if it was it's easy enough to add some more clauses to prevent that.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Planetary stealth specials

#3 Post by MatGB »

Sorry, not being clear obviously. The turn after I research the tech, every single planet that's been granted the stealth special by the cloud upgrades to Ash, when I get the next tech all the ash planets go up to Dim Rift.

It's not that the cloud goes up, that's intended, expected, wanted. It's that every single planet previously given the special goes up the exact same turn. That basically gives you one turn between researching the tech and them being, once again, out of reach, which is definitely not what's wanted at all.

If it were just the newly affected planets by the cloud, that'd be cool/. But it's not, it's every planet previously affected.
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Planetary stealth specials

#4 Post by Dilvish »

MatGB wrote:It's not that the cloud goes up, that's intended, expected, wanted. It's that every single planet previously given the special goes up the exact same turn. That basically gives you one turn between researching the tech and them being, once again, out of reach, which is definitely not what's wanted at all.
I suspect the issue is that one of the other empires beat you to the detection tech, causing the monster to upgrade and thereby upgrade the specials, but you just couldn't see that the specials had upgraded until your own detection tech had advanced. That often frustrates me, I think I'm about to get a detection tech that will let me colonize some stealthed planet, but the moment I get the detection tech I see that the planet has the next stage of stealth special and is still stealthed to me. To check that out you could add a sitrep to the cloud/ash/etc parts so that when the monster upgrades itself it announces it to all (not to keep that in the script, but just to check this out).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Planetary stealth specials

#5 Post by MatGB »

No, I checked that, there was one Behemoth near the planets that upgraded all at once, but planets in 5 different systems upgraded at the same time, with only one cloud nearby.

That's what I can't understand. I'm waiting for a better example to reload autosave and Super Tester at that point to see the full situation but I'm not on that machine.
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Planetary stealth specials

#6 Post by Dilvish »

MatGB wrote:No, I checked that, there was one Behemoth near the planets that upgraded all at once, but planets in 5 different systems upgraded at the same time, with only one cloud nearby.
I'm not sure just what you're meaning you checked here. It seems to me that the location of the cloud at the time your detection upgraded just doesn't really matter at all-- the upgrades to the planet specials could have taken place long before that, but you just couldn't see it. That's how it appears to me to operate in the current standard code. Has it not seemed that way to you? Though I'm now wondering why the monster would have already upgraded by the time I often encounter that, since it's normally gated by stealth techs and the AIs research stealth rather late as do I usually.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Planetary stealth specials

#7 Post by MatGB »

If it had done the upgrade earlier, then it would have displayed as merely "stealth exceeds" up until the point it didn't. It was instead displaying the lower level special (Ash, in this case) until I researched the tech, the next turn all of them lost the Ash special and gained the Dimensional Rift special, on the same turn. that's why I'm convinced something weird is happening but I can't figure out what.

It's my understanding (and this might be wrong) that if a planet has a special that's removed then it will no longer display if there's a ship in orbit, even if the ship can't see the planet properly. If that's wrong, then that might be a partial explanation but if so then the 0.15% chance of it happening happened to a large number of planets in a Low planet area, so I don't think that's it (unless the RNG is hinky for that one as well, and I thought we'd fixed that)
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: Planetary stealth specials

#8 Post by Bigjoe5 »

Look at the effects for SP_ASH and SP_DIM - these ship parts have effects groups like the following:

Code: Select all

Part
    name = "SP_ASH"
    ...
        EffectsGroup
            scope = HasSpecial "CLOUD_COVER_MASTER_SPECIAL"
            activation = Source
            effects = [
                RemoveSpecial "CLOUD_COVER_MASTER_SPECIAL"
                AddSpecial "VOLCANIC_ASH_MASTER_SPECIAL"
            ]
This intentionally upgrades all the lower-level specials added by stealth monsters to the level of the current stealth-monster. Note that there is no location condition, so this will act on every planet in the galaxy with the correct special.

If you want to get rid of this behaviour and leave previously stealthed planets with the lower level of stealth special when the monster levels up, just remove those effects groups.

Also, I believe that if a higher level of stealth special was there, as Dilvish suspected, the higher-level special would actually be visible to the player, because the slave-specials have 0 stealth themselves, so even if the planet is stealthy, you can still see that it has volcanic ash, for example.
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
Sloth
Content Scripter
Posts: 685
Joined: Sat Mar 17, 2007 12:28 am

Re: Planetary stealth specials

#9 Post by Sloth »

Bigjoe5 wrote:If you want to get rid of this behaviour and leave previously stealthed planets with the lower level of stealth special when the monster levels up, just remove those effects groups.
I would be in favor of a mixed approach:

When the monster levels up, some of the previously generated specials "level up" and some do not.
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.

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

Re: Planetary stealth specials

#10 Post by MatGB »

Bigjoe5 wrote: This intentionally upgrades all the lower-level specials added by stealth monsters to the level of the current stealth-monster. Note that there is no location condition, so this will act on every planet in the galaxy with the correct special.
AHA! Thank you, that explains it. I can work with that.
If you want to get rid of this behaviour and leave previously stealthed planets with the lower level of stealth special when the monster levels up, just remove those effects groups.
Or add a location condition, that'd work.

I can at least now ponder what I want to test and how I think it should work, probably actually going to revert it to keying off the stealth techs but it's sorta fun to have different patches.
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Planetary stealth specials

#11 Post by Dilvish »

MatGB wrote:Or add a location condition, that'd work.
I think part of the purpose of the auto upgrade was to ensure you didn't wind up with multiple different specials on the same planet, although that could be more specifically handled. Unless you change some other part of the mechanics, though, it seems to me though that not doing the auto upgrade would interfere with the purpose of masking whether or not stealthed planets are necessarily owned by an empire, because at the moment you pierced cloud/ash/whatever then if there are still several planets in detection range but still stealthed to you, you could reasonably assume that they were owned (or possibly furthest/sentinon). That assumption would be true for all but one of those initial systems.

Instead, if you want to implement an additional purpose of making sure that there are always at least a few stealthed planets until you top out detection, then in addition to your current changes I'd recommend simply adding an extra clause to the cloud/ash/dim parts so that they also have a small chance (maybe 5%) of adding the next tier up of stealth special to the planets insystem with them.

I'm not sure I'm crazy about this idea of ensuring there are always stealthed planets until you top out detection, though...
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Planetary stealth specials

#12 Post by Bigjoe5 »

Dilvish wrote:I think part of the purpose of the auto upgrade was to ensure you didn't wind up with multiple different specials on the same planet, although that could be more specifically handled.
This is already handled in the definitions of the specials. They remove any previous stealth specials on the planet.
Dilvish wrote:Unless you change some other part of the mechanics, though, it seems to me though that not doing the auto upgrade would interfere with the purpose of masking whether or not stealthed planets are necessarily owned by an empire, because at the moment you pierced cloud/ash/whatever then if there are still several planets in detection range but still stealthed to you, you could reasonably assume that they were owned (or possibly furthest/sentinon). That assumption would be true for all but one of those initial systems.
I agree with that, and I think that adding a random factor to the effect's scope (and having it only activated on the turn the monster is upgraded) would leave some of the uncertainty about which planets are owned by an enemy empire, while still allowing the detecting empire to narrow down the possibilities as the game progresses, putting a bit more pressure on an otherwise very difficult strategy to counter.

Of course, the second time a whole bunch of planets get a stealth boost, you know it's a real empire because only the first one could have been triggered by a monster upgrade... That's another problem that would be nice to solve.
Warning: Antarans in dimensional portal are closer than they appear.

User avatar
Vezzra
Release Manager, Design
Posts: 6102
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Planetary stealth specials

#13 Post by Vezzra »

Honestly, I wish there was a better way of doing this "stealth an empire" stuff. Suggestion: Differentiate between the stealth of a planet itself and the colony existing on its surface.

If the stealth of the planet itself defeats your detection strength, you just don't see the planet at all (at least from the distance, what happens if you have a detector in the same system might need discussion). This however should be the extraordinary, exotic case (hiding an entire planet completely from sensors should require some very advanced technology, a special like the panopticum, etc.).

The "normal", common case should be the stealth of the colony (the stealth bonus/malus of species should apply here). If the stealth of the colony defeats your detection strength, you don't get scanlines (as it's the case now and unfortunately gives away that there must be someone on the planet), instead, you just see a normal, apparently uninhabited planet. What happens when someone tries to colonize such a planet might need discussion.

I'd very much prefer that kind of approach over the current have monsters cover entire regions of space in volcanic ash so that a having a bunch of planets covered in volcanic ash doesn't look immediately suspicious thing. Of course, that can't be accomplished by content scripts, this will need changes to the C++ code.

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

Re: Planetary stealth specials

#14 Post by Bigjoe5 »

Vezzra wrote:Honestly, I wish there was a better way of doing this "stealth an empire" stuff. Suggestion: Differentiate between the stealth of a planet itself and the colony existing on its surface.

If the stealth of the planet itself defeats your detection strength, you just don't see the planet at all (at least from the distance, what happens if you have a detector in the same system might need discussion). This however should be the extraordinary, exotic case (hiding an entire planet completely from sensors should require some very advanced technology, a special like the panopticum, etc.).

The "normal", common case should be the stealth of the colony (the stealth bonus/malus of species should apply here). If the stealth of the colony defeats your detection strength, you don't get scanlines (as it's the case now and unfortunately gives away that there must be someone on the planet), instead, you just see a normal, apparently uninhabited planet. What happens when someone tries to colonize such a planet might need discussion.

I'd very much prefer that kind of approach over the current have monsters cover entire regions of space in volcanic ash so that a having a bunch of planets covered in volcanic ash doesn't look immediately suspicious thing. Of course, that can't be accomplished by content scripts, this will need changes to the C++ code.
Where's the "like" button?
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Planetary stealth specials

#15 Post by MatGB »

I intensely dislike the current system where you need to get a ship into a specific system to see a stealthed planet, especially in the early game, it's far too much micromanagement for my memory to handle, I can never remember where I've sent them all.

But I like the scanline system, it's the only way I can think of to explain to a player what's going on, it should stop colonising and invasions by obscuring the planet.

I've never been a fan of the specials, nor of the clouds, but they're the way things work and most of my effort is always to make the ways things are scripted work properly in a balanced manner, if we want to rethink it completely I'm very happy to do so.

But I like the strength/distance system we currently have, it can be scripted in away that works in a lot more subtlety if we want it to and it's a vast improvement on the system I vaguely recall from when we started.

My current efforts (stalled and sidelined again) are to expand and tweak stealth in various ways as it's currently a sub optimal strategy, frankly the specials are getting in the way, if we want to dump them entirely and simply give bonuses to the species stats themselves I'd be very happy.
Mat Bowles

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

Post Reply