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 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?