-
-
Notifications
You must be signed in to change notification settings - Fork 23
PsBuild
PsBuild is a tool to compile PSB description jsons to PSB.
PsBuild is pcc
compatible. PsBuild accepts both res.json
(psbtools decompiler
) and resx.json
(PsbDecompile) as resource json.
resx.json
is a new format of resource json used by PsBuild. When decompiling PSB, some information is lost, and resx.json
is used to keep them, and provide some options for compile at the same time. However, if you use arguments for PsBuild, the corresponding setting in resx.json
will be ignored.
For example, you can set CryptKey
in resx.json
, and the PSB will be encrypted after compiling. (This only works for EMT PSB.)
resx.json
may changes with the updates of PsBuild. Be careful if you modified it and then switched to a new version of PsBuild.
PsBuild identifies pictures' format by their file extensions and convert common picture formats to the format PSB used. For TLG image support, read Plugins for more details.
External Texture PSB is a kind of PSB whose resources are not contained in PSB itself. Since FreeMote Viewer is using DX SDK which can not support such PSB, there is a Link
feature in PsBuild to embed textures into an external texture PSB and make it a normal (texture embedded) PSB. Texture names should be something like sample_tex000.png
.
Example:
PsBuild link sample.psb sample_tex000.png sample_tex001.png
- Use
-v {Version}
to set a corresponding PSB version (usually try-v 2
first). You can also set version inresx.json
. - If the PSB have to be encrypted, do it using
PsBuild -k {Key}
orEmtConvert
. - Make sure the jsons are valid (both syntax and content).
- If you are using FreeMote libs, make sure you have called
PSB.Merge()
beforePSB.Build()
. - If your PSB is an External Texture PSB, link textures into the PSB using
PsBuild link
.