Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...
Dismiss Notice
Have some great ideas for Wynncraft? Join the official CT (content team) and help us make quests, builds, cinematics and much more!

Game Mechanics Text-Component-Based Client-Sided Localization

Discussion in 'General Suggestions' started by TheLMiffy1111, Dec 16, 2024.

?

Do you support?

  1. Yes

    7 vote(s)
    100.0%
  2. No

    0 vote(s)
    0.0%
  1. TheLMiffy1111

    TheLMiffy1111 Previous Leader Of A Revived Wynn Community CHAMPION

    Messages:
    589
    Likes Received:
    794
    Trophy Points:
    91
    Guild:
    Minecraft:
    This is an alternative way at tackling the localization problem, allowing the problem to be solved much easier.

    Currently, client-side mods that operate on text such as Voices of Wynn and WynnLang must match on text directly. This has problems though:
    1. Much of the content is one-time only, which causes the translations of these contents to be practically unverifiable.
    2. Every patch may contain changes to text, which, even if insignificant, will cause the client translations to fail.
    These problems cause any attempt at making a localization mod extremely infeasible, and so people have to rely on largely inaccurate machine translations to play the mackerel.

    To solve this problem, instead of directly sending text to clients, we can make full use of Minecraft's text component system and send translatable text components, using the resource pack or fallback for text. With this method, the client can use the resource pack to change text to whatever they want.

    Since translation fallback was added in 1.19.4 and WynnCraft is now using 1.20.5, it is now completely possible to not reveal secret information until someone encounters it and it is sent to the client. For non-secret information though, it is probably better to either completely use the resource pack instead, or release an official English-only translation resource pack, for ease of translation and avoiding the verifiability problem.

    Some examples and proposals, with the corresponding original text components extracted from the mackerel:
    Code:
    {
      "text": "[1/5] ",
      "extra": [
        {
          "text": "The Cook: "
        },
        {
          "text": "I can't believe what is happening to me."
        }
      ]
    }
    
    {
      "text": "[2/5] ",
      "extra": [
        {
          "text": "The Cook: "
        },
        {
          "text": "The King ordered me to bake cakes for all those new recruits!"
        }
      ]
    }
    
    {
      "text": "[3/5] ",
      "extra": [
        {
          "text": "The Cook: "
        },
        {
          "text": "Unfortunately, a Grook took my last cake, and I ran out of ingredients!"
        }
      ]
    }
    
    {
      "text": "[4/5] ",
      "extra": [
        {
          "text": "The Cook: "
        },
        {
          "text": "Now can you help..."
        }
      ]
    }
    
    {
      "text": "[5/5] ",
      "extra": [
        {
          "text": "The Cook: "
        },
        {
          "text": "That's the Grook! Go chase it down and get my cake back!"
        }
      ]
    }
    Code:
    {
      "text": "[1/5] ",
      "extra": [
        {
          "translate": "npc.the_cook",
          "fallback": "The Cook"
        },
        {
          "text": ": "
        },
        {
          "translate": "quest.cook_assistant.1.1",
          "fallback": "I can't believe what is happening to me."
        }
      ]
    }
    
    {
      "text": "[2/5] ",
      "extra": [
        {
          "translate": "npc.the_cook",
          "fallback": "The Cook"
        },
        {
          "text": ": "
        },
        {
          "translate": "quest.cook_assistant.1.2",
          "fallback": "The King ordered me to bake cakes for all those new recruits!"
        }
      ]
    }
    
    {
      "text": "[3/5] ",
      "extra": [
        {
          "translate": "npc.the_cook",
          "fallback": "The Cook"
        },
        {
          "text": ": "
        },
        {
          "translate": "quest.cook_assistant.1.3",
          "fallback": "Unfortunately, a Grook took my last cake, and I ran out of ingredients!"
        }
      ]
    }
    
    {
      "text": "[4/5] ",
      "extra": [
        {
          "translate": "npc.the_cook",
          "fallback": "The Cook"
        },
        {
          "text": ": "
        },
        {
          "translate": "quest.cook_assistant.1.4",
          "fallback": "Now can you help..."
        }
      ]
    }
    
    {
      "text": "[5/5] ",
      "extra": [
        {
          "translate": "npc.the_cook",
          "fallback": "The Cook"
        },
        {
          "text": ": "
        },
        {
          "translate": "quest.cook_assistant.1.5",
          "fallback": "That's the Grook! Go chase it down and get my cake back!"
        }
      ]
    }
    Code:
    {
      "custom_name": {
        "text": "Morrowind"
      },
      "lore": [
        ...,
        {
          "text": "One of many lost artifacts"
        },
        {
          "text": "from the legendary Wind"
        },
        {
          "text": "Fortress, the engraving"
        },
        {
          "text": "appears to be a cryptic clue"
        },
        {
          "text": "to where the Fortress fell."
        },
        {
          "text": "\"We shall be found among the"
        },
        {
          "text": "dark winds of the morrow.\""
        }
      ]
    }
    Code:
    {
      "custom_name": {
        "translate": "item.wand.morrowind",
        "fallback": "Morrowind"
      },
      "lore": [
        ...,
        {
          "translate": "item.wand.morrowind.lore.1",
          "fallback": "One of many lost artifacts"
        },
        {
          "translate": "item.wand.morrowind.lore.2",
          "fallback": "from the legendary Wind"
        },
        {
          "translate": "item.wand.morrowind.lore.3",
          "fallback": "Fortress, the engraving"
        },
        {
          "translate": "item.wand.morrowind.lore.4",
          "fallback": "appears to be a cryptic clue"
        },
        {
          "translate": "item.wand.morrowind.lore.5",
          "fallback": "to where the Fortress fell."
        },
        {
          "translate": "item.wand.morrowind.lore.6",
          "fallback": "\"We shall be found among the"
        },
        {
          "translate": "item.wand.morrowind.lore.7",
          "fallback": "dark winds of the morrow.\""
        }
      ]
    }
    
    Note that item lore may be slightly problematic as Minecraft doesn't handle newlines properly in item lore and thus translations need to fit in the same number of lines used in English.
    Code:
    {
      "text": "Pink Sheep of Greatness"
    }
    Code:
    {
      "translate": "entity.pink_sheep_of_greatness",
      "fallback": "Pink Sheep of Greatness"
    }
     
    Last edited: Dec 25, 2024
    Elysium_, Elytry and Tzelofachad like this.
  2. culpitisn'taword

    culpitisn'taword Skilled Adventurer

    Messages:
    454
    Likes Received:
    316
    Trophy Points:
    39
    Interesting suggestion. I don't have the programming knowledge to know if it's feasible. Suppose you'll have to wait for CT to chime in (it's the Devs who'd know whether this is possible, and there's only 2 of them, neither active on Forums - they're probably overworked anyway).
     
  3. TheLMiffy1111

    TheLMiffy1111 Previous Leader Of A Revived Wynn Community CHAMPION

    Messages:
    589
    Likes Received:
    794
    Trophy Points:
    91
    Guild:
    Minecraft:
    Changed quest dialogue and item name/lore examples, and added a simple entity example
     
  4. TheLMiffy1111

    TheLMiffy1111 Previous Leader Of A Revived Wynn Community CHAMPION

    Messages:
    589
    Likes Received:
    794
    Trophy Points:
    91
    Guild:
    Minecraft:
    i need feedback