Configs now have values

For announcing, describing and discussing code changes to BNT.

Post Reply
thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Configs now have values

Post by thekabal » Mon May 05, 2014 02:54 UTC

I've just committed the changes to switch from using parse_ini_file to a new method of BntFile, called betterParseIni.

It is essentially the same code that TheMightyDude came up with long, long ago, but wrapped into a class, and with a minor change to handle a lack of comments (ha!) in our language files.

This means that now, the schema for gameconfig and languages has been expanded to store the variable types along side the variables themselves. It is half of what is needed to get us to a point where our game configs can hold actual types.

The other half that is needed (but not done yet) is to get the game to type set when it imports these values from the database.

Once that is done, then we can start getting more aggressive about type checking in our equations throughout the game, which should deeply improve overall quality.

thekabal
Posts: 100
Joined: Sat Apr 19, 2014 22:32 UTC

Re: Configs now have values

Post by thekabal » Mon May 05, 2014 03:38 UTC

And just committed the matching set that imports the values and types from the database.

I redid the config a little bit, I think I've caught all the booleans, but wouldn't mind someone else taking a look.

So far I have not gone through the game to redo the checks for each of them, although that is on my list now. ;)

Post Reply