That’s the idea. The only problem is that I don’t see any way to re-use loading code so any of these tests (e.g. “is relic”, “is sword”, “is combined”) must be coded separately - see mapObjects/JsonRandom file in my branch.
(technically most of this code was present from the very beginning as part of “rewardable constructor”, I just moved it in that commit)
That depends on what type of object.
Dwellings - should be possible already including “complex” dwellings similar to Golem Factory. The only bug I know about is broken hover text - it will say “Creature generator” or something like that. Manifestation of our global problem with hover texts - that mutable field from CGObjectInstance should be banished from our code.
Objects that derive from “CRewardableObject” (full list is in config/objects/rewardable.json) - only finishing of Json config loader (~90% done). That’s assuming that there won’t be any bugs in this class - testing of all H3 objects would be a good start.
Banks - removing some hardcoded bits from code (messages and “curses” for visiting empty object)
For everything else - we need type-specific constructor that will configure object out of json - see mapObjects/CommonCostructuctors for example. Creating one is trivial but we have dozens of objects so this will take time.
All in all - I think that this can be a solid feature for next release (I mean one after 0.96).