|
Post by duncan on Feb 9, 2013 14:25:09 GMT -5
As soon as your list is ready i'll translate it... I've located many texts FR from bob and so on, The missions scripts for the offline game. So do not hesitate to give everything you can extract. ok here we go... in 3 posts ... maybe not the smartest --- deleted the posts, got attachment in next post --- the numbers are -the length of the string -the calculated available character length - strings seem to be stored per 4 bytes. i'll try to link a file
|
|
|
Post by duncan on Feb 9, 2013 14:39:20 GMT -5
text file Attachments:
|
|
|
Post by sushi on Feb 9, 2013 15:21:19 GMT -5
Ok I look at that...
|
|
|
Post by Pilot on Feb 9, 2013 18:43:51 GMT -5
i just completed a new list of strings that could be translated, almost 3000 of them . although some seem to appear double, maybe for single game and network game separate. Quick question: The double listings were they the names of cargoes and goods? If so, I believe them to be the names, as listed, for the TI console... I've been a bit curious about this as well, in the cargo patch I translated the first few and decided to leave the rest after I began to wonder would it be better to translate them or not... Why leave as is or translate them? Simple if they are translated to French, or future language, player(s) may have some difficulty ( hangar not hanger...) if playing on Hammer's server, without not knowing the Server's command list, though in most cases it does leave enough room for two different spellings, if it could/would recognize the second one.
|
|
|
Post by ouch on Feb 10, 2013 6:17:16 GMT -5
|
|
|
Post by sushi on Feb 10, 2013 9:09:40 GMT -5
i just completed a new list of strings that could be translated, almost 3000 of them . although some seem to appear double, maybe for single game and network game separate. Quick question: The double listings were they the names of cargoes and goods? If so, I believe them to be the names, as listed, for the TI console... I've been a bit curious about this as well, in the cargo patch I translated the first few and decided to leave the rest after I began to wonder would it be better to translate them or not... Why leave as is or translate them? Simple if they are translated to French, or future language, player(s) may have some difficulty ( hangar not hanger...) if playing on Hammer's server, without not knowing the Server's command list, though in most cases it does leave enough room for two different spellings, if it could/would recognize the second one. Yes it is a good question !!! Maybe the translation is useful only for offline games.
|
|
|
Post by duncan on Feb 10, 2013 12:08:17 GMT -5
I realised it could be handy for you to extract fench strings from the french exe.
So here the python 3.2 script that I used, make sure to update the path (HERE_FULL_PATH_TO) to the french hardwarw.exe and the path where to write the output file (PATH_TO_DESTINATION)
Just copy paste the script into IDLE and hit enter twice
The output file is a simple tab delimited text file. Since the algorithm is pretty simple, there will be a lot of rubbish as well, which you can delete by hand.
Note that @ replaces the carrier return character 0x0D
#Python 3.2
if 1==1: import array f=open('/HERE_FULL_PATH_TO/HardwarW.exe','rb') fb = array.array('B') start=0 end=f.seek(0,2) dump=f.seek(0,0) fb.fromfile(f,end-start) f.close()
def testchac(chac): if chac>0x1F and chac<0x40: return chac #excludes @ 0x40 elif chac>0x40 and chac<0x7B: return chac elif chac==0xA9: return 0x63 #copyright chac elif chac==0x0D: return 0x40 #CR return 0
#if 1==1:
#variables a=[] #collects text string b=[] #collects addresses c='' #collects tentative string d=0 #counts number of strings processed e=[] #collects string lengths g=0 #counts string length h=0 #counts num chacs processed j=0 #collects tentative address
a.append('')
while end-1 > h:
#check for end string plus prep for next if testchac(fb[h])==0: if len(c)>2: a[d]+=c d += 1 a.append('') e.append(g-1) b.append(j) g=0 c='' j=h
else: c += chr(testchac(fb[h])) #copies all chacs to string
g += 1 h += 1
e.append(g)
#for once in range(1):
w = open('/PATH_TO_DESTINATION/extractALL.txt','wt') w.write('flag\taddress\tchaclen\tstring\ttranslate\n') for i in range(d): dump = w.write('0\t') dump = w.write(str(b[i])) dump = w.write('\t') dump = w.write(str(e[i])) dump = w.write('\t') dump = w.write(a[i]) dump = w.write('\n')
w.close()
|
|
|
Post by sushi on Feb 10, 2013 14:20:41 GMT -5
Ok i'll try that...
|
|
|
Post by duncan on Feb 10, 2013 15:17:02 GMT -5
maybe the filter is a bit tight - it will exclude characters with accents - if they are used
you could add them to this section of the script to be included by adding another 'elif' line that then 'return chac'.
def testchac(chac): if chac>0x1F and chac<0x40: return chac #excludes @ 0x40 elif chac>0x40 and chac<0x7B: return chac elif chac==0xA9: return 0x63 #copyright chac elif chac==0x0D: return 0x40 #CR return 0
|
|
|
Post by sushi on Feb 10, 2013 15:37:26 GMT -5
Thanks i try to do it and a tell you
|
|
|
Post by sushi on Feb 10, 2013 16:20:55 GMT -5
So I've copy/past your programm in a .TXT, then modified source and destination and renamed the .txt into .bat but nothing occurs. I see a cmd window opening and closing in 1s and then nothing in the destination dir.
Here are my PATH G:\HardwarW.exe (Iso on Daemontool) C:\extractALL.txt
I've tried with / and \ but it is the same. All this is new for me so I don't really understand what to do ?
|
|
|
Post by duncan on Feb 11, 2013 2:02:52 GMT -5
You will become a python programmer now ;D Don't worry, it is easy to learn and quick to get results. IDLE is the python integrated development environment (IDE). It will execute the script. Get python 3.3 here (do not get python 2.x as they made some big changes from 2 to 3): www.python.org/download/A video to get you up to speed with running python scripts in IDLE www.youtube.com/watch?v=kXbpB5_ywDwAnd lots of guides on how to program python wiki.python.org/moin/BeginnersGuide
|
|
|
Post by sushi on Feb 11, 2013 9:53:01 GMT -5
Thanks for your help, I'll dowload python tonight...
|
|
|
Post by sushi on Feb 12, 2013 4:19:12 GMT -5
Nearly got it Just a little difficulty to write the Path... The HardwarW.exe is on G: (HARDWAR_FR1) The destinaotion folder is C:\Extraction So I've tried to write G:\HARDWAR_FR1\HardwarW.exe and C:\Extraction But I have It looks silly but I don't know how to fill HERE_FULL_PATH_TO and PATH_TO_DESTINATION
|
|
|
Post by sushi on Feb 12, 2013 4:33:27 GMT -5
Victory !!! I did manage to write the good path and I've got my Extractall.txt Cool ! Now I can begin to translate...
|
|