Dracu-riot tools v1.0 (2012-04-28)

Here are some tools to create a patch file for Dracu-riot
Requires python3 - see http://www.python.org/
Requires imagemagick - see http://www.imagemagick.org (image tools only)

To dump the script files, first copy the .scn files into the scriptfiles directory.
These can be found in both scn.xp3 and patch.xp3 (from the official v1.10 patch).
Use either the krkrxp3 tool included or arc_conv/xp3dumper to extract the archives.
For krkrxp3 use, see the example krkrxp3_example.bat file.

After the .scn files are in the scriptfiles directory, run dump_scripts.bat to dump them out to .txt files.
dump_scripts.bat is setup so that it will not overwrite any .txt files in the scriptfiles directory to safeguard against overwriting.
Note: The scenelist.txt included is a special case that isn't handled by the script dumper. This file contains the text for choices.

Translations are to be done in the .txt files.
Put the translations on the lines that begin with <> brackets.
Don't touch the tags enclosed by the <> brackets, these are needed for insertion.
Comments are done by placing // at the beginning of the line.
Comments are ignored by the inserter so feel free to use them wherever.

To insert the scripts, run insert_scripts.bat.
It will insert all the .txt files in the scriptfiles directory into the .scn files.
The new .scn files will be in a subdirectory called inserted.
Insertion will only happen if the .txt files are newer then the inserted .scn files (works like a Makefile).

To dump UI images, run dump_ui_images.bat.
It will extract images from the .psb files in the images\_input directory.
This will create a folder structure inside the images directory where the images will be dumped as .png files.

Once the images are dumped, any images that do not need to be modified can be deleted.
However, the folder structure itself needs to be preserved for the image inserter to work.

To insert the UI images, run insert_ui_images.bat.
This will insert the images in subdirectories of the images folder to .psb files.
The output .psb files will be place in the images\_output directory.

To make the patch, copy any/all modified files to the patch directory and then run make_patch.bat.
The script is setup to create a patch2.xp3 as the official patch uses patch.xp3.

Included in the patch folder are .tjs files that enable English word-wrapping.

The krkrxp3.exe tool included can extract/create archives the Dracu-riot can use.
Feel free to use it to extract other resources (run it with no arguments on the command line for help).

For comments ,questions, or error reports - see kingshriek on IRC at irc.rizon.net.
