View Full Version : Creative Assembly Need help with descr_skeleton.txt
SigniferOne
02-22-2005, 06:22
I've decided to create realistic hoplite animations, and just released (I've been spending a lot of time lately fiddling with animations and have ) a Beta at TWC (will post here when v1.0 is done).
Now the only way I've been able to get this far is by taking advantage of Verc's awesome AnimEditor program, which allows me to modify animations stored in the skeletons.idx, and even create my own new skeletons (i.e. fs_hoplite, as you'll see in the thread mentioned above).
Now my question is: what is the purpose of descr_skeleton.txt? Verc, the undispited non-CA master of this aspect of RTW, says the file does nothing. However, strangely enough, the game demands that the file be there, or the game will not start.
So, can someone from CA (Jerome, ~:cheers: ) shed some light on this file. It seems like CA originally intended to go foward with this part of the game completely externalized into a text file (as with unit skins, etc). So, it'd be nice if the meaning behind this file was clarified, or even if it was explained how to make the game take advantage of descr_skeleton.txt. Because if we could do that, it would be a miracle.
Ever wondered why some units strike their enemy, and then the enemy reacts with a parry like 10 seconds later? We could fix that if we could use descre_skeletons.txt! You see, in that file you can specify which frame of your animation does the intended action (i.e. attack), so that the computer will know that in my 30-frame animation frame 12 is when the sword is thrust at the enemy, and will run the 'parry' animation in that soldier immediately, making him instantly react to my attack and not wait for my animation to finish. The possibilities, i.e. realistic strike/block battles, are endless.
SigniferOne
02-28-2005, 23:22
Another question for Jerome (who hopefully will see this):
A poster at TWCenter tried to do a hotfix for the legionary stabbing animations by substituting their skeleton to fs_spearman, which makes them hold their gladius at waist level and thrust it forward. However, he added, this animation causes them to attack the enemy at a far longer distance than the gladius can reach.
Me, on the other hand, when creating the new fs_hoplite animations, I used fs_javelinman as my base, who naturally have a short range for attack, and always fight with their enemy at very close range.
Is there a difference between various vanilla skeletons, that determines at what range they become effective? i.e. is there really a difference between fs_spearman and fs_javelinman, that seems to make the former have a longer attack range than the latter? Or is that just an incidental aspect of how the animations work (i.e. the guy doesn't stretch his hand far enough in the animation, but the game assumes he did for the battle calculations)?
OK ... I have done a fair bit of messing around with the descr.skeletons text file, and I can conlcude on thing:
IT DOES NOTHING
To test this theory...first delete the text file, and spot the absolute lack of difference this makes ;)
As far as the animation determining the distance of engagement...hmmm..
I don't honestly see how the two could be linked. I think it is more likely to be the class/category definition in export_descr_unit that determines the rough unit type, and hence it's particular range of engagement. All the animation files do is to determine how the model mesh animates in a set of circumstances. The skeletons.dat file holds all the animations and links certain actions to a certain animation CAS file. If you define a new animation, you will change the visual element of an attck/charge, stand idle etc. but that is all.
JeromeGrasdyke
03-03-2005, 11:19
If you delete skeletons.dat and .idx, the game will parse descr_skeletons.txt instead. This then allows you to create new skeletons by adding them to this file - you can assign animations to actions, set hit ranges and so on here as well.
SigniferOne
03-03-2005, 18:38
Oh my god... Jerome you are the greatest!! ... oh man........
Then since we won't have the animations stored within skeletons.dat/.idx, we will just keep them in their respective directory structures, out in the open, right?
Also, where are all the *.evt files stored? in pack.dat/.idx? If you have a little extra time, can you explain what those two data files do?
---
Edit: Also, I might as well put all my questions into one basket and hope!! What does this do in descr_skeletons.txt:
type fs_swordsman
force_hit_positions_to_cylinder
anim stand data/animations/fs_gladius/LIS 01 Stand Idle.cas -evt:data/animations/LIS 01 Stand Idle.evt
Shigawire
03-03-2005, 19:34
Jerome, you bring the rest of CA to shame, while simultaneously representing them very well! ~:cheers:
SigniferOne
03-03-2005, 21:29
Hmm, if I use Verc's animation extraction program (which works perfectly, that's not the problem), and delete the skeleton files, the game says it can't find any animations at all. Maybe the reason is that the path to them is now RTW/Data/animations/data/animations, but that path was encoded in the skeleton pack files anyway, so..
Well here's the problem: no animations can't be found, the game says. Then I move that entire directory structure into the root data/animations folder, which means the pack.dat/.idx are now mixed in with all of the game's animation files. Then RTW won't start up at all, but show up the starting screen for a few seconds, and then CTD without any errors even. Despite the fact that I have -show_err on.
Where do you I think I went wrong?
Vercingetorix
03-04-2005, 05:59
Yea this is what happens. I thought maybe this was updated in 1.2 but it's been there since vanilla. If the animation files are not extracted it complains about both the cas file and the .evt missing. If you extract the animation files you CTD. Even if you fake the .evt file the game CTD. I remember in the past trying to play with the "-animdb" option but couldn't get anything to work with it.
JeromeGrasdyke
03-04-2005, 11:09
I see what's happened here. The pack files are mounted under the game's virtual file system at the project root, not in the directory where they actually live. So data/animations/data/animations is not the place for them to go... Also, the animations pack.dat / pack.idx are linked to the skeletons.dat / skeletons.idx files, and all four should be removed or deleted after you've extracted the pack contents.
So what you should see inside {root}/data/animations after you've extracted the packs is several hundred .cas and .evt files, plus a whole bunch of subdirectories which contain various other anim sets (some names: camel, engine, elephant). The paths for the individual files are given explicitly in descr_skeletons.txt, so when descr_skeletons.txt says it's looking for a file in data/animations/carry_and_artillery it will look for it there, relative to the location of RomeTW.exe o' course.
The .evt files, by the way, carry information about sound events to be played at particular points in an animation, plus a few other event types. I'll dig out the specifics at some point.
Duke John
03-04-2005, 13:49
I have never seen those evt files when extracting it with the tool of Vercingetorix? Am I missing something or does the program need to be adjusted so that it extracts evt files?
JeromeGrasdyke
03-04-2005, 13:52
That sounds possible ;) Alternatively you could edit descr_skeleton.txt to remove all references to the .evt files, in which case you will lose the animation-driven sounds but at least it should load.
I'll have a look and see...
I am going to sit down and read this again when I get in from work....because if this is truly what I think it is ..... this is a simple way to make COMPLETELY new skeletons.
I can make things with broader shoulders....things with longer arms....all sorts of fun stuff....not just scaled in uniform directions ~:)
SO...
1) Unpack all the animations and move them so they sit in the correct place in the file tree ( [root RTW] /data/animations , making sure I keep the sub-directories etc. in their relative positions
2) Delete: skeletons.dat , skeletons.idx AND the animations pack and IDX files
Now...at this point, if I see .evt files, I am a lucky bunny ;) but probably not.
Now...with the pak and idx files gone, the game WILL be reading the skeleton_descr file ( which...luckily I backed up before I deleted it ~;) ) Being Mr paranoid, I have burned ALL the files I was going to mess with in RTW onto a backup.
3) Edit the skeleton TEXT file to remove the .evt bits. This will, I assume, stop some of the sound triggers. Are these anything vital ? I can live without horses neighing and dogs barking, but not without teh delvicate sound of steel on flesh ;)
Then, having achieved a successfully running game it should be possible to create whole new skeletons that won't 'snap' back into stock shapes when the game displays them. This is going to have to get tested!
JeromeGrasdyke
03-04-2005, 15:20
Ok, some bad news. The .evt files specified in the descr_skeleton.txt file get parsed into binary and saved into the skeletons.dat file, and so they have not actually been shipped with the game in an extractable form.
But also some good news: the .evt files are essentially text files, with a fairly simple layout, like so:
event SOUND_AMBIENT stretch_back 6 6
event SOUND_AMBIENT neck_crack 20 20
or so:
event SOUND_BANK unit_run 4 6 RANDOM
event SOUND_BANK unit_run 10 12 RANDOM
event SOUND_BANK unit_march 14 18 RANDOM
event SOUND_BANK unit_march 20 24 RANDOM
The valid sound categories for the second word are: SOUND, SOUND_BANK, SHOCKWAVE, SOUND_VOICE, and SOUND_AMBIENT, the third word is a tag for lookup into the category, while the two numbers are frame counts for start and end times (in the anims 20 fps frame counter).
I'll have a chat with the powers that be and see if we can make the original .evt files available.
You, sir, are a Gentleman and a scholar ;)
I am sure we could 'create' our own evt files, but we would have to make an awful lot of them! If they are willing to let us have the files that would be brilliant. Not only can we then run a fully 'exposed' set of animations, but we also have a template to design new sound routines to go with our new animations. There is one I am dying to add to the Gaulish peasant 'taunt' pose ~;)
Presumably, the sounds will be in an archive file or folder with all teh sounds in it, and the rest is pretty straight forward ( like a lot of the RTW stuff.... it MUST have been designed with modding in mind ) RANDOM, I assume, indicates that it will randomly play ( or not play ) that sound at that point in the animaton cycle.
OK...boss has gone home.... It's Friday...I am officially baling out and going home to play with this :D Look out London traffic...here I come!
Myrddraal
03-04-2005, 17:18
Jerome, you truely are a gent. You can't overestimate the debt that is owed you by the modding community :smile: :2thumbsup:
JeromeGrasdyke
03-04-2005, 17:31
The man from Del Monte, he say... Yes! Now all I need is somewhere to post it up for download. It's about 200 kb zipped up, so not a huge file. Suggestions?
There is a 'files' link at the top of hte page...is it fully functional ?
This is a 'must have' file for modding!!! If I had webspace I would host it :D
SigniferOne
03-04-2005, 18:11
Amazing, Jerome! The Admins of this site can provide all the space you need I'm sure, haha.
One important question on distribution of these files: what kind of appelation do you think it's okay for us to use in describing them (in the Downloads section, for example)? I.e. the files will be under my name, but whe can we entitle them as? Is it ok for us to use big fancy words like "Official Modding Files from CA!!"?
For some reason I don't think you guys would be too comfortable with that, so please specify the format that's most preferable to you, i.e. probably something more discreet and using less words like "official".
The best, and only, thing we can do in return for your wonderful magnanimity is to honor your wishes.
JeromeGrasdyke
03-04-2005, 18:28
For some reason I don't think you guys would be too comfortable with that, so please specify the format that's most preferable to you, i.e. probably something more discreet and using less words like "official".
Truth, indeed. Let's have something suitably low-key, like "Modding extras supplied by CA (unsupported)".
SigniferOne
03-04-2005, 18:42
That will be exactly the phrase that I use, and I will also make an extra paragraph in the Readme specifically to this extent as an unofficial and unsupported release, and all the legal mumbo jumbo.
You rock Jerome.
SigniferOne
03-04-2005, 19:00
Done.
http://www.twcenter.net/downloads/db/index.php?mod=403
I had to fiddle with the title a little bit, in order to squeeze the all-important "(unsupported)" in.
:D I can't believe I am only the second person to downlod this !!! I suspect hte 'count' may be rising over hte weekend!
AoM_Horus
03-04-2005, 19:24
Thank you very much Jerome, i know this is something a lot of RTW fans will appreciate. ~:)
Anybody got this to work ?
I tried it, and all I can get is a CTD :dizzy2:
I used a fresh, unaltered setup, patched to 1.2
Then:
I ran V's animation unpacker and created the subfolders which I then shifted to sit in the right place ( rather than [root]data/animations/data/animations...I have them where they ought to be )
Then I deleted the pack.dat and IDX and the skeleton dat and idx files.
Then, I extracted the evt files to my animation folder
Then I ran the game. The front screen pops up as it should, but then I crash to desktop with no error message.
Did I do something wrong ?
SigniferOne
03-04-2005, 19:41
Do you reference any custom skeleton files such as my "fs_hoplite" in your descr_model_battle.txt ?
EDIT: Btw, it's not like I'm saying that it worked for me. I haven't gotten home yet to try it out. But there may be a few accidental reasons on our side that prevent it from working. Just make sure that no files try to access a non-existant skeleton, or something like that.
Will some kind soul who grasps this stuff better than I do :dizzy2: please create and post for download a slower horse skeleton and the fixes required to make cataphracts use it?
No..I'm not referencing any custom files. Always try out new things on a clean install in case custom stuff conflicts. This is a pure and clean install patched to 1.2
Annoying thing is it doesn't give an error message :furious3:
If it did, and said it couldn't find such and such a file, it would be easier to pin down! I think this is something other than just a problem with file paths for the anims. It looks to me as though it is looking for a file to parse which it can't find....and I suspect the DAT and IDX files I deleted contain something that V's extractor isn't extracting ... but I have no clue what it might be.
SigniferOne
03-04-2005, 23:46
Where do you place all of the animation files, and the evt files? I'm asking for the full path, from the root of RTW directory.
I put all of the extracted animation files into [ROOT RTW FOLDER/data/animations
I kept all the sub-folders where they were, and then moved the whole lot into place.
SigniferOne
03-05-2005, 21:24
Ok so far I'm having the same problems of crashing. The animations seem to be extracted with Verc's program, the EVT files have been provided by Jerome, but all this seems to not be enough. There's something else there, something Verc's program is not extracting, that the game doesn't find. And I don't think it's something that is referenced from descr_skeleton.txt, because then the game would complain it isn't there.
Just for reference, here's what I did:
Verc's program extracts all animations into Root/data/animations/data/animations. So I took all of those files and coped them into Root/data/animations. Then I extracted all of the EVT files into the same folder,resulting in 1,200 files being there, which is in accordance with the numbers Jerome gave. And that's basically it. I restored all files like descr_model_battle.txt to their vanilla form, so that they wouldn't reference any new stuff.
Currently I'm planning to do some massive editing of descr_skeleton.txt. Basically I'm going to remove every other skeleton other than some basic one, and even there remove all references to EVT files. I just want the game to RUN with parsing descr_skeleton.txt; if it does that, then I can continually add stuff and verify exactly what it is not finding in the files Verc is extracting.
SigniferOne
03-05-2005, 21:30
This will be a time consuming process, so any help or individual attempts to do the same thing are welcome. That way results can be verified with more than one example.
Grrr...this is turning into catch 22.....
I have tried removing lots of skeleton references, but all Iget is CTD's. There is no error message given to hint at what it is missing. This means I can't tell if I have done something silly when I chopped great lumps out of the file, or that there is something more fundamental here.
I believe the game is crashing purely because the skeleton DAT and IDX files are not there. It 'should' then use the text file and extracted animations....but it doesn't seem to.
If we created a 'dummy' set of files, we could test it... but I can't get V's tool to actually delete files!!!
Presumably, if it HAS to have the stock files, we should be able to put a dummy file with EVERYTHING V's tool extracts...removed. Then...though, there is no guarantee the text file will be doing anyhthing.....
SigniferOne
03-06-2005, 23:58
I have the same problem. Let's wait for Jerome on Monday. :) There's probably one last little thing we gotta do, that we don't know about yet.
Vercingetorix
03-07-2005, 06:47
There is a command option "-animdb". I'm sure it does something related to what we are doing. From looking at the error messages it generates you can get some idea of what it does but the actual usage is unknown.
Myrddraal
03-07-2005, 11:04
Jerome? ~;)
I tried taking out animations from the pack and replacing them with extracted copies of the same files. I moved out about a dozen 'Testudo' animations and deleted them from the animation archive.
Game then CTD's
Now..If you create new animations and add them to the file, it works OK. Or, at least, I presume so. I haven't tried the new Hoplite animations....but I assume they worked properly ~:)
Anyway....this leads me to some assumptions:
1) If you can create working animations which did not exist in the packs then there is nothing extra that is required to make a working animation
2) If you REMOVE things from the packs, the game does not work EVEN if you have provided the content you removed outside of the packs
3) Remove the packs and the game CTDs
Conclusion:
The game ALWAYS reads the pack files, and checks their contents somehow. This may be looking for a check in the file, or it may be comparing the contents against the descr_skeleton file ...or SOMETHING.
As soon as you tamper with the pack files, the game won't start up.
SigniferOne
03-07-2005, 13:21
But how do you know you've extracted everything from the packs? If not for Jerome, we wouldn't know there were EVT files in them.
Oh and also one thing if you change the file with a hex editor and add more information the game will ctd also. And this would be usefull also for creating new sekeletons.
But how do you know you've extracted everything from the packs? If not for Jerome, we wouldn't know there were EVT files in them.
My assumption is based on the contents of the descr_skeleton file. If you look at the things it calls for, they are only .cas or .evt files, as far as I can see.
If this file 'takes over' when the animation and skeleton archives are removed, then the only files it would look for are the ones it lists.
Now...if there was something 'else' in the files that we need, how come the game crashes when I remove a couple of animation files from the Pack.dat / idx files. Surely, the game would run OK until some unit or other tried to use those animations UNLESS there was a check function at startup that verifies the presence of the animations. If this process ONLY looks at the compressed archives and NEVER at the file structure outside of the archives, then that would explain what we see.
I assume ( though I could never make it work ... ) that it is OK to add NEW animations to the archive without the game CTDing. This implies that the extra items are not on the game's internal 'checklist' but since it found what it was expecting to find, it was OK about it.
the BIG question now, though, is WHERE is the check made and how do we stop it!
I think this can only be answered from the inside
Also...this drags up one or two other realted issues that have been troubling the old grey matter....
If...for example.... I wanted to make a '4 armed' creature...
1) I would need a new mesh ( easy .... know how to do it )
2) I would need a new skeleton with some extra bones. These would need to be linked and setup in Max ( not so easy..but know how to do it )
3) I would need new animations. 20 frame limit, move the parts in max frame by frame and save the result as a CAS file. ( never done it..but it should be do-able!)
WHAT NEXT...
1) Stick model and texture in usual place. Easy
2) Now...there is no way I know of to load this skeleton into the DAT and IDX file. It can't be anywhere else.
3) Should be possible to add the new anims to the animation folder, or add them to the archive without creating a CTD.
Linking it all together.... the unit can be directed to use the new skeleton...assuming I had got it into the archive.. :help:
The animations SHOULD be readable...if there was any way of making the game read the descr_skeleton file...RATHER THAN LOOK FOR THIS DATA ELSEWHERE, or of editing that data which MUST live in the dat or idx file archives
Otherwise, you never actually over-ride the skeleton data held in the skeleton.dat / idx file and your skeleton will not be found. It also forces ALL skeletons in the game to follow the same basic patterns and proportions.
Arrgh....this is so close...and yet so far away from making it possible to REALLY change around this game and bring in some truly exotic untis.
Ohh...er....another thought occurs... ( happens sometimes with me :balloon2: )
I was deleting BOTH pack files and BOTH skeleton files. Now...As far as I can gather, V's tool is extracting the animations from PACK.DAT and PACK.IDX but I don't recall that it extracts anything from SKELETONS.dat or idx.
The tool allows you to EDIT those archives, but does not take anything out of them. At least....that is how it looks to me.
What form are the SKELETONS actually stored in?
Teh animation CAS files are just giving instructions to the skeleton structure in the model file, but something else is clearly inside the SKELETON files. It has to be holding more than just a copy of descr_skeleton and what it does hold has to be linked to both the CTD issue and the fact that no matter what changes you make to the skeleton in the model CAS or the animation CAS files, only the changes made to scale in the DAT actually have an effect.
Vercingetorix
03-07-2005, 20:48
Skeleton.idx and Skeleton.dat is simply descr_skeleton.txt in a binary format. Pack.dat contains only the animation .cas files not evt files. I don't think that there is a check going on because if you delete descr_skeleton.txt (and you have the .dat/idx of course) the game runs fine. It's funny why this would not work exactly like the events.dat and the descr_sound* files. In the case of sounds you delete events.dat/idx and it parses the sound txt files, I'm not sure why it doesn't work the same with animations.
The error messages of '-animdb' from the exe:
AnimDB: Could not build skeleton animation for anim '%s' in '%s' skeleton
AnimDB: Could not read parameters of anim '%s' in '%s' skeleton
AnimDB: Could not load - '%s'
AnimDB: Unknown animation - '%s'
AnimDB: %s - %i skeletons %i anims
For those not familar with sprintf, %s means string and %i a number...
Aww.....
So, from what V is saying.....we have everything we need ..IN THEORY, but in practice, the game just wants the files and isn't doing what it ought to do.
We have the animation CAS files
We have the EVT files
We have the skeleton dat / idx in the form of the descr_skeleton.txt
But the game CTD's because it is still looking for the archives, rather than just what they contain.
If that is true...there really isn't a way round this short of a patch from CA.
Mind you...all this doesn't really explain my '4 armed man' scenario. When I was trying to make a new skeleton for large creatures, I tried every permutation of change to animation cas files etc. but never managed to get a REALLY new skeleton. I tried to move the pivot points on both the game model AND the animation files, but never got a change that took effect.
Vercingetorix
03-07-2005, 21:25
Yea the actual skeleton bone positions are in skeletons.dat
Ahh...thanks Vercingetorix :)
THATS what I need to change! I know the data for this is not part of the text file, since that just seems to provide a list of animations to use.
Any chance of being able to load up a completely new skeleton with new bone positions through your excellent editor? In truth, this is the only thing we CAN'T do right now
SigniferOne
03-07-2005, 22:57
In truth, it'd be more important if we could change things other than mere skeletons. For example, as I said before, there's a lot of fascinating capacity written in descr_skeleton that we simply cannot do right now through mere skeleton replacement. If we could get access to that, it'd be a miracle that lots of people could take advantage of.
Ahh...'mere' skeleton replacement is rather understating what I want to do. At the moment, we have a set and finite number of skeletons. They are:
1) Human
2) Horse
3) Dog
4) Elephant
Thats all. Each has it's proportions rigidly fixed and immutable. If you wanted to make a barbarian with a broader chest...well...you can't. I have tried, but the fixed nature of the shoulder pivots means you are stuck. All ofthe 'warrior' models are teh same stature as the peasants. Thats Ok for ordinary troops...but for Heroes...well...I want some beefier General models, and I can't make tehm work right. All you an do is add a scaling factor. Take a look at the Middle Earth mod....it's Dwarves are a classic example of why I want to be able to do this. They don't look like short warriors...they look like children.
Then, of course, there are the non-humans. My Centaurs work fine until you kill them. Then you get bits of horse and body. Hit them hard and you get bodies popping around like popcorn! I can't make a centaur skeleton.
I also can't make dragons, hydra, cerberus ( with more than 1 moving head ) giant scorpions, trolls that look like I think they should, cyclops, Minotaurs etc. They end up as just 'bigger or smaller human shaped creatures' and I am unhappy with the results. I have put the 'Mythology Mod' on the shelf until this is cured.... so to me new skeletons are THE most important thing we could add to the game. We can already add new animations...we are just tied to the stock skeletons.
SigniferOne
03-08-2005, 14:26
I don't know what you mean. You can go throuigh a few animations and change how broad the guy's chest looks, and it will look broader. You don't even have to change that many, just a few idle animations ones when the guy is stationary enough for people are likely to pay attention. During things like dodging or blocking it won't matter much anyway because the body is in motion and proportions are temporarily distorted, as it happens in real life. That's the solution I've adopted.
hmmm....have you actually got that to work ? Every time I tried to change that on a skeleton, it ignored my change and my unit was unchanged.
Have you got something that actually has that sort of change in it that you could send me ?
I tried moving pivot points a LOT before V's animation editor allowed scaling of skeletons to work. Try moving the shoulder pivots out to double the shoulder width, and see if the change shows up in game. As I understood it, the animation controlled the rotational changes made to the joints, but not the joint locations. This was in the SKELETON.DAT file, which is unaffected by animation changes. Any translational or scale changes made in teh animation CAS files, or the model CAS file were ignored. SOMETHING over-rides them.
This is doubly puzzling, though, if th DAT files is just a binary version of the descr_skeleton.txt file.
Perhaps someone in the know could confirm for me:
1) WHAT defines the position of each joint .... model file skeleton, skeleton dat, skeleton idx, animation CAS ????
2) What is in SKELETON.DAT
3) What is in SKELETON.IDX
4) What is in PACK.DAT
5) What is in PACK.IDX
I think the confusion currently inducing my brain to melt and dribble out of my ears is largely down to the basic lack of understanding of those 5 questions. I thought I understood it..but clearly I don't!
Anyway...important as this clarification is to my mental wellbeing, it doesn't bring us any closer to running a game without the files in Q2-Q4.....
So this is what i know but i'm nor 100% sure:
In the idx file are the list of animations and skeletons.
In the PACK.DAT are the animations.
In the SKELETON.DAT are defined the skeletons.
SigniferOne
03-08-2005, 17:42
The animation controls everything - the joint locations, rotations, the whole bit. Besides, changing the joint rotation itself necessarily affects the location of joints that depend on it.
Yes I have gotten it to work. You don't make the changes in the Model, you make the changes in the particular animations, where you move the shoulder joints to where you want them to be for that frame, and presto. How do you think animations happen at all? Shoulder joints, among others, move! It doesn't matter what the original starting point was, and you can make it whatever you want.
You just have to make sure 3dmax is in animation mode when you affect the joint locations.
I will test this.
I know how animations work .... done plenty elsewhere. Just things don't seem to fit the logic I am used to. I will experiment with this later on. As far as I was aware, the skeleton is defined in the model CAS, where you set the vertex weightings etc.
The animation file was providing the various skeletal rotations, and instructing each joint how to rotate. You never need to 'translate' any bones, as such, since the bones automatically affect those lower done the 'skeleton'. I tried doing this sort of thing before, but got no luck. Hopefully.... I just messed up a bit, and failed to get the animation to work properly.
SigniferOne
03-08-2005, 19:14
Just import a model, then import an animation that can work with that model (ie. no horse animations for soldiers). Then affect the keyframes for the shoulder bones in such a way as to have them visibly different from before, and make sure this difference stays for the entire animation, i.e. not just for that frame. Often that means changing the first keyframe the way you want it to be, copying it into the last frame, and deleting everything in-between. Then after the new improvement is visibly evident, and is persistent throughout the entire animation, export the animation file, update it within the packs using V's program, and you should see it in the game (provided you know which skeleton, and thus which soldier, uses that animation).
A word of caution though, V's program still has a few glitches to iron out in terms of exporting, so in a few rare exceptions the exported animation will not show up properly. But other than that, I guarantee you this will usually work, as I have done many times. That's how I've been creating my hoplite animations, archer animations, etc.
Jerome... are you still with us :) We are almost there, but we still need your help!
Vercingetorix
03-08-2005, 20:43
pack.dat/idx : .cas animation files.
skeleton.dat/idx: skeleton definitions which include everything in descr_skeleton as well as the bone positions and hierarchy.
.cas animation files: quaternion rotations and the position of the root bone through time, otherwise no other bone positions.
Have to say...my experiments are tending to show no change....
Dsyrow1....can you take a standard animation, reposition the bone pivots so that the shoulders are wider and the arms are roughly twice normal length and send it over ( once you have checked it has worked in game )
I cannot make this happen. If you can, having a model to work from would be REALLY helpful.
My tests have all resulted in absolutely no change to the dimensions of the human normal. This agrees with V's definition of the DAT file, where he is stating that the Skeleton.DAT file holds the bone positions and hierarchy.
The animations DO NOT define the positions of the bones base location in the 'crucified' posture, and their hierarchy. Sing along....the leg bones connected to the knee bone.....
Now....if that is true ( and I have every reason to believe V knows whats inside the DAT ) it would follow that we could NOT run the game without the DAT file. The descr_skeleton text file doesn't contain the skeleton hierarchy OR the base bone positions. It just controls the way the animations are assigned to game actions.
In order to make new skeletons, we would need to be able to load up new skeleton definitions and base positions / hierarchy. At present we can only copy the existing ones and assign new animations to them.
Sorry to say...but every experiment I have done on this backs this up. I would LOVE to be wrong....PLEASE prove me wrong.... :embarassed:
Duke John
03-10-2005, 14:36
Jerome
Are the EVT files you provided from before the 1.2 patch? The 1.2 patch included new skeleton and pack files so the CTD when using the evt files might be caused by that.
The 1.2 patch introduced units shielding themselves during marching from missile fire. Is there a new entry (EVT or animation) that deals with this? If so and the EVT files are pre-1.2 patch then the engine tries to find those files, fails to, and CTD.
Edit: I tried it with a 1.1 installation but it didn't work, although it was modded, I don't think there was any confilicts in animation.
All
Has anyone been able to import new animations into the game? It works with fs_slinger_new, but I tried fs_spearman and it CTDs when loading the game. My method:
1. extract animations with xidx
2. use AnimEditor to make new skeleton based on fs_spearman, answer n so that animations are copied.
- When copying the files to R:TW it works, but I haven't added new animations yet.
3. When looking into data/animations/new_skeleton there are no animations, so
4. extract the animations again with xidx
5. instead of replacing animations I just update the pack with the bat file.
6. copy the files to R:TW and C:TD.
Thanks for any hints or help,
Rob
JeromeGrasdyke
03-11-2005, 13:50
Are the EVT files you provided from before the 1.2 patch? The 1.2 patch included new skeleton and pack files so the CTD when using the evt files might be caused by that.
Yes, the .evt files are from the 1.2 patch, and should contain everything you need. The descr_skeleton.txt parser should flag anything that's missing. On a side note, the skeleton base pose (Vercinge's bone positions) is normally taken from the first animation which is added to a skeleton, so it's not necessary to supply this information seperately. It is important to make sure that the transforms in an animation are all relative to the same basepose - we did this by making sure that in Max the animations all contain a single frame at the front of the animation which contains the model basepose.
As to why people are still seeing so many problems: the 1.2 patch build has been archived, so it's a little hard for me to get at right now, but I'm looking into it.
I think most of our problems stem from us groping blindly in the dark ~:)
Where we are all ( and I think it is all of us ) getting stuck is in simply getting the game to run with the archived animations and skeletons all removed. There is something happening here that we don't understand.
Your outline of the process was quite simple and straightforward....but does assume that the tools we are using work as well as the tools you built the game with. It is possible that Vercingetorix's animation unpacker misses something, but we have no real way of knowing.
It would ( I assume ) be a bit beyond the pale to ask CA to release the tools they used to archive / unarchive these files since there are bound to be copyright issues with such things, but I wonder if there is any way that someone who worked with it could run up a list of what should come OUT of the archives when we empty them out. I couldn't see anything listed in the descr_skeleton.txt file that wasn't there....but then...there are a lot of files, and I could easily have missed something.
The other animation infor that has come out of this thread has proved useful to me despite the basic problems with the process.
From Jerome's last post.....
The first pose in Max was always the base pose ( crucified posture ). Presumably, this was at 'frame 0'...with the first actual frame of animation being generated by moving the bones FROM that posture into the first position you want the actual animation to start from. This would store teh translations and rotations that make up the first frame as movements from 'base'. Logical....for predicatable response.
I am still curious as to what actually fixes the relative positions of the bones within the skeleton framework. When I have tried to make new animations, I have been able to rotate bone joints and see the effects..but I have been unable to TRANSLATE a joint. This implies a rigid bone structure that was defined somewhere other than the animation or base model skeletons. From what Vercingetorix has said, this data is stored in the skeletons.dat file. When we extract animations and delete the dat, the game should be reading the descr_skeleton text file..
.. but the game CTD's.
This implies 'something' missing when the game parses the files. It's not the EVT files. We can be sure of that. I don't think it's the animation files....since we don't get an error. Every time I messed up an animation file before, I would get an error that said it was 'missing' such and such a file. No error message here at all.
So..either it crashes because it HAS to have these archived files and isn't looking for an alternative....
or it crashes because something else is missing. Something other than the descr_skeleton.txt, evt files and animation CAS files.
Jerome...I think you could be or only hope of getting to the bottom of this :bow:
SigniferOne
03-11-2005, 18:31
As to why people are still seeing so many problems: the 1.2 patch build has been archived, so it's a little hard for me to get at right now, but I'm looking into it.Thanks a lot Jerome!! We'll all be hopeful and waiting :)
EDIT: Here's a question: what determines how often a unit enters one of the Idle animations? Is there some hardcoded timer, some soft (text) coded timer, or is it simply determined by the number of idles, wherein a unit with 20 idles will enter one of those animations more frequently than a unit with 6 idles?
Maybe the descr_skeleton.txt wasn't updated in the patch and since there were done some changes to the animations we need descr_skeleton.txt for 1.2 patch.
Right....tried some lateral thinking here:
I ONLY deleted the skeleton DAT and skeleton IDX, and the game DOES parse the descr_skeleton text.
Unfortunatley, it can't find the animations in the pack.dat.
I changed the name of the first animation in the descr_skeleton file to ...er...'boll**s.cas' and I got an error message on startup that said it couldn't find that animation. Well...it wouldn't...it doesn't exist. What it confirms, though, is that the game read the file.
When I changed it back to the stock values, though, it crashed saying it couldn't find SG 01 idle 01.cas ... which is the first animation listed in the file.
Easy...I hear you cry...just extract the animations and put them in the anim file...that will cure it.
er...no.
As soon as I run the game with a single animation OUTSIDE of the pack file, I get a CTD. I was expecting it to fail to find the next anim, but it doesn't. The file extracted from the PACK.DAT with V's animation
So, I tried some variations. I moved the animation file I had extracted 'SG 01 idle 01.cas into a subfolder under animations called 'dummy' ... which should have put it somewhere the game wouldn't look..but it STILL ctd's.
OK...this was interesting...
So, I set up a new folder under my RTW root, called 'dummy' and put the animation in there. Changed the descr_skeleton to point at that folder, and ran it again. CTD. expected that! Changed the path in descr_skeleton back to standard, and it again, cannot fild the file.
CONCLUSION:
Delete skeleton.dat and skeleton.idx and the game DOES parse the descr_skeleton file.
CONCLUSION 2:
Running with the stock animations outside of the PACK.dat file is fatal to your game. The game cannot find them IN the pack when the skeleton file archive is removed, but it will not accept them elsewhere. Now..I don't know why, but I am assuming since someone has made a new set of animations for a new skeleton, it MUST be possible to run with new skeletons and externalised anims for them. The new skeleton is a copy of an existing one made through V's animeditor, and the new anims created through the Max plugin. This, however, would NOT have been using the skeleton text file, but the dat and idx files......
confused....you bet!
SigniferOne
03-12-2005, 18:59
Can you elaborate on conclusion 2? Specifically on the new skeleton part?
OK...you made a new set of Hoplite anims.
I presume you made them by first copying a skeleton using V's anim editor tool, and creating a new 'blank' skeleton ( fs_hoplite ) and then creating new animations for them.
I also recall your initial release of this was as external files NOT as part of the PACK.DAT and PACK.IDX. I am assuming you got it to run that way while you were working on them. If you didn't....then that might change some things.
Can you confirm any of that?
Now that I have pondered it more.... it seems logical to me that the descr_skeleton file WOULDN'T find animations in the archive. The path to each file listed in the text file is relative to the root of RTW install, and would not be 'findable' in the archived form. What we need to ascertain now, is why extracting the files from the archive causes a CTD. Just having 1 FILE out of the archive screws it.
I wondered if having an animation IN the archive as well as out of it might cause a conflict, but this isn't the case. I created a new anim called 'frogbot' by renaming an extracted anim. Next, I added a new line to descr_skeleton that listed 'frogbot'. I put it in 'root'/dummy and set the path in descr_skeleton to that as well.
So, there was no chance of a conflict..... but it still CTD's . Interestingly, though, rather than an INSTANT one, it took quite a while.
SigniferOne
03-12-2005, 23:28
In my release I did have the external folder in addition to the packs, but I later realized that it was rather silly of me because all of the anims were inside the packs anyway. I was a newbie to all of this then, and my next release, were I to do it the same way, will only contain the pack files. I don't know how to make the game access both the packs AND the external anims.
Hmmm... I wonder.
Did you try it WITHOUT adding the anims to the pack file ?
If you didn't, try it. Every time I try and get the game to run with anim files outside of the pack, I get a CTD. There is nothing wrong with the anims themselves. They run just fine, and in the case of my tests, they are actually stock anims too.
I find this a little baffling.
Here's the logic ( or lack of it )
Run the game with no skeleton.dat or skeleton.idx, and it's OK 'cos it looks for, and finds descr_skeleton.txt.
Run the game and force it to look for animation CAS files ANYWHERE BUT IN THE PACK FILES and you get a ctd.
This is nothing to do with the actual CAS file...but seems purely to be down to where the game is finding it. It;s exactly in the place the descr_skeelton files says it should be.... but just somehow 'wrong'
This leads me to wonder....
When the anims are PUT IN THE PACK, they are compressed. Presumably, when V's animation unpacker drags them out, they are 'uncompressed'. This would be a logical thing to do, since only then could they be edited as CAS files.
What..I wonder... if the game engine EXPECTED THE FILES TO BE COMPRESSED AND TRIES TO UNCOMPRESS THEM. Naturally...that is going to fail.
I can only assume that the game engine has been set up to read in ONLY compressed files from the archive and nothing else. V's unpacker is translating them back into their correct form, but the game doesn't know that
Thats all I can think of!
SigniferOne
03-13-2005, 03:37
Well I tried a lot of things and still got CTD. I deleted all other skeletons than fs_spearman, and left only those anim files in the data/animations folder. I even doublechecked descr_skeleton.txt for all the files it references and made sure they were there, but still no luck.
But something interesting: if you keep the original skeletons text file, the first skeleton is "named_with_army" or something, which is a campaign map skeleton. If there's a problem there, the game CTDs very soon after starting up. If you delete all skeletons except for "fs_spearman", which is a battle map skeleton, the game really loads a long time before CTDing, and takes a long time to redraw Windows which means a lot of stuff was loaded into memory.
I got a similar 'long time wait for CTD' when I added a non-original file name in a new location to descr_skeleton. It took a long time to CTD, but it still did so with no error message.
When I had no external anim files, I got the file not found thing. External anim files just seem to be a death sentance to running the game. I am SURE the game is translating them into something ( maybe RUM files ) and that translator is ONLY looking at the archive. When it finds anim files in raw CAS format, this takes it out ina CTD.
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.