Jump to content


Photo

Resdata Info


4 replies to this topic

#1 Kung Fu Man

Kung Fu Man

    the artist formerly known as DarksideX

  • Members
  • 55 posts

Posted 02 September 2004 - 06:05 AM

ANIMATE.IDS / RESDATA.INI

You'll have to forgive me: I kinda ended up writing this as more of a tutorial becuase it was so complex...sorry.:)

The INI:

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
hitsound=abish06,abish07
hitframe=0
dfbsound=FAL_06
dfbframe=8
At1Sound=abish03
At1frame=6
At2Sound=abish04
At2frame=5
Cf1Sound=abish09
Cf1frame=4
attack1=cat1abs
attack2=cat2abs
stance2stand=cc2sabs
stancefidget1=ccf1abs
diebackward=cdfbabs
getup=cgupabs
gethit=chitabs
run=crunabs
stand2stance=cs2cabs
standfidget1=csf1abs
spell1=csp1abs
spell2=csp1abs
stance=cstcabs
stand=cstdabs
talk1=ctk1abs
walk=cwlkabs
walkscale=4.3
runscale=14.0
bestiary=0
armor=5

----------------------------------------------------------

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:

attack1=cat1abs
attack2=cat2abs
stance2stand=cc2sabs
stancefidget1=ccf1abs
diebackward=cdfbabs
getup=cgupabs
gethit=chitabs
run=crunabs
stand2stance=cs2cabs
standfidget1=csf1abs
spell1=csp1abs
spell2=csp1abs
stance=cstcabs
stand=cstdabs
talk1=ctk1abs
walk=cwlkabs

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.

File: 'luckymeb.bam'

Entry: talk1=luckyme

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.:D)

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.:D

----------------------------------------------------------

Now, setting up the animations. The following parameters are available for animation slots:

attack1
attack2
attack3
gethit
run
walk
spell1
spell2
spell3
getup
dieforward*
diebackward
diecollapse*
talk1
talk2
talk3
standfidget1
standfidget2
stancefidget1
stancefidget2
stand
stance
stance2stand
stand2stance
misc1
misc2
misc3
misc4
misc5
misc6
misc7
misc8
misc9
misc10
misc11
misc12
misc13
misc14
misc15
misc16
misc17
misc18
misc19
misc20

*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.

-GETHIT-

This is the animation called when the target is struck. Nothing exclusively special here.

-RUN-

The animation for running. If this isn't present, the walk animation is instead used at double speed.

-WALK-

The animation for walking. If this isn't present, the charcter doesn't change to an animation while walking.:D

-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.

-GETUP-

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)

-STANDFIDGET1, STANDFIDGET2-

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.

-STANCEFIDGET1, STANCEFIDGET2-

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.

-STAND-

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).

-STANCE-

The characters battle stance animation. Usually in this when hostile, hostiles are about, or they've been attacked.

-STANCE2STAND-

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.

-STAND2STANCE-

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.

#2 Kung Fu Man

Kung Fu Man

    the artist formerly known as DarksideX

  • Members
  • 55 posts

Posted 02 September 2004 - 06:05 AM

----------------------------------------------------------

Now, applying sounds...what good is a char anim without sounds attached to the animations?

hitsound=abish06,abish07
hitframe=0
dfbsound=FAL_06
dfbframe=8
At1Sound=abish03
At1frame=6
At2Sound=abish04
At2frame=5
Cf1Sound=abish09
Cf1frame=4

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.

A disection:

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.

-WALKSCALE-

The walking velocity, or how fast the character can walk from one point to another.

-RUNSCALE-

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.:\

-BESTIARY-

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...

-ARMOR-

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.

-WEAPON_CLOWN_RANGE-

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.

----------------------------------------------------------

ANIMATE.IDS

Now, you just made this block, but how do you add it?

Simple.

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).
IF:
-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.

ANIMATE.IDS's structure

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.*

#3 Kung Fu Man

Kung Fu Man

    the artist formerly known as DarksideX

  • Members
  • 55 posts

Posted 02 September 2004 - 06:07 AM

While working with PST animations (for GemRB), i noticed that animation ids are sometimes duplicated (in animate.ids). For example Annah got 0x6002 and 0xe002.
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.

#4 Kung Fu Man

Kung Fu Man

    the artist formerly known as DarksideX

  • Members
  • 55 posts

Posted 14 July 2009 - 03:55 AM

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.:\


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.


#5 Miloch

Miloch

    Barbarian

  • Modders
  • 4750 posts
  • Gender:Male
  • Location:At Large

Posted 02 January 2010 - 01:57 PM

This is one of the only sources I could find that goes into detail about these files. I think it applies to PST's resdata.ini and IWDs' (both of them) sounds.ini files, which appear somewhat similar at least. This should really be summarised somehow and added to the IESDP. These games use these files to assign creature sounds rather than anim.2da files or soundclips coded directly on .cre files.
Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users