Jump to content

NOTICE: Change to the modinit.lua format to support localization.


Jason

Recommended Posts

  • Developer

The latest patch made a change to the way mods are loaded to fix a bug with localization.

 

Old mods should load fine, but their strings won't be localizable until they've been updated.

 

This is the change they need: a new function is added that loads the strings before localization occurs. I'll be putting up an updated version of the API Example mod soon.

local function initStrings( modApi )    local dataPath = modApi:getDataPath()    local scriptPath = modApi:getScriptPath()    local DLC_STRINGS = include( scriptPath .. "/strings" )    modApi:addStrings( dataPath, "DLC1", DLC_STRINGS )    endreturn {    init = init,    load = load,    initStrings = initStrings,}

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...