Quantcast
Channel: Ruby scripts for modding/removing the censors : senrankagura
Viewing all articles
Browse latest Browse all 9

Ruby scripts for modding/removing the censors

$
0
0

I wrote some scripts over the course of a day to unpack and repack the archives SV uses. The format's a little different from Hyperdimension Neptunia U's CAT archives but they're both extremely simplistic archive formats, so whatever.

So I have one script to unpack and repack CAT archives, and another that automatically goes through the archives containing the censors (chibiheads and light beam) and blanks out their textures.

As you might expect, you need to have Ruby installed. The version I wrote for was 1.9.3, which is apparently quite old at this point, but I don't know if it'll work on newer or older versions. EDIT: 2.3 supposedly works. EDIT: You're going to want to make sure you let the installer associate .rb files with the interpreter. Should be a checkbox somewhere in there.

To remove the censor, drop remove_censor.rb into the directory containing Application.exe and run it. It will automatically make backups of the old CAT files. The files affected are 2D\act_2d_plXX.cat (from 00 to 21), which contain the censor heads for their respective characters, and sfx\mosaic.gxt, which is an archive containing the awfully-convenient beam of light.

catpack.rb requires a bit more effort. You'll need to pass arguments via the command line.

Usage: catpack [unpack/repack] [path_to_archive] 

You can use "u" and "r" as shorthand for unpack and repack.

Unpacking an CAT archive will dump all files in it into a directory located in the archive's folder. GXT archives (e.g. most textures) inside the CAT archive will be unpacked as well. Other/unknown types of files (TMD, for example) will simply be dumped raw, using a guess as the filename. Note that not all archives will successfully unpack; some have a different format. Additionally, some archives contain a different type of GXT; extraction will fail for those archives, such as the texture archives in dlc00\nnj.

Repacking an archive requires the presence of the folder created through unpacking, so do that first. The script will reconstruct GXT archives using their respective textures inside the unpacked folder, and other types of files will be reimported. Like with the censor removal, the script will create a backup of the affected archive before altering it.

e.g. You dump catpack.rb into the game's root directory, and run "catpack u model\player\std\std12_00_tex_hi.cat". This extracts all of Yozakura's standard outfit's textures into the folder "model\player\std\std12_00_tex_hi\". After doing whatever edits you want (I would suggest keeping the DDS format the same when you save the file; I don't know how the game handles different formats), you run "catpack r model\player\std\std12_00_tex_hi.cat", and all of the contents of the folder are reimported back into the CAT archive and will be reflected in-game.

You can expect bugs, mediocre code, and poor to nonexistent error-checking; I'm not well-versed in Ruby specifically, and I didn't put an enormous amount of effort in, here.

remove_censor.rb: http://pastebin.com/TWMTYwuq
catpack.rb: http://pastebin.com/0jpbTPHs

submitted by /u/catpack_guy
[link] [comments]

Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images