territory Property error
-
Hi,
seems I missed something.
What I did:
<territoryEffectList>
<territoryEffect name="russian_winter"/>
</territoryEffectList><attachment name="territoryEffectrussianwinter" attachTo="russian_winter" javaClass="games.strategy.triplea.attachments.TerritoryEffectAttachment" type="territoryEffect">
<option name="noBlitz" value="armour:mobile_artillery"/>
<option name="combatOffenseEffect" value="armour" count="-1"/>
</attachment><attachment name="conditionAttachmentstartrussianwinter" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directPresenceTerritories" value="Poland"/>
<option name="rounds" value="1"/>
</attachment><attachment name="triggerAttachmentstartrussianwinter" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="trigger" value="conditionAttachmentstartrussianwinter"/>
<option name="territories" value="Baltic States:Ukraine:Eastern Ukraine:Belorussia:Archangel:Central Russia"/>
<option name="territoryEffectrussianwinter" value="TerritoryAttachment" count="territoryAttachment"/>
<option name="when" value="before:germansCombatMove"/>
<option name="uses" value="1"/>
</attachment>I thought this would fit, but tiplea gives an error and wants a territory property.
What is wrong and has to be changed?
-
If the trigger is trying to set the territoryEffect then:
<option name="territoryEffectrussianwinter" value="TerritoryAttachment" count="territoryAttachment"/>
is part of your problem. It should be like this:
<option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/> <!-- Now to set the 'property' --> <option name="territoryProperty" value="territoryEffect" count="russian_winter"/>
Hope this is helpful.
Cheers...
-
@wc_sumpton said in territory Property error:
<option name="territoryProperty" value="territoryEffect" count="russian_winter"/>
Hi,
yes that helped.
However, none of the effects are active.I thought
<territoryEffectList>
<territoryEffect name="russian_winter"/>
</territoryEffectList><attachment name="territoryEffectrussianwinter" attachTo="russian_winter" javaClass="games.strategy.triplea.attachments.TerritoryEffectAttachment" type="territoryEffect">
<option name="noBlitz" value="armour:mobile_artillery"/>
<option name="combatOffenseEffect" value="armour" count="-1"/>
</attachment>means, whenever the effect "russian_winter" is activated, e.g. by a trigger
both effects<option name="noBlitz" value="armour:mobile_artillery"/>
<option name="combatOffenseEffect" value="armour" count="-1"/>are active.
But they aren't - what might be wrong?
-
Hi,
the trigger, just to see if it works ist set this way:
<attachment name="conditionAttachmentstartrussianwinter" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directPresenceTerritories" value="Poland"/>
<option name="rounds" value="1"/>
</attachment><attachment name="triggerAttachmentstartrussianwinter" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="trigger" value="conditionAttachmentstartrussianwinter"/>
<option name="territories" value="Baltic States:Ukraine:Eastern Ukraine:Belorussia:Archangel:Central Russia"/>
<option name="territoryProperty" value="territoryEffect" count="russian_winter"/>
<option name="when" value="before:germansCombatMove"/>
<option name="uses" value="1"/>
</attachment>I made the condition simple, as Germany already controls Poland from round one, so the trigger should be active immediately. This was to test it.
the test failed. there must still be a mistake somewhere. -
@numetalfan I think you still need this in your trigger
<option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/>
try it before this: <option name="territoryProperty" value="territoryEffect" count="russian_winter"/>
I'm not 100% certain but this : <option name="territories" value="Baltic States:Ukraine:Eastern Ukraine:Belorussia:Archangel:Central Russia"/>
may need to go after the first two
-
Your test is assuming that the condition is true. I don't have the map so I don't know about that. Instead try using an 'AlwaysTrue' condition:
<attachment name="conditionAttachmentAlwaysTrue" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="switch" value="true"/> </attachment>
Then modify your trigger:
<option name="conditions" vallue="conditionAttachmentAlwaysTrue" />
@beelee "territories" and "territoryProperty" can be use with both "territoryAttachment" and "canalAttachment". To use with "canalAttachment", "territoryAttachmentName" needs to reference "CanalAttachment" "canalAttachment". "territoryAttachmentName" can be omitted when referencing "territoryAttachment".
Cheers...
-
Hi,
did, no more errors, but no effect at all.
neither no blitz nor -1 attack happens<attachment name="territoryEffectrussianwinter" attachTo="russian_winter" javaClass="games.strategy.triplea.attachments.TerritoryEffectAttachment"
type="territoryEffect">
<option name="noBlitz" value="armour:mobile_artillery"/>
<option name="combatOffenseEffect" value="armour" count="-1"/>
</attachment><attachment name="conditionAttachmentAlwaysTrue" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="switch" value="true"/>
<option name="rounds" value="1"/>
</attachment><attachment name="triggerAttachmentstartrussianwinter" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachmentAlwaysTrue" />
<option name="territories" value="Baltic States:Ukraine:Eastern Ukraine:Belorussia:Archangel:Central Russia"/>
<option name="territoryProperty" value="territoryEffect" count="russian_winter"/>
<option name="when" value="before:germansCombatMove"/>
<option name="uses" value="1"/>
</attachment>this are the current codes
-
The only thing I can see is:
<attachment name="territoryEffectrussianwinter"
In all the examples I can find, territoryEffect attachment is called 'territoryEffectAttachment'. Changing that might help.
Let me know.
Cheers...
-
Hi,
that's how I changed it:
<territoryEffectList>
<territoryEffect name="russian_winter"/>
</territoryEffectList><attachment name="territoryEffectrussianwinter" attachTo="russian_winter" javaClass="TerritoryEffectAttachment" type="territoryEffect">
<option name="noBlitz" value="armour:mobile_artillery"/>
<option name="combatOffenseEffect" value="armour" count="-1"/>
</attachment>is it correct that way?
-
I am sorry for being unclear. The attachment name 'territoryEffectrussinawinter' may be causing the problem:
<!-- <attachment name="territoryEffectrussianwinter" attachTo="russian_winter" javaClass="TerritoryEffectAttachment" type="territoryEffect"> --> <attachment name="territoryEffectAttachment" attachTo="russian_winter" javaClass="games.strategy.triplea.attachments.TerritoryEffectAttachment" type="territoryEffect"> <option name="noBlitz" value="armour:mobile_artillery"/> <option name="combatOffenseEffect" value="armour" count="-1"/> </attachment>
You are creating an attachment for 'russian_winter'.
Cheers...