OBD talk:TRAM
HEX area
more detailed explanations
Hello all ONI fans, This is not guide how to edit TRAM, it is only TRAM explained in more detail in order to help those who would like to modify it. I see it all the time that you discover already discovered and it is MY FAULT because I didn't share my knowledge X_X. Shame on me. --Loser 19:50, 20 August 2008 (CEST)
P.S.: And I am comguy (smart@$$ and coward), not striker ^_^
GENERAL:
- We need hexeditor or OUP and some decimal to hex (Windows calculator) and decimal to float (see HERE) converters.
- normal number are written as usual, when I want to write HEx number, I use prefix 0x. so 0x10 means 16.
- Next here comes explanation of storage types (that is "type" column in table). Storage type is how this value is saved and how can be read by Oni. Types in TRAM which interests us are:
- Offset: tells us that value points to the exact location in raw file where is something stored. Offset is a bit tricky. It is written in Little endian. So when in offset field is written A0|B4|80|00 , then something starts in raw at position 00|80|B4|A0 . See? Order of bytes is reversed. Keep this in mind. This can be helpful if we need to add some part to the TRAM which is originally not present for this TRAM (usually particles). You add this part (in correct form of course!) to the end of raw file, extending it (HEXeditor needed! Cannot do this with OUP!) and then you note where it begins (offset is usually written on the side) and write it into correct offset field in correct form for Oni(reverse bytes). A few examples of tricky offsets:
- C5|A6|70|00 means 00|70|A6|C5, so something in raw starts at line 00|70|A6|C0 on the byte 05 (so it is 6th byte from the right, 0 is counted as well!!!).
- 40|89|14|01 means 01|14|89|40, so something in raw starts at that line. Tricky part is the LAST byte when it is YOU who tries to reverse bytes in order to write them into TRAM ^_~.
- Link: it tells us (and engine) that we should find some other file to use for something. Link contains internal number of the file we should search for,its res_ID. Usually first 4 bytes of file are this number.
- Bitset: this is field of some optional possibilites. Each one has its own (hardcoded) number. Numbers are powers of 2 : 0,1,2,4,8,16 (0x10 in hex),32 (0x20 in hex),64 (0x40 in hex),128 (0x80 in hex)
- Int: integer, it is some value written in hex (not generally, just for this purpose. Generally integer is defined as numeric value which can contain only whole numbers). Beware, again little endian. So if you want to change some "short" field, then type value you want into calculator, convert to hexadecimal. Then fill it in in reverse order (Little endian).
- Float: field which can contain real number value. Beware, again Little endian. In order to decipher float, use some "float to decimal" converter (maybe the one I have suggested above? ^_^)
- Char: some word, usually it is name of something. Howgh
Offset | Type | Raw Hex | Value | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x000 | res_id | 01 49 07 00 | 1532 | 01865-KONCOMpunch_heavy.TRAM | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x004 | lev_id | 01 00 00 00 | 0 | level 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x008 | int32 | 00 00 00 00 | 0 | unknown; always zero | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x00C | offset | A0 B4 80 00 | 00 80 B4 A0 | at this position starts the "Y-positions of the pelvis" in the raw file.It looks like this:
This part contains Y-axis position (height) of pelvis in EACH frame of animation. If we need to "lower" or "elevate" character (we adopted some TRAM from other character and while performing, our char is "sinking" or "floating") this is place where we go. Beware: wrong values cause Oni to hang. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x010 | offset | E0 B5 80 00 | 00 80 B5 E0 | at this position starts the "X/Z - velocities of the pelvis" in the raw file. It looks like this:
Z+ is forward, Z- is back, X+ is left, X- is right | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x014 | offset | 60 B8 80 00 | 00 80 B8 60 | at this position starts attack part in the raw file:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x018 | offset | 00 00 00 00 | unused | at this position starts the damage part in the raw file; only tgt (target) animations use it, BEWARE, without ThrowTarget bit (see 0x3C TRAM) it causes Loser's bug No.1 (Oni crashes). Raw:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x1C | offset | A0 B8 80 00 | 00 80 B8 A0 | at this position starts the motion blur in the raw file, nothing intersting here for us, it is just eye candy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x20 | offset | C0 B8 80 00 | 00 80 B8 C0 | at this position starts the shortcut part in the raw file:
This is important part. thanks to this we can perform specials as well as other movements (run, sprint). If you are messing around with TRAM and it does NOT want to be performed while all other things see OK, try to think if it has correct shortcut or if another animation related to this one has correct shortcut. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x24 | offset | 00 00 00 00 | unused | at this position starts throw part in the raw file:
Loser's bug No.2: Wrong throw animation is ocasionally performed. That is caused by fact that parent throw is IN distance for throw but our TRAC's throw is not. So engine iniciates throw and plays parent's TRAC throw animation and our TRAC thrown animation. Mess ^_^ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x28 | offset | E0 B8 80 00 | 00 80 B8 E0 | at this position starts the footstep part in the raw file. Nothing to add. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x2C | offset | 00 B9 80 00 | 00 80 B9 00 | at this position starts the particle part in the raw file:
Beware of the fact that ONCP particle name is NOT general name of the particle. "Kontrail" is ONCP particle name. "h2h_strtrail_e01" is general name of the particle. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x30 | offset | 60 B9 80 00 | 00 80 B9 60 | at this position starts the position part in the raw file. Don't mess with it. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x34 | offset | 00 BD 80 00 | 00 80 BD 00 | at this position starts the bodyparts animation part in the raw file. Read its section if you want. Until we can export/import animations and edit them in some program, I encourage you to leave this part alone. I know that sometnig CAN be done by hand work, but it is too time consuming. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x38 | offset | 00 00 00 00 | unused | at this position starts the sound part in the raw file. Howgh | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x3C | bitset32 | 90 00 08 00 | 144, 0, 8, 0 | TRAM bitset collection; the following bits are possible /values in hex):
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x040 | link | 00 00 00 00 | unused | direct animation 0 (link to another TRAM file) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x044 | link | 00 00 00 00 | unused | direct animation 1 (link to another TRAM file), these two do NOT ensure that this animation can link, they only allow you to write two animations which can follow immediately, without applying soft pause, see below for more. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x048 | bitset32 | 00 00 00 00 | 0 | used parts; Aiming screen TRAMs "use" several bones here. Other overlay TRAMs use only "chest". Non-overlay TRAMs use none. So we can ignore this part. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x04C | bitset32 | 00 00 00 00 | 0 | replaced parts; same legend as above; only overlay TRAMs other than aiming-screen ones "replace" parts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x050 | float | 00 00 00 00 | 0.000000 | final rotation in radians (for anims that make you turn), note that if you are hurt and this animation stopped, you are immediately forced back into your original direction. So if you make Konoko's running punch throw that thrown victim can be hurt and then you punch him, he reverses back to original rotation, "slides on his spin". Looks awful. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x054 | int16 | 01 00 | 1 | move direction; the following directions are possible:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x056 | int16 | 06 00 | 6 | attack sound ("Rising fury!"); the number belongs to the sound slot in the ONCC file | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x058 | float | 8D 87 CF 41 | 25.941187 | max horizontal extent of the attack
-extents are for AI2s. Thanks to these AI2 knows reach of technique (general and then in represented ranges around body) and can attack with it or guard it correctly. You can adjust it a bit if you feel it really needs to, but I don't recommend it as you cannot directly see what changed and if it is for good or for bad. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x05C | float | DE E9 1A 40 | 2.420524 | min Y of the attack | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x060 | float | 95 34 D3 41 | 26.400675 | max Y of the attack | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x064 | float | 8D 87 CF 41 | 25.941187 | max horizontal extent at 0° (front) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... | ... | ... | ... | ... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x088 | float | DF 37 87 40 | 4.225570 | max horizontal extent at 90° (left) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... | ... | ... | ... | ... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0AC | float | 5A D8 6D 40 | 3.716330 | max horizontal extent at 180° (back) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... | ... | ... | ... | ... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0D0 | float | 98 95 E3 40 | 7.112011 | max horizontal extent at 270° (right) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... | ... | ... | ... | ... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0F0 | float | 8D 87 CF 41 | 25.941187 | max horizontal extent at 350° | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0F4 | int16 | 05 00 | 5 | unknown; indicator for the seven floats below; always -1 if the attack part doesn't exist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0F6 | int8 | 00 | 0 | unknown; always zero | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0F7 | int8 | 00 | 0 | unknown; always zero | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0F8 | float | 00 00 00 BF | -0.500000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x0FC | float | 1E 85 6B BF | -0.920000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x100 | float | 19 47 0C 41 | 8.767358 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x104 | float | EB 51 F0 40 | 7.510000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x108 | float | D7 A3 14 41 | 9.290000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x10C | float | 0A D7 3B 41 | 11.740000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x110 | float | 5E 93 BF 40 | 5.986739 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x114 | int16 | 2F 00 | 47 | unknown; indicator for the two bytes and seven floats below; always -1 if the attack part doesn't exist or the attack part exists and it's a tgt animation (tgt = target) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x116 | int8 | 01 | 1 | unknown | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x117 | int8 | 16 | 22 | unknown | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x118 | float | 85 EB 51 BF | -1.850000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x11C | float | E1 7A 7C C1 | -3.900000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x120 | float | 69 61 BF 40 | 16.874636 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x124 | float | 70 3D 22 41 | 10.510000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x128 | float | 47 E1 3A 40 | 8.860000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x12C | float | 33 33 DB 40 | 18.460000 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x130 | float | F7 C0 2E 3E | 0.055320 | unknown; always zero if the indicator is -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x134 | int32 | 00 00 00 00 | 0 | unknown; always zero | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x138 | int32 | 18 00 00 00 | 24 | amount of elements of the extent part; only used if the attack part exists | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x13C | offset | E0 BB 80 00 | 00 80 BB E0 | at this position starts the extent part in the raw file; only used if the attack part exists.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x140 | char[16] | konflash1 | impact particle name (reference to 01018-.ONIA, which is called up in the ONCC file) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x150 | int16 | 00 00 | 0 | hard pause in 1/60 seconds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x152 | int16 | 12 00 | 18 | soft pause in 1/60 seconds, this pause is forced after animation ends. You simply stand, cannot do a thing. Only if this animaton links to some other one (links means it has correct ID Anim Type so it CAN be followed) this pause is ignored | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x154 | int32 | 00 00 00 00 | 0 | amount of packages of the sound part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x158 | int32 | 00 00 00 00 | 0 | runtime: pointer to the sound for this animation (initialised from SABD) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x15C | int16 | 00 00 | 0 | runtime: sound start frame (initialised from SABD) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x15E | int16 | 3C 00 | 60 | frames per second | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x160 | int16 | 06 00 | 6 | compression size | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x162 | int16 | 16 00 | 22 | animation type from anim_types. See Molten's PDF. This number determines which keypress combination is required to call this animation, if animation can link to other one and many more | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x164 | int16 | 16 00 | 6 | aiming animation type from anim_types.StNA | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x166 | int16 | 00 00 | 0 | from state, this tells engine from which state this animation can be called. Thanks to this you can perform kick, getup kick and crouch kick. All done by same action, only animation state differs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x168 | int16 | 07 00 | 7 | to state, this is state in which animation ends. Should correspond so next animation transits smoothly. ^_^ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x16A | int16 | 13 00 | 19 | bodyparts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x16C | int16 | 50 00 | 80 | frames, you cannot extend frames (Oni will hang) but you can shorten animation if you need. Only be aware that there are some parts of TRAM which can be harmed by shorting TRAM below their end frame. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x16E | int16 | 50 00 | 80 | duration in in 1/60 seconds, the same as above | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x170 | bitset16 | 00 02 | 0, 2 | varient, the following bits are possible:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x172 | char[2] | AD DE | dead | varient end; unused | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x174 | int16 | 00 00 | 0 | atomic start, you can set only part of the TRAM to be atomic (cannot be affected by user) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x176 | int16 | FF FF | -1 | atomic end, same | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x178 | int16 | 00 00 | 0 | end interpolation, in frames, beware, too big interpolation looks bad. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x17A | int16 | FF FF | -1 | maximal interpolation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x17C | int16 | FF FF | -1 | action frame, frame where action happens. Action is weapon theft in disarm animations, action is when Mukade actually teleports(changes place), and many other things | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x17E | int16 | 0A 00 | 10 | first level | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x180 | uint8 | 01 | 1 | first "invulnerable" frame, you can set only part of the TRAM to be invulnerable | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x181 | uint8 | 1C | 28 | last "invulnerable" frame, same | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x182 | uint8 | 02 | 2 | amount of elements in the attack part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x183 | uint8 | 00 | 0 | amount of elements in the take damage part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x184 | uint8 | 01 | 1 | amount of elements in the motion blur part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x185 | uint8 | 01 | 1 | amount of elements in the shortcut part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x186 | uint8 | 02 | 2 | amount of elements in the footstep part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x187 | uint8 | 04 | 4 | amount of elements in the particle part | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0x188 | char[24] | AD DE | dead | unused |
Beware, setting wrong values in those "amount of elements" fields may make Oni crash/hang.
--Loser 19:50, 20 August 2008 (CEST)
XML area
how convert dae to xml / oni ...
... using batch files
Download this modding environment so you know that the following lines are about.
Before you can run those files you need to put your source files into the "input_folder".
"dae + xml(not 41) to oni.bat" will generate files with QKeys.
"dae to xml(41).bat" will generate files with EKeys.
... using the Windows address bar
The batch file code and the code used for the address bar are identical.
Look at this image and you will understand.
If you use the windows address bar you should have onisplit alway alongside your essential modding folders to have short commands like
- onisplit41 -create:tram output_folder input_folder/*.dae
We want to type as less as necessary, don't we? =)
... using onisplit GUI
Keep in mind that the GUI is only a mask for onisplit. New onisplit versions - v0.52.9.0 or newer don't have the command -create:tram.
normal animations
You can convert such animation by choosing one of the two methods. (normal = no overlay anims)
- - To create QKeyed-animation you need a helper xml file to be placed alongside the dae animation file.
- - EKeyed-animations don't need a helper xml file but edits afterwards the creation.
In any case the amount of needed hand work is quite the same for both methods.
QKeyed-animation refuse to become edited. There's somehow a bug like Samer pointed out on the forums. (Is this still the case? - 5th Dec 2011) But that's not so tragic. You can edit the dae or the xml helper file and then merge them into an oni file again.
Like EdT said an advantage of the xml helper method is that you can breakdown a single dae file into smaller pieces. It's a comfortable way to create multiple animations from one source. E.g. you make combo animations in one dae - let's say punch (p), kick (pk), punch (pkp) - then you make 3 xml helpers. First file goes from frame 0 to 40, second file from 41 to 86, and third file from 77 to 140. The dae file has 120 frames but not the 3 oni files that will be created.
Some lines for the hypothetical second combo animation:
<DaeImport> <Path>TRAM######combo.dae</Path> <Start>41</Start> <End>78</End> </DaeImport> <Lookup> <Type>PK</Type> <AimingType>PK</AimingType> <FromState>Standing</FromState> <ToState>Standing</ToState> <Varient>Combat</Varient> <FirstLevel>0</FirstLevel> <Shortcuts /> </Lookup> <Flags>Attack</Flags>
Don't forget to add types, variants, particle etc. to your xml file before you convert it to the oni format.
testing the created files
Either put them into an AE package or create a plugin.
There's a batch file available that create level0 plugins. Put the created plugin files in your GameDataFolder and run the game.
file structure
TRAM | +-- header: animation type, state, flags, particle, sounds, etc. +-- actual animation: heights, velocities, rotations +-- additional data: positions, throw adjustments, selfdamage, attack parts, extents
list of tags, types, and flags
Use the search function of your web browser to quickly find a tag.
(work in progress)
tag | type | description |
<Lookup> | ||
<Type> | flag | Look them up over HERE. |
<AimingType> | flag | Look them up over HERE. |
<FromState> | flag | Look them up over HERE.
|
<ToState> | flag | Look them up over HERE. |
<Varient> | flag | "<Varient />" if unused. E.g. that's the case for non-combat animations.
|
<FirstLevel> | int16 | |
<Shortcuts> | ||
<Shortcut> | sequence element | |
<FromState> | flag | |
<Length> | int16 | |
<ReplaceAtomic> | flag |
|
<Flags> | flag |
|
<Atomic> | ||
<Start> | int16 | |
<End> | int16 | |
<Invulnerable> | ||
<Start> | int16 | |
<End> | int16 | |
<Overlay> | ||
<UsedBones> | flag | "<UsedBones />" if unsued.
|
<ReplacedBones> | flag | "<ReplacedBones />" if unused.
|
<DirectAnimations> | ||
<Link> | link | First slot. "<Link />" if unused. |
<Link> | link | Second slot. "<Link />" if unused. |
<Pause> | ||
<Hard> | int16 | |
<Soft> | int16 | |
<Interpolation> | ||
<End> | int16 | |
<Max> | int16 | |
<FinalRotation> | float | final rotation in degrees |
<Direction> |
| |
<Vocalization> | ||
<ActionFrame> | ||
<Impact> | link | "<Impact />" if unsued. |
<Particles> | ||
<Particle> | sequence element | |
<Start> | ||
<End> | ||
<Bone> | flag | |
<Name> | link | |
<MotionBlur> | ||
<MotionBlur> | sequence element | |
<Bones> | ||
<Start> | ||
<End> | ||
<Lifetime> | ||
<Alpha> | ||
<Interval> | ||
<Footsteps> | ||
<Footstep> | ||
<Frame> | ||
<Type> | flag | |
<Sounds> | "<Sounds />" if unused. | |
<Sound> | sequence element | |
<Name> | char[32] | OSBDfile.imp.oni (don't use file prefix/suffix) |
<Start> | int16 | the frame when the sound starts to play |
<Heights> | ||
<Height> | float | |
<Velocities> | ||
<Velocity> | 2 x float | |
<Rotations> | ||
<Bone> | sequence element | |
<EKey> | int8 + 3 * float | |
<QKey> | int8 + 4 * float | onisplit v0.9.54.0 produces those <QKeys> (quaternions) instead of (euler rotations) <EKey>. |
<PositionOffset> | ||
<X> | ||
<Z> | ||
<Positions> | ||
<Position> | ||
<Height> | ||
<YOffset> | ||
<ThrowSource> | "<ThrowSource />" if unused. | |
<TargetAdjustment> | ||
<Position> | 3 * float | |
<Angle> | float | |
<Distance> | float | |
<TargetType> | flag | The flags are part of the animation type list.
|
<SelfDamage> | "<SelfDamage />" if unused. | |
<Damage> | sequence element | |
<Points> | int16 | damage taken by character |
<Frame> | int16 | frame of the animation, when damage is dealt |
<Attacks> | ||
<Attack> | ||
<Start> | int16 | First frame where damage can be inflicted to an opponent. |
<End> | int16 | Last frame where damage can be inflicted to an opponent. |
<Bones> | flag | Set here the bones that can inflict damage. |
<Flags> | flag |
|
<Knockback> | float | |
<HitPoints> | int16 | damage points |
<HitType> | flag | Animation type for opponent's animation when attack isn't blocked. |
<HitLength> | Number of frames for how long should blocking char remain in hit anim when he gots hit. | |
<StunLength> | int16 | Number in frames for how long should blocking char remain in blocking animation. |
<StaggerLength> | int16 | Number of frames for how long should blocking char perform stagger anim after sucessful block. |
<Extents> | Nowadays that data becomes calculated from onisplit automatically. | |
<Extent> | One tag per frame. In numbers: attack end - attack start + 1. (E.g. end=5; start=6; it makes 2 involved frames.) | |
<Angle> | float | In degree. |
<Length> | float | |
<MinY> | float | |
<MaxY> | float | |
<AttackRing> | Contains always 36 <Length> tags, no more, no less. Gets calculated by onisplit. | |
<Length> | float | Horizontal extents in 10° intervals. They make a zone of danger so the AI knows that the animation is harmful there. (It give them the chance to dogde an attack.) |
extents and XML
Ever wondered how comes Artificial Intelligence can recognize incoming attack and block or dodge? Extents ( found out by Geyser and fully uncovered by Neo ) are the key.
There are two types of extents -
- <Extents>, its packages store this info:
- <Angle> at which is this extent radiated from character. 0° is in front of character, 180° is in the back
- <Length> of this extent,
- <MinY> minimal height of this extent
- <MaxY> maximal height of this extent
- Length, MinY and MaxY serve for creating invisible area in space which is "dangerous to be in". If AI collides and notices it (refer to notice field in MELE), it will attempt to block or dodge according to its modifiers in given MELE profile. Again, see fields in MELE.
- Number of <Extent> is equal to attack frames: <End> minus <Start> plus one (because start frame counts too).
- (e.g. TRAMKONCOMkick_low1: <End>30</End> minus <Start>22</Start> plus one = nine <Extent>.)
- Number of <Extent> is equal to attack frames: <End> minus <Start> plus one (because start frame counts too).
- These extents are pretty impossible to guess, so leave them until Neo comes up with extent computation ( probably from attack bones and bonetrack rotations ).
- BUT
- Always add at least one package, because its Length, MinY and MaxY will be taken as the longest extent, the most maximal Y and the most minimal Y vales. Those are needed, otherwise character won't react to this attack.
- <HorizontalExtents>, its packages store this info:
- 36 fields (exactly 36, no more, no less, otherwise it won't compile back into .oni file), which correspond to areas in 10° intervals around character ( so overall 360°, full horizontal circle around character).
- Imagine character. Look at it from above. Make a circle with this character being center of this circle. Now divide this circle with lines after each 10°; and those are horizontal extent lines used by packages ^_^.
- Once more 0° is in front of the character, 180° is behind character. Intervals go clockwise. So first package is horizontal extent for 0° line, second package is for horizontal line which is 10° clockwise and so on.
- These extents can be guessed up to some degree. Use common sense, look at Your custom attack and tip which lines are probably intersected by attacking limbs of Your move.
- Watch out - if attack is frontal ( direct kick forward ), you should worry not only about 0° (directly front), but also about 10°, 20° (a bit to the right) and also about 340°, 350° (a bit to the left).
- Next guess the length (you will get used to the sense of distance soon), write it in, test it with some AI which blocks a lot. If you did it right, Your attack will be often blocked.
- Don't overdo it with horizontal extent length - too long will cause AIs to react too far from you, does not look pretty.
Have extended fun, --Loser 19:12, 13 July 2010 (UTC)
adding colorful trails
Open the xml formated TRAM and search for the "Particles" tag and insert your code.
First example: TRAMSTRCOMcomb_p_p.xml
<Particles> <Particle> <StartFrame>0</StartFrame> <EndFrame>12</EndFrame> <Bone>LeftFist</Bone> <Name>contrail</Name> </Particle> </Particles>
"contrail" is looked up by the used character class (ONCC) which lunch the actual particle, here it is "h2h_strtrail_e01".
Second example is about two different contrails in one TRAM at same time. The animation is "TRAMSTRCOMpunch_heavy.xml".
<Particles> <Particle> <Start>0</Start> <End>54</End> <Bone>RightWrist</Bone> <Name>contrail</Name> </Particle> <Particle> <Start>0</Start> <End>54</End> <Bone>LeftWrist</Bone> <Name>contrail_2</Name> </Particle> </Particles>
Note that you need to register the second contrail in the used ONCC as well. Using your own contrail particle is also possible, just insert it's name between the <Type> tags.
<ONCPParticle> <Name>contrail</Name> <Type>h2h_strtrail_e01</Type> <BodyPart>-1</BodyPart> </ONCPParticle> <ONCPParticle> <Name>contrail_2</Name> <Type>h2h_murtrail_e01</Type> <BodyPart>-1</BodyPart> </ONCPParticle>
fw throws
Situation: you load two chars into Mod Tools and rotate (+/-180°) the throw target char because you want them to stand face to face. When you are done animating, the target animation would need to be reversed again: multiplying the velocities with -1, also the rotation needs a tweak. So far it looks like you need *(-1) for the x rotation and -/+180° (depending on your initial change) for the y rotation.
Excel macro to tweak fw throws
- put your files into the "input_and_output" folder
- disable macro security if you don't want to click every time on the macro option button
- close other worksheets first before you run the macro
- if you are not afraid of VBA code you can enter the developer environment by hitting [alt]+[F11], e.g. for extending the attack library with more screenshots and settings
- in that case search for: "LibraryThrows", " LibraryAttack", "Picture", "CBAttackHelp.AddItem"
a look on run move complex
Example on Striker's moves, meant as illustration for "what would be needed for new run trams".
Run cancel:
- STRIKEidle1 / another idle animation
- STRIKErun1stepa
- STRIKErun1stepb
- STRIKEidle1 / another idle animation
Run - a minimal cycle:
- STRIKEidle1 / another idle animation
- STRIKErun1stepa
- STRIKErunstart
- STRIKErun_rt
- (STRIKErun_lt)
- STRIKErunstop
- STRIKEidle1 / another idle animation
free-to-use TRAMs
Following files are available in DAE (and maybe ONI format).
charA and charB performing stun animations |
- Fury double flip (.dae)
- note: -
- Konoko enters prone mode (.dae + .oni)
- note: prone mode artefact
- Konoko leaves prone mode (.dae)
- note: prone mode artefact
- female stun (throw pair) (.dae)
- note: needs to be slowed down (-> more frames)