Overview
This is a simple tool, done in C# (Sorry C++ Buffs, C# was faster), to convert KFM files to XML format for quick editing. It doesn't do much that you can't do with your favorite HEX editor, but hopefully it'll allow a few people to add animations to their models.
I wasn't able to do what I wanted with it, but this was more a part of my modeling experience than it is of the tool. The animations spliced well with the model; but I was having trouble getting the "extra" items (parachute) to show up. It ended up looking like a paradrop with an invisible parachute.
Readme
Disassembling your KFM file
Disassembling a KFM file is as simple as clicking your mouse.
Step 1: Open KFM Utility
Step 2: Click "Open" for the KFM Field.
Step 3: Find and open the KFM file you wish to edit. This file must exist to decode.
Step 4: Find and open the XML file you wish to save to using the same method as the KFM file. This file does not have to exist to decode.
Step 5: Press the "Decode" button to convert from KFM to XML.
The XML file should now be in the directory you selected, with the filename you chose.
Warning - Part of the save process involves overwriting the existing file. Always work on a copy.
To reassemble the KFM file from the XML file, follow the same steps as above, but press "Encode" instead of "Decode." This will convert the XML file you chose into the KFM file you chose.
XML Syntax
There are two XML files that this utility will use; one of which is the XML file you Encode/Decode with, and the other comes with the executable, named "AnimCodes.xml".
Since the average user won't need to know anything other than "Do not delete this file", I will discuss the syntax in the Decompiled KFM file first.
KFM
As with all XML, tags are CaSe SeNsItIvE.
AnimCodes
Update - 2008.02.19
Links
Animation Code List
Tutorial, Source and Executable
This is a simple tool, done in C# (Sorry C++ Buffs, C# was faster), to convert KFM files to XML format for quick editing. It doesn't do much that you can't do with your favorite HEX editor, but hopefully it'll allow a few people to add animations to their models.
I wasn't able to do what I wanted with it, but this was more a part of my modeling experience than it is of the tool. The animations spliced well with the model; but I was having trouble getting the "extra" items (parachute) to show up. It ended up looking like a paradrop with an invisible parachute.
Readme
Disassembling your KFM file
Disassembling a KFM file is as simple as clicking your mouse.
Spoiler Tutorial :
Step 1: Open KFM Utility
Step 2: Click "Open" for the KFM Field.
Step 3: Find and open the KFM file you wish to edit. This file must exist to decode.
Step 4: Find and open the XML file you wish to save to using the same method as the KFM file. This file does not have to exist to decode.
Step 5: Press the "Decode" button to convert from KFM to XML.
The XML file should now be in the directory you selected, with the filename you chose.
Warning - Part of the save process involves overwriting the existing file. Always work on a copy.
To reassemble the KFM file from the XML file, follow the same steps as above, but press "Encode" instead of "Decode." This will convert the XML file you chose into the KFM file you chose.
XML Syntax
There are two XML files that this utility will use; one of which is the XML file you Encode/Decode with, and the other comes with the executable, named "AnimCodes.xml".
Since the average user won't need to know anything other than "Do not delete this file", I will discuss the syntax in the Decompiled KFM file first.
KFM
Code:
<KFM>
<Header /> <!-- STRING -->
<!-- Doesn't seem important, but is still decoded. -->
<NIF /> <!-- STRING -->
<!-- Name of the NIF file that these animations apply to. -->
<Master /> <!-- STRING -->
<!-- Almost always "MD". This is the master node for the NIF file. -->
<Unknown /><!-- INTEGER -->
<!-- I have no clue what this does. Nobody seems to. Seriously. -->
<!-- It's just... like... there. But it's decoded anyways. -->
<Animations>
<!-- Begin Repeat -->
<Animation>
<Event /><!-- [INTEGER/STRING] -->
<!-- If it is a String, don't worry about it. It corresponds to a value -->
<!-- defined in AnimCodes.xml -->
<!-- If it is an Integer, that means that it is Undefined in AnimCodes.xml -->
<!-- but will still encode properly. -->
<Variation /><!-- INTEGER -->
<!-- This Value seems to be important; in "Vanilla" models, it seems to -->
<!-- always be "0", while in BtS models, it seems to usually be a multiple -->
<!-- of "5". If you copy-paste data, this number seems to be important. -->
<File /><!--String -->
<!-- This points to the .KF (Animation) file to run when this animation is -->
<!-- called. On your first decode, this should be self-explanatory. -->
</Animation>
<!-- End Repeat -->
<!-- That section will repeat for every animation file present in the KFM. -->
</Animations>
</KFM>
As with all XML, tags are CaSe SeNsItIvE.
AnimCodes
Code:
<AnimCodes version="0.1">
<!-- The Version String means nothing. It's just to help you keep track of -->
<!-- updated versions of this file. -->
<!-- Begin Repeat -->
<Animation>
<Name /><!-- STRING -->
<!-- Mnemonic representation of data. -->
<Code /><!-- INTEGER -->
<!-- Integer code corresponding to "Name" -->
<!-- Both of those are used by the program when encoding XML->KFM -->
</Animation>
<!-- End Repeat -->
</AnimCodes>
Update - 2008.02.19
Spoiler :
- 2008.02.19
- Added a Tutorial.
- 2008.02.18
- Fixed a bug with the <Variation> tags, where they weren't encoding to KFM format properly.
Links
Animation Code List
Tutorial, Source and Executable