Albeoris / Memoria.FFPR

MIT License
69 stars 5 forks source link

Also export map data and enemies ai data #5

Closed nnguyen259 closed 3 years ago

nnguyen259 commented 3 years ago

They are the TextAssets in map_(number)_assets_all, map_scripts_assets_all, and monster_ai_assets_all bundles. That potentially can be useful for modding. Could also make it an optional export/import to reduce load time.

Albeoris commented 3 years ago

I think we need to export all files from this list: GameAssets\AssetsPath

Albeoris commented 3 years ago
[Error  :Memoria IL2CPP] [Export] Failed to export assets listed in AssetsPath: UnhollowerBaseLib.Il2CppException: System.Exception: AssetBundlePathMatch#GetGroupData >>> this.originalData is NULL
  at UnhollowerBaseLib.Il2CppException.RaiseExceptionIfNecessary (System.IntPtr returnedException) [0x00014] in <6dac766bc06e46f390c5a2b0f401ed48>:0 
  at AssetLoader.LoadAsset[T] (System.String assetGroupName, System.String assetName, System.Boolean optional) [0x00078] in <7c6ec5a2b2f14238b5c9d24e0f9aea2c>:0 

The main problem is that I don't know why I cannot load any asset... >_> Maybe I call it before ResoruceManager initialized?..

Oh damn ... I know ... I'm not letting the AssetPath load complete and I'm starting to use it myself. :D

Albeoris commented 3 years ago
[Info   :Memoria IL2CPP] [Export] Loading battle assets...
[Info   :Memoria IL2CPP] [Export] Waiting...
[Info   :Memoria IL2CPP] [Export] Waiting...
[Info   :Memoria IL2CPP] [Export] Waiting...
[Info   :Memoria IL2CPP] [Export] Waiting...
[Info   :Memoria IL2CPP] [Export] Waiting...
[Info   :Memoria IL2CPP] [Export] Loaded battle assets!

It's alive! :)

nnguyen259 commented 3 years ago

Oh nice!

Albeoris commented 3 years ago

Possible types:

UnityEngine.AnimationClip UnityEngine.AnimatorOverrideController UnityEngine.GameObject UnityEngine.Material UnityEngine.RenderTexture UnityEngine.RuntimeAnimatorController UnityEngine.Shader UnityEngine.Sprite UnityEngine.TextAsset UnityEngine.Texture2D UnityEngine.U2D.SpriteAtlas

nnguyen259 commented 3 years ago

TextAsset is probably the most useful one, although Sprite and Texture2D are also useful for texture mod. Maybe have a config for it? depends on how long exporting all of them take

Albeoris commented 3 years ago

\StreamingAssets\aa\catalog.json There is a .json with file descriptions with file extensions.

faospark commented 3 years ago

so there is a possibility of modding it graphically without tocuhing the main files (unpack/decompress/edit/recompress)?

nnguyen259 commented 3 years ago

yeah if we export everything then it's just a replace in place, super convenient

Albeoris commented 3 years ago

Map:

[Info   :Memoria IL2CPP] [Export (350 / 815)] Loaded 11 assets from [map_00000] in 0,1279683 sec. Exporting...
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export collision TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_1/collision.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export entity_default TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_1/entity_default.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export tilemap TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_1/tilemap.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export collision TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_2/collision.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export entity_default TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_2/entity_default.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export tilemap TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_2/tilemap.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export collision TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_3/collision.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export entity_default TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_3/entity_default.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export tilemap TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/Map_00000_3/tilemap.json
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Skip Map_10010. Not supported type: UnityEngine.Texture2D
[Info   :Memoria IL2CPP] [Export (350 / 815)]   Export package TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Map/Map_00000/package.json

AI:

[Info   :Memoria IL2CPP] [Export (610 / 815)] Loaded 49 assets from [monster_ai] in 0,0529806 sec. Exporting...
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_001_Goblin TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_001_Goblin.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_006_WinterWolf TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_006_WinterWolf.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_008_FireLizard TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_008_FireLizard.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_009_Basilisk TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_009_Basilisk.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_016_Pirate TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_016_Pirate.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_020_Bigeyes TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_020_Bigeyes.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_021_Deepeyes TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_021_Deepeyes.json
[Info   :Memoria IL2CPP] [Export (610 / 815)]   Export sc_ai_025_Crawler TextAsset %StreamingAssets%\Assets/GameAssets/Serial/Res/Battle/MonsterAI/sc_ai_025_Crawler.json

Working. I'll try to finish tomorrow and try to add texture export support.