Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KB (FF6): Unable to import textures #23

Open
Silvris opened this issue Feb 23, 2022 · 12 comments
Open

KB (FF6): Unable to import textures #23

Silvris opened this issue Feb 23, 2022 · 12 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Silvris
Copy link

Silvris commented Feb 23, 2022

Exactly as title states. Renaming the "Assets" folder allows the game to progress, so something must be going wrong in the import process.

@Albeoris Albeoris self-assigned this Feb 23, 2022
@Silvris
Copy link
Author

Silvris commented Feb 23, 2022

Serial/Res/Chara, willing to bet it's a SpriteAtlas issue.

@palladin9479
Copy link

When I had the unity log redirected it kept complaining about some asset not available, had to disable Memoria to get the game to start up.

@faospark
Copy link

i think this is related to this. Exporting is also basically on a loop. it wont change export to false after the export process

@fallacies-GitHub
Copy link

fallacies-GitHub commented Feb 24, 2022

Export dies at 2201 / 2347 (93.779%), and the game crashes.
A partial excerpt from the log is as follows:

[Info :Memoria IL2CPP] [Export (2201 / 2347)] Loaded 1 assets from [mt_ff6_147_c01] in 0.101207 sec. Exporting...
[Info :Memoria IL2CPP] [Export (2201 / 2347)] Export [Thumbnail] Texture2D %StreamingAssets%\Assets/GameAssets/Serial/Res/UI/Common/Library/Thumbnail/MT_FF6_147_C00/Thumbnail
[Error :Memoria IL2CPP] [Export] Failed to export assets: System.NotSupportedException: Not supported type [] of texture []. Path: [C:\Program Files (x86)\Steam\steamapps\common\FINAL FANTASY VI PR\FINAL FANTASY VI_Data\StreamingAssets\Assets/GameAssets/Serial/Res/UI/Common/Library/Thumbnail/MT_FF6_147_C00/Thumbnail]
at Memoria.FFPR.Core.TextureHelper.WriteTextureToFile (UnityEngine.Texture2D texture, System.String outputPath) [0x0009b] in <14f7d536bd304c5092e4e64af714acab>:0
at Memoria.FFPR.IL2CPP.ResourceExporter.ExportTexture2D (System.String assetName, UnityEngine.Texture2D asset, System.String fullPath) [0x00143] in <14f7d536bd304c5092e4e64af714acab>:0
at Memoria.FFPR.IL2CPP.ResourceExporter.ExportAsset (Il2CppSystem.Object asset, System.String type, System.String assetName, System.String assetPath) [0x00288] in <14f7d536bd304c5092e4e64af714acab>:0
at Memoria.FFPR.IL2CPP.ResourceExporter.Update () [0x00490] in <14f7d536bd304c5092e4e64af714acab>:0
[Info :Memoria IL2CPP] [Export] Export stopped.
[Info :Memoria IL2CPP] [ModComponent].OnDestroy()

The full log, if it's helpful:
LogOutput.log

Attempting to restart the game after a crash results in another failed attempt to export assets, followed by a crash,
After this, if ExportEnabled is manually set to false, the game is able to launch to the start menu.

This is the log from a launch of the game to the start menu subsequent to setting ExportEnabled to false:
LogOutput.log

From the looks of it, the import process looks like it works? But a part of the log reads as follows:

[Warning:Memoria IL2CPP] [Import] Cannot import sprite by reference to not loaded atlas [Group: mo_ff6_n050_c00, Name: MO_FF6_N050_C00], referenced by [%StreamingAssets%\Assets/GameAssets/Serial/Res/Chara/Map/MO_FF6_N050_C00/Default_00.png.ini].
[Warning:Memoria IL2CPP] [Import] Cannot import sprite by reference to not loaded atlas [Group: mo_ff6_n050_c00, Name: MO_FF6_N050_C00], referenced by [%StreamingAssets%\Assets/GameAssets/Serial/Res/Chara/Map/MO_FF6_N050_C00/Fall_00.png.ini].

... followed by more of the same, before resuming with successful imports.

After launching the game and reaching the start menu, attempting to load an existing save file results in the game being stuck on Now Loading...

Incidentally, even though the game itself can launch, and you can successfully reach the start menu (even if save files fail to load), if you don't touch anything and simply let the opening play out, the game gets stuck on a black screen after the initial song concludes. It doesn't progress to the portion of the opening animation with the text introduction to the story over pans of backgrounds. The game becomes completely unresponsive, even though prior to this point, clicking the screen will load the start menu normally.

As suggested above, renaming the Assets folder results in a successful game launch, and a successful loading of the save file.

The log subsequent to renaming the folder is as follows:
LogOutput.log

@Albeoris
Copy link
Owner

Albeoris commented Feb 24, 2022

Something wrong with ImportTextures. Disable it to avoid the problem.

@Albeoris
Copy link
Owner

I think the problem is related to importing any character atlas, but there is an example with this one:
\FINAL FANTASY VI_Data\StreamingAssets\Assets\GameAssets\Serial\Res\Chara\Map\MO_FF6_N050_C00\MO_FF6_N050_C00.spriteatlas

@fallacies-GitHub
Copy link

fallacies-GitHub commented Feb 25, 2022

Loaded a fresh install of the game and Memoria, with ExportTextures and ImportTextures both set to false.
The game closed on completion of export, and ExportAutoDisable worked as intended, setting ExportEnabled to false.

This is the log of the export:
LogOutput_export.log

Not really familiar enough with modding to know what "Unhollower" means, but there's a block of warnings at the start:

[Info : BepInEx] Loading [Memoria FF PR 1.0.0]
[Message:Memoria FF PR] Initializing...
[Info :Memoria FF PR] Registering assembly types...
[Warning:Unhollower] Method Memoria.FFPR.Configuration.Scopes.ModConfiguration get_Config() on type Memoria.FFPR.IL2CPP.ModComponent has unsupported return type Memoria.FFPR.Configuration.Scopes.ModConfiguration
[Warning:Unhollower] Method Void set_Config(Memoria.FFPR.Configuration.Scopes.ModConfiguration) on type Memoria.FFPR.IL2CPP.ModComponent has unsupported parameter Memoria.FFPR.Configuration.Scopes.ModConfiguration value of type Memoria.FFPR.Configuration.Scopes.ModConfiguration

This continues on for awhile before the import initiates.
Later on in the log, there's a series of errors:

[Info :Memoria IL2CPP] [Export (2217 / 2347)] Loaded 3 assets from [sandbox] in 0.0808728 sec. Exporting...
[Info :Memoria IL2CPP] [Export (2218 / 2347)] Loaded 3 assets from [scene_extragallery] in 0.0490873 sec. Exporting...
[Error :Memoria IL2CPP] [Export (2218 / 2347)] Cannot find asset [GalleryDetailsUi]: Assets/Scenes/UnityScene/ExtraGallery/GalleryDetailsUi
[Error :Memoria IL2CPP] [Export (2218 / 2347)] Cannot find asset [GalleryMain]: Assets/Scenes/UnityScene/ExtraGallery/GalleryMain
[Error :Memoria IL2CPP] [Export (2218 / 2347)] Cannot find asset [GalleryUi]: Assets/Scenes/UnityScene/ExtraGallery/GalleryUi

This likewise continues on for awhile before exports resume as normal.
However, as stated above, the export appears to conclude normally.

Subsequently, ImportEnabled worked as intended on relaunch, and the game launched successfully, behaving as usual.

This is the log of the import:
LogOutput_import.log

So, yeah, disabling export and import of textures appears to have resolved the issue for now.
Thank you. I'll comment if something else comes up.

@Albeoris
Copy link
Owner

Something wrong with recreated sprite:

            ModComponent.Log.LogInfo($"Cur: {cur}");
            ModComponent.Log.LogInfo($"Cur: {cur.name}");
[Info   :Memoria IL2CPP] Cur: UnityEngine.Sprite
[Error  :    Detour] UnhollowerBaseLib.Il2CppException: System.NullReferenceException: Object reference not set to an instance of an object.

  at UnhollowerBaseLib.Il2CppException.RaiseExceptionIfNecessary (System.IntPtr returnedException) [0x00014] in <38fa7eb6c12441c8a8621750ed4c48b6>:0 
  at UnityEngine.Object.get_name () [0x0002c] in <18039698c44747fab11ff8d36c5e84c8>:0 

@Albeoris
Copy link
Owner

Any property will throw NullReferenceException

@Albeoris
Copy link
Owner

Create:
[Info :Memoria IL2CPP] Sprite:2852259593440 (Sprite:Fall_00(Clone))

Find:
[Info :Memoria IL2CPP] Sprite:2852259593440 (NullReferenceException)

@Albeoris
Copy link
Owner

[Info   :Memoria IL2CPP] Pointer: 2305467620832
[Info   :Memoria IL2CPP] Name: Fall_00(Clone)

[Info :Memoria IL2CPP] Title Scene Unload

[Info   :Memoria IL2CPP] Pointer: 2305467620832
[Error  :Memoria IL2CPP] [ModComponent].Update(): UnhollowerBaseLib.Il2CppException: System.NullReferenceException: Object reference not set to an instance of an object.

@Albeoris Albeoris added bug Something isn't working help wanted Extra attention is needed labels Feb 25, 2022
@Albeoris
Copy link
Owner

I have disabled the import textures until we deal with this issue.
8e5a8e8

@Albeoris Albeoris changed the title Unable to start new game in FF6 after exporting/importing assets FF6: Unable to import textures Feb 25, 2022
@Albeoris Albeoris changed the title FF6: Unable to import textures KB (FF6): Unable to import textures Jul 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants