|
Post by ouch on Feb 13, 2013 22:11:40 GMT -5
Well the first thing you would need to do is to take all those file offsets in your translate column and convert them to hexadecimal numbers. you can do this easy with a spreadsheet formula: =CONCATENATE("0x",DEC2HEX(A1,6)) That will give you all your patch offsets. The rest is just a lot of copying and pasting... So basically how the custom part of the patcher works is that in the version drop down box you type what you want to call your patch. You can't use spaces or any special characters. so you can name it something like "UIM06_Translations" (without quotes of course) then click the "save new version" button. this will give you a blank custom patch to use. make sure show offsets is de-selected. The first page should always be your defaults. It doesn't have to be of course, but it's nice for the user to be able to revert back to the original state if need be. So go through your sheet and copy an paste anything you want the end user to see. and you might want to put along the top that this is the english defaults. so from what I can see, you want to copy and paste your charlen, maxlen, and string columns. once your done with that then save it by pushing save. and then click show offsets. You will now be able to copy and paste the offsets to where the strings are on the main sheet. so if the string "NO WEAPON" is in the cell b4 on the main sheet then you paste the offset for that string in b4 on the offset's sheet. Once you've done that then click save. To add the french translations click "show offsets" again to go back to the main sheet. Now go through and copy and paste your translations where your english strings are. And then click on "save new", this creates a second sheet for your modified defaults. You can now at this point click "patch game" and give hardwar a try to see your changes. if everything is to your liking then you can export it to share with others. To do that go to the "items/import/export" tab. then click on "load database" type in the name of the file you want to create and click "open". Now click on the custom checkbox and you will see your patch pages on the left. Just click on each number and click on the export button. Next go back to the Custom tab, and click on the "show Offsets" checkbox. and then go back to the "items/import/export" tab and then click on your offset sheet and click on export. Now just click on the "unload database" file and your done.
|
|
|
Post by duncan on Feb 14, 2013 3:03:23 GMT -5
Bad news unfortunately, but with silver lining:
The max character length includes the 0x00 that must terminate the string.
So if there is a max of 16, it means you have 15 characters to type the translation. For example '%s - En Recharge' is to long.
I notice also that there is a mistake in my prediction of the max character length. For example with '%s - Malfunction' which is 16 characters, you have actually 4 more bytes than the 16 that were calculated. Actually 3 more bytes, since there is still the 0x00 that needs to go at the end.
To summarise Everywhere the french string length is equal to the max string length, you need to take one character off. Except where the english string length is also equal to the max string length, there are 3 more character available.
Sorry for not making that more clear.
|
|
|
Post by ouch on Feb 14, 2013 5:26:18 GMT -5
New Update! Added copy and paste functions and a mini-right click menu so that you can copy and paste directly from spreadsheets and other grid objects. You can also use the shortcuts ctrl-c to copy and ctrl-v to paste. Which should make things a heck of a lot easier for you Sushi. -------------------------------------- edit: another new version! Added better keyboard support. You can now navigate via the arrow keys, select cells with the shift key + arrows, and move to the end of cell blocks with ctrl, and select all cells to the end of a cell block with shift + ctrl + arrows. And finally, I added a delete selected cells option as well on the right click menu or you can just push the delete key. So basically it emulates spreadsheet controls now... Now, off to bed I go! lol
|
|
|
Post by sushi on Feb 14, 2013 8:02:45 GMT -5
@ ouch Very good news that copy/past function ! It will certainly help me... I'm not ready yet but nearly ! @ duncan Ok so i must : use 1 less char for each string except the strings that are as long as predicted, I have 3 char more. Pfiouuuuu got to look at that from the beginning, there must be some errors. Here is a picture of my spreadsheet with the string max lenght corrected To display the good max chaclen, Is my formula ok ? =If(C2=H2;H2+3;H2-1) And here is my formula to identify the bad translations... =If(G2>D2;"Caca";"") I go on with that hoping I did understand everything ? Are you sure there is no way to increase the strings lenght ? It would help so much !
|
|
|
Post by duncan on Feb 15, 2013 2:36:58 GMT -5
calculations seem correct.
i also do not know what the duplicate strings are for, my guess is one set for single player game and the other for server game
your wish for more space for text strings is not impossible, but requires some understanding of machine code/assembly code and how references to memory addresses are formed. it is not as simple as my text string is at this address, find address in binary, change address to new address with longer text string. investigating
|
|
|
Post by ouch on Feb 15, 2013 7:36:50 GMT -5
New version!
Added cut procedure, both to the right click menu, and the the keyboard shortcut ctrl-x.
fixed a couple bugs with paste. and fixed a rather severe bug that caused the custom grid to steal all keyboard input...
changed some grid options a bit to be more user friendly.
you now replicate hex strings with "*".
so you can do things like:
Clear Field...Char Limit...String ..0x00*8..........7........POWER ..0x00*12.........11.....FUSION CELL
edit: Hah, even code tags strip whitespace chars on this board...
Because the patcher writes, left to right, top to bottom. what happens here is that if the offsets are the same for the clear field cell as the string cell. Then hex code 00 gets written 8 times, and then the string will get written. So effectively the previous contents in the exe get cleared and the new contents get written on a nice clean slate.
I would like to add the ability to write offsets like 0x0da20-8 where the dash is the byte limit that will be written. This way if set, people couldn't accidentally overwrite things they shouldn't by entering a string that is far too long. But I have to get to bed right now...
|
|
|
Post by sushi on Feb 15, 2013 12:00:11 GMT -5
@ duncan, Let say something like 5 more chars for all words under 25 chars would be perfect ! In fact adding 5 chars to every string would help a lot. He he I do my shopping You can't imagine the amount of time lost just to find a synonymous that matches !!! French is less rich in synonymous than English I think probably 2x-3x less just comparing the difference between those two languages around 600,000 for eng , around 250,000 for French... Commons words like FOOD, EXIT, FIT, BOARD, POWER and many more can't be translated with so few chars To save time, I sorted all the lines by STRING so it was easy to modify 2 strings in 1 time... ouchVery cool all that, I'll try that tonight, I'm ill, maybe the flu !!! so I haven't the idea really clean for the moment. My translation is over, I'll post the spreadsheet on the other thread if someone wants to try that. Thanks all 2 for your precious help.
|
|
|
Post by sushi on Feb 15, 2013 16:01:31 GMT -5
Well the first thing you would need to do is to take all those file offsets in your translate column and convert them to hexadecimal numbers. you can do this easy with a spreadsheet formula: =CONCATENATE("0x",DEC2HEX(A1,6)) That will give you all your patch offsets.... It doesn't work, maybe i have to add a plugin to Excel 2003 ? In fact, all the procedure to implement the traduction on your patcher is really heavy... I'm not so familiar with all those manipulations, it takes me a lot of time to understand and have the expected result... could you add a new tab just for me called "Translation" in your patcher, and that Tab contains 2 columns... 1. Adresses (decimal or hex detected automatically so nop) 2. Translation (in clear text converted automatically so nop as well) So i just select all the content of my adress column and past right in the patcher without anything else to do. And i do the same with the translation on one only move... So everything is automated nothing to tweak etc.... That sounds good he he ;D And it could be really cool to modify and test easily all the modifications... Could help to locate precisely the addresses of the hub for exemple or the hangar menu etc...
|
|
|
Post by duncan on Feb 16, 2013 4:28:48 GMT -5
from office.microsoft.com/en-gb/excel-help/dec2hex-HP005209054.aspxDEC2HEX Show All Converts a decimal number to hexadecimal. If this function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in. How? On the Tools menu, click Add-Ins. In the Add-Ins available list, select the Analysis ToolPak box, and then click OK. If necessary, follow the instructions in the setup program. Syntax DEC2HEX(number,places)
|
|
|
Post by sushi on Feb 16, 2013 5:55:41 GMT -5
Yes I've already read the link and my Addin is Enabeled. In fact I've enabeled all the addins availables VB as well.
The answer is #VALEUR! when I write =DEC2HEX(F8;4). "," doesn't fit in the FR version I have to use ";" instead.
I've tried numerous formulas and =DECHEX(A1) works just if A1 containes a number =DECHEX(CODE(F8)) gives me "50" instead of a Hex string...
|
|
|
Post by duncan on Feb 16, 2013 13:26:04 GMT -5
so then it works - i believe there is only a need to convert the decimal address into a hexidecimal, showing 6 dixits and preceding it with 0x.
just leave the text as text.
|
|
|
Post by ouch on Feb 17, 2013 12:25:06 GMT -5
New version! a lot of bug fixes in this one. copy and paste has had a few fixes. import and export had fixes, and even the file writer has had a few fixes. You can now add a minus sign onto an address with a number after it and limit the number of characters that will be written. So your offsets can now look like 0x0DA53231-30 and the patcher won't write beyond 30 bytes after that offset. You can now write percent symbols in the custom patches part of the editor.and import and export pages with them as well. Also some spelling corrections have been made as well. Lots of stuff done to this one.
|
|
|
Post by riedquat on Feb 21, 2013 19:55:36 GMT -5
Holy crap! I need a translator just to understand what are you talking about... just following you three for the last posts gave me a brutal headache. What do i do now? I keep working on the spreadsheet or I start over in the patcher? Or I also can keep working on the spreadsheet and then copy/paste directly into the translation tab, is that possible? Or I just await till I get a decently understanding of what you are doing... better not, it will take ages!
|
|
|
Post by ouch on Feb 22, 2013 5:59:30 GMT -5
New Release!
This one adds a fully functional translation editor with english and french defaults for UIM06. You can modify existing translations, or create new ones. The editor is based around the custom section of the editor, Meaning It's flexible enough to allow you to make translations for any version of hardwar you like... Or even for non-translation hacks/edits.
I've also added a launch button in the lower right hand corner, which will launch hardman.exe for you.
Notes: if you want to play with item price changes or super thruster power in your desired languages, then you have to apply those changes first and then apply the desired translation.
Riedquat, you can use whatever you like honestly. The new translation editor, can copy and paste too and from spreadsheets just like the custom patch grid.
|
|
|
Post by sushi on Feb 22, 2013 6:12:57 GMT -5
Hello Ouch, when I try to click on "Patch Game" nothing occurs. What can I do to apply the FR translation ? When I quit the patcher, it chashes ! I'm probabely missing something to make the patcher work !
|
|