GameFileData

Extension: ".gdata"

GameFileData is a general purpose FileData, it can represent any FileData or custom FileData mods can make use of.
The first line has to always start with a "@", after the "@" either file extension or an identifier can be specified.

File extension

If a file extension is specified the GameFileData is interpreted as a file with this extension. (Has to start with a ".")

Does not support ".gdata", ".lua", ".mdata" and ".zipdata".

Examples:
"@.idata"
"@.textdata"

Identifier

If any string follows the "@" that doesn't start with a "." the string is interpreted as an identifier. All lines are split into a definition and a value, the split position is indicated by a "=". In lua you can get an array with tables in it that have the definition as keys and the value as value. The corresponding function is Game File Functions > getGameFileData(@Identifier Type String ), every array entry is one GameFileData.

Example:

GameFileData:
@fish
name=carp

GameFileData:
@fish
name=perch

local fishes = getGameFileData("fish")
game.print(fishes[1]["name"]) --prints "carp"
game.print(fishes[2]["name"]) --prints "perch"