Recommended Posts

reone toolkit


toolkit is a GUI application that can be used to preview, extract, edit and create KotOR and TSL resources. Part of reone engine project.

## Features

  • Extract BIF, RIM and ERF archives
  • Create RIM, ERF or MOD archive from directory
  • Preview and export almost every resource type, including 3D models, images and audio files
    • Export TPC as TGA / TXI
    • Export encoded WAV as regular WAV / MP3
  • Visually edit 2DA, GFF, TLK, LIP, SSF, NCS and plaintext files
  • Decompile NCS to NSS-like pseudocode
  • Compose LIP files from text and audio files

https://github.com/seedhartha/reone/wiki/Tooling


 

Share this post


Link to post
Share on other sites

Released version 0.2 of the toolkit, most significant improvement being in NCS decompilation.

Decompilation now happens in four steps:

  1. Compiled script is parsed into assembly-like list of instructions
  2. Instruction list is converted into equivalent language-agnostic expression tree
  3. Expression tree is optimized for readibility, making a heavy use of inlining
  4. Optimized expression tree is converted to pseudo-NWScript code

Decompiler tries to convert instructions into expressions in the most straightforward manner and does not rely on specific instruction patterns produced by the Bioware compiler. Downside is that it doesn't yet know how to detect loops and structures, hence the output is only a pseudo-code and cannot be compiled without some manual refactoring.

Known issues:

  • Decompiler hangs on some large scripts, in particular combat-related

Comparison between version 0.1 and version 0.2 of the decompiler:

reone_toolkit_0_1_ncs_dec.jpg.jpg

reone_toolkit_0_2_ncs_dec.jpg

  • Like 1

Share this post


Link to post
Share on other sites

reone toolkit version 0.3 has just received a new tool. LIP Composer is a complete replacement of CSLU Toolkit and LipSynchEditor, enabling modders to create LIP files from text and audio files.

And it does a better job, too. From my experiments, LipSynchEditor and derivatives incorrectly translate phonemes to LIP shapes. Most noticeably, shape 0 is being interpreted as phoneme EE, while if you look at the animation, it is clearly supposed to be rest position.

LIP Composer algorithm is the following:

  • Analyze the audio file and find continuous spans of silence, controlled by parameters min silence duration and max silence amplitude
  • Split text into word groups, ignoring punctuation. By default, whole text is considered a single group. User can create groups by wrapping multiple words in parentheses.
  • Match word groups to non-silent sound spans, indicated by white lines on the waveform. Number of word groups must be equal to the number of sound spans.
  • Within each word group, convert words into phonemes using open-source CMU Pronouncing Dictionary, and evenly spread phonemes across the corresponding sound span. For every word that is not present in the CMU dictionary, user can add it's phonemes in the Pronounciation tab.
  • Finally, convert phonemes to LIP keyframes, also creating rest keyframes for each span of silence.

From my testing, resulting LIP files are almost undistinguishable from original ones.

 

reone_toolkit_0_3_b_lip_composer.png

 

  • Like 1

Share this post


Link to post
Share on other sites

Starting with version 1.0 of the toolkit, it is now possible to visually edit 2DA, GFF, TLK, LIP, SSF, NCS and plaintext files. After opening a resource in resource explorer and making your changes, click "File" → "Save copy as..." and choose destination directory, e.g. Override, to save the modified resource.

As for future plans, focus is mostly on raw resource extraction, preview and editing. Visual template editing (e.g. UTC), dialog and module editors are out of scope for this project, even though I am toying with some ideas for high-level tools.

reone_toolkit_1_0_beta1_2da.png

reone_tools_1_0_beta1_gff.png

reone_tools_1_0_beta1_lip.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.