(Unity) Trying to uncensor game, stumped.

Prick

Engaged Member
Jul 17, 2017
2,037
1,802
The game in question is KitsuneHime by Tofu-Soft, although it seems to be also known as Otofuke and Kufa. Idek.

Anyway, I'm still a little new to modifying asset files, and I have all the tools I could find. Such as unity asset bundle extractor for asset files, dnspy for .dll files, and fhred for hex editing. The learning curve is pretty extreme but I'm getting around. Been lurking on tons of threads trying to gather information to help me on this perilous journey.

So.. generally, all the games I have tried to open have a rather obvious censor material / monoscript simply labeled as "mosaic." This game took me some time to locate it, because it was a material labeled "mozaic2.0", furthermore there is another six mozaic materials for a female character, and another six mozaic materials for the male, labeled by distance to the camera.

The problem I'm facing, is once I remove all of the "mozaic" materials, as soon as I save and close, UABE says "unable to open the file for writing." Thus, any changes I make get reverted. Next I tried to use the program to create an .exe installer to remove the same files, didn't work either, the materials just reappear.

I figured out why ^^^ wasn't working. You cannot save the file to the same folder which the file you are editing resides, you must save somewhere else then overwrite.


There is no mention of mosaic or mozaic in assembly-csharp, I dug around for quite some time.

Looking for some pro tips and any advice for what I should try next.


If anyone wants to give it shot I found the game on anime-sharing.
Just search for 狐姫 Ver.1.0.1.


*Edit*

I struck progress when I found a solution to uncensoring another unity game, simply exporting the dump for the mosaic will allow you to edit variables for the material itself. Problem being that the same method is fruitless because they don't have the exact same method, or at least information within the material file. Very similar, but it's not working. I have however managed to change the color of the mosaic, but other than that, it seems literally setting every value to 0 did not work :b
 

Prick

Engaged Member
Jul 17, 2017
2,037
1,802
Update:

Most unity censors that I find successful to remove, have a line within the material file called blocksize.
Example:
0 pair data
1 string first = "_BlockSize"
0 float second = 16.000000
Simply by changing 16 to 1, the mosaic material is effectively removed completely.

Here is the data from the mosaic I'm trying to remove:
You don't have permission to view the spoiler content. Log in or register now.

I have tried changing a number of these values, with no real effect. The only progress I made was by changing some of the other lines within the file:

You don't have permission to view the spoiler content. Log in or register now.

By changing the alpha to 0 the mosaic filter appeared less blocky, but it was still obstructing the texture. Changing each color to focus one color, R G or B, I was able to isolate which string was controlling the color of the mosaic. However I was not able to disable it by simply making it transparent.

Still looking for some other ideas if anyone has them.
 

Prick

Engaged Member
Jul 17, 2017
2,037
1,802
Conclusion update:

I located a which has somehow eluded me this whole time. The thread features some brief discussion, along with a demosaic patch. This didn't help me much though, I wanted more depth on the process. :'(

@TCMS, you can close this thread.
 

Kitsutan

New Member
Feb 18, 2019
3
2
I was able to find how to remove the mosaic using your original info you posted here.
Your posts helped me figure out this solution so I feel obligated to share my findings with you.

1. First make a copy of your original game files incase something goes wrong. Then use the unity asset bundle extractor to open KitsuneHime_Taikenban_Data / level0

2. Locate following 8 assets using view tab search by name:
GameObject Kaguya_Pixelated_Sphere_CharaSelect_Aya
GameObject Kaguya_Pixelated_Sphere_CharaSelect_Honoka
GameObject Kaguya_Pixelated_Sphere_CharaSelect_Kaguya
GameObject Kaguya_Pixelated_Sphere_CharaSelect_Custom
GameObject Kaguya_Pixelated_Sphere_CharaSelect_Normal
GameObject Kaguya_Pixelated_Sphere_CharaSelect_TaikenBan
GameObject M_Pixelated_Sphere02
GameObject M_Pixelated_Sphere03

3. Export dump the 8 assets located from step 2 into a new directory and edit them all to look similar to the following (the only line of text you will change in each asset is in the last line.) You will change the words true to false.
example:


0 GameObject Base
0 vector m_Component
1 Array Array (3 items)
0 int size = 3
[0]
0 ComponentPair data
0 PPtr<Component> component
0 int m_FileID = 0
0 SInt64 m_PathID = 30286
[1]
0 ComponentPair data
0 PPtr<Component> component
0 int m_FileID = 0
0 SInt64 m_PathID = 37807
[2]
0 ComponentPair data
0 PPtr<Component> component
0 int m_FileID = 0
0 SInt64 m_PathID = 35728
0 unsigned int m_Layer = 13
1 string m_Name = "Kaguya_Pixelated_Sphere_CharaSelect_Aya"
0 UInt16 m_Tag = 0
0 bool m_IsActive = false

4. After changing each asset to false, import dump those changed assets back in to your level0 file using unity asset bundle extractor.

5. When you are done replacing the original 8 assets with your edited assets, go to file and save in the directory you were working in. If you save over the original level0 file the progress will not save and you will need to restart the previous steps.

6. Go to the original level0 file in your game directory and replace with the new level0 file. After completing this step you can now test your work by opening the game and view your results.

I hope this helps and thank you for your posts. Without your info I wouldn't have known where to start.
 

Kitsutan

New Member
Feb 18, 2019
3
2
Conclusion update:

I located a which has somehow eluded me this whole time. The thread features some brief discussion, along with a demosaic patch. This didn't help me much though, I wanted more depth on the process. :'(

@TCMS, you can close this thread.
The patch didn't help because the assets will likely have a different ID from the ones in your level0 file. The best way to make sure you find the correct assets is to go in manually using the unity asset bundle extractor program.
 

Prick

Engaged Member
Jul 17, 2017
2,037
1,802
The patch didn't help because the assets will likely have a different ID from the ones in your level0 file. The best way to make sure you find the correct assets is to go in manually using the unity asset bundle extractor program.
As per above, you definitely could have posted this in my tutorial thread.
This attempt was several months before I created the main thread, and most if not all the information in your followup is already covered :)
Thank you for the work, despite the game already being patched.
 

Kitsutan

New Member
Feb 18, 2019
3
2
Lol Wish I saw your tutorial thread before trying to figure that out last night. Well in any case, it was a fun way to pass some time. I hope some of that can be useful in some way I guess. Thanks again I will check out the tutorial thread :)