TesterTesterov / AI5WINArcTool

Dual languaged (rus+eng) tool for packing and unpacking .arc archives of AI5WIN./Двуязычное средство (рус+англ) для распаковки и запаковки архивов .arc AI5WIN.
GNU General Public License v2.0
7 stars 1 forks source link

Error #1

Closed MinscyBubu closed 2 years ago

MinscyBubu commented 2 years ago

Hello! When i try to decompile files (.arc) from Shangrlia i get this error:

imagen

Could you give me a hand with that?

TesterTesterov commented 2 years ago

Hello.

Stop, "decompile"? .arc is archive file, not the script one (I am currently working on AI5ScriptTool, but AI5Script much harder then AI6WIN's, so I'll take time). So "extract" would be correct.

And yes, I can help, since I have time now. Still I had not this error, which is strange. Upload the game for me to download and specify with which archive you have the problem.

MinscyBubu commented 2 years ago

Yes, it's the .arc files from https://vndb.org/v3182 visual novel

MES.zip

This is one of the archives (i will upload the entire game ETA: 10 minutes)

TesterTesterov commented 2 years ago

I have seen the archive. Interesting, indeed. Hmm. Seems I have tested with other version of Shangrila. Files of your version has different set of keys, but it does not matter, since my tool hacks them authomatically. Rather, problem is that... Structure of the header itself is slightly different!

I definitely need to see, if your version of the game is really AI5WIN (and so I'm waiting to download the game). If so, I'd need to modify the tool to use one more parameter and also update instructions accordingly. If not, I'll just create yet another archive tool.

MinscyBubu commented 2 years ago

The release it's from the game inside "Elf classics"

Here's the link:

https://drive.google.com/file/d/1uVfvIq_14JFw_P9eM9Wk5jxAtgPHKvWm/view?usp=sharing

TesterTesterov commented 2 years ago

It is indeed AI5WIN. Mine was from Shangrila Multipack. Okay, I'll update the tool soon. I have already figured out how to support it.

TesterTesterov commented 2 years ago

Okay, done, @MinscyBubu. Try 2.0 version (since the update was pretty big): AI5WINArcTool 2.0.

MinscyBubu commented 2 years ago

This work perfect! Would be very nice if you can deal with the font edit after you finished with script tools (for other translations aside english lang!)

thanks!

TesterTesterov commented 2 years ago

Well, I have two tools for mes scripts, actually -- mesScriptAsseAndDisassembler for Silky Engine script and AI6WINScriptTool for AI6WIN scripts. But they won't work with AI5WIN scripts. They are very different.

Will I make AI5WINScriptTool? I am currently working on it, actually. But... alas, I cannot release it as soon as AI6WINScriptTool. You see, both AI6WIN and Silky Engine scripts are quite easy to (dis)assemble. They also are close enough, so after hacking Silky Engine's I dealed with AI6WIN's in a hour of work or so. This is not the case with AI5WIN. Yes, I was actually surprised that not only all opcodes are different, it also contains full-fledged "complex structures system" (or something I call that). It would be one thing if it could be disassembled as plain opcodes, not as structures, but it is also not the case. So I basically need to deal with that. And yes, this is not the end. You see, I looked into MES scripts inside the game you uploaded, and... found out, that they are rather different and has completely different headers! Basically, in addition to all aforementioned, I also need to hack another version and then change my current test version to deal with it (since, truth be told, I was not ready that these versions would be so different). It's not all that bad as scripts of SLG System, but still a pain. I will need some time to create the tool...

(Oops, seems I have answered on deleted question).

Deal with font, you say? Hmm... I'd need to deal with font and breaks, actually, to make it possible to work with translations. Many programmers would say that for it you'd need to hack the exe to change the encoding. But I know other method, actually, which is easy -- just create a "crutchy font" (using, for instance, half-width kana or some symbols like +, -, = and such for symbols which are not Latin) and, while hacking an exe, change the font (it is much easier, a couple of my articles about engines contain it) and "transforming" every string to match that crutchy font. I used this method in numerous Russian translations.

Actually, I just looked in the exe of AI5WIN and, indeed, it should be rather easy to do so.

TesterTesterov commented 2 years ago

@MinscyBubu, I am truly surprised that I could deal with AI5WIN scripts withing so little time. I though it'd take about a week. Scripts of AI5WIN, as archives, are more complicated then AI6WIN's and Silky Engine's, definitely so. I understand now why no proper decompilers&compilers or at least disassemblers&assemblers were done by now. You cannot just properly disassemble "complex structures" (as I call it) as a plain opcodes here. Still it is not as problematic as in SLG System scripts.

Also it is not only the scripts themselves that are hard, there is also a big version difference. I managed to get quite a few games, 6 of them (3 different releases), so I think I supported not all versions. But by now that three would be enough.

Here is the tool: AI5WINScriptTool. Line and message breaks methods are in README of the tool.

Also if you want to make a fantranslation of game on AI5WIN (and also in many engines like AI6WIN, Silky Engine, SLG System, codeX RScript, Stuff Script etc), you may use so-called "crutchy font method". For example, for Russian it is explained in this my article for Russian fantranslations in SLG System along with many other useful data. Do note, you'd need to make a crutchy font yourself, since I have none of them for French.

=== Proofs it works...

0

0-after

MinscyBubu commented 2 years ago

Thank you very much for the support and the font tutorial! I will try to do some translations next year thanks to you!

Aside from this, since you're working with Leaf/Silky plus engine... could be a chance to make tools for Leaf "New" engine? Especifically for this vn @TesterTesterov :

https://vndb.org/v235

Thanks in advance

TesterTesterov commented 2 years ago

@MinscyBubu, I do work with engines of Silky and Elf (actually, it was only accident I've got on AI5WIN and AI6WIN, I wouldn't hack them otherwise), but what about Leaf engine? I did not test any game of Leaf and did not hear about it's engine, so I don't know, what does it use and what formats does it have. Can you give me an example of the formats?

I know only about Aquaplus engine, and Leaf shares the same parent studio with Aquaplus.

Also, my free time soon will become quite little, so I obviously won't be able to hack in such a pace for a while.

MinscyBubu commented 2 years ago

@TesterTesterov Yeah, i'm not sure about that, if is Leaf Engine, Aquaplus engine or a combination of both, i leave to you the "encripted" files (Shizuku Renewal):

https://drive.google.com/file/d/1JRYt55pxNK-OehvJpjEWhwsx6UQ9fW01/view?usp=sharing

The game uses .pak extension :

imagen

That can be opened / extracted with garbro (also, the game reads the file uncompressed, so the "repacking" it's not necessary. The only problem are the scripts files (as usual) which are in .SDT format and the font (fd0 format)

TesterTesterov commented 2 years ago

@MinscyBubu, well, scripts of xlvns (Leat engine) were quite easy. Tool will be ready soon (relatively).

image

TesterTesterov commented 2 years ago

@MinscyBubu, scripts successfully hacked. See XlvnsScriptTool.

MinscyBubu commented 2 years ago

Awesome man! Thank you very much! Will be a chance to deal with the font in the future? That will be awesome! @TesterTesterov

TesterTesterov commented 2 years ago

@MinscyBubu, it is possible, but not guaranteed. I'd need much of time (rough estimation) to actually hack a custom font. But I do not hath this much of time now and won't have in close future.

MinscyBubu commented 2 years ago

Thanks! Will be awesome to have a chance to translate the first VN who started the denpa genre! In any case, thanks for your time, tools and support, cheers to you and stay safe!