<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[End turn trigger calculation]]></title><description><![CDATA[<p dir="auto">I wrote small code that gives 5 pu to Germans at the end of his turn, if Holland is contolled by Neutral_True. It appears below the screen as +5 but doesn't be collected at the end of the turn. It didn't shown in end turn summary too. So, what should I add to my code to show it in end turn summary and make true calculation?</p>
<pre><code>	&lt;attachment name="conditionAttachment_Germans_Check_Neutral_Netherlands" attachTo="Neutral_True" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
		&lt;option name="directOwnershipTerritories" value="Holland" count="1"/&gt;
	&lt;/attachment&gt;

	&lt;attachment name="conditionAttachment_Germans_Neutral_Netherlands" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
		&lt;option name="conditions" value="conditionAttachment_Germans_Check_Neutral_Netherlands"/&gt;
	&lt;/attachment&gt;	

	    &lt;!-- Germans Triggers --&gt;
	&lt;attachment name="triggerAttachment_Germans_Neutral_Netherlands_Imports" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;
		&lt;option name="trigger" value="conditionAttachment_Germans_Neutral_Netherlands"/&gt;
		&lt;option name="resource" value="PUs"/&gt;
		&lt;option name="resourceCount" value="5"/&gt;
	&lt;/attachment&gt;
</code></pre>
<p dir="auto">Additional question: Pact of Steel 2 says that Strategic Bombing can do damage directly player's PUs. How can add ability to my zeppelins damage directly to the player's PUs?</p>
<pre><code>&lt;!-- Damage From Bombing Done To Units Instead Of Territories has Strategic Bombing and Rockets do damage to a specific unit rather than directly to the player's PUs or to a territory. --&gt;
&lt;property name="Damage From Bombing Done To Units Instead Of Territories" value="true" editable="false"&gt;
  &lt;boolean/&gt;
&lt;/property&gt;
</code></pre>
]]></description><link>https://forums.triplea-game.org/topic/2170/end-turn-trigger-calculation</link><generator>RSS for Node</generator><lastBuildDate>Sun, 13 Sep 2026 17:43:08 GMT</lastBuildDate><atom:link href="https://forums.triplea-game.org/topic/2170.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Jul 2020 16:11:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to End turn trigger calculation on Sun, 02 Aug 2020 00:54:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a></p>
<p dir="auto">I started a <a href="https://forums.triplea-game.org/topic/2178/custom-technology-nullpointerexception">new topic</a> for this discussion.</p>
<p dir="auto">Cheers...</p>
]]></description><link>https://forums.triplea-game.org/post/41591</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41591</guid><dc:creator><![CDATA[wc_sumpton]]></dc:creator><pubDate>Sun, 02 Aug 2020 00:54:58 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Sat, 01 Aug 2020 22:48:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stalinpasha" aria-label="Profile: stalinpasha">@<bdi>stalinpasha</bdi></a> yea I agree it doesn't seem to be activating correctly. I'm not sure what the "ChangeFactory" is about. At any rate, do you have:</p>
<p dir="auto">&lt;delegate name="tech_activation" javaClass="games.strategy.triplea.delegate.TechActivationDelegate" display="Activate Technology"/&gt;</p>
<p dir="auto">All I can think of at the moment. The Wizard wc_ probably chime in soon <img src="https://forums.triplea-game.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=f80efd2fa9e" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forums.triplea-game.org/post/41576</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41576</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Sat, 01 Aug 2020 22:48:24 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Sat, 01 Aug 2020 10:34:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wc_sumpton" aria-label="Profile: wc_sumpton">@<bdi>wc_sumpton</bdi></a></p>
<p dir="auto">I receive java null pointer exception, when I got hit. My custom tech is about unlocking ww1 tank. I think my buytank productionRule works well, so exception related to tech activation.</p>
<p dir="auto"><img src="/assets/uploads/files/1596277239788-1.png" alt="1.png" class=" img-fluid img-markdown" /></p>
<pre><code>&lt;technology&gt;
	&lt;technologies&gt;
		&lt;techname name="caterpillar_combat_vehicle"/&gt;
	&lt;/technologies&gt;
	
	&lt;playerTech player="AustroHungarians"&gt;
		&lt;category name="caterpillar_combat_vehicle"&gt;
			&lt;tech name="caterpillar_combat_vehicle"/&gt;			
		&lt;/category&gt;
	&lt;/playerTech&gt;
&lt;/technology&gt;


	&lt;attachment name="conditionAttachmentUnlockTankA" attachTo="AustroHungarians" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
					&lt;option name="techs" value="caterpillar_combat_vehicle" count="1"/&gt;
	&lt;/attachment&gt;
	
	
	&lt;attachment name="triggerAttachmentAustriaUnlockTank" attachTo="AustroHungarians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;
            	&lt;option name="trigger" value="conditionAttachmentUnlockTankA"/&gt;
				&lt;option name="productionRule" value="productionAustroHungarians:buytank"/&gt;
				&lt;option name="uses" value="1"/&gt;
				&lt;option name="when" value="after:austrohungariansTechActivation"/&gt;
    &lt;/attachment&gt;	
</code></pre>
<p dir="auto">Error Log:</p>
<p dir="auto">Tem 31, 2020 6:55:34 AM games.strategy.engine.framework.GameRunner lambda$start$0<br />
SEVERE: null<br />
java.lang.NullPointerException<br />
at games.strategy.engine.data.changefactory.GenericTechChange.&lt;init&gt;(GenericTechChange.java:22)<br />
at games.strategy.engine.data.changefactory.ChangeFactory.genericTechChange(ChangeFactory.java:184)<br />
at games.strategy.triplea.delegate.TechTracker.addAdvance(TechTracker.java:62)<br />
at games.strategy.triplea.delegate.TechActivationDelegate.start(TechActivationDelegate.java:51)<br />
at games.strategy.engine.framework.ServerGame.startStep(ServerGame.java:511)<br />
at games.strategy.engine.framework.ServerGame.runStep(ServerGame.java:414)<br />
at games.strategy.engine.framework.ServerGame.startGame(ServerGame.java:290)<br />
at java.util.Optional.ifPresent(Unknown Source)<br />
at games.strategy.engine.framework.startup.launcher.LocalLauncher.launchInNewThread(LocalLauncher.java:41)<br />
at games.strategy.engine.framework.startup.launcher.AbstractLauncher.lambda$launch$0(AbstractLauncher.java:51)<br />
at java.lang.Thread.run(Unknown Source)</p>
<p dir="auto">List of rules that I added:</p>
<pre><code>			&lt;property name="Tech Development" value="true" editable="true"&gt;
					&lt;boolean/&gt;
			&lt;/property&gt;

			&lt;property name="Remove All Tech Tokens At End Of Turn" value="false" editable="true"&gt;
					&lt;boolean/&gt;
			&lt;/property&gt;


			&lt;property name="WW2V3" value="true" editable="false"&gt;
					&lt;boolean/&gt;
			&lt;/property&gt;

			&lt;property name="WW2V3 Tech Model" value="true" editable="false"&gt;
					&lt;boolean/&gt;
			&lt;/property&gt;

			&lt;property name="Selectable Tech Roll" value="false" editable="false"&gt;
					&lt;boolean/&gt;
			&lt;/property&gt;
</code></pre>
]]></description><link>https://forums.triplea-game.org/post/41560</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41560</guid><dc:creator><![CDATA[stalinpasha]]></dc:creator><pubDate>Sat, 01 Aug 2020 10:34:54 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Thu, 30 Jul 2020 20:57:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stalinpasha" aria-label="Profile: stalinpasha">@<bdi>stalinpasha</bdi></a><br />
First check your properties:</p>
<pre><code> &lt;property name="Tech Development" value="true" editable="true"&gt;
     &lt;boolean/&gt;
 &lt;/property&gt;
</code></pre>
<p dir="auto">Also depending on how the tech is to be selected you may want to check some of these:</p>
<pre><code>&lt;!-- ww2v2 rules override many individual rules to create revised rules --&gt;
&lt;property name="WW2V2" value="false" editable="false"&gt;
   &lt;boolean/&gt;
&lt;/property&gt;
&lt;!-- Unlike the WW2V2 option, WW2V3 actually sets very little: If no techs specified then it will create WW2V3 default techs, and if a game is not WW2V2 and not WW2V3, then it must be 'classic' rules [this is applicable for when rockets fire, and how aa guns may stack, the default win conditions for classic games, and that air units create retreat paths for ground/sea units]--&gt;
&lt;property name="WW2V3" value="true" editable="false"&gt;
    &lt;boolean/&gt;
&lt;/property&gt;
&lt;property name="WW2V3 Tech Model" value="true" editable="false"&gt;
    &lt;boolean/&gt;
&lt;/property&gt;
</code></pre>
<p dir="auto">If these are set and you are still having problems, let the board know. We are here to help!</p>
<p dir="auto">Cheers...</p>
]]></description><link>https://forums.triplea-game.org/post/41511</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41511</guid><dc:creator><![CDATA[wc_sumpton]]></dc:creator><pubDate>Thu, 30 Jul 2020 20:57:09 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Thu, 30 Jul 2020 11:46:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wc_sumpton" aria-label="Profile: wc_sumpton">@<bdi>wc_sumpton</bdi></a>  Thanks a lot. Finally, I have hunger games in Germany:D<br />
<img src="/assets/uploads/files/1596109160053-1.png" alt="1.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Any recommends how I add tech to map? I tried to copy from other maps but didn't success yet.</p>
]]></description><link>https://forums.triplea-game.org/post/41496</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41496</guid><dc:creator><![CDATA[stalinpasha]]></dc:creator><pubDate>Thu, 30 Jul 2020 11:46:20 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Wed, 29 Jul 2020 23:54:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stalinpasha" aria-label="Profile: stalinpasha">@<bdi>stalinpasha</bdi></a><br />
If I am understanding you correctly Neutral_True control Holland at the start of the game, and as long as Neutral_True retain control of Holland you want Germany to collect an additional 5PUs. Also you did not report any errors so you must have caught my "condition" value="conditionAttachment_Germans_Neutral_Netherlands" should have been "conditionAttachment_Germans_Check_Neutral_Netherlands". One more thing, the switch that needs a switch</p>
<pre><code>&lt;property name="National Objectives" value="true" editable="false"&gt;
   &lt;boolean/&gt;
&lt;/property&gt;
</code></pre>
<p dir="auto">In summery, your first condition with the national objective:</p>
<pre><code>&lt;attachment name="conditionAttachment_Germans_Check_Neutral_Netherlands" attachTo="Neutral_True" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
   &lt;option name="directOwnershipTerritories" value="Holland" count="1"/&gt;
&lt;/attachment&gt;

 &lt;attachment name="objectiveAttachment_Germans_Neutral_Netherlands_Imports" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
   &lt;option name="conditions" value="conditionAttachment_Germans_Check_Neutral_Netherlands"/&gt;
   &lt;option name="objectiveValue" value="5"/&gt;
&lt;/attachment&gt;
</code></pre>
<p dir="auto">With the property switch, should give you what you want.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beelee" aria-label="Profile: beelee">@<bdi>beelee</bdi></a> good catch, but I think <a class="plugin-mentions-user plugin-mentions-a" href="/user/stalinpasha" aria-label="Profile: stalinpasha">@<bdi>stalinpasha</bdi></a> was trying the first part. Still a very good catch!!</p>
<p dir="auto">Cheers...</p>
]]></description><link>https://forums.triplea-game.org/post/41467</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41467</guid><dc:creator><![CDATA[wc_sumpton]]></dc:creator><pubDate>Wed, 29 Jul 2020 23:54:53 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Wed, 29 Jul 2020 22:14:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stalinpasha" aria-label="Profile: stalinpasha">@<bdi>stalinpasha</bdi></a> double check "after:germanyEndTurn" usually it'll be the same as attachTo="Germans" but not always.</p>
]]></description><link>https://forums.triplea-game.org/post/41460</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41460</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Wed, 29 Jul 2020 22:14:27 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Wed, 29 Jul 2020 21:35:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/wc_sumpton" aria-label="Profile: wc_sumpton">@<bdi>wc_sumpton</bdi></a> Thanks for your helpful support. I changed it but didn't work. Holland is controlled by Neutral_True initially.<br />
<img src="/assets/uploads/files/1596058502940-1.png" alt="1.png" class=" img-fluid img-markdown" /></p>
<pre><code>	&lt;attachment name="conditionAttachment_Germans_Neutral_Netherlands" attachTo="Neutral_True" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
		&lt;option name="directOwnershipTerritories" value="Holland" count="1"/&gt;
	&lt;/attachment&gt;		

	&lt;!-- Germans Triggers --&gt;
	&lt;attachment name="triggerAttachment_Germans_Neutral_Netherlands_Imports" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;
	&lt;!--- changed trigger to conditions --&gt;
		&lt;option name="conditions" value="conditionAttachment_Germans_Neutral_Netherlands"/&gt;
		&lt;option name="resource" value="PUs"/&gt;
		&lt;option name="resourceCount" value="5"/&gt;
		&lt;option name="when" value="after:germanyEndTurn"/&gt;
	&lt;/attachment&gt;
</code></pre>
]]></description><link>https://forums.triplea-game.org/post/41457</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41457</guid><dc:creator><![CDATA[stalinpasha]]></dc:creator><pubDate>Wed, 29 Jul 2020 21:35:21 GMT</pubDate></item><item><title><![CDATA[Reply to End turn trigger calculation on Tue, 28 Jul 2020 21:16:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/stalinpasha" aria-label="Profile: stalinpasha">@<bdi>stalinpasha</bdi></a></p>
<p dir="auto">Second question first. To change SBR damage to affect PUs change the property to false:</p>
<pre><code>&lt;!-- Damage From Bombing Done To Units Instead Of Territories has Strategic Bombing and Rockets do damage to a specific unit rather than directly to the player's PUs or to a territory. --&gt;
&lt;property name="Damage From Bombing Done To Units Instead Of Territories" value="false" editable="false"&gt;
  &lt;boolean/&gt;
&lt;/property&gt;
</code></pre>
<p dir="auto">Change the second condition in your first example to a 'National Objective':</p>
<pre><code> &lt;attachment name="objectiveAttachment_Germans_Neutral_Netherlands_Imports" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"&gt;
   &lt;option name="conditions" value="conditionAttachment_Germans_Neutral_Netherlands"/&gt;
   &lt;option name="objectiveValue" value="5"/&gt;
&lt;/attachment&gt;
</code></pre>
<p dir="auto">Now the trigger is not needed.</p>
<p dir="auto">Or just add a "when" option to the trigger:</p>
<pre><code>&lt;!-- Germans Triggers --&gt;
&lt;attachment name="triggerAttachment_Germans_Neutral_Netherlands_Imports" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"&gt;
   &lt;!--- changed trigger to conditions --&gt;
   &lt;option name="conditions" value="conditionAttachment_Germans_Neutral_Netherlands"/&gt;
   &lt;option name="resource" value="PUs"/&gt;
   &lt;option name="resourceCount" value="5"/&gt;
   &lt;option name="when" value="after:germanyEndTurn"/&gt;
&lt;/attachment&gt;
</code></pre>
<p dir="auto">Both way should work for what you are asking.</p>
<p dir="auto">Cheers.</p>
]]></description><link>https://forums.triplea-game.org/post/41411</link><guid isPermaLink="true">https://forums.triplea-game.org/post/41411</guid><dc:creator><![CDATA[wc_sumpton]]></dc:creator><pubDate>Tue, 28 Jul 2020 21:16:38 GMT</pubDate></item></channel></rss>