Validation PrototypeThe idea of this is to tell you when the thing you're building has fundamental issues.
This is just a reminder so it doesn't try and tell you what to do to "fix" anything and doesn't stop you carrying on with whatever you want to do.
Usage is therefore entirely optional.
It works by using a set of fairly basic generic tests which (when run) return a true = ok = tick or false = not ok = cross.
Each has a description.
The process is necessarilly "dumb" in that it always runs all checks and always just returns that true/false.
It doesn't do anything as well as it's check.
So doesn't care if you have a totally empty scenario or whatever.
Everything is run every time.
The approach itself is generic so it can be used in any app within the suite by "just" building a set of checks specific to that.
At the moment I have just 3 prototype checks.
If I explain exactly what one of these is doing.
Blue pieces is a header grouping checks.
There will be other ones, eg red pieces.
"All pieces on board".
Looks at all the blue pieces you have.
A piece has a flag "IsOnboard" which will be true if you've dragged it onto the board ( map ) to a valid position.
If none of these are false then that check passed and is ok.
No blue army?
There won't be any blue pieces to not be on the board.
It's going to pass.

Checks are run when you load a scenario or click the button in the header with the refresh icon.
Does it matter if a commander isn't on the board?
Yes.
You will have a broken game.
A combat unit needs it's commander to be on the board because loading units into pieces follows that hierarchy.
When you load a game, a combat unit "orphaned" will not appear in your game.
How do you work out which to fix?
Most scenarios will use most or all units and they're reduced to half opacity once dragged onto the board.
If you look at your oob treeview there will be that CO fairly obvious because it's full opacity and those on the board are half.
If I remove hooker off the map and take a look at the oob:

It's fairly obvious where the problem is once I know to go look for it.
You might think "hey... why don't you do other stuff like tell me which piece is the problem?".
I could have done that.
But each of the problems has the potential to be different.
I'd have to inject some extra generic functionality which could do different stuff for each.
Which would take longer.
As I review that screenshot.
I'm reminded that the treeview in the scenario editor is still the original style with pointy fingers eating up space.
I probably ought to take a look at that.