Jump to content
You need to play a total of 5 battles to post in this section.
Aessaya

.mo file editor [v1.2]

6 comments in this topic

Recommended Posts

219
[IXM]
Members
214 posts
4,912 battles

While working on the next addition to the ever-growing Mermaid's Wrath and Mermaid's Fashion mods I have created an automated tool to modify the global.mo file that contains all the text strings found in the game client, including, but not limited to, ship names, captain names, and so on. Biggest part of the work included creating a module capable of reading, modifying, and saving the .mo file format without involving any third-party or external conversion tools.

Luckily, .mo file actually uses an open-source format under GNU license, so it wasn't too hard to create a bit of code that handles the format natively and in-memory. From there it was just an easy extra step of adding the extra code for automated replacement of strings. However, during the work, I figured it would be nice to provide an all-in-one tool for editing the .mo files for the WoWS modder community, and such the GNU MO File Editor tool has been born, which I hereby present to you!

The usage should be pretty straight-forward: launch the program, load your .mo file you want to edit, and you shall be presented with a grid of text, as illustrated in a screenshot below:

Clipboard01.thumb.png.b8270199aff2351de18d1337f1d52430.png

Only the "Value" column data can be edited, because the client relies on the ID strings to find the necessary data. The text box in the top-right corner allows for text search in the data (both ID and Value fields are searched) in forward and reverse manner. Result row will be highlighted fully.

Once done editing, save your file via the File menu.

note: overwriting of file currently being edited is currently not supported, as it is open and locked for edits throughout the entire process until program exits.

Spoiler

Version history:


 > 2018-03-26 -- Initial release [v1.0]
 
 > 2018-04-25 -- v1.1 update
 * Added Copy functionality from selected cell even if it is not editable (Ctrl+C by default) or from entire row.
 
 > 2018-06-28 -- v1.2 update
 * Added multiselect functionality and ensured the copy would grab all the selected rows/cells

 

Bug reports and feature suggestions are always welcome! Happy editing :)

 

Update [2018-12-08]: Apparently forum is now somehow borking RAR and ZIP archives. So I am also linking up an alternative mirror for the file.

 

Edited by Aessaya
v1.2 re-release
  • Cool 4

Share this post


Link to post
Share on other sites
0
[CAPT]
Members
2 posts
11,178 battles

After saving the .mo file the changes made are not holding.   No error message but after saving and closing editor I reopen the file to edit and previous edits are not there.  Suggestions?

Share this post


Link to post
Share on other sites
219
[IXM]
Members
214 posts
4,912 battles

Reopen the original file, or the one saved?

I investigated, and the changes are saved to the new file... Just need to make sure you're actually opening the saved file, not the original one.

Edited by Aessaya

Share this post


Link to post
Share on other sites
219
[IXM]
Members
214 posts
4,912 battles

Updated the tool with some more quality of life: multiselect. Enjoy!

  • Cool 1

Share this post


Link to post
Share on other sites
219
[WOLF5]
[WOLF5]
Members
193 posts
10,774 battles
1 hour ago, Aessaya said:

Updated the tool with some more quality of life: multiselect. Enjoy!

Thank you! :Smile_smile:

Share this post


Link to post
Share on other sites
219
[IXM]
Members
214 posts
4,912 battles

Re-uploaded the file and added a mirror link, because forum is being uncooperative for some reason and borking up the archives.

  • Cool 1

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×