You are looking at many info about nested key manipulations
Note: this is somewhat advanced coding.
Here's a way to do nested loops for manipulating subkeys.
This object starts out with this value: k=l=m}2{n=0}1{a=b=c}2{d=e
Another way to represent the data:
k = - l = m - n=o a = - b = c - d = e
Note subkeys are l and n under k, and b and d under a.
It then uses a nested loop to modify a copy of the string, changing every subkey value to x.
Result: k=l=x}2{n=x}1{a=b=x}2{d=x
or consider it this way:
k = - l = x - n=x a = - b = x - d = x
In the code you will see some 'fake' manipulates for the key zzz. These are simply there to set up the global list for the next loop.
The basic rules are:
- In front of each foreach, use manipulate to set the global list
- Copy this same manipulate to the last statement of the block being called
- Don't change any of the variables used in the foreach in a lower nest. Change copies of them.
What is this method good for? - A nested loop that allows an object to show another object's skill values and modifiers regardless of skillnames and modifier names. - A nested loop that decrements skill modifier's counters to determine when they expire. - A nested loop to display each parameter for each key for each material on an object.
At the time of this writing, cow doesn't allow for a call to a block that is before the command line being executed. Therefore we don't have recursive loops. To traverse a tree of keys that is maximum N deep, you'll need N blocks.
To review the code: code the info about nested key manipulation
To see it in action: use the info about nested key manipulation