Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
470 stars 75 forks source link

[Campaign] Can not set maptitle #1638

Open Spikeone opened 7 months ago

Spikeone commented 7 months ago

It's currently not possible to localize the shown campaign names in the "Choose mission" screen and below the map preview. It should be possible to localize those names.

Flamefire commented 7 months ago

Currently the name shown is that of the map as stored in the map file. Can you provide an example how this should look like in the mission file (i.e. in https://github.com/Return-To-The-Roots/s25client/blob/master/data/RTTR/campaigns/world/campaign.lua)?

Spikeone commented 3 months ago

@Flamefire

---- Campaign lua version ------
function getRequiredLuaVersion()
    return 1
end

rttr:RegisterTranslations(
{
    en =
    {
        name = 'World campaign',
        shortDescription = 'Original world campaign',
        longDescription= 'The original world campaign from the gold edition.\n\nYou have to conquer the whole earth.',
        mapName1 = 'Africa',
        mapName2 = 'Australia'
    },
    de =
    {
        name = 'Welt Kampagne',
        shortDescription = 'Orginale Welt Kampagne',
        longDescription= 'Die orginale Welt Kampagne aus der Gold Edition.\n\nErobere die ganze Welt.',
        mapName1 = 'Afrika',
        mapName2 = 'Australien'
    }
})

campaign = {
    version = 1,
    author = "Bluebyte",
    name = _"name",
    shortDescription = _"shortDescription",
    longDescription = _"longDescription",
    image = "<RTTR_GAME>/GFX/PICS/WORLD.LBM",
    maxHumanPlayers= 1,
    difficulty = "easy",
    mapFolder = "<RTTR_GAME>/DATA/MAPS2",
    luaFolder = "<RTTR_RTTR>/campaigns/world",
    maps = {
        {"AFRICA.WLD", _"mapName1"},
        {"AUSTRA.WLD", _"mapName2"}
    }
}

Maybe something like that I'd guess