MUnique / OpenMU

This project aims to create an easy to use, extendable and customizable server for a MMORPG called "MU Online".
https://munique.net
MIT License
682 stars 285 forks source link

Resource manager for texts #29

Open Romop5 opened 6 years ago

Romop5 commented 6 years ago

I've noticed that you use raw text messages directly in code, e.g.

player.PlayerView.ShowMessage("Your account has been temporarily banned by a game master.", MessageType.BlueNormal);

However, this leads to problems with translating text game server for non-English regions. Therefore I suggest to introduce an enitity which would provided text for given ID on run-time, possibly from disk.

sven-n commented 6 years ago

Thanks for your input. Localization of these messages was already on my radar, but wasn't important enough yet.

It should not be a big issue to solve this. A solution could look like this: First, we need the culture settings a specific client prefers. We could add a property in the Account or maybe the game client already sends us this information. The original game launcher of GMO Season 6E3 has a setting for the language. I expect that this setting is sent to the server in the login process.

Then we need to copy or move all message strings which are sent to the client to the resources and replace this occurrences by calling the ResourceManager.