SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-28-11, 06:21 PM   #1
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
[TEC] Characters' animations how-to's

Nothing major, just the way you can check all the animations for characters available in the game if you don't know it already. It is quite simple. I know that there were quite a few questions if for example ladder climbing animation is available - it is, you can see it.

Here goes how:
1. Open Goblin, do: Tools->Show scene tree.
2. Do: File -> Open.. -> data(backup)/Characters -> just drag-select all three files there -> Open.
3. Click somewhere in the view and hit Ctrl+Q to center on the figure. You will see the generic figure in 'no-animation' posture.
4. If you want to change appereance of our sailor, right click on the Dummy01 in the Scene tree->Edit controllers->click on 'Sapiens' in the 2nd column. In the table on the right you will see options to select different head/torso/legs and two objects the sailor can have (check knife out! ).
5. Merge in the animation. Do: File -> Merge -> Animations folder -> select any animations file -> Merge.
6. Enjoy. Check out his dancing! Or make him take cover!

P.S. Don't you ever save into normal data folder. Make a backup!
P.P.S. All the ladder climbing and giving way are there, even running and dropping down (alle Mann voraus!).

Last edited by Vanilla; 04-09-11 at 08:28 AM.
Vanilla is offline   Reply With Quote
Old 03-28-11, 06:35 PM   #2
THE_MASK
Ace of the deep .
 
THE_MASK's Avatar
 
Join Date: Jan 2006
Posts: 9,226
Downloads: 901
Uploads: 73


Default

When will the mod be ready ?
THE_MASK is offline   Reply With Quote
Old 03-29-11, 09:11 AM   #3
oscar19681
Admiral
 
Join Date: Jan 2004
Location: netherlands
Posts: 2,020
Downloads: 119
Uploads: 0
Default

You must first open the characterbodyparts gr-2 , then merge the characterbodyparts.chr and then merge with a animation.
Anyway when i want to change the the head of something i get a pull down menu from the editor in the left top when clicking on the current bodypart but it dissapears so quickly that i cant select anything
__________________
we live we die but death does not ends it.

Jim Morrison 1943-1971
oscar19681 is offline   Reply With Quote
Old 03-29-11, 03:29 PM   #4
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

Quote:
Originally Posted by oscar19681 View Post
You must first open the characterbodyparts gr-2 , then merge the characterbodyparts.chr and then merge with a animation.
Anyway when i want to change the the head of something i get a pull down menu from the editor in the left top when clicking on the current bodypart but it dissapears so quickly that i cant select anything
In File->Open file-selection window you drag-select both GR2 and chr file - Goblin will merge them automatically for you. That is - instead of opening just GR2 select both GR2 and CHR and only then click open, they will both open merged. You can of course merge chr after opening gr2 (or vice versa if you happen to open chr first by mistake) but it is easier to open them already merged. It works with other mergeable files as well.

As for body features change - do this: in Project tree double-click on our sailor (Sapiens @ Dummy01 under CharacterBodyParts.chr). It will open Edit behaviour window. There click on 'Sapiens' under 'Render' - you will see and be able to change all the properties of our character there.

The main problem is that Goblin crashes every now and then for no apparent reason. I recon I do make some mistakes but it is hard to figure out what goes wrong.

Last edited by Vanilla; 03-29-11 at 03:41 PM.
Vanilla is offline   Reply With Quote
Old 03-29-11, 03:38 PM   #5
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

Quote:
Originally Posted by sober View Post
When will the mod be ready ?
Sorry, absolutely no idea, I was just exploring animation engine to check if it is possible to make crew act more real-life like, not sure if I will be able to pull this off at all currently. But since there is no good description of how to use Goblin - I decided to post at least this little [tec] of what I've found so far- maybe some other wish-to-be modder as myself will find it useful.
Vanilla is offline   Reply With Quote
Old 03-31-11, 12:51 PM   #6
oscar19681
Admiral
 
Join Date: Jan 2004
Location: netherlands
Posts: 2,020
Downloads: 119
Uploads: 0
Default

Quote:
Originally Posted by Vanilla View Post
In File->Open file-selection window you drag-select both GR2 and chr file - Goblin will merge them automatically for you. That is - instead of opening just GR2 select both GR2 and CHR and only then click open, they will both open merged. You can of course merge chr after opening gr2 (or vice versa if you happen to open chr first by mistake) but it is easier to open them already merged. It works with other mergeable files as well.

As for body features change - do this: in Project tree double-click on our sailor (Sapiens @ Dummy01 under CharacterBodyParts.chr). It will open Edit behaviour window. There click on 'Sapiens' under 'Render' - you will see and be able to change all the properties of our character there.

The main problem is that Goblin crashes every now and then for no apparent reason. I recon I do make some mistakes but it is hard to figure out what goes wrong.
Yes but when i click the bar that changes the for example the torso i get a split second pull down menu in the left upper corner which dissapears so fast that i cannot sellect anything.
__________________
we live we die but death does not ends it.

Jim Morrison 1943-1971
oscar19681 is offline   Reply With Quote
Old 03-31-11, 02:50 PM   #7
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

Quote:
Originally Posted by oscar19681 View Post
Yes but when i click the bar that changes the for example the torso i get a split second pull down menu in the left upper corner which dissapears so fast that i cannot sellect anything.
Just checked - I don't have this problem. The drop down menu opens under the 'Torso' line (not in the left corner) and stays there. Oscar, what is your windows version?

Found another strange thing: I try to change the bosun's 'strategy' in qr2 room (crew_idle_actions_qr2.aix) but Goblin does not seem to recognize any changes I make, I even tried renaming the file to no effect. I know that I edit it correctly since I test everything on the small_boat in the Sea folder first... Another issue I am having is that I don't know what methods a Waypoints object has, I wonder if I can generate a Random number somehow or get current time or at least check if it is night or day in aix script for crew.
Vanilla is offline   Reply With Quote
Old 03-31-11, 04:38 PM   #8
oscar19681
Admiral
 
Join Date: Jan 2004
Location: netherlands
Posts: 2,020
Downloads: 119
Uploads: 0
Default

I have windows vista 32 bit
__________________
we live we die but death does not ends it.

Jim Morrison 1943-1971
oscar19681 is offline   Reply With Quote
Old 04-01-11, 12:31 AM   #9
Zedi
Sea Lord
 
Join Date: Mar 2010
Posts: 1,845
Downloads: 184
Uploads: 2
Default

Same here. Also w7/32.

I was always convinced that all the animations are done, but they never got time to pull them together. The trailer is a ingame footage, is what made me to buy the game on day 1... was hoping that the crew behavior is really the same as it was in the trailer. But this looks too complicated, I dont think that any moder ever will manage to cook this up.
Zedi is offline   Reply With Quote
Old 04-01-11, 04:13 AM   #10
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

My guess the problem with disappearing drop-downs has something to do with Windows version, Goblin was obviously used only on Windows XP by devs and it is not a very stable and thoroughly tested software either. Try running Goblin in XP compatibility mode.

There can be another, although more complicated, workaround: AFAIR you can change body- and other parts directly from aix script. This way you can change the appearance in the script to check if it is the one you want and then hex-edit chr file.
Vanilla is offline   Reply With Quote
Old 04-01-11, 04:28 AM   #11
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

Quote:
Originally Posted by Zedi View Post
I was always convinced that all the animations are done, but they never got time to pull them together. The trailer is a ingame footage, is what made me to buy the game on day 1... was hoping that the crew behavior is really the same as it was in the trailer. But this looks too complicated, I dont think that any moder ever will manage to cook this up.
Well, not really, many useful and not-used animations are there (like 'alarm-jump' off the bed), while other aren't. Last night I discovered that there is no 'Walk through hatch' animation that can be used. Although it is obvious that the devs has planned to create this animation (you see references to Walk_hatch and Walk_hatch_reverse in many waypoints_files) it is simple not there - when you try to use unedited waypoints created by devs there are glitches due to the lack of those animations.
That is a grave problem for me. I was hoping to animate crew in more sensible way, to make them act according to their duties on the boat and the environment. I started with the Bosun - he should supervise the crew so I hoped to make him walk up and down the boat occasionaly and 'supervise' what crew is doing. It is relatively easy except that I cannot make him walk through any hatches since there is no animation for that. I can only make him walk or run through the wall, or teleport him. There is an animation of a sailor going through the hatch that is used in tutorial mission, but it applicable to only one situation when the character is already in front of the hatch and this animation makes it look like he just walked through it, and works only if he is 'walking' from the bow to heck of the boat. I was even thinking of hex-editing, but then I realised that creating a complete animations by hex-editing is way beyond my skills and is hardly possible at all.
So now I think I just teleport them from one compartment to another and wait for privateer to finish his epic quest agains granny so I can create the animations needed (after learning how to create them).
Vanilla is offline   Reply With Quote
Old 04-01-11, 04:48 AM   #12
Zedi
Sea Lord
 
Join Date: Mar 2010
Posts: 1,845
Downloads: 184
Uploads: 2
Default

And is not possible to mix animations and way points? Using them like some tracks in a railway station? Meaning.. when a char is in front of the hatch, he use the go_through_hatch anime then use another track according to his "mission". There are also many animations used in the bunker, like climb ladder, carry &repair stuff etc.

I agree and I can imagine how hard is to put all this together.. is hard even as a paid job, not to mention the time required. But would be nice to have at least those lazy bummers in beds to stand up when the boat is in battle state.
Zedi is offline   Reply With Quote
Old 04-01-11, 06:56 AM   #13
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
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):
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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).

Last edited by Vanilla; 04-01-11 at 07:19 AM.
Vanilla is offline   Reply With Quote
Old 04-01-11, 07:00 AM   #14
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

I would greatly appreciate if anyone has ideas on what methods (functions) are available in AI scripts.
I also wonder if all the classes and objects have the same set of methods available. I see there is, for example, a Random(a,b) method used by TDW in his AI script files and as far as I understand they are members of Ship class. It would be of great help if anyone can clarify whether the same can be used on Waypoints objects as well.
Vanilla is offline   Reply With Quote
Old 04-01-11, 09:42 AM   #15
oscar19681
Admiral
 
Join Date: Jan 2004
Location: netherlands
Posts: 2,020
Downloads: 119
Uploads: 0
Default

Quote:
Originally Posted by Vanilla View Post
Well, not really, many useful and not-used animations are there (like 'alarm-jump' off the bed), while other aren't. Last night I discovered that there is no 'Walk through hatch' animation that can be used. Although it is obvious that the devs has planned to create this animation (you see references to Walk_hatch and Walk_hatch_reverse in many waypoints_files) it is simple not there - when you try to use unedited waypoints created by devs there are glitches due to the lack of those animations.
That is a grave problem for me. I was hoping to animate crew in more sensible way, to make them act according to their duties on the boat and the environment. I started with the Bosun - he should supervise the crew so I hoped to make him walk up and down the boat occasionaly and 'supervise' what crew is doing. It is relatively easy except that I cannot make him walk through any hatches since there is no animation for that. I can only make him walk or run through the wall, or teleport him. There is an animation of a sailor going through the hatch that is used in tutorial mission, but it applicable to only one situation when the character is already in front of the hatch and this animation makes it look like he just walked through it, and works only if he is 'walking' from the bow to heck of the boat. I was even thinking of hex-editing, but then I realised that creating a complete animations by hex-editing is way beyond my skills and is hardly possible at all.
So now I think I just teleport them from one compartment to another and wait for privateer to finish his epic quest agains granny so I can create the animations needed (after learning how to create them).
The might fine crew mod has an animation for dieter depp comming down the conning tower and walking throught the hatch near the sound man and it is used in game when have dived the sub. Why would this not be applicabe to the bosun?
__________________
we live we die but death does not ends it.

Jim Morrison 1943-1971
oscar19681 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 12:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.