Posted 02 September 2004 - 06:05 AM
You'll have to forgive me: I kinda ended up writing this as more of a tutorial becuase it was so complex...sorry.
This INI file may appear to be for refference only, but it is actually the control for Torment's animation structure. Most entries reffer to bam files, while a few reffer to sounds attached to be played during the animation, and when to play it. Confused? This might help:
[0 ] // Abishai
First off, each entry begins with a numberal in brackets. This number is refferenced in the ANIMATE.IDS file, but more on this later. The allowed ranged is from 0 to 4095 (Meaning, you can have up to 4096 animation entries in PST.) So, for starters, you know how to index the entries. Groovy, no?
Next let's skip over the sounds block, and go straight to the meat and potatoes of the INI file: setting up the animations:
First, the most important thing you should know concerning these animation files is that each filename listed here really ends with 'b' (meaning, the BAM file for attack 1 is really cat1absb.bam). This extra letter is required, oddly, perhaps to make sure the BAM filename is exactly five letters long. Despite what some appearances here might leave you to conclude, the first seven letters of the animation name are 100% unimportant. Seriously. You'll see things like 'cat1abs' but in reality, the filename could be called 'xat1weeb.bam', 'cnoevilb.bam', 'luckymeb.bam', etc, and would still function here. You just simply drop the 'b' on the end when you list it in the INI file, like so, and you're alright.
The overall point of all of this? The BAM filename for the animation must be eight letters long, and end with B. Those are *requirements* here.
Another thing to note concerning animations: each at 5 sequences long, with the exception of walk and run bams. Each sequence is facing a certain angle, and can be picture like so: The first sequence faces straight down, and for purposes of this, will be called 0 degrees. The following animations in relation to this first sequence for everything besides the aformentioned walk and run anims can be though of like this:
0: 0 Degrees
1: 45 Degrees
2: 90 Degrees
3: 135 Degrees
4: 180 Degrees
If you look at one of these animations, it makes sense: The first sequence faces straight down, and the last, straight up (180 degree rotation compared to the first sequence.)
Now, remember the walk and run anims I mentioned? They have *9* sequences. The angles for these can be considered thusly:
0: 0 Degrees
1: 23 Degrees
2: 45 Degrees
3: 68 Degrees
4: 90 Degrees
5: 113 Degrees
6: 135 Degrees
7: 158 Degrees
8: 180 Degrees
A little confused? Well, just take a look at any of the walk or run bams for a creature using Infinity Explorer (the anim will have WLK or RUN in the filename). That should help make sense.
Final thing before I move on beyond how these things are set up: if you noticed, the anims never face the east direction, really. Basically, PST just mirrored the anims when facing that way. So there's no real need to worry about them kemosabe.
Now, setting up the animations. The following parameters are available for animation slots:
*These two are recognized, and listed in the EXE, but are sadly not usable. More than likely, they were dummied out.
If a param with a number appended to it (I.e. talk1) is called with its listing ANIMSTAT.IDS but that particular anim doesn't exist for the set(meaning, if you try to get a char to do Attack3 but Attack3 doesn't exist for the char's anim index) it will try and use one of the present anims instead (In the aforementioned case of Attack3, Attack2 would be used if present. If not, Attack1 would be called. If none exist, no animation is called.)
These do not necessarily have to be in order in the INI file, though it is recommended to try and keep some order to prevent slip ups when modding this.
-ATTACK1, ATTACK2, ATTACK3-
The attack animations. The attack anim used is randomly selected from the present attack anims, and as you can see, a maximum of three. Attack2 cannot be present without Attack1, and Attack3 cannot be present without Attack2.
This is the animation called when the target is struck. Nothing exclusively special here.
The animation for running. If this isn't present, the walk animation is instead used at double speed.
The animation for walking. If this isn't present, the charcter doesn't change to an animation while walking.
-SPELL1, SPELL2, SPELL3-
These animations aren't played randomly, but in tandem: the longer the spell takes the cast, the more anims are used. (Meaning, a fast spell would only play SPELL1 when cast, a moderate speed spell would probably play SPELL1 then SPELL2, and a long spell would play all three, one after the other). Note that all three are not totally required: if only one or the first two exist, it will stop at that one or not try and go beyond the second, respectively. SPELL3 cannot exist without SPELL2 in the set, and SPELL2 cannot exist without SPELL1 present.
The animation played when getting back up from the DIEBACKWARD animation, or when they're getting up from being dead.
-DIEBACKWARD (DIEFORWARD, DIECOLLAPSE)-
DIEBACKWARD is the death animation, and appears to be the the only valid one. The INI file will work properly with the other two, but there is nothing that calls either...perhaps they were meant for specific cases, or random dying selection. Not suprisingly, no entry makes use of DIEFORWARD or DIECOLLAPSE.:\
-TALK1, TALK2, TALK3-
Animations when a character is talked with, or more specifically, when a node is called up in their current dialog file. This includes after the player clicks a reply option, or when one dialog links to another, such as banter dialog. The animation is randomly selected from the three, and TALK3 cannot exist without TALK2 present in the set (same for TALK2 not being able to exist without TALK1)
Randomly played for the character when they remain in the stand animation for a period of time. Selection is random, and STANDFIDGET2 cannot exist without STANDFIDGET1.
Randomly played for the character when they remain in the stance animation for a period of time. Selection is random, and STANCEFIDGET2 cannot exist without STANCEFIDGET1.
The characters stand animation. Usually in this when not in action, and no hostiles are about, are not hostile themselves, and the party has not attacked someone. (In a nutshell, the battle music isn't playing, this is the stance the folks will be in).
The characters battle stance animation. Usually in this when hostile, hostiles are about, or they've been attacked.
This animation is the transition between the STANCE and STAND animations. Also called when an attack animation is called and the attack anim has ended and the character would not normally be in the STANCE animation.
This animation is the transition between the STAND and STANCE animations. Pretty self explainatory.
-MISC1, MISC2, MISC3, MISC4 ... MISC20-
These are twenty miscellaneous animations, used for various things, such as additional special talk or attacking anims called by dialog or scripts, or victory animations and the like. A good example is TNO rising off the table in the game's intro, which is done with the MISC2 anim.
Posted 02 September 2004 - 06:05 AM
Now, applying sounds...what good is a char anim without sounds attached to the animations?
Well, this part is much simpler. They follow pretty much a simple set of principles:
-One parameter says the name of the sound to play, another says on what specific frame to play it.
-Sound names cannot exceed 7 letters, numbers, etc, in length, apparently.
-This parameter block goes before the animations, but after the index number, as you can see from the first example way back there.
-You can have up to three sounds applied to one parameter, but they must be separated with a comma.
hitsound=abish06,abish07 <-- When the GETHIT animation is called, one of these two are randomly played.
hitframe=0 <-- This is the specific frame of the GETHIT animation to play this sound.
Now this is very easy to understand, isn't it? Good. This applies to every one of of these paramters Here are a list of parameters that are available to you to use when linking sounds to animations, and what anims they're for:
-AT1SOUND, AT1FRAME - Attack1
-AT2SOUND, AT2FRAME - Attack2
-AT3SOUND, AT3FRAME - Attack3
-HITSOUND, HITFRAME - GetHit
-RUNSOUND, RUNFRAME - Run
-WLKSOUND, WLKFRAME - Walk
-SP1SOUND, SP1FRAME - Spell1
-SP2SOUND, SP2FRAME - Spell2
-SP3SOUND, SP3FRAME - Spell3
-GUPSOUND, GUPFRAME - GetUp
-DFFSOUND, DFFFRAME - DieFallForward
-DFBSOUND, DFBSOUND - DieFallBackward
-DCLSOUND, DCLSOUND - DieCollapse
-TK1SOUND, TK1FRAME - Talk1
-TK2SOUND, TK2FRAME - Talk2
-TK2SOUND, TK2FRAME - Talk3
-SF1SOUND, SF1FRAME - StandFidget1
-SF2SOUND, SF2FRAME - StandFidget2
-CF1SOUND, CF1FRAME - StanceFidget1
-CF2SOUND, CF2FRAME - StanceFidget2
-STDSOUND, STDFRAME - Stand
-STCSOUND, STCFRAME - Stance
-C2SSOUND, C2SFRAME - Stance2Stand
-S2CSOUND, S2CFRAME - Stand2Stance
-MS1SOUND, MS1FRAME - Misc1
-MS2SOUND, MS2FRAME - Misc2
-MS3SOUND, MS3FRAME - Misc3
-MS4SOUND, MS4FRAME - Misc4
-MS5SOUND, MS5FRAME - Misc5
-MS6SOUND, MS6FRAME - Misc6
-MS7SOUND, MS7FRAME - Misc7
-MS8SOUND, MS8FRAME - Misc8
-MS9SOUND, MS9FRAME - Misc9
-MS10SOUND, MS10FRAME - Misc10
-MS11SOUND, MS11FRAME - Misc11
-MS12SOUND, MS12FRAME - Misc12
-MS13SOUND, MS13FRAME - Misc13
-MS14SOUND, MS14FRAME - Misc14
-MS15SOUND, MS15FRAME - Misc15
-MS16SOUND, MS16FRAME - Misc16
-MS17SOUND, MS17FRAME - Misc17
-MS18SOUND, MS18FRAME - Misc18
-MS19SOUND, MS19FRAME - Misc19
-MS20SOUND, MS20FRAME - Misc20
The parameters are the last bunch, and understandably, go on the tail end of the file. They are all numberical values.
The walking velocity, or how fast the character can walk from one point to another.
The running velocity, or how fast the character can run from one point to another. If this and the RUN animation are not present, the character cannot run, only walk.
-FOOT1WALK, FOOT2WALK, FOOT3WALK, FOOT4WALK-
This was used for environment audio when the character walked, but may be unused FOOT1WALK was the primer to begin counting, and FOOT2WALK, FOOT3WALK, and FOOT4WALK told what number of frame that the character's foot hit the ground...though was not likely implemented.:\
-FOOT1RUN, FOOT2RUN, FOOT3RUN, FOOT4RUN-
This was used for environment audio when the character ran, but may be unused FOOT1RUN was the primer to begin counting, and FOOT2RUN, FOOT3RUN, and FOOT4RUN told what number of frame that the character's foot hit the ground...though was not likely implemented.:\
This says what Bestiary entry (in BEAST.INI, in the root directory) is linked to this particular animation set. Valid values are only 0 to 255, however...
The sound played when struck (in conjunction with the HITSOUND parameter). Also possibly the blood effect shown. Further information has not been gathered at this time.
Unknown...only used in TNO's armed animations, and in those, it's 0. Color range, or additional range with the armed weapon? LUA specific note? Unknown at this time.
NOTE: There is no parameter for size or dialog radius: both are in the creature's file (example: attack Ilquix). Both are also separate, so you can have different interactions with the same anim.
Now, you just made this block, but how do you add it?
Convert the index number of your animation set to hexidecimal. You'll get a number between 0000 and 0FFF (if you get something from the range between 00 and FF, just tack on two zeroes to the beginning. Thus, 1A becomes 001A.)
After you've done that, if you animation is 'true colored' (no false colors that can be altered in the cre file or by weapon color), then add E000 to that value.
If the anim is clown/false colored, add 6000
Confused? This is easier:
Open Window's calculator, and enter in your index number as is (meaning if it's twelve, enter twelve).
-it's true colored, add 57344 to this value
-it's false/clown colored, add 24567 to this value
And then convert it to hex.
Either way, when you have this number, just add it an a desciptive name for it and add it to the end of the ANIMATE.IDS file like the others.
0xE*** - Animation is treated as true colored
0x6*** - Animation is treated as falsely/clown colored
0x3000 - Hard coded animation for CoaxMetal
0xF000 - Hard coded animation for Pillar of Skulls
0x2000 - Hard coded animation for Foundry Gears
0xDF00 - Hard coded animation for Mortuary Ghost(?)
Some entries in RESDATA/ANIMATE.IDS have special features tacked to them:
2, 13, 47, 48, 49, 50, 51, 71, 98 - Weapon color parameter of V1.1 items is applied to these animations and these alone.
81 - The right ring slot is disabled.
47, 48, 49, 50, 51, 81, 82, 93, 97 - Equipping a weapon that has a valid paper doll type changes this animation to match that weapon, so be careful.
82 - Zombie disguise. Running breaks the anim.
93 - Dustman disguise.
*Special thanks to Platter for help on figuring out what the E*** and 6*** meant.*
Posted 02 September 2004 - 06:07 AM
The duplicated AnimIDS are always 0x8000 bigger (highest bit set).
Now, what is the difference?
Can you have 2 different animations for these numbers? If yes, which one is referenced from resdata.ini?
Both 0x6002 and 0xE002 reffer to the same index number in the RESDATA file: 2.
The difference between them is in the case of 0x6002, character color and weapon color are applied to the anims. But with 0xE002, no color is applied (set Annah to this, have her attack, and you'll notice the punch daggers are green in her hands, regardless of what she has equipped.)
Basically, 0x6 entries are treated as false color (or in GemRB's terms, with the nopallette flag at 0), and 0xE entries are true color (nopallette flag at 1). I have no bloody clue why they added two for each:\ Though, not all the false colored anims have a true color counterpart.
Something to note about the original PST anims that I forgot to point out (it really has no bearing on resdata, though)...those that begin with C are true color BAMs, and those with D are false/clown. Like I said, it only has a bearing for the original torment bams, and doesn't seem to be anything more than a note to themselves on which was which.
Posted 14 July 2009 - 03:55 AM
It's been ages, but I'm going to bump this up: if DIEFORWARD is set it'll be used when the character is KO'ed instead of DIEBACKWARD. I haven't checked if DIECOLLAPSE has any effect on this though.
Edited by Kung Fu Man, 14 July 2009 - 03:56 AM.
Posted 02 January 2010 - 01:57 PM
Aurora (new release!) * BG1 NPC * Gnomes * Haiass * Level 1 NPCs * Lost Items * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * In Progress: Adjusted Portraits * DSotSC (Tutu)
Player & Modder Resources
BAM Batcher * Creature Lister * PSPad Highlighters * Tutu/BGT Area Map & List * Tutu Mod List
"Wherefore do ye toil; is it not that ye may live and be happy? And if ye toil only that ye may toil more,
when shall happiness find you?" -H.P. Lovecraft, The Quest of Iranon
Reply to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users