Proposal to changed the Armed Condition

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Proposal to changed the Armed Condition

#1 Post by Dilvish »

When IsArmed and HasFighters were separated as game concepts and coding constructs, the only related FOCS Condition (Armed) was left as-is, being true if either IsArmed or HasFighters is true. I can totally understand that as an interim step in the splitting of concepts, but as noted in Issue 1327 I think we should complete the split.

As a little update to my suggestion in that Issue, I think that the 'Armed' condition and all its current uses in FOCS scripts should be changed over to a new name, like 'CanAttack' or somesuch, and then we add the IsArmed and HasFighters conditions. There would still be a little bit of potential confusion since CanAttack would still not include being able to bombard, but I can't think of any good name that would well encompass Direct Fire weapons and having Fighters but clearly exclude bombardment.

Of course, it is an option to just leave it as it is, so I am hoping we can reach a consensus here.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: Proposal to changed the Armed Condition

#2 Post by dbenage-cx »

Maybe optionally constrain by a UniverseObjectType, with omission of the type meaning at least one.
e.g. CanAttack type = Ship
Then if you want to know if a ship might be effective in lowering a planets defenses: CanAttack type = Planet
Bombardment might be PopulationCenter or Building, depending on the intent.

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

Re: Proposal to changed the Armed Condition

#3 Post by Vezzra »

Dilvish wrote:I think that the 'Armed' condition and all its current uses in FOCS scripts should be changed over to a new name, like 'CanAttack' or somesuch, and then we add the IsArmed and HasFighters conditions.
That sounds like a reasonable approach.

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Proposal to changed the Armed Condition

#4 Post by LGM-Doyle »

dbenage-cx's approach is more future proof. If we add new types of universe objects or weapons type, then only that derived type needs to add any code to handle what it can/can't attack. All other code that asks CanAttack() just works.

Bombard has the other problem of requiring having to select it every turn to keep bombarding. (This might have been fixed since I tried it?)
That discrepancy suggests changing bombard to just a weapon that can only attack planets. Then bombarding happens automatically if you have an aggressive fleet orbiting an enemy planet and CanAttack(Planet) has an unambiguous meaning.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Proposal to changed the Armed Condition

#5 Post by Dilvish »

LGM-Doyle wrote:Then bombarding happens automatically if you have an aggressive fleet orbiting an enemy planet and CanAttack(Planet) has an unambiguous meaning.
I like both dbenage-cx's idea and the idea of being able to turn bombardment on or off via the aggression toggle. Re bombardment, I don't think we would necessarily want to bombard any/all valid targets in a system, though, and so it seems it would be best to still be able to optionally select a particular target like is required now (and in the absence of a specific target selection it would be a random selection if there were multiple valid targets).
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: Proposal to changed the Armed Condition

#6 Post by MatGB »

LGM-Doyle wrote: That discrepancy suggests changing bombard to just a weapon that can only attack planets. Then bombarding happens automatically if you have an aggressive fleet orbiting an enemy planet and CanAttack(Planet) has an unambiguous meaning.
That's how it used to work and was deliberately changed, you can still script an auto effect (they're auto for monsters), but it was changed away in part deliberately because you don't always want to bombard: wanting to reduce a population is one thing, but eliminating entirely is another, especially if you do it accidentally/unknowingly because you left your Great Krakens in orbit for one turn too many before the Troops arrived.

I like the idea of bombarding being optional, and want/plan to do more to it as/when the bombard UI is fixed/improved: there was also talk of a 'bombard system' UI to allow for things like the Nova Bomb to be used (because, seriously, who uses it currently?)
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