Mass Effect Andromeda

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

I updated the plugin interface you so you have access to the data via sha1 and can also set data this way.
this also means, that snapshots change their format again and have to be redone
Image

the interface definition now contains all these informations for use in your code

Code: Select all

    public class ChunkInfo
    {
        public string id;
        public string toc;
        public string bundle;
        public byte[] sha1;
        public ChunkInfo(string _id, string _toc, string _bundle, byte[] _sha1)
        {
            id = _id;
            toc = _toc;
            bundle = _bundle;
            sha1 = _sha1;
        }
    }

    public class DataInfo
    {
        public int type; //0=ebx
        public string path;
        public string toc;
        public string bundle;
        public byte[] sha1;
        public byte[] idata;
        public DataInfo(int _type, string _path, string _toc, string _bundle, byte[] _sha1, byte[] _idata)
        {
            type = _type;
            path = _path;
            toc = _toc;
            bundle = _bundle;
            sha1 = _sha1;
            idata = _idata;
        }
    }

    public interface IPlugin
    {
        IPluginHost Host { get; set; }
        string Name { get; }
        void Do();
    }

    public interface IPluginHost
    {
        List<string> getTOCFiles();
        List<string> getTOCFileLabels();
        List<string> getBundleNames(string toc);
        List<DataInfo> getAllEBX(string toc, string bundle);
        List<DataInfo> getAllRES(string toc, string bundle);
        List<ChunkInfo> getAllTocCHUNKs(string toc);
        List<ChunkInfo> getAllBundleCHUNKs(string toc, string bundle);
        byte[] getDataBySha1(byte[] sha1);
        int setDataBySha1(byte[] data, byte[] sha1, string toc);
    }


I also attached the source code of the two example plugins

greetz WV
griggs111
Posts: 9
Joined: Wed Apr 12, 2017 8:06 pm

Re: Mass Effect Andromeda

Post by griggs111 »

warrantyvoider wrote:
griggs111 wrote:Thanks for the reply... my game files were corrupted somehow! :\
But I've got another weird problem.

If I change this:
- 00017C40 ZUM STARTEN {MenuAccept} DRÜCKEN
to this: (hungarian)
- 00017C40 NYOMD MEG A {MenuAccept} GOMBOT
After saving it, clicking away in the left side list and then clicking back, I got a bunch of "Unknown chunk type 0x????" error messages.

I have to force shut down the program and repair the whole game. :(


no idea what you do. have you verified you use unicode? have you tried to import the list unchanged back? which toc/bundle/res did you used exactly? why dont you have backups for the things you change, there is sha1 locator and the status bar... see, I dont want to annoy you, but you have to help me recreate whatever happens at your side on my side, in order to fix it on my side. I cant debug your pc and even the best logs can miss something trivial


You're not annoying me. I'm glad to help you recreate this problem.
I've uploaded a video, so I can show you the whole process.
https://www.youtube.com/watch?v=8h0HA-I9KjI
And another video showing what happens with the game.
https://youtu.be/yrhgMPTYMYY

Thank you for trying to help me in this!
I'm sure that the problem is on my side.
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

after some tries: english tt doesnt accept unicode and any import will fail. talktables are all fine, as you can still read them with my tool! german tt accepts unicode obviously, but I wasnt able to simply import the exported english table, I guess that has to do with markernames. BUT, you can edit stuff line wise for now, you can use the exported english table as lookup (you can match stuff by the ids at the start)

greetz WV
michalss
Posts: 320
Joined: Sun Aug 10, 2014 12:49 pm

Re: Mass Effect Andromeda

Post by michalss »

just 1 notice, id of the string is not hex but decimal, coz from that number you can also determinate the sex for example. Example of correct id : 0-1572=[BUG] Ammo acquired
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

Code: Select all

const char *__cdecl fb::toString(fb::LanguageFormat v)
{
  const char *result; // eax@2

  switch ( v )
  {
    case 0:
      result = "LanguageFormat_English";
      break;
    case 1:
      result = "LanguageFormat_French";
      break;
    case 2:
      result = "LanguageFormat_German";
      break;
    case 3:
      result = "LanguageFormat_Spanish";
      break;
    case 4:
      result = "LanguageFormat_Italian";
      break;
    case 5:
      result = "LanguageFormat_Japanese";
      break;
    case 6:
      result = "LanguageFormat_Russian";
      break;
    case 7:
      result = "LanguageFormat_Polish";
      break;
    case 8:
      result = "LanguageFormat_Dutch";
      break;
    case 9:
      result = "LanguageFormat_Portuguese";
      break;
    case 10:
      result = "LanguageFormat_TraditionalChinese";
      break;
    case 11:
      result = "LanguageFormat_Korean";
      break;
    case 12:
      result = "LanguageFormat_Czech";
      break;
    case 13:
      result = "LanguageFormat_Count";
      break;
    case 14:
      result = "LanguageFormat_Undefined";
      break;
    default:
      result = "InvalidEnumValue";
      break;
  }
  return result;
}


from bf3 pdb leak...

Code: Select all

__int64 __fastcall fb::toString(int a1)
{
  __int64 result; // rax@2

  switch ( a1 )
  {
    case 0:
      result = (__int64)"LanguageFormat_English";
      break;
    case 1:
      result = (__int64)"LanguageFormat_French";
      break;
    case 2:
      result = (__int64)"LanguageFormat_German";
      break;
    case 3:
      result = (__int64)"LanguageFormat_Spanish";
      break;
    case 4:
      result = (__int64)"LanguageFormat_SpanishUSA";
      break;
    case 5:
      result = (__int64)"LanguageFormat_SpanishMex";
      break;
    case 6:
      result = (__int64)"LanguageFormat_Italian";
      break;
    case 7:
      result = (__int64)"LanguageFormat_Japanese";
      break;
    case 8:
      result = (__int64)"LanguageFormat_Russian";
      break;
    case 9:
      result = (__int64)"LanguageFormat_Polish";
      break;
    case 10:
      result = (__int64)"LanguageFormat_Dutch";
      break;
    case 11:
      result = (__int64)"LanguageFormat_Portuguese";
      break;
    case 12:
      result = (__int64)"LanguageFormat_TraditionalChinese";
      break;
    case 13:
      result = (__int64)"LanguageFormat_Korean";
      break;
    case 14:
      result = (__int64)"LanguageFormat_Czech";
      break;
    case 15:
      result = (__int64)"LanguageFormat_BrazilianPortuguese";
      break;
    case 16:
      result = (__int64)"LanguageFormat_ArabicSA";
      break;
    case 17:
      result = (__int64)"LanguageFormat_Count";
      break;
    case 18:
      result = (__int64)"LanguageFormat_Undefined";
      break;
    default:
      result = (__int64)"InvalidEnumValue";
      break;
  }
  return result;
}


from mea
Trip
Posts: 7
Joined: Thu Apr 06, 2017 12:50 pm

Re: Mass Effect Andromeda

Post by Trip »

Hey all, great work WV! Been watching this progress :) I would like to extract English dialogue and subtitles, would this be possible with your explorer currently? I have done some searches with your tool and can't seem to find speech at all. Can anyone suggest where I should be looking?
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

some new infos about talktables (UITextDatabase):

this is the german one...
Image


and this the english one...
Image

red: for all other languages its 4, but for english its 5, dunno why
orange: this is the language index from my previous post
green:in german TT its zero, in english its not, which means there has to be a 5th count/offset pair read
purple:additional header info about some list, which I dunno what it does
blue:end of header

-I was not able to load chinese characters into unicode, although it should support it.
-Also I was not able to simply load the english text into the german table, and load that as either german or english
-so there is no way sofar to recompile the english TT and all others have to keep marker names I guess, but can be used for basic unicode translation
-dunno im out of ideas, and I guess thats the best it can get, sorry

here my code for TT, as you can see, its not very complete, but if anyone wants to write an external tt editor...

greetz
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

Trip wrote:Hey all, great work WV! Been watching this progress :) I would like to extract English dialogue and subtitles, would this be possible with your explorer currently? I have done some searches with your tool and can't seem to find speech at all. Can anyone suggest where I should be looking?


open some /loctext/ .toc file, choose a bundle and load the talktable ressources into vfs, there you can right click them and open in talktable editor (well more import/export, but anyway)
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

added EXPERIMENTAL ebx support/preview, ebx are pretty complicated so dunno when I will have time to fix problems with or even allow editing/saving back
Image

btw, as I dont know everything aswell; whoever has useful frostbite ressources, always keep posting links, I cant have enough sources :D this is just my EBXStream class from DAIToolsWV, so I have no idea if this has bugs, but as far as ive looked, it doesnt crash. anyway, if there are more infos about ebx out there, let me know (dont worry if its already known, having it for reference is good too)

greetz WV

PS:also fixed a bug in texture preview
y3804
Posts: 17
Joined: Sat Apr 15, 2017 6:02 pm

Re: Mass Effect Andromeda

Post by y3804 »

edited
Last edited by y3804 on Mon Apr 17, 2017 9:34 pm, edited 2 times in total.
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

y3804
Posts: 17
Joined: Sat Apr 15, 2017 6:02 pm

Re: Mass Effect Andromeda

Post by y3804 »

To add on WV's EBX previewer, here's the full EBX previewer from DAI ModMaker, which has near-flawless reading support and YAML (less eye-strain) and correct offsets. Also has support for internal GUID references.
I used ILDASM to hijack it into a standalone tool. Full credits to DAI ModMaker coders: WV, Ehamloptiran and Dawnless Sky, and more.

Image

How to use:
-----------
1. Open EBXTool.exe
2. Debug -> Import EBX Binary -> Select .bin/.ebx (exported from WV's tool)

You can also uses CTRL+F if you need to find text within that ebx

I will use this for a later tutorial today.

P.S. Edit/save ebx button doesn't work, but it never did even in ModMaker.
Trip
Posts: 7
Joined: Thu Apr 06, 2017 12:50 pm

Re: Mass Effect Andromeda

Post by Trip »

warrantyvoider wrote:
Trip wrote:Hey all, great work WV! Been watching this progress :) I would like to extract English dialogue and subtitles, would this be possible with your explorer currently? I have done some searches with your tool and can't seem to find speech at all. Can anyone suggest where I should be looking?


open some /loctext/ .toc file, choose a bundle and load the talktable ressources into vfs, there you can right click them and open in talktable editor (well more import/export, but anyway)


Thanks WV will look
y3804
Posts: 17
Joined: Sat Apr 15, 2017 6:02 pm

Re: Mass Effect Andromeda

Post by y3804 »

Tutorial: Modding weapon stats - HEX editing EBX files - using the EBX previewer tool

https://www.youtube.com/watch?v=b5snvc1dE8Y

Please look if you need guidance on how to mod EBX files yourself!

Edit: Added 2 more tutorials, one for modding Jump (jetpack) Height, the second one is for modding Sprint/Running speed

https://www.youtube.com/watch?v=Sg6cikcQ40w
https://www.youtube.com/watch?v=DF-ZS6CSY-A

all in all pretty basic editing stuff, but enough to do a lot of things
VladlenCry
Posts: 9
Joined: Tue Apr 18, 2017 2:31 am

Re: Mass Effect Andromeda

Post by VladlenCry »

warrantyvoider, thanks for creating such an amazing tool. Excuse me that I'm asking maybe a stupid question. But how and to take the chunks? I'm glad that can find out the Chunk's ID, but here's how to get it, I don't know.
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

VladlenCry wrote:warrantyvoider, thanks for creating such an amazing tool. Excuse me that I'm asking maybe a stupid question. But how and to take the chunks? I'm glad that can find out the Chunk's ID, but here's how to get it, I don't know.

I dont understand your question. for example textures have a chunk id in their res objects data, then the bundle usually has a chunklist, in which this id is connected with a sha1 which contains the chunks data
VladlenCry
Posts: 9
Joined: Tue Apr 18, 2017 2:31 am

Re: Mass Effect Andromeda

Post by VladlenCry »

warrantyvoider wrote:I dont understand your question. for example textures have a chunk id in their res objects data, then the bundle usually has a chunklist, in which this id is connected with a sha1 which contains the chunks data

I want to extract music. With the help of your program, can find and receive EBX files, but I do not understand how to get the chunk itself.
To get audio, need an EBX file (with your program you can get), where only information about the chunk, and chunk in which it is audio is available. In EBX there is an ID chunk, but how to get it I do not understand. Sha1 search does not give results, chunks do not find, only refers to the ebx files themselves.
Mordek
Posts: 1
Joined: Tue Apr 18, 2017 2:36 pm

Re: Mass Effect Andromeda

Post by Mordek »

y3804 and warrantyvoider thank you for your hard work. I've been playing around with your tools since the beginning trying to understand how they work. I've got a few questions to y3804 - how did you know that weapon with 525 ROF had index 0? Also where can I change weapon damage or magazine capacity?

Thank you again :] I can't express how awesome job you do here.
warrantyvoider
Posts: 236
Joined: Tue Apr 04, 2017 11:44 am

Re: Mass Effect Andromeda

Post by warrantyvoider »

lololol! I made myself a little tool to understand the patching system, it seems pretty easy sofar. my first patched data is the german tt, so I extracted both, the original and the patched version of it and threw it into notepad++ to compare them, nice to be able to analyze what changes were done! 8-)
Image
Image

this was easy, as its the 3 easiest cases of patching, 2 more and getting ready patched data by sha1 could be possible :D

download compare data, bin and txt

greetz WV
griggs111
Posts: 9
Joined: Wed Apr 12, 2017 8:06 pm

Re: Mass Effect Andromeda

Post by griggs111 »

First of all... congrats for what you achieved with the patch system!

I maybe found the source of the problems about the talktables. (Of course there's no problem with the editor.)
Everything is perfect if I'm editing the german talktables using the german alphabet, the english TT with english alphabet, french TT with french alphabet etc., but if I start to use german 'Ö', 'Ü' in french localization or hungarian letters which you cannot find in the other 7 languages, like 'É', 'Á', 'Í', 'Ó', 'Ő', 'Ú', 'Ű' in any of them, it messes everything up. (both capital and non-capital)

So I think somewhere has to be 7 lists (one for each language) which holds the acceptable unicode characters or 7 region code.

I really appreciate what you're doing for us and I have no right to ask you this, but can you try to unlock every unicode characters?
If I can help you in anything, you just need to ask! ;)