Reverse

Buriko/Ethornell - Inside

Time ago I told that I will check the possibility to apply old Hirameki translation to new Eve Remake by El Dia. When I told that I did not though that there could be any problems - Buriko is used by game developers for years, there are lot of conversions by MG, so all the tools should be ready and I just need to extract data from both releases and mix them together, right? Wrong.

After checking the web I found out, that there are just a few tools - by xupefei and by kingshriek, which deal with the scripts. I extracted data from .arc files using the script I wrote (you can see the link in downloads or in this post in the bottom), but after that I saw that there files inside are compressed, so instead of writing a new depack tool I just used arc_unpacker by rr- (great all-purpose extract tool, probably I could extract from arc files with it as well, but as I already wrote my own…).

My extracted packed files (titled as DSC Format 1.00 inside) were successfully extracted and revealed, that script files are BurikoCompiledScriptVer1.00. Basically I supposed that everything will go smoothly from here, but unfortunately I did not have anything to compile xupefei tools and kingshriek tool did not worked here.

After that I had no other choice but to start digging into file format… Yeah… Well, what can say - each Buriko game have its own set of unique bytecodes, which seems could be added or removed. So all you can do is to write a depacker for script of some particular game only. Another game, made in Buriko, most likely would have all the commands coded with different bytecode.

So only way is to depack bytecode the way kingshriek does - so not in real commands, but like:

Position D:\BURIKOScriptSystem\EVE_burst_error_A\Script\100_kojiroh\a01.bsb 194
PushDword 1
PushDword 1
PushDword 0
PushDword 0
PushString ドテッ。
call OutputLine
Position D:\BURIKOScriptSystem\EVE_burst_error_A\Script\100_kojiroh\a01.bsb 196
PushString eve_21
PushDword 0
PushDword 0
PushString bgmPlay
_function_1C
Position D:\BURIKOScriptSystem\EVE_burst_error_A\Script\100_kojiroh\a01.bsb 198
PushDword 1
PushDword 1
PushDword 0
PushString 小次郎KojirohAmagi
PushString んくっ‥‥ん‥‥。
call OutputLine

That’s not very good-looking, but enough for me to figure out the flow of the game.

Another problem here is that I do not really need to redo whole script - I just need to change the textes. Unfortunately, Buriko author decided to completely skip the offset table, pointing to text placement and instead just encoded the text line numbers. This is probably okay for him, but not good for me as a reverser, because to find all the pointers to text I would have first to extract whole script file :)  As you can see on previous example, I already did that, so now I need to create a tool which would extract that file into something editable and after combine it back into a file, which the game can read.

…

Probably someone could ask - you just speak about extraction, what about putting it back? Yes, indeed, it is required to write a compressor into that DSC format and after an .arc file creator from these files… But, after some code checks I found out, that Buriko first checks the current directory, if it could find a file there, and if yes - it loads it directly. So there is actually no need to put all these files into .arc or compress them - engine loads them right from the game directory :) At least one less hassle.

So, that’s how it goes with Eve and Buriko. Lets see, if I can put this for some use later…

 

Files: BGI ARC extract (ZIP)