Jump to content

Wigfrid's Umlauts


Gorp

Recommended Posts

Could someone point me to the code that specifically tells the game to turn the o's in Wigfrid's dialogue into ö's? I see the line with "Umlautify" in wathgrithr.lua and figured it indicated that the details were in components/talker.lua, but I can't find anything there. Nothing in config either, from what I can tell. Thanks! 

Link to comment
Share on other sites

You can find how its done in stringutil.lua in the scripts folder, line 101

--V2C: Left this here as a global util function so mods or other characters can use it easily.
function Umlautify(string)
    if not Profile:IsWathgrithrFontEnabled() then
        return string
    end

    local ret = ""
    local last = false
    for i = 1, #string do
        local c = string:sub(i,i)
        if not last and (c == "o" or c == "O") then
            ret = ret .. ((c == "o" and "ö") or (c == "O" and "Ö") or c)
            last = true
        else
            ret = ret .. c
            last = false
        end
    end
    return ret
end

 

Link to comment
Share on other sites

5 hours ago, Sir_Kasalott said:

You can find how its done in stringutil.lua in the scripts folder, line 101

 

Found it, thanks! One more thing, is this action performed client-side or server-side?

Link to comment
Share on other sites

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...