event language compiler/decompiler
event language compiler/decompiler
hello
i'm interested in making a compiler/decompiler for the mm7 event language. my goal is to revert back the hex data to some readable (writable) format. i have some progress. unfortunately i need more information on the event opcodes (commands). please look and read what i've written so far in the specification, and if you have some additional information send it to me. the decompiler transforms hex to literal text only yet (code taken from mm8leveleditor). any comments, suggestions or questions are welcome. this msg, the specification and the code are written in a haste and the files are in constant update:
specification
files
i'm interested in making a compiler/decompiler for the mm7 event language. my goal is to revert back the hex data to some readable (writable) format. i have some progress. unfortunately i need more information on the event opcodes (commands). please look and read what i've written so far in the specification, and if you have some additional information send it to me. the decompiler transforms hex to literal text only yet (code taken from mm8leveleditor). any comments, suggestions or questions are welcome. this msg, the specification and the code are written in a haste and the files are in constant update:
specification
files
Last edited by Anonymous on 02 Jul 2008, 07:59, edited 1 time in total.
- motter28218
- Pixie
- Posts: 118
- Joined: 30 Sep 2007
This sounds like a good idea, have you looked on BDJ's blog? He has some tutorials that may help you, I am currently doing a mod for MM6 and I can send you Global.evt that I have parsed out in text and have left notes on the lines of code explaining what they do. There is a slight diff in the op code between 6+7 however, but I'm sure you could figure it out. Let me know.
.
yes, i've already read the tutorials and extracted the useful information from it. I would be grateful if you would send the global.evt file
The most important would be to contact BDJ, but i couldn't. i think he knows a lot. i decompiled the event files from the mod and saw a lot of still unknown (for me atleast) commands, that are not in the original game.
The most important would be to contact BDJ, but i couldn't. i think he knows a lot. i decompiled the event files from the mod and saw a lot of still unknown (for me atleast) commands, that are not in the original game.
- motter28218
- Pixie
- Posts: 118
- Joined: 30 Sep 2007
Re: .
Just PM me with your E-mail and I will send it to you, and yeah, BDJ is definitely the man to talk to, he's helped me alot.zipi wrote:yes, i've already read the tutorials and extracted the useful information from it. I would be grateful if you would send the global.evt file
The most important would be to contact BDJ, but i couldn't. i think he knows a lot. i decompiled the event files from the mod and saw a lot of still unknown (for me atleast) commands, that are not in the original game.
- vladimir-maestro
- Genie
- Posts: 1038
- Joined: 19 Jun 2008
.
updated the decompiler, and put up some new files here: files
in decompiler_orig you find the evt, str, some txt files from the original events.lod and in the dec directory the decompiled files
in decompiler_bdj the same files from BDJ's mod events.lod and the decompiled files
the decompiler works this way: it need some txt files from the events.lod copied into /txt dir, evt files to /evt, and str files to /str. run the compiler with the command java -jar decevt.jar and it puts decompiled files to /dec
there are some errors in BDJ's mod, these errors are fixed and the fixed evt files are in decompiler_bdj directory, and an 'errors' file containing the errors and how to fix them
in decompiler_orig you find the evt, str, some txt files from the original events.lod and in the dec directory the decompiled files
in decompiler_bdj the same files from BDJ's mod events.lod and the decompiled files
the decompiler works this way: it need some txt files from the events.lod copied into /txt dir, evt files to /evt, and str files to /str. run the compiler with the command java -jar decevt.jar and it puts decompiled files to /dec
there are some errors in BDJ's mod, these errors are fixed and the fixed evt files are in decompiler_bdj directory, and an 'errors' file containing the errors and how to fix them
Here are 010Editor files with command I've figured out and some other stuff: http://www.grayface.nm.ru/MMFiles.rar
MMevtInclude.bt - file with all commands definitins.
MM8evtInclude.bt (the most full one), MM7EvtInclude.bt, MM6evtInclude.bt - files with variables definitions.
MMevt.bt - template for .evt files editor
MMevtInLod.bt - template to edit a .evt file inside a .lod. It requires a bit of manual work to place the needed file extracted in the end of .lod archive. The trick allows editing this file right in the .lod without a need to restart the game. Just reload savegame and the new script version will be used. I can explain how to use it if you want.
MMlod.bt - template for .lod files
MMstr.bt - template for .str files
MMevtInclude.bt - file with all commands definitins.
MM8evtInclude.bt (the most full one), MM7EvtInclude.bt, MM6evtInclude.bt - files with variables definitions.
MMevt.bt - template for .evt files editor
MMevtInLod.bt - template to edit a .evt file inside a .lod. It requires a bit of manual work to place the needed file extracted in the end of .lod archive. The trick allows editing this file right in the .lod without a need to restart the game. Just reload savegame and the new script version will be used. I can explain how to use it if you want.
MMlod.bt - template for .lod files
MMstr.bt - template for .str files
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
Yeapvladimir-maestro wrote:Russian too
I just extracted events from MM6-8 and inspected them all. At first, I listed all commands that there are, their default parameters and aproximate structure. There's "Errors" field in the template for this. Then I looked, made experiments etc. Also used information from mm8leveleditor and a few BDJ examples. I haven't inspected BDJ mod yet, only took the way to make a character expert in some skill. I'm sure there are other interesting things in it.zipi wrote:grayface
thanks that was exactly what i was looking for.
may i ask how do you get that information?
i think i can use it in the decompilation too
And I forgot to tell you how files can be edited with these templates. In 010Editor edit a line and replace it with a space to delete it. Replace it with +12 to add a command number 12. Values in strings can be edited too. Or click on cross and edit the fields there, but note that the string then won't be updated automatically, only when you press F10.
I haven't tried to find the place in disassembly, I'm interested about things you've found.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
are you interested in the decompilation process? i'm using ida pro and hex-rays. already found the function responsible for interpreting the evt files. but without knowing the correct structures in the memory, it isn't good for anything.
found an ingame level-debugger (see above).
found some other debugging information:
you can make an mm6.ini file in the game's dir, containing these lines (these are the default values):
[screen]
vx1=8
vy1=8
vx2=468
vy2=351
[settings]
mixerchannels=16
nointro=0
nosound=0
nowalksound=0
nologo=0
nointro=0
[debug]
nomonster=0
startinwindow=0
showFR=0
nodamage=0
nodecoration=0
walkspeed=384
[file]
startmap=out01.odm
[outdoor]
RGBDayTop.r=81
RGBDayTop.g=121
RGBDayTop.b=236
RGBDayBottom.r=153
RGBDayBottom.g=193
RGBDayBottom.b=237
RGBNightTop.r=0
RGBNightTop.g=0
RGBNightTop.b=0
RGBNightBottom.r=11
RGBNightBottom.g=41
RGBNightBottom.b=129
noMist=0
nosky=0
nodecorations=0
nowavywater=0
gridband1=10
gridband2=15
gridband3=25
ter_gamma=0
bld_gamma=0
[mipmapping]
ter_mm1=2048
ter_mm2=4096
ter_mm3=8192
bld_mm1=1024
bld_mm2=2048
bld_mm3=4096
[shading]
dist_shade=2048
dist_shademist=4096
dist_mist=8192
[textures]
sky=plansky1
default=dirt
[debug]
recmod1=1.0
recmod2=1.0
[texmapping]
terrain_subdivsize=16
terrain_subdivpow2=4
building_subdivsize=32
building_subdivpow2=5
[party]
eyelevel=160
height=192
found an ingame level-debugger (see above).
found some other debugging information:
you can make an mm6.ini file in the game's dir, containing these lines (these are the default values):
[screen]
vx1=8
vy1=8
vx2=468
vy2=351
[settings]
mixerchannels=16
nointro=0
nosound=0
nowalksound=0
nologo=0
nointro=0
[debug]
nomonster=0
startinwindow=0
showFR=0
nodamage=0
nodecoration=0
walkspeed=384
[file]
startmap=out01.odm
[outdoor]
RGBDayTop.r=81
RGBDayTop.g=121
RGBDayTop.b=236
RGBDayBottom.r=153
RGBDayBottom.g=193
RGBDayBottom.b=237
RGBNightTop.r=0
RGBNightTop.g=0
RGBNightTop.b=0
RGBNightBottom.r=11
RGBNightBottom.g=41
RGBNightBottom.b=129
noMist=0
nosky=0
nodecorations=0
nowavywater=0
gridband1=10
gridband2=15
gridband3=25
ter_gamma=0
bld_gamma=0
[mipmapping]
ter_mm1=2048
ter_mm2=4096
ter_mm3=8192
bld_mm1=1024
bld_mm2=2048
bld_mm3=4096
[shading]
dist_shade=2048
dist_shademist=4096
dist_mist=8192
[textures]
sky=plansky1
default=dirt
[debug]
recmod1=1.0
recmod2=1.0
[texmapping]
terrain_subdivsize=16
terrain_subdivpow2=4
building_subdivsize=32
building_subdivpow2=5
[party]
eyelevel=160
height=192
MM7 debug mode: MM7_debug.zip
to use it, click on credits and open a blv or odm file.
to use it, click on credits and open a blv or odm file.
some very good news!! with the help of mm8leveleditor, BDJ and GrayFace the commands are 99% translated (soon i will post the new version).
the two next steps are these:
-make a compiler so modders can make their own events
-prepare the next project MM7editor
MM7editor will be an environment for making MM7 mods (and a whole game ofcourse). This is the concept: an interface combining:
-a map viewer (like mm_mapviewer by angel-death, if anyone has some contact with this person please send it to me), for editing the terrain and combine facets with events
-an event editor/compiler (that is not ready yet)
-properties editor (like mm8leveleditor)
i'm looking for some help too, if you have programming skills and interested in this please pm me.
if you have any ideas, opinions or thoughts please post
the two next steps are these:
-make a compiler so modders can make their own events
-prepare the next project MM7editor
MM7editor will be an environment for making MM7 mods (and a whole game ofcourse). This is the concept: an interface combining:
-a map viewer (like mm_mapviewer by angel-death, if anyone has some contact with this person please send it to me), for editing the terrain and combine facets with events
-an event editor/compiler (that is not ready yet)
-properties editor (like mm8leveleditor)
i'm looking for some help too, if you have programming skills and interested in this please pm me.
if you have any ideas, opinions or thoughts please post
- vladimir-maestro
- Genie
- Posts: 1038
- Joined: 19 Jun 2008
good news, i found the author of mm_mapviewer and he sent me the source code of the program. so the time of modding the whole game is near
vladimir-maestro
can you please describe a little bit more, what you would like, because i don't understand it. do you want lod=> xml and xml=>lod? cause i think that's not possible
vladimir-maestro
can you please describe a little bit more, what you would like, because i don't understand it. do you want lod=> xml and xml=>lod? cause i think that's not possible
- vladimir-maestro
- Genie
- Posts: 1038
- Joined: 19 Jun 2008
No, no!
I want to be able fully edit this both formats.
to open LOD file -> extract some files, change them -> import back in LOD. But be able to import\export all kind of files.
The same for XML format. Open it -> extract some files -> import some files.
It is all about monster's sprites!! With 3D acceleration game use sprites from XML file and with programm only - use bitmaps only from LOD file.
I want to be able fully edit this both formats.
to open LOD file -> extract some files, change them -> import back in LOD. But be able to import\export all kind of files.
The same for XML format. Open it -> extract some files -> import some files.
It is all about monster's sprites!! With 3D acceleration game use sprites from XML file and with programm only - use bitmaps only from LOD file.
Oh, it's about HWL, not XML There is a description of format in Russian, but there seem to be no editors for it yet.
I'm very interested in helping you on these tools, but I'm developing WoG, so I don't know.
I'm very interested in helping you on these tools, but I'm developing WoG, so I don't know.
My patches: MM6 MM7 MM8. MMExtension. Tools. Also, I love Knytt Stories and Knytt Underground. I'm also known as sergroj.
Who is online
Users browsing this forum: Google [Bot] and 5 guests