Island bunkers
-
I wonder if it is possible to create a unit with the following requirements:
A) only available for Japan
can be "produced" only on islands
C) can be "produced" without a factory or similar production unit
D) is buyable from round 5 on. Round 1-4 has to blocked somehow (probably by a trigger function)Any idea if this is possible.
If, please tell me the XOB coding.
Thx -
bullet point B ) turned into an emoji.....
-
@numetalfan he musta bowled up lol
Yea it's possible. There's a bit that goes into it. You can look at "Atlantic Wall" here
I think that does what you want.
-
I guess beelee gave you already a proper and satisfying answer, but I would recommend you to have a look into the "game properties" basically and because I'm right now working on something that has also to do with YOUR point "D":
NWO (New World Order) game.xml will show you easily how you can handle producing at different rounds - with triggers...When will the community be able to have a look at your game - of course with these "island bunkers"?
Greetings
-
schon bald - ist fast fertig.
-
I found in the global_40_expansion.xml:
a)
<unit name="Atlantic_Wall"/>b)
<productionRule name="buyAtlantic_Wall">
<cost resource="PUs" quantity="1"/>
<result resourceOrUnit="Atlantic_Wall" quantity="1"/>
</productionRule>c) <!-- Atlantic Wall -->
<attachment name="unitAttachment" attachTo="Atlantic_Wall" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
<option name="attack" value="0"/>
<option name="defense" value="0"/>
<option name="isConstruction" value="true"/>
<option name="constructionType" value="Fortification"/>
<option name="constructionsPerTerrPerTypePerTurn" value="99"/>
<option name="maxConstructionsPerTypePerTerr" value="99"/>
<option name="requiresUnits" value="infantry"/>
<option name="unitPlacementOnlyAllowedIn" value="Normandy Bordeaux:Norway:Denmark:Holland Belgium"/>
</attachment>d) <attachment name="supportAttachmentAtlantic_Wall" attachTo="Atlantic_Wall" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType">
<option name="unitType" value="infantry"/>
<option name="faction" value="allied"/>
<option name="side" value="defence"/>
<option name="dice" value="strength"/>
<option name="bonus" value="1"/>
<option name="number" value="1"/>
<option name="bonusType" value="fortification"/>
<option name="impArtTech" value="false"/>
<option name="players" value="Germans:Russians:Americans:British:French:Italians:Japanese:Chinese:ANZAC:French:Dutch"/>
</attachment>e)<attachment name="triggerAttachment_AtlanticWall" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachment_SwitchIsTrue:conditionAttachmentTurn6OrHigher"/>
<option name="productionRule" value="productionGermans:buyAtlantic_Wall"/>
<option name="uses" value="1"/>
<option name="when" value="before:germansPurchase"/>
</attachment>
<attachment name="triggerAttachment_AtlanticWallNotification" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachmentTurn6"/>
<option name="uses" value="1"/>
<option name="when" value="before:germansPurchase"/>
<option name="notification" value="AtlanticWall"/>
</attachment>and
<attachment name="conditionAttachmentTurn6" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="rounds" value="6"/>
</attachment><attachment name="conditionAttachmentTurn6OrHigher" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="rounds" value="6-+"/> </attachment>
think thats all - I will try to use this
-
damn!
after my changes I got:
-
Exception: java.lang.NullPointerException
java.lang.Exception
at games.strategy.triplea.delegate.InitializationDelegate.initShipyards(InitializationDelegate.java:290)
at games.strategy.triplea.delegate.InitializationDelegate.init(InitializationDelegate.java:74)
at games.strategy.triplea.delegate.InitializationDelegate.start(InitializationDelegate.java:46)
at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:519)
at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:398)
at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:297)
at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInternal(LocalLauncher.java:82)
at games.strategy.engine.framework.startup.launcher.LocalLauncher.lambda$launch$0(LocalLauncher.java:56)
at java.base/java.lang.Thread.run(Unknown Source)
Anyone an idea what the message shuld tell me? Where I can find the problem.
-
also make sure you have these game properties activated
"More Constructions with Factory"
"More Constructions without Factory"
"Unlimited Constructions"So the error looks like the "Shipyards" tech is the problem. If you have player specific units for individual players, you need to disable it. You can recreate a different "Shipyard" tech if you want to have it.
Check POS2
-
all problems solved - indead, it was the tech
tested those bunkers, everything works now, very well