As a first note, I think Geoff indicated that although the bombardment may not currently always cancel after one turn, it is supposed to and will be followed up on, the script should probably assume it is only for one turn per order.
StGW44 wrote:Here is what I have been put together....
Regarding this first piece, as an efficiency note I would suggest you consider
Code: Select all
InSystem Source.SystemID
VisibleToEmpire Source.Owner
OwnedBy EnemyOf Source.Owner
to be already covered by
Code: Select all
OrderedBombardedBy condition = Source
As for the main problem with the "EffectsGroup // here the ship part needs to get deactivated" Effectsgroup (besides being commented out), the InSystem and VisibleToEmpire portions are pointless -- remember the activation clause is a condition applied to the Source. The "OwnedBy EnemyOf Source.Owner" clause is a self-contradiction here that would cause any activation clause to fail, and the line
Code: Select all
OrderedBombardedBy condition = Source
should instead be
Code: Select all
Number low = 1 condition = OrderedBombardedBy condition = Source
For more info on Number and NumberOf
see here. I also think that the "SetTargetStructure Value / 2" clause currently part of the "LSB_INACTIVE" special should instead be one of the effects of this same EffectsGroup, because by the time the LSB_INACTIVE special is applied and processed as a special it will be the next turn and the ship is expected to be no longer bombarding the target planet. It looks to me that the LSB_INACTIVE special itself needs no EffectsGroups at all, it's merely a marker referenced by your main part script.
Regarding the DEPOP_PLANET special, it looks to me like the scope should just be "Source", the current scope is pointless; the SetOwner clause should use "-1" for the empireID to make something unowned (see, e.g., Psych_Dom). The LSB_DEACTIVATE special should be entirely unneeded.
See if that clears things up.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0