Index Table Configuration
When batch generating tables, placing $tables.xlsx
in the input path can be used to configure which tables to generate and some specified behaviors.
In the table generation root directory, any table starting with $
will be treated as an index table, such as $items.xls
.
The structure of the index table is the same as the data table, but it configures the following functional fields.
-
tableName: The name of the table to be generated, which is the filename without the extension. If not configured, the table will not be generated.
-
merge: Whether to merge into a large table for preloading convenience. Marked tables will be merged into
mergeTable
. -
censoredTable: Sensitive table, will not be output to the
output_censored/
directory, but will be output tooutput/
. Generally used when frontend and backend share the same table generation logic, to remove backend tables from the frontend directory. -
censoredFields: Sensitive fields, use
,
to connect specified fields (variable names) in the table. These fields will be deleted and output to theoutput_censored/
directory, while the uncensored version will be output tooutput/
. Also serves to remove backend-used data from frontend tables. -
constFields: Constant fields, will use specified fields in the table as constants. Value types only support
int
orstring
, and will be converted to an independent Xlsx.tableNameConst class. Configuration format is[{"key":"","value":"","desc":""},{"key":"","value":"","desc:"""},...]
. For example, if you want to use NPC name as a constant to get NPC id, you can configure it like this:[{"key":"npcName","value":"id","desc":"npcDesc"}]
.
When $tables.xlsx
is not placed in the batch table generation directory, all tables in the directory will be generated by default.
Constant definition code is only implemented for C# and TS/JS.