Page 1 of 2

Text Files Shadow Of mordor *HELP* text Container

Posted: Thu Nov 27, 2014 10:51 am
by michalss
Can anyone help please with this format ??

Download (rest in signature add before (dropbox):

Code: Select all

38234344/stringSoM.rar
This is what i have so far... I cannot find offset :(

Code: Select all

BigEndian();

local uint x;

char sign[4];
uint version;
uint headsize;
uint entry;
uint64 textSize; // must be *2 coz of unicode
byte bbb[8];

for (x=0;x<entry;x++) {

 struct Entry {
    //uint ID;
    //uint Offset;

    ushort id1;    //???
    ushort id2;   //????
    ushort of1;   //????
    ushort of2;   //????

 }data;

}

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Thu Nov 27, 2014 3:43 pm
by InKviZ
And where is the text ??? And share unpack and pack archives.

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Thu Nov 27, 2014 5:42 pm
by michalss
InKviZ wrote:And where is the text ??? And share unpack and pack archives.

If you want repacker for PC you won't find one. This is from X360 version, however only different is endian...

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Thu Nov 27, 2014 7:14 pm
by InKviZ
If you want repacker for PC you won't find one. This is from X360 version, however only different is endian...[/quote]
This is bad ....

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Sat Nov 29, 2014 8:56 am
by michalss
anyone please ? I cannot figure it out :(

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Sun Nov 30, 2014 6:59 pm
by WRS
those widestrings are padded to 4 byte blocks

but the string count isn't in the header - the 32180 is this entry count

english - there are 27414 strings
french - there are 23344 strings
russian - there are 14142 strings

there are some html like colours

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Mon Dec 01, 2014 7:19 am
by michalss
WRS wrote:those widestrings are padded to 4 byte blocks

but the string count isn't in the header - the 32180 is this entry count

english - there are 27414 strings
french - there are 23344 strings
russian - there are 14142 strings

there are some html like colours

thx but not sure if i understand :( From my script as you can see that TextSize is size of text block * 2. It is perfect in every language file. However i have try to repack this file and it is working but once you make strings longer text is broken in game. There must be something im missing.

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Mon Dec 01, 2014 10:07 am
by michalss
My latest wersion but i dont think this is right:

Code: Select all

//--------------------------------------
//--- 010 Editor v5.0.2 Binary Template
//
// File:
// Author: michalss
// Revision: 1.5
// Purpose: Shadow of Mordor TextFiles
//--------------------------------------
BigEndian();

local uint x,padding,dCounter;
local string text;

char sign[4];
uint version;
uint headsize;
uint entry;
uint64 textSize; // must be *2 coz of unicode
uint64 unk;


struct DONTKNOW {
    for (x=0;x<entry;x++) {

        struct Entry {
   
            uint dummy;    
            uint crc;

        }data;

   }
}n;

dCounter = (textSize*2)+(entry*2);

struct TextEntry {
do {

 struct Text {
         
    text=ReadWString(FTell());
    char TextF[Strlen(text)*2];    
    padding=ReadUInt(FTell());
    if (padding==0) {
        byte padding[4];
    }else{       
        byte padding[2];
    }
 }data;


} while (FTell()<=FileSize()-1);
} E;
//Printf("Counter %i\n",dCounter);

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Mon Dec 29, 2014 3:34 am
by MiRiKan

Code: Select all

//--------------------------------------
//--- 010 Editor ver 6.0 mordor PC
//
// File: string.strdb
// Author: MiRiKan updated, michalss
// Revision: 1.7
// Purpose: Shadow of Mordor text script
//--------------------------------------
local uint x,padding,dCounter;
local uint ftell;
char identity[4]; //SKDB
uint dummy1; 
uint SizeOfHeader;
uint PointerOfStrings;
uint64 textSize;
uint64 dummy2;
struct Unknown {
    for (x=0;x<PointerOfStrings;x++) {
        struct UNKNOWN {
            uint unknown1;    
            uint unknown2;
        }data;
   }
}DATA;
dCounter = (textSize*2)+(PointerOfStrings*2);
struct Strings {
     while (FTell()<=FileSize()-1){
        struct Text {
            wstring text;
            ftell = FTell();
            FSeek(ftell-2);
            padding=ReadUInt(FTell());
            if (padding==0) {
                byte padding[4];
            }else{
                byte padding[2];
            } 
        }strings;
    };
}TEXT;
I changed little things for PC.
and i think your file will need "BigEndian();"

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Mon Dec 29, 2014 11:00 am
by michalss
Problem is that template is not correct :( You just copied over, not helpful pretty much :( Need to understand this unk uints!

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Tue Dec 30, 2014 4:14 am
by MiRiKan
michalss wrote:Problem is that template is not correct :( You just copied over, not helpful pretty much :( Need to understand this unk uints!
Yes, you are right.
but i really don't know what it is.
maybe it might be some pointers for texts. i'll think and think again

Code: Select all

struct Unknown {
    for (x=0;x<PointerOfStrings;x++) {
        struct Point {
            uint unk1; // maybe pointer
            uint ID; 
        }data;

   }
}D;

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Tue Dec 30, 2014 9:41 am
by michalss
OK sorted with little help of my friend evin :)

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Tue Dec 30, 2014 10:18 am
by MiRiKan
Image

Hum. Japanese texts are 14299. but pointers are 32269.
and English texts are 27413. but pointers are 32179.
...So i think this pointers have so many dummys in there.
also there is so many dummys in English texts! i found that "Level" text or some strings about FPS game - which were in the F.E.A.R game, perhaps.
i can not separate dummy data from this strings...

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Tue Dec 30, 2014 11:17 am
by michalss
Here you GO :) easy.. Goona do repacker soon

Code: Select all

//--------------------------------------
//--- 010 Editor ver 5.2 mordor X360
//
// File: string.strdb
// Author: michalss
// Revision: 2
// Purpose: Shadow of Mordor text script
//--------------------------------------

BigEndian();

local uint x,padding,dCounter;
local uint pos;

char identity[4]; 
uint version; 
uint SizeOfHeader;
uint countStrings;
uint Null1;
uint textSize;
uint Null2;

dCounter = SizeOfHeader + countStrings*8;

struct TextData {
    for (x=0;x<countStrings;x++) {
        struct StringsUni{
           uint TextID;
           uint TextStartPos; 
           pos = FTell();
           FSeek(TextStartPos*2+dCounter); 
           wstring text;  
           FSeek(pos); 
        }data;
   }
}DATA;

Re: Text Files Shadow Of mordor *HELP* text Container

Posted: Wed Dec 31, 2014 2:36 am
by MiRiKan
michalss wrote:Here you GO :) easy.. Goona do repacker soon

Code: Select all

//--------------------------------------
//--- 010 Editor ver 5.2 mordor X360
//
// File: string.strdb
// Author: michalss
// Revision: 2
// Purpose: Shadow of Mordor text script
//--------------------------------------

BigEndian();

local uint x,padding,dCounter;
local uint pos;

char identity[4]; 
uint version; 
uint SizeOfHeader;
uint countStrings;
uint Null1;
uint textSize;
uint Null2;

dCounter = SizeOfHeader + countStrings*8;

struct TextData {
    for (x=0;x<countStrings;x++) {
        struct StringsUni{
           uint TextID;
           uint TextStartPos; 
           pos = FTell();
           FSeek(TextStartPos*2+dCounter); 
           wstring text;  
           FSeek(pos); 
        }data;
   }
}DATA;
WOW, i was just missed cause i didn't know where end of header is. you are amazing
Thanks