-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI: isSea units are not considered for "Sea Defense" if they're also subs #11740
Comments
Which units do expect to show up as "sea defense options"? In the log, I see:
These are all |
But the sea units are not all isSub, (you can confirm as you have the xml) but maybe thats the real problem. using canNotTarget makes all sea units isSub :-/ Im quessing. Only HQ-Submarine, Submarine & Submarine-Adv are isSub Destroyer xml is below with no isSub
Run it under 2.5 and it works as intended. EDIT Just checked, it does the same under 2.5 as 2.6 |
Just checked, 2.5 also does the same as 2.6 |
Removing the line |
So I expect the following or very similar |
For reference in 2.5 and not using canNotTarget This extract is taken from the AI log from the 1941 CD map with the canNotTarget removed from the Sea units. |
@asvitkine The work around is ugly and uses triggers to try and compensate for the lack of AI purchasing. |
@TheDog-GH it's a very simple change, so I've sent the PR: #11812 I also confirmed on your map that the units get listed in Sea Defense Options and that AI sometimes builds them (I only saw destroyers). The only thing I'm worried about is if it results in some bad AI behavior on more normal WWII triplea maps - i.e. if AI starts buying more subs as defense units when it shouldn't be. Would be good if someone can test it once the change is in. |
@asvitkine America 1st turn FastAI using map = WW2v5_1942_2nd_Edition_High_Production_Mod.xml TripleA-2.6+14439 TripleA-2.5.22294 Observations: 2.6 Sea Defense Options includes submarine and 2.5 does not . TripleA-2.6+14439 TripleA-2.5.22294 Observations: On our map the same issue was there in 2.5 Sea Defense Options (no : is blank) An aside testing our map with your TripleA code, the AI buys lots of sea units and gives a much better account of itself at sea. So much so its worthy of lots of xml sea code removal as I was trying to make up for the AI not buying sea units and releasing a new version. Thanks again! Black Elk will also post later with his thoughts. |
I confirm that "isSub" in the AI logs is actually based on |
I ran a few quick test games in v3 v5 and Iron War using that build TripleA_2.6+14439 to see if anything jumped out at me, but the AI purchasing behavior seemed pretty decent. I'll try a few other maps when I get a chance. In 1941 command decision the AI purchasing seems much improved in my game so far. Thanks so much! Whatever you guys did, it's humming now :) |
In this map 1941 Global Command Decision
The use of
<option name="**canNotTarget**" value="$All-Air$"/>
in isSea units blocks/ignores the purchase of Sea Units checking the HardAI logs for;
Sea Defense Options
In maps that dont use canNotTarget the Sea Defense Options have a colon and a list of units
eg. Sea Defense Options: Destroyer, Cruiser etc
However the canNotTarget
<option name="canNotTarget" value="$All-Air$"/>
for isLand & isAir units works fine. :-/
TripleA-2.6+14388 &
1941 Global Command Decision v120 were the test versions (link below)
https://drive.google.com/file/d/1Q5XcTxMNdUZVAjjTWbz4mw0gL-Bjlw6r/view?usp=sharing
@asvitkine (I have not checked 2.5 thoroughly but I think it does the same as above)
I have been testing using just Japan & USA, turning off the other nations for a faster result.
The text was updated successfully, but these errors were encountered: