These are fine, but I'm not quite sure why you defined the three datasets "WorldTest", "InventoryTest" and "MonarchTest"? Presuming there's a reason outside the scope of this code sample, there are some things to point out:
(1) ACTools automatically predefines specific datasets for you. In this case the ones you're interested in are "DSWorld", "DSInventory" and "DSMonarch". There are others as well, but as you're not referencing them, I won't either. I point this out because, unless there is another specific reason for duplicating the internal datasets, you don't need to do so: you can work straight from the internal sets directly. I'm not saying that there's no reason to duplicate them, there are several good reasons, one of which is discussed at length
here but if you're doing it simply for dereferncing the data, it's an unnecessary step.
(2) Calling one of the "
LoadDecalX" commands populates the relevant internal dataset with the relevant information, gleaned from Decal. These datasets are NOT updated in real-time. They are ONLY populated when the relevant "
LoadDecalX command is called. In this case, all previous data in the set is erased and new data repopulates the set.
(3) You dereference/utilise these datasets exactly the same way as
any other dataset you've created, with all the same commands and methodologies.
(4) It looks as though you're manually copying the contents of the internal datasets to a backup dataset, you should look up "
DSCopy" in relation to this process.
Taking these things into account, your code sample could be rewritten like so: