gemot encubed  

Go Back   gemot encubed > Gemot > Production & Help

Production & Help For discussions regarding production aspects, especially localisation, of visual novels and related games.

Reply
 
Thread Tools Display Modes
  #31  
Old 2008-11-25, 01:24
Firestorm717 Firestorm717 is offline
Visitor
 
Join Date: Oct 2008
Location: USA
Posts: 7
Send a message via MSN to Firestorm717
Default

Nope, like you said, it doesn't work because the information about the memory location is not updated in the .sco files, so the game won't start. Even if I do a byte-by-byte replacement, it doesn't work.

Out of curiosity, how is the information stored in the old versions of the engine? The one of this game is System3.9 ver 5.43
Reply With Quote
  #32  
Old 2008-11-25, 13:27
Toaster Toaster is offline
Member
 
Join Date: Nov 2008
Posts: 15
Default

Is it possible to load the decrypted game files into the AliceSoft SDK as a new project?
________
marijuana pictures

Last edited by Toaster; 2011-02-07 at 04:48.
Reply With Quote
  #33  
Old 2008-11-25, 16:12
Toaster Toaster is offline
Member
 
Join Date: Nov 2008
Posts: 15
Default

Quote:
Originally Posted by Firestorm717 View Post
Nope, like you said, it doesn't work because the information about the memory location is not updated in the .sco files, so the game won't start. Even if I do a byte-by-byte replacement, it doesn't work.
If you are doing byte by byte replacement and still running into trouble then you are probably either a) overwriting a special characters in the beginning/end of the string or b) accidentally replacing double byte characters with an equal number of single byte characters (resulting in fewer bytes overall.)
________
make a vaporizer

Last edited by Toaster; 2011-02-07 at 04:48.
Reply With Quote
  #34  
Old 2008-11-25, 18:08
Firestorm717 Firestorm717 is offline
Visitor
 
Join Date: Oct 2008
Location: USA
Posts: 7
Send a message via MSN to Firestorm717
Default

Ah, there we go. Yeah, I overwrote something I shouldn't have using the Find and Replace all feature...well, next step is to figure out how to get things to work with variable length strings. And for that, I actually need to understand the structure of the .sco files.

I couldn't get it to work with the SDK because the SDK requires you have the .adv files, which are a combination of the .sco files and the referenced lines in System39.ain...unfortunately, I don't understand how the lines are referenced, since it's not a simple offset value, so I can't write a proggie to put the two together x_X. Maybe I'll just work on the .ald packer for the images instead.
Reply With Quote
  #35  
Old 2008-11-25, 22:14
Toaster Toaster is offline
Member
 
Join Date: Nov 2008
Posts: 15
Default

Too bad the game editor doesn't handle these formats. Maybe there is some documentation on these files on one of the AliceSoft fan forums. I don't think we need that much information to edit the text files - just enough to be able to find and recode the string pointers.

I found my mistake with the Crass decoder - needed to decode the entire game directory and not just the ain file. In the 4.0 engine, the ain file seems to contain all of the scripting info => script, game text, calls to engine etc. The story text appears to be lumped together in a giant table toward the end of the file - I have no idea how the story text is indexed though - i suspect the file needs to be decompiled, edited, and recompiled to make an significant changes. ie. ain -> ain + XML based string file -> translated XML string file + old AIN -> new AIN ..... if that makes any sense.

btw - I am using the FlexHex trial to analyze the hex unicode. Anyone know a freeware unicode hex editor?
Reply With Quote
  #36  
Old 2008-11-26, 00:00
Toaster Toaster is offline
Member
 
Join Date: Nov 2008
Posts: 15
Default System35 Interpreter

BTW - there is an open source System35 game interpreter by Masaki Chikama, here -
http://8ne.sakura.ne.jp:20008/chika/unitbase/xsys35/
It may be able to parse the system39 files you are working with - in which case you can use or reverse engineer the source.

More details can be found in this post -
http://www.hongfire.com/forum/showthread.php?t=11399
(the poster also has some unpublished tools that may help)
________
CN250

Last edited by Toaster; 2011-02-07 at 04:48.
Reply With Quote
  #37  
Old 2008-11-27, 23:13
Firestorm717 Firestorm717 is offline
Visitor
 
Join Date: Oct 2008
Location: USA
Posts: 7
Send a message via MSN to Firestorm717
Default

Hm, will look at it in more detail when I get the time. I recommend MadEdit for more flexible control of character encoding when you're editing - it has full east Asian language support and you can switch quite easily.
Reply With Quote
  #38  
Old 2008-11-29, 00:07
Toaster Toaster is offline
Member
 
Join Date: Nov 2008
Posts: 15
Default

Thanks, MadEdit is great.

Also, I checked out AGTH -
> http://www.hongfire.com/forum/showthread.php?t=59189
With AGTH there is no real need to translate the story line of most games. (That is, assuming one can read a little Japanese to start with.) That pretty much leaves the background images.
________
vapor lounge

Last edited by Toaster; 2011-02-07 at 04:48.
Reply With Quote
  #39  
Old 2008-12-04, 16:01
Unregistered
Guest
 
Posts: n/a
Default Repack Crass

Does anyone have the low down on how to invoke the Crass re-packer? It seems to have become recently unsupported pending upgrades to crass.
Reply With Quote
  #40  
Old 2008-12-04, 16:37
Asceai's Avatar
Asceai Asceai is offline
Posts way too much
 
Join Date: Mar 2007
Posts: 1,413
Default

Quote:
Originally Posted by Toaster View Post
With AGTH there is no real need to translate the story line of most games. (That is, assuming one can read a little Japanese to start with.) That pretty much leaves the background images.
i think you might be mistaken
__________________
www.erogenews.com
Reply With Quote
  #41  
Old 2009-01-03, 09:02
KaioShin KaioShin is offline
Regular
 
Join Date: Mar 2007
Posts: 69
Default

Quote:
Originally Posted by Unregistered View Post
Yes, I know of that tool. The script dumping portion of the tool only works with version 1.3 of the game since it looks like the tool is a quick hack and it checks for hard-coded values defined in the program. You can get it to work with 1.4 but there are a lot of caveats that make it more trouble than it's worth. Other parts of the tool work such as .ain encryption and decryption and archive packing.

Well enough of that, images speak louder than words:


Where can I get this tool? I searched for a full day but couldn't find it. The fact that it's buried on some Chinese message board could propably be a part of the problem :P I know crass can extract at least the CGs, but it can't put them back together. Or is there a way to make the game load unpacked files instead of the ones from the archieve?
Reply With Quote
  #42  
Old 2009-01-03, 20:51
Toaster Toaster is offline
Member
 
Join Date: Nov 2008
Posts: 15
Default Crass Repacker

I would love to see an answer to your question as well. Last I checked the repacker would normally have been part of the latest crass distribution -- http://tieba.baidu.com/f?kw=crass -- but was temporarily unsupported. It may be possible to find an older version of crass on baidu that contains the repacker, but it would only support sengoku rance up to version 1.03. If a newer version is out I assume it supports 1.04.

btw - I found Google's translation tools helpful in navigating baidu.
http://translate.google.com/translat...ate0=zh-CN|en|

Last edited by Toaster; 2009-01-03 at 20:55.
Reply With Quote
  #43  
Old 2009-01-04, 01:09
KaioShin KaioShin is offline
Regular
 
Join Date: Mar 2007
Posts: 69
Default

I think you misunderstood. The anonymous guy who posted those pictures said the tool was from the author of crass, not that it was the tool crass. Afaik the repacking portion of crass is only a planned feature for the future. Even if you had a version that included assage (the repacking part) there wouldn't be any functions for script editing, but the guy clearly had a tool that could do so. I looked at the unpacked AIN file crass created and found the text inside it, the problem is finding out how the text is indexed. The file is pretty complex with apparently all game scripting inside it too, so it's not just a plain text file.

There are two parts in the tool chain missing currently - one to extract or edit the text inside the AIN file and one to repack the AIN and ALD files.
Reply With Quote
  #44  
Old 2009-01-04, 12:22
jtle
Guest
 
Posts: n/a
Default

I guess I should log in to attach things, meh.
Alright. I'll explain.
There's a tool written by the creator of crass for System 4.0 that does packing/repacking of .ALD files, encoding/decoding of .AIN files and dumps the script from it.

In the AIN file, there two things that designate where the text is. One is a "MSG0" token that marks the ADV text. The other is a "STR0" token that marks everything besides ADV text, like skill names, people names, battle quotes. Everything that's not the story and not images belong in the STR0 section. You get the idea.

However, I believe that the creator did a quick and dirty job on the tool. Since it doesn't work for some sys4 games like Rance 6.

When decoding the .ain file, the tool outputs 3 things: 2 text files which are the script dumps and a decoded dump of the ain file. Also, the tool does not completely work for v1.04 of Sengoku Rance; it works up to v1.03 (i.e It looks for specific lines in the script to do insertion and specific line counts).

With v.104, the tool will decode/encode the .ain dump fine but the resulting script dump is a mess. Lines are missing when you compare a dump of v1.04 and v1.03 and thus, the line count that the inserter looks for is off. You can get it to work with a little trickery like copying the missing lines from v1.03. This is a very crappy method obviously since something somewhere will break soon enough.

Next.
ALD archives are the easier part to deal with. Both the sys4-crass tool and the official sys4SDK from Alicesoft have utilities to pack ALD archives.

However the sys4-crass tool does unnecessary "converting" when unpacking the archives. For example, when unpacking the GA (graphics) archive, the tool converts the QNT files into BMPs which is pretty stupid since you lose the transparency. And when repacking, it looks for the BMPs and not the original QNT files again, pretty stupid since you will end up with a 3gb+ archive that is not usable in game.

To counter this, extract the QNTs with suzie or something else then use a tool called QNT2BMP, attached below, to convert to 2 BMP files.

One BMP is supposedly the transparency and the other is the graphic.

Once again, not everything is so easy. The transparency extraction in the tool is messed up and gives some nasty results with regards to Sengoku Rance. So therefore, the only images you can edit are the ones that have no transparency.

Then after you have edited your BMPs you pass them through a BMP2QNT converter provided by the sys4SDK from Alicesoft.

There are two ways to repack the ALD archives. One way is to use the sys4SDK packer which is pretty good since it's an official tool that works but, you will need to create an index file for the packer which is pretty tedious.

The second way is to use the sys4-crass tool to repack. The thing I like about this is that you can generate an index file for repacking. Note that the index files for the sys4SDK tool and the sys4-crass tool are not the same at all so you cant generate one from the sys4-crass tool and use it with the SDK tool. So after you have generated an index file, you will have to rename the QNTs you extracted and edited to .QNT.BMP because the packer looks for that extenstion. Yeah, stupid, but it works.

With sound archives, things are easy since the sys4-crass tool extracts them to WAVs which are what they are supposed to be. But then again, you dont need to do anything to the sound files anyways. Hahaha....

tl;dr ver:
decrypting/encrypting AIN files = good!
resulting script dump = bad!
repacking ALD archives = good, sort of.
editing images = meh

Possible solutions:
Remember how I said that the AIN encoder/decoder gives you 3 files? 2 text files and the whole decoded AIN dump?
So to completely bypass the horrible script dump you just use the decoded AIN dump and extract the script yourself with a custom tool. Then insert the text back into the decoded AIN dump yourself, again with a custom tool. Then encoded the dump with the sys4-crass tool.

For images, thankfully the QNT2BMP tool comes with source so fixing the transparency extraction should be easy? (I have not worked with image formats at all lol)

So, I think that should completely explain everything I know. If you want to try it out yourself, I've attached everything mentioned except for the SDK which you can find yourself.
Attached Files
File Type: zip System4_CraSS_Ver1.30.zip (95.7 KB, 642 views)
File Type: zip QNT2BMP.zip (109.8 KB, 660 views)
Reply With Quote
  #45  
Old 2009-01-04, 12:49
KaioShin KaioShin is offline
Regular
 
Join Date: Mar 2007
Posts: 69
Default

Awesome, you really helped me a great deal with this. I spent 2 days searching for this but couldn't find it. I'll put this to good use. If end up writing a new tool for something after all I'll make sure to make the information publically available.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing Liar-soft's games Unregistered Technical Issues 0 2011-09-09 10:31
Alice parade :D fujifruit General Discussion 3 2010-06-17 23:49
Translation tool - kanjilookup Apples Production & Help 4 2008-11-24 11:45
NekoNeko Soft Fanclub? GreatSaintLouis General Discussion 0 2006-05-10 12:15
Alice Soft / Windows Translation Questions Blue Lemma Technical Issues 4 2005-11-23 08:46


All times are GMT -8. The time now is 04:15.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.