Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Aion] Write notifications in different languages (L10N)

Junior Spellweaver
Joined
Mar 2, 2023
Messages
196
Reaction score
326
Once I asked on the forum about the possibility of reading strings from the client to use different languages from the client on your server, I never received an answer. More precisely, I received a negative answer. But it turned out that it can be done, and very easily.

I'm telling you ;)

We will need a file "data.pak" ("AionClient\l10n\YourLanguagePack\data")

We unpack this file, decode it if necessary. There is plenty of information on how to do this, I will not describe it. Search It.

Next, take the file "client_strings_msg.xml" ("\data\Strings")
Open...
And we see it:
XML:
........
........
  <string>
    <id>1200001</id>
    <name>STR_MSG_COMBAT_MY_CRITICAL</name>
    <body>Критический удар! Вы нанесли %num1 ед. критического урона цели %0.</body>
    <message_type>17</message_type>
    <display_type>1</display_type>
  </string>
  <string>
........
........

Let's copy the most recent construction, in my case it is:
XML:
  <string>
    <id>1404566</id>
    <name>STR_IDRUN_STAGE2_NOTICE</name>
    <body>Вы вошли в зону, где можно использовать ездовые предметы.</body>
    <message_type>53</message_type>
    <display_type>3</display_type>
  </string>

Immediately after it, we paste what we copied and change the text to the desired one, for example, I did this

Code:
  <string>
    <id>1404567</id>
    <name>STR_MSG_Sunayaka_Spawn_v1</name>
    <body>Появился Рейд-Босс: Сунаяка</body>
    <message_type>53</message_type>
    <display_type>3</display_type>
  </string>

Save the file, pack it back, replace it in the folder with the game (It won't work to take the modified file to the open directory, it won't work, or I didn't succeed ...)

Next, we change the source code files of the server.

Open the file where you need to output the text, in my case - the service spawn RB Sunayaka

At the top in the imports area, add:
Java:
import com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE;

And in the area where you need to output our text, add the following text (Or replace what was in your code)

For example, I had this:

Java:
                    World.getInstance().doOnAllPlayers(new Visitor<Player>() {

                        @Override
                        public void visit(Player player) {
                            PacketSendUtility.sendPacket(player, new SM_MESSAGE(0, null, "Sunayaka spawned", ChatType.BRIGHT_YELLOW_CENTER));
                        }
                    }

It became so:

Code:
                    World.getInstance().doOnAllPlayers(new Visitor<Player>() {

                        @Override
                        public void visit(Player player) {
                            PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_Sunayaka_Spawn_v1);
                        }
                    }

Did you? Well done! But, that's not all!

Now open the file "SM_SYSTEM_MESSAGE.java" (src\com\aionemu\gameserver\network\aion\serverpackets\)
And we add the code there:
Java:
    public static final SM_SYSTEM_MESSAGE STR_MSG_Sunayaka_Spawn_v1 = new SM_SYSTEM_MESSAGE(1404567);

Where and what data to replace, I think you will understand. Hint - you wrote all this in the client file...

We save everything that we changed, compile the server, launch it, go in and check. In the game it looks like this (I do for Russian):

Aion0018 - [Aion] Write notifications in different languages (L10N) - RaGEZONE Forums


We are happy if everything works. If it doesn't work, check where you made a mistake. ;)
Thanks for your attention! :)I will write similar publications on some interesting topics as far as possible, in gratitude to the forum for the help I received from here 💙
 

Attachments

You must be registered for see attachments list
Back
Top