Technology Rolls, enabling other technology rolls
-
Is anyone aware of code that will enable a successful tech roll to enable other tech rolls? So for example.. as successful tech roll for "science" would then enable a tech roll for "Heavy Tanks".. Trying to build a complicated tech tree that requires a focused investment to get the really cool items. Any thoughts on this would be appreciated.
-
@Swampy hmm...I would think you could. Idk as I haven't done it. Maybe try something like:
<attachment name="conditionAttachmentDummyCondition" attachTo="French" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="directOwnershipTerritories" value="United Kingdom"/>
<option name="invert" value="true"/>
</attachment><attachment name="triggerAttachment_GermansRollForHeavyTanks" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachmentDummyCondition"/>
<option name="tech" value="HeavyTanks"/>
<option name="uses" value="1"/>
</attachment><attachment name="conditionAttachmentScience" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="techs" value="Science" count="1"/>
</attachment><attachment name="triggerAttachment_ScienceSuccessfullyResearched" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachmentScience"/>
<option name="chance" value="1:6"/>
<option name="when" value="after:germansNonCombatMove"/>
<option name="uses" value="1"/>
<option name="activateTrigger" value="triggerAttachment_GermansRollForHeavyTanks:1:true:true:false:false"/>
</attachment>You'll need a separate condition and trigger for each Player. The Dummy Condition is just something that is always true. The French and United Kingdom are allies so France can never control UK's capital.
Then you have "triggerAttachment_GermansRollForHeavyTanks" that uses Dummy that is activated by "triggerAttachment_ScienceSuccessfullyResearched". I think these need to be before "conditionAttachmentScience" or at least Dummy does.
Now "conditionAttachmentScience" says that when the Germans have the tech Science it will acivate "triggerAttachment_ScienceSuccessfullyResearched" which will then roll at a 1 in 6 chance of activating Heavy Tanks.
Idk if you need "uses" or what it defaults to, but just set it to "99" or something. You'll want to make sure your "when" is set correctly for all the differnt Player triggers and attached correctly.
At any rate, hope that's not too confusing. Might be worth a shot. : )
Then again, there might be a real easy way to do it too
I think you'll need a Notification in your "notification.properties" too.
Germany_Has_Researched_Heavy_Tanks!=<body>Germany Now Has Heavy Tanks</body>
And in the xml:
attachment name="conditionAttachmentHeavyTanks" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
<option name="techs" value="HeavyTanks" count="1"/>
</attachment><attachment name="triggerAttachment_GermanyHasHeavyTanks" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
<option name="conditions" value="conditionAttachmentHeavyTanks"/> <option name="when" value="after:germansPolitics"/> <option name="notification" value="Germany_Has_Researched_Heavy_Tanks!"/> </attachment>
-
@Swampy Look at Total World War: December 1941 That is exactly how all the techs work.
-
@beelee This looks very helpful! Let me fool around with this and see if I can get it to work.
-
@swampy Hey did you have any luck with this? I've been looking through the Total World War code and the pieces I've found are TechPoints, tech conditions, and tech triggers which seems to interlink together.
My interest is in using Tech Points as a resource used to unlock 4 technology levels, each requiring the previous to unlock. It seems like I could use TechPoints to "buy" a level, and then use conditions and triggers to activate the second level being available.
Any help would be great from anyone.
-
Hello there @unit332
Have you looked at AoT (Age of Tribes)? It has a large 'Tech' tree, which uses a 'Tech' resource, and the 'Tech's' purchased instead of using 'Tech/Tech Advance'.
Also look at TWW (Total World War), which uses 'Tech/Tech Advance' to advance through its techs.
Then there are maps/games like 41 GCD (1941 Global Command Decision) where techs are given to a player depending on the round of the game.
So, there are many different ways to do 'Tech's'.
But most of all, have FUN! @TheDog, @Cernel and @Black_Elk have loads of skills and I'm sure they will help. Keep the community informed on your progress!
Cheers...
-
@wc_sumpton Thanks! Working on a big Gundam mod so Tech is a big important lmao.
-
I've settled on Age of Tribes approach. Very straight-forward.