Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
laijingquan committed Jan 15, 2018
0 parents commit f11035a
Show file tree
Hide file tree
Showing 32 changed files with 1,435 additions and 0 deletions.
Binary file added AssetBundleExtractor.exe
Binary file not shown.
Binary file added AssetsTools.dll
Binary file not shown.
22 changes: 22 additions & 0 deletions LodePNG_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
LodePNG version 20150418

Copyright (c) 2005-2015 Lode Vandevenne

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.
Binary file added ModInstaller.dll
Binary file not shown.
Binary file added PVRTexLib.dll
Binary file not shown.
Binary file added Plugins/AudioClip.bep
Binary file not shown.
Binary file added Plugins/Mesh.bep
Binary file not shown.
Binary file added Plugins/MovieTexture.bep
Binary file not shown.
Binary file added Plugins/SubstanceArchive.bep
Binary file not shown.
Binary file added Plugins/TerrainData.bep
Binary file not shown.
Binary file added Plugins/TextAsset.bep
Binary file not shown.
Binary file added Plugins/Texture.bep
Binary file not shown.
8 changes: 8 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
By using this software, you agree to be bound by the terms and conditions of the license you can find in license.txt (CC BY-NC-SA 3.0).

AssetsBundleExtractor uses the open-source libraries LodePNG (see LodePNG_license.txt, https://github.com/lvandeve/lodepng), libsquish (see libsquish_license.txt), stb_image (public domain, https://github.com/nothings/stb), crunch (see crunch_license.txt, https://github.com/richgel999/crunch), LZMA SDK (public domain, http://7-zip.org/sdk.html), lz4 (see lz4_license.txt, https://github.com/Cyan4973/lz4), astc-encoder (see astcenc_license.txt, https://github.com/ARM-software/astc-encoder), half (see half_license.txt, http://half.sourceforge.net/), Fast ISPC Texture Compressor (see ispc_texcomp_license.txt, https://github.com/GameTechDev/ISPCTextureCompressor) and texgenpack (see texgenpack_license.txt, https://github.com/hglm/texgenpack) with its dependencies libfgen (see libfgen_license.txt and libfgen_lgpl.txt, https://github.com/hglm/libfgen) and pthreads-win32 (see pthreads_license.txt and pthreads_lgpl.txt, https://sourceforge.net/projects/pthreads4w/).
Uses FMOD Sound System, copyright � Firelight Technologies Pty, Ltd., 1994-2015.
This product includes components of the PowerVR Tools Software from Imagination Technologies Limited.

Unity is a registered trademark of Unity Technologies. The creator of this tool is in no way affiliated with Unity Technologies.
Binary file added TexToolWrap.dll
Binary file not shown.
73 changes: 73 additions & 0 deletions Usage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
AssetsBundleExtractor v2.1


Bundle files :
Single file :
1) Start AssetsBundleExtractor, press File->Open and select the bundle file (Unity 4 and 5 are supported, 3 is not tested).
2) To extract a .assets file, select the file and press Export.
3) To import a .assets file, select the target file and press Import and then File->Save.

Batch of files :
1) Create a batch file. It is an UTF-8 encoded text file of which each line specifies a file or directory to add or remove from the bundle file list.
Each line starts with + or -. Plus means that the directory or file should get added to the list, minus means that it should get removed.
To specify if it is a file or directory, it is followed by FILE or DIR. The file or directory path comes after a space character.
Each line can have a maximum of 510 bytes. If it is longer than that, the rest is cut off.
An example file could look like this :
+DIR C:\Program Files (x86)\Steam\steamapps\common\7 Days to Die\Data\Bundles
-FILE C:\Program Files (x86)\Steam\steamapps\common\7 Days to Die\Data\Bundles\TerrainTextures
First, all files in the Bundles folder are added to the list. After that, the TerrainTextures file gets removed.
The resulting list of files is then used to perform the batch export or import.

2) Launch AssetsBundleExtractor with a command line like this :
AssetsBundleExtractor -removetypetree batchexport <batch file path>

-removetypetree removes the TypeTree of the exported .assets file so it can be used with Grim's UAE Beta 3. If you don't want to do this, remove it from the parameters.
This exports all .assets files in the bundle files. If the bundle file path is "<directory>\<file name>.<extension>" or "<directory>\<file name>", the output file path is "<directory>\<file name>_<assets name in the bundle>.assets". As an example, the bundle file path could be "C:\folder\Bundle.unity3d" and the bundle file could contain a file named "CAB-1234". The output file would be "C:\folder\Bundle_CAB-1234.assets".

AssetsBundleExtractor batchimport <batch file path>
This imports all .assets files in the same path as they were previously exported into the asset bundles. If the bundle file path is "C:\folder\Bundle.unity3d" and it contains a file named "CAB-1234", the tool will look for "C:\folder\Bundle_CAB-1234.assets" and import it into the bundle file if it exists.

Assets files :

To view the assets in a .assets file or a bundle, start AssetsBundleExtractor, press File->Open and select the bundle or .assets file/s (Unity 3.4+, 4 and 5 are supported). If you opened an assets bundle, press the Info button to view a list of assets in the bundle. Otherwise, open mainData if possible.
Opening the asset list might take some time but it usually doesn't freeze for a long time.
Note that big endian files can only be read, not written, as indicated in the message when opening. While it doesn't stop you from writing, the file will be unreadable by both Unity and UABE.
Each asset has a file and a path id. The file id is the index of the assets file in the dependency tree. The path id is the id of the asset in the assets file. Because the file id in an asset is relative to its own assets file's dependencies (0 is the assets file the asset is inside, the following are indices in the dependency list), there is no reliable way to determine which assets file actually is referenced, except with the View Data functionality.
You can build a tree view of the asset using the View Data button or export a dump of the type tree (which is faster to create). You can get the raw data using the Export Raw button.
To modify an asset, you can either import a modified asset dump or modified raw data. Modified assets files can be saved directly. To modify asset bundles, you have to export the assets file first.
The plugins menu gives you access to the different plugin options for the selected asset's file type.

Mod installer :
Installers and installer packages can be generated from changes in bundles and .assets files.
Do your modifications as usual and you can create a .exe installer or a package file, for .assets in the list window's File menu and for bundles in the main window. Enter the fields on the left side and select a base folder, which the user will select inside the installer so it can find and modify the files.
Single changes can be removed and changes from other installer packages can be imported, so you could for instance create an installer for bundles and .assets, even though only one bundle can be opened at a time.
The state of an installer package can also be loaded into UABE in the Load Package File menu option, where either one bundle file or any amount of .assets files can be selected along with the base path.

Asset type database editor :

The asset type databases are used for the tree view or dumps of assets outside of bundle files. "classdata_0E.dat" is for Unity 5.0.Xf-releases and is mostly compatible to newer versions. "classdata_09.dat" should be compatible with most Unity 4.5+ releases.

Each type has fields that can contain other fields or have a value. To add a field after the selection, press Add and leave the "Insert as child" checkbox unchecked. To add a field as the first child of the selection, check the checkbox.

Valid value types are :
SInt8/char (size : 1)
UInt8 (size : 1)
SInt16/short (size : 2)
UInt16/unsigned short (size : 2)
SInt32/int/Type* (size : 4)
UInt32/unsigned int (size : 4)
SInt64/long (size : 8)
UInt64/unsigned long (size : 8)
float (size : 4)
double (size : 8)
bool (size : 1)

Each array field must have two child fields : int size and a data field of any type.
A string contains an array that has char as its data type. The array always is aligned.
"vector" is a type that contains an array.
All fields that are or contain an array have -1 as their size, which means that they have a variable length.

Alignment means that additional bytes are read after a field to ensure the following field's position inside the file is divisible by 4 for performance reasons.
It is usually used if there are one or multiple 1-byte fields before a 4-byte field (except if the length of all smaller fields is divisible by 4). The same applies to 2-byte fields.

PPtr<Type> fields (where Type can be any Object type) have a m_FileID (always int) and a m_PathID (int for Unity 4, SInt64 for Unity 5). They point to another asset (usually a Component type).
Binary file added astcenc.exe
Binary file not shown.
137 changes: 137 additions & 0 deletions astcenc_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
END USER LICENCE AGREEMENT FOR THE MALI ASTC SPECIFICATION AND SOFTWARE CODEC,
VERSION: 1.3

THIS END USER LICENCE AGREEMENT ("LICENCE") IS A LEGAL AGREEMENT BETWEEN YOU
(EITHER A SINGLE INDIVIDUAL, OR SINGLE LEGAL ENTITY) AND ARM LIMITED ("ARM")
FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS LICENCE. ARM IS ONLY WILLING
TO LICENSE THE SOFTWARE TO YOU ON CONDITION THAT YOU ACCEPT ALL OF THE TERMS
IN THIS LICENCE. BY CLICKING "I AGREE" OR BY INSTALLING OR OTHERWISE USING
OR COPYING THE SOFTWARE YOU INDICATE THAT YOU AGREE TO BE BOUND BY ALL THE
TERMS OF THIS LICENCE.

IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENCE, ARM IS UNWILLING TO LICENSE
THE SOFTWARE TO YOU AND YOU MAY NOT INSTALL, USE OR COPY THE SOFTWARE.

1. DEFINITIONS.

"Authorised Purpose" means the use of the Software solely to develop products
and tools which implement the Khronos ASTC specification to;
(i) compress texture images into ASTC format ("Compression Results");
(ii) distribute such Compression Results to third parties; and
(iii) decompress texture images stored in ASTC format.

"Software" means the source code and Software binaries accompanying this
Licence, and any printed, electronic or online documentation supplied with it,
in all cases relating to the MALI ASTC SPECIFICATION AND SOFTWARE CODEC.

2. LICENCE GRANT.

ARM hereby grants to you, subject to the terms and conditions of this Licence,
a nonexclusive, nontransferable, free of charge, royalty free, worldwide
licence to use, copy, modify and (subject to Clause 3 below) distribute the
Software solely for the Authorised Purpose.

No right is granted to use the Software to develop hardware.

Notwithstanding the foregoing, nothing in this Licence prevents you from
using the Software to develop products that conform to an application
programming interface specification issued by The Khronos Group Inc.
("Khronos"), provided that you have licences to develop such products
under the relevant Khronos agreements.

3. RESTRICTIONS ON USE OF THE SOFTWARE.

RESTRICTIONS ON TRANSFER OF LICENSED RIGHTS: The rights granted to you under
this Licence may not be assigned by you to any third party without the prior
written consent of ARM.

TITLE AND RESERVATION OF RIGHTS: You acquire no rights to the Software other
than as expressly provided by this Licence. The Software is licensed not sold.
ARM does not transfer title to the Software to you. In no event shall the
licences granted in Clause 2 be construed as granting you expressly or by
implication, estoppel or otherwise, licences to any ARM technology other than
the Software.

NOTICES: You shall not remove from the Software any copyright notice or other
notice (whether ARM's or its licensor's), and you shall ensure that any such
notice is reproduced in any copies of the whole or any part of the Software
made by you. You shall not use ARM's or its licensor's name, logo or
trademarks to market Compression Results. If you distribute the Software to a
third party, you agree to include a copy of this Licence with such
distribution.

4. NO SUPPORT.

ARM has no obligation to support or to continue providing or updating any of
the Software.

5. NO WARRANTIES.

YOU AGREE THAT THE SOFTWARE IS LICENSED "AS IS", AND THAT ARM EXPRESSLY
DISCLAIMS ALL REPRESENTATIONS, WARRANTIES, CONDITIONS OR OTHER TERMS, EXPRESS,
IMPLIED OR STATUTORY, TO THE FULLEST EXTENT PERMITTED BY LAW. YOU EXPRESSLY
ASSUME ALL LIABILITIES AND RISKS, FOR USE OR OPERATION OF ANY APPLICATION
PROGRAMS YOU CREATE WITH THE SOFTWARE, AND YOU ASSUME THE ENTIRE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION.

6. LIMITATION OF LIABILITY.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL ARM BE
LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
(INCLUDING LOSS OF PROFITS) ARISING OUT OF THE USE OR INABILITY TO USE THE
SOFTWARE WHETHER BASED ON A CLAIM UNDER CONTRACT, TORT OR OTHER LEGAL THEORY,
EVEN IF ARM WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

ARM does not seek to limit or exclude liability for death or personal injury
arising from ARM's negligence and because some jurisdictions do not permit the
exclusion or limitation of liability for consequential or incidental damages
the above limitation relating to liability for consequential damages may not
apply to you.

NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED IN THIS LICENCE, THE
MAXIMUM LIABILITY OF ARM TO YOU IN AGGREGATE FOR ALL CLAIMS MADE AGAINST ARM
IN CONTRACT TORT OR OTHERWISE UNDER OR IN CONNECTION WITH THE SUBJECT MATTER
OF THIS LICENCE SHALL NOT EXCEED THE GREATER OF THE TOTAL OF SUMS PAID BY YOU
TO ARM (IF ANY) FOR THIS LICENCE AND US$5.00.

7. U.S. GOVERNMENT END USERS.

US Government Restrictions: Use, duplication, reproduction, release,
modification, disclosure or transfer of this commercial product and
accompanying documentation is restricted in accordance with the terms
of this Licence.

8. TERM AND TERMINATION.

This Licence shall remain in force until terminated by you or by ARM. Without
prejudice to any of its other rights if you are in breach of any of the terms
and conditions of this Licence then ARM may terminate this Licence immediately
upon giving written notice to you. You may terminate this Licence at any time.

Upon termination of this Licence by you or by ARM you shall stop using the
Software and destroy all copies of the Software in your possession together
with all documentation and related materials. The provisions of Clauses 1, 3,
4, 5, 6, 7, 8 and 9 shall survive termination of this Licence.

9. GENERAL.

This Licence is governed by English Law. Except where ARM agrees otherwise in
a written contract signed by you and ARM, this is the only agreement between
you and ARM relating to the Software and it may only be modified by written
agreement between you and ARM. Except as expressly agreed in writing, this
Licence may not be modified by purchase orders, advertising or other
representation by any person. If any clause in this Licence is held by a court
of law to be illegal or unenforceable the remaining provisions of this Licence
shall not be affected thereby. The failure by ARM to enforce any of the
provisions of this Licence, unless waived in writing, shall not constitute a
waiver of ARM's rights to enforce such provision or any other provision of
this Licence in the future.

You agree to comply fully with all laws and regulations of the United States
and other countries ("Export Laws") to assure that the Software is not;
(1) exported, directly or indirectly, in violation of Export Laws, either to
any countries that are subject to U.S.A. export restrictions or to any end
user who has been prohibited from participating in the U.S.A. export
transactions by any federal agency of the U.S.A. government; or
(2) intended to be used for any purpose prohibited by Export Laws, including,
without limitation, nuclear, chemical, or biological weapons proliferation.
Binary file added classdata.tpk
Binary file not shown.
22 changes: 22 additions & 0 deletions crunch_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
crunch/crnlib uses the ZLIB license:
http://opensource.org/licenses/Zlib

Copyright (c) 2010-2012 Rich Geldreich and Tenacious Software LLC

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.
Binary file added fmod64.dll
Binary file not shown.
15 changes: 15 additions & 0 deletions half_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
half - IEEE 754-based half-precision floating point library.

Copyright (c) 2012-2013 Christian Rau <rauy@users.sourceforge.net>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file added ispc_texcomp.dll
Binary file not shown.
Loading

0 comments on commit f11035a

Please sign in to comment.