News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: How easy is to translate a snes game using Wanderbar?  (Read 2635 times)

aqualung

  • Full Member
  • ***
  • Posts: 113
    • View Profile
How easy is to translate a snes game using Wanderbar?
« on: November 04, 2018, 02:37:44 pm »
Sorry if this a silly or "hard to understand what I'm trying to convey" question (I have not much idea about how the process for translating a snes rom works, so I'll try to explain things in my own "language"):


I've been wondering how easier would be to translate a snes game entirely (or at least, the ingame text) using Wanderbar instead of having to reverse-engineer a rom, find its pointers for every text string, yadda yadda yadda.

I've been reading about Wanderbar, but there's something I still don't get. Using this tool, would it possible to configure it for automatically detect when text is showing on the game's screen and reflect it on the navigator browser part of the app? Or you have to create a specific Lua script for every game and manually find the pointers to the text strings almost the same as if you were going to do a "standard" fantranslation? In it's the latter, do you need to know assembler and/or use another tool to do that?

Thanks.
« Last Edit: November 15, 2018, 10:45:49 am by aqualung »

FCandChill

  • Hero Member
  • *****
  • Posts: 502
    • View Profile
Re: How easy to translate a snes game is using Wanderbar?
« Reply #1 on: November 04, 2018, 05:27:27 pm »
I haven't used Wanderbar either, but from the description and looking at the source code ... it's a modified SNES9x emulator for your browser that allows you to add plugins to help you translate. In the source code, it includes files with "lua" in the title. So the plugins probably let you edit particular games. In other words ... in order to edit X game you need to create a plugin for it. That would be my educated guess.

Tomato

  • Sr. Member
  • ****
  • Posts: 295
    • View Profile
    • Legends of Localization
Re: How easy to translate a snes game is using Wanderbar?
« Reply #2 on: November 04, 2018, 09:06:12 pm »
I've been reading about Wanderbar, but there's something I still don't get. Using this tool, would it possible to configure it for automatically detect when text is showing on the game's screen and reflect it on the navigator browser part of the app? Or you have to create a specific Lua script for every game and manually find the pointers to the text strings almost the same as if you were going to do a "standard" fantranslation? In it's the latter, do you need to know assembler and/or use another tool to do that?

Both ways are possible, but the process I designed it for is closer to your second idea. Your first idea is closer to the "text hooker" stuff already found in emulators like FCEUX.

My default translation plugins that come with the Wanderbar basically work like this:

  • Find when the game decides which line ID is about to be displayed
  • Take the line ID and display the equivalent desired line in the sidebar

Part 1 isn't too hard if you use a nice debugger like bsnes-plus. Part 2 is simple, and you can see how it works using some of the default plugins. It takes only a few lines of code.

Since you're wanting to display translated text, you'll of course need to dump the game's text beforehand in some way. This is pretty much the same process as any ROM translation. The idea is that you'll put each translated line into the sidebar's HTML, with each line getting its own <div>. So when the emulator loads a line of text, let's say Line 378 for example, your plugin will take that 378 and then display your line 378 <div>.

I realize I still need to write documentation and such, but if you need help with a specific game I can offer some help.

aqualung

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Re: How easy to translate a snes game is using Wanderbar?
« Reply #3 on: November 05, 2018, 11:55:09 am »
Both ways are possible, but the process I designed it for is closer to your second idea. Your first idea is closer to the "text hooker" stuff already found in emulators like FCEUX.

My default translation plugins that come with the Wanderbar basically work like this:

  • Find when the game decides which line ID is about to be displayed
  • Take the line ID and display the equivalent desired line in the sidebar

Part 1 isn't too hard if you use a nice debugger like bsnes-plus. Part 2 is simple, and you can see how it works using some of the default plugins. It takes only a few lines of code.

Since you're wanting to display translated text, you'll of course need to dump the game's text beforehand in some way. This is pretty much the same process as any ROM translation. The idea is that you'll put each translated line into the sidebar's HTML, with each line getting its own <div>. So when the emulator loads a line of text, let's say Line 378 for example, your plugin will take that 378 and then display your line 378 <div>.

I realize I still need to write documentation and such, but if you need help with a specific game I can offer some help.

Thanks a lot, FCandChill and Tomato for your replies. I feel really honored that one of the replies is from Wanderbar's own author :)

First of all, the games I had in mind for translating are Jungle Wars 2 (JW2) and Idea no Hi. I don't know about the latter, but I don't recall of anyone working in JW2 at the moment (I think Kingmike was fiddling with the prequel, JW for the gameboy).

I can't assure I'll go very far in any of these games, though, as I ignore whether these games are considered hard to mess with or not. I simply wanted to test my Japanese skills a little after 3 years of taking lessons and wanted to be games that nobody is engaged in right now and games that I like as well.


My first thing I wanted to do before tackling more complicated things, was guessing if Wanderbar had a way of "noticing" when the game is about to show text (let's assume the game activates some kind of flag or signal when doing so), so it can automatically capture it, extract that line of text and copy it to the browser window. Because my ASM knowledge to do it manually is 0, although I know a little about coding (mostly develop CRUD applications using frameworks, nothing relevant to fantranslations).

Nevertheless, I've already peeked a little at some of the plugins' lua code, and I'll try to do a more in deep examination and see if I can grasp a general understanding of how it works before trying to do the next step. Perhaps I can start fiddling with the plugins' scripts and see what changes.

I'll try to go slow and steady and see if I'm up to it or not. Thanks a lot for your reply and for creating such neat tool for romhacking, Tomato.

Tomato

  • Sr. Member
  • ****
  • Posts: 295
    • View Profile
    • Legends of Localization
Re: How easy to translate a snes game is using Wanderbar?
« Reply #4 on: November 05, 2018, 08:35:29 pm »
I was thinking things over this morning and realized you technically don't HAVE to dump scripts the ROM hacking way if you don't want to/can't. Once you find where in a game it loads a line ID, you can just play through the game, translate each line you see, and put each translation into its own labelled <div>. Sure, it probably means a bunch of text might go missing, but it does simplify things a bit.

Plus, if you know where a line ID gets loaded, you can always create a cheat code or a temporary plugin that will change the line ID to whatever you want right before the line is loaded. Then you could just go through each line one by one manually. It'd be tedious but would still work just as well.

I took a look a Jungle Wars 2 and it's definitely kind of a mess to pull apart but not too bad. The main problem was that the game has strings and substrings, which makes it hard to locate a proper line ID. But I used a workaround to whip up a basic translation sidebar using my method two paragraphs above.




The plugin is here: https://legendsoflocalization.com/wp-content/uploads/2018/11/Jungle-Wars-2.zip It only has a few strings translated for test purposes. Doing a proper text dump would of course be a better approach but this was mostly a fun little test to see if this would even work  8)

Jorpho

  • Hero Member
  • *****
  • Posts: 3935
  • The cat screams with the voice of a man.
    • View Profile
Re: How easy to translate a snes game is using Wanderbar?
« Reply #5 on: November 06, 2018, 09:39:37 am »
This is the sort of thing I would have expected to come out ages ago.

If someone's looking for an "unhackable" game well-suited for this treatment, may I nominate Ihatovo Monogatari?
This depresses me. I feel like a goldfish right now...

Tomato

  • Sr. Member
  • ****
  • Posts: 295
    • View Profile
    • Legends of Localization
Re: How easy to translate a snes game is using Wanderbar?
« Reply #6 on: November 06, 2018, 03:33:14 pm »
I took a look at Ihatovo Monogatari and it's definitely a tricky one too - getting the dialogue line # is easy enough (it's in register A at CPU address C3CB), but the text itself has a logic scripting system embedded within it. Still I bet if someone took a closer look than me they could figure out a good solution.

aqualung

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Re: How easy to translate a snes game is using Wanderbar?
« Reply #7 on: November 14, 2018, 08:35:51 pm »
I was thinking things over this morning and realized you technically don't HAVE to dump scripts the ROM hacking way if you don't want to/can't. Once you find where in a game it loads a line ID, you can just play through the game, translate each line you see, and put each translation into its own labelled <div>. Sure, it probably means a bunch of text might go missing, but it does simplify things a bit.

Plus, if you know where a line ID gets loaded, you can always create a cheat code or a temporary plugin that will change the line ID to whatever you want right before the line is loaded. Then you could just go through each line one by one manually. It'd be tedious but would still work just as well.

I took a look a Jungle Wars 2 and it's definitely kind of a mess to pull apart but not too bad. The main problem was that the game has strings and substrings, which makes it hard to locate a proper line ID. But I used a workaround to whip up a basic translation sidebar using my method two paragraphs above.




The plugin is here: https://legendsoflocalization.com/wp-content/uploads/2018/11/Jungle-Wars-2.zip It only has a few strings translated for test purposes. Doing a proper text dump would of course be a better approach but this was mostly a fun little test to see if this would even work  8)

Hi. First of all, sorry for the big delay in replying, real life caught up with me a little.

I have no words, this is simply wonderful! With this method a game could have almost all its plot related text translated and the game would be playable to a certain extent. For variable things like the party character's names, the player could leave the default ones and a "generic" name could be decided for the main character if the game doesn't provide one (I recall the default name of the main character of Jungle Wars 2 being "boy", at least in the gameboy prequel).

Also, for the name of the items found inside of chests, I'll have to come up with a way to displaying them.

I've downloaded and tinkered a little with your Jungle Wars 2 plugin and I cannot wait to start translating texts. I don't know if I'll be up to the task with my current Japanese level, but I can always try to do it in a collaborative way, creating an online Google docs Excel where I can gradually upload every script sentence in Japanese with its corresponding ID and other people could voluntarily translate them. Then myself or other people could introduce the English sentences into the main.html file.

I'm so hyped! ;D ;D ;D. Thanks again, Tomato!  :thumbsup:
« Last Edit: November 15, 2018, 09:53:53 pm by aqualung »