Since I haven't been around due to my computer having died, I'll see about answering some of your questions now that I'm back.
2. Reading the manual, it was unclear whether ~[block] and ![block] could be combined. Please clarify, or if you're still at the stage where the syntax can change, I suggest replacing
~[block]
with
?[block]
~
It seems clearer and more consistent to me.
Hmm. I have no idea what would happen if you mixed ![stuff] and ~[stuff] lines together (You couldn't write !~[foo] or ~![foo]). In all likelihood, it would not be pretty.
3. It was also unclear how you could add new blocks to a file. (I know in general it's better not to, but sometimes it might make sense.) Perhaps a specific command for appending new blocks to a file would be good.
Currently you would have to have every line preceded with a +, and that assumes that they get placed in the correct place (if you have them at the end of the file, that would be to also put them at the end of the file... I don't remember if that's what would actually happen, or if they would end up at the beginning of the previous block).
4. Finally, what would really make this take off IMHO is if it could generate a change file from a traditional mod. I realize that's kind of a tall order though.
It would, but it's something that I'm probably unlikely to do myself.
5. Another thought, as I sit down to actually try and make a mod using this... Since +[stuff] (add) and [stuff] (change) are different commands, does that mean I have to know whether a given tag already exists? What happens if I try to add a tag that is already present or change one that isn't? This is fairly important for mod compatibility.
Not necessarily. If you use +[something], then you will always add the line, no matter if it exists already or not. If you use [something] without a +, and the line does not exist yet, it will create the line anyways. So you really only need the + if you want to NOT overwrite existing lines with the same name [foo:] or whatever.
I really like uristmod, it's a great idea. But I think that two things need to be added before it will be used widely.
- A diff-like function, which compares two sets of raws and automatically creates a .changes file. I think most modders will still modify the raws directly, writing the .changes file will then be additional work. Just running the program and getting a .changes file would probably increase the acceptance of uristmod by modders. I suppose creating this would not be much of a problem for you.
It's a bit more complicated than that, considering things in the file can be moved around, etc. Look at how inaccurate WinMerge manages to be most of the time.
- A 'better' interface would probably increase the acceptance by users. I haven't worked with haskell for a very long time, so I don't know what it is capable of today, but I suppose creating an (non text) interface is still not possible. I would volunteer to provide a typical wimp interface (a window with file/folder selection, lists, buttons, etc.) that then starts uristmod.exe. To make this possible uristmod would need to be able to take arguments (e.g. uristmod.exe 1 /mymodfolder ). So just let me know if you are interested in that.
Anyone who wants to contribute to it is welcome to do so (It is open source). Haskell actually should be capable of using a GUI using TCL/tk, IIRC, I just didn't want to spend 80% of my time messing with that (seeing as I've never used it before) instead of actually working on Uristmod.
Dumb question: Can uristmod, as it stands, be used to edit sub-things like entity positions
Not really. It won't see POSITION as a block start tag because it isn't the tag specified at the beginning of the entity_default.txt (ENTITY is), so it won't treat it as a block beginning - although that could be forced by modifying the code to specify that POSITION really is a block start tag. If that were done, then it would see anything under a ?[POSITION] or ![POSITION] or the like as part of it. The same could be done for other sub-block token names. (I'd rather not hard-code them, but if they aren't listed anywhere in any raw files, there wouldn't be any other way)