How to prevent this cavalry unit to scramble to sea battles
-
So you have
- setup the effected territory as
<attachment name="territoryAttachment" attachTo="SZ47" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
<option name="territoryEffect" value="Ocean" />
</attachment> - You have moved the unitAttachment and supportAttachment xml block of code after the territoryEffectAttachment block of code?
- setup the effected territory as
-
@thedog I have in order: Unit, Support, Territory, TerritoryEffect
-
@thedog said in How to prevent this cavalry unit not to scramble to sea battles:
You have moved the unitAttachment and supportAttachment xml block of code after the territoryEffectAttachment block of code?
Do you mean that i have to put territoryEffect above unit and support? And where to put territories?
If possible give me the right order of those in question. -
@thedog said in How to prevent this cavalry unit not to scramble to sea battles:
setup the effected territory as
<attachment name="territoryAttachment" attachTo="SZ47" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
<option name="territoryEffect" value="Ocean" />
</attachment>Sure. I just put all sea zones into territoryAttachments right below the other land territoiyAttachments which were already there like you showing here. This was the first thing i did. After that i just put 1 territoryEffect with Ocean below all territoryAttachments.
-
order is
technology
territoryAttachment
territoryEffectAttachment
unitAttachment
supportAttachment -
@thedog thy very much, i try it
-
@thedog The change in order didnt do anything. I am more and more to think that scramble ingores certain restrictions.
-
Scramble is used for "isAir" units so the game logic is not checking if the unit can enter the zone since "isAir" unit can enter both water/land zones. I dough that you will be able to prevent the unit for entering that zone without some modification to the underling code.
Cheers...
-
@wc_sumpton Yes, i think you are right. Even though it is not a isAir unit. You can scramble even if you are not isAir.
-
Understand, but the scramble ability was a feature that was added to TripleA, and the way it was coded works well for 'isAir'.
Cheers...
-
@wc_sumpton I think i have to play around this options then.
canNotTarget
values: colon delimited list of units that this unit can't target in battles, ex. subs not being able to target air units
canNotBeTargetedBy
Eventually there is a chance. But i guess it will not work with airBattle in a scramble situation. But lets see. I try it now. -
@wc_sumpton I dont have a problem of scrambling cavalry units. I only want it to not to be any factor of an outcome if they entere a sea battle by scramble.
-
I really do understand you problem. 'canNotTarget' should work, but it will not stop the unit from entering the zone. You would have to put 'canNotTarget' on both the land and sea units, so that the scrambling units are not taken as casualties. I see 'canEvade' do you have any units with 'isDestroyer' these might also cause problems.
Defensive scrambling/intercepting units should use the same movement logic as regular attacking units.
Cheers...
-
@thedog @wc_sumpton
Thy you both for help.
I have now just set canNotBeTargetedBy and cannotTarget to the cavalry and the sea unit so it doesnt counts towards the outcome of the sea battle in which i cannot prevent the cavalry scrambling into. But it does the job.<attachment name="unitAttachment" attachTo="Equites" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="attack" value="3"/> <option name="defense" value="3"/> <option name="movement" value="2"/> <option name="airAttack" value="3"/> <option name="airDefense" value="3"/> <option name="transportCost" value="6"/> <option name="canAirBattle" value="true"/> <option name="createsResourcesList" value="-1:PUs"/> <option name="canBlitz" value="true"/> <option name="canEvade" value="true"/> <option name="isAirBase" value="true"/> <option name="canScramble" value="true"/> <option name="maxScrambleDistance" value="1"/> <option name="requiresUnits" value="Metropolis"/> <option name="requiresUnits" value="City"/> <option name="canNotTarget" value="Galley"/> <option name="canNotBeTargetedBy" value="Galley"/> </attachment> -
@wc_sumpton Luckily i dont have or need isDestroyer in my ancient times mod. Thy again for helping me to find a good workaround.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login