Skip to content

Instantly share code, notes, and snippets.

local array_like_table = {
"You",
"are",
"a",
"heretic"
}
--[[
[1] = "You"
[2] = "are"
[3] = "a"

If you have VSCode (maybe another text editors will do it as well), you can convert your options widgets relatively fast. This instruction works only for old widget definition style (["field"] = value):

  1. Read README file of options mod example (and probably examine _data and _localization files) to understand how new options definition system works.

  2. Move all localizable fields to localization file (text, title, tooltip, unit_text)

  3. Convert show_widget_condition fields to show_widgets of parent dropdown's options.

  4. Now you need to open "replace" tool (Ctrl + H) with regular expressions activated. Next steps will represent pairs of "replace" tool's textboxes.