OK, I think this one should work if plugged into a vanilla TBA codebase (although it's possible it's reliant on a couple of the small tweaks I've pushed into my local version that I'll be sending to Fizban later, and there's always the possibility there's something here that MSVC handles that gcc et.al. won't like).
fields.c
Just add that to your project / makefile and link it up - you can replace do_set with do_fieldset in interpreter.c or have both available as required.
Notes on fieldset:
- doesn't support pfile targets yet, but other than that it should be fully functional on players, mobiles and objects
- fieldset <target> will give you a list of fields that you can set on the target
- there's a specific format required for bitvector fields unlike regular do_set.
- permissions are probably too stingy at the moment; my mindset is still set by its use on a MUD where there were several sub-classes of IMPL and rampant mate-assisting amongst the lower-level gods (I had to add fingerprints on objects, as well as code to find out 'who loaded that load-only item'...)
If you want, you can add show_object and show_mobile to do_show as well, which generate reports out of the db allowing just about any of the obj or mob struct fields as filters. Useful for balancing worldfiles - not too much of a problem with the TBA world which is very flatly balanced. To give it a spin try something like "show mob combat level=20-30" to get a list of hard mobiles.
Notes on show:
- format is show obj/mob <report> <list of filters in the form field=value or field!=value>; anything matching everything on the filter list is shown
- bitvector filters are of the form field=bit|bit|bit|bit rather than set's field.bit notation
- report formatting has known problems with colour codes in names (colour bleeds and format width issues)
- sorting and averaging are not implemented yet, but would be nice in the future