Anything to try out yet, even if it is only one or two panels?
I try'll try to come up with some examples soon. Maybe until Saturday, but I can't promise it. My paid workhours got reduced to mere 10h/week now, but I can't yet claim to be bored...
One thing about what I did so far: It will turn into a major overhaul of the VC core API - I decided that its easier to make JSON the new standard and turn the old C++ definitions into a legacy API until it is no longer needed. The alternative approaches all turned out to be more effort to ensure a robust panel definition.
Now, I can make the VC components themselves understand JSON and delegate the knowledge of the needed attributes to them, instead of needing to create a huge and unmaintainable factory class for turning JSON into panels.
The old C++ methods for defining the panels can then just be kept for the panels we did not yet migrate, all that will be necessary for a while will be keeping variables for each switch in a panel to make connecting the switches to discrete bundles easier. Maybe those can even be dropped as well, when there is a good way to define this in JSON as well.
And the standard structure for a VC component will be like that :
Code:
"Name of component" : {
"class" : "AnyClassName", //Name of the VC component class. Eg, StdSwitch2
"crew": {}, //Support data for player help or implementing AI crew
"animation": {}, //Data needed for defining the animations
"input" : {} //Data for defining VC event areas
}, ....