I was poking around in the JSONs, preparing to put together a PR of some new XL items, but basically because I’m extremely lazy, I thought to myself “surely there’s a quicker, easier way than doing all this tedious manual data entry”.
First of all, it seemed to me that adding and modifying items would be much simpler and easier if you had it in a spreadsheet rather than a JSON. Did a bit of googling, found a script (http://blog.fastfedora.com/projects/import-json#ImportJSON) that very neatly pulls things out of a JSON and into a nice spreadsheet. That, by itself, makes things a lot easier, I think.
Now I’m not really a computers person, but even from what I vaguely recall from school IT lessons years ago, it ought to be possible (and I think actually relatively straightforward) to go further than this and do a bunch of automation to speed things up a lot.
So, for instance, I’ve been looking at armor.json, and it seemed to me that you could have a system where you define certain functions relating e.g. material, coverage, and body part to weight, volume, warmth, protection etc. with coefficients variously defined for each material type and so on. So that would allow you, for instance if you wanted to make a set of leather armour, to enter the material and the coverage, and have it automatically generate not only the other properties of the item, but also the properties for each part of the armour set. And you could then fine tune them manually if you thought there should be any exceptions to the general guidelines.
I’ve not yet looked at the code for the recipes, but if it’s in comparable json formatting, it ought also to be possible to use the same system to automatically generate crafting recipes for them. And admittedly I’ve not given the idea that much thought or looked at any of the other JSON files, but it could be that the same idea could have even more uses, but honestly I think just what I’ve outlined already seems labour-saving enough.
I sounded this out on the IRC, assuming that if it was feasible,somebody else must have already had a crack at it, but the response I got was basically, “Yeah, that’s sounds like it could be useful”.
Now, again as I say, I am not exactly tech-savvy - so if somebody more capable wants to have a go at it, I imagine you’d be able to do it much more quickly and get a much better and more elegant end-result.
However, if I’m not mistaken, it’s not actually a very complex project skills-wise, it just requires a fair amount of legwork to get set up. So if nobody else fancies it, I’ll probably have a more detailed look at it tomorrow and see if I can work out how to get it set up. If nothing else, it’ll be useful for me as a vehicle for relearning how to use spreadsheets, even if it turns out to be a deadend mod-wise.
I don’t actually know yet how to output a JSON from a spreadsheet, but if there’s a straightforward script for importing them, I presume it won’t be too hard to find one for exporting them and I’m told it should be relatively simple.
Also, you might think it’d be a lot of pointless effort setting up the necessary functions and co-efficients in the first place and not worth the bother working them out, but again, it seems to me you could figure them out in a relatively easy, automated fashion by just calculating the average ratios between the relevant values of existing items.
Thoughts, comments? Does this sound feasible and useful? Has anybody already done this (if so, do you fancy sharing?)?
EDIT: The other obvious objection that strikes me, is that maybe it’s pointless because at this stage, the data’s already there for most of the game’s items. Now, obviously this system would still make adding new items much faster and easier, but if there aren’t necessarily that many new items going to be added, perhaps it’s not worth the effort. That said, it could still have the benefit of standardising the existing items - now, I don’t know if, for instance, the differences in weights or armour values of e.g. a between different parts of leather armour compared to different bits of fur armour, are organised with any precision or uniformity, or if they’re just guesstimated vaguely?
EDIT2: You could also use this system to automatically create the values for XL versions of items, with predetermined ratios of extra weight and resource requirements and so on (this is what originally got me onto the idea, actually)