Help:Tools/rstb: Difference between revisions

no edit summary
imported>Leoetlino
No edit summary
imported>Leoetlino
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
| authors = leoetlino
| authors = leoetlino
| source = https://github.com/leoetlino/rstb
| source = https://github.com/leoetlino/rstb
| license = GPLv3
| license = GPLv2+
| written_in = Python
| written_in = Python
| win_only =  
| win_only =  
Line 16: Line 16:


== Usage ==
== Usage ==
This tool automatically decompresses Yaz0-compressed RSTBs, and re-compresses after editing if the file extension starts with an s. This means that '''you do not need to compress or decompress files manually'''.
'''Important''': You must pass <code>--be</code> if you are dealing with a big endian RSTB (Wii U version).
'''Important''': You must pass <code>--be</code> if you are dealing with a big endian RSTB (Wii U version).
path_to_rstb is a path to the [[ResourceSizeTable.product.rsizetable]] file.
<code>path_to_rstb</code> is a path to the [[ResourceSizeTable.product.rsizetable]] file. <code>RESOURCE_NAME</code> is a [[canonical resource path]].
* '''Get''' a resource size: <code>rstbtool [--be] path_to_rstb get RESOURCE_NAME</code>
* To '''get''' a resource size: <code>rstbtool [--be] path_to_rstb get RESOURCE_NAME</code> {{ch}}
* '''Set''' a resource size: <code>rstbtool [--be] path_to_rstb set RESOURCE_NAME NEW_SIZE</code>
* To '''set''' a resource size: <code>rstbtool [--be] path_to_rstb set RESOURCE_NAME NEW_SIZE</code> {{ch}}
** NEW_SIZE can be an integer (hex or decimal) or a real file path (in which case rstb will automatically calculate the resource size).
** NEW_SIZE can be an integer (hex or decimal) or a real file path (in which case rstb will automatically calculate the resource size).
* '''Add''' a resource size: <code>rstbtool [--be] path_to_rstb add RESOURCE_NAME NEW_SIZE</code>
* To '''add''' a resource size: <code>rstbtool [--be] path_to_rstb add RESOURCE_NAME NEW_SIZE</code> {{ch}}
* '''Delete''' a resource size: <code>rstbtool [--be] path_to_rstb del RESOURCE_NAME</code>
* To '''delete''' a resource size: <code>rstbtool [--be] path_to_rstb del RESOURCE_NAME</code> {{ch}}


== Known issues ==
== Known issues ==
* '''Size calculation for complex resources''': rstb is currently unable to calculate file sizes for complex resource classes (see [[Resource system#Resource size calculation]] for more information). The CLI will suggest deleting entries if it detects that this is the case.
* '''Size calculation for complex resources''': rstb is currently unable to calculate file sizes for complex resource classes (see [[Resource system#Resource size calculation]] for more information). The CLI will suggest deleting entries if it detects that this is the case.
Anonymous user