Hello. I am making a map, and I require some asisstance.
-
First of all, thank you for spending time trying to help.
I am trying to add a trigger/condition that makes the Netherlands and ally of the Allies instead of custodianship when a certain province - its capital - gets liberated, and when/if the capital is retaken I want to make their relationship custodianship once again, as well as transfer all land units to a separate power. How do I do this? I have tried many times but I have not been able to get the Trigger to work.
-
Hi Tank
WWII Global 1940 2nd Edition xml has some examples of changing from custodianship to allied. Are you having trouble changing back ?
Post what you have in your xml
Edit
The transfer of all land units to a separate power, may be more problematic. It can/ probably be done but i think you have to trigger for every combination.Lets get the relationships done and then tackle it
-
@beelee
<attachment name="conditionAttachment_Dutch_Own_Holland" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directOwnershipTerritories" value="Holland Belgium" count="1"/>
</attachment><attachment name="conditionAttachment_Dutch_Own_Holland" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directOwnershipTerritories" value="Holland Belgium" count="1"/> </attachment> <!-- Dutch Triggers --> <attachment name="triggerDutchCapitalLiberation" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Dutch_Own_Holland"/> <option name="relationshipChange" value="Dutch:British:Custodianship:Allied"/> <option name="relationshipChange" value="Dutch:ANZAC:Custodianship:Allied"/> </attachment> <attachment name="triggerDutchCapitalLiberation" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Dutch_Own_Holland"/> <option name="invert" value="true"/> <option name="relationshipChange" value="Dutch:British:Allied:Custodianship"/> <option name="relationshipChange" value="Dutch:ANZAC:Allied:Custodianship"/> </attachment>
-
just at a quick glance, you have "relationshipChange" listed twice in the same trigger. Pretty sure that won't work.
What you probably need is a "activateTrigger"
explains most of xml workings
-
ahh... rereading
Try a separate trigger for each player, so one for British and then one for ANZAC
Edit
You should use a "when" also. You might need to attach it to each player as well, which would require a trigger for each player. Idk depends on when you want it to happen. -
@beelee I tried both of these, I think I should change it to Political action attachment because of this code I found elsewhere
-
Yea I misunderstood what you were after.
You want Norway to activate any allied custodianship players to allied and revert if it is reconquered by the reich.
And you then want the units to switch back too that switched when they first became allied.
That right ?
I think we @wc_sumpton as I'm probably just confusing you at this point
-
@beelee Yes, but Holland Belgium not Norway. I am not worried about the Units right now.
-
oh right Netherlands Sorry didn't mean to piss off the Dutch lol
Well wc probably chime in at some point.
Why don't you lay out step by step what you want to happen. Make it super detailed.
I'll look at it some more. Got a buzz on right now but I think I know what you're after
-
@beelee Alright.
I am new to map modding/creation. This is a mod for the and Allies 1940 global based map (I think it is the UHD black elk map).
The Netherlands in a nation in this game by code, but is almost entirely dysfunctional. I added in the purchase phases and made it a nation, and gave it a capital in Holland Belgium. Now when it gets liberated, I want it to become a full ally, but if it falls again, I want it to return to the Custodianship.
I am doing all of this because I want to learn how triggers and country creation works. I would like to know how to make more advanced maps and by starting with a map that I would just like to edit the rules a bit. While I am here, I would also like to mention that I want china to be able to modernise, but that is something I will focus on later as well.
-
@beelee said in Hello. I am making a map, and I require some asisstance.:
I think we @wc_sumpton as I'm probably just confusing you at this point
I think you are doing just fine! Sort of like the rough in the diamond!
Playing BM:W, so I'll give this a closer look tomorrow.
Cheers...
-
Update: I figured it out! I had a simple typo in the code, which had both triggers set as triggerDutchCapitalLiberation, when one should have been triggerDutchCapitalOccupation.
I fixed it though, and here is the code:
<attachment name="triggerDutchCapitalLiberation" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Dutch_Own_Holland"/> <option name="relationshipChange" value="Dutch:British:Custodianship:Allied"/> <option name="relationshipChange" value="Dutch:ANZAC:Custodianship:Allied"/> <option name="relationshipChange" value="Dutch:Russians:Friendly:Allied"/> <option name="relationshipChange" value="Dutch:Americans:Friendly:Allied"/> <option name="relationshipChange" value="Dutch:French:Friendly:Allied"/> <option name="relationshipChange" value="Dutch:Chinese:Friendly:Allied"/> <option name="when" value="before:britishNonCombatMove"/> <option name="when" value="before:anzacNonCombatMove"/> </attachment> <attachment name="triggerDutchCapitalOccupation" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Dutch_Do_Not_Own_Holland"/> <option name="relationshipChange" value="Dutch:British:Allied:Custodianship"/> <option name="relationshipChange" value="Dutch:ANZAC:Allied:Custodianship"/> <option name="relationshipChange" value="Dutch:Russians:Allied:Friendly"/> <option name="relationshipChange" value="Dutch:Americans:Allied:Friendly"/> <option name="relationshipChange" value="Dutch:French:Allied:Friendly"/> <option name="relationshipChange" value="Dutch:Chinese:Allied:Friendly"/> <option name="when" value="before:britishNonCombatMove"/> <option name="when" value="before:anzacNonCombatMove"/> </attachment>
I had to make New Conditions, however:
<attachment name="conditionAttachment_Dutch_Own_Holland" attachTo="Dutch" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directOwnershipTerritories" value="Holland Belgium" count="1"/> </attachment> <attachment name="conditionAttachment_Dutch_Do_Not_Own_Holland" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="alliedOwnershipTerritories" value="Holland Belgium" count="1"/> </attachment>
Something else I want to do is make China be allowed to use factories to build equipment, but can not build factories, while being able to build infantry in Szechuan and Hunan, and artillary (while burma road is open) in szechuan without factories there. For example, when China takes a factory it does not get destroyed (done already), and instead it can place planes, tanks, cars etc. but not infantry in the factory, while the infantry can only be mobilised in Szechuan and Hunan, and artillary only in Szechuan.
-
@tanq78 said in Hello. I am making a map, and I require some asisstance.:
Something else I want to do is make China be allowed to use factories to build equipment, but can not build factories, while being able to build infantry in Szechuan and Hunan, and artillary (while burma road is open) in szechuan without factories there. For example, when China takes a factory it does not get destroyed (done already), and instead it can place planes, tanks, cars etc. but not infantry in the factory, while the infantry can only be mobilised in Szechuan and Hunan, and artillary only in Szechuan.
Is this a question also? Everything should be doable I think. If you need help with it let us know.
-
@victoryfirst
Hello, I was working on changing the turn order when I got this error.Could not parse:file:///C:/Users/tank7/triplea/downloadedMaps/mehmetmap.zip/games/mehmetmap.xml, Parsing halted at line: 1447, column: 7, while mapping to: org.triplea.map.data.elements.GamePlay.Sequence, error: ParseError at [row,col]:[1447,7] Message: The element type "step" must be terminated by the matching end-tag " ". javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1447,7] Message: The element type "step" must be terminated by the matching end-tag " ".
I can not figure out what is wrong.
-
looks as if you're missing some quotes '' with the end tag. That should mean at the end of your code, something is missing.
Go through your change word by word and have a correct one to compare to while you do it.
Or post your xml here if you can't get it to work
-
@beelee I can not seem to find it. Here is the entire section in question.
<sequence> <step name="gameInitDelegate" delegate="initDelegate" maxRunCount="1"/> <!-- Bidding Phase --> <step name="germanBid" delegate="bid" player="Germans" maxRunCount="1"/> <step name="germanBidPlace" delegate="placeBid" player="Germans" maxRunCount="1"/> <step name="russianBid" delegate="bid" player="Russians" maxRunCount="1"/> <step name="russianBidPlace" delegate="placeBid" player="Russians" maxRunCount="1"/> <step name="japaneseBid" delegate="bid" player="Japanese" maxRunCount="1"/> <step name="japaneseBidPlace" delegate="placeBid" player="Japanese" maxRunCount="1"/> <step name="americanBid" delegate="bid" player="Americans" maxRunCount="1"/> <step name="americanBidPlace" delegate="placeBid" player="Americans" maxRunCount="1"/> <step name="chineseBid" delegate="bid" player="Chinese" maxRunCount="1"/> <step name="chineseBidPlace" delegate="placeBid" player="Chinese" maxRunCount="1"/> <step name="britishBid" delegate="bid" player="British" maxRunCount="1"/> <step name="britishBidPlace" delegate="placeBid" player="British" maxRunCount="1"/> <step name="italianBid" delegate="bid" player="Italians" maxRunCount="1"/> <step name="italianBidPlace" delegate="placeBid" player="Italians" maxRunCount="1"/> <step name="anzacBid" delegate="bid" player="ANZAC" maxRunCount="1"/> <step name="anzacBidPlace" delegate="placeBid" player="ANZAC" maxRunCount="1"/> <step name="frenchBid" delegate="bid" player="French" maxRunCount="1"/> <step name="frenchBidPlace" delegate="placeBid" player="French" maxRunCount="1"/> <step name="dutchBid" delegate="bid" player="Dutch" maxRunCount="1"/> <step name="dutchBidPlace" delegate="placeBid" player="Dutch" maxRunCount="1"/> <!-- Germans Game Sequence --> <step name="germansTech" delegate="tech" player="Germans"/> <step name="germansTechActivation" delegate="tech_activation" player="Germans"/> <step name="germansPurchase" delegate="purchase" player="Germans"/> <step name="germansPolitics" delegate="politics" player="Germans"/> <step name="germansCombatMove" delegate="move" player="Germans"/> <step name="germansAirborneCombatMove" delegate="specialCombatMove" player="Germans" display="Airborne Attack Move"/> <step name="germansBattle" delegate="battle" player="Germans"/> <step name="germansNonCombatMove" delegate="move" player="Germans" display="Non Combat Move"/> <step name="germansPlace" delegate="place" player="Germans"/> <step name="germansEndTurn" delegate="endTurn" player="Germans"/> <!-- Russians Game Sequence --> <step name="russiansTech" delegate="tech" player="Russians"/> <step name="russiansTechActivation" delegate="tech_activation" player="Russians"/> <step name="russiansPurchase" delegate="purchase" player="Russians"/> <step name="russiansPolitics" delegate="politics" player="Russians"/> <step name="russiansCombatMove" delegate="move" player="Russians"/> <step name="russiansAirborneCombatMove" delegate="specialCombatMove" player="Russians" display="Airborne Attack Move"/> <step name="russiansBattle" delegate="battle" player="Russians"/> <step name="russiansNonCombatMove" delegate="move" player="Russians" display="Non Combat Move"/> <step name="russiansPlace" delegate="place" player="Russians"/> <step name="russiansEndTurn" delegate="endTurn" player="Russians"/> <!-- Japanese Game Sequence --> <step name="japaneseTech" delegate="tech" player="Japanese"/> <step name="japaneseTechActivation" delegate="tech_activation" player="Japanese"/> <step name="japanesePurchase" delegate="purchase" player="Japanese"/> <step name="japanesePolitics" delegate="politics" player="Japanese"/> <step name="japaneseCombatMove" delegate="move" player="Japanese"/> <step name="japaneseAirborneCombatMove" delegate="specialCombatMove" player="Japanese" display="Airborne Attack Move"/> <step name="japaneseBattle" delegate="battle" player="Japanese"/> <step name="japaneseNonCombatMove" delegate="move" player="Japanese" display="Non Combat Move"/> <step name="japanesePlace" delegate="place" player="Japanese"/> <step name="japaneseEndTurn" delegate="endTurn" player="Japanese"/> <!-- Chinese Game Sequence --> <step name="chineseTech" delegate="tech" player="Chinese"/> <step name="chineseTechActivation" delegate="tech_activation" player="Chinese"/> <step name="chinesePurchase" delegate="purchase" player="Chinese"/> <step name="chinesePolitics" delegate="politics" player="Chinese"/> <step name="chineseCombatMove" delegate="move" player="Chinese"/> <step name="chineseBattle" delegate="battle" player="Chinese"/> <step name="chineseNonCombatMove" delegate="move" player="Chinese" display="Non Combat Move"/> <step name="chinesePlace" delegate="place" player="Chinese"/> <step name="chineseEndTurn" delegate="endTurn" player="Chinese"/> <!-- British Game Sequence --> <step name="britishTech" delegate="tech" player="British"/> <step name="britishTechActivation" delegate="tech_activation" player="British"/> <step name="britishPurchase" delegate="purchase" player="British"/> <step name="britishPolitics" delegate="politics" player="British"/> <step name="britishCombatMove" player="British" delegate="move"> <step name="britishAirborneCombatMove" delegate="specialCombatMove" player="British" display="Airborne Attack Move"/> <step name="britishBattle" delegate="battle" player="British"/> <step name="britishNonCombatMove" delegate="move" player="British" display="Non Combat Move"> <step name="britishNoAirCheckPlace" delegate="placeNoAirCheck" player="British"/> <step name="britishEndTurn" delegate="endTurn" player="British"> <stepProperty name="turnSummaryPlayers" value="Chinese:British"/> </step> <!-- Italians Game Sequence --> <step name="italiansTech" delegate="tech" player="Italians"/> <step name="italiansTechActivation" delegate="tech_activation" player="Italians"/> <step name="italiansPurchase" delegate="purchase" player="Italians"/> <step name="italiansPolitics" delegate="politics" player="Italians"/> <step name="italiansCombatMove" delegate="move" player="Italians"/> <step name="italiansAirborneCombatMove" delegate="specialCombatMove" player="Italians" display="Airborne Attack Move"/> <step name="italiansBattle" delegate="battle" player="Italians"/> <step name="italiansNonCombatMove" delegate="move" player="Italians" display="Non Combat Move"/> <step name="italiansPlace" delegate="place" player="Italians"/> <step name="italiansEndTurn" delegate="endTurn" player="Italians"/> <!-- ANZAC Game Sequence --> <step name="anzacTech" delegate="tech" player="ANZAC"/> <step name="anzacTechActivation" delegate="tech_activation" player="ANZAC"/> <step name="anzacPurchase" delegate="purchase" player="ANZAC"/> <step name="anzacPolitics" delegate="politics" player="ANZAC"/> <step name="anzacCombatMove" delegate="move" player="ANZAC"/> <step name="anzacAirborneCombatMove" delegate="specialCombatMove" player="ANZAC" display="Airborne Attack Move"/> <step name="anzacBattle" delegate="battle" player="ANZAC"/> <step name="anzacNonCombatMove" delegate="move" player="ANZAC" display="Non Combat Move"/> <step name="anzacPlace" delegate="place" player="ANZAC"/> <step name="anzacEndTurn" delegate="endTurn" player="ANZAC"/> <!-- Americans Game Sequence --> <step name="americansTech" delegate="tech" player="Americans"/> <step name="americansTechActivation" delegate="tech_activation" player="Americans"/> <step name="americansPurchase" delegate="purchase" player="Americans"/> <step name="americansPolitics" delegate="politics" player="Americans"/> <step name="americansCombatMove" delegate="move" player="Americans"/> <step name="americansAirborneCombatMove" delegate="specialCombatMove" player="Americans" display="Airborne Attack Move"/> <step name="americansBattle" delegate="battle" player="Americans"/> <step name="americansNonCombatMove" delegate="move" player="Americans" display="Non Combat Move"/> <step name="americansPlace" delegate="place" player="Americans"/> <step name="americansEndTurn" delegate="endTurn" player="Americans"/> <!-- French Game Sequence --> <step name="frenchTech" delegate="tech" player="French"/> <step name="frenchTechActivation" delegate="tech_activation" player="French"/> <step name="frenchPurchase" delegate="purchase" player="French"/> <step name="frenchPolitics" delegate="politics" player="French"/> <step name="frenchCombatMove" delegate="move" player="French"/> <step name="frenchAirborneCombatMove" delegate="specialCombatMove" player="French" display="Airborne Attack Move"/> <step name="frenchBattle" delegate="battle" player="French"/> <step name="frenchNonCombatMove" delegate="move" player="French" display="Non Combat Move"/> <step name="frenchPlace" delegate="place" player="French"/> <step name="frenchEndTurn" delegate="endTurn" player="French"> <!-- Dutch Game Sequence --> <step name="dutchTech" delegate="tech" player="Dutch"/> <step name="dutchTechActivation" delegate="tech_activation" player="Dutch"/> <step name="dutchPurchase" delegate="purchase" player="Dutch"/> <step name="dutchPolitics" delegate="politics" player="Dutch"/> <step name="dutchCombatMove" delegate="move" player="Dutch"/> <step name="dutchBattle" delegate="battle" player="Dutch"/> <step name="dutchNonCombatMove" delegate="move" player="Dutch" display="Non Combat Move"/> <step name="dutchPlace" delegate="place" player="Dutch"/> <step name="dutchEndTurn" delegate="endTurn" player="Dutch"/> <stepProperty name="turnSummaryPlayers" value="ANZAC:Americans:French:Dutch"/> </step> <step name="endRoundStep" delegate="endRound"/> </sequence>
-
@tanq78 said in Hello. I am making a map, and I require some asisstance.:
<step name="dutchEndTurn" delegate="endTurn" player="Dutch"/> <!-- Need to remove the slash --> <stepProperty name="turnSummaryPlayers" value="ANZAC:Americans:French:Dutch"/> </step>
Cheers...
-
Thank you
-
How do I upload my map so others can download it? Preferably in the experimental area.
-
Yeah a rule of thumb is that when you give something extra information by adding tabbed-in lines, you need to remove the slash from the first line. See another example below:
<attachment name="triggerAttachmentExample" attachTo="Germans" javaClass="TriggerAttachment" type="player"> <!-- This misses a slash... --> <option name="conditions" value="conditionAttachmentExample"/> <!-- ...because there are lines underneath tabbed in that give extra information to the above --> </attachment>
So that's also why this:
<step name="dutchEndTurn" delegate="endTurn" player="Dutch"/>
changes into this:
<step name="dutchEndTurn" delegate="endTurn" player="Dutch"> <!-- slash removed... --> <stepProperty name="turnSummaryPlayers" value="ANZAC:Americans:French:Dutch"/> <!-- ...because there is now this line here --> </step>
How do I upload my map so others can download it?
The first step is to upload the map to a GitHub repository. Then, you should contact RogerCooper on this forum and ask him if you can add your repository to the TripleA map collection: https://github.com/triplea-maps