Vanilla |
04-01-11 06:56 AM |
Some more tec information on how the crew is animated I discovered so far:
The crew animation consists of six parts each represented by a file (or set of files that must be merged):
- Waypoints set. Those can either be defined in a separate GR2-file, as in the case with U-boats, or directly on the model file, like in Small_boat in the Sea folder. As of now we cannot edit GR2 files, so addition, deletion or direct editing of the waypoints location is not possible. On the other hand waypoints locations can be tweaked through waypoints_info files (see below). Besides Paris_England claims that it is possible to add waypoints by creating a new waypoints 'layer' by copying the original GR2 and adding the copy to the model so you have two sets of the same waypoints. That is how I understood it, he doesn't give a lot of details on how to do it. Those waypoints can then be moved through info file. Notice, that for some models there are several files that need to be merged, for example every submarine have several 'common' rooms and its own specific heck torpedo room, that is defined in 'TRA' file, the same is true for conning tower.
- Characters set. It is a CHR file. These files define what characters will be there in animation, how they will look (leg, torso, head, cap, objects they will hold), what scripts and files define their actions and interactions with the player. If you need to add, delete or tweak a character - that is this file you should be editing. I don't know yet to what extent they can be edited in Goblin. Apparently to add or remove crew you need to be hex-editing those (that is what Paris_England has skillfully done, as I guess). There can be several CHR files for a model. For example submarine has quite a few - one for each room.
- Scripts. Those are:
- 'Strategies' definitions. AIX-files in Scripts/AI/Crew folder. A 'strategy' is a animations' sequence of a particular character for a particular situation. They can be attached to a particular condition either directly in the AIX-file or through crew_commands file. So for example if an order to dive is given or a proximity explosion just happened - what the character should do. All the usual bed lying behaviours (idle strategies) are there as well. You can make the character change appearance from the script: make objects appear and disappear in his hands, etc. There is a short help-doc on how to write the scripts in the folder with them. The problem with them is that there is no list of methods (functions) that can be used in the script.
- Crew commands. Crew_commands*.txt files that establish a correspondence between a command given (for all commands see Commands.cfg file) and strategies of the crew. Commands priority and min and max number of people that should participate in the action can be set there as well. There is a help comments in each of those files on how to edit them.
- Dialog scripts. I haven't looked into those yet. Apparently they define animations played when interacting with the player. There are also dialog files.
- Waypoints tweaking. Waipoints_info*.txt files - they hold information about each waypoint's offset: three floating point digits that define offset on X, Z, Y axes (in this sequence!), you can move a waypoint this way to wherever you want. NB: try decimals first - offsetting is very sensitive, often whole numbers move the point way too much. Next thing these files hold is the default strategy for a waypoint - if a character is on this particular point it will start this particular strategy if no other orders are given.
- Waypoints transition. Waypoints_edges*.txt files - define what 'neighbouring' waypoints a waypoint has and animation that should be played when transiting between them. That is if a character comes to waypoint C, to which points he can go from there and what animations should be played when he moves between them. Notice, that the 'neighbours' should be defined both ways: one entry for A to B and a separate one for B to A. You should also remember that you can define it only once in one place - for example transitions between compartments should be defined in only one of them or in a separate 'whole submarine' file (as devs have done it). Only special 'transition' animations can be used for the transitions for them to happen seamlessly. They are characteristic in the sense that they animate 'moving' without the actual movement, they are then given 'speed' in animations_info.txt file (in Characters/Animation folder) and so it creates the actual movement. This is done so that the character can move any distance (waypoints can be close or far or whatever from each other), while other specifically tailored animations move him only a set distance from the initial point. So far I know that only four animations can be used seamlessly for transitions: teleport (that is not an animation but rather a command in aix-file, so you cannot assign it in the edge file), walk, run and climb ladders.
- Animation tweaking. Animation_info*.txt defines how a particular animation used should be played. You can define initial angle the character should face (from 0 to 180/-180). That is if you set it 0, -90 the character will first turn to face the bow of the sub, then play animation (he will snap-turn to the animation preset if it is not the same as facing angle), then turn 90 to the right. If the angles are equal - he will first turn to the first angle heading, then play animation and stop, 2nd angle is ignored. Notice that you cannot turn the actual animation, it will be always played at the same angle no matter what. If, say, some cook_walk_to_commander animation is created so that it is played from heck to bow direction you have no ability to turn it. Notice also that strangely enough some animations (like walk or run) are turned, but they are turned by the engine without your input. I recon to make other animations turn GR2 files should be edited. Or there can be another possibilty or tool that I have overlooked. In the animation files you can also specify speed, head movement (yes or no) and other applicable options. Notice, that those have no effect on most of the animations. There is also 'transition XY' option, I am not sure what it does, but I recon it has something to do for transition between sitting, laying down, standing up etc.
Most of the interconnections between files can be determined in Goblin either by looking at Project tree or through opening 'Sapiens_manager' controller of the model.
Note as well that you cannot edit waypoints behaviours in Goblin. Although there is a waypoint editor you most obviously will open when modding animations and you can edit waypoints animation there - the 'save' option is always greyed-out. The only way to edit those are through txt and aix files.
NB: to see the effects of waypoints_info.txt and waypoints_edge.txt editing (notepad or whatever) just hit F9 (refresh) in Goblin. Changes in animation_info.txt files require you to re-open the files for the model to see the effects of the edit. And if you change any of the AIX files you will have to close and re-open Goblin. It appears it loads the scripts only once as it opens.
NBB: Don't forget to make back-ups and experiment first with small_boat in the Sea folder. And if Goblin crashes - it's its way to tell you you have made a mistake somewhere (most often, only rarely it can crash for other reasons).
|