Iceburg71 Posted November 5, 2020 Share Posted November 5, 2020 Is there a tool or website that I can use to input the .xml file I am wanting to modify (say entitygroups.xml) and also input my mods I would like to do to that file, and have it generate an output .xml file of what those changes do? I have found where I can do single expressions, but not do a check on an entire mod. Or is there a way to have the game spit out the resultant .xml file? I just need to see what my mod is doing to the game settings after it is applied. Frustrated I can't find anything to do this. Link to comment Share on other sites More sharing options...
doughphunghus Posted November 6, 2020 Share Posted November 6, 2020 I think that inside your save game folder, there’s a copy of the game xml configs with all the mods you added merged into it. I believe there are comments that are added for every line/section that the mods changed. Like “modified by x mod”. It’s not what your asking, really, but it may be a start. You just have to open the xml file you’re wondering about and look for the comments. That’s tedious though, so if you use a tool that allows you to “search the contents of all the xml files” you can do it easier. One editor I use is “Atom” (runs on windows and Linux) that can do a global search. You have to load the folder all the xml files are in as a “project” then you “search project” for the string you’re looking for and it will list every line in every file the string is in. So you can the. Just search on the comment the game adds as the string. This exact same feature is also likely in Visual Studio community edition, but I don’t use visual studio much (it is an excellent general code editor now, though). Both editors may be a little intimidating if youve never used them. to me Atom is more user friendly to start with as a “text editor/code editor more powerful than notepad, notepad++”, etc. Sorry, another idea, than may be worse There are tools (Atom can do it. Likely visual studio as well, and “git” can do this too) that allow you to “diff” (find all the differences in) a file or files. Generally the tools will show the original file on the left, and the changes to that file on the right. Or something like that. Anyway, you could use the “original “ as the vanilla folder with all the xml files, and the “changes” as the files I mention above (in your save game folder) that are the merged copy of the files. You then “diff” them and see what the changes were. Probably easier to do with a single, small mod making changes. You might be able to load these into GitHub as commits and then see all the changeS (Babur you’d have to learn to mess with hit, u less GitHub will diff an entire project for you. I know GitHub can diff on a single file, as long as you’ve committed the changes properly . Git/GitHub may be too much work / frustration if you’ve never messed with them before Link to comment Share on other sites More sharing options...
Iceburg71 Posted November 6, 2020 Author Share Posted November 6, 2020 Thanks for the info. I will check out atom. As I learn more about xpathing and get more complicated and extensive into modding, I would like to be able to "play" with a command and see what happens as I manipulate it. It is how I learned to program in other languages (c, pascal, cobol, basic, etc...). I would like to be able to do something similar to what I would do in those languages. Simply this. Provide a source (full or partial game .xml file), provide my changes or partial changes (my mod, or just a couple of lines of code), and have a tool produce or show the result of that. In other languages I would have a popup or dialog box appear showing me what the result was after a command I used. Can't do that hear, so I need to see the output. Because of that, I can't use the save game area. I may try it but I don't think it will work. I just can't believe there isn't a tool out there to do this. It seems like a pretty simple thing to have. Link to comment Share on other sites More sharing options...
doughphunghus Posted November 6, 2020 Share Posted November 6, 2020 There may be an xml centric editor that might do this (help make changes /commands and see the result easily). I don’t know of any that will specifically do this though. My guess is that Modlet xml language they are using is not “standard” in that the xml is standard (xpath) but the actual commands in the mod like “append”, “set”, etc. are not in any standard, just something TFP made up, so no editor will be able to translate them. Link to comment Share on other sites More sharing options...
Iceburg71 Posted November 6, 2020 Author Share Posted November 6, 2020 I was wondering about that.... Thanks for all the info. Link to comment Share on other sites More sharing options...
Iceburg71 Posted November 8, 2020 Author Share Posted November 8, 2020 Thanks again for all the help. looking in the save game folder is exactly what I was looking for. A little slower than a tool, but works just the way I need it to. Thanks again. Have not solved my issue yet, but working on it. Link to comment Share on other sites More sharing options...
Laz Man Posted November 8, 2020 Share Posted November 8, 2020 Not sure if its related but there are xml validation online tools that is helpful for catching syntax errors if your interested. Link to comment Share on other sites More sharing options...
Iceburg71 Posted November 9, 2020 Author Share Posted November 9, 2020 tried those. they don't do what I need. And most don't seem to handle "append" or "set" at all. Link to comment Share on other sites More sharing options...
doughphunghus Posted November 9, 2020 Share Posted November 9, 2020 I’m not sure this even exists, but you may be able to find an xpath tool that could, in theory, sort of so this if someone had built the tool to do it. The mods commands (set,append. Are using xpath, and (I’m betting) these or similar operations are in some xpath tool. I almost feel to get what you want to do you would have to write code/scripting to use the xpath tool/apis/etc which would likely be a lot of work. update: from what I can find, I bet where you might try looking into is something that uses “libxml2”, or maybe “libxslt” which are libraries that can read/parse and write xml. I’m not seeing any easy to use tools that use them though, so likely you would have to go down a coding path to do what you want Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.