XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Oct 23, 2017 8:10 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Forza Horizon 2 Xbox (.Str)
PostPosted: Sat Oct 29, 2016 6:44 am 
Offline
ultra-n00b

Joined: Sat Oct 29, 2016 6:41 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time














You can make the ads go away by registering

How can i decrypt this file for editing?

Header is LSB2.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Forza Horizon 2 Xbox (.Str)
PostPosted: Sun Oct 30, 2016 2:01 am 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
reallllllllllllllllllly lazy day - here you go:

Code:
idstring "LSB2"
get DUMMY long # 1
get DUMMY long # 2
endian big
get DUMMY long # 36 (header size)
get DUMMY long # 4
get DUMMY long # 36 (header size)

get OFFSET_EOTEXT long
get DUMMY long # 0
get OFFSET_EODATA long

# --------------- 36

get OFFSET_UN long
get COUNT long
get DUMMY long # 808?
get DUMMY long # 0

# string offsets:
# ushort ?
# offset (x2 to get 'end of wstring' length)

# string offsets * COUNT

# strings:
# array of nul-terminated wide strings * COUNT

# unknown:
get DUMMY long
get DUMMY long
# uint * (COUNT * 2)

# ids:
# array of nul-terminated strings * COUNT

# tail:
get SIZE long
get NUM long # dupe of COUNT
# uint * (NUM * 2)

# eof reached!

_________________
Useful tool links:


Top
 Profile  
 
 Post subject: Re: Forza Horizon 2 Xbox (.Str)
PostPosted: Mon Oct 31, 2016 8:10 pm 
Offline
veteran

Joined: Tue Nov 27, 2007 8:30 pm
Posts: 93
Has thanked: 20 times
Have thanks: 5 times
I had trouble with this script and the above file. I've never dealt with localization decoding. Is this to be used with QuickBMS?


Top
 Profile  
 
 Post subject: Re: Forza Horizon 2 Xbox (.Str)
PostPosted: Mon Oct 31, 2016 11:08 pm 
Offline
ultra-veteran
ultra-veteran

Joined: Fri Nov 06, 2009 12:13 am
Posts: 588
Has thanked: 66 times
Have thanks: 126 times
Teancum wrote:
I had trouble with this script and the above file. I've never dealt with localization decoding. Is this to be used with QuickBMS?


correct - it is a bms script for quickbms which describes the entire file format from the sample file.

as a script it doesn't actually do anything though - quickbms isn't really good for unpacking/repacking localisation files so none of the strings are extracted here.

if either of you are actually interested i can write up a tool

edit here is a better script for 010 editor:

Code:
//--------------------------------------
//--- 010 Editor v5.0 Binary Template
//
// File:     tracks.str
// Author:   wrs
// Revision: 1
// Purpose:  str files from forza horizon 2
// Link:     http://forum.xentax.com/viewtopic.php?f=35&t=15422
//--------------------------------------

// ------------
// xbox style:
BigEndian();

// ------------
// string helpers:
struct wstr{ wstring val; };
struct cstr{ string val; };

// ------------

struct
{
  char Magic[4]; // LSB2
  uint one; // 1 little endian
  uint two; // 2 little endian
  uint un_36; // block_head size?
  uint un_4;

// these offsets are absolute:
  uint offset_blockStrings;
  uint offset_blockIds;
  uint unknown_0; // ?? zero
  uint offset_blockTail;

} BLOCK_HEAD;

// ------------

struct
{
  uint block_size;
  uint num;

  struct
  {
    ushort Id;
    uint OffsetHalf; // halved
  } x[num +1];

  struct
  {
    wstr x[num +1] <optimize=false>;
  } STRS;

} BLOCK_STRING;

// ------------



struct id_info
{
  ushort a, b, c, d;
};

// ------------

struct
{
  uint blocksize;
  uint num;

  id_info unknown_info [num];

  struct
  {
    cstr x[num] <optimize=false>;
  } str_ids;

} BLOCK_IDS;

// ------------

struct
{
  uint blocksize; // (num*ushort) +8
  uint num;
  ushort tail[num];
} BLOCK_TAIL;

// sanity:
Assert(FEof());




edit 2

removed string.bt - it isn't required!

_________________
Useful tool links:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group