Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
Krater (PC)
-
kalleoskar
- beginner
- Posts: 35
- Joined: Thu Dec 25, 2008 3:17 pm
- Has thanked: 12 times
- lostprophet
- mega-veteran

- Posts: 202
- Joined: Wed Apr 07, 2010 7:38 pm
- Has thanked: 35 times
- Been thanked: 7 times
Re: Krater (PC)
Game works with modified language file (I tried it with Steam).
On a sidenote: watch carefully, what you translate! As of now, I found
that SHOULD NOT be translated, since it is part of a variable. If you translate it, on some weapons it will screw up the description.
On a sidenote: watch carefully, what you translate! As of now, I found
Code: Select all
[7]
WeaponsHungarian translator | Previous translations: http://lostprophet.hu
-
hhrhhr
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: Krater (PC)
this file contains only strings for localization, variable names are not there.lostprophet wrote:since it is part of a variable. If you translate it, on some weapons it will screw up the description.
- lostprophet
- mega-veteran

- Posts: 202
- Joined: Wed Apr 07, 2010 7:38 pm
- Has thanked: 35 times
- Been thanked: 7 times
Re: Krater (PC)
Just try ithhrhhr wrote:this file contains only strings for localization, variable names are not there.lostprophet wrote:since it is part of a variable. If you translate it, on some weapons it will screw up the description.
If you translate the word above (I translated it to Fegyverek), ingame move to cursor on top of a class-specific weapon, and instead of for example: "Medikus weapon", it'll say "sv_Fegyverek".
Hungarian translator | Previous translations: http://lostprophet.hu
Re: Krater (PC)
hi all,
i used the quickbms script of aluigi to unpack one of the files in the data directory, file 46f4455f4676790b (it doesn't process any of the 2 *.stream files), i downloaded the luadec51_2.0_win32_bin.zip file from http://files.luaforge.net/releases/luad ... 32_bin.zip, i used the oggpack script of hhrhhr with it, and it outputs this.
either i'm doing something wrong, or the file doesn't contain any audio data, or both.
i'm interested in the music of the game.
i used the quickbms script of aluigi to unpack one of the files in the data directory, file 46f4455f4676790b (it doesn't process any of the 2 *.stream files), i downloaded the luadec51_2.0_win32_bin.zip file from http://files.luaforge.net/releases/luad ... 32_bin.zip, i used the oggpack script of hhrhhr with it,
Code: Select all
C:\>"C:\lua.exe" "C:\oggpacklua" "C:\Krater\data\46f4455f4676790b_unpacked"Code: Select all
C:\lua.exe: C:\oggpacklua:1: '=' expected near 'numOggs'.i'm interested in the music of the game.
-
hhrhhr
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: Krater (PC)
script 1 - http://nopaste.info/591e95f801.html, save it as "unpack1.bms"xentaxus wrote:i'm interested in the music of the game.
script 2 - http://nopaste.info/039f7ba9ec.html, save it as "unpack2.bms"
step 1:
quickbms.exe -f "*.oggpak" unpack1.bms path_to_exploded_database.db output
all packed oggs will be copied to the "output" directory in the current directory
step 2:
for /r %i in (*.oggpak) do quickbms.exe unpack2.bms %i ogg
all oggs will be unpacked to "ogg" directory
for example, ogg\(e2713844e4f23f47)(8658)\(fae5f25ba0f2d3cc).ogg - start screen theme.
-
hhrhhr
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: Krater (PC)
i'm make some tools for fully automated export/import language files. i hope it will be usefull for translators.
other .bat and .lua not ready for public :) now i'm work on automated font generation. manually we can change all font for russian translation (original fonts do not support cyrillic glyphs):

- go to https://github.com/hhrhhr/Lua-utils-for-Krater/tags, download auto-import-export.zip and unpack it.
- edit _include.bat, change path to game and lang code:
Code: Select all
:: game directory set krater=f:\steam\steamapps\common\krater :: source language set src_lang=eng :: language number (not all known) set src_lang_num=0 :: target language set tr_lang=rus - run step0_convert_localization_to_txt.bat, it convert all localized strings to text files in _work directory. these files can be used as backup of original langs
- now run step1_unpack_lua_scripts.bat, ~1100 scipts are unpacked and decompiled in _script directory. do not pay attention to errors, not all scripts can be decompiled. errors log can be found in _work\unlua_errors.log
- then run step2_export_for_translators.bat, it make _work\for_translate\*.txt.
- now you can start translation. do not touch words like "#cooldown seconds", "#damage_multi{percent}", "#cast_time", etc. in result you get this:
[7f18e972] - this is unique string hash, do not modify!
Code: Select all
[7f18e972] id = ability_cast_area_slow_optional_text eng = It's a trap! rus = Это ловушка!
id - ingame ID of string, where hash = MurmurHash(id)
eng - original text
rus (or your lang) - translated text - when you done (or partially done), put all translated files (not necessarily all) in _work\translated directory and...
- ...run step3_import_translated.bat. check what file _work\game_strings_(your_lang).txt exist, this file contains only translated strings.
- and finally run step4_merge_lang_save_bin.bat and look on file _work\game_strings.(your_lang).bin. copy it as krater\data\64\6477 (in v1.0.8) and test in the game.
- if you don't backup your original 6477, then empty _work\game_strings_(your_lang).txt (make it 0 bytes) and run step4_merge_lang_save_bin.bat again. this file is not binary equal because i'm clean some tail whitespaces, otherwise it is fully correspond to the original.
other .bat and .lua not ready for public :) now i'm work on automated font generation. manually we can change all font for russian translation (original fonts do not support cyrillic glyphs):

- lostprophet
- mega-veteran

- Posts: 202
- Joined: Wed Apr 07, 2010 7:38 pm
- Has thanked: 35 times
- Been thanked: 7 times
Re: Krater (PC)
Need update on the tools, a huge update came out this week and since then I'm getting this:

I have the game, so if you need the latest files (if you don't have them) please PM me.
Thanks in advance.

I have the game, so if you need the latest files (if you don't have them) please PM me.
Thanks in advance.
Hungarian translator | Previous translations: http://lostprophet.hu
-
Ekey
- M-M-M-Monster veteran

- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Krater (PC)
LuaJIT can with simple commands. -bl (Byte Code + Listing)
Code: Select all
luajit -bl megacool.lua megacool.decMy Github repo
-
hhrhhr
- advanced
- Posts: 62
- Joined: Thu Mar 18, 2010 7:02 am
- Has thanked: 1 time
- Been thanked: 20 times
Re: Krater (PC)
i know. but, old decompiled Lua-bytecode:luajit -bl...
Code: Select all
BootCampArchetypes = {}
BootCampArchetypes.norrmalm = {
price = {
[2] = 10000,
[3] = 20000
},
name = "bootcamp_norrmalm"
}
BootCampArchetypes.bootcamp = {
price = {
[2] = 3000,
[3] = 20000
},
name = "bootcamp"
}Code: Select all
-- BYTECODE -- boot_camp_settings.lua:0-24
0001 TNEW 0 0
0002 GSET 0 0 ; "BootCampArchetypes"
0003 GGET 0 0 ; "BootCampArchetypes"
0004 TDUP 1 4
0005 TDUP 2 2
0006 TSETS 2 1 3 ; "price"
0007 TSETS 1 0 1 ; "norrmalm"
0008 GGET 0 0 ; "BootCampArchetypes"
0009 TDUP 1 7
0010 TDUP 2 6
0011 TSETS 2 1 3 ; "price"
0012 TSETS 1 0 5 ; "bootcamp"
0013 RET0 0 1-
Ekey
- M-M-M-Monster veteran

- Posts: 1823
- Joined: Wed Mar 31, 2010 6:54 am
- Has thanked: 92 times
- Been thanked: 1058 times
Re: Krater (PC)
LuaJIT can decompile only with bytecode. Here my old tut for manualy bytecode decompiling from Legend of Grimrock. Maybe useful for you.
My Github repo
