Modding Questions

1) Calc Functions. Is there a list somewhere and besides UnitStats and Resources, what can we call with them? Can we refer to Player Abilities? Can we use calculations in Traits or other types they don't appear in and not just Spells/Improvements?

 

2) <RummagedPerTurn> works... how exactly? The comment says it's a returned value when something calls for the resource that's empty, but the shards return 0.01 and I have no idea why or where to find the reason.

 

If anyone has their own questions, feel free to throw them in here.

3,826 views 3 replies
Reply #1 Top

1. There's no list. Look around the game xml and see what you find. I generally use unitstats, mana powers and troopcount found in CoreSpells.xml. I seem to recall being able to use calculate tags in unit traits, but they only run once - the moment of the unit's creation. Needs more testing, have fun.

2. I don't think it does anything.

Reply #2 Top

There are a lot of left over tags from WoM.  Many no longer work. 

As for lists, Stardock has never published anything official or otherwise on how tags work (I sure wish they would!!).  The best way to learn how to use them is to look at how tags are used in the game XML.  Heaven's and Sean's mods are also excellent sources on how to do things.  I've learned a lot from looking at their modded XML.  After that, the best thing to do is just experiment for yourself.  I know I've spent hours and hours trying different things until I either figure out how they work or give up in frustration.

Reply #3 Top

Already went through all the core files and even gave a glance at Stormmod (learned a few things from that). I was just wondering if there's more I was missing. Thanks for the answers.