Thank you? I appreciate that this is complicated, and as I mentioned in the OP, I felt that learning by doing would be the best way to get my head wrapped around it. I have read through the guide you linked of course, as well as others and watched a few videos. I am starting from scratch, but the challenge is the fun part and makes success all the more rewarding to me. Unfortunately while I can see a few commands that would apply in the guides, I don't see a good example of how to apply them in the way I am trying to. What I was hoping to get here would be a suggestion as to how I could proceed. As you said, learn by example. Seeing an example then allows me to use and adapt it later. Instead what I am hearing is, "That's hard. Good luck."
I have been playing 7dtd for several years, but just created a forum account a few days ago as I have begun this trek toward making my own mod. If asking such ridiculous questions as "can any one help me understand" is not what these forums are for, I apologize for my ignorance and will look elsewhere for assistance in my learning process.
I'm sorry if what I wrote sounded harsh, but the way you wrote your post, it sounded like you're looking for a general guidance that would help you learn how to work with xpath and so that was the way I tried to help you. By learning by example, I literally meant learning by creating this mod. If someone wrote the actual code for you, where would be the challenge?
You need to plan this in advance if you want to succeed, so write that list of actions, like a step by step process and try to figure out the correct command and correct xpath for each step. Don't proceed to the next step before being absolutely sure that the current step is coded and working correctly. That way you will save yourself from headaches trying to figure out which part of your long code does not work. In each step, try different kinds of xpaths until you learn how to write a correct one - this is where you will have it much harder than many others before you, because you chose a mod which will require little more complex xpaths to make it work, so figuring it out without prior knowledge will not be easy.
SphereII's guide actually gives several examples for xpaths thanks to which you should be able to figure out how the xpath works and most importantly how to write your own xpaths. The thing is, you only need to get familiar with the individual commands like set, append, remove, etc. and how they work, what these commands do is well explained for each one of them. As for the xpath itself (not the command), all you need to know is that its syntax is just a general set of rules you need to follow to make it work, which is why any xpath example you will find in the guide can be re-used with other commands as well and not just with that one command that one xpath was used with in the guide, don't let that fool you lol. Think of xpath as of an advanced path that lets you navigate through the structure of xml code and allows you to specify the part of code you're trying to target, but it's always defined with the same rules or xpath commands if you will, which means that the individual nodes and whatever code is contained within them may have different names in your xpath (compared to the examples in the guide), but it's always targeted in the same fashion, using the same rules. It is up to you how exactly you define the xpath, as long as your xpath targets the exact spot in the code that you're trying to target and modify...
What I mean by this, is basically that you have one code you need to modify in several different ways. For example, you want to append something into that node and you also have to change some value in the same node. There will be two different commands with two separate xpaths, BUT the difference in the xpath will be negligible.
Example (from SphereII's guide):
Code:
<set xpath="/lootcontainers/lootcontainer[@id='62']/@size">7,6</set>
This goes into lootcontainers, looks for a lootcontainer with id 62 and in this lootcontainer changes value called "size" to 7,6.
As you may already know, lootcontainers contain loot items either directly or from a loot group. So let's say you would want to append your own loot into the same lootcontainer with id 62. How would you write it?
Code:
<append xpath="/lootcontainers/lootcontainer[@id='62']">
<YOUR NEWLY ADDED LOOT GOES HERE>
</append>
See? The command changed from set to append, BUT the only difference in the xpath itself is that in this append case we removed the last part "/@size" as that really targeted the value called "size" in our previous set command.
I hope this gives you an idea how to read SphereII's guide.
Going back to the plan / list of actions you want to perform with the file, in case you end up having a trouble with some commands or xpath in the individual steps of your plan, feel free to come back here and write what exactly you were trying to achieve in that particular step you had problem with and also write your best lines of code you could come up with in that particular step and then I might be able to tell you why it didn't work and perhaps suggest how to fix the problem if you absolutely give up trying to figure it out on your own lol