Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Mass Effect Andromeda

Featured Replies

  • Author
  • Localization

crackedmind, posted Sat Apr 08, 2017 2:10 pm (22073)


warrantyvoider wrote:

you made me realize I have to rewrite that entire code for my tool, which im at currently, so thanks for the info

my reading class sofar, let me know if I do something wrong

Code:
public static class FBJSON
    {
        public class Field
        {
            public byte flags;
            public byte type;
            public bool hasName;

            public string name;
            public ulong size;
            public object data;

            public Field(Stream s)
            {
                byte b = (byte)s.ReadByte();
                flags = (byte)(b >> 5);
                type = (byte)(b & 0x1f);
                hasName = (flags & 4) == 0;
                if (hasName) name = Helpers.ReadNullString(s);
                long start = s.Position;
                switch (type)
                {
                    case 1://list
                        size = Helpers.ReadLEB128(s);
                        data = new List();
                        while (s.Position - start                             ((List)data).Add(new Field(s));
                        s.ReadByte();
                        break;
                    case 2://dict
                        size = Helpers.ReadLEB128(s);
                        data = new Dictionary();
                        while (s.Position - start                         {
                            Field obj = new Field(s);
                            ((Dictionary)data).Add(obj.name, obj);
                        }
                        s.ReadByte();
                        break;
                    case 6://bool
                        data = s.ReadByte() == 1;
                        break;
                    case 7://binary string
                        size = Helpers.ReadLEB128(s);
                        data = Helpers.ReadNullString(s);
                        break;
                    case 8://int32
                        data = Helpers.ReadInt(s);
                        break;
                    case 5://unknown
                    case 9://int64
                        data = Helpers.ReadLong(s);
                        break;
                    case 0xf://uuid
                        data = new byte[0x10];
                        s.Read((byte[])data, 0, 0x10);
                        break;
                    case 0x10://sha1
                        data = new byte[0x14];
                        s.Read((byte[])data, 0, 0x14);
                        break;
                    case 0x13://payload blob
                        size = Helpers.ReadLEB128(s);
                        data = new byte[size];
                        s.Read((byte[])data, 0, (int)size);
                        break;
                }
            }


            public TreeNode[] ToNodes()
            {
                List result = new List();
                TreeNode t;
                int count = 0;
                switch (type)
                {
                    case 1:
                        foreach (Field f in (List)data)
                        {
                            t = new TreeNode((count ).ToString());
                            t.Nodes.AddRange(f.ToNodes());
                            result.Add(t);
                        }
                        break;
                    case 2:
                        foreach (KeyValuePair pair in ((Dictionary)data))
                        {
                            t = new TreeNode(pair.Key);
                            t.Nodes.AddRange(pair.Value.ToNodes());
                            result.Add(t);
                        }
                        break;
                    case 6:
                        result.Add(new TreeNode((bool)data ? "true" : "false"));
                        break;
                    case 7:
                        result.Add(new TreeNode((string)data));
                        break;
                    case 8:
                        result.Add(new TreeNode(((int)data).ToString("X8")));
                        break;
                    case 5:
                    case 9:
                        result.Add(new TreeNode(((long)data).ToString("X16")));
                        break;
                    case 0xf:
                    case 0x10:
                    case 0x13:
                        result.Add(new TreeNode(Helpers.ByteArrayToHexString((byte[])data)));
                        break;
                }
                return result.ToArray();
            }
        }

        public static List ReadFields(Stream s)
        {
            List result = new List();
            long len = s.Length;
            while (s.Position                     result.Add(new Field(s));
            return result;
        }
    }

Looks good and more simplier than before :)
  • Replies 674
  • Views 102
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

michalss, posted Sat Apr 08, 2017 6:39 pm (22078)


weiyun wrote:
warrantyvoider wrote:
simple answer, dawnless used my code and research, and made her own tool without mentioning me (afaik), so that tool came after DAItoolsWV (btw, the same goes for ehams tool, forgot how he called his)

greetz


I ported your DAI code for stringtable and it works. Game uses TTF as font file this time.

Image


I think WV code for stringtable was not correct, coz of encoding i think, it must be unicode not ascii. We did complete localization tools for DAI in the past with my friend, so string table repack is not a problem to be honest. What im looking for is to create own patch :D to localize this game.. BTW in DAI was use Flash font GFX. Dont see why this game would be a different yet or ? :)
  • Author
  • Localization

warrantyvoider, posted Sat Apr 08, 2017 11:15 pm (22081)


michalss wrote:
I think VW code for stringtable was not correct, coz of encoding i think, it must be unicode not ascii. We did complete localization tools for DAI in the past with my friend, so string table repack is not a problem to be honest. What im looking for is to create own patch :D to localize this game.. BTW in DAI was use Flash font GFX. Dont see why this game would be a different yet or ? :)


I know its not ascii, there are like 100 codepages, so im gonna rewrite it codepage-aware anyway, the code is just usefull for understanding general talktable structure in hex. btw its WV

in other news, ported the new "DBObject" class (as I now called it, because bf3 pdb leak calls it the same, just DBObjectElement which was too long for my taste) into my tool and rewrote everything around reading these structure, so now works again including loading into VFS, decryption and so on

Image

btw im already working with a friend on translating to chinese, so for this to work, we need to be able to use fonts of different codepages anyway, does anyone know what fonts are even used, if I can change them (change some config, hook import apis maybe?! dunno) and how frostbite handles them in general? are the fonts saved as binary somewhere? gonna work on the talktables next, so I have something easy to check when trying reimports

greetz WV

EDIT:I just noticed loading entire bundles doesnt work anymore, as theres no top node anymore, gonna make it so, that you can select them from FS tree instead, but going to sleep now, sry, is for next time^^

Release.rar

  • Author
  • Localization

OClear, posted Sun Apr 09, 2017 1:58 am (22082)


Is anyone writing a tool that can extract all the .cas chunks to file with the proper filename?

I wrote a small tool that can extract and decompress .cas chunks, but the filename is wrong. CAS files store 20-bit SHA1 ids, but I need these chunks named by their 16-bit UUID to make them useful. So, now I have to dig through these .sb files looking for them.

Just wondering if someone already has a tool that does this, otherwise I will keep at it.
  • Author
  • Localization

xrb936, posted Sun Apr 09, 2017 6:18 am (22084)


michalss wrote:
weiyun wrote:
warrantyvoider wrote:
simple answer, dawnless used my code and research, and made her own tool without mentioning me (afaik), so that tool came after DAItoolsWV (btw, the same goes for ehams tool, forgot how he called his)

greetz


I ported your DAI code for stringtable and it works. Game uses TTF as font file this time.

Image


I think VW code for stringtable was not correct, coz of encoding i think, it must be unicode not ascii. We did complete localization tools for DAI in the past with my friend, so string table repack is not a problem to be honest. What im looking for is to create own patch :D to localize this game.. BTW in DAI was use Flash font GFX. Dont see why this game would be a different yet or ? :)

Could you please share your old tools about DAI? THX!
  • Author
  • Localization

warrantyvoider, posted Sun Apr 09, 2017 12:34 pm (22086)


yay, my chinese friend showed me where the fonts are stored...

Image

then choose one of the res objects

Image

export them as .ttf and you can preview them

Image

greetz WV
  • Author
  • Localization

warrantyvoider, posted Sun Apr 09, 2017 8:27 pm (22090)


switched to using context menus, also you can load now entire bundles from the main view and ebx/res/chunk items from structure view
Image

as texture data can have MANY formats (see MSDN), I made a quick helper tool to figure out proper header for the texture data, it also allows you to export the raw texture data for experiments, sofar ive seen most common format seems to be 0x42 and 0x3C, but no idea yet how to make a dds header for it...

Image

you need to load all chunks and res into VFS, so TDP can find the res data aswell as the texture data, at best simply load entire bundles

greetz WV

PS:just wanna add that I removed "File System" menu now entirely, as its still visible in aboves screenshot...

Release.rar

  • Author
  • Localization

Hairless_Wookiee, posted Mon Apr 10, 2017 7:45 am (22094)


warrantyvoider wrote:
but no idea yet how to make a dds header for it...

Possibly via texconv? https://github.com/Microsoft/DirectXTex

Although I haven't had any luck trying to extract a viable image from hex dumps using any tools. I'm unsure if I am reading your suggested format correctly. For example, is 0x43 (67) D3DFMT_A2W10V10U10? If that is the case, what is 0x42 (66), as I can't see it on the linked format chart? There's also this format chart - https://msdn.microsoft.com/en-us/library/windows/desktop/bb173059(v=vs.85).aspx
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 8:11 am (22095)


Hairless_Wookiee wrote:
warrantyvoider wrote:
but no idea yet how to make a dds header for it...

Possibly via texconv? https://github.com/Microsoft/DirectXTex

Although I haven't had any luck trying to extract a viable image from hex dumps using any tools. I'm unsure if I am reading your suggested format correctly. For example, is 0x43 (67) D3DFMT_A2W10V10U10? If that is the case, what is 0x42 (66), as I can't see it on the linked format chart? There's also this format chart - https://msdn.microsoft.com/en-us/library/windows/desktop/bb173059(v=vs.85).aspx


damn! I really dont know, I just guess and compare with other code... well I can gurantuee that the res data in hex preview is the data belonging to the res and that the hex in TDP preview is the chunk data referenced by that res. now the texture infos displayed, is extracted from the res data by the structure definition I had from DAI, just they added an unknown int, that seems to be zero all the time, and proof me wrong, but thats how it makes sense sofar (height,width, etc...). making the dds header isnt easy, this is only the dds data, the header has to be generated.

as Im at work and dont have the game here, cant some run the game and use one of the texture dumper tools to determine the format of the loaded textures in memory?

greetz
  • Author
  • Localization

Hairless_Wookiee, posted Mon Apr 10, 2017 8:24 am (22096)


warrantyvoider wrote:
as Im at work and dont have the game here, cant some run the game and use one of the texture dumper tools to determine the format of the loaded textures in memory?

I actually tried that before your tools were available but couldn't get anything to work with the legit version. I assumed Origin was blocking the attempt. Maybe someone with the "cracked" (really emulated I guess?) version can do it.
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 8:45 am (22097)


well there are no protections against debugging and memory editing as far as ive seen, its really just a copy protection, so maybe they used a new format? 66 isnt used in the D3DFORMAT enum, but is included in your list, just there its "DXGI_FORMAT_R1_UNORM" which is a very special format for text rendering actually and doesnt make sense as face texture format, its also very thinly documented... so dunno, maybe something new?
  • Author
  • Localization

Hairless_Wookiee, posted Mon Apr 10, 2017 8:58 am (22099)


You'd think they'd follow DAI. What did that have? Off the top of my head, normal maps were BC5, there were some masks that were uncompressed 8.8.8.8 ARGB, then DXT1 and 5 for various others.
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 9:13 am (22100)


I really cant remember, but they definitly use different ones, as ive seen in my code. the idea would be to guess the format, create a file with that setting and the size of your texture (notice the mip start, if wsize is f.e. 1024 and mipstart is 3, that means the mips start with 256 wsize) and then c&p then exported hex over the image data, keeping the header. first problem already is: a 256x256 texture seem to never have the same datasize as the exported data, so even with trial and error I dont see yet, which format it could be

PS: DAI code supported formats: 0x00, 0x01, 0x03, 0x04, 0x0B, 0x0C, 0x0D, 0x10, 0x13, 0x14 and 0x36
  • Author
  • Localization

OClear, posted Mon Apr 10, 2017 10:49 am (22101)


warrantyvoider wrote:
PS:just wanna add that I removed "File System" menu now entirely, as its still visible in aboves screenshot...


Doesn't work for me anymore. FS -> load FS -> crash.

Code:
************** Exception Text **************
System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at MEAExplorerWV.TOC..ctor(Byte[] data)
   at MEAExplorerWV.FS.TOCEntry..ctor(String path, String display, Byte[] input)
   at MEAExplorerWV.FS.LoadTOCFile(String path, String display)
   at MEAExplorerWV.Form1.LoadFS()
   at MEAExplorerWV.Form1.loadFSToolStripMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 10:53 am (22102)


OClear wrote:
warrantyvoider wrote:
PS:just wanna add that I removed "File System" menu now entirely, as its still visible in aboves screenshot...


Doesn't work for me anymore. FS -> load FS -> crash.

Code:
************** Exception Text **************
System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at MEAExplorerWV.TOC..ctor(Byte[] data)
   ...


so why has none of the other 26 downloaders this problem? do you bought the game? do you select the game exe? have you edited files alread? a bit more information than "it crashed" would be needed if you want help
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 12:55 pm (22104)


was able to export format 0x37, its basic DXT1, so a start at least...

Image

Image

greetz WV
  • Author
  • Localization

Devisaur, posted Mon Apr 10, 2017 2:10 pm (22105)


Unrelated to the texture/model discussion going on. I'm trying to determine where within these files would the text, specifically in-game written text not subtitles, be located? I've done some browsing using WV's tool --I've looked into the .loc files, is it possible that the text contained is within the texttables, or are texttables solely used for conversational agents?
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 2:21 pm (22107)


most text is in talktables, so they can be easily replaced with the current loaded language (afaik) because a text is only referenced by its index

greetz
  • Author
  • Localization

Devisaur, posted Mon Apr 10, 2017 2:31 pm (22108)


warrantyvoider wrote:
most text is in talktables, so they can be easily replaced with the current loaded language (afaik) because a text is only referenced by its index

greetz


I see -- that makes sense. Helps narrow down my focus when there are a million different files. It looked like xrb936 successfully implemented your code -- I'll see if I can do the same. Unless they want to release their code :P
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 2:42 pm (22109)


im going to add the code to this project aswell, but do what you want
  • Author
  • Localization

michalss, posted Mon Apr 10, 2017 3:29 pm (22110)


warrantyvoider wrote:
most text is in talktables, so they can be easily replaced with the current loaded language (afaik) because a text is only referenced by its index

greetz



What you mean by this ? All text is in stringtable files? Is there then any way to replace/import files back to archives or any way to get text change to see it in the game ? I dont want to spend much time if someone allready did it..
  • Author
  • Localization

warrantyvoider, posted Mon Apr 10, 2017 4:04 pm (22112)


its all been done before, importing, overwriting in memory, making patches... but do you rewrite my dai code for mea or anyone else? this takes time and im just a human too. just google how dai research actually started (see f.e. https://www.reddit.com/r/DAIToolsWV/ or on my github https://github.com/zeroKilo/DAIToolsWV)

greetz WV

PS: afaik (!) all text is in talktables, but im not sure
  • Author
  • Localization

AnonBaiter, posted Mon Apr 10, 2017 5:01 pm (22115)


Man, I actually feel bad for those who picked the cracked CPY version before the update.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.