Rcomage

From PS3 Developer wiki
Jump to: navigation, search

Rcomage usage[edit]

RCOedit/RCOmage by ZingaBurga https://github.com/zingaburga/RCOMage , ported to PS3 by kakaroto, https://github.com/kakaroto/RCOMage , official thread http://endlessparadigm.com/forum/showthread.php?tid=19501

Alternative version: RCOmage psdevwiki MOD

Simple Rcomage GUI[edit]

Simple rcomage GUI (dump tab)
Simple rcomage GUI (compile tab)

Command line help[edit]

Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe <function> [options]
  Use 'rcomage.exe help <function>' for help on a specific function

Available functions:

    extract        Extract a resource from an RCO file.
    dump           Dumps structure and contents of an RCO file.

    compile        Compiles a new RCO file from a dump.
    rebuild        Reads an RCO, then writes it out; in other words, it just copies it (and doesn't do it perfectly) - incredibly useful eh? ^^

    vagdec         Converts VAG to WAV.
    vagenc         Converts WAV to VAG.

    vsmxdec        Decodes a VSMX file into a text file.
    vsmxenc        Encodes a (VSMX) text file into a VSMX file.

    help           This help screen.

Available options:

    --quiet        Only display warnings/errors.
    --ini-dir      Specify directory containing Rcomage INI files.
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help extract
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe extract <rcofile> <resource> [<output>] [options]
  Extracts a single resource (image/sound/model/VSMX/text) with label <resource> and saves it to <output>.  If <output> is not specified, will default to using the label as the filename, with no extension. <output> can be '-' meaning stdout.
   * You should supply the '--lang' option when extracting text resources.
   * You should supply the '--channel' option when extracting sound resources.

Options:
  The following options only apply for extracting text resources.
    --lang <lang>     Language of text to extract. [English]
                      You can use a language ID or one of the following:
    ... .. .
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help dump
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe dump <rcofile> <xmlfile> [<resource_dirs>] [options]
  Dumps the structure of <rcofile> in an XML format to <xmlfile>. <xmlfile> can be '-' which means stdout.

Options:
    --resdir <dir> Folder to dump resources into, or '-' for no dumping.
                   Resources will be dumped to <dir>, but you can have custom
                   directories for different resources with the following:
                     --images <dir>
                     --sounds <dir>
                     --models <dir>
                     --text <dir>
                     --vsmx <dir>
                   You can also use '-' as <dir> for the above to disable
                   dumping resources of that type.
    --output-txt   Output separate .txt files for every text string. Each is
                   prepended with the appropriate UCS BOM.
    --conv-gim <ext>
                   Send GIM images through gimconv (Windows only) and
                   convert to type with specified extension (ie png, bmp etc)
    --gimconv-cmd <command>
                   gimconv command to execute; defaults to 'gimconv'.
    --gimconv-flags <flags>
                   Additional flags to pass to gimconv.
    --conv-vag     Convert VAG files to WAV.
    --decode-vsmx  Decode VSMX files to textual format.
    --no-decomp-warn
                   Suppress decompression warnings.

Note: for resource dumping, directories are NOT automatically created. If the specified directorie(s) don't exist, the dumping will fail. However, directories for text languages with the '--output-txt' option will be automatically created if necessary.
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help compile
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe compile <xmlfile> <rcofile> [options]
  Compiles an RCO <rcofile> using structure defined in <xmlfile>. <xmlfile> can be '-' which means stdin.
  Note that the XML file may have linked resources which need to be present for the compilation process to succeed.

Options:
  For the following --pack-* functions, values can be 'none' or 'zlib'.
  --pack-res and --pack-cmp, if specified, override values stored in XML.
    --pack-hdr <val>  How to compress the RCO header. [none]
    --pack-res <val>  How to compress RCO resources (BMP, GIM & GMO).
    --pack-cmp <val>  Compression used on already compressed resources. [none]
                      This can be used to force additional compression on PNG,
                      JPEG, TIFF and GIF resources. 'none' is recommended.
    --zlib-method <val>
                      Zlib compression method/strategy [7z]
                      Can be default, filtered, huffman, rle, fixed or 7z
                      '7z' will use 7-Zip's deflate instead of zlib
    --zlib-level <n>  Zlib compression level [3]
                      Values can be 0-9, or 1-4 for '--zlib-method 7z'
                      Defaults to 9 if not using 7z

    --no-convgim      Don't automatically run images marked as format=gim
                      through gimconv if extension is not '.gim'.
    --gimconv-cmd <command>
                      gimconv command to execute; defaults to 'gimconv'.
    --gimconv-flags <flags>
                      Additional flags to pass to gimconv.
    --no-convvag      Don't automatically convert WAV sounds to VAG format
                      (based on extension).  Note WAV->VAG conversion is lossy!
    --no-encvsmx      Don't automatically encode text files to VSMX
                      (based on extension).
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help rebuild
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe rebuild <rco_in> <rco_out> [options]
  Simply rebuilds an RCO <rco_in>, writing out to <rco_out>; useful for changing compression used.

Options:
  For the following --pack-* functions, values can be 'none' or 'zlib'.
  --pack-res and --pack-cmp, if specified, override values stored in XML.
    --pack-hdr <val>  How to compress the RCO header. [none]
    --pack-res <val>  How to compress RCO resources (BMP, GIM & GMO).
    --pack-cmp <val>  Compression used on already compressed resources. [none]
                      This can be used to force additional compression on PNG,
                      JPEG, TIFF and GIF resources. 'none' is recommended.
    --zlib-method <val>
                      Zlib compression method/strategy [7z]
                      Can be default, filtered, huffman, rle, fixed or 7z
                      '7z' will use 7-Zip's deflate instead of zlib
    --zlib-level <n>  Zlib compression level [3]
                      Values can be 0-9, or 1-4 for '--zlib-method 7z'
                      Defaults to 9 if not using 7z
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help vagdec
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe vagdec <vag.ch1> [<vag.ch2> [<vag.ch3> ...]] <wav>
  Converts input VAG files to WAV file <wav>, where each input file is a separate channel.  Can use '-' for VAG or WAV files which mean stdin or stdout respectively.
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help vagenc
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe vagenc <wav> <vag.ch1> [<vag.ch2> [<vag.ch3> ...]]
  Converts input WAV file <wav> to VAG.  Output will be a separate file for each channel.
  If only one output VAG is specified and input WAV has multiple channels, will automatically append extensions.  Input/outputs can be '-' which mean stdin/stdout.
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help vsmxdec
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe vsmxdec [--decompile] <vsmxfile> <output>
  Decodes the input <vsmxfile> to <output>, which can be '-' meaning stdout.
  If --decompile option is specified, will activate experimental decompiler and will output decompiled Javascript.
Type This
C:\Portables\rcomage-v1.1.1\Rcomage>rcomage.exe help vsmxenc
Rcomage v1.1.1, written by ZiNgA BuRgA
A general purpose RCO creation and manipulation command-line tool.

Syntax: rcomage.exe vsmxenc <textfile> <vsmxfile>
  Encodes input <textfile> to <vsmxfile>. <textfile> can be '-', meaning stdin.
  Note that this cannot compile Javascript, only decoded text files.

Rcomage and GimConv compatibility[edit]

How to rebuild a PS3 RCO with custom GIM images using Rcomage and GimConv
  1. - Extract RCO. Use Rcomage.exe to dump the RCO contents without image conversions (so GIM files are extracted as GIM) to a folder named RebuildMe. This files are going to be used to identify the original GIM setting and for RCO rebuilding purposes
  2. - GIM to PNG. Identify visually the image you want to customize by converting it to PNG. For this example the image is named icon.png. The conversion to PNG can be made by two optional ways:
    1. - Use Rcomage.exe to extract the RCO contents with image conversions (so GIM files are extracted and converted to PNG) to a folder named DontRebuildMe. This files cant be used for RCO rebuilding purposes
    2. - Or use GimConv.exe to convert the original icon.gim (from RebuildMe folder) to icon.png with the command: "gimconv.exe icon.gim -o icon.png"
  3. - Custom PNG. Use icon.png as the base (mostly to respect the original width and height) and customize it with any image edition program (gimp, photoshop, etc...)
  4. - Identify GIM settings. Use GimConv.exe to identify the original GIM settings of icon.gim (from RebuildMe folder) by making GIM-to-GIM conversions
  5. - PNG to GIM. Use GimConv.exe to convert the custom icon.png to icon.gim with the GIM settings you found in step 4
  6. - Overwrite original GIM. Copy the custom icon.gim to RebuildMe folder overwriting the original icon.gim (this is the only file modifyed in RebuildMe folder along all this explain)
  7. - Build RCO. Use Rcomage.exe to compile the RCO with the files from RebuildMe folder