th-thanks, I don't have much progress to post now because the past few days I was busy dealing with other stuff nothing related to programming and I often up end up becoming tired so I couldn't work on it much. I managed to get a very basic check going and the text reader function works somewhat correctly so far so I still need to figure out that the format checker function also checks if the variable type is valid as in a integer variable cannot have a string variable, I probably also have to look for a actual parser module which does the task better as mine probably wouldn't be able to work that reliable but I will see. Most of those parser modules seems to have a way too complicated syntax for my liking so it will take a while to find one that is easier to read. And as I have guessed the basic "parser" already fails when the variable contains a comment like this: garbage = crap // crap comment, because all it does it reads line by line with some few conditions thrown in, however it does ignore the comments when it is on its own line so there isn't a problem with that. Once the few basic functions are working better I can start looking how I should deal with variables containing another variables, then support for inheritance and a constant sort of variable which should working with copies of a "actor" much simpler to deal with.
var: ID = String
var: maxammo = Integer
var: garbage2 = crap2
Format: ['ID = String', 'maxammo = Integer', 'garbage2 = crap2']
This is the result of readblock() function, which is pretty simplistic but its a start so what is left in for that is that I need to clean up the format variable which should end up something like this: Format: ['ID', 'String', 'maxammo', integer, block, [block1, block2, ….], …]. Then I can just use the split "function" or however it is called [0:1] or [1:2] and so on which I already wrote a function for this if I want a specific type of the variables. It is sufficient enough to check if the data file variable names matches the names defined by the specification and eventually a check if the variable type is correct too. When all those basic functions are finished I can work on a XML converter which will be easier to work with as all it has to do is just slapping the variable names and its values on the XML syntax and then OpenApoc should be able to read those values just fine assuming the specification uses the OpenApoc variables. I already did something similar for the XML "translator" in form of a checksum bash script.