-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
~~The Obligatory August 31 update~~ Make all scripts invokable from the command line Remove deprecated scripts Update README
- Loading branch information
Showing
9 changed files
with
57 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
__VERSION_MAJOR__ = 0 | ||
__VERSION_MINOR__ = 2 | ||
__VERSION_PATCH__ = 9 | ||
__VERSION_MINOR__ = 3 | ||
__VERSION_PATCH__ = 0 | ||
|
||
__version__ = '%s.%s.%s' % (__VERSION_MAJOR__,__VERSION_MINOR__,__VERSION_PATCH__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from io import BytesIO | ||
from sssekai.unity.AssetBundle import load_assetbundle | ||
from sssekai.fmt.moc3 import read_moc3 | ||
import sys, os | ||
from UnityPy.enums import ClassIDType | ||
|
||
def main_moc3paths(args): | ||
ParameterNames = set() | ||
PartNames = set() | ||
tree = os.walk(args.indir) | ||
for root, dirs, files in tree: | ||
for fname in files: | ||
file = os.path.join(root,fname) | ||
with open(file,'rb') as f: | ||
env = load_assetbundle(f) | ||
for obj in env.objects: | ||
if obj.type == ClassIDType.TextAsset: | ||
data = obj.read() | ||
out_name : str = data.name | ||
if out_name.endswith('.moc3'): | ||
parts, parameters = read_moc3(BytesIO(data.script.tobytes())) | ||
ParameterNames.update(parameters) | ||
PartNames.update(parts) | ||
from zlib import crc32 | ||
print('NAMES_CRC_TBL = {') | ||
for name in sorted(list(PartNames)): | ||
fullpath = 'Parts/' + name | ||
print(' %d:"%s",' % (crc32(fullpath.encode('utf-8')), fullpath)) | ||
for name in sorted(list(ParameterNames)): | ||
fullpath = 'Parameters/' + name | ||
print(' %d:"%s",' % (crc32(fullpath.encode('utf-8')), fullpath)) | ||
print('}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.