Condition matching comsats
Moderators: Oberlus, Committer
Condition matching comsats
For the targetting preference I'm looking for a good FOCS condition to (not) match comsats.
Any Ideas?
Any Ideas?
Last edited by Ophiuchus on Fri Aug 31, 2018 7:28 am, edited 1 time in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Condition matching comsats
Define "comsats"...
-Has design name "SD_BASE_DECOY"?
-Has hull "SH_COLONY_BASE" and no parts?
-Has any hull and no parts?
-Maybe needs to have an owner (not be monster / independent)?
-Has design name "SD_BASE_DECOY"?
-Has hull "SH_COLONY_BASE" and no parts?
-Has any hull and no parts?
-Maybe needs to have an owner (not be monster / independent)?
Re: Condition matching comsats
The idea is to make SH_COLONY_BASE mostly useless as cannon fodder.
Probably SH_COLONY_BASE and no parts would do. But dont know how to script that.
I dont think that owner matters.
Probably SH_COLONY_BASE and no parts would do. But dont know how to script that.
I dont think that owner matters.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Condition matching comsats
Just that specific hull, or are there other similar ones that could be used instead if it was an overly specific condition?
Just checking the hull should be relatively simple... something likeProbably SH_COLONY_BASE and no parts would do. But dont know how to script that.
Code: Select all
DesignHasHull name = "SH_COLONY_BASE"
Code: Select all
PartsInShipDesign design = LocalCandidate.DesignID
Code: Select all
(PartsInShipDesign design = LocalCandidate.DesignID < 1)
Re: Condition matching comsats
Probably only that hull. The problem is that its so cheap to build that its offsets the balance against military ships. But we cant make it more expensive because of the roles it fullfills (mainly troop drops, also outpost/colony base). I am not aware of other hulls having this problem.Geoff the Medio wrote: ↑Wed Aug 29, 2018 9:30 amJust that specific hull, or are there other similar ones that could be used instead if it was an overly specific condition?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Condition matching comsats
What about forbid to build hulls without parts and make a "communicator" part for Comsat?Ophiuchus wrote: ↑Wed Aug 29, 2018 10:45 amProbably only that hull. The problem is that its so cheap to build that its offsets the balance against military ships. But we cant make it more expensive because of the roles it fullfills (mainly troop drops, also outpost/colony base). I am not aware of other hulls having this problem.Geoff the Medio wrote: ↑Wed Aug 29, 2018 9:30 amJust that specific hull, or are there other similar ones that could be used instead if it was an overly specific condition?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Condition matching comsats
I am pretty sure we can make it more expensive still, my strong recollection was that the current cost of 3 was considered an intermediate point to try. The colony base hull could still work just fine for outpost bases and colony bases if it were a bit more expensive than now, and I'm not sure we necessarily need to preserve its use for troop drops, not if it's still causing a significant problem for combat ship balance.Ophiuchus wrote: ↑Wed Aug 29, 2018 10:45 am Probably only that hull. The problem is that its so cheap to build that its offsets the balance against military ships. But we cant make it more expensive because of the roles it fullfills (mainly troop drops, also outpost/colony base). I am not aware of other hulls having this problem.
I think we could probably increase its cost to 4 without needing to adjust the AI troop drop code, though I should probably look that over a bit more, and then we'd need to pay attention to how it actually worked out.
Keep in mind we also have the compressed energy hull with base cost 5, and small asteroid hull with base cost 6, so for whatever situation you have in mind when you say "I am not aware of other hulls having this problem," might simply shift over to those other hulls if not addressed in a way that includes them.
It sounds pretty clearly like you are thinking the cost increase to three has been insufficient, why don't you make a feedback thread on that issue and clarify just where you are seeing recurring problems.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Condition matching comsats
While it doesn't only affect decoy ships, a more robust approach could be to check if the ship is armed/has fighters... A fuel pod costs 1 PP and would circumvent the no-part approach.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: Condition matching comsats
Thanks, that reminded me looking at the actual costs
Code: Select all
grep -r 'buildcost.*' default/scripting/ship_* | sed -e 's|[^/]*/||g' | awk '{printf "%-3s %-50s %s %s %-4s %s %s %s \n", $4,$1,$2,$3,$4,$5,$6,$7}' | sort -n
Code: Select all
$ grep -ri "class =" default/scripting/ship_parts/ | awk '{print $4}' | sort | uniq
Armour
Bombard
Colony
Detection
FighterBay
FighterHangar
Fuel
General
Industry
Research
Shield
ShortRange
Speed
Stealth
Trade
Troops
Last edited by Ophiuchus on Thu Aug 30, 2018 10:30 am, edited 1 time in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Condition matching comsats
Not really. It's just a feeling left from the discussion and analysis before that. Didnt have time to thoroughly playtest, so I am not sure how much this still is a problem.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Condition matching comsats
What objects are actually matched by the "Armed" condition?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Condition matching comsats
Following the chain of code bits:
https://github.com/freeorion/freeorion/ ... .cpp#L1797
https://github.com/freeorion/freeorion/ ... p.cpp#L247
https://github.com/freeorion/freeorion/ ... ign.h#L530
https://github.com/freeorion/freeorion/ ... .cpp#L1309
It should match ships whose design has direct weapon parts or fighter bay or hangar parts.
Re: Condition matching comsats
@geoffthemedio Thanks for the fast help!
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!