Universal Objectives
-
Is there a way of making an objective universal or apply to multiple countries as a single entry? Or does one have to enter a separate objective for each country?
What i have in mind is for control of specific territories regularly spawning free units in that territory for whoever controls it.
Would this mess up the Objectives Tab? Be nice if it could show which country (if any) currently had that bonus...
Thanks for any help.
-
Hi @cameron welcome to the site
The only way I know is to make a separate objective for each player.
You could also use a trigger and have the same condition trigger the objective for each player.You would still need to list separate triggers in the objectives.properties in order for them to show up in the sidebar.
Someone else may know of a better way
-
@cameron Hello!
Conditions are not linked to players, so you can "trick" the objectives.properties file by using several times the same conditionAttachment for several players.
Otherwise you can use variables to write the objective only once:
<attachment foreach="$AxisPlayer$" name="objectiveAttachment_@AxisPlayer@_Reached_The_Objective" attachTo="@AxisPlayer@" <option name="conditions" value="conditionAttachment_The_Same_Condition_Applies_To_All_Axis_Players"/> ... </attachment>
And then use the objectiveAttachement created this way in the objectives.properties:
objectiveAttachment_Germans_Reached_The_Objective objectiveAttachment_Italians_Reached_The_Objective objectiveAttachment_Japanese_Reached_The_Objective
I hope it helps
-
@azimuth said in Universal Objectives:
Otherwise you can use variables to write the objective only once:
yea I'd go that route
-
Thanks for the replies.
Think i might just make special factory type units that spawn the special units.
I tried:
<attachment name="territoryAttachment" attachTo="Themyscira" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory"> <option name="production" value="1"/> <option name="unitProduction" value="1"/> <option name='createsUnitsList' value='1:amazons'/> </attachment>
but i guess those options only work with units? Or did i just miss something. I seem to be constantly missing things...
Is there a list of list of territory attachments like this helpful list? -
@cameron said in Universal Objectives:
Thanks for the replies.
Think i might just make special factory type units that spawn the special units.
I tried:
<attachment name="territoryAttachment" attachTo="Themyscira" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory"> <option name="production" value="1"/> <option name="unitProduction" value="1"/> <option name='createsUnitsList' value='1:amazons'/> </attachment>
but i guess those options only work with units? Or did i just miss something. I seem to be constantly missing things...
In the line, you are using primes, whereas you should use seconds (also known as double primes) (as TripleA wrongly uses seconds as if they are either primary American English quotation marks or secondary British English quotation marks, also know as double quotes).
Yes, that is only for units: just have an "infrastructure" unit creating whatever you need wherever you need it in the starting setup.
Is there a list of list of territory attachments like this helpful list?
The official reference for game-making is
https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml