How can i add "lend-lease" territory?

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

How can i add "lend-lease" territory?

Navalland
i a lot of try crete lend lease territory (as tww:archangel,murmansk) but i'm unsuccesfull. im trying for paris for ww1.

<step name="frenchBid" delegate="bid" player="France" maxRunCount="1"/>
<step name="frenchBidPlace" delegate="placeBid" player="France" maxRunCount="1"/>

<step name="ukBid" delegate="bid" player="British_Empire" maxRunCount="1"/>
<step name="ukBidPlace" delegate="placeBid" player="British_Empire" maxRunCount="1"/>

<step name="frenchUserActions" delegate="userActions" player="France" display="Diplomacy"/>
<step name="frenchCombatMove" delegate="move" player="France"/>                         
<step name="frenchPurchase" delegate="purchase" player="France"/>                       
<step name="frenchBattle" delegate="battle" player="France"/>
<step name="frenchNonCombatMove" delegate="move" player="France" display="Non Combat Move"/>
<step name="frenchPlace" delegate="place" player="France"/>
<step name="frenchEndTurn" delegate="endTurn" player="France">

<step name="ukUserActions" delegate="userActions" player="British_Empire" display="Diplomacy"/>
<step name="ukPolitics" delegate="politics" player="British_Empire"/>
<step name="ukCombatMove" delegate="move" player="British_Empire"/>
<step name="ukPurchase" delegate="purchase" player="British_Empire"/>
<step name="ukBattle" delegate="battle" player="British_Empire"/>
<step name="ukNonCombatMove" delegate="move" player="British_Empire" display="Non Combat Move"/>
<step name="ukPlace" delegate="place" player="British_Empire"/>
<step name="ukEndTurn" delegate="endTurn" player="British_Empire"/>


<attatchment name="territoryAttatchment" attatchTo="Paris" javaClass="games.strategy.triplea.attatchments.TerritoryAttachment" type="territory">
<option name="capital" value="France"/>
<option name="production" value="10"/>
<option name="changeUnitOwners" value="France"/>
</attatchment>


<attatchment name="conditionAttachmentLLbTA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">
                <option name="directPresenceTerritories" value="Paris" count="1"/>
                         <option name="unitPresence" value="ukconscript" count="1"/>
                         </attatchment>
                         
<attatchment name="conditionAttachmentLLbAA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">
                <option name="directPresenceTerritories" value="Paris" count="1"/>
                         <option name="unitPresence" value="ukcolonial" count="1"/>
                         </attatchment>


<attatchment name="triggerAttachmentLLbTA" attatchTo="France" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbTA"/>
                <option name="placement" value="Paris:frenchconscript"/>
                         <option name="when" value="before:ukEndTurn"/>
                         </attatchment>
                         
<attatchment name="triggerAttachmentLLbTA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbTA"/>
                         <option name="removeUnits" value="Paris:ukconscript"/>
                         <option name="when" value="before:ukEndTurn"/>
                         </attatchment>

<attatchment name="triggerAttachmentLLbAA" attatchTo="France" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbAA"/>
                <option name="placement" value="Paris:frenchcolonial"/>
                         <option name="when" value="before:ukEndTurn"/>
                         </attatchment>
                         
<attatchment name="triggerAttachmentLLbAA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbAA"/>
                         <option name="removeUnits" value="Paris:ukcolonial"/>
                         <option name="when" value="before:ukEndTurn"/>
                         </attatchment>


<attatchment name="triggerAttachmentParisLLBritish_Empire1" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentDummyCondition"/>
                         <option name="changeOwnership" value="Paris:France:British_Empire:false"/>
                         <option name="when" value="before:ukCombatMove"/>
                         </attatchment>
                               
<attatchment name="triggerAttachmentParisLLBritish_Empire2" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentDummyCondition"/>
                         <option name="changeOwnership" value="Paris:British_Empire:France:false"/>
                         <option name="when" value="after:ukNonCombatMove"/>
                         </attatchment>
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

crazy_german
First, check if this is in your property list
                <property name="Use Triggers" value="true" editable="true">
                        <boolean/>
                </property>
Second, removeUnits and placement need to include count
examples
<option name="removeUnits" value="Paris:ukconscript" count="1"/>
<option name="placement" value="Paris:frenchcolonial" count="1"/>

Third, what exactly do you want to do? There are two ways to have one power give units to another. You can change ownership, or you can use triggers to remove the units and place them. TWW uses both in different places. Right now you have some of both.

Example 01- Vichy French units convert to German ownership. This just changes the owners of the units. This only works if the units have the exact same name ("infantry" or "germanInfantry")

Example 02 - American units convert to Russian units. Here we are removing "americanTank" and adding a "russianTank". This requires removing by the americanTank with a trigger, and then adding the russianTank with another trigger.

Do you need the ukconscript and frenchconscript to be different units? TWW needs to do this because of the very complicated technology in that game. Are you including equally complicated technology? (Is this for Domination No man's land?)

Hope this helps
Correctly crazy, disingenuously German
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

Navalland
In reply to this post by Navalland
i tried, but i m unsuccessfull.


<property name="Use Triggers" value="true" editable="true">
                                                <boolean/>
                                </property>



<attatchment name="conditionAttachmentLLbTA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">
                <option name="directPresenceTerritories" value="Paris" count="1"/>
                         <option name="unitPresence" value="ukconscript" count="1"/>
                         </attatchment>
                         
                <attatchment name="conditionAttachmentLLbAA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.RulesAttachment" type="player">
                <option name="directPresenceTerritories" value="Paris" count="1"/>
                         <option name="unitPresence" value="ukcolonial" count="1"/>
                         </attatchment>       
           
                               
                <attatchment name="triggerAttachmentLLbTA" attatchTo="France" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbTA"/>
                <option name="placement" value="Paris:frenchconscript count="1"/>
                <option name="removeUnits" value="Paris:ukconscript count="1"/>         
                <option name="when" value="before:ukEndTurn"/>
                         </attatchment>               
                               
                       
                <attatchment name="triggerAttachmentLLbTA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbTA"/>
                         <option name="removeUnits" value="Paris:ukconscript count="1"/>
                         <option name="placement" value="Paris:frenchconscript count="1"/>
                         <option name="when" value="before:ukEndTurn"/>
                         </attatchment>

                               

              <attatchment name="triggerAttachmentLLbAA" attatchTo="France" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbAA"/>
                <option name="placement" value="Paris:frenchcolonial count="1"/>
                <option name="removeUnits" value="Paris:ukcolonial count="1"/>         
                <option name="when" value="before:ukEndTurn"/>
                         </attatchment> 
                               

                               
              <attatchment name="triggerAttachmentLLbAA" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentLLbAA"/>
                         <option name="removeUnits" value="Paris:ukcolonial count="1"/>
                         <option name="placement" value="Paris:frenchcolonial count="1"/>
                         <option name="when" value="before:ukEndTurn"/>
                         </attatchment>

                               

                               
           <attatchment name="triggerAttachmentParisLLBritish_Empire1" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentDummyCondition"/>
                         <option name="changeOwnership" value="Paris:France:British_Empire:false"/>
                         <option name="when" value="before:ukCombatMove"/>
                         </attatchment>
                               
            <attatchment name="triggerAttachmentParisLLBritish_Empire2" attatchTo="British_Empire" javaClass="games.strategy.triplea.attatchments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentDummyCondition"/>
                         <option name="changeOwnership" value="Paris:British_Empire:France:false"/>
                         <option name="when" value="after:ukNonCombatMove"/>
                         </attatchment>



""""""Could not parse:jar:file:/C:/Users/ANILPC/triplea/maps/Domination_1914_Blood_And_Steel.zip!/games/Domination_1914_Blood_And_Steel.xml error at line:8429 column:78
org.xml.sax.SAXParseException; systemId: jar:file:/C:/Program%20Files/TripleA/triplea_1_8_0_9/bin/triplea.jar!/games/strategy/engine/xml/; lineNumber: 8429; columnNumber: 78; Element type "option" must be followed by either attribute specifications, ">" or "/>".
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
"""""""

yes, im trying for dom 1914 map, but no technolohy, i erased technology.

i don't want change ownership, i want use triggers to remove the units and place them. Example: France have 5 conscript in paris in round2, 3 british conscript goes to paris in round2. France have 8 conscript in round3.

ukconscript and frenckconscript are same units.
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

ZjelcoP
lineNumber: 8429; columnNumber: 78; Element type "option" must be followed by either attribute specifications, ">" or "/>".

This is a clear clue to an error in your XML. It tells you in what line the error probably is: line 8429

Also you name conditionAttachmentDummyCondition in the trigger, but I don't see that you set it.
What is this condition?

If you post the full XML it's also easier to see where the error is.

Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

Navalland
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

ZjelcoP
<option name="placement" value="Paris:frenchconscript count="1"/>

You forgot the " after frenchconscript. It should be
<option name="placement" value="Paris:frenchconscript" count="1"/> 
This in all triggerlines.


Also in the unitlist (line2356) there is no frenchconscript. You only have conscript named there.

To name a unit like Infantry different per country, like frenchinfantry, UKinfantry is only usefull if those units are actually different or you need to do something special with them.

For your triggers just "conscript" will do i think.


Tip: use Notepad++ (free download) to work on XML.
Its very easy to use and often shows mistakes clearly.

When you get an error like:
lineNumber: 8429; columnNumber: 78; Element type "option" must be followed by either attribute specifications, ">" or "/>".
Go to that linenumber and look very closely for type- or copy-errors.
You can also copy a good line from an other XML under it and compare.
The errormessages often give a very good clue of what your mistake is.

Good luck!




 
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

Navalland
In reply to this post by Navalland
i managed, very yhank you.
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

Navalland
but i have still have a problem. i can chance only 1 unit, i mean only 1 conscript and colonial will change per tour.
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

Cernel
Assuming you are doing it with triggers like:

<option name="removeUnits" value="Paris:ukconscript" count="N"/>
<option name="placement" value="Paris:frenchcolonial" count="N"/>

You need a different trigger for changing 1, 2, 3 ... N etc.; and each one should have a condition testing that there are N to be changed units in the territory, plus a condition testing that there are N+1 to be changed units in the territory and a conditiontype = 1 (same as XOR), except the trigger changing the max number possible, that should have only the condition testing N.

This assuming that you want absolutely to change those units if they are there. Otherwise, if you want to be able to decide wether to change ownership or not, you have to do it the TWW way for like Archangel or with user actions.
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: How can i add "lend-lease" territory?

Cernel
Alternatively, an easyer to code but history clutting way would be to have all triggers (each one having a different name, of course) doing:

<option name="removeUnits" value="Paris:ukconscript" count="1"/>
<option name="placement" value="Paris:frenchcolonial" count="1"/>

And each one testing that there are N ukconscript in the territory, with N = 1,2,3...M, with M the max number that you want to be (for sure) ownership changed.

As said, this is probably not the best way to handle lend lease, but should work.
History plays dice