- Joined
- Sep 18, 2010
- Messages
- 426
About
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:
Features
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:
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.
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.
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.
Here I use the value editor to change some of the defaults that were set, the hex source is updated automatically.
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:
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:
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.
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.
Other editors
The program also includes tools for:
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:
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
Templates for the vast majority of files.
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
Terrain
Download: SIE 3.7.0.95
Latest release date: 2017/05/31
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
Features
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)
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.
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.
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.
Here I use the value editor to change some of the defaults that were set, the hex source is updated automatically.
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
- 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
Code:
struct[rgb]{byte[r],byte[g],byte]}
struct[vec3]{float[x],float[y],float[z]}
struct[quat]{float[w],float[x],float[y],float[z]}
struct[mat3x3]{float[m00],float[m10],float[m20],float[m01],float[m11],float[m21],float[m02],float[m12],float[m22]}
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:
Code:
// META(CHUNKID:DATA)
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)
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.
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.
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 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
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
Templates for the vast majority of files.
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
Terrain
Download: SIE 3.7.0.95
Latest release date: 2017/05/31
Last edited by a moderator: