Amphibious assault doesn't capture empty territory

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Amphibious assault doesn't capture empty territory

panguitch
So I've been trying to figure out the Medium AI error that sometimes afflicts my Greyhawk map (error detailed here) and I've run into a different but possibly related issue:

When you move troops off a transport into an empty enemy territory, that territory is supposed to immediately be captured. This is how it works on other maps. However, on my map this doesn't happen. The territory remains contested (with the red stripe graphic effect), and then in the battle phase it appears as a battle. But you click on the battle and it's instantly resolved and the territory is now captured.

I can't figure out what's causing this. I've searched and found a few possibilities or at least similar issues
Example 1
Example 2

This one looked most promising:
Veqryn wrote
you made your transports also carriers
this is a well known bug that is almost fixed in the next unstable

transports for land, can not also transport aircraft (or even have the potential to) as of 1.2.5.5
Because my galleys are transports and carriers at the same time I thought this might be it. However, I removed their carrier ability and the problem remained, so I guess this was fixed.

Grasping at straws, and looking at the second thread linked above, I also changed my map from  property name="WW2V3" value="false"  and property name="WW2V2" value="false"  to true, first in WW2V2 then WW2V3 and the problem remained.

Any other ideas what it might be or what I might try? Am I missing something obvious?

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

beelee
This post was updated on .
Hi panguitch

I've noticed the same thing and have never really paid much attention to it as it doesn't effect anything.
Does this somehow effect the gameplay on your map or are you just curious?

Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

redrum
Administrator
@panguitch - If you upload a save game that can be used to reproduce it then I can take a look and probably let you know why.
Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

panguitch
@beelee

It's curiosity. But it's also the fact that the error that causes the Medium AI to sometimes crash in Greyhawk is always associated with enemy movements into coastal territories. So I'm wondering if it's related, and if I can fix this, maybe the Medium AI will stop choking.


@redrum

Here's a save game example:
AmphibiousDoesntCapture.tsvg
  1. In the first round I move the Great Kingdom's units out of coastal territories, and away from the border with Nyrond.
  2. Then I move Nyrond units into the abandoned border territory (ground assault) and it is immediately captured with no combat phase required--as expected.
  3. In contrast, I move Suel units into GK's abandoned coasts via amphibious assault and they are not immediately captured, instead requiring a combat phase that is instantly resolved when the battle is clicked.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

Zim Xero
In reply to this post by panguitch
I like your guess.  I'm thinking its a parsing error related to the resolution flow.
'thats the way it is' makes it neither desireable nor inevitable
Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

redrum
Administrator
@panguitch - The reason it isn't immediately captured is because you have scrambling enabled. Here is the code:

// if we have a preceding battle, then we must use a non-fighting-battle
// if we have scrambling on, and this is an amphibious attack, we may wish to scramble to kill the transports, so must use non-fighting-battle also
if (precede != null || (scramblingEnabled && route.isUnload() && route.hasExactlyOneStep()))

Essentially, if scrambling is enabled then amphib moves are always treated as attacks in case there are planes that can kill the transport before it unloads. This is similar to when you unload from a sea zone where there needs to be a battle first.

If you disabled scrambling then it should conquer the territory instantly without an empty battle.

I don't believe there is a bug or that this should cause any unwanted issues.
Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

panguitch
Thanks, now I understand why scrambling works that way. Makes sense.

Unfortunately, it is causing or at least related to the error that sometimes crashes the Medium AI.

Here's an example save game at the moment of error: LoopErrorOldredRelmord.tsvg

And here's one just before the error: BeforeLoopErrorOldredRelmord.tsvg

These are using the latest version of Greyhawk (0.9.7).

Error Log wrote
triplea.engine.version.bin:1.8.0.5
Exception in thread "Triplea start thread" java.lang.IllegalArgumentException: Loops not allowed in m_routes, route:Route:Oldred -> Rel Mord new territory:Oldred
        at games.strategy.engine.data.Route.add(Route.java:235)
        at games.strategy.triplea.ai.strongAI.StrongAI.populateCombatMove(StrongAI.java:6820)
        at games.strategy.triplea.ai.strongAI.StrongAI.doCombatMove(StrongAI.java:848)
        at games.strategy.triplea.ai.strongAI.StrongAI.move(StrongAI.java:446)
        at games.strategy.triplea.ai.AbstractAI.start(AbstractAI.java:469)
        at games.strategy.engine.framework.ServerGame.waitForPlayerToFinishStep(ServerGame.java:665)
        at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:541)
        at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:314)
        at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInNewThread(LocalLauncher.java:100)
        at games.strategy.engine.framework.startup.launcher.AbstractLauncher$1.run(AbstractLauncher.java:57)
        at java.lang.Thread.run(Unknown Source)
I've made scrambling an option that can be disabled. So if you leave it on and run the second save game, as long as Scarlet Brotherhood again decides to land a conscript in Oldred, the error will recur. But if you load the save game and disable scrambling, and Scarlet Brotherhood again decides to land a conscript in Oldred, the error will not occur.

I know Medium AI won't receive any more development, but any ideas why scrambling would crash it like this? I've tried to get the error to manifest in POS2 which also has scrambling but without success. And if it's map-specific, then perhaps I can change something to fix it.

Greyhawk Wars
TripleA in the original Dungeons & Dragons world

Reply | Threaded
Open this post in threaded view
|

Re: Amphibious assault doesn't capture empty territory

redrum
Administrator
You're probably right that the Medium AI is having some error related to scrambling. I'm not planning to fix it and I'm not sure why it happens on your map but not Global 1940. The error indicates some kind of loop in the route that is calculated.