Page 1 of 6

Lewin's KaM Text Editor (LIB files)

PostPosted: 13 May 2008, 02:38
by Lewin
Hi Everyone,
I have decided to put my editor on hold for a while and make a program for editing LIB files. (I am not finished with the mission editor, I will continue developing it later) I was talking to The Dark Lord and he said he wanted to make custom in game messages for his campaign but he couldn't as there is no full LIB file editor.
The basic idea is a tree of all the text strings, probably sorted into categories to make it easier. You can change them then save the file. Hopefully it will edit both the setup.lib and text.lib.
The current status is not so good. I spent a few hours on it and managed to make it load the first 19 strings (by looking them up from the index at the start) but from string 20 onwards something is wrong with the index. Hopefully I'll be able to fix this but if you know anything about the structure of these files then I would love some help. I am using this documentation but it is not very helpful in some areas. :wink:
for a while, it seems to change later somehow but maybe you'll figure that out yourself
Maybe Legionary has written some more on the Dutch forum? (I can't read Dutch so please translate it to English) If you can help me at all please do.
So no screenshot yet, I'll let you know how it goes.
Lewin.
P.S. Is there some editor already out there that The Knight/The Barbarian are hiding from us? After all, the English language pack MUST have been made with some kind of editor. (doing it by hand would be almost impossible) @The Knight: If you've got an editor then please share it with us, even if you don't I'll still make my one but maybe you can save me some time...... (meaning I'll have more time to do the mission editor)

PostPosted: 13 May 2008, 04:03
by link
There are two editors that i know of, i am not quite sure if The Knight/The Barbarian are hiding any from us

Kam briefings editor (TSK)
http://rapidshare.com/files/114511768/kam_briefings_editor.exe.html
and
Text Change (legionairy's) (this may be an old version)
http://rapidshare.com/files/114512014/text_change.exe.html

I am not aware of anymore
Good luck!

PostPosted: 13 May 2008, 08:06
by Merchator
Yes, The Knight/The Babarian got one. But it's not public. They already told us about it and said, that they won't publish it, even if we ask nicely :shock: The Knight told us that you can add briefings with this tool. But I'm not sure if I remember this correctly.

The idea of a lib.-files editor is good! Hopefully you can edit the WHOLE briefings/texts with it :wink:

LIB Decoder version 0.5 Released!

PostPosted: 13 May 2008, 08:31
by Lewin
Hi Everyone!
It was WAY easier than I thought it would be!!! Here is version 0.5:
http://lewin.namsys.com.au/kam/downloads/LIBDecoder-0.5.zip
It doesn't look pretty yet and it doesn't have any nice features.
However, it will edit ANY string in ANY lib file, TPR and TSK, setup.lib and text.lib!
I've only tested it with my English version so please try it with German, Dutch. etc. and let me know how it goes. (especially with umlauts and other non standard English characters)
It is possible that there is a problem when you add newlines, i haven't tested it. Just to prove it is working, here's a little screenshot of the KaM menu.....
Image
Look familiar? No? :wink:
Features planed:
- Basic functions such as save as, undo, search, etc.
- Categorizing strings (e.g.. Menus, briefings, in game messages)
- Make the GUI look/work nicer
Please suggest other things

I really can't understand The Knight. I kind of understand him not want people to change the original maps, but what harm is there in editing the text?? It will allow people to create custom messages in their campaigns, make new translations, and many other wonderful things. I cannot see how it would cause any harm.
Lewin.

PostPosted: 13 May 2008, 09:07
by Thunderwolf
Looks nice...

I will give it a try when I get home.

LOL. Maybe The Knight doesn't want anyone editing the original texts...

PostPosted: 13 May 2008, 09:24
by Merchator
HEHE, jsut tested it, works nice^^
Haven't found any bugs yet!

PostPosted: 13 May 2008, 13:41
by MrVV
Hey thats a nice tool you have there!
And yes, no bugs found yet!!

PostPosted: 13 May 2008, 14:22
by harold
Cool!
You rule Lewin!
If you add extra strings, are they usable in missions or does KAM only load as many strings as it expects to be there?

PostPosted: 13 May 2008, 15:06
by The Dark Lord
That's fast! I will try it soon! :)
Text Change (legionairy's) (this may be an old version)
http://rapidshare.com/files/114512014/text_change.exe.html
This is an old version indeed. This is the ''new'' version: http://www.baswilbers.nl/text_change2.exe
The old version has a bug which makes the program useless. I'm currently using this one. It works, but is not very handy. And, as Lewin already said, I can only change setup.lib with it.
Maybe Legionary has written some more on the Dutch forum? (I can't read Dutch so please translate it to English) If you can help me at all please do.
http://kam.vanmeijeren.nl/forum/viewtopic.php?f=8&t=809&st=0&sk=t&sd=a&start=15 This is the topic about it (only the posts dating of 03 feb and more). I do not think there is usefull information to translate.

I have a suggestion.
Because I already did some editing, I know what the most difficult is: finding where a sentence ends. Can you make it so that when I reached the limit, your editor will automatically change to a new sentence (or at least warn me)?
At the moment I just had to try, to try, to try and to try. That is even more annoying than you think, because the change of something in a briefing only shows up if you restart KaM (not always, most of the time). :?

PostPosted: 13 May 2008, 17:35
by MrVV
I was talking to The Dark Lord and he said he wanted to make custom in game messages for his campaign but he couldn't as there is no full LIB file editor.
@The dark lord: You should also make some sound briefings.
I found the first two, but i think it's "text to speech"
http://rapidshare.com/files/114649156/TNLBriefing.rar
Sorry for my english, but i try my best :?

Sorry for posting it here, but i can't find a thread about TNL

MrVV

PostPosted: 13 May 2008, 23:54
by Lewin
Hi,
As I said before, this is a feature free release.
@Harold: I've no idea, but if that does work then it will cerenaly be a feture in the next release. The number of strings is loaded from the header of the file so KaM will expect them.
@The Dark Lord: Ok, I'll add auto sentace ending for ingame messages and briefings.
That's fast!
Yes, I thought it'd take ages to decode the file but as it turned out it was easy! It only took 1 and a bit days.
I think you should read out the briefings, but read it yourself, don't use text to speach!
Bas wilbers editor is not very useful.
I'll have a new version ready for you soonish, but I'm a bit busy this week. (so maybe on Friday)
Keep suggesting things!
Lewin.

PostPosted: 14 May 2008, 05:21
by Krom
Hi,

Interesting tool :)
I shall read all KaM texts now :lol:

Tree-view would be good, I see you like tree idea in all. Search-Replace-Etc. will be nice addon aswell. Also it may be some sense to add a filter - so to display only strings with given word, I'm not sure.

In text.lib in the end strings there are yet undisplayed characters shown as small squares. Take a look in there please.

P.S. I wonder if there are unused modules in your project, exe file is whole 1.6mb big. Usually that kind of app takes ~400kb.

EDIT: Russian localization of TPR uses unicode texts, thus it won't work with the tool :( Do you think you could add unicode support?

PostPosted: 14 May 2008, 05:50
by MrVV
I think you should read out the briefings, but read it yourself, don't use text to speach!
Ok, i don't use text to speech next time....

MrVV

PostPosted: 14 May 2008, 07:13
by Thunderwolf
it only opens text.lib...
when i try to open setup.lib it says you risk data corruption or something like that.

It looks nice, but with me it starts up at the lower-right part of the screen, which makes me have to move it...

PostPosted: 15 May 2008, 08:31
by Lewin
Hi,
It looks like there are a few more bugs than I thought. :wink:
Tree-view would be good, I see you like tree idea in all. Search-Replace-Etc. will be nice addon aswell. Also it may be some sense to add a filter - so to display only strings with given word, I'm not sure.
Yes, I like tree views. It also means that I can add sections to it later. I will do a search, and maybe a replace. A search like you mean would probably be easier to use so maybe I'll do that.
In text.lib in the end strings there are yet undisplayed characters shown as small squares. Take a look in there please.
I will. Maybe they are carriage return/line feed or something, I never really worked out how they do them.
P.S. I wonder if there are unused modules in your project, exe file is whole 1.6mb big. Usually that kind of app takes ~400kb.
No, there are no unused units, it is just the way Lazarus works. EXE's are far bigger than they are in Delphi, even after unlinking them. (striping) If you start a new project and the click build without adding anything then it is still well over 1MB. I guess that's what you get for a free programming language. :wink:
Russian localization of TPR uses unicode texts, thus it won't work with the tool. Do you think you could add unicode support?
Yes, I will try. This would happen with Polish too. Please send me your two Russian LIB files so I can test it.
it only opens text.lib...
when i try to open setup.lib it says you risk data corruption or something like that.
It looks nice, but with me it starts up at the lower-right part of the screen, which makes me have to move it...
I've got no idea why it won't open your setup.lib. Please send it to me so I can do more tests. I forgot to set the property to make it auto center, I'll do that too.

Expect a new version soon with hopefully all of these bugs fixed.
Lewin.