Hello There, Guest! Login Register

Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About SIE

This is a tool I made a few years ago when I was unhappy with the other IFF editors on offer. I wasn't going to release it publicly, but due to some friends getting significant use out of it I've put some work into updating and polishing it to be more usable by the wider community. The "IFF editor" nomenclature is historic as the tool now does a lot more besides!

In short, this tool:
  • Lets you edit datatables, palettes and IFF files (this is the format used by the majority of files in SWG, so you can edit most of the client in a generic way)
  • Has a .tre repository explorer with file history and previews for models and textures
  • Has an API which will allow other developers to build specialised tools for more file types in the future

If the rest of this post sounds confusing/complex to you - don't worry - it is aimed at two audiences at once.  Anyone that has used other tools like Tre Explorer to edit or view SWG files in the past can use this in much the same way.


Tree explorer with file history and appearance preview

The tree explorer includes a renderering window from the previous version of my world editor that lets users preview:
  • Appearance templates (.apt)
  • Static meshes (.msh)
  • Skeletal mesh generators
  • Animations
  • Component meshes (.cmp)
  • Portal property pages (.pob)
  • LODs (.lod)
  • Skeletal LODs (.lmg)
  • Objects (.iff)
  • DDS textures
  • Shader templates (.sht, basic display only)

[Image: xLf9RUM.png]

Unlike most tree explorers in the past, the one in SIE works from a repository of .tre/.toc files rather than just one. This is configured by default for the PreCU publish 14 client but can be changed in the .cfg to match your needs.

The SIE tree viewer can also show/extract/open any version of a file contained in the history composed by the input .tre files.

[Image: 2FeuS6w.png]
[Image: xPH470K.png]

Iff editor and template system

The IFF editor is the oldest part of the tool. It started out in 2009 as a simple replacement for the chunk editor in Tre Explorer, which was frustating me due to showing files incorrectly and corrupting them on save. It remained mostly unchanged until late last year when I decided to turn it into something more useful. The hex-editing functionality (a la Tre Explorer) remains but the highlight feature of this tool now is the template system.

[Image: tmwxFZF.png]

The template system provides a syntax with which users can define the binary structures of IFF chunks. These templates can then be applied to chunks in order to edit their values or used to create a new chunk of that type. If named appropriately, templates are applied automatically on chunk selection. As such, keeping to this system for your own templates is highly recommended (the name will be generated automatically for you as a suggestion)!

For example, below I have created a template for terrain shader families and used it to create a new chunk. It has been given the default values specified in the template while everything else is initialised to 0.

[Image: OtJclEv.png]

Here I use the value editor to change some of the defaults that were set, the hex source is updated automatically.

[Image: RZlTEqp.png]

If the template system looks scary then fear not - the community has already made over two hundred of them for you to use!

Template syntax and semantics (only read if you're interested in writing your own templates!)

The template system supports the following primitive types:
  • string, byte, bool, bool2 (2-byte wide bool), bool4 (4-byte wide bool), ushort, short, uint, be_uint (big endian), int, float, double, tag (char[4]), rtag(char[4] reversed)
  • 8-bit per channel colours: rgb, bgr, rgba, argb
  • 32-bit per channel colours: rgbf, rgbaf, argbf
  • vec2, vec3, vec4, quat, mat3x3, mat4x3, mat4x4
The primitive types can be used to create structures and arrays.
  • Arrays are defined like this Type[Name, ArraySize], where ArraySize is either a constant or a previously read scalar variable.
  • Arrays can be scaled (for example if you need to read a number of floats but the chunk gives the size in bytes) by Type[Name, ArraySize, ScaleFactor]
  • Arrays can read until the end of the chunk by Type[Name, inf]or Type[Name, -1]
  • Structs are defined like this struct[StructName]{Variable1,Variabl1}
  • Structs can be nested arrays can not
As an example of structs, vector types could have been implemented like so:


As of version 3.0, you can create new forms from a template using the "Add Chunk from Template" button. You can append default values to POD types with the following syntax: float[x](0.43), string[y]("hello_swg"). Default values for vector types are not supported (I can add them if there's any demand for it). You can set the chunk type for the form to be added by adding a meta comment:


If the meta comment is not provided, the program will attempt to find the appropriate value in the template file name. If this fails it will be inserted as CHNK.

As of version 3.2, you can define and use enumerations:
  • enum[theAnimals]{CAT=1,DOG=2,FISH=4}
  • int[animal](default=1,enum=theAnimals)

Datatable editor

The datatable editor supports all valid datatables in the .tre files (there are a couple of invalid ones with duplicate columns and garbage data). Unlike previously released editors for it has proper support for all types such bit vectors and linked enumerations.

[Image: RLq3bqx.png]
[Image: eNgRjUL.png]

Palette editor

The palette editor allows the editing of the .pal files found in the client. These control colourisations of armour and so on. The editor has a number of features to make this straightforward such as being able to create gradients and edit multiple values at once.

[Image: ljD5Dvi.png]

Other editors

The program also includes tools for:
  • Editing STF files
  • Searching all STF files (all/en/ja)
  • Editing CRC tables
  • Editing CEF files
  • Editing SND files
  • Editing WS files

The future and plugin API

The program directly makes use of functions from my main world builder's library such as those used to extract and view tree files. This means certain parts of the tool will get free upgrades as I work on the world builder. For example I may add .tre writing support and move to the new renderer.

Aside from adding "free" features like this and bug fixes, I've likely spent as much time as I can on this tool without seriously impacting progress on the world builder. However, the tool features an API which lets other developers create plugins to support new file types! Roughly speaking, the API requires developers to implement two simple interfaces providing:
  • Support for opening from a byte array (for opening from the tree viewer)
  • Support for opening from a file (for opening with start-up arguments)
  • Information about the status bar items required
  • Information about what file types it supports opening
  • Notifies the main window on open file name changes
  • Notifies the main window when the 'has changes' value of the open file changes
  • Notifies the main window when a status bar item value has changed
In summary, this means other tool writers need not waste time writing extensive UI code, .tre readers and so on. Timbab and I have some preliminary plans to merge our work so he can use this SIE as the base of his new version of Jawa Toolbox. The screenshot below shows a the beginning of a snapshot editing made using the plugin API in about 10 minutes:

[Image: SiTex9I.png]

Additional Templates

A number of template packs have already been created listed below. If you make any templates, please post them in this thread and I will update the OP!

Templates by Timbab

Abstract Directory -- [Updated - 2015/03/02]
Animation Directory -- [Updated - 2015/03/02]
cell_lights -- [New - 2015/03/02]
Chat Directory -- [Updated - 2015/03/02]
Client Data File -- [Updated - 2015/03/09]
Client Effect -- [Updated - 2015/03/09]
Cockpit -- [Updated - 2015/03/02]
Combat Directory -- [Updated - 2015/04/23]
Creation Directory -- [New - 2015/03/02]
Customization ID Manager -- [Updated - 2015/02/06]
Slot Rule Manager -- [Updated - 2015/02/06]
Effect -- [Updated - 2015/04/23]
Free Chase Camera -- [Updated - 2015/03/09]
Game Music Manager -- [Updated - 2015/02/06]
Interior Layout -- [Updated - 2015/02/06]
Lightsaber Blade -- [Updated - 2015/03/09]
Mesh String Pack -- [Updated - 2015/02/06]
Planet -- [New - 2015/03/09]
Playback -- [Updated - 2015/03/09]
Portal Object -- [New - 2015/03/09]
Shader -- [Updated - 2015/04/23]
Sound -- [Updated - 2015/03/09]
Sprite -- [Updated - 2015/03/09]
Swoosh -- [Updated - 2015/03/09]
Terrain Environment -- [Updated - 2015/04/23]
Texture Renderer -- [New - 2015/03/09]

Templates by Waverunner

Skeletal Appearance Templates (*.sat)
Logical Animation Table (*.lat)
3 chunks relating to hardpoints and distances for Detail Appearance Templates (*.lod)
.iff transform mask files (only one chunk)
Skeletal Mesh Generator Templates (*.mgn)
Skeleton Templates (*.skt)
Structure Footprints (*.sfp)
Asset Customization Manager

Templates by Phoenix


Download: SIE

Latest release date: 2016/12/06
Very cool thanks!
Eventually I will upload my templates for this (=
Thank you! I suspect this is what I need to get NPC housing working...
No. It's just another tool just like tre explorer but organizes forms/records easier to read. And it allows for easier editting.
Thank you Sytner. Looking forward to seeing more releases from you.
[Image: Vidi.gif]
Yup it's a great tool Smile
New version Cool.
Now if we could just get World Builder 1.0 Smile
[Image: Vidi.gif]
Thank you!

Forum Jump:

Browsing: 1 Guest(s)