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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 04-18-11, 03:17 AM   #1
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
Default

Quote:
Originally Posted by DivingDuck View Post
Moin Hans,

Make sure the files are all placed in the correct folder.

Interior.dat >>> goes without saying
Animation.dat >>> LIBRARY folder
Animation.anm >>> ANIMATIONS folder


Next, the SH engine is very strict regarding naming conventions.

The SMC entry in your Interior.dat contains the SMC Controller that defines the 'GraphName'. Let´s say 'Hans_Graph'. The game engine is now checking the LIBRARY folder´s *.dat files for a SMC named 'Hans_Graph'.

The 'Hans_Graph' SMC defines the events your animation is triggered by and holds the name(s) of the animation(s) to play. Let´s say 'Hans_Dance'. Once the condition to run the animation is met, the game engine checks the ANIMATIONS folder´s *.anm files for an 'AnimName' named 'Hans_Dance'. This 'Hans_Dance' contains one or more sub items containing another 'AnimName' entry. Let´s call it 'Hans_Limbs'.

When 'Hans_Dance' is called by 'Hans_Graph', the correlated MAD will be linked to 'Hans_Limbs' and the game engine will check the Interior.dat for any 3d_model by the name of '<Hans_Limbs>'. The brackets are vital! If '<Hans_Limbs>' is found, the animation will play.



How to create this setup?
  1. Import the animation to your Interior.dat
  2. cut the MAD (<notset> (10/05) + child node)
  3. paste it into your newly created 'Hans_Animation.anm' just behind an 'AnimationObject' node
  4. create needed entries and links for the 'AnimationObject'





Next, your SMC has to be built. For testing reasons it is advisable to use a setup that will call the animation on load with no conditions to be met. Thus you ensure the animation is imported correctly at last.

As for your SMC, it will not work this way. When your condition 'true' is met, the pointer is directed to entry #1, but there is none. Hence the animation will play once only or not at all. Don´t know how the game engine handles this "error".

'GotoEntry=0' should do the trick. But I strongly recommend to use a more advanced setup, even for an ever-looping basic test.


Use 4 StateEntries for a start:
  • Start (entry 0)
    • as you did, condition 'true' will be met on start up
    • points towards entry #1 (Idle)
  • Idle (entry 1)
    • define conditions to trigger the animation
    • points towards entry #2 (Animation)
  • Animation (entry 2)
    • define conditions to stop the animation here (GotoEntry #3 (Stop))
    • define conditions to change the animation here (GotoEntry #??)
    • if no interfering condition is met loop to entry #2 (Animation)
  • Stop (entry 3)
    • stop (all) animation(s)
    • point back to entry #1 (Idle)




[EDIT]
Moin UFi,

but don´t tell my wife.
[/EDIT]


Regards,
DD
Hi DD,

Fantastic answer and food for my brain

Will test that further on this afternoon because i must go to sleep soon i test all sort of stuff all night long and now i am exhausted.

Only one thing i still don't understand maybe you already have explain in this post so i apologize if it the case but how do you save your .anim in animation folder?

And if i understand correctly i don't need MAD in CR.dat with this method?

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-18-11, 03:34 AM   #2
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
Default Message to DD

Hi DD,

Check your pm mate

I am going to have some rest now

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-18-11, 03:49 AM   #3
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 879
Downloads: 10
Uploads: 1
Default

Hi Hans,
Quote:
Originally Posted by Hans Witteman View Post
Hi DD,
...

Only one thing i still don't understand maybe you already have explain in this post so i apologize if it the case but how do you save your .anim in animation folder?

And if i understand correctly i don't need MAD in CR.dat with this method?

Best regards Hans
the file that goes to the ANIMATIONS folder is basically nothing else than a *.dat file. But it has to be saved using the *.anm extension. I hope that was the answer you were seeking for.

And yes, the MAD must be cut from the CR.dat. This is necessary to be able to call different animations for the same base mesh, depending on SMC entries. If you don´t cut the MAD from the *.dat, the animation will loop endlessly and will not respond to SMC. Or it may even not show up at all. Didn´t check that until now.

Regards,
DD
DivingDuck is offline   Reply With Quote
Old 04-18-11, 04:02 AM   #4
Hans Witteman
Kaleun of U-3
 
Join Date: Sep 2008
Location: somewhere in 1939
Posts: 1,815
Downloads: 123
Uploads: 0
Default

Quote:
Originally Posted by DivingDuck View Post
Hi Hans,

the file that goes to the ANIMATIONS folder is basically nothing else than a *.dat file. But it has to be saved using the *.anm extension. I hope that was the answer you were seeking for.

Regards,
DD
Hi DD,

Yes that what i though but when you save it do you deleted afterward un neccessary nodes?

And do i have to change the windows in S3d that ask to keep same headers?

What i did for this one was to import my animation on water plane temporarily and i did a simple copy paste of noset+meshanimationdata.

After i created a new data file and append a AnimationObject controller and then paste my noset+meshanimationdata and link it as child of AnimationObjec.

Is this procedure sound good to you?

Many thank

Best regards Hans
__________________




Hans Witteman is offline   Reply With Quote
Old 04-18-11, 04:10 AM   #5
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 879
Downloads: 10
Uploads: 1
Default

The procedure itself sounds okay to my ears. But the devil is in the detail.

You should make a habit of deleting unneeded nodes or at least changing their IDs as they might cause ID conflicts and hence CTD.

When you copy and paste anything, always change the IDs to be unique. Otherwise they will cause problems that are exceptionally hard to track down or even CTD.

As for the S3D headers, I don´t know. I still use the hex editor very often. So, I´ve never seen a dialogue asking to keep headers or something similar. At least I don´t recall it.

After you´ve copied and pasted the <notset> (10/05) node + it´s child MAD, you´ll have to adjust the 'AnimationObject' entries to "find" that new node! See the pic I´ve posted last. That should be it.

DD

PS: Get some rest now!
DivingDuck is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 07:43 PM.


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