7 ms·
I have tinkered with modding Diablo II (which uses tab-separated values for parameters) and the classic Command & Conquer series (which uses INI files). Both a
by DCoder 8y ago
I have tinkered with modding Diablo II (which uses tab-separated values for parameters) and the classic Command & Conquer series (which uses INI files).
Both approaches have tradeoffs:
- TSV files can have so many columns that you can't really edit them in a text editor, you'll never find your place. Some of these in D2 have more than 256 columns.
- INI files don't give you a full list of configurable parameters, so you might not even know what flags the engine supports if they're mentioned only once in the entire file or not mentioned at all. Some object types in Red Alert 2 support over 700 flags, not all of them are actually used in the default config…
- two items described in a TSV file are easier to compare than two INI sections, with INI you need a second editor window and some ordering of the keys to make sense of things.
- on the other hand, diffing a TSV file for changes is a lot more challenging.
At the time, I remember thinking how a proper database would make this easier.
---
I have also seen a game where a \n was used as a record separator and \r was used to insert newlines into the text string within a record. Fun times when your text editor tries to "intelligently" handle and normalize line endings.
- Too 8y agoYou could have json and a schema. VSCode for example does this, all settings is just a settings.json but it still has auto-complete inside it so you always know what settings are available.