Page 1 of 1

Armed, Dangerous, Military, Weaponized

Posted: Sat Jan 12, 2019 8:35 pm
by Ophiuchus
Started here Stealth Carriers Over-Powered?
Vezzra wrote: Sat Jan 12, 2019 7:48 pmThe "Blocking" condition you mention however is something that tells what a ship is/has been doing.
The main question is which information we need in FOCS. If there are effects that depend on the information that there are enemies which could block. E.g. if you tried to break a blockade, it would be good to target enemy ships which would be able to block.
Vezzra wrote: Sat Jan 12, 2019 7:48 pm
ensure empty carriers do not block enemies (even if they get resupplied) directly in the code which checks for blockade
So, if a carriers fighter wing gets depleted in a combat, but the carrier survives, is within supply, will get its fighter wing reinforced and can resume combat the next turn, it still shouldn't be able to keep up a blockade, do I understand correctly? While I have a slight preference for the other option (consider a carrier in that case as being able to keep up/continue the blockade), because it seems a bit easier and simpler to me, we certainly can take that road.
The reason i prefer this option is that the other option actually makes untouchable stealth bombers perfect blockers.
Vezzra wrote: Sat Jan 12, 2019 7:48 pmensure also resupplied carriers are considered dangerous
This I do not understand, what purpose should that serve? That sounds like an assessment the AI needs to make of course, but not something we need to keep track of by means of ship classification or conditions like "Armed".[/quote]
In targeting, the default should be attacking "Dangerous" ships, which includes carriers with fighters and weapons. It does not include empty carriers.
Vezzra wrote: Sat Jan 12, 2019 7:48 pmAs far as the question if the classification of ships/determination of conditions like "Armed" should happen in FOCS or the backend C++ code I'm probably not the first person to ask. Personally I think such basic/essential classifications/conditions should be determined by the engine and not rely on FOCS, but here I'd like to hear the input of the other devs - Geoff, Dilvish
What should go in FOCS or the backend is a very good question.
As far as i got it Geoff wants to move more stuff into FOCS in the context of the targeting PR (or at least specify it using conditions).

Re: Armed, Dangerous, Military, Weaponized

Posted: Sun Jan 13, 2019 8:54 pm
by Ophiuchus
Current uses of Armed condition in FOCS:
  • species/weapons.macros - gating the activation for SR_* and FT_HANGAR_* effects; probably as a performance measure.
  • scripting/empire_statistics/ARMED_MONSTER_COUNT.focs.txt - counting "Armed" monsters
  • scripting/empire_statistics/BATTLESHIP_COUNT.focs.txt - counting "Armed" ships
  • scripting/ship_parts/General/SP_KRILL_SPAWNER.focs.txt - extra stealth for "Not Armed" ships (???)
  • scripting/monster_fleets.inf - prevents drone and drone factory generation
Uses of isArmed seems to expect that isArmed does not include fighters. E.g. python/AI/CombatRatingsAI.py - if design and (ship.isArmed or ship.hasFighter) - __get_stats_from_ship - .. and others files (fleet.hasArmedShips or fleet.hasFighterShips / design.isArmed or design.hasFighter),

Re: Armed, Dangerous, Military, Weaponized

Posted: Sun Jan 20, 2019 2:33 pm
by Vezzra
Ophiuchus wrote: Sat Jan 12, 2019 8:35 pmThe main question is which information we need in FOCS. If there are effects that depend on the information that there are enemies which could block. E.g. if you tried to break a blockade, it would be good to target enemy ships which would be able to block.
Sure. I just would keep those conditions "semantically" separate, as they deal with two different things.
The reason i prefer this option is that the other option actually makes untouchable stealth bombers perfect blockers.
Which is only an issue because currently one lonely ship can stop an entire armada of hundreds of ships from getting past it until it's killed. Which is something we obviously plan to fix. However, I agree, until that's fixed, it's probably better to not allow a carrier which just lost all fighters to be able to keep up a blockade.
In targeting, the default should be attacking "Dangerous" ships, which includes carriers with fighters and weapons. It does not include empty carriers.
For enhanced targetting mechanics yes, that distinction is probably important. Carriers which can't resupply their fighter force certainly should be a much lower priority target than carriers which can immediately resupply.

Re: Armed, Dangerous, Military, Weaponized

Posted: Sun Jan 20, 2019 8:36 pm
by Geoff the Medio
Ophiuchus wrote: Sat Jan 12, 2019 8:35 pmAs far as i got it Geoff wants to move more stuff into FOCS in the context of the targeting PR (or at least specify it using conditions).
Pretty much. In the Condition Combat Targetting Branch, the targets a weapon can shoot at are specified by conditions scripted into the part definition. This include visibility tests, type of object (planet/ship/fighter), minimum meter values (ie. for planets, could be extended to ships). It pretty much works now in my tests, other than a few quirks like thing being announce destroyed multiple times in the combat log.

Future applications could include special weapons that can target stealthy stuff, prioritization using a sort condition, variations on standard part rules to target different things than the default target types (eg. bomber fighters that can target planets).

Re: Armed, Dangerous, Military, Weaponized

Posted: Sun Jan 20, 2019 10:46 pm
by Morlic
Ophiuchus wrote: Sun Jan 13, 2019 8:54 pm Uses of isArmed seems to expect that isArmed does not include fighters. E.g. python/AI/CombatRatingsAI.py - if design and (ship.isArmed or ship.hasFighter) - __get_stats_from_ship - .. and others files (fleet.hasArmedShips or fleet.hasFighterShips / design.isArmed or design.hasFighter),
https://github.com/freeorion/freeorion/issues/1327