noelte wrote:If not using attributes is the only concern, easy to fix....
The attributes as xml attributes rather than seprate tags would be nice, for readability. But:
The condition statements are murder, in reading, writing, and debugging. Dave's off-the-shelf XML editior wouldn't help much.
I've written a two or three parsers for text adventures (in higher level languages). In theory, thanks to regular expression libraries, it should be pretty easy for me to tap out a condition statement parser (and even a effect statement parser).
In practice, I hate C++, just the thought of touching it makes me lazy. The gods willing, one of these days I'll get off my ass and change the tech parsing code so that it can read conditions like this:
ScopeCondition= "EmpireAffilation=Source.Owner && PopulationCenter=True && (FocusType=PrimaryResearch || FocusType=SecRessearch)"
instead of like this
<scope>
<Condition::And>
<Condition::EmpireAffiliation>
<empire_id>Source.Owner</empire_id>
<affiliation>AFFIL_SELF</affiliation>
<exclusive>1</exclusive>
</Condition::EmpireAffiliation>
<Condition::Type>OBJ_POP_CENTER</Condition::Type>
<Condition::Or>
<Condition::FocusType>
<primary>1</primary>
<FocusType>FOCUS_RESEARCH</FocusType>
</Condition::FocusType>
<Condition::FocusType>
<primary>0</primary>
<FocusType>FOCUS_RESEARCH</FocusType>
</Condition::FocusType>
</Condition::Or>
</Condition::And>
</scope>
As it stands, writing out and debugging conditions is a massive time sink.