Buying Tech as Units
-
I'm cleaning up and advancing Jurassic. Evolution seems more appropriate for dinosaurs than Technology Development. It controls the order of advancement. I'm very close to making it happen through productionFrontiers but have a couple glitches that need your guidance. The evolution will show up as a Unit for purchase but it cannot be placed and must disappear.
One productionFrontier for all is preferred, but can make one for each player if necessary.
<productionFrontier name="production"> <frontierRules name="buyPterodactylus"/> ... <frontierRules name="buyFeathers"/> </productionFrontier> <productionFrontier name="productionFeathered"> <frontierRules name="buyPterodactylusFeathered"/> ... </productionFrontier>This is my first attempt writing a trigger. The complication is the unit count potentially messing up other game features. Can the conditionAttachment be ignored and the triggerAttachment activated from the purchase? If not, can the unit count be set to zero by the trigger? Thus, making the phantom unit vanish, while the productionFrontier gets changed.
<attachment name="conditionAttachmentCallovianFeathers" attachTo="Callovian" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player"> <option name="unit" value="feathers" count="1"/> </attachment> <attachment name="triggerAttachmentCallovianFeathers" attachTo="Callovian" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentCallovianFeathers"/> <option name="frontier" value="productionFeathered"/> <option name="unit" value="feathers" count="0"/> </attachment>The productionRule only reports a Result parameter in POS2.
<productionRule name="buyFeathers"> <cost resource="PUs" quantity="100"/> <result resourceOrUnit="feathers" quantity="1"/> <option name="maxBuiltPerPlayer" value="1"/> </productionRule>That should satisfy the Callovian Evolution condition and activate the trigger, but it needs to delete the feathers-unit purchased. OR, launch the trigger directly at time of purchase.
<productionRule name="buyCallovianFeathers"> <cost resource="PUs" quantity="100"/> <option name="activateTrigger" value="triggerAttachmentCallovianFeathers"/> </productionRule>This has to be close. It bypasses the rigid built-in tech advancements, and allows for orderly evolution if so desired. Note the old entities (unfeathered air units) still exist, but can no longer be purchased with the new productionFrontier; nor can feathers, a different purchasable evolution will take it's place.
-
@gregorek said in Buying Tech as Units:
It controls the order of advancement. I'm very close to making it happen through productionFrontiers but have a couple glitches that need your guidance.
Check "Age of Tribes" developed by @Frostion. Tech is done through purchasing and should have most of what you are looking for.
I would suggest reviewing that xml. Questions are always welcome.
Cheers...
-
@GREGOREK
1888A Steal & Steam builds on Age of Tribes to show
+Tech uses isSea & isAir so AI will target its Tech advances if it needs Sea or Air
+Tech advances are shown on Tech grid on Players tab
+Display grouping, Tech is prefixed with _DevL, _DevA, _DevS (Land, Air, Sea)Tech Tree shows the dependencies
