SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   State Machine ... some thoughts ... (https://www.subsim.com/radioroom/showthread.php?t=154572)

Anvart 08-06-09 11:16 AM

State Machine ... some thoughts ...
 
I have made separated thread ... :haha: ... as have asked...
*** После моих тестов сделанных год назад (in 2008 use HexEditor) и полного неумения изъясняться по английски я всё таки решился и S3D by skwasjer поможет мне:

I offer to your attention the method of management of any animations of 3D objects using a system of behavior control of the crew of the human submarine.
Also, I'm offering the sample of the code for implementation of my method for creating mods... and I'm publishing some additional crew commands that are not in Command_ *.cfg, but these crew commands are very usefull for use in my method.
It is especially easy to make for the looped (and not looped) animations using Crew Commands...
For example, DF antenna - raising/lowering and rotation, Flag on Turm - appearance/play/disappearance, fan rotation - play/stop, CR-RR hatch open/close, animation of the diesel engine - play/stop and so on for human submarine...
...
Attention, this material is for skilled modders...
************************************************** ******************
First, additional crew commands:

Maneuver_officer_end
Navigation_officer_end
Weapons_officer_end
Watch_officer_end
Radio_operator_end
Sonar_operator_end

Example in Command_*.cfg:

[Cmd450]
Name=Radio_operator
Ctxt=1
Key0=0x56,Cs,"Shift+V"
GoBack=Radar_view
...
[Cmd470] ; additional crew command
Name=Radio_operator_end
Ctxt=1
Key0=0x56,Cc,"Ctrl+V"
************************************************** ******
Now I'll show you a picture with the sequence of the actions and the code for the mod DF antenna raising / lowering... in more detail with the code, you can acquaint in the DFant_subFlag mod or in other recent mods.************************************************** ****************
Also edit Command_*.cfg file:
[Cmd450]
Name=Radio_operator
Ctxt=1
Key0=0x56,Cs,"Shift+V"
GoBack=Radar_view
...
[Cmd470] ; additional crew command
Name=Radio_operator_end
Ctxt=1
Key0=0x56,Cc,"Ctrl+V"

************************************************** ********************
DFa_UpDnRotSMC_1.1, DFa_UpDnRot_Flags, FM30_UpDownSMC mods are outdated and I have no them, so I recommend to study detailed code in the recent mods - FM30_UpDown_final, DFant_subFlag_2010, GWX_DFa-Flag & Pens_2010, LSH3-5_DFa-Flag & Penns_2010...

*****************************************
P.S. Attention. If you use this method for animations managment in your published mods, I remind don't forget to give corresponding credits to author Anvart with the correct formulation of the method.

rowi58 08-07-09 01:50 AM

Hi Anvart,

sounds very good :up:. When i'll get some time. I'll try this.

Greetings
rowi58

Anvart 08-07-09 03:15 AM

Схема работает без проблем с crew командами ...
Напрягать мозги нужно только при создании логики событий/действий в новом StateMachineClass ... :D
...
Я не стал описывать азы (основы) State Machine System в игре ...
Это слишком долго, а с моим английским еще и трудно (думаю, что никто ничего не поймет) ...
но для продвинутых моддеров моей информации достаточно, чтобы делать моды на основе StateMachineCtl ...
************************************************** *****
This scheme works without problems with crew commands ...
To strain one's brains (to think) necessary only at creation of events/actions logic in new StateMachineClass ... :D
...
I did not describe bases of State Machine System in game ...
It's too long, and with my English also it's difficult (i think, that anybody will understand nothing) ... :cry:
But for advanced modders my information is enough to do mods using StateMachineCtl ...

P.S.
For management of effects it's necessary to use StateMachineWrapper, but ... it's already other theme ...

P.P.S.
I have forgotten to tell ... i think, that using this scheme it's possible to create additional crew with existing attributes (Models, Textures, StateMachineClass'es, Animations and so on...) ...
But the new object will not be controlled by hardcode as existing crew sockets (DMY_Soclu_...) ... in other words ... don't work disappearance of crew model at submarine submerging, change of crew models at storm weather and so on...

skwasjer 08-07-09 03:22 AM

:yeah:

I will try to add a few tips/tutorial in a few weeks time regarding the StateMachineClass & Wrapper controller itself (the properties). I think that if we just add tips and hints as we go, it will be easy for everyone to do in 6 months time :03:

skwasjer 08-07-09 03:56 AM

lol, I seem to have offended you again, and have to take a beating... (Also nice how you editted that out already...) :nope:

I was speaking of how to script behaviors with StateMachineClass controller. I do not see you explaining that here, do I?

Quote:

I did not describe bases of State Machine System in game ...
It's too long, and with my English also it's difficult (i think, that anybody will understand nothing) ... :cry:
Basically, what you said here is what I wanted to cover. But ok, I'll just write my own tutorial (as good as I can) like I promised and won't bother with your thread here if you don't want me to.

Regards, skwas

Anvart 08-08-09 05:18 PM

Quote:

Originally Posted by Anvart (Post 1146428)
...
This scheme works without problems ...
To think necessary only at creation of events/actions logic in new StateMachineClass ... :D
...

P.P.S.
I have forgotten to tell ... i think, that using this scheme it's possible to create additional crew with existing attributes (Models, Textures, StateMachineClass'es, Animations and so on...) ...
But the new object will not be controlled by hardcode as existing crew sockets (DMY_Soclu_...) ...

Example: Creation of additional AI (!) crew with standard POSWatch StateMachine Class ...Yes, of course, it's better to make additional crew in separated file ... :haha: (AI...)

Anvart 08-08-09 05:30 PM

Да-а-а ... :hmmm:
Очевидно мало кто понимает в этом деле ... и поговорить не с кем ...
Мало кому интересна эта не очень простая тема ...
Наверно надо её удалить ...
А то я тут в основном сам с собой разговариваю ...
:haha:
***************************
Obviously this theme is not interesting to the majority of modders ...
At this forum i talk to myself ...
Likely the theme should be deleted ... :har:

Easy_Eight65 08-10-09 05:56 PM

Additional Crew -- looking good so far!
 
And it's very interesting to Playable Warship folks like myself.

How cool would it be to have (and see in external view) 20 or 30 addtional crew on the bridge...on the deck...at flak and deck gun battlestations...the possibilities are endless here!

Right now in WSM 2.0 for example, we're limited to only 5 watch crew (max in GWX and stock SH3) with a few crudely modeled AI at AA batteries / DC stations...in external view, the Capital ships look almost abandoned...(SH4 seems to have fixed this with more AI crew on the decks / at flak, DC and gun positions) so keep up the good work, Anvart!

Easy_Eight65

denis_469 08-27-09 01:35 PM

Анварт - ты немного не прав в своём выводе. Просто таких гуру как ты единицы, а поднятый тобой вопрос слишком сложный для моддинга и его обсуждение не самое простое для большинства.
Спасибо за твои моды ещё раз.

Anvart 08-28-09 05:12 AM

Quote:

Originally Posted by denis_469 (Post 1160102)
Анварт - ты немного не прав в своём выводе. Просто таких гуру как ты единицы, а поднятый тобой вопрос слишком сложный для моддинга и его обсуждение не самое простое для большинства.
Спасибо за твои моды ещё раз.

... но до сих пор никто не пытался говорить "конкретно" и не давал каких-либо интересных конструктивных предложений ...

DivingDuck 10-19-09 07:38 PM

Moin Anvart,

this is incredibly valuable information. Many thanks for sharing.
And kudos to Skwas for S3D. It makes modding so much easier.


This is the result:

http://i182.photobucket.com/albums/x...ri_Ani_002.gif



Regards,
DD

Kpt. Lehmann 10-19-09 08:09 PM

Just when you think that things can't get any more interesting... Diving Duck and Anvart storm ahead with a new masterpiece!

:rock::rock::rock:

Philipp_Thomsen 10-20-09 04:11 PM

Hats off, DD...

That moving periscope is a genius idea! :rock:

DivingDuck 10-21-09 08:49 AM

Hey Anvart,
Quote:

I have made periscope animation on commands Rise_whole_obs_periscope/Lower_whole_obs_periscope only after editing hard code in executable files ...
well, thatґs worth a hats off. :salute:

Did you change the hardcode
-to trigger the animation via Rise/Lower_whole_obs_periscope or
-to make 'obj_Extensible' available for interior use?

Regards,
DD

Philipp_Thomsen 10-21-09 10:44 AM

Actually, hats off for both of you!

Not only for this, but for all the past modding.:up:


All times are GMT -5. The time now is 01:37 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.