- Jul 25, 2017
- 272
- 66
Do you think we'll have a first draft at the end of 2023 or summer 2024?Translation in progress, I'm just not updating it until we have the first draft
Do you think we'll have a first draft at the end of 2023 or summer 2024?Translation in progress, I'm just not updating it until we have the first draft
The guy said that the translation should be *done* by the end of 2024... as a guesstimate with no incentive or help. We're potentially getting help and people say there should be incentive coming from them, so we'll see.Do you think we'll have a first draft at the end of 2023 or summer 2024?
Alright, cant wait to see itWe haven't set one up yet, since we have literally nothing to show for it, yet. When we get something a bit playable (like a few missions/quests) we'll send one so we aren't ripping people off.
Appreciate the efforts man <3Translation in progress, I'm just not updating it until we have the first draft
So I looked through the game-files a bit. Translating the files is a nightmare haha. Game is written in Ruby too, that's way out of my comfort zone.
BUT
I'm pretty sure you can inject code to generate mtl in realtime before the text is displayed (it's written in ruby, you can easily write it, if you know the language, which I don't)
Found a class called Image_Message.rb under /src which seems to do all the parsing/ displaying of text so if you translate the incoming text there (see image)... you might have an mtl-translated game.
I also done some research and it seems there's a library that can do mtl. It's called to_lang.
So if somebody with time on their hand wants to try, this would probably lead to some good results.
edit: or above that there's a function called draw_text(x, y, text). You could mtl it there too so you have more context but you might break something maybe.
edit2: this is what I mean, seems a bit tricky but totally doable. Sadly I don't have the time on my hand, so imma leave this here:
View attachment 2922967
I might take a look at it if I get horny enough.We've been constantly updating the tools to help make translation easier, so if you'd wanna participate I could rope you in
work is being done, the translator is doing this for free and has a full time translation job soz
what program did you use to edit this and how did you recompile it back into the original game?So I looked through the game-files a bit. Translating the files is a nightmare haha. Game is written in Ruby too, that's way out of my comfort zone.
BUT
I'm pretty sure you can inject code to generate mtl in realtime before the text is displayed (it's written in ruby, you can easily write it, if you know the language, which I don't)
Found a class called Image_Message.rb under /src which seems to do all the parsing/ displaying of text so if you translate the incoming text there (see image)... you might have an mtl-translated game.
I also done some research and it seems there's a library that can do mtl. It's called to_lang.
So if somebody with time on their hand wants to try, this would probably lead to some good results.
edit: or above that there's a function called draw_text(x, y, text). You could mtl it there too so you have more context but you might break something maybe.
edit2: this is what I mean, seems a bit tricky but totally doable. Sadly I don't have the time on my hand, so imma leave this here:
View attachment 2922967
You don't need to, ruby uses an interpreter, not compiler. You can just use a regular text-editor for this (although I'd recommend IDEs). For a quick example I just used Notepad++ in dark modewhat program did you use to edit this and how did you recompile it back into the original game?
The issue with draw_text is that it's called for each letter/frame to give a "typing" effect.So I looked through the game-files a bit. Translating the files is a nightmare haha. Game is written in Ruby too, that's way out of my comfort zone.
BUT
I'm pretty sure you can inject code to generate mtl in realtime before the text is displayed (it's written in ruby, you can easily write it, if you know the language, which I don't)
Found a class called Image_Message.rb under /src which seems to do all the parsing/ displaying of text so if you translate the incoming text there (see image)... you might have an mtl-translated game.
I also done some research and it seems there's a library that can do mtl. It's called to_lang.
So if somebody with time on their hand wants to try, this would probably lead to some good results.
edit: or above that there's a function called draw_text(x, y, text). You could mtl it there too so you have more context but you might break something maybe.
edit2: this is what I mean, seems a bit tricky but totally doable. Sadly I don't have the time on my hand, so imma leave this here:
View attachment 2922967
require 'net/http'
require 'json'
require 'uri'
def translate(text)
uri = URI('http://localhost:14366/')
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {message:"translate sentences",content:text}.to_json
response = http.request request
return response.body
end
end
def add_message(str, image = nil, side = :top)
str = translate(str)
def add_message(str, face = nil, side = nil, type = :message)
if face.nil?
@sprite_face.image = nil
elsif face.instance_of?(Image)
@sprite_face.image = face
elsif face.instance_of?(String)
begin
@sprite_face.image = Image.load(face)
rescue
@sprite_face.image = nil
end
end
@size = 0
@side = side
@type = str == "" ? :clear : type
trans = translate(str)
@message = trans
Sprite_MessageLog.add_message(trans)
end
Really cool! I got it working with your code too. I put the http-post call into a new thread and just read the translation from the terminal. Like that there's less lag. But you might as well use Textractor, although that one's also kinda broken.By hooking into Window_Message.add_message and Window_BattleMessage.add_message
MTL can be added to all dialog.
sugoi translator isn't meant to be used like this, so translation time is around 1-0.3 seconds per dialog. There's also no saving of already translated text, but heres the code:
You have to hook Window_BattleMessage.add_message like this:Code:require 'net/http' require 'json' require 'uri' def translate(text) uri = URI('http://localhost:14366/') Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http| request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') request.body = {message:"translate sentences",content:text}.to_json response = http.request request return response.body end end
And Window_Message.add_message like this:Code:def add_message(str, image = nil, side = :top) str = translate(str)
And this is what you get:Code:def add_message(str, face = nil, side = nil, type = :message) if face.nil? @sprite_face.image = nil elsif face.instance_of?(Image) @sprite_face.image = face elsif face.instance_of?(String) begin @sprite_face.image = Image.load(face) rescue @sprite_face.image = nil end end @size = 0 @side = side @type = str == "" ? :clear : type trans = translate(str) @message = trans Sprite_MessageLog.add_message(trans) end
View attachment 3008436
It'd be much better to translate the files that store the text though.
Making it a threaded call is a great idea!Really cool! I got it working with your code too. I put the http-post call into a new thread and just read the translation from the terminal. Like that there's less lag. But you might as well use Textractor, although that one's also kinda broken.
Too bad it doesn't translate the menu, missions, items and all that. I looked through the files but dunno really where to inject code for that properly.
But you're right, it's better to translate the files instead.
I just did what the person above me posted. It's just about modifying 2 files in the src folder (it's a hidden folder in the game), I'll post them here. You'll need to download the sugoi auto-translator to make it work.Did you just make the edits using notepad++ and if so what exactly did you do or what exactly was done so we can replicate it?
Or maybe its just easier for us to buy the files which were modified off of you? Please share your edited ruby files.
Can you walk me thru how to setup sugoi and translator++?I am running sugoi translator thru an external harddrive because its over 3gb. How do you load the game into translator++ to get it to inject english into the application?I just did what the person above me posted. It's just about modifying 2 files in the src folder (it's a hidden folder in the game), I'll post them here. You'll need to download the sugoi auto-translator to make it work.
Honestly I think using textractor is a better call though, and just use some OCR translation for the trickier parts (e.g. google translate on your phone)
The game runs on a really old version of ruby so most of the libraries just don't work with it, you can't even download the toolkit for that ruby version anymore (at least i couldn't find it). I tried working on it, but it's just not worth the time when the quality will be only a bit better then what textractor gives you.
There's one good IDE if you wanna have a go at it, RubyMine. But it's a trial version so I just used VS Code instead, but it has way less support for ruby. Notepad++ is also possible honestly.
Maybe finding a good manual hook for textractor might be another good approach for MTL, but I don't know how to do that haha.
I think you're mixing a couple of things here, but congrats on getting it working somehow!i don't know how to inject what i got from the server into the game like you did . please help. If you want to explain technically what is going on, i'm eager to know.
require 'net/http'
require 'json'
require 'uri'
def translate(text)
Thread.new do
uri = URI('http://localhost:14366/')
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = {message:"translate sentences",content:text}.to_json
response = http.request request
return response.body
end
end
end