How to hook a Ren'py game with AGTH/ITH
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
How to hook a Ren'py game with AGTH/ITH
I want to use AGTH/ITH with a visual novel made with Ren'py for automatic translation need but I can't figure how to do that.
With AGTH used by Translation Aggregator, sometimes it says "Error: can't install hook", sometimes it "works" but the AGTH window disappears.
With ITH, I attached the process but it found no threads.
I don't know what to do while I heard it's easy to use AGTH/ITH with Ren'py.
Thank you for your help.
With AGTH used by Translation Aggregator, sometimes it says "Error: can't install hook", sometimes it "works" but the AGTH window disappears.
With ITH, I attached the process but it found no threads.
I don't know what to do while I heard it's easy to use AGTH/ITH with Ren'py.
Thank you for your help.
- Asceai
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: How to hook a Ren'py game with AGTH/ITH
I'd say it would be quite hard, generally. Those tools typically look for OS calls to render fonts and stuff. Something like Ren'Py that does everything internally and produces textures of text would be largely opaque to these efforts.
I wonder if it would be feasible to inject a script (this is easy, just drop it in the game dir) that copies everything said with say statements to the clipboard...
I wonder if it would be feasible to inject a script (this is easy, just drop it in the game dir) that copies everything said with say statements to the clipboard...
Re: How to hook a Ren'py game with AGTH/ITH
It's a VN made by me, a porting to be exact, for personal comfort but if I can't extract the text, it's useless.
Just to say that I have full access to the data so if you can write me a script or whatever to copy the text to the clipboard, I am 100% with you.
Just to say that I have full access to the data so if you can write me a script or whatever to copy the text to the clipboard, I am 100% with you.
- Asceai
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: How to hook a Ren'py game with AGTH/ITH
How about the 'extract dialogue' or 'generate translations' buttons in the launcher? Do those serve your purposes?
Re: How to hook a Ren'py game with AGTH/ITH
I need to extract lines in live, when I read the VN, so "extract dialogue" is a no go. And most likely "generate translations" because my automatic translator need live data in the clipboard.
- Asceai
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: How to hook a Ren'py game with AGTH/ITH
Realised that there's no way to copy stuff into the clipboard in Ren'Py, so I guess that option is out. Well, I guess throwing win32clipboard in there somewhere could work...
EDIT: Although it's kind of a mess of files and I'm not really sure how to install it into Ren'Py's python.
EDIT: Although it's kind of a mess of files and I'm not really sure how to install it into Ren'Py's python.
Re: How to hook a Ren'py game with AGTH/ITH
Errr... I tried to follow your advice but it seems to me too hard for my level. In fact, I have no skills if we talk about python...
Before posting here, I found this thread where Elmiwisa said:
Before posting here, I found this thread where Elmiwisa said:
So, I sent her a pm but her last post dates from "Thu Oct 31, 2013". I guess she is no longer active.Elmiwisa wrote:Yes, it is very easy to do text hooking on Ren'Py games, in fact easier than some other VN engine.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: How to hook a Ren'py game with AGTH/ITH
What are the options for how your translation tools can get their data?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Re: How to hook a Ren'py game with AGTH/ITH
What file? What line?
I don't want to spam you with a .rpy wall of text.
In fact, I don't think I touched this sort of option so, I guess they have their default values.
I don't want to spam you with a .rpy wall of text.
In fact, I don't think I touched this sort of option so, I guess they have their default values.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: How to hook a Ren'py game with AGTH/ITH
I guess the question is - if there was a small modification to make Ren'Py more translation-friendly, what would it be?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Re: How to hook a Ren'py game with AGTH/ITH
If you are asking me what to do to allow translator tool, it's simple, you need to copy each dialogue/narration in the clipboard.
For example, with that:
他の勢力も含め、その迷宮とやらに群がっているのか
click > 「はい。 中は階層構造となっている事が判明しています」
click > その迷宮には何かの秘密があるという事か
click > 「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」
click > なるほど。たしかに強力なようだな
The clipboard must get the sentences in one time with no break even if the text speed is at "very slow".
If you want to improve that, you can add the y/p value defined in Character() with a special delimiter like:
[p_value] 「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」
Let's be foolish, you said "options" so, if I would an option, it would be the possibility to choose the way the name of the character, if there is one, and the sentence are send to the clipboard, what delimiters I want to use, if I want or no to send the name of the character. Something like:
optionwhatshername= ### sentence >>> @character@
where sentence and character are the variables and the other strings like "### ", the delimiters.
Even if you can't avoid some garbage in the output, it's no big deal because there is a plugin who allow us to perform regex before translation. Even if you can just send something like:
p "「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」" instead of just 迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます
... idem, it's better than nothing.
Ah, you need to send the In-Game Menus. I don't know how menus work in Ren'py but if you have something like that on your screen:
Q/ What should I do?
1/ Drink coffee.
2/ Drink tea.
you can render that like that:
If you can do that, I would be very grateful to you. Basically, you just need to send the raw sentences to make me happy, you can implement the options later if you are busy.
For example, with that:
Each time you click, you will have in the clipboard:"他の勢力も含め、その迷宮とやらに群がっているのか"
play voice "voices/v_SR021_0003.a2402c79e742e832f21066f03c9df77c.ogg"
y "「はい。 中は階層構造となっている事が判明しています」"
"その迷宮には何かの秘密があるという事か"
p "「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」"
"なるほど。たしかに強力なようだな"
他の勢力も含め、その迷宮とやらに群がっているのか
click > 「はい。 中は階層構造となっている事が判明しています」
click > その迷宮には何かの秘密があるという事か
click > 「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」
click > なるほど。たしかに強力なようだな
The clipboard must get the sentences in one time with no break even if the text speed is at "very slow".
If you want to improve that, you can add the y/p value defined in Character() with a special delimiter like:
[p_value] 「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」
Let's be foolish, you said "options" so, if I would an option, it would be the possibility to choose the way the name of the character, if there is one, and the sentence are send to the clipboard, what delimiters I want to use, if I want or no to send the name of the character. Something like:
optionwhatshername= ### sentence >>> @character@
where sentence and character are the variables and the other strings like "### ", the delimiters.
Even if you can't avoid some garbage in the output, it's no big deal because there is a plugin who allow us to perform regex before translation. Even if you can just send something like:
p "「迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます」" instead of just 迷宮、ではなく迷宮を出現させた張本人を捕縛に向かっているかと思われます
... idem, it's better than nothing.
Ah, you need to send the In-Game Menus. I don't know how menus work in Ren'py but if you have something like that on your screen:
Q/ What should I do?
1/ Drink coffee.
2/ Drink tea.
you can render that like that:
With no break.What should I do? Drink coffee. Drink tea.
If you can do that, I would be very grateful to you. Basically, you just need to send the raw sentences to make me happy, you can implement the options later if you are busy.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Ocelot
