• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Unity Multiple variables for a single string in a Unity game

Greslux

Member
Apr 24, 2022
219
283
Hi all. I decided to translate the game "Tomie Wanna".

At first I used "XUnity.AutoTranslator-ReiPatcher-5.2.0" and translated every line, but then I realized that I should look for another approach.
I downloaded the APK file, changed the file resolution to ZIP, then used "UtinyRipper-master" to get the text.

Problems:

PROBLEM #1.

I got too few files. They are mostly dialogues with sex scenes. I couldn't find anything else (settings, prompts, etc). There are 56 files in the folder I got with "UtinyRipper-master". Many of them contain the same text. I opened all 56 files, copied text from there, and pasted it into one file. I got almost 1300 lines. Then I used "online delete duplicate lines" and I got about 600 lines.
BUT!
But some lines are very similar, here is an example:

I took his {CUM})
I took his {CUM}♡)
(In the second line, there is a picture of a heart at the very end. I don't know if it will show up in the browser.)
That is, I have any number of repeated lines, but with a heart...


PROBLEM #2.

This is a very serious problem and I really don't know what to do.
Getting the files from the APK file, I found there the file "_synonyms".
I'm not familiar with Unity, but I am familiar with programming languages, so my understanding is that this is a {list name} that contains different variants of words. And some function in Unity takes a random word from that list and substitutes it into the string.

Here's an example:

--- It's just a string.
A {BITCH} should make some noise!

--- And this is the list:
{BITCH}=bimbo,bitch,cock slave,cocksleeve,cocksucker,cum bucket,cum dump,cumslut,cunt,fucktoy,sex toy,skank,slave,slut,whore

As a result I get a number of different options equal to the length of the list (14).

The game takes a random word from the above {LIST} and forms a string.
When I get a new string in the game (1 of 14), it is translated and added to the file "_AutoGeneratedTranslations", then I translate it.
I don't have to play many times and try to get all 14 lines to get them added to the translation file.
If I have a list, I could prepare in advance and do this:

- A bimbo should make some noise!
- A bitch should make some noise!
- A cock slave should make some noise!
- A cocksleeve should make some noise!
- A cocksucker should make some noise!
- A cum dump should make some noise!
- A cumslut should make some noise!
- A cunt should make some noise!
- A fucktoy should make some noise!
- A sex toy should make some noise!
- A skank should make some noise!
- A slave should make some noise!
- A slut should make some noise!
- A whore should make some noise!

And so for all lines with lists. And I would be able to translate it.
But the problem is not even that I have 600 such strings... Let's say that the average number of words in all lists is 10. So I would need 6000 different strings.

THE PROBLEM IS...

I showed you an example of a non-complete string...
The full string looks like this (actually there are 2, for different situations: pussy and ass):

A {BITCH} should make some noise! Let everyone know you're getting your {ASSHOLE} {FUCK}ed!
A {BITCH} should make some noise! Let everyone know you're getting your {PUSSY} {FUCK}ed!

Suppose {ASSHOLE} / PUSSY} and {FUCK} are also 14 words each.
In that case, I now get 14*14*14 = 2744 choices for {ASSHOLE} and 2744 choices for {PUSSY}.
That's almost 6k lines for only two lines out of 600.


----------------------------------------------------

And by the way, here's a more interesting example:

--- It's just a line
(Shivering around the {HUGE} {COCK}s {PENETRAT}ing my {GENWT} {HOLE}s, I feel {THICK} {CUM} {EJACULATE} into me)

And these are the lists:

{HUGE}=big,bulky,engorged,enormous,fat,huge,immense,imposing,large,massive,oversized,swollen,thick
{COCK}=boner,cock,dick,dong,erection,prick,shaft,schlong
{PENETRAT}=invad,impal,penetrat,pierc,plung,prob
{GENWT}=burning,gaping,ravished,raw,sore,stretched,swollen,tender,tingling
{HOLE}=cock hole,cock socket,entrance,fuck hole,hole,opening,orifice,passage
{THICK}=frothy,glistening,gooey,heavy,messy,mucky,potent,slimy,sloppy,sticky,thick,viscous
{CUM}=cum,ejaculate,jism,jizz,seed,semen,sperm,spooge,spunk
{EJACULATE}=blast,burst,erupt,spew,spurt,squirt,unload


I didn't even count the number of possible choices for each line.

It's good that there is variety in the dialogues and the game will delight us with new words.
But it is very bad for the translation, because I need to have a translation for every possible option.
Considering that each line has an average of about 4 lists, and the average number of words in a list is about 8... And I have 600 lines...
That's about 600 lines to translate and that's just the sex scenes, not counting the dialogue and the story.

What should I do?

I'm not familiar with languages of the "C" family, I'm only familiar with Python, so I don't even know if it's possible to write some mod that would allow me to:

1. avoid picking a random word from a list.
2. Use my list with just 1 word.
3. Substitute the original strings so that instead of:
- A {BITCH} should make some noise! Let everyone know you're getting your {PUSSY} {FUCK}ed!

the game will get this line:
- A bitch should make some noise! Let everyone know you're getting your pussy fucked!

4. The best option, which will save the variety of words. It would be nice if the game took a random word from my list.
That is, I'd make my list with already translated words, and the game could take any word with translation from it. There would be a total of 88 lists.

I've already spent 3 days translating. I translated all sorts of stuff: settings, tips, miscellaneous game information, character traits, intro, store, and so on (stuff that doesn't use random words from lists).
Now I've seen the whole situation. Now should I just give up and drop everything?

By the way, I forgot to mention that there's also this in the game:

No.=
NO=
No=
INVENTORY=
Inventory=
Return=
return=
Skill =
Skill=
etc.

That's the smallest of the problems, though...
 

Greslux

Member
Apr 24, 2022
219
283
Guess you need enough motivation and time to do all that mentioned-above ideas.
I created a thread on one of the sites asking for help with translation.

I also solved the problem with arrays. I used multiple search and word substitution, so that instead of array references I inserted simple words that make sense.

The problem with generating new variables was solved. It turns out I had to change something in the init file.
Thank you for your comment. You've reminded me of that topic. I think it's no longer relevant and can be deleted