Jump to content

UABE - Asset Bundle Extractor


DerPopo

Recommended Posts

I would also like to know about:

 

"- Added a mod installer and mod installer editor, so any changes can be saved directly to a installer or a package file."

 

How it would work if updated version of the game /asset ?

Which changes stored in the patch? How they apply to get back modded asset ?

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

I'd like to use the API to extract icons from the assets to be displayed in my program. The problem is that my program has been written in C# and the API is C++. I looked into including C++ dlls in C# project, but I'd still need to change parts of the original C++ dll.

 

Is there a source available so I can convert the parts I need to C#? I will credit you as though I used the API.

Link to comment
Share on other sites

With Your help i was able to shove something in the asset but it is not accepted by the game, maybe i need to set the path. How to do it ?

 

(yes, i also made changes in ta_terrainxml.txt)

You'll most likely have to add the path in the PathId 1 asset (type AssetBundle) using export/import dump so it can find it properly. Make sure to update the array size properly before importing the dump (it doesn't matter if the indices are wrong though).

 

 

I would also like to know about:

 

"- Added a mod installer and mod installer editor, so any changes can be saved directly to a installer or a package file."

 

How it would work if updated version of the game /asset ?

Which changes stored in the patch? How they apply to get back modded asset ?

Game updates will most likely require a new installer (even if it could find the updated pathIds automatically, changes to e.g. terrainxml would still break it).

It stores exactly the changes you did to the bundle/.assets file (with or without saving before), it also lists the modifications.

 

I'd like to use the API to extract icons from the assets to be displayed in my program. The problem is that my program has been written in C# and the API is C++. I looked into including C++ dlls in C# project, but I'd still need to change parts of the original C++ dll.

 

Is there a source available so I can convert the parts I need to C#? I will credit you as though I used the API.

 

Maybe I'll create a C# wrapper for the API (no guarantee for now though).

I tried to answer your PM, but it says your storage is full.

Link to comment
Share on other sites

Thanks again !

I added the path and put all need numbers into an array. In assets everything looks right.

 

I tried to add a textures to clay named "undClay.tga" and "undClay_n.tga" (it's underground clay without green grass on ground)

i did not succeed...

it seems it is not enough to add a two textures and assign them to a ta_terrainxml.txt.

I still get in the console:

 

Exception: TextureAtlasTerrain: couldn't load diffuse texture 'undClay.tga'

at TextureAtlasTerrain.LoadTextureAtlas (Int32 _idx, .MeshDescriptionCollection _tac, Boolean _bLoadTextures) [0x00000] in <filename

 

unknown>:0

at WorldStaticData+Class176.MoveNext () [0x00000] in <filename unknown>:0

at GameManager+Class137.MoveNext () [0x00000] in <filename unknown>:0

at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0

 

looks like I missed something, there is something else - outside of these assets.

maybe Assembly-CSharp.dll not using a more larger array.

 

Anyone successfully added terrain textures? I begin new thread about this that would not clutter up this.

 

UPDATE:

Yes, this method works. I managed to add a one pair of textures in A15exp...but only one pair, because one place was loose relative to the A14.

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

NavMesh likely has very large arrays that aren't marked as TypelessData, so it needs ~30+ bytes for every single variable instance. On top of that, the tree view isn't too efficient for such large amounts of data. I might look into making it dynamically add the fields when expanding an item, but it isn't really a solution to the problem as it makes the list less responsive and still takes the same memory when everything is expanded.

Link to comment
Share on other sites

[Request] Import sounds (e.g. .wav)

 

Hey,

 

first of all I have to say thank your for this awesome tool! Keep it up mate : ))

 

I really like the plugins which are implemented so far (image and text im- and export, sound export).

Is it possible to implement a sound import plugin? I tried "raw import" but that doesn't seem to work...

 

Would be awesome!

 

Thanks 'n bye

Link to comment
Share on other sites

How do I install this software? After downloading, I only see dll files and other files. Where is the exe to install it? I am sorry, but know nothing about programming and IT so this really puzzles me.

 

You probably downloaded the API, which is only for others to write tools that use Unity's file format. Download the normal 2.0 release. You can also apply the small 2.0b hotfix in case it crashes on some files.

Link to comment
Share on other sites

Textures in .resS won't be touched, it will be stored in the Texture2D asset directly. Else, the whole file would need to be recompiled once the texture is bigger than before.

After I saved Texture2D directly into a asset, how can I find out the offset of the asset in whom I saved the data? For that would, when i ImportDump, substitute the name of the asset and redirect to saved data.

Unfortunately when i read the ViewData - me showing the offset for .resS

 

 

 

How can I import my own sound (.wav) files to replace the original ones? I mean if extraction is possible, import should be possible aswell ?!

 

Thanks in advance.

check it for info:

https://7daystodie.com/forums/showthread.php?32600-Overriding-vanilla-files-(assets-)&p=314195&viewfull=1#post314195

and

https://7daystodie.com/forums/showthread.php?41048-Replacing-oceans-lakes-with-a-swamp-biome-in-RWG-(small-xml-edit)&highlight=water+biome

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

Thanks for your reply but that doesn't help me unfortunately.

I want to mod Hearthstone from Blizzard and everything works fine using the tools provided here...

Using the method described in your linked posts didn't work for me: All files have the same .resource as m_source e.g. m_source:CAB-abc123/CAB-abc123.resource.

 

I am not exactly sure but I think the m_offset describes the exact beginning of the specific file in the .resource as otherwise the good file couldn't be loaded.

 

I guess I need to add my file to the .resource file and use the good offset - is that doable? I know that someone already modified hearthstone sounds but this guy doesn't want to share how he did it :(

Link to comment
Share on other sites

After I saved Texture2D directly into a asset, how can I find out the offset of the asset in whom I saved the data? For that would, when i ImportDump, substitute the name of the asset and redirect to saved data.

Unfortunately when i read the ViewData - me showing the offset for .resS

If I understand you correctly, you are trying to find the byte offset to the Texture2D asset with the raw texture data in an .assets file, to refer to from another Texture2D asset? UABE doesn't show the offsets to the single assets, you'd have to search for the bytes in it with a hex editor. If you need the offset of the raw data inside the Texture2D asset, it's constant for a specific Unity version except the asset name. If you look at a dump, you can add up the 4-byte variable sizes and the 4-byte aligned string length.

 

If you want to put the data stored in a .resS into a Texture2D asset, you'd have to export the raw Texture2D asset, copy-and-paste the referenced data from the .resS with a hex editor to the location in the Texture2D as mentioned above, and correct the array length (should be 4x 00s before the mentioned texture data offset). 00 the rest after the texture data, which is the .resS reference.

 

Thanks for your reply but that doesn't help me unfortunately.

I want to mod Hearthstone from Blizzard and everything works fine using the tools provided here...

Using the method described in your linked posts didn't work for me: All files have the same .resource as m_source e.g. m_source:CAB-abc123/CAB-abc123.resource.

 

I am not exactly sure but I think the m_offset describes the exact beginning of the specific file in the .resource as otherwise the good file couldn't be loaded.

 

I guess I need to add my file to the .resource file and use the good offset - is that doable? I know that someone already modified hearthstone sounds but this guy doesn't want to share how he did it :(

 

You can copy your data to the end of the existing .resource file with a hex editor (export it from the bundle, note the file size, paste the data at the end, import the modified file). If you only have one AudioClip in your custom Unity project, use the original .resource file size as the modified AudioClip offset and the size of the .resource file from your custom project as the modified size. If you have more than one AudioClip, you have to add the according offsets from your .assets file (and use the size from there).

Link to comment
Share on other sites

hi there, hmm how do i open the UABE program ? I have download the 1.9 version as instructed by herrpolh for his Navezgane extended mod. but I am looking through the file like wtf its a .dll .lib and .h ... there is no .exe to open ? or am i stupid ? thanks :)

 

-edit- all is good herrpolh linked me to what i was missing, my fault :)

Edited by KorruptkSwades (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I found a bug ? or am I missing something ?

https://7daystodie.com/forums/showthread.php?49611-adding-extra-terrain-textures-with-UABE&p=517158&viewfull=1#post517158

 

------------------------ UPDATE

I think i guessed - I lose mipmap when converting...

 

 

 

------------------------ UPDATE 2

 

Can i load a texture with mip-levels ?

then why in the TerrainTextures use the TGA format? Is it possible to contains MIP-levels ?

 

....i feel that the question is fundamentally wrong, but ...

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

Hi,

 

I would like to modify a Texture2D in a Unity android game, is that possible ?

 

There are a bunch of file in the Data folder after the .apk is decompile

 

8e60b31b1672f415c92f32507253f1b6

6980823e81d924f67b3de550bd03c8de

...

97237894bd606461d8257814becaa9a5.resource

...

sharedassets0.assets.split0

...

sharedassets0.assets.split23

sharedassets0.resource

...

 

I found my texture in a file like 8e60b31b1672f415c92f32507253f1b6 (which is only a reference to the real data I think)

 

I can modify the texture (importing a .tga file I modified) but after, when I save it I can only save it as a .assets file.

 

That's where I'm blocked. I don't know if I have to split it myself and replace the others file, or maybe modify the loading code ?

 

Do you have any clue ? Somebody already did that kind of mod ?

 

Thanks.

Link to comment
Share on other sites

There is a debug log inside the GetTextureData

[ATTACH=CONFIG]17111[/ATTACH]

 

The success message will be removed for the next release.

 

I found a bug ? or am I missing something ?

https://7daystodie.com/forums/showthread.php?49611-adding-extra-terrain-textures-with-UABE&p=517158&viewfull=1#post517158

 

------------------------ UPDATE

I think i guessed - I lose mipmap when converting...

 

 

 

------------------------ UPDATE 2

 

Can i load a texture with mip-levels ?

then why in the TerrainTextures use the TGA format? Is it possible to contains MIP-levels ?

 

....i feel that the question is fundamentally wrong, but ...

 

UABE doesn't load or create mip maps. As it seems like Unity doesn't do that at runtime, I'll look into adding such functionality to UABE.

 

Hi,

 

I would like to modify a Texture2D in a Unity android game, is that possible ?

 

There are a bunch of file in the Data folder after the .apk is decompile

<snip>

I found my texture in a file like 8e60b31b1672f415c92f32507253f1b6 (which is only a reference to the real data I think)

 

I can modify the texture (importing a .tga file I modified) but after, when I save it I can only save it as a .assets file.

 

That's where I'm blocked. I don't know if I have to split it myself and replace the others file, or maybe modify the loading code ?

 

Do you have any clue ? Somebody already did that kind of mod ?

 

Thanks.

 

The file you mention also is an assets file, it just doesn't have the .assets file name extension. When saving, it won't actually add .assets to the file name.

UABE can't directly replace an opened file, so you'd need to rename the files anyway (e.g. rename "8e60b31b1672f415c92f32507253f1b6" to "8e60b31b1672f415c92f32507253f1b6-old", open the renamed file in UABE and save as "8e60b31b1672f415c92f32507253f1b6").

Edited by DerPopo (see edit history)
Link to comment
Share on other sites

Hi,

Thanks a million for the mod maker feature DerPopo; this is gold.

I might just get back on that french translation I started 2 years ago eheh... Sadly A15's official translation was made with google translate for the most part, so I'm thinking about making a human version of it, and thanks to you sharing it will be easy. SPAZ 2's translation will also benefit from this.

(edit: it looks like the localization file is now outside the assets, so ABE won't be needed here)

 

Anyway I have one quick question, I've read here that there's a way to import audioclips into resource.assets, using Unity; since I'm probably not going to install Unity for so few, I was wondering if you plan to add an audioclips import feature to your plugin ? - if it is doable, that is.

(edit2: deleting audioclips seems to work - goodbye a_night_oneshot2.wav you won't be missed - I'd still prefer replacing them though, along with a few other)

 

Thanks again.

Edited by OverGamer (see edit history)
Link to comment
Share on other sites

Hi,

Thanks a million for the mod maker feature DerPopo; this is gold.

I might just get back on that french translation I started 2 years ago eheh... Sadly A15's official translation was made with google translate for the most part, so I'm thinking about making a human version of it, and thanks to you sharing it will be easy. SPAZ 2's translation will also benefit from this.

(edit: it looks like the localization file is now outside the assets, so ABE won't be needed here)

 

Anyway I have one quick question, I've read here that there's a way to import audioclips into resource.assets, using Unity; since I'm probably not going to install Unity for so few, I was wondering if you plan to add an audioclips import feature to your plugin ? - if it is doable, that is.

(edit2: deleting audioclips seems to work - goodbye a_night_oneshot2.wav you won't be missed - I'd still prefer replacing them though, along with a few other)

 

Thanks again.

 

That's the plan. The FMOD API seems to have the proper tools to create sound banks supported by Unity.

The only special case to handle is WebGL. Unity uses m4a there (if I remember correctly).

Link to comment
Share on other sites

Greetings DerPopo. :) First of all let me congratulate you for creating this amazingly powerful tool for whoever wants to fiddle around with these files! It definitely makes our life easier, and has already helped me greatly, even though I'm only taking the first steps into this.

 

I'm posting here to ask for some clarifications regarding the exportation method of some texture files found within a bundle I'm currently working on - I've already extracted .obj models from these bundles using the handy plugins included within the UABE, but I'm having trouble extracting SubstanceArchive (.sbsar files) into textures that can be openable in the respective program like Substance Player (or more mainstream programs such as GIMP, Photoshop or Paint.Net).

 

 

zWs4QIA.png

 

 

Is there a way to export these files into readily readable .sbsar files? I'd greatly appreciate if you pointed me out in the right direction, or at least indicate me a place in the forums where I can ask this and dig further into the question.

 

Cheers, and keep up the awesome work,

 

Mighty :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...