Skip to content

Allow syncing csv files as text module scripts #1204

@fewkz

Description

@fewkz

csv is a very useful file format, there's lots of tools/extensions for editing csv files, which would make them great for storing item data for games with lots of item metadata. We should be able to sync csv files as a module script that return a string, similar to .txt files.
Syncing csv files as LocalizationTable should require a specific extension, like test.l10n.csv, or there should be an option similar to emitLegacyScripts which lets you choose whether csv files are treated as LocalizationTable.

Image

They can just get synced as

return [[
name,description
item 1, this is the description
item 2, this is the second description
item 3, this is the third description
]]

There is also the possibility that we should be able to sync any file as a text module via some sort of field in the project format, like "syncAsText": true, so you could even sync other file types such as:

  • .lua, .luau, maybe for loadstring? not that it's a good idea
  • .json, .toml , maybe you don't want it to be parsed automatically
  • other formats like .yaml, .jsonc, we could just implement our own parser in our game's code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions