Map Database  •  FAQ  •  RSS  •  Login

Knights & Merchants: TPR [Portuguese(Brazil) translation

<<

Greninho

Woodcutter

Posts: 19

Joined: 19 Mar 2009, 23:00

Location: Brasil

Post 21 Mar 2009, 15:22

Knights & Merchants: TPR [Portuguese(Brazil) translation

Download of the beta translation (10/20/2009):
http://www.mediafire.com/download.php?mmt3z0j02xn
(60kb, lib and fnt files)

Example font:
Image
Obs: Not all my fonts are the same, I was a little tired from this work so I decided to add only characterer that I would use in the game

characteres added:
"?. ?, ?. ?, ?, ?, ?, ?, ?, ?"
"?, ?, ?, ?, ?"
"?, ?, ?, ?, ?"
"?, ?, ?, ?, ?"
"?, ?, ?, ?, ?"
"?, ?, ?, ?, ?"
"?, ?, ?, ?, ?"
"?, ?, ?, ?, ?, ?, ?, ?"

Old Topic:
I'm translating the Knights and Merchants: The peasants rebellion in portuguese (Brazilian) language, but some characteres... like "?, ?, ?, ?, ?, ?, ?, etc" doesn't exist... And i don't found a ".FNT"(Font) editor compatible... I tried use "Graphics Reader" with it I can open the fonts... but... it can't replace... i tried use "Graphics Editor (Harold's) 1.3.1" but give an error when i try open it ._.
I just need it to finish the translation
if anyone can help me, please, reply.
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 21 Mar 2009, 15:51

My graphics reader doesn't open fnt files at all, so how did you even manage to do that? Rename them to rx? Well of course that isn't going to work, they're not the same kind of file..
In fact I have no idea how those fnt files work, so I can't support them.

Maybe the Polish or Czech fonts contain some more letters that you need?
<<

Greninho

Woodcutter

Posts: 19

Joined: 19 Mar 2009, 23:00

Location: Brasil

Post 21 Mar 2009, 16:07

When i said "but give an error when i try open it." when i tried open the application... not the FNT file XD'
sorry for this confusion.
If the Graphics Reader can open... i Thought the Graphic editor can open/edit... @__@
Ah...
I know few words in czech and polish language... is very much different than portuguese... portuguese is very similar with spanish... but spanish don't have ?. ?, etc
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 21 Mar 2009, 16:25

Do you have the .NET framework installed?

Ok well I thought "they have odd letters as well" :lol:
<<

Greninho

Woodcutter

Posts: 19

Joined: 19 Mar 2009, 23:00

Location: Brasil

Post 21 Mar 2009, 16:32

LOL XD
i will download (dot)net, thx
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 21 Mar 2009, 16:35

Yes, ok, but that doesn't solve your problem..
There is a guy here on the forums who's making a Spanish translation maybe you can ask him how he got the fonts?
<<

Greninho

Woodcutter

Posts: 19

Joined: 19 Mar 2009, 23:00

Location: Brasil

Post 21 Mar 2009, 16:54

Ahh... Lewin tell me one time...
The administrator of the forum, Litude, knows how to edit and create
font files for KaM, and he will probably even do it all for you. (he
has made fonts for other languages such as Spanish and French)
I think... he doesn't know(the Spanish guy)... but i will try contact he. And I am awaiting a reply from Litude... But if someone know how to do it, is a great help.
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 22 Mar 2009, 11:14

The administrator of the forum, Litude, knows how to edit and create
font files for KaM, and he will probably even do it all for you. (he
has made fonts for other languages such as Spanish and French)
Actually I only had to create the Russian and Hungarian fonts, the French and the Spanish font files were identical to the German one.
I think... he doesn't know(the Spanish guy)... but i will try contact he. And I am awaiting a reply from Litude... But if someone know how to do it, is a great help.
Yeah, I supplied him the fonts and they are missing some Portuguese characters so you couldn't use them.
As for creating the Portuguese font, I just checked my existing fonts and none of them had the right characters. I'll need to see when I'll have time to do one.
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 22 Mar 2009, 12:59

So Litude, do you know the format of the fnt files, or do you know a program that can use them? Or both?
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 22 Mar 2009, 22:25

So Litude, do you know the format of the fnt files, or do you know a program that can use them? Or both?
He knows the format and edits them by hand. I don't think he has a program to edit them. Somewhere he outlined the format, but I can't be bothered finding it now.
Lewin.
<<

Greninho

Woodcutter

Posts: 19

Joined: 19 Mar 2009, 23:00

Location: Brasil

Post 22 Mar 2009, 22:29

by hand? Is it like to edit the hexadecimal of the file to create a charactere? @__@
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 22 Mar 2009, 22:44

Well I can maybe write an editor for him (and others) if someone tells me the format :)
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 27 Mar 2009, 22:49

by hand? Is it like to edit the hexadecimal of the file to create a charactere? @__@
I believe so. Each character is 1 pixel or something like that.
Well I can maybe write an editor for him (and others) if someone tells me the format :)
Great idea. @Litude: Tell him the format! :wink:
<<

Greninho

Woodcutter

Posts: 19

Joined: 19 Mar 2009, 23:00

Location: Brasil

Post 27 Mar 2009, 22:55

I know! Litude had teached me. I'm making a tutorial (in flash) for edit/create fnt files, tomorrow it will be finished... i think XD
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 28 Mar 2009, 23:47

Yeah I gave him a quite lenghty explanation. If someone is interested, I quote myself below:
If you're familiar with hex editing, I guess the font editing shouldn't give you too much trouble.

Firstly, The Barbarian's graphics reader is very useful for the editing as it will help you in locating the characters. Make sure you have it at hand before starting to edit the fonts.

Each font file uses the same basic construction. The first eight bytes are nothing important, so you can just ignore these. Now after this, a table consisting of 255 bytes come, with valid values being 00 or 01. This "table" is used by the game to know which characters are used by the font file. If you change e.g. the last 00 byte before the row of 01 values start into 01, it will mean that one more letter is added to the "used" part of the font and as the character you enabled is before any other character, each character value will be one less (messing up the game texts). The position of the character in the table matches the value of the character itself, so if you put ? into the 134 slot, you will get the character displayn in the game by using the value of 134 in the lib files.

So anyway, incase you understood something about what I explained about the table, you might also want to know how to edit the actual characters.
This data starts at $108, and the very first byte tells the height of the letter you are editing, followed by a separator (00) and then the width of the character. After this, some empty space follows and the actual character graphic starts. I don't know the exact amount of empty space after the start needed, which is why I always copy over some pre-existing characters and start editing them (so if I want to do ?, i copy over ? and modify the character to add the ^ on top of it to make things easier. In the example above you would need to shift the letter one row lower down, so you just check the width value, add one more to it and then add as many 00 bytes as the letter is wide to the start of the file.

Now the most difficult part is acutally positioning the letter into the correct place. Firstly, you will need to find out the actual character code of the Portuguese letters so you know where they are to be added. Then you will have to find this very value from the table and change the 00 to 01 (or incase it is already 01 you don't need to change anything).

Assuming the value was 00, each letter that had a higher value than the letter you are going to add have now shifted their position to one less as there exists no graphic data for the new letter you enabled some moments ago. You will then have to look through the file and try to find the letter that took the slot of the letter you are going to add. In certain fonts you can see it directly in the hex editor, but the best way of doing it is going to a place where you think it might be when you check how deep you are in the file (scrollbar) compared to where the letter is in the actual font.

You should start The Barbarian's Graphics Reader by now and make it scan the game if you haven't done it yet. Once you've done this, search for the start of a letter (some small hex value followed by a 00 byte and then another small hex value, that is the height and the width) and start dragging over the hex values from the first byte (height), until you reach the height value of the next letter, stop dragging here and make sure you don't include the height value of the next letter and copy the values. Then just paste them instantly after the last letter ended. Now go to the Graphics Editor and click again on the font file you are editing and it will update. You should now see that some letter has been duplicated. Whichever letter it was, this tells you where you are in the file and then you can continue searching for the correct position by using this technique. Do remember to delete the duplicate letter after each try, otherwise your font file will be seriously messed up. :D

Eventually you'll hit the correct spot, and you'd better write down the hex address or you'll lose it again soon :wink:. So when you have made it this far, you should now attempt to find an already existing letter that looks very much like the one you are going to add, like using ? if going to do ? and then copy it over to the place where the letter you added should be at (using the address you hopefully wrote down earlier) and then do the neccessary modifications.

Generally, each font file has about four colors at maximum and you shouldn't need to use any other colors than once that are already used in the character you're editing. 00 just means transparent and all other values in the character are somekind of colors. Playing around with this and checking the result in the Graphics Reader will eventually make you understand how the colors work.


If you don't feel like doing that, well I did say I will get around doing the fonts someday, but this and next week are full of exams so I'll not be able to do any work that requires long concentration. So if you can't understand my notes (I'm terrible at explaining things :wink:), I'll create the font sometime later.

Oh and if something isn't clear, just ask away!
Can't be sure if everything went correctly as haven't touched a font file for a few months. And something I forgot in the explanation is that the first byte or some byte around the start of the file determinates the height of a line in the font. Not really useful if you're just adding letters to a font though.

Return to “Other Creations”

Who is online

Users browsing this forum: No registered users and 11 guests