Tool Unity [BepInEx][plugin] Texture Replacer v1.0.8.0

newer1988

New Member
May 9, 2024
6
0
From what I heard, they will support Chinese and Korean within two months.

if want to japanese version to uncensored now, it requires a bit of complicated work.
There are two main directions: one is to replace the assets file, and the other is to use texture_replacer.
Basically, you need the original images (mosaic) and the uncensored images.

Although it is explained in a complicated way in OP, another way is to extract the textures of each version with a tool like AssetRipper, and compare them with a tool like WinMerge to extract the images to be replaced.
It will be more of a headache if there are duplicate texture names, but the textures in this game do not seem to have duplicate names. (H scenes)
Just add "_" to the file name of the images to be replaced and put them in the ModImages folder. (the extension is .png)
I tried everything but it was too much for me.:cry:
 

kumarin

Engaged Member
Feb 19, 2022
2,103
3,128
run AssetRipper and "Open Folder" a jap game folder.
"Export - Export All Files"
select folder(I select "r:\1"), Export Primary Content
1733642099444.png
do same work with eng version. (I select "r:\2")

run WinMerge.
1733642347925.png
untick "Tree Mode" at "View" menu.
1733642556959.png
click "Comparion result" to descend order.
1733642759907.png
The files that appear against a yellow background are the ones that have differences.
select yellow items. (click top item, press shift + PgDn)
right click, Copy, Right to...
1733643051174.png
select folder to copy. (I select "r:\3")
run PowerShell and go to work folder. (in my case it is "r:\3")
forfiles /S /M *.png /C "cmd /c rename @file @fname_.png"
browse files and delete which not needed replaced.
install texture_replacer plugin and run game once.
move work folder to "BepInEx\plugins\ModImages\"
end.
 

newer1988

New Member
May 9, 2024
6
0
run AssetRipper and "Open Folder" a jap game folder.
"Export - Export All Files"
select folder(I select "r:\1"), Export Primary Content
View attachment 4310085
do same work with eng version. (I select "r:\2")

run WinMerge.
View attachment 4310088
untick "Tree Mode" at "View" menu.
View attachment 4310091
click "Comparion result" to descend order.
View attachment 4310093
The files that appear against a yellow background are the ones that have differences.
select yellow items. (click top item, press shift + PgDn)
right click, Copy, Right to...
View attachment 4310097
select folder to copy. (I select "r:\3")
run PowerShell and go to work folder. (in my case it is "r:\3")

browse files and delete which not needed replaced.
install texture_replacer plugin and run game once.
move work folder to "BepInEx\plugins\ModImages\"
end.
I was able to successfully make it uncensored! Thank you.
However, it takes a while for the image to be replaced.
 

Zippix

Well-Known Member
Sep 7, 2017
1,815
1,214
Hiya, would appreciate a little help here!

So, there is this Unity game from miconisomi from 2015 which I found a decent UI translation for, a couple of .PNG files basically, which would have to be changed in the assets. In the UI TL instructions, they mention a "Unity Asset Viewer" program with links, which can replace Texture2D assets without any hassle - but of course it cannot be found anywhere anymore (at least I couldn't), so I need a workaround.

This texture replacer seemed like a jackpot, but alas...

The relevant BepInEx (x86, mono, v5.X) crashes the game. To make matters more infuriating, their only a-little-bit-more-than-a-year older game from 2016, gladly starts up with BepInEx v5.X, also, the effing latest bleeding edge build (x86, mono, #729) actually starts up this 2015 game I need some assets replaced in, but your plugin -as luck would have it- won't work with it... xD

I know this is maybe more a BepInEx question, but do you perhaps have a recommendation, kumarin? Honestly, if there's something that can decompile the assets and then recompile with those few translated .pngs, would be fine by me - any suggestion welcome; but maybe there is a way to make this work with the latest bleeding edge version?

Thx.
 

kumarin

Engaged Member
Feb 19, 2022
2,103
3,128
Hiya, would appreciate a little help here!

So, there is this Unity game from miconisomi from 2015 which I found a decent UI translation for, a couple of .PNG files basically, which would have to be changed in the assets. In the UI TL instructions, they mention a "Unity Asset Viewer" program with links, which can replace Texture2D assets without any hassle - but of course it cannot be found anywhere anymore (at least I couldn't), so I need a workaround.

This texture replacer seemed like a jackpot, but alas...

The relevant BepInEx (x86, mono, v5.X) crashes the game. To make matters more infuriating, their only a-little-bit-more-than-a-year older game from 2016, gladly starts up with BepInEx v5.X, also, the effing latest bleeding edge build (x86, mono, #729) actually starts up this 2015 game I need some assets replaced in, but your plugin -as luck would have it- won't work with it... xD

I know this is maybe more a BepInEx question, but do you perhaps have a recommendation, kumarin? Honestly, if there's something that can decompile the assets and then recompile with those few translated .pngs, would be fine by me - any suggestion welcome; but maybe there is a way to make this work with the latest bleeding edge version?

Thx.
if game client is below Unity 2017 ? like an Unity 5 or 4, use BepInEx 5 and edit BepInEx\config\BepInEx.cfg as
Type = MonoBehaviour
Type = Camera will be works too.
 
  • Heart
Reactions: Zippix

Zippix

Well-Known Member
Sep 7, 2017
1,815
1,214
if game client is below Unity 2017 ? like an Unity 5 or 4, use BepInEx 5 and edit BepInEx\config\BepInEx.cfg as

Type = Camera will be works too.
Welp, hooray, it started up! Version was apparently 4.6.4. (though the other game, with which BepInEx 5.X worked out of the box, was 5.5.1.).
I actually tried to change things in the .cfg, but since this wasn't even offered in the file at that 'entrypoint assembly' selection part -only 'Application' was mentioned, and as default-, I never would have figured this out! Thank You!

Now let's see if I can get the replacer to work...
---------
Oopsie, spoke too soon:
Guess I'll try with 'Type = Camera'. Am I even using it at the right place in the .cfg file?

Well, no dice unfortunately: using v5.4.23.2, 'Type = MonoBehaviour', having the 'Texture_Replacer_BE5.dll' in the 'plugins' folder, and having the same named .png files in 'plugins\ModImages' doesn't do anything unfortunately. Nothing is noted in the console window, either... Sad.
You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
Any ideas? ALT+F11 isn't doing anything either.
 
Last edited:

Zippix

Well-Known Member
Sep 7, 2017
1,815
1,214
You don't have permission to view the spoiler content. Log in or register now.
Well, after immense hardships, I managed to make it work with XUnityAutoTranslator's texture translation function, for which I got the tip from this thread.
I needed to set 'EnableLegacyTextureLoading' to true in its config file - but maaan, this was such a long trial and error. lol
This option was also probably why I was able to succeed after all, and probably has to do with the game being an older Unity version, as you have suspected kumarin. Guessing something similar is not implemented in texture replacer, which is why I wasn't able to make it work that way, even though everything seemingly was set up correctly.

Anyhow, thanks for the help!
 
  • Like
Reactions: kumarin

ivyxyn

Newbie
Jan 29, 2020
66
120
Well, after immense hardships, I managed to make it work with XUnityAutoTranslator's texture translation function, for which I got the tip from this thread.
I needed to set 'EnableLegacyTextureLoading' to true in its config file - but maaan, this was such a long trial and error. lol
This option was also probably why I was able to succeed after all, and probably has to do with the game being an older Unity version, as you have suspected kumarin. Guessing something similar is not implemented in texture replacer, which is why I wasn't able to make it work that way, even though everything seemingly was set up correctly.

Anyhow, thanks for the help!
0.jpg
1.jpg
2.jpg

In my way,I edit Assembly-CSharp.dll to replace Texture2D and Text for this game.
 

Zippix

Well-Known Member
Sep 7, 2017
1,815
1,214
In my way,I edit Assembly-CSharp.dll to replace Texture2D and Text for this game.
That would be mission impossible for my current self lol - though congrats.
Looks good and clean. I'm happy I was able to make it work this work-aroundish way with BepInEx - the TL and images are good in the UI TL version I grabbed from somewhere, God knows when, as well.
 

Zippix

Well-Known Member
Sep 7, 2017
1,815
1,214
kumarin
Hi again! Having this uncensored asset issue over at the Iris Chronicle thread:
https://f95zone.to/threads/iris-chronicle-v1-1-oiran-ichimi.161564/post-16013709
(summary)

So, as it turns out, the uncensored assets can't be used over on my end, and I'm assuming it is because I have an AMD card and the uncensored assets were compiled by people using nVidia cards so the hashes won't be / aren't the same. XUAT was used to dump the textures that were modified - but I guess I would be in the same boat if they used Texture Replacer, too.

Any way to fix this so I can use that uncensor textures pack - apart from one-by-one locating and renaming the modified assets to match the hashes they would be having if dumped on my end?
Thx!
 

kumarin

Engaged Member
Feb 19, 2022
2,103
3,128
kumarin
Hi again! Having this uncensored asset issue over at the Iris Chronicle thread:
https://f95zone.to/threads/iris-chronicle-v1-1-oiran-ichimi.161564/post-16013709
(summary)

So, as it turns out, the uncensored assets can't be used over on my end, and I'm assuming it is because I have an AMD card and the uncensored assets were compiled by people using nVidia cards so the hashes won't be / aren't the same. XUAT was used to dump the textures that were modified - but I guess I would be in the same boat if they used Texture Replacer, too.

Any way to fix this so I can use that uncensor textures pack - apart from one-by-one locating and renaming the modified assets to match the hashes they would be having if dumped on my end?
Thx!
texture_00 [53D3081565].png. '53D3081565' is value of sha256. sha256 is used to distinguish textures with the same names.
texture replacer is same. just different is use an MD5.
sha256 and MD5 is value of file contents. The values will vary depending on your GPU.

as you knew that
  • nvidia : texture_00 [53D3081565]
  • and : texture_00 [DA9A070F0A]
are same.

A simple solution is to copy the files with corresponding names.
this is . (strange.. why 43 files.. not even)

you can match the same files with ImageCompareForTextureReplacer.py(at this thread). but the usage is very complicated. Sorry.
 

Zippix

Well-Known Member
Sep 7, 2017
1,815
1,214
texture_00 [53D3081565].png. '53D3081565' is value of sha256. sha256 is used to distinguish textures with the same names.
texture replacer is same. just different is use an MD5.
sha256 and MD5 is value of file contents. The values will vary depending on your GPU.

as you knew that
  • nvidia : texture_00 [53D3081565]
  • and : texture_00 [DA9A070F0A]
are same.

A simple solution is to copy the files with corresponding names.
this is . (strange.. why 43 files.. not even)

you can match the same files with ImageCompareForTextureReplacer.py(at this thread). but the usage is very complicated. Sorry.
Thank you very much for answering!

I will download your files, then... Does that mean you have already went through that very complicated "ImageCompareForTextureReplacer.py" process for these files yourself with the modified asset files from the Iris thread, to make it AMD-sha256 compatible? Nice! (maybe you also have an AMD card?)

There was a more recent asset uncen bundle from another user, which has some more (than just those 43) images, so I guess I will be looking at those files' thumbnail views on the secondary monitor, and if I can spot one that is used in the scene that is currently playing, I will rename them (making use of the texture dump feature of XUAT and the BepInEx console) as needed, overwrite the ones in the Texture folder and reload the translation assets in XUAT on the fly (ALT+R)...
Well, that's the plan anyway... xD

Not exactly a leisurely way to be going around unlocking and viewing the scenes, but this shit has really made it mad and personal for me!! lol
 

kumarin

Engaged Member
Feb 19, 2022
2,103
3,128
my GPU is AMD.
I worked on it a long time ago. I copied amd matched files.
so the number should be even, but it's strange that it's odd. Maybe I missed something.

it's a good way that dump and compare with thumbnails.
no needed ALT-R. this function needed 'LoadUnmodifiedTextures=True' but it makes that slow a game. don't use it.