READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Legend of Grimlock [.dat file]

The Original Forum. Game archives, full of resources. How to open them? Get help here.
twisted
veteran
Posts: 100
Joined: Mon Apr 23, 2007 11:25 pm
Has thanked: 2 times
Been thanked: 7 times

Re: Legend of Grimlock [.dat file]

Post by twisted » Wed Aug 22, 2012 3:21 pm

Turned out a single MOV is getting a previous local but now I'm a stuck on another part, I know you said you've only done simple scripts but any idea about how to solve this?


Original:

0001 TGETS 1 0 0 ; "_hud_debuff_blackboard"
0002 TGETS 2 1 1 ; "wounded"
0003 GGET 3 3 ; "GameSession"
0004 TGETS 3 3 4 ; "game_object_field"

My code

0001 TGETS 1 0 0 ; "_hud_debuff_blackboard"
0002 TGETS 2 1 1 ; "wounded"
0003 GGET 3 2 ; "GameSession"
0004 TGETS 3 3 3 ; "game_object_field"

As far as I can tell the values in blue refer to the table index, mine seems to be 1 less which would suggest something gets added to the table inbetween 'TGETS' and 'GGET 'that doesn't get compiled (at least not as its own opcode). my initial thought is something to do with a local (as they dont get compiled as an opcode) but creating a new one and initializing it always adds an extra move/call.

Edit:

So after some investigation and a chat with the luajit guy I worked it out. Heres the code in case anyone is interested:

bytecode

Code: Select all

0001    TGETS    1   0   0  ; "_hud_debuff_blackboard"
0002    TGETS    2   1   1  ; "wounded"
0003    GGET     3   3      ; "GameSession"
0004    TGETS    3   3   4  ; "game_object_field"
0005    TGETS    4   0   5  ; "_game"
0006    TGETS    5   0   6  ; "_game_object_id"
0007    KSTR     6   1      ; "wounded"
0008    CALL     3   2   4
0009    ISF          3
0010    JMP      4 => 0013
0011    KSHORT   3   1
0012    JMP      4 => 0014
0013 => KSHORT   3   0
0014 => TSETS    3   2   2  ; "level"
decompiled

Code: Select all

function PlayerUnitDamage._set_debuff_blackboard_fields(arg1)
local a = arg1._hud_debuff_blackboard
local b = a.wounded
b.level = GameSession.game_object_field(arg1._game,arg1._game_object_id,"wounded") and 1 or 0
....more code
End

User avatar
XRaptor
mega-veteran
mega-veteran
Posts: 224
Joined: Sat Jul 12, 2008 4:42 pm
Location: Prague
Has thanked: 6 times
Been thanked: 46 times
Contact:

Re: Legend of Grimlock [.dat file]

Post by XRaptor » Mon Oct 15, 2012 7:38 pm

Ok, because developers decided there are many modders with unofficial tool, they changed DAT file format and encrypted LUA scripts. But no problem, simply use new version of my tool. For old archives use old one.

Legend of Grimrock DAT File Extractor
http://raptor.cestiny.cz/download/legen ... actor.html

7 hashes are unknown for me now, but maybe they are not important :-)

Ekey
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1638
Joined: Wed Mar 31, 2010 6:54 am
Has thanked: 62 times
Been thanked: 821 times

Re: Legend of Grimlock [.dat file]

Post by Ekey » Wed Oct 17, 2012 1:20 pm

Brute-force :P

Moo
n00b
Posts: 16
Joined: Wed Jul 25, 2012 12:04 am
Has thanked: 1 time
Been thanked: 4 times

Re: Legend of Grimlock [.dat file]

Post by Moo » Thu Aug 21, 2014 5:01 pm

Some more:

Code: Select all

07CD054A:assets/cinematics/intro.lua
B1511EAA:assets/cinematics/tutorial.lua
5C030F45:assets/dungeons/menu/dungeon.lua
77AA26B1:assets/shaders/d3d9/crystal_ps_main.d3d9_shader
36A3978F:assets/shaders/d3d9/crystal_ps_main_alpha_test.d3d9_shader
904775CA:assets/shaders/d3d9/crystal_unlit_ps_main.d3d9_shader
41DE517A:assets/shaders/d3d9/crystal_unlit_ps_main_alpha_test.d3d9_shader
2CBFAEB7:assets/shaders/d3d9/crystal_vs_main.d3d9_shader
B5DB8356:assets/shaders/d3d9/crystal_vs_main_normal_map.d3d9_shader
87224DE0:assets/shaders/d3d9/crystal_vs_main_normal_map_skinning.d3d9_shader
6FA75953:assets/shaders/d3d9/crystal_vs_main_skinning.d3d9_shader
C5CAA818:assets/shaders/d3d9/dream_main_ps.d3d9_shader
53D7888E:assets/shaders/d3d9/dream_main_vs.d3d9_shader
04B11187:assets/textures/portraits/dead.tga
8F97B1E6:assets/textures/portraits/empty.tga
3BE16F47:assets/textures/portraits/human_female_01.tga
454DB4B2:assets/textures/portraits/human_female_02.tga
04E30F48:assets/textures/portraits/human_male_01.tga
403E1131:assets/textures/portraits/human_male_02.tga
9C876A12:assets/textures/portraits/human_male_03.tga
C00E2E4B:assets/textures/portraits/human_male_04.tga
67061E0C:assets/textures/portraits/human_male_05.tga
A9C17616:assets/textures/portraits/insectoid_female_01.tga
C8A6E67B:assets/textures/portraits/insectoid_female_02.tga
EB6604D5:assets/textures/portraits/insectoid_male_01.tga
099FD16C:assets/textures/portraits/insectoid_male_02.tga
355BBDA6:assets/textures/portraits/lizardman_female_01.tga
6A1CA1E5:assets/textures/portraits/lizardman_male_01.tga
C8F4A3FC:assets/textures/portraits/lizardman_male_02.tga
2104B83B:assets/textures/portraits/lizardman_male_03.tga
432C0EC9:assets/textures/portraits/minotaur_female_01.tga
F6627ED6:assets/textures/portraits/minotaur_male_01.tga
17C2583B:assets/textures/portraits/minotaur_male_02.tga
BFB243FC:assets/textures/portraits/minotaur_male_03.tga
21ACA7CF:assets/textures/portraits/toorum.tga
28BA5F8F:shaders/d3d9/mesh_geometry_main.d3d9_shader
06B65D05:shaders/d3d9/mesh_geometry_main_alpha_test.d3d9_shader
FC898FEE:shaders/d3d9/mesh_geometry_main_normal_map.d3d9_shader
14157E26:shaders/d3d9/mesh_geometry_main_normal_map_alpha_test.d3d9_shader
3B6FDF3C:shaders/d3d9/mesh_main.d3d9_shader
FF62DAC3:shaders/d3d9/mesh_main_normal_map.d3d9_shader
F950467F:shaders/d3d9/mesh_main_normal_map_skinning.d3d9_shader
D6B5DFBE:shaders/d3d9/mesh_main_skinning.d3d9_shader
D2AF95C4:shaders/d3d9/mesh_material_main.d3d9_shader
A90834E4:shaders/d3d9/mesh_material_main_alpha_test.d3d9_shader
7497C0A4:shaders/d3d9/mesh_notebook_main.d3d9_shader
0492E76B:shaders/d3d9/mesh_notebook_main_normal_map.d3d9_shader
1B6704C7:shaders/d3d9/mesh_notebook_main_normal_map_skinning.d3d9_shader
393B4C26:shaders/d3d9/mesh_notebook_main_skinning.d3d9_shader
2407EF0A:shaders/d3d9/mesh_notebook_opaque_main.d3d9_shader
87C54A51:shaders/d3d9/mesh_notebook_opaque_main_normal_map.d3d9_shader
280EE865:shaders/d3d9/mesh_notebook_unlit_main.d3d9_shader
496A2D3A:shaders/d3d9/mesh_shadow_shadow_dirlight_ps.d3d9_shader
8AC00ECA:shaders/d3d9/mesh_shadow_shadow_dirlight_ps_alpha_test.d3d9_shader
5925E052:shaders/d3d9/mesh_shadow_shadow_ps.d3d9_shader
D9810532:shaders/d3d9/mesh_shadow_shadow_ps_alpha_test.d3d9_shader
9A2806E4:shaders/d3d9/mesh_shadow_shadow_vs.d3d9_shader
8C8A0F66:shaders/d3d9/mesh_shadow_shadow_vs_skinning.d3d9_shader
1670831D:shaders/d3d9/mesh_unlit_main.d3d9_shader
08E01943:shaders/d3d9/mesh_unlit_main_alpha_test.d3d9_shader
Brute force isn't such a good idea, as with such a simple hash function, false positives are too easy to get. Things like "shaders/d3d9/ssao__yfhv9.d3d9_shader" are examples of that, if you ask me.

HijackTheRipper
ultra-n00b
Posts: 8
Joined: Fri Aug 29, 2014 2:28 pm

Re: Legend of Grimlock [.dat file]

Post by HijackTheRipper » Sat Jan 24, 2015 10:08 pm

First post in this year and the most repeated question iiis:

It's currently possible to translate this damn game?

merlinsvk
ultra-veteran
ultra-veteran
Posts: 411
Joined: Mon Oct 27, 2008 12:11 am
Location: Slovakia
Has thanked: 35 times
Been thanked: 117 times

Re: Legend of Grimlock [.dat file]

Post by merlinsvk » Sat Jan 24, 2015 11:06 pm

It is. You "just" have to recreate .lua files from their bytecode form. For example, guys from ZoG made unofficial russian translation.

HijackTheRipper
ultra-n00b
Posts: 8
Joined: Fri Aug 29, 2014 2:28 pm

Re: Legend of Grimlock [.dat file]

Post by HijackTheRipper » Sat Jan 24, 2015 11:16 pm

I already know this decompile technique from this thread.
Maybe my question was out of precession. What I actually mean was
is there are a better solution like these method to edit the localization scripts
of LoG. Another question could be is there are a way to use extern files like
S.T.A.L.K.E.R. with the /gamedata DIR?

merlinsvk
ultra-veteran
ultra-veteran
Posts: 411
Joined: Mon Oct 27, 2008 12:11 am
Location: Slovakia
Has thanked: 35 times
Been thanked: 117 times

Re: Legend of Grimlock [.dat file]

Post by merlinsvk » Sat Jan 24, 2015 11:38 pm

I suppose there is no another way, because they are working on LoG2 with this long and boring method.

HijackTheRipper
ultra-n00b
Posts: 8
Joined: Fri Aug 29, 2014 2:28 pm

Re: Legend of Grimlock [.dat file]

Post by HijackTheRipper » Mon Jan 26, 2015 7:41 pm

really? jesus christ...

edit: byte2lua converter on my to do list

Post Reply