Subcategories

  • 18
  • 74
  • 5
  • 4
  • 18
  • 42
  • 6
  • 6
  • 7
  • 1
  • 6
  • 16
  • 5
  • 3
  • 6
  • 9
  • 5
  • 6
  • 7
  • 11

Recent Posts

  • @schulz
    I have the random code working in your xml, here is the extract

    <!-- this goes before map -->
    <variableList>
    <variable name="SZGermanySubs">
    <element name="SZ 4"/>
    <element name="SZ 5"/>
    <element name="SZ 6"/>
    <element name="SZ 7"/>
    </variable>
    </variableList>

    <!-- this goes before attachmentList -->
    <attachment name="conditionAttachmentEveryTurn" attachTo="Germany" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
    <option name="rounds" value="1-100"/>
    </attachment>

    <attachment foreach="$SZGermanySubs$" name="triggerAttachmentSZGermanySubs@SZGermanySubs@" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
    <option name="conditions" value="conditionAttachmentEveryTurn"/>
    <option name="placement" value="@SZGermanySubs@:destroyer" count="1"/>
    <option name="players" value="Germany"/>
    <option name="chance" value="1:2"/>
    <option name="when" value="before:germanyPurchase"/>
    </attachment>

    You will have to change the bold text, but hopefully its just a copy and paste.

    read more
  • B

    I've always used them but I noticed by accident if I don't, the map still runs. Is there a downside to this ? It seems a little slower but I'm not sure if it's my imagination or just the amount of stuff that's going on.

    read more
  • Z

    @schulz
    Ive done something similar to my map so Ill copy what I have. The way Ive done this for my map is that I use lots of invisible units as switches for things, so you have a small empty region called Space and conditions that check whether the switch is present.

    Though I was writing it out, I realised that I hadnt looked at the code in awhile and im unsure if it works for 6 variants. It definitely works for 2 which is what I currently have but Ill put a modified version that should work below.

    <!-- First Round Setup--> <attachment name="conditionAttachmentCountrySetupFirstRound" attachTo="Germany" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <-Change to which country goes first-> <option name="rounds" value="1"/> </attachment> <!-- Switch Conditions Setup--> <attachment name="conditionAttachmentGermanySetupSwitch1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directPresenceTerritories" value="Space" count="1"/> <option name="unitPresence" value="GermanySetupSwitch1" count="1"/> <option name="unitPresence" value="GermanyHasNotSetupSwitch" count="1"/> <option name="players" value="Neutral"/> </attachment> <attachment name="conditionAttachmentGermanySetupSwitch2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directPresenceTerritories" value="Space" count="1"/> <option name="unitPresence" value="GermanySetupSwitch2" count="1"/> <option name="unitPresence" value="GermanyHasNotSetupSwitch" count="1"/> <option name="players" value="Neutral"/> </attachment> <attachment name="conditionAttachmentFranceSetupSwitch1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directPresenceTerritories" value="Space" count="1"/> <option name="unitPresence" value="FranceSetupSwitch1" count="1"/> <option name="unitPresence" value="FranceHasNotSetupSwitch" count="1"/> <option name="players" value="Neutral"/> </attachment> <attachment name="conditionAttachmentFranceSetupSwitch2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="directPresenceTerritories" value="Space" count="1"/> <option name="unitPresence" value="FranceSetupSwitch2" count="1"/> <option name="unitPresence" value="FranceHasNotSetupSwitch" count="1"/> <option name="players" value="Neutral"/> </attachment> <!-- Country Randomisation Switches Setup--> <attachment name="triggerAttachmentGermanySetupSwitch1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentCountrySetupFirstRound"/> <option name="placement" value="Space:GermanySetupSwitch1"/> <option name="players" value="Neutral"/> <option name="chance" value="2:2"/> </attachment> <attachment name="triggerAttachmentGermanySetupSwitch2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentCountrySetupFirstRound"/> <option name="placement" value="Space:GermanySetupSwitch2"/> <option name="players" value="Neutral"/> <option name="chance" value="1:2"/> </attachment> <attachment name="triggerAttachmentFranceSetupSwitch1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentCountrySetupFirstRound"/> <option name="placement" value="Space:FranceSetupSwitch1"/> <option name="players" value="Neutral"/> <option name="chance" value="2:2"/> </attachment> <attachment name="triggerAttachmentFranceSetupSwitch2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentCountrySetupFirstRound"/> <option name="placement" value="Space:FranceSetupSwitch2"/> <option name="players" value="Neutral"/> <option name="chance" value="1:2"/> </attachment> <!-- Country Randomisation Triggers Setup--> <attachment name="triggerAttachmentGermanySetupHasSetup" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="removeUnits" value="Space:GermanyHasNotSetupSwitch" count="1"/> <option name="players" value="Neutral"/> </attachment> <attachment name="triggerAttachmentGermanySetupG1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="placement" value="Berlin:Infantry" count="2"/> <option name="placement" value="Munich:Infantry" count="1"/> </attachment> <attachment name="triggerAttachmentGermanySetupG2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="placement" value="Berlin:Infantry" count="3"/> <option name="placement" value="Munich:Infantry" count="2"/> </attachment> <attachment name="triggerAttachmentFranceSetupHasSetup" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="removeUnits" value="Space:GermanyHasNotSetupSwitch" count="1"/> <option name="players" value="Neutral"/> </attachment> <attachment name="triggerAttachmentFranceSetupF1" attachTo="France" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="placement" value="Paris:Infantry" count="4"/> </attachment> <attachment name="triggerAttachmentFranceSetupF2" attachTo="France" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="placement" value="Paris:Infantry" count="2"/> <option name="placement" value="Marseille:Infantry" count="2"/> </attachment> <attachment name="triggerAttachmentGermansSetupG1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentGermanySetupSwitch1:conditionAttachmentGermanySetupSwitch2"/> <option name="conditionType" value="1"/> <option name="when" value="before:germanyCombatMove"/> <-Change this to the very first phase of your map. -> <option name="activateTrigger" value="triggerAttachmentGermanySetupHasSetup:1:false:false:false:false"/> <option name="activateTrigger" value="triggerAttachmentGermanySetupG1:1:false:false:false:false"/> </attachment> <attachment name="triggerAttachmentTGermansSetupG2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentGermanySetupSwitch1:conditionAttachmentGermanySetupSwitch2"/> <option name="conditionType" value="2"/> <option name="when" value="before:germanyCombatMove"/> <-Change this to the very first phase of your map. -> <option name="activateTrigger" value="triggerAttachmentGermanySetupHasSetup:1:false:false:false:false"/> <option name="activateTrigger" value="triggerAttachmentGermanySetupG2:1:false:false:false:false"/> </attachment> <attachment name="triggerAttachmentFranceSetupF1" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentFranceSetupSwitch1:conditionAttachmentFranceSetupSwitch2"/> <option name="conditionType" value="1"/> <option name="when" value="before:germanyCombatMove"/> <-Change this to the very first phase of your map. -> <option name="activateTrigger" value="triggerAttachmentFranceSetupHasSetup:1:false:false:false:false"/> <option name="activateTrigger" value="triggerAttachmentFranceSetupF1:1:false:false:false:false"/> </attachment> <attachment name="triggerAttachmentFranceSetupF2" attachTo="Germany" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentFranceSetupSwitch1:conditionAttachmentFranceSetupSwitch2"/> <option name="conditionType" value="2"/> <option name="when" value="before:germanyCombatMove"/> <-Change this to the very first phase of your map. -> <option name="activateTrigger" value="triggerAttachmentFranceSetupHasSetup:1:false:false:false:false"/> <option name="activateTrigger" value="triggerAttachmentFranceSetupF2:1:false:false:false:false"/> </attachment> --- <unitPlacement unitType="GermanyHasNotSetupSwitch" territory="Space" quantity="1" /> <unitPlacement unitType="FranceHasNotSetupSwitch" territory="Space" quantity="1" />

    Hopefully this will work for you. Perhaps it could be done in a different way but Ive been using methods like this on my map with no issues.
    Though I think the issue with this way is that if you expand it to more then 3 setup variants there will be an uneven chance on some of them happening, idk im bad at ratios.

    For a short explanation: 1-2 switches for both Germany and France are made, and then the triggers that spawn units for G1-2 and F1-2 occur depending on whether theres 1 switch or 2 switches that have spawned.

    read more
  • @rogercooper Each nations will have its own 6 different versions of starting set ups which will trigger independently which means almost countless amount of different set ups actually.

    6 is just an example which can be reduced to 3 or 4.

    For example here is German Set Ups: G1,G2,G3,G4,G5,G6 and French Set Ups: F1,F2,F3,F4,F5,F6

    If (for example) G4 triggers as German set up it doesn't mean that also F4 should be triggered.

    I'am not good at handling triggers honestly and could do only if other maps have the same concept.

    I'd be very grateful if someone could write the attachments as example. Could be great asset for other map makers too.

    For example here is a simplified scenario:

    Germany and France are the only nations. German territories are Berlin-Munich and French ones are Paris-Marseille. Infantry is the only unit.

    G1 set up: 2 inf for Berlin and 1 inf for Munich
    G2 set up: 3 inf for Berlin and 2 inf for Munich

    F1 set up: 4 inf for Paris
    F2 set up: 2 inf for Paris and 2 inf for Marseille

    read more