Bonus Tutorial - Using the TDESC (Patreon)
Content
Last time we saw that the TDESC and the XMLs are the same thing, they also have the same structure, and can help you understand the hierarchy inside the XMLs you'll find yourself working on. So this time, we'll not be working on S4Studio and really we'll not be doing something useful, we'll just do an exercise because writing this down can help you understand how all of this comes together and when you'll need to put some lines into an XML that doesn't have them, how to find out where to put them.
So we have an empty Notepad ++ text file, and we're going to write a loot action without any other reference than the TDESC. We'll not be looking at Maxis loot action until the end to compare what we did with what they did.
So let's search in the TDESC Actions and then loot_actions:
We'll close it all and bring up our guide:
An action is an INSTANCE, so we start by opening a tag and call it I:
Then we're going to put down the usual information this INSTANCE needs in the first line:
class, module and instance type, then we know it needs two more things:
the name and the tuning ID, that we can just make up or leave empty, as we're not really going to do anything with this loot.
Right after we completed writing our first line, we're going to press enter and close the tag:
and for all the rest we're going to write, we'll move inside it:
'cause as we can see in the TDESC, all the rest we need to write is inside it, and inside we have a TunableList called loot_actions:
Let's report it into the XML we're writing:
We open the list, give it the name, and close it right on the next line, then we move inside:
inside we have a None TunableVariant we'll need to choose, let's report it in our XML leaving the t= empty untile we choose the tunable to use:
let's choose buff:
It's a TunableTuple inside the TunableVariant:
Inside this TunableTuple there is another TunableTuple called buff the same:
and inside this other TunableTuple there is a TunableVariant that can be disabled or enabled:
Let's report all of this in our XML:
So enabled is a Tunable inside this Variant:
We're not going to write anything inside (this is where the value of the buff reason would go)
Let's go back to the TDESC:
So we have another Tunable that is NOT inside the TunableVariant but just outside. Let's report this too in the XML:
and we're done, let's compare what we did with a game loot:
So hopefully at this point all that stuff is not a foreign language anymore.