primem0ver
Emperor
Everyone who has dealt with Civ4 XML knows that there are a lot of InfoTypes and instances of those info types.
So far the Schema table has the ability to identify the tags (variables/properties... whatever you want to call them) within the schema as one of 6 possible types:
Unknown (rarely used), Boolean (i.e. a variable that can be true or false), Integer, Floating point*, String (text), and Container**)
The reason this comes in handy is that it will make editing (and programming the editor) very easy:
If a variable is boolean it gets a True/False selection box.
If a variable is an integer it gets an edit box in which you can only enter numbers (and the negative sign)
If a variable is a floating point number it gets a box similiar to the integer but also accepts a decimal point.
Strings will get a text box... etc
Now for the kicker:
My next mini-project is to expand the type classification system to include all Info types.
By allowing the variables within the schema to be more strongly typed (i.e. using the InfoTypes as a variable type), the editor will be able to prevent XML errors for string fields that refer to a specific Info type by providing a drop down selection box of ALL DEFINED VALUES for a certain info type. This will include Text Info types (although whether drop down boxes are used for these will depend on user settings since there are SO MANY text defines).
For example. Lets say we have loaded up the Civ4UnitInfos.xml file up in the editor and we want to change (or add) a Unit Class. Instead of having a textbox for the Unit class, the editor will recognize (using the schema and some rules defined in a settings file) that the Class tag in the said file can only have values defined within the Civ4UnitClassInfos.xml file and will provide a dropdown list for you to select the desired Unit Class.
This should not take very much time to add since it mainly involves importing data that is already being used by the program.
NOTES:
*floating point numbers are not native to Civ4 XML schema's but recognizing them is fairly easy since all floating point numbers defined by firaxis start with a lower case f. If modders stick to this convention, all variables that start with a lower case f can be identified as floating point numbers. The option of using this convention can be changed by the modder in the program options to on or off. If set to off, floating point numbers will be treated as strings (like they normally are).
**Containers are not variables with a given value. Instead, they represent an expandable branch or placeholder for a collection of values (more variables). These are analogous to a class or structure in programming.
So far the Schema table has the ability to identify the tags (variables/properties... whatever you want to call them) within the schema as one of 6 possible types:
Unknown (rarely used), Boolean (i.e. a variable that can be true or false), Integer, Floating point*, String (text), and Container**)
The reason this comes in handy is that it will make editing (and programming the editor) very easy:
If a variable is boolean it gets a True/False selection box.
If a variable is an integer it gets an edit box in which you can only enter numbers (and the negative sign)
If a variable is a floating point number it gets a box similiar to the integer but also accepts a decimal point.
Strings will get a text box... etc
Now for the kicker:
My next mini-project is to expand the type classification system to include all Info types.
By allowing the variables within the schema to be more strongly typed (i.e. using the InfoTypes as a variable type), the editor will be able to prevent XML errors for string fields that refer to a specific Info type by providing a drop down selection box of ALL DEFINED VALUES for a certain info type. This will include Text Info types (although whether drop down boxes are used for these will depend on user settings since there are SO MANY text defines).
For example. Lets say we have loaded up the Civ4UnitInfos.xml file up in the editor and we want to change (or add) a Unit Class. Instead of having a textbox for the Unit class, the editor will recognize (using the schema and some rules defined in a settings file) that the Class tag in the said file can only have values defined within the Civ4UnitClassInfos.xml file and will provide a dropdown list for you to select the desired Unit Class.
This should not take very much time to add since it mainly involves importing data that is already being used by the program.
NOTES:
*floating point numbers are not native to Civ4 XML schema's but recognizing them is fairly easy since all floating point numbers defined by firaxis start with a lower case f. If modders stick to this convention, all variables that start with a lower case f can be identified as floating point numbers. The option of using this convention can be changed by the modder in the program options to on or off. If set to off, floating point numbers will be treated as strings (like they normally are).
**Containers are not variables with a given value. Instead, they represent an expandable branch or placeholder for a collection of values (more variables). These are analogous to a class or structure in programming.