The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Good morning gents,
I'm looking at translating The Last Stand: Aftermath into Hungarian. I was able to get the English localization TextAsset file (en.asset) out of the .bundle file (resources_assets_all.bundle) using AssetStudio. With the exception of two other flavor text files this one has everything I need for translation.
I am however unable to put it back in. This is my first Unity translation, and it seems that the Unity version used for this game is too new for the tools I've found. UnityEX says support for Unity 2020 is only available in the Advanced or Ultimate version. The other tools can extract from and decompress the .bundle files but don't seem to be able to import. I've found some UnityEX forks on Github but compiling them has opened a whole different can of worms, with no success.
I just need to put three .asset files back into their respective .bundle files. Any ideas? I've tried just chucking the .asset file into a folder and hope the game would pick them up, not sure if Unity looks outside the .bundle files at all. The .bundle files are all under [Game folder]\TLSA_Data\StreamingAssets\aa\StandaloneWindows64
According to \aa\catalog.json this is the path within UnityFS: Assets/_Game/Data/Localization/Languages/en.asset
Thanks!
Good morning gents,
I'm looking at translating The Last Stand: Aftermath into Hungarian. I was able to get the English localization TextAsset file (en.asset) out of the .bundle file (resources_assets_all.bundle) using AssetStudio. With the exception of two other flavor text files this one has everything I need for translation.
I am however unable to put it back in. This is my first Unity translation, and it seems that the Unity version used for this game is too new for the tools I've found. UnityEX says support for Unity 2020 is only available in the Advanced or Ultimate version. The other tools can extract from and decompress the .bundle files but don't seem to be able to import. I've found some UnityEX forks on Github but compiling them has opened a whole different can of worms, with no success.
I just need to put three .asset files back into their respective .bundle files. Any ideas? I've tried just chucking the .asset file into a folder and hope the game would pick them up, not sure if Unity looks outside the .bundle files at all. The .bundle files are all under [Game folder]\TLSA_Data\StreamingAssets\aa\StandaloneWindows64
According to \aa\catalog.json this is the path within UnityFS: Assets/_Game/Data/Localization/Languages/en.asset
Thanks!
-
- Posts: 127
- Joined: Sat Aug 07, 2021 9:49 am
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Thanks! UABEA seems to have done the trick! Awesome!
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Apparently the fonts are missing the weird Hungarian "őŐűŰ" but that I can live with.
Thanks again man, you've been a huge help!
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
This is what I did (for the basic English text file, en.asset):
1. Get the latest UABEA (https://github.com/nesrak1/UABEA)
2. Copy resources_assets_all.bundle from [Steam Library]\steamapps\common\The Last Stand Aftermath\TLSA_Data\StreamingAssets\aa\StandaloneWindows64 to your translation project folder
3. Open UABEA (UABEAvalonia.exe)
4. File \ Open and browse to the .bundle file
5. Decompress to a file (this will be updated later, can keep)
6. Click on the Info button in UABEA
7. Locate the en TextAsset (View / Search by name, should be the second result)
8. Click on Export Dump
9. Save the txt file, do not change the name
10. Translate the text file (UTF-8 but the fonts in game do not support ő and ű)
When ready to import the translated file:
0. Repeat steps 3, 4 (open the uncompressed file), 6 and 7 from above
1. With the en TextAsset selected click on Import Dump
2. Use the translated file. An *asterisk will appear in the Modified column, next to the Size column
3. File / Close, save when prompted
4. File / Close in the UABEA main window, save when prompted
5. File / Open to reopen the unpacked file that you just saved (can't compress a modified file, needs to be reopened)
6. File / Compress and save the .bundle file
7. Create a backup of the .bundle file in the Steam folder, replace by the one saved in the previous step.
I've used this .Net runtime: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-5.0.12-windows-x64-installer
Also make sure that the file you are trying to import was edited with something like Notepad++, which keeps the original UTF-8 encoding. The basic Notepad in Windows does not.
Edit: Actually, now that I've had a second look, it seems like you are using a 2019 version of UABEA. The one from the Github link is from August 2021, and seems to be better for the version of Unity TLSA uses.
1. Get the latest UABEA (https://github.com/nesrak1/UABEA)
2. Copy resources_assets_all.bundle from [Steam Library]\steamapps\common\The Last Stand Aftermath\TLSA_Data\StreamingAssets\aa\StandaloneWindows64 to your translation project folder
3. Open UABEA (UABEAvalonia.exe)
4. File \ Open and browse to the .bundle file
5. Decompress to a file (this will be updated later, can keep)
6. Click on the Info button in UABEA
7. Locate the en TextAsset (View / Search by name, should be the second result)
8. Click on Export Dump
9. Save the txt file, do not change the name
10. Translate the text file (UTF-8 but the fonts in game do not support ő and ű)
When ready to import the translated file:
0. Repeat steps 3, 4 (open the uncompressed file), 6 and 7 from above
1. With the en TextAsset selected click on Import Dump
2. Use the translated file. An *asterisk will appear in the Modified column, next to the Size column
3. File / Close, save when prompted
4. File / Close in the UABEA main window, save when prompted
5. File / Open to reopen the unpacked file that you just saved (can't compress a modified file, needs to be reopened)
6. File / Compress and save the .bundle file
7. Create a backup of the .bundle file in the Steam folder, replace by the one saved in the previous step.
I've used this .Net runtime: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-5.0.12-windows-x64-installer
Also make sure that the file you are trying to import was edited with something like Notepad++, which keeps the original UTF-8 encoding. The basic Notepad in Windows does not.
Edit: Actually, now that I've had a second look, it seems like you are using a 2019 version of UABEA. The one from the Github link is from August 2021, and seems to be better for the version of Unity TLSA uses.
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
dunee wrote:This is what I did (for the basic English text fi...
Thank you for the detailed explanation.
Text Assets files can be extracted, but MonoBehaviour could not extract files. How did you process files MonoBehaviour?
TextAssets:
MonoBehaviour:
For example the following file:
TextAssets
The texts in this picture are from the attached file.
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Hmm, weird, I had no issues extracting the MonoBehaviour files either. I just dumped them all.
Start with dumping a single MonoBehaviour file. Make sure you keep the filename suggested by UABEA. The Prologue radio file for me was DlgPrologue_Radio-CAB-57c66e1d2a806e5ebd6bad14c2d80eec--2518346701056656127.txt
I selected all the MonoBehaviour files from dialoguetext_assets_dialoguetext_en.bundle and clicked on export dump. Selected an empty directory. I did not enter a filename, and UABEA just saved all of them as .txt files. I edited the Prologue file and was able to import the dump. Not sure what's going wrong on your end, though. It either has to do with not using the original filename (though that may have nothing to do with it either), or you've missed a quote, which does tend to mess things up.
Start with dumping a single MonoBehaviour file. Make sure you keep the filename suggested by UABEA. The Prologue radio file for me was DlgPrologue_Radio-CAB-57c66e1d2a806e5ebd6bad14c2d80eec--2518346701056656127.txt
I selected all the MonoBehaviour files from dialoguetext_assets_dialoguetext_en.bundle and clicked on export dump. Selected an empty directory. I did not enter a filename, and UABEA just saved all of them as .txt files. I edited the Prologue file and was able to import the dump. Not sure what's going wrong on your end, though. It either has to do with not using the original filename (though that may have nothing to do with it either), or you've missed a quote, which does tend to mess things up.
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
This is very frustrating. When I say Export and View Data, UABEAvalonia crashes and closes. Can you share your UABEAvalonia folder? I'm using the latest version at https://github.com/nesrak1/UABEA/releases but it doesn't work.
I took a video showing the problem
https://www.youtube.com/watch?v=SYKezITMy3w
I took a video showing the problem
https://www.youtube.com/watch?v=SYKezITMy3w
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Thank you for that video, very useful. You're doing everything I'm doing and you crash where I don't.
Especially frustrating since you don't even get an error message. Try creating a virtual machine with just a base Windows 10 install, and only install the .Net 5 runtime that I linked above. Maybe a clean environment would work, maybe it has to do with having Windows in English, or some other voodoo. I remember that when Microsoft Flight Simulator came out in 2020 it would crash if your username had accented letters in it.
I've extracted the MonoBehaviour files for you, see if you can at least import some of it back.
Especially frustrating since you don't even get an error message. Try creating a virtual machine with just a base Windows 10 install, and only install the .Net 5 runtime that I linked above. Maybe a clean environment would work, maybe it has to do with having Windows in English, or some other voodoo. I remember that when Microsoft Flight Simulator came out in 2020 it would crash if your username had accented letters in it.
I've extracted the MonoBehaviour files for you, see if you can at least import some of it back.
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Maybe it helps...
Windows Crash Log:
Application: UABEAvalonia.exe
CoreCLR Version: 5.0.1221.52207
.NET Version: 5.0.12
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OverflowException: Arithmetic operation resulted in an overflow.
at AssetsTools.NET.AssetTypeTemplateField.ReadType(AssetsFileReader reader, AssetTypeValueField valueField) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 124
at AssetsTools.NET.AssetTypeTemplateField.ReadType(AssetsFileReader reader, AssetTypeValueField valueField) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 209
at AssetsTools.NET.AssetTypeTemplateField.ReadType(AssetsFileReader reader, AssetTypeValueField valueField) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 209
at AssetsTools.NET.AssetTypeTemplateField.MakeValue(AssetsFileReader reader) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 95
at AssetsTools.NET.AssetTypeInstance..ctor(AssetTypeTemplateField[] baseFields, AssetsFileReader reader, Int64 filePos) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeInstance.cs:line 17
at AssetsTools.NET.AssetTypeInstance..ctor(AssetTypeTemplateField baseField, AssetsFileReader reader, Int64 filePos) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeInstance.cs:line 22
at UABEAvalonia.AssetWorkspace.GetAssetContainer(AssetsFileInstance fileInst, Int32 fileId, Int64 pathId, Boolean onlyInfo) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\AssetWorkspace.cs:line 161
at UABEAvalonia.AssetWorkspace.GetBaseField(AssetContainer cont) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\AssetWorkspace.cs:line 205
at UABEAvalonia.InfoWindow.BatchExportDump(List`1 selection) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\InfoWindow.axaml.cs:line 494
at UABEAvalonia.InfoWindow.BtnExportDump_Click(Object sender, RoutedEventArgs e) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\InfoWindow.axaml.cs:line 267
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0() in /_/src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs:line 33
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 210
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 157
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 107
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 134
at UABEAvalonia.Program.Main(String[] args) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\Program.cs:line 47
Windows Crash Log:
Application: UABEAvalonia.exe
CoreCLR Version: 5.0.1221.52207
.NET Version: 5.0.12
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OverflowException: Arithmetic operation resulted in an overflow.
at AssetsTools.NET.AssetTypeTemplateField.ReadType(AssetsFileReader reader, AssetTypeValueField valueField) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 124
at AssetsTools.NET.AssetTypeTemplateField.ReadType(AssetsFileReader reader, AssetTypeValueField valueField) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 209
at AssetsTools.NET.AssetTypeTemplateField.ReadType(AssetsFileReader reader, AssetTypeValueField valueField) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 209
at AssetsTools.NET.AssetTypeTemplateField.MakeValue(AssetsFileReader reader) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeTemplateField.cs:line 95
at AssetsTools.NET.AssetTypeInstance..ctor(AssetTypeTemplateField[] baseFields, AssetsFileReader reader, Int64 filePos) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeInstance.cs:line 17
at AssetsTools.NET.AssetTypeInstance..ctor(AssetTypeTemplateField baseField, AssetsFileReader reader, Int64 filePos) in C:\Users\nesquack\Documents\GitReposLocal\AssetsTools.NET\AssetTools.NET\Standard\AssetTypeClass\AssetTypeInstance.cs:line 22
at UABEAvalonia.AssetWorkspace.GetAssetContainer(AssetsFileInstance fileInst, Int32 fileId, Int64 pathId, Boolean onlyInfo) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\AssetWorkspace.cs:line 161
at UABEAvalonia.AssetWorkspace.GetBaseField(AssetContainer cont) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\AssetWorkspace.cs:line 205
at UABEAvalonia.InfoWindow.BatchExportDump(List`1 selection) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\InfoWindow.axaml.cs:line 494
at UABEAvalonia.InfoWindow.BtnExportDump_Click(Object sender, RoutedEventArgs e) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\InfoWindow.axaml.cs:line 267
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass5_0.<Post>b__0() in /_/src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs:line 33
at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 210
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 157
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 107
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 134
at UABEAvalonia.Program.Main(String[] args) in C:\Users\nesquack\Documents\GitRepos\uabequickfixes\UABEA\UABEAvalonia\Program.cs:line 47
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Hmm weird.
I see you also opened an issue on Github, hopefully the creator will respond.
You may also want to try the latest build, which is from November 20, instead of Release 3 from August: https://nightly.link/nesrak1/UABEA/workflows/dotnet-desktop/master/uabea-windows.zip
I see you also opened an issue on Github, hopefully the creator will respond.
You may also want to try the latest build, which is from November 20, instead of Release 3 from August: https://nightly.link/nesrak1/UABEA/workflows/dotnet-desktop/master/uabea-windows.zip
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
dunee wrote:Thank you for that video, very useful. You're doing everything I'm doing and you crash where I don't.
Especially frustrating since you don't even get an error message. Try creating a virtual machine with just a base Windows 10 install, and only install the .Net 5 runtime that I linked above. Maybe a clean environment would work, maybe it has to do with having Windows in English, or some other voodoo. I remember that when Microsoft Flight Simulator came out in 2020 it would crash if your username had accented letters in it.
I've extracted the MonoBehaviour files for you, see if you can at least import some of it back. dialoguetext.zip books.zip
Thanks for sharing, the files you posted work fine. Can you share the UABEAvalonia folder you used? Also, what .net version are you using?
I tried virtual Win10 and Win7, same problem. Maybe I should try win10 in english as you said. Now I'm installing eng win10 on virtual pc...
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
dunee wrote:Hmm weird.
I see you also opened an issue on Github, hopefully the creator will respond.
You may also want to try the latest build, which is from November 20, instead of Release 3 from August: https://nightly.link/nesrak1/UABEA/workflows/dotnet-desktop/master/uabea-windows.zip
Yes. I hope he answers.
Unfortunately, this version still has the same problem.
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Syfity wrote:Thanks for sharing, the files you posted work fine. Can you share the UABEAvalonia folder you used? Also, what .net version are you using?
I'm using the ones I've linked earlier - Release 3 from Github and .Net 5.0.12. See if also installing https://aka.ms/vs/16/release/vc_redist.x64.exe helps.
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
-
- Posts: 19
- Joined: Wed Dec 08, 2021 8:05 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
It's definitely caused by the windows usage language, I tested it, it doesn't work when I translate windows into my own language, it works when I switch it back to english.
-
- Posts: 9
- Joined: Tue Dec 14, 2021 4:29 pm
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Syfity wrote::idea: It's definitely caused by the windows usage language, I tested it, it doesn't work when I translate windows into my own language, it works when I switch it back to english.
Glad to hear you got it sorted, and thank you for your patience with the troubleshooting. Hopefully this will also benefit others using this tool and crashing on non-English versions of Windows.
-
- Posts: 5
- Joined: Thu Jan 20, 2022 6:13 am
Re: The Last Stand: Aftermath (Unity 2020): re-add .asset to .bundle?
Hey guys i m having some problems with the UEBA when i try to import all changes it just crashes, could u guys look that files to me?
theres a .manifest together.
im able to open and extract text with UABEAvalonia :
Problem is, when i try to import the cab with changes, UABEA crashes
theres a .manifest together.
im able to open and extract text with UABEAvalonia :
Problem is, when i try to import the cab with changes, UABEA crashes