View Full Version : [REL] Playable U-FlaK for SH5
vdr1981
02-23-16, 12:05 PM
http://s6.postimg.org/etfpar181/U_Fla_K2.jpg
For the first time in SH5, this mod will add new playable submarine type (U-FlaK). If you want to have a blast in campaign with this sub, start "Turnign Point" using "sillentotto" cheat. There is also appropriate and fun historical mission (U-FlaK: Atlantic Escort Duty).
U-flak was possible because I managed to knock together developer team's unused parts, already present in the game (in this case VIIC41 hull + U-flak conning tower) and to organise them as a new playable submarine with it's own set of advantages and disadvantages...
Keep in mind that this mod is extracted form TWoS megamod so compatibility with stock game or some other modlists may be questionable...
Current issues:
Front gun - no visible crew
Front gun not operational for player (shielded, 37mm) until it's replaced with quad 20mm trough bunker upgrade. (All other flak stations are OK)
Have a fun! :subsim:
Download: http://www.subsim.com/radioroom/downloads.php?do=file&id=4883
http://s6.postimg.org/d8eo7jc35/555.jpg
vdr1981
02-23-16, 12:21 PM
There are still few issues for which I hope that can be resolved with community's help...
PLayer can't operate front heavy FlaK:
It seems that this would require few tweaks in cameras.cam file/s, I'm still not sure where should I exactly look for this entries...:hmm2:
Individual front Flak upgrade pack (in bunker):
No mater what I tried I just couldn't achieve this...It seems that the game is "hardcoded" not to give us this possibility. Only upgrades for one or both heavy flaks are possible, not two individual upgrades. Right now , player can only upgrade stern flak. Front AA gun will permanently be improved 37mm flak. I chose this solution because sub equiped with 2x quad 2cm Flak 38 Vierling AA guns would have just too much firepower... :D
Front heavy Flak dont have visible crew:
This issue doesn't bother me so much, that's why it's last...:yep:
To sumarise, the first issue I would like to solve is giving the player possibility to operate front heavy Flak. Any help is appreciated...:up::up::subsim:
:up: :woot:
There are still few issues for which I hope that can be resolved with community's help...
the first issue I would like to solve is giving the player possibility to operate front heavy Flak. Any help is appreciated...:up::up::subsim:
Okay, I will start diggingg in NSS_Uboat7c41F.upcge and UnitParts5VIIC41F.upc for possible solutions :hmm2:
urfisch
02-23-16, 01:45 PM
:o :yeah:
vdr1981
02-23-16, 01:47 PM
:up: :woot:
Okay, I will start diggingg in NSS_Uboat7c41F.upcge and UnitParts5VIIC41F.upc for possible solutions :hmm2:
Thanks!
If you test it in the game you'll noticed that you can click on front flak, but then camera will go crazy, it's as though some camera settings are missing?
If you press "space" to shoot, one flak from back will actually shoot or say "cant shoot at the submarine"?! :D
Thanks!
If you test it in the game you'll noticed that you can click on front flak, but then camera will go crazy, it's as though some camera settings are missing?
Is the front gun, by any chance, a twin 37 mm Flak? :hmmm:
If you press "space" to shoot, one flak from back will actually shoot or say "cant shoot at the submarine"?! :D
This is easy: at some training/elevation angle, some part of the U-boat (a wire, a railing, an antenna) on the way of the gun. :yep:
vdr1981
02-23-16, 03:47 PM
Is the front gun, by any chance, a twin 37 mm Flak? :hmmm:
The one on the picture...
This is easy: at some training/elevation angle, some part of the U-boat (a wire, a railing, an antenna) on the way of the gun. :yep:
No , that's not what I meant...When you click on front gun to operate it, if you press space, some flak from the stern will receive this command...:hmm2:
The one on the picture...
From that picture it looks like the single mount of the same gun, but going by your description, the problem you are having with it is similar to what I experiences with the double one, except that the "freezed camera" was triggered whenever I walked near the gun (I couldn't even click on it).
IIRC, besides the camera getting stuck, water streaks appeared on the camera, and some sound was played :hmmm:
No , that's not what I meant...When you click on front gun to operate it, if you press space, some flak from the stern will receive this command...:hmm2:
Isn't space bar the key used for firing guns?
vdr1981
02-23-16, 05:33 PM
Isn't space bar the key used for firing guns?
Yes , it is...:06: I dont think we understand each other, again...:)
EDIT
Does the U-Flak work at all in your game/modlist?:hmmm:
Yes , it is...:06: I dont think we understand each other, again...:)
I got you now. Does it happen every time you try firing that gun, or once in a while?
EDIT
Does the U-Flak work at all in your game/modlist?:hmmm:
I will answer this question in 5 minutes :03:
EDIT
The usual UPlay crash after update. :nope:
Looks like my test will take a bit longer until I reinstall UPlay...
If only they updated their games every 100 updates of their DRM copy protection, they would be the more supportive software company ever :yep:
vdr1981
02-23-16, 06:15 PM
I got you now. Does it happen every time you try firing that gun, or once in a while?
Every time...:yep:
Okay, it works... more or less: the two 20 mm Flak guns which are supposed to stand on conning tower's upper deck are missing, manning crew is missing, and XO/watch crew is freezed in the typical T position (missing animations). The two 37 mm guns work as supposed, but as noted by you, I couldn't fire the fron one. :salute:
vdr1981
02-23-16, 06:51 PM
Okay, it works... more or less: the two 20 mm Flak guns which are supposed to stand on conning tower's upper deck are missing, manning crew is missing, and XO/watch crew is freezed in the typical T position (missing animations). The two 37 mm guns work as supposed, but as noted by you, I couldn't fire the fron one. :salute:
You're testing it in stock game?
You're testing it in stock game?
yep: stock + New UIs 7.4.2 + IRAI 0.0.41 + your mod. No TDW patch enabled. :yep:
It is not a drama: being based on your megamod, I was expecting the U-Flak to run with some glitches over stock game...
vdr1981
02-23-16, 07:07 PM
yep: stock + New UIs 7.4.2 + IRAI 0.0.41 + your mod. No TDW patch enabled. :yep:
It is not a drama: being based on your megamod, I was expecting the U-Flak to run with some glitches over stock game...
You should grab at least EUF...:hmmm:
Or enable TWoS? :hmm2:
You should grab at least EUF...:hmmm:
Or enable TWoS? :hmm2:
:up:
vdr1981
02-24-16, 11:16 AM
:up:
Hmm, I've tried your double 37mm flak...
It's just like you said...Everything work OK (AI and player can use the gun normally) until I walk with my avatar exactly to the right side of wintergarden platform?!:doh: Then camera freezes...Shift+U command can help in this situation though...Really strange indeed...:hmmm:
It's interesting, if you stay on the left side of the wintergarden platform, double 37mm flak will work just as any other flak in the game...:hmmm:
Hmm, I've tried your double 37mm flak...
It's just like you said...Everything work OK (AI and player can use the gun normally) until I walk with my avatar exactly to the right side of wintergarden platform?!:doh: Then camera freezes...Shift+U command can help in this situation though...Really strange indeed...:hmmm:
It's interesting, if you stay on the left side of the wintergarden platform, double 37mm flak will work just as any other flak in the game...:hmmm:
Really? I must have always walked to the right side of the gun then :doh:
It must have something to do with that gun's topology then. Your report helps a lot. Thank you for testing! :up:
PS: can you man the gun if you walk to it from the correct side?
vdr1981
02-24-16, 12:10 PM
PS: can you man the gun if you walk to it from the correct side?
Yes, absolutely...You can man it from all sides except mentioned wintergarden's right side...Note that this was tested on the U-flak sub...I'll check it out later what is going on with VIIC41 for example...
Yes, absolutely...You can man it from all sides except mentioned wintergarden's right side..
Amazing :up:
Note that this was tested on the U-flak sub...I'll check it out later what is going on with VIIC41 for example...
I don't remember which U-boat/turm I tested that gun on, I don't think it will make any difference except maybe for space around the gun itself and ease of access to it...
vdr1981
02-24-16, 12:24 PM
Yes, absolutely...You can man it from all sides except mentioned wintergarden's right side...Note that this was tested on the U-flak sub...I'll check it out later what is going on with VIIC41 for example...
EDIT
Small illustration...
Form this possition, all is working fine, manning the gun/leaving the station ect ...
http://s17.postimg.org/kuji08ey7/SH5_Img_2016_02_24_15_36_47.jpg (http://postimage.org/)
...but walk just a little bit more further and the game freezes ...:hmmm:
http://s17.postimg.org/zcgp8869b/SH5_Img_2016_02_24_15_37_17.jpg (http://postimage.org/)
img upload (http://postimage.org/)
:hmmm:
I have had yet another look into that Flak's model, but apparently there is nothing, not even an hidden mesh, which might come into the way of player's avatar :doh:
YESSS, I know what's going with that gun at last! It isn't a problem of a mesh coming in player's way; it is a bone. More specifically the bone named Dmy_37mmTSA_Cam. As the name says it should be camera-related. I need to study some other guns before I can say what is its function, and the best soluce to the problem :up:
vdr1981
02-24-16, 01:30 PM
YESSS, I know what's going with that gun at last! It isn't a problem of a mesh coming in player's way; it is a bone. More specifically the bone named Dmy_37mmTSA_Cam. As the name says it should be camera-related. I need to study some other guns before I can say what is its function, and the best soluce to the problem :up:
:up::up::up: Bones , nodes , meshes , upcge....SH games are the shiitiest games for modding. I hate SH series! :D
vdr1981
02-24-16, 02:38 PM
YESSS, I know what's going with that gun at last! It isn't a problem of a mesh coming in player's way; it is a bone. More specifically the bone named Dmy_37mmTSA_Cam. As the name says it should be camera-related. I need to study some other guns before I can say what is its function, and the best soluce to the problem :up:
Another small update which I forgot to tell you...
When game freezes, it will do so no mater how the gun is orientated, for example, if you walk to mentioned position while crew is aiming flak...
Anything yet?:hmm2:
Another small update which I forgot to tell you...
When game freezes, it will do so no mater how the gun is orientated, for example, if you walk to mentioned position while crew is aiming flak...
This is not compatible with my supposition about the Dmy_37mmTSA_Cam bone being related to the freezing camera when the player moves close to it. The said bone is linked to gun's barrel, and it should change position when the gun is trained/elevated by AI crew. :hmm2:
Anything yet?:hmm2:
Well, the "suspect" bone is the one that the CamUserData controller in gun's cam file is pointing to, and I am pretty sure it determines gun camera position which, on the twin 37 mm gun, is moved to the right. If I move that bone to one side, player's view won't be aligned anymore with gun's aim. I still don't get what is special about the twin 37 mm gun though, since other Flak guns look pretty much the same to me as far as their basic structure is concerned (maybe the double 37 mm is too wide, and its camera falls outside an invisible "no trespassing" limit, or some blunder by devs in cam controller settings?). The good news is that GR2 Editor can open our gun's GR2 (I just hope it wont corrupt it on saving). What I can do to confirm/disconfirm my hypothesis, is moving the discussed bone from the right side to the left side, and see if it makes any difference. :03:
vdr1981
02-24-16, 04:02 PM
I see...
This is hardly only camera/station bones/controllers issue because, when the game freezes , almost entire GUI functionality will also collapse (teleports, key and GUI commands ect). I mean, everything work great until you step in 'forbidden area"...:hmmm:
Simple camera/station problem can be observed if you try to man front flak gun (U-flak)...You'll see strange camera behavior, but when you click exit station command, everything is back to normal...
This "game freeze" reminds me a lot on issues I had when I was trying to create destructible stock GHG sensor, even if it didn't have it's own 3D mode l(only bone)...
Your transparent dat 3D mesh solved the problem...
Do you remember?:hmm2:
Vecko, can you try moving around the bone that I was talking about using GR2 Editor? When I save and reload the file in GR2 Editor, it seems that my changes were saved, but if I open the file in Goblin, it shows that nothing has changed :doh: :-?
This "game freeze" reminds me a lot on issues I had when I was trying to create destructible stock GHG sensor, even if it didn't have it's own 3D mode l(only bone)...
Your transparent dat 3D mesh solved the problem...
Do you remember?:hmm2:
Yep, I do. In that case it was easy understanding what was wrong, because we wanted to make something which had no physical properties in game, into something which can get broken. This case is different because that gun has nothing strange compared to other guns modelled in game :hmmm:
EDIT
I feel today we are moving a step forward in understanding what is broken with that gun. The asymmetry of the bug tells me that it must connceted with gun's geometry, and the only asymmetrical componenet in its geometry is that dummy bone which, incidentally, is player's camera-related... If only I could move it...
vdr1981
02-24-16, 04:28 PM
If only I could move it...
The force you must use... :O:
The force you must use... :O:
:haha:
I suspect that transform data of this peculiar GR2 file render my changes pointless, anyway can you test my tweaked gun file (http://www.mediafire.com/download/a5h3c8ot9hdrksf/37mmTSA.GR2)?
See my posts #26 and 28 in this thread for knowing what I changed and why I am afraid the change I made wont have any effect. In theory, gun camera position should change from right to left side, and the "buggy side" should change accordingly from right to left.
vdr1981
02-24-16, 05:10 PM
I suspect that transform data of this peculiar GR2 file render my changes pointless, anyway can you test my tweaked gun file (http://www.mediafire.com/download/a5h3c8ot9hdrksf/37mmTSA.GR2)?
See my posts #26 and 28 in this thread for knowing what I changed and why I am afraid the change I made wont have any effect. In theory, gun camera position should change from right to left side, and the "buggy side" should change accordingly from right to left.
OK...I have to create one new upgrade pack first (I've discarded previous tweaks )...:dead:
vdr1981
02-24-16, 05:29 PM
Nope... Dead end...:hmmm: Exactly the same, only now my avatar sits on the left side of the gun.
There is also one more area which will freeze the game, new front U-FlaK platform, when you try to climb left ladder...:hmmm: This was before your gr2 file also...
Black magic...:hmmm:
EDIT:
These areas, no mater which gun orientation or anything else...
http://s6.postimg.org/wqmn9bw8d/SH5_Img_2016_02_24_23_34_36.jpg (http://postimg.org/image/wqmn9bw8d/)
Nope... Dead end...:hmmm: Exactly the same, only now my avatar sits on the left side of the gun.
Summing up:
- I moved the camera from right to left and, on reload, GR2 Editor confirms that my change was saved correctly though...
- ...according to Goblin the camera bone is exactly in the same position as before;
- my change being stored into the file is confirmed in game (avatar's camera is now on the left side), however...
- ...switchig camera side has no effect on our bug: the camera keeps freezing when player's avatar approches the gun from the right side.
At least we discarded any connection between the dummy camera bone and the bug. What next? :hmm2:
There is also one more area which will freeze the game, new front U-FlaK platform, when you try to climb left ladder...:hmmm: This was before your gr2 file also...
Black magic...:hmmm:[/QUOTE]
Do you mean that there's a point on the U-flak coonning tower that freezes the camera when the player moves near to it (not related to the twin 37 mm gun)? If it is exactly the same bug affecting two separate objects, comparing them could give us some clues on what is going on :up:
vdr1981
02-24-16, 05:53 PM
- ...switchig camera side has no effect on our bug: the camera keeps freezing when player's avatar approches the gun from the right side.
At least we discarded any connection between the dummy camera bone and the bug. What next? :hmm2:
Yes
Do you mean that there's a point on the U-flak coonning tower that freezes the camera when the player moves near to it (not related to the twin 37 mm gun)? If it is exactly the same bug affecting two separate objects, comparing them could give us some clues on what is going on :up:
Negative, without double 37mm there is no "freezing points" on board...
Negative, without double 37mm there is no "freezing points" on board...
:o :dead:
LOL
vdr1981
02-24-16, 06:22 PM
:o :dead:
LOL
https://media.giphy.com/media/33iqmp5ATXT5m/giphy.gif:D
https://media.giphy.com/media/33iqmp5ATXT5m/giphy.gif:D
yep, time to rest, but I don't give up on this. This particular bug is haunting me since at least three years ago... :O:
vdr1981
02-25-16, 07:10 AM
Just a small update...
Even without any files/controllers, twin 37mm still freezes the game (removed sim, cam and zon file)...Definite sign that the problem is in 3D object...Somewhere...:hmmm:
When I was removed twin 37mm cam file, I was able to use manually front flak and in order to access front gun station I had to click rear flak gun...:)
So, all is working, it's just a matter of camera/station controllers settings. Somehow , I think the solution may be in camera.cam file. It's like some camera "definition" is missing...
...all is working, it's just a matter of camera/station controllers settings. Somehow , I think the solution may be in camera.cam file. It's like some camera "definition" is missing...
Thank you for your tips :up:
today in the morning I was looking exactly in that direction. The problem can't be in camera.cam, because all the Flak guns use the same camera definition. Knowing that, I focused my attention on the station controller. This is what I found:
37mmTSA.sim => GunStationController @ 37mmTSA_Soclu => GunStationController => NameDisplayable: 0
37mmTSA.sim => GunStationController @ 37mmTSA_Soclu => GunStationController => InteractiveObject => tooltip: 0
37mmTSA.sim => GunStationController @ 37mmTSA_Soclu => GunStationController => InteractiveObject => expertTooltip: 0
For all other guns, the same parameters point to appropriate tooltip number in menu.txt. See what I mean?
vdr1981
02-25-16, 09:02 AM
Thank you for your tips :up:
today in the morning I was looking exactly in that direction. The problem can't be in camera.cam, because all the Flak guns use the same camera definition. Knowing that, I focused my attention on the station controller. This is what I found:
37mmTSA.sim => GunStationController @ 37mmTSA_Soclu => GunStationController => NameDisplayable: 0
37mmTSA.sim => GunStationController @ 37mmTSA_Soclu => GunStationController => InteractiveObject => tooltip: 0
37mmTSA.sim => GunStationController @ 37mmTSA_Soclu => GunStationController => InteractiveObject => expertTooltip: 0
For all other guns, the same parameters point to appropriate tooltip number in menu.txt. See what I mean?
I already tried to add name and tooltips...No good. You can try the same , just to make sure...
I already tried to add name and tooltips...No good. You can try the same , just to make sure...
Wait, I was going to give you a link to a patch I had created with menu.txt tooltips for the 3.7 cm twin gun and refeferences to them in its gun station controller, but you beat me on time. I am looking at some other settings right now :)
vdr1981
02-25-16, 10:09 AM
Wait, I was going to give you a link to a patch I had created with menu.txt tooltips for the 3.7 cm twin gun and refeferences to them in its gun station controller, but you beat me on time. I am looking at some other settings right now :)
Tooltip is just a tooltip, I dont think that is the problem...Actually that was the first thing I tried when I was adding twin 37mm gun...
Right now I'm trying to make front gun player controlled. I think I'm very close...:hmmm:
There is a controller called "GunStationControllerPoperties" in conning tower's sim file (one for each gun bone, A1,A2,S1) and it seems that this is the key.
Very same controller for S2 bone (front flak) was missing and I've added it.
Still, I'm mission the appropriate "S2" slot in controller settings.
Do you know anything about this Gap??:doh:
Maybe I need to add one more bone to Cameras.gr2 file?:hmmm:
EDIT
Hmm, or maybe a new waypoint in waypoints gr2 file...:hmmm:
There is so much craps around all this...In almost all other games similar stuff can be done with just a few entries in cfg files , but not here...:nope:
Tooltip is just a tooltip, I dont think that is the problem...Actually that was the first thing I tried when I was adding twin 37mm gun...
Well, you never know what can happen when the game engine is looking for an object, and that object is not found...
Right now I'm trying to make front gun player controlled. I think I'm very close...:hmmm:
There is a controller called "GunStationControllerPoperties" in conning tower's sim file (one for each gun bone, A1,A2,S1) and it seems that this is the key.
Very same controller for S2 bone (front flak) was missing and I've added it.
Still, I'm mission the appropriate "S2" slot in controller settings.
Do you know anything about this Gap??:doh:
Maybe I need to add one more bone to Cameras.gr2 file?:hmmm:
I don't think so. To the best of my knowledge gun slots have nothing to do with camera.cam. It seems to me that valid slot settings in GunStationControllerPoperties are hardcoded values :hmmm:
EDIT
Hmm, or maybe a new waypoint in waypoints gr2 file...:hmmm:
There is so much craps around all this...In almost all other games similar stuff can be done with just a few entries in cfg files , but not here...:nope:
Again, I think waypoints are used for chracters linking. If your purpose is making the gun user-operable, I don't think adding new waypoints will bring you any good
vdr1981
02-25-16, 11:29 AM
I don't think so. To the best of my knowledge gun slots have nothing to do with camera.cam. It seems to me that valid slot settings in GunStationControllerPoperties are hardcoded values :hmmm:
,
Hmm, If there aren't any files which defines them, then it's probably hardcodded. Still, I cant understand why something like this would be hardcodded.
For now , the best I can do is to "teleport" a player to the stern flak , when he "cliks" front one...This can be somewhat confusing though...:)
Hmm, If there aren't any files which defines them, then it's probably hardcodded. Still, I cant understand why something like this would be hardcodded.
No idea, but generally when a setting in a controller refers to some items in another set of files, those files must be merged in the Goblin project for the items to be selectable. Besides that, slots selectable in GunStationControllerPoperties are numbered and as if they were an indexed value, and looking at their settings in Hex Editor they looked nothing like a bone ID. Either they refer to an hardcoded index, or to some preset values defined in an ascii file which gets preloaded when Goblin Editor is launched. :yep:
For now , the best I can do is to "teleport" a player to the stern flak , when he "cliks" front one...This can be somewhat confusing though...:)
LOL, you re-discovered the teleport function :haha:
I guess this is happening because front Flak's GunStationControllerPoperties Slot property is set to S1 rather than S2 :hmm2:
vdr1981
02-25-16, 01:16 PM
LOL, you re-discovered the teleport function :haha:
I guess this is happening because front Flak's GunStationControllerPoperties Slot property is set to S1 rather than S2 :hmm2:
Yeah...Now even Commands,cfg file is involved...
:doh:
Ahhh, screw it... 3 player usable flaks + 1AI controlled are more then enough. Anyone who don't think the same can contact Ubisoft...:)
No matter what turm/U-boat the controller is applied to, in GunStationControllerPoperties there are four possible slot settings:
0 - SLOT_A01 (light Flak gun #1)
1 - SLOT_A02 (light Flak gun #2)
2 - SLOT_S01 (heavy Flak gun)
3 - SLOT_M01 (deck gun)
They are covering all the possible gun combinations for stock U-boats/cooning towers: max two single/double 20 mm Flaks, max one 37 mm Flak or one quad 20 mm gun, max one deckgun. The U-Flak is peculiar in having no deck gun and two heavy Flak guns instead of the one heavy Flak allowed in stock game.
Maybe we could rename the S02 gun bone/slot to M01, making the game to think it is a deckgun, but retaining Flak guns functionalities. If we do so, we should update UnitParts5VIIC41F.upc accordingly. If you are busy with other stuff, I can create a patch for you to test it in game. What do you think? :hmm2:
Was there any special reason for using VIIC/41's hull in this mod?
All the U-Flaks were VIIC boats (http://uboat.net/types/u-flak.htm). :yep:
Cybermat47
02-26-16, 06:32 AM
vdr, any chance of making the heavy flak guns quad 20mms by default? I can only find photos of the U-Flak with the 20mms. They could have carried the 37mm, and presumably some did, but given that we only have photographic evidence of the 20mm quad, I think this should be the default.
http://img01.deviantart.net/4f5b/i/2012/046/e/1/u_flak_by_ubooten-d4ptql0.jpg
http://imageshack.com/a/img820/1240/430503320u4411.jpg
vdr1981
02-26-16, 07:58 AM
No matter what turm/U-boat the controller is applied to, in GunStationControllerPoperties there are four possible slot settings:
0 - SLOT_A01 (light Flak gun #1)
1 - SLOT_A02 (light Flak gun #2)
2 - SLOT_S01 (heavy Flak gun)
3 - SLOT_M01 (deck gun)
They are covering all the possible gun combinations for stock U-boats/cooning towers: max two single/double 20 mm Flaks, max one 37 mm Flak or one quad 20 mm gun, max one deckgun. The U-Flak is peculiar in having no deck gun and two heavy Flak guns instead of the one heavy Flak allowed in stock game.
Maybe we could rename the S02 gun bone/slot to M01, making the game to think it is a deckgun, but retaining Flak guns functionalities. If we do so, we should update UnitParts5VIIC41F.upc accordingly. If you are busy with other stuff, I can create a patch for you to test it in game. What do you think? :hmm2:
Hmm, nice thinking Gap...:hmm2::up: Maybe that could work. Whenever you're ready...:yep:
Was there any special reason for using VIIC/41's hull in this mod?
All the U-Flaks were VIIC boats (http://uboat.net/types/u-flak.htm). :yep:
Because U-Flak tower was originally intended for VIIC41 I decided not to take any chances and use this hull. Is there any difference after all?:hmm2:
vdr1981
02-26-16, 08:02 AM
vdr, any chance of making the heavy flak guns quad 20mms by default? I can only find photos of the U-Flak with the 20mms. They could have carried the 37mm, and presumably some did, but given that we only have photographic evidence of the 20mm quad, I think this should be the default.
http://img01.deviantart.net/4f5b/i/2012/046/e/1/u_flak_by_ubooten-d4ptql0.jpg
http://imageshack.com/a/img820/1240/430503320u4411.jpg
Other heavy flaks are available trough bunker upgrades...You can edit default AA weapons in UnitParts5VIIC41F.upc file.
[UnitPart 1.UpgradePackSlot 2]
ID= UpgConFlakHeavy
NameDisplayable= UpgConningFlakWG-Name
Type=NULL
AcceptedTypes=GerHeavyAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= VIIC41Tower1FlakMount3
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, UpackUb37mmImpSingle
[UnitPart 1.UpgradePackSlot 3]
ID= UpgConFlakHeavy2
NameDisplayable= UpgConningFlakWG-Name
Type=NULL
AcceptedTypes=GerHeavyAA
UserCustomizable=Yes
IDLinkUpgradePackSlots= VIIC41Tower1FlakMount4
IDLinkUpgradePackSlotsIntervalDefault1= NULL, NULL, UpackUb37mmImpSingle
Hmm, nice thinking Gap...:hmm2::up: Maybe that could work. Whenever you're ready...:yep:
The patch is ready. I am now re-checking upc and upge files for any required tweak which I migh have overlooked. Stay tuned for updates :up:
Because U-Flak tower was originally intended for VIIC41 I decided not to take any chances and use this hull. Is there any difference after all?:hmm2:
No idea, probably not, but I will check it :03:
Other heavy flaks are available trough bunker upgrades...You can edit default AA weapons in UnitParts5VIIC41F.upc file.
Yep, by the way today I made a quick search on the web, and apparently the standard U-Flak gun outfit was as follows:
- 1 Flakvirling on the fore platform
- 1 Flakvierling on the Wintergarten
- 1 single 37 mm gun on the stern platform
Summing up: no light Flak, three heavy Flaks, no deck gun. If my test patch works, I will make all the changes required for reproducing this configuration :)
vdr1981
02-26-16, 08:52 AM
Yep, by the way today I made a quick search on the web, and apparently the standard U-Flak gun outfit was as follows:
- 1 Flakvirling on the fore platform
- 1 Flakvierling on the Wintergarten
- 1 single 37 mm gun on the stern platform
Summing up: no light Flak, three heavy Flaks, no deck gun. If my test patch works, I will make all the changes required for reproducing this configuration :)
Using only 3 flak slots instead of 4 can also solve some of the current issues...:hmm2:
I have no doubts that U-FlaK standard equipment somewhat differs, but we should also leave some space for bunker upgrades. People like to customize their U-Boats in bunker...
EDIT
Also, 2x Flakvirling + 1x single 37mm in default state would pose a significant overkill for poor planes AI in SH5...The worst RAF nightmare...:D
Using only 3 flak slots instead of 4 can also solve some of the current issues...:hmm2:
What do you mean?
I have no doubts that U-FlaK standard equipment somewhat differs, but we should also leave some space for bunker upgrades. People like to customize their U-Boats in bunker...
Of course. I talked about standard gun outfit, but we can leave space for some non-historical user customizations through bunker upgrades :)
EDIT
Also, 2x Flakvirling + 1x single 37mm in default state would pose a significant overkill for poor planes AI in SH5...The worst RAF nightmare...:D
Do you think that switching one 37mm and two double 20 mm with two quad 20 mm Flaks will make much difference? :hmm2:
P.S: man, the German equipment names you have put in upc/upge files instead of the English ones, are driving me nuts :doh:
vdr1981
02-26-16, 10:13 AM
Do you think that switching one 37mm and two double 20 mm with two quad 20 mm Flaks will make much difference? :hmm2:
Never mind that, we can deal with equipment types later...:up: The system with 3x heavy flak slots could actually work, let's try that first. For now it seem OK, all stations are working, only fornt flak have opposite side crew again (A2 bone). Can we rotate bones in gr2 editor?:hmm2:
P.S: man, the German equipment names you have put in upc/upge files instead of the English ones, are driving me nuts :doh:
LoL sorry:D...
http://www.mediafire.com/download/19frjnz6ox6a9c8/SH5_U-FlaK_-_front_gun_test_patch.7z
Note that I have left the obj_Turret controllers unchanged, but they might need some training/elevation restrictions for the guns to fire a correct angles (i.e. for avoiding the message "cannot shot at the u-boat sir").
Let me know if it works :up:
vdr1981
02-26-16, 10:47 AM
http://www.mediafire.com/download/19frjnz6ox6a9c8/SH5_U-FlaK_-_front_gun_test_patch.7z
Note that I have left the obj_Turret controllers unchanged, but they might need some training/elevation restrictions for the guns to fire a correct angles (i.e. for avoiding the message "cannot shot at the u-boat sir").
Let me know if it works :up:
Nope, I'm teleported to the stern heavy flak when front flak is "clicked"...
Did you get same results?
only fornt flak have opposite side crew again (A2 bone). Can we rotate bones in gr2 editor?:hmm2:
Yep. Tell me the which GR2 file, and exact bone name :salute:
Nope, I'm teleported to the stern heavy flak when front flak is "clicked"...
Did you get same results?
After installing my patch?
vdr1981
02-26-16, 10:58 AM
Yep. Tell me the which GR2 file, and exact bone name :salute:
I'm going to upload modified gr2 tower file with edited bones (A2 bone moved to the front, A1 in the middle, S2 removed ect) . Is that OK? Messing with M1 node is not necessary any longer , I think...
I was trying to rotate A2_FLAK_GUN bone, but I couldn't...:hmm2:
EDIT
After installing my patch?
Yes...
Yes...
And what about your own modifications? Do they work? I am afraid that if we can't get the game to handle two heavy Flaks, doing it with three of them could be even harder, even if we give up the light ones :hmm2:
vdr1981
02-26-16, 11:13 AM
And what about your own modifications? Do they work? I am afraid that if we can't get the game to handle two heavy Flaks, doing it with three of them could be even harder, even if we give up the light ones :hmm2:
I'ts early to tell... Take a look at this...
http://s6.postimg.org/l5q96uewd/SH5_Img_2016_02_26_17_05_03.jpg (http://postimg.org/image/l5q96uewd/)
This is a new configuration and you can see the issues. I can man all three stations but I still can't operate two forward heavy flaks. I'll see what I can do...:hmmm:
Do you want me to upload the files?
...This is a new configuration and you can see the issues.
This is what I can see:
- Bow gun: there is only one gunner instead of two, and he is sitting on the wrong end of the gun;
- Wintergarte gun: there is only one gunner instead of two, and he is manning the gun as if it was a light Flak gun;
- Stern gun: as far as I can see from your screenshot, all seems okay.
I can man all three stations but I still can't operate two forward heavy flaks. I'll see what I can do...:hmmm:
I don't get you: if you can man them, what prevents you from operating them? Don't they move/shot or what else?
Do you want me to upload the files?
Yes, please. Don't forget to include any other file you might have modified besides the GR2 file :yep:
vdr1981
02-26-16, 11:52 AM
OK, just give me some time...:up: I have to go now, but later this evening I'll upload new files and then we'll see what we can do...:)
OK, just give me some time...:up: I have to go now, but later this evening I'll upload new files and then we'll see what we can do...:)
No problem Vecko, take your time :salute:
vdr1981
02-26-16, 04:58 PM
http://s6.postimg.org/wxe4hn9ip/SH5_Img_2016_02_26_22_47_57.jpg
OK, this would be realistic (and very badass ) U-flak configuration, you will agree gap, right?:)
It's interesting that in this configuration all flak stations are working fine !? :doh:
However, If I add 2x 37mm instead of 2xQuads, then forward two stations will become inoperable (for player)...Strange...:hmmm:
Here is the new U-flak mod (complete)...
http://www.mediafire.com/download/cd4v9ktpxzmd9db/Z_SH5_Playable+U-FlaK+II.rar
Cybermat47
02-26-16, 05:35 PM
Will this be incoporated into the next version of TWoS?
OK, this would be realistic (and very badass ) U-flak configuration, you will agree gap, right?:)
It's interesting that in this configuration all flak stations are working fine !? :doh:
Okay good. What about the manning crew? I have probably found why some guns had missing/flipped/wrong crew.
While I was waiting for your updates I tweaked a bit the conning tower to accomodate the new gun configuration (if you open the GR2 file you will understand what I am talking about). Talking on it, I am stil undecided wether to remove the flag staff or not...
Here are the files:
http://www.mediafire.com/download/5yb75qnp27nvrpr/SH5_U-FlaK_-_Turm_Tweaks.7z
However, If I add 2x 37mm instead of 2xQuads, then forward two stations will become inoperable (for player)...Strange...:hmmm:
The more I mess with playable guns, the more I get convinced that there are some hardcoded values preventing the usage of more than one 37mm Flak (and probably making the twin 37mm buggy). I hope to be wrong though :)
vdr1981
02-26-16, 06:55 PM
Okay good. What about the manning crew? I have probably found why some guns had missing/flipped/wrong crew.
Please explain! :) My changes still have wrong/flipped crew (as you can see in my upload)
While I was waiting for your updates I tweaked a bit the conning tower to accomodate the new gun configuration (if you open the GR2 file you will understand what I am talking about). Talking on it, I am stil undecided wether to remove the flag staff or not...
I like it, very nice! :up::up: I think you should remove it because there is no any flag staff on U-flak pictures...:yep::up:
The more I mess with playable guns, the more I get convinced that there are some hardcoded values preventing the usage of more than one 37mm Flak (and probably making the twin 37mm buggy). I hope to be wrong though :)
I dont think that anything is hard codded...It's just that we don't know how...
But, we are on good track...
Please explain! :) My changes still have wrong/flipped crew (as you can see in my upload)
Okay, don't quote me on that, what follows is just my guessing, but I think that bones named WP_* are used for crew placement. There are two copies of them, one in the turm GR2 and the other in turm's waypoints GR2 file. Looking more closely at them, I suspect the first determine crew position, and the latter crew rotation. Going by names and positions, it is easy understanding which WP bone goes to which gun; yet, I still cant find the logical linking among them. It is possible that settings associating each gun slot with its appropriate WP bone and crew type are found in an softcoded cfg file, or it is possible that this association is hardcoded so that WP_A01_GUN always means "light Flak crew linked to the gun in configurable bone A01", WP_FLAK_GUN is heavy Flak crew to the gun in bone S01", etc. If that was the case, there would be little space for assigning corret crew to the two Flakvierling (they would always display ligh AA guns crew), but for a start I would start renaming those bones WP_FLAK_GUN, WP_FLAK_GUN_01, WP_FLAK_GUN_02, and see what happens...
I like it, very nice! :up::up: I think you should remove it because there is no any flag staff on U-flak pictures...:yep::up:
I think the flagstaff was removable but no problem on that: I can delete it from the file, or move it to one side :up:
I dont think that anything is hard codded...It's just that we don't know how...
But, we are on good track...
I hope so! :salute:
Good news :up:
Using Notepad++ I have searched the data folder for the string "WP_FLAK_GUN", and I found instances of it in the following files:
\Scripts\AI\Crew\Crew_Idle_Actions_QR2.aix
\Submarine\NSS_Uboat7*\Submarine Parts\Conning_7*.GR2 (this was expected)
\Submarine\NSS_Uboat7c41\Submarine Parts\Conning_7c41_*.waypoints.GR2 (this was expected too, but I still don't get why only VIIc41's conning towers have their crew waypoints duplicated in an external GR2 file; makes me wonder whether the duplicated bones are actually used or not)
\Submarine\NSS_Uboat7*\waypoint_edges.txt
\Submarine\NSS_Uboat7*\waypoint_info.txt
Now we need to study those files, but I feel we are a step closer to the solution of the puzzle :sunny:
THEBERBSTER
02-27-16, 06:20 AM
sober made a mod for Shaefer for using with VIIA and VIIB's where he moved the bridge crew to different positions.
Peter
vdr1981
02-27-16, 07:58 AM
Good news :up:
Using Notepad++ I have searched the data folder for the string "WP_FLAK_GUN", and I found instances of it in the following files:
\Scripts\AI\Crew\Crew_Idle_Actions_QR2.aix
\Submarine\NSS_Uboat7*\Submarine Parts\Conning_7*.GR2 (this was expected)
\Submarine\NSS_Uboat7c41\Submarine Parts\Conning_7c41_*.waypoints.GR2 (this was expected too, but I still don't get why only VIIc41's conning towers have their crew waypoints duplicated in an external GR2 file; makes me wonder whether the duplicated bones are actually used or not)
\Submarine\NSS_Uboat7*\waypoint_edges.txt
\Submarine\NSS_Uboat7*\waypoint_info.txt
Now we need to study those files, but I feel we are a step closer to the solution of the puzzle :sunny:
Heh, we are thinking the same. I reached the same conclusions yesterday while I was using advanced search options in Notepad++ , that's why I asked you how can I rotate bones with gr2 editor (I was trying to rotate WP_A02_GUN bone). However, I'm not happy to see that even script files are involved in crew placement...:hmmm:
One more question though...Your tweaked gr2 U-flak tower works great but it has been doubled in size (9MB, was 4MB), was that your intention or maybe not?:hmm2:
Also, I'm going to upload latest U-flak version with edited upgrade packs, restricted gun zones ect...You are free to grab it and , if possible, to tweak any spotted issue...:yep:
sober made a mod for Shaefer for using with VIIA and VIIB's where he moved the bridge crew to different positions.
Peter
Hi Peter, thank you.
Unlike watch crew, gun crews need to be aligned with their guns, and their animation synchronized with gun's animation. Some of their settings might be different, in any case I would like to see sober's mod. Do you know where I can download it?
Heh, we are thinking the same. I reached the same conclusions yesterday while I was using advanced search options in Notepad++ , that's why I asked you how can I rotate bones with gr2 editor (I was trying to rotate WP_A02_GUN bone).
WP_A02_GUN in your latest version of the conning tower GR2 file seems okay, but you can try rotating it in the waypoints.GR2 file.
However, I'm not happy to see that even script files are involved in crew placement...:hmmm:
Today I had a look waypoint_edges.txt and waypoint_info.txt files. There is not much to be tweaked there, if not making sure that all the crew waypoints in the GR2 files are set within the two files above. I still haven't found what determines that waypoint "WP_A02_GUN" is connected with configurale bone "cfg#A02", and a light Flak gunner gets linked to it when that gun is manned. :hmm2:
One more question though...Your tweaked gr2 U-flak tower works great but it has been doubled in size (9MB, was 4MB), was that your intention or maybe not?:hmm2:
No, that's a common problem: when GR2 Editor exports a model, that model gets uncompressed (i.e. some vertices are duplicated); compression on reimporting the same model is not automatic though. I will try and optimize the model before reimporting it. I can't promise I will manage bringing the GR2 file back to 4 MB, but its file size should decrease to some extent at least. :salute:
Also, I'm going to upload latest U-flak version with edited upgrade packs, restricted gun zones ect...You are free to grab it and , if possible, to tweak any spotted issue...:yep:
Okay. Make sure the pack is accompanied by a detailed description of the issues still remaining. If need be, I will send you back my own tweaks on your files. Not necessarily fixes though: it is as well possible that I break something, as we are still in a trial and error phase :doh::salute:
vdr1981
02-27-16, 08:52 AM
WP_A02_GUN in your latest version of the conning tower GR2 file seems okay, but you can try rotating it in the waypoints.GR2 file.
I tried but without success, Usual Rclick-Edit doesn't work... :hmm2:
Today I had a look waypoint_edges.txt and waypoint_info.txt files. There is not much to be tweaked there, if not making sure that all the crew waypoints in the GR2 files are set within the two files above. I still haven't found what determines that waypoint "WP_A02_GUN" is connected with configurale bone "cfg#A02", and a light Flak gunner gets linked to it when that gun is manned. :hmm2:
Yeah, it looks like WP_A02_GUN and WP_A01_GUN bones are somehow asociated with light flak crew...:hmmm:
No, that's a common problem: when GR2 Editor exports a model, that model gets uncompressed (i.e. some vertices are duplicated); compression on reimporting the same model is not automatic though. I will try and optimize the model before reimporting it. I can't promise I will manage bringing the GR2 file back to 4 MB, but its file size should decrease to some extent at least. :salute:OK, no problems...I haven't spotted any issues even with 9MB file...:yep:
vdr1981
02-27-16, 09:06 AM
And here is the new version...
Current issues:
Front gun - no visible crew or flipped single light AA gunner when bone is renamed to WP_A02_GUN
Central Quad 20mm AA gun - single light AA gunner (I brought that poor guy back to the bridge, just to make some crowd when guns are manned :))
Front gun not operational for player (shielded, 37mm) until it's replaced with quad 20mm trough bunker upgrade. (All other flak stations are OK)
And that's about it...
http://www.mediafire.com/download/qdkry8r3lec8am3/Z_SH5_Playable+U-FlaK+III.rar
Make some tweaks if you can, if not, well , what a hell, we will wait for some better times untill we learn more about the files and dependencies...:) My opinion is that the new boat is a great fun even now, such as it is (until those Spitfires arrive at least :D)...
THEBERBSTER
02-27-16, 11:03 AM
Hi gap
Download link
http://www.mediafire.com/download/cdgrwdlt4693hgx/sobers+7A_B+deck+crew+moved+for+Shaefer+SH5.zip
Peter
I tried but without success, Usual Rclick-Edit doesn't work... :hmm2:
The latest version of GR2 Editor is weird when it comes to bone editing. I will rotate the bone myself using one of the older versions of TDW's tool. I am optimistic that we can solve the flipped crew issue :up:
Yeah, it looks like WP_A02_GUN and WP_A01_GUN bones are somehow asociated with light flak crew...:hmmm:
I hope waypoint names and associations aren't hardcoded, otherwise there would be little to be done in order to swich A1 and A2 guns to use correct crew models when heavy Flaks are fitted on them instead of light ones.
OK, no problems...I haven't spotted any issues even with 9MB file...:yep:
Working on some more optimized meshes and on removing the flagstaff. I hope the optimization won't break AO channel's UV map as often happens. :)
And here is the new version...
Got it :up:
Current issues:
Front gun - no visible crew or flipped single light AA gunner when bone is renamed to WP_A02_GUN
Central Quad 20mm AA gun - single light AA gunner (I brought that poor guy back to the bridge, just to make some crowd when guns are manned :))
I hope the missing crew was caused by the mismatch between main and waypoints' GR2 files, and the new waypoint names being absent from waypoint_edges.txt and waypoint_info.txt files, but I am afraid things are much more complicated than this. Currently I am investigating the meaning of GunSationController and GunstationControllerProperties settings and station/crew scripts. There might be several connections among the above files that we need to discover...
Front gun not operational for player (shielded, 37mm) until it's replaced with quad 20mm trough bunker upgrade. (All other flak stations are OK)[/QUOTE]
This is another mistery: why the FlakVierling is user-operable and not the 37mm M42. Under a functional point of view they both are heavy Flaks after all :hmmm:
Make some tweaks if you can, if not, well , what a hell, we will wait for some better times untill we learn more about the files and dependencies...:) My opinion is that the new boat is a great fun even now, such as it is (until those Spitfires arrive at least :D)...
I wish I had more time. I can do some changes on the fly, but as I said I think we need to study a bit more the game before we can fix some of the glitches :-?
Hi gap
Download link
http://www.mediafire.com/download/cdgrwdlt4693hgx/sobers+7A_B+deck+crew+moved+for+Shaefer+SH5.zip
Peter
Thank you very much Peter! :salute:
vdr1981
02-27-16, 03:14 PM
This is another mistery: why the FlakVierling is user-operable and not the 37mm M42. Under a functional point of view they both are heavy Flaks after all :hmmm:
Indeed...From some reason , it seems that game treats Quad flak both as heavy and light gun...
Maybe some Camera.cam/gr2 tweaks are needed, or maybe some appropriate scripts... ...:hmmm:
I'm waiting for your gr2 tower with flagstaff tweak, then I will release new update for TWoS...:up:
Indeed...From some reason , it seems that game treats Quad flak both as heavy and light gun...
Maybe some Camera.cam/gr2 tweaks are needed, or maybe some appropriate scripts... ...:hmmm:
I'm waiting for your gr2 tower with flagstaff tweak, then I will release new update for TWoS...:up:
:up:
@ Vecko:
http://www.mediafire.com/download/4gx6cn3y2q4s712/Submarine_Parts.7z
I have removed the flagstaff from conning tower's model, and rotated A02 waypoint bone in waypoints GR2 file. I have also tried optimizing model vertices for file size reduction, but on importing the compressed file AO's UV map was corrupted. I still hope the issue can be solved by importing/exporting the optimized meshes in 3ds max. Targor Avelany/Max knew how to do it, he helped me a lot with some of my previous models, but he has not been around lately. I still hope I can borrow 3ds from some friend, and find the right combination of export option. In the meanwhile please update your TWoS with the current files.
Tomorrow I will keep digging into the wrong gun crew issue; let me know if the new waypoints GR2 solves the issue of front gun with crew facing the wrong direction :salute:
vdr1981
02-27-16, 06:25 PM
@ Vecko:
http://www.mediafire.com/download/4gx6cn3y2q4s712/Submarine_Parts.7z
I have removed the flagstaff from conning tower's model, and rotated A02 waypoint bone in waypoints GR2 file. I have also tried optimizing model vertices for file size reduction, but on importing the compressed file AO's UV map was corrupted. I still hope the issue can be solved by importing/exporting the optimized meshes in 3ds max. Targor Avelany/Max knew how to do it, he helped me a lot with some of my previous models, but he has not been around lately. I still hope I can borrow 3ds from some friend, and find the right combination of export option. In the meanwhile please update your TWoS with the current files.
Tomorrow I will keep digging into the wrong gun crew issue; let me know if the new waypoints GR2 solves the issue of front gun with crew facing the wrong direction :salute:
Great work with the flagstaff, it looks much better now! :up:
However, rotating A02 bone in waypoints.gr2 file didn't do any good. It seems that WP_xx_GUN bones in the main gr2 object (tower) are responsible for guns crew placement .
I have renamed front WP_FLAK_GUN_02 bone back to WP_A02_GUN in order to get back front flak gunner , but he is still flipped.
You should try to rotate front WP_FLAK_GUN_02 bone in the main gr2 tower file, or even better, send me gr2 editor which can actually do that? :hmm2:
Great work with the flagstaff, it looks much better now! :up:
However, rotating A02 bone in waypoints.gr2 file didn't do any good.
At this point I suspect that that file is just a leftover by devs (as I noted yesterday other Uboats' conning towers don't have it). Try deleting it and see what happens.
It seems that WP_xx_GUN bones in the main gr2 object (tower) are responsible for guns crew placement .
I have renamed front WP_FLAK_GUN_02 bone back to WP_A02_GUN in order to get back front flak gunner , but he is still flipped.
You should try to rotate front WP_FLAK_GUN_02 bone in the main gr2 tower file, or even better, send me gr2 editor which can actually do that? :hmm2:
Sure, use this :up:
http://www.mediafire.com/download/fsadwcac1vpg5j4/TDW_GR2EditorViewer_v_1_1_453_1.zip
Unless I am very much mistaken, that bone is already facing the right direction though: open the file in goblin or in GR2 Editor, select WP_FLAK_GUN_02/WP_A02_GUN and note that its Z axis is already pointing to the bow :hmm2:
vdr1981
02-27-16, 07:03 PM
At this point I suspect that that file is just a leftover by devs (as I noted yesterday other Uboats' conning towers don't have it). Try deleting it and see what happens.
Will try that...
Unless I am very much mistaken, that bone is already facing the right direction though: open the file in goblin or in GR2 Editor, select WP_FLAK_GUN_02/WP_A02_GUN and note that its Z axis is already pointing to the bow :hmm2:
You're right but somehow the poor crewman is still flipped so, let's flip it again...:) I'll try to do this...This will be my first flipped bone in gr2 editor...:)
EDIT
I think that the solution is somewhere in between crewidle.aix and upcge files...Don't invest too much time in this issue though, I think that really is not worth it ...
EDIT 2
Why I cant edit bones rotation even with your editor version? Usual right click on bone to edit just wont work in case of bones rotation??
You're right but somehow the poor crewman is still flipped so, let's flip it again...:)
You are right. Quoting Arthur Conan Doyle "Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth"... or at least so we hope. Sometimes this game seems so illogical that the best way to proceed is using a trial and error process :O:
I'll try to do this...This will be my first flipped bone in gr2 editor...:)
:sunny:
You need to know that bone rotation data is stored as quaternion angles. GR2 Editor has Euler to Quaternion and Quaternion to Euler angle converter in its tools menu :up:
vdr1981
02-27-16, 07:17 PM
You need to know that bone rotation data is stored as quaternion angles. GR2 Editor has Euler to Quaternion and Quaternion to Euler angle converter in its tools menu :up:
Holly crap, what are talking about!? :doh::haha:
Just kidding,...I'll see what I can do...:haha:
vdr1981
02-27-16, 07:35 PM
Just kidding,...I'll see what I can do...:haha:
Nope...I think I'll just leave bone rotation jobs for you Gap...:dead:
Anyway, I've forced one deck gun crewman to sits correctly on Quad's seat, using few changes in mentioned aix files...Dont ask me how yet ...
EDIT
I think that the solution is somewhere in between crewidle.aix and upcge files...Don't invest too much time in this issue though, I think that really is not worth it ...
Do you mean the solution to wrong crew being displayed?
EDIT 2
Why I cant edit bones rotation even with your editor version? Usual right click on bone to edit just wont work in case of bones rotation??
Your question revealead a possible cause for the flipped gunner! Though apparently facing the right direction, fron gunner's bone had position data (flag: 1) but not rotation data. All other bones of the same type have both position and rotation data (flag: 3).
I have corrected the error now, and renamed the bone to its old name (WP_A02_GUN). Please download the latest version of my tweaks (http://www.mediafire.com/download/3m61wnz9wdkdm9w/Conning_7C41F_02.7z) on the conning tower file, and use it as it is. Should the gunner be still flipped, try rotating the bone. This time GR2 Editor should let you to do so. :03:
vdr1981
02-27-16, 07:41 PM
Do you mean the solution to wrong crew being displayed?
Yeah, check my previous post...:yep:
Your question revealead a possible cause for the flipped gunner! Though apparently facing the right direction, fron gunner's bone had position data (flag: 1) but not rotation data. All other bones of the same type have both position and rotation data (flag: 3).
I have corrected the error now, and renamed the bone to its old name (WP_A02_GUN). Please download the latest version of my tweaks (http://www.mediafire.com/download/3m61wnz9wdkdm9w/Conning_7C41F_02.7z) on the conning tower file, and use it as it is. Should the gunner be still flipped, try rotating the bone. This time GR2 Editor should let you to do so. :03:
:up:
Nope...I think I'll just leave bone rotation jobs for you Gap...:dead:
Come on lazy man you managed doing that http://www.gifs.net/Animation11/Webdesign_Elements/Arrows/set_5_down.gif and you cannot rotate a small point?!! :D
Anyway, I've forced one deck gun crewman to sits correctly on Quad's seat, using few changes in mentioned aix files...Dont ask me how yet ...
Holy crap, I am sorry but I must ask: how did you manage doing that? :o :D
Make sure that while you fix U-flak's gunners you don't mess up other conning towers! :)
vdr1981
02-27-16, 08:05 PM
Well ok, but this is just a testing...
The script for deck gun crew was like this...
strategy SQ_BED01_Manning_deck_gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_M01)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_leave_rush" );
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso05", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:Teleport("WP_DECK_GUN");
Wp:ManTheGun(SLOT_M01, "88mm_L_R", ROLE_TRAV);
Wp:ScriptCompleted();
..and I changed it to this...
strategy SQ_BED01_Manning_deck_gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_A01)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_leave_rush" );
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso05", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:Teleport("WP_A01_GUN");
Wp:ManTheGun(SLOT_A01, "Vierling_UP_DW", ROLE_TRAV);
Wp:ScriptCompleted();
The result is one dude sitting correctly on his ass...Now deckgun crew is probably screwed but if manage somehow to add new script...:hmm2:
Well ok, but this is just a testing...
The script for deck gun crew was like this...
Which file? :03:
Any fresh news on my latest tweaks? Do you still need me to rotate that *******g bone? :O:
vdr1981
02-27-16, 08:18 PM
Which file? :03:
Any fresh news on my latest tweaks? Do you still need me to rotate that *******g bone? :O:
Ignore my previous post, it was this tweak...
was this...
strategy QRF_PETTY01_Manning_A01gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_A01)
}
action
{
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:PlayAnimationAndWait( "QRF_Petty01_leave_rush" );
Wp:Teleport("WP_A01_GUN");
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30_2) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_2_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_twin_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin_Shield) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_shield_twin_UP_DW", ROLE_GUNNER)
endif;
Wp:ScriptCompleted();
and I've added appropriately one more line taken from WP_FLAK_ GUN script...
strategy QRF_PETTY01_Manning_A01gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_A01)
}
action
{
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:PlayAnimationAndWait( "QRF_Petty01_leave_rush" );
Wp:Teleport("WP_A01_GUN");
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:ManTheGun(SLOT_A01, "Vierling_UP_DW", ROLE_ELEV)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30_2) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_2_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_twin_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin_Shield) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_shield_twin_UP_DW", ROLE_GUNNER)
endif;
Wp:ScriptCompleted();
Note that A01 light gunner in type VIIC for example is not broken also...:)
vdr1981
02-27-16, 08:22 PM
Bad news regarding front A02 gunner...I've managed somehow to rotate WPA02GUN bone (not correctly though, about 60deg) but still, flipped gunner is on exactly the same place...:hmm2:
vdr1981
02-27-16, 08:41 PM
Slightly better but still that front gunner is dumb or something...:D
http://s6.postimg.org/ytak3nu29/SH5_Img_2016_02_28_02_37_53.jpg
Bad news regarding front A02 gunner...I've managed somehow to rotate WPA02GUN bone (not correctly though, about 60deg) but still, flipped gunner is on exactly the same place...:hmm2:
So if you rename/remove WP_A02_GUN, the gunner disappears, but bone rotation has no effect on gunner's rotation? That's black magic :doh:
P.S: Have you tried using my file first without rotating the bone?
P.S.2: Try and move around that bone and see if its position has any effect on gunner's position.
P.S-3: I start thinking that that bone might be broken somehow. Try rotating one of the other bones; if their gunners rotate accordingly, scrap the front gunner bone, duplicate one of the other ones for replacing the former.
P.S-4: Is it possible that the two gunners in A1 and A2 must be facing the same direction, A1 taking the precedence? If nothing of the above works, try switching A1 and A2 bone names and see what happens... :hmmm:
vdr1981
02-27-16, 08:52 PM
So if you rename/remove WP_A02_GUN, the gunner disappears, but bone rotation has no effect on gunner's rotation? That's black magic :doh:
P.S: have you tried using my file first without rotating the bone?
Yes, it's the same, but again, maybe you should verify that...:hmmm:
Hmm, maybe fornt gunners will sit correctly if I use deck gun crew, after all, the deck gun is orientated to front side , unlike any other flak in game...:hmm2:
Ignore my previous post, it was this tweak...
was this...
Crew_Idle_Actions_QR1.aix?
strategy QRF_PETTY01_Manning_A01gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_A01)
I see here guns are designed by their name and slot as set in GunStationControllerProperties. Is is possible that you change those A01 and A02 controller settings ocpying the values from the corresponding controller in S01? Would that break player's and/or AI ability to operate those guns?
Yes, it's the same, but again, maybe you should verify that...:hmmm:
Hmm, maybe fornt gunners will sit correctly if I use deck gun crew, after all, the deck gun is orientated to front side , unlike any other flak in game...:hmm2:
yep, that's a possibility, but deck gun manning crew looks nothing like heavy Flak gunners :hmm2:
https://en.wikipedia.org/wiki/German_Type_VII_submarine#U-flak_.22Flak_Traps.22:
"Two 20 mm quadruple Flakvierling mounts and an experimental 37 mm automatic gun were installed on the U-flaks' decks. A battery of 86 mm line-carrying anti-aircraft rockets was tested (similar to a device used by the British in the defense of airfields), but this idea proved unworkable. At times, two additional single 20 mm guns were also mounted."
:o :O:
No way we can do this in SH5; I will be happy enough if we manage solving the remaining issues with the current gun layout.
By the way: I couldn't find any useful information on this "experimental 37 mm automatic gun" mentioned in the Wikipedia article. Judging from the few photos of an U-Flak available on the web, it had to look more like an SK C/30U (https://en.wikipedia.org/wiki/3.7_cm_SK_C/30) than else, though the latter gun was only semi-automatic (additional information on it found on navweaps.com (http://www.navweaps.com/Weapons/WNGER_37mm-83_skc30.htm))
http://img4.hostingpics.net/pics/256359U_441__2.jpg
Side view of U-441's conning tower after her refitting as a "Flak trap". 37 mm gun on the left.
https://upload.wikimedia.org/wikipedia/commons/7/77/Bundesarchiv_Bild_101II-MW-3930-23A%2C_U-Boot_U-103_in_See.jpg
The 37 mm SK C/30U Flak gun as fitted on U-103.
My impression is confirmed by a drawing of U-441's conning tower I found on the web, though I ignore its original source:
http://www.wlb-stuttgart.de/seekrieg/4305-bilder/u441/u441-riss.jpg
Going back to the game, I have noticed you have picked the SK C/30 as standard stern gun, and this is in conformity with the information I have gathered above. Should you feel that for gameplay reasons we need to make provisions for a gun upgrade, I could create a clone of the SK C/30 to be used as an upgrade, giving it an higher rate of fire compatible with the one of an automatic gun of the time. I am afraid that the other 37 mm Flak available in game, (i.e. the Flak M42 (https://en.wikipedia.org/wiki/3.7_cm_Flak_18/36/37/43#3.7cm_Flak_M42), more info on it on navweaps (http://www.navweaps.com/Weapons/WNGER_37mm-69_mk42.htm)), though being an automatic gun since it entered service, wouldn't be a realistic option, as it became available only in 1944.
As for bow and wintergarten guns, imo we should leave the two quad 20 mm Flaks as the only possible option, available from U-boat issue. Adding the weight of one or two 37 mm guns forward, would have made U-Flak's maneuverability even clumsier than it already was, not to mention the fact that we haven't managed making two 37mm guns player-operable on the same boat yet. :)
Cybermat47
02-28-16, 06:32 AM
I agree about the types of flak, gap, that 37mm definitely looks like the earlier 'reload after every shot' type.
If possible, the player should be able to choose what type of flak guns they have while in the bunker, but I think the default loadout should be based on the photos we have available.
EDIT: By the way, vdr, just a minor thing, but I think that in-game, it should be spelt only with a capital 'U', i.e. 'U-flak', rather than 'U-FlaK', as 'fliegerabwehrkanone', from what I've seen, is all one word. Just a trivial thing, but I felt it should be adressed.
I agree about the types of flak, gap, that 37mm definitely looks like the earlier 'reload after every shot' type.
Definitely. The only piece of information that is confusing me is that quote from Wikipedia about the "experimental 37 mm automatic gun". It might have been a modification of the SK C/30U but so far I couldn't find any information on it, and it wouldn't be the first time a Wiki article reports wrong information. I will check some books later today, just to be sure. :03:
If possible, the player should be able to choose what type of flak guns they have while in the bunker, but I think the default loadout should be based on the photos we have available.
I agree. The only problem is that the standard gun equipment as seen in photos and stated by various sources, was already the top possible at the time for an U-boat. Any upgrade in game would be either totally unrealistic or a "downgrade" actually. The only idea I can think of, is the replacement of the stern gun with a slightly improved one, mimicing this (so far) mythical "experimental" 37 mm Flak mentioned by Wikipedia. :yep:
vdr1981
02-28-16, 01:40 PM
There is a serious issue...:hmmm: Something form or latest gr2 tower updates is causing CTD when player tries to climb on front platform (some kind of teleport.act issue)...No issues with gr2 tower currently in TWoS update No.05...
I will have to reexamine all the changes involved in bones naming, placing and deleting...:hmmm:
There is a serious issue...:hmmm: Something form or latest gr2 tower updates is causing CTD when player tries to climb on front platform (some kind of teleport.act issue)...No issues with gr2 tower currently in TWoS update No.05...
I will have to reexamine all the changes involved in bones naming, placing and deleting...:hmmm:
I need to go off now, but maybe it is easier if we scrap the current file and I redo all the changes in a fresh copy of it...
vdr1981
02-28-16, 03:05 PM
I need to go off now, but maybe it is easier if we scrap the current file and I redo all the changes in a fresh copy of it...
I'm doing that right now...I will only need you to add flagstaff and deck tweaks after I'm finished...Is that OK? :hmm2:
vdr1981
02-28-16, 03:21 PM
Here is the gr2 file Gap, when ever you're ready...:up:
Just don't rename any bone names , for now...:hmmm:
http://www.mediafire.com/download/994e3d1bq5v4c2s/OldNewTower.rar
vdr1981
02-28-16, 06:01 PM
Is it possible at all to add or clone single bone with this gr2 tool gap??:-?
vdr1981
02-28-16, 07:15 PM
Don't do anything Gap, I think I've fixed it...:) I managed to import your meshes into new gr2 file!:)
Is it possible at all to add or clone single bone with this gr2 tool gap??:-?
Yep, do you need me to do it?
Don't do anything Gap, I think I've fixed it...:) I managed to import your meshes into new gr2 file!:)
:up:
I suppose you exported/reimported the updated meshes. Just make sure that file size didn't further increase in the process :03:
I had a look into the aix files and I think your modifications wont have any adverse effect on other conning towers. As far as I can understand, we should had two new crew memebers if we want if we want both Vierlings to have two men (0n for elevation, on for training) on them.
I also think I have found where slot values selectable in GunStationControllerProperties are stored (that's init.aix). If that was true, we could probably add two more gun bones to the conning tower GR2 files, usaful for equipping the U-FlaK with two additional 20 mm guns through upgrades menu. Manning them with visible AI crew, whould require the addition of two more crew memebers though. :)
Cybermat47
02-28-16, 07:52 PM
Vecko, I found some information concerning the U-flak and mid-to-late war type VIIs in general. Check your PM :salute:
vdr1981
02-28-16, 07:54 PM
Vecko, I found some information concerning the U-flak and mid-to-late war type VIIs in general. Check your PM :salute:
Yeah, I saw it, thanks...:up:
vdr1981
02-28-16, 07:56 PM
If that was true, we could probably add two more gun bones to the conning tower GR2 files, usaful for equipping the U-FlaK with two additional 20 mm guns through upgrades menu. Manning them with visible AI crew, whould require the addition of two more crew memebers though. :)
Yeah , I read that, but two more flaks?! Where should I place them? :D
Yeah , I read that, but two more flaks?! Where should I place them? :D
I was wondering the same since when I read the Wikipedia article I quoted below. That conning tower is already too crammed :haha:
Maybe we could move the the stern gun a bit more to the back :hmm2:
vdr1981
02-28-16, 08:10 PM
Vecko, I found some information concerning the U-flak and mid-to-late war type VIIs in general. Check your PM :salute:
One more thing Cybermat, Uflak availability date is intentionally slightly "expanded" , until I'm sure how will campaign engine react on it. Submarines awards in SH campaign are still a bit of mistery for me...
vdr1981
02-28-16, 08:17 PM
I was wondering the same since when I read the Wikipedia article I quoted below. That conning tower is already too crammed :haha:
Maybe we could move the the stern gun a bit more to the back :hmm2:
Maybe later Gap...I'm getting pretty tired of so much aix and upcge files...:doh:
First, I'm going to collect all the changes so far for the upcoming TwoS update.
Maybe later Gap...I'm getting pretty tired of so much aix and upcge files...:doh:
First, I'm going to collect all the changes so far for the upcoming TwoS update.
:up:
@ Vecko
I think I have pretty much figured out crew aix scripts. Let me know If you need for any help in tweaking them.
I think it would be a good idea getting both gunners in QR1 (light FlaK gunners in stock game) to man one of the quad 20 mm FlaKs, one of them for elevation and the other for traverse, and the two degkgun gunners in QR2 to man the other quad gun. In order to do so we don't need to change bone names. The same gunner can be used to man guns in different slots, as far as a new strategy for each new slot is added to its script, and if/then routines are set conveniently for avoiding any possible conflict (i.e. the a gunner wanting to man two guns at the same time. :yep:
In case you need for them :03:
White body text: TwOS/MFCM's code; orange strings: code added/modified by me.
Gunner: QRF_PETTY01 in QR1 (role: A01 FlaKVierling traverse)
strategy QRF_PETTY01_IDLE01(wp)
{
strategies
{
QRF_PETTY01_Sleeping,
QRF_PETTY01_Manning_A01gun
}
}
strategy QRF_PETTY01_Sleeping(wp)
{
precond
{
!Wp:IsGunManned(SLOT_A01)
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_Cap06", 1);
################################################## ################
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A01, ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_A01) != CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A01, ROLE_GUNNER)
endif;
Wp:Teleport("QRF_Petty_01");
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_talk_01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_1to2" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_2to1" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_talk_01" );
Wp:PlayAnimationAndWait( "QRF_Petty01_AtoC" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle01" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle04" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle05" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle02_part01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "QRF_Petty01_idle02_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle03_part01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty01_idle03_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty01_CtoA" );
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY01_Manning_A01gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_A01)
}
action
{
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:PlayAnimationAndWait( "QRF_Petty01_leave_rush" );
Wp:Teleport("WP_A01_GUN");
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:ManTheGun(SLOT_A01, "Vierling_L_R", ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30_2) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_2_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_twin_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin_Shield) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_shield_twin_UP_DW", ROLE_GUNNER)
endif;
Wp:ScriptCompleted();
}
}
Gunner: QRF_PETTY02 in QR1 (role: A01 FlaKVierling elevation)
strategy QRF_PETTY02_IDLE01(wp)
{
strategies
{
QRF_PETTY02_Tutorial,
QRF_PETTY02_Sleeping,
QRF_PETTY02_Manning_A01gun,
QRF_PETTY02_Manning_A02gun
}
}
strategy QRF_PETTY02_Tutorial(wp)
{
precond
{
Wp:IsTutorial() and !Wp:IsBunkerState()
}
action
{
Wp:Teleport( "QRF_Watch" );
if Wp:GetGlobalVariable(TUT_VAR_QRF_PETTY02_STATE) == 0 then
{
Wp:PlayAnimationAndWait("SAILOR02_Walk_near_player");
Wp:SetGlobalVariable(TUT_VAR_QRF_PETTY02_STATE, 1);
}
endif;
if Wp:GetGlobalVariable(TUT_VAR_QRF_PETTY02_STATE) == 1 then
Wp:PlayAnimationAndWait("SAILOR02_Wait_near_door")
endif;
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_Sleeping(wp)
{
precond
{
!((Wp:GetGunType(SLOT_A01) == CANNON_Vierling and Wp:IsGunManned(SLOT_A01)) or (Wp:GetGunType(SLOT_A01) != CANNON_Vierling and Wp:IsGunManned(SLOT_A02))) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
############## Uncomment for optional beard #####################
# Wp:SetBodyPartVisibility("object1_Barba_Cap18", 1);
################################################## ###############
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A01, ROLE_ELEV)
endif;
if (Wp:GetGunType(SLOT_A01) != CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A02, ROLE_GUNNER)
endif;
Wp:Teleport("QRF_Petty_02");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Torso06", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_1to2" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_2to1" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty02_AtoC" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle01" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle04" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle05" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle02_part01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "QRF_Petty02_idle02_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle03_part01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty02_idle03_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty02_CtoA" );
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_Manning_A01gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A01) == CANNON_Vierling and Wp:IsGunManned(SLOT_A01) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty02_leave_rush" );
Wp:Teleport("WP_A01_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso06", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
ManTheGun(SLOT_A01, "Vierling_UP_DW", ROLE_ELEV)
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_Manning_A02gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A01) != CANNON_Vierling and Wp:IsGunManned(SLOT_A02) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty02_leave_rush" );
Wp:Teleport("WP_A02_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso06", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C30) then
Wp:ManTheGun(SLOT_A02, "20mm_C30_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C30_2) then
Wp:ManTheGun(SLOT_A02, "20mm_C30_2_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C38_Twin) then
Wp:ManTheGun(SLOT_A02, "20mm_C38_twin_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C38_Twin_Shield) then
Wp:ManTheGun(SLOT_A02, "20mm_C38_shield_twin_UP_DW", ROLE_GUNNER)
endif;
Wp:ScriptCompleted();
}
}
Gunner: SQ_BED01 in QR2 (role: A02 FlaKVierling traverse)
strategy SQ_BED01_IDLE01(wp)
{
strategies
{
SQ_BED01_Sleeping,
SQ_BED01_Manning_A02gun,
SQ_BED01_Manning_deck_gun
}
}
strategy SQ_BED01_Sleeping(wp)
{
precond
{
!((Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)) or (Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)))
}
action
{
############## Uncomment for optional beard #####################
# Wp:SetBodyPartVisibility("object1_Barba_Cap18", 1);
################################################## ###############
if (Wp:GetGunType(SLOT_A02) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A02, ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_A02) != CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_M01, ROLE_TRAV)
endif;
Wp:Teleport("SQ_BED01");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Torso05", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:PlayAnimationAndWait( "SQ_BED01_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_A_Scratch01" );
Wp:PlayAnimationAndWait( "SQ_BED01_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_A2B_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED01_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_B_Dream01" );
Wp:PlayAnimationAndWait( "SQ_BED01_B2A_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED01_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_AtoC" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle04" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle05" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle02_part01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "SQ_BED01_idlle02_part02" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle03_part01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_idlle03_part02" );
Wp:PlayAnimationAndWait( "SQ_BED01_CtoA" );
Wp:ScriptCompleted();
}
}
strategy SQ_BED01_Manning_A02gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_leave_rush" );
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso05", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:Teleport("WP_A02_GUN");
Wp:ManTheGun(SLOT_A02, "Vierling_L_R", ROLE_TRAV);
Wp:ScriptCompleted();
}
}
strategy SQ_BED01_Manning_deck_gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_leave_rush" );
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso05", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:Teleport("WP_DECK_GUN");
Wp:ManTheGun(SLOT_M01, "88mm_L_R", ROLE_TRAV);
Wp:ScriptCompleted();
}
}
Gunner: SQ_BED02 in QR2 (role: A02 FlaKVierling elevation)
strategy SQ_BED02_IDLE01(wp)
{
strategies
{
SQ_BED02_Sleeping,
SQ_BED02_Manning_A02gun,
SQ_BED02_Manning_deck_gun
}
}
strategy SQ_BED02_Sleeping(wp)
{
precond
{
!((Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)) or (Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)))
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_Cap06", 1);
################################################## ################
if (Wp:GetGunType(SLOT_A02) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A02, ROLE_ELEV)
endif;
if (Wp:GetGunType(SLOT_A02) != CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_M01, ROLE_ELEV)
endif;
Wp:Teleport("SQ_BED02");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Torso03", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:SetBodyPartVisibility("A_Pants02", 1);
Wp:SetBodyPartVisibility("A_Pants01", 0);
Wp:PlayAnimationAndWait( "SQ_BED02_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_A2B_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED02_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_B2A_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED02_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_AtoC" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle02_01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "SQ_BED02_idlle02_02" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle03_01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED02_idlle03_02" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle04" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle05" );
Wp:PlayAnimationAndWait( "SQ_BED02_CtoA" );
Wp:ScriptCompleted();
}
}
strategy SQ_BED02_Manning_A02gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)
}
action
{
Wp:PlayAnimationAndWait( "SQ_BED02_leave_rush" );
Wp:Teleport("WP_A02_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso03", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:ManTheGun(SLOT_A02, "Vierling_UP_DW", ROLE_ELEV);
Wp:ScriptCompleted();
}
}
strategy SQ_BED02_Manning_deck_gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)
}
action
{
Wp:PlayAnimationAndWait( "SQ_BED02_leave_rush" );
Wp:Teleport("WP_DECK_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso03", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:ManTheGun(SLOT_M01, "88mm_UP_DW", ROLE_ELEV);
Wp:ScriptCompleted();
}
}
I hope they work :salute:
vdr1981
03-01-16, 09:29 AM
Thanks for your efforts Gap! :up:
I also have tried all kinds of tweaks in aix files but I just couldn't get rid of flipped or frozen crew problems...:hmmm:
Did you test your changes in the game and with other U-boat types? Some screenshot?
Thanks for your efforts Gap! :up:
My pleasure :up:
I also have tried all kinds of tweaks in aix files but I just couldn't get rid of flipped
Flipped crew is still a mistery to me. When a gun manning order is issued, characters in quarter rooms are teleported to their respective WP_*_GUN waypoints, as set in crew aix files. For having created some new characters in the past, I know that waypoint rotation do affect character rotation. The only reasons I could think of, for WP_A01_GUN rotation not havig any effect on its crew are:
- that bone is flawed somehow (remember that it had no rotation data in the stock conning tower). Possible solution: replace it with a clone of another bone with rotation data.
- waypoints stored in Conning_7C41F_02.waypoints.GR2 might interfere negatively with the ones of the same name stored in the main conning tower GR2 file. Possible solution: scrap that file, or remove the WP_A01_GUN bone from it.
- gunners are special characters in that their animations must be synchronized with gun animations. As you have noted a few days ago, all the FlaK guns in stock game point to the stern in their resting position. Is it possible that FlaK gun animations are made so that the character will always face the same direction, no matter their waypoint's rotation? It is a bit unlikely but... Possible solution: cloning and rotating Characters\Animations\Vierling_L_R.GR2 and Vierling_UP_DW.GR2 bones, and setting the clones files as A02 crew animations (?)
or frozen crew problems...:hmmm:
If you mean that gunners were frozen at their gun station even after the command "man the FlaK guns" was withdrawn, I think I know why this happened and my updates to crew AI should solve the issue :03:
Did you test your changes in the game and with other U-boat types? Some screenshot?
No, just finished with the script changes, and now I need to finish my work on LGN1's squid launcher before I leave :D
vdr1981
03-01-16, 12:01 PM
No, just finished with the script changes, and now I need to finish my work on LGN1's squid launcher before I leave :D
Could you upload edited files so I could test them?
Squid launcher? You're planning a new mod ? :yeah:
Could you upload edited files so I could test them?
Sure :up:
Overwrite the content of Crew_Idle_Actions_QR1.aix and Crew_Idle_Actions_QR2.aix with the following code.
QR1:
# Crew_Idle_Actions_QR1.aix
# Stock script modified by MightyFine Crew Mod 1.2.1 03/22/2010
# Edited by gap for The Wolves of Steel Mega Mod on 03/01/2016
strategy QRF_WATCH_IDLE01(wp)
{
strategies
{
QRF_WATCH_TUTORIAL,
QRF_WATCH_SUBMERGED,
QRF_WATCH_TORPEDO_HIT,
QRF_WATCH_DAMAGE_TAKEN,
QRF_WATCH_SURFACED
}
}
strategy QRF_WATCH_TUTORIAL(wp)
{
precond
{
Wp:IsTutorial() and !Wp:IsBunkerState()
}
action
{
if Wp:GetGlobalVariable(TUT_VAR_QRF_WATCH_STATE) == 0 then
{
Wp:BindAvatarCameraToObject("Cam01_wake_up_box", 65);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M1", 10.767);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M2", 16.367);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M3", 17.733);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M4", 25.5);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M5", 29.9);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M6", 37.9);
Wp:PlaySoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D01_M7", 44.567);
Wp:PlayAnimationAndWait("SAILOR01_Wake_up");
Wp:UnbindAvatarCamera(1);
Wp:Teleport("CR_NAV");
Wp:PlayAnimationAndWait("SAILOR01_Go_through_hatch");
Wp:SetGlobalVariable(TUT_VAR_QRF_WATCH_STATE, 1);
}
endif;
if Wp:GetGlobalVariable(TUT_VAR_QRF_WATCH_STATE) == 1 then
{
Wp:Teleport("CR_NAV");
if Wp:GetDistanceToAvatar() < 3 then
Wp:SetGlobalVariable(TUT_VAR_QRF_WATCH_STATE, 2)
else
Wp:PlayAnimationAndWait("SAILOR01_Wait_near_ladder")
endif;
}
endif;
if Wp:GetGlobalVariable(TUT_VAR_QRF_WATCH_STATE) == 2 then
{
Wp:Teleport("CR_NAV");
Wp:PlayAttenuatedSoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D03_M1", 0.3);
Wp:PlayAttenuatedSoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D03_M2", 6.0);
Wp:PlayAttenuatedSoundWithLipsync("WatchOfficer\Normal\TTM_QRF_WATCH_D03_M3", 15.733);
Wp:PlayAnimationAndWait("SAILOR01_Scare_Navigator");
Wp:SetGlobalVariable(TUT_VAR_QRF_WATCH_STATE, 3);
}
endif;
if Wp:GetGlobalVariable(TUT_VAR_CAPTAIN_STATE) > 0 then
Wp:SetGlobalVariable(TUT_VAR_QRF_WATCH_STATE, 4)
endif;
if Wp:GetGlobalVariable(TUT_VAR_QRF_WATCH_STATE) == 3 then
Wp:PlayAnimationAndWait("SAILOR01_Wait_at_NAV_Table")
endif;
if Wp:GetGlobalVariable(TUT_VAR_QRF_WATCH_STATE) == 4 then
{
Wp:Teleport("QRF_Watch");
Wp:PlayAnimationAndWait( "QRF_Watch_idle01" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle06" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle07" );
Wp:PlayAnimationAndWait( "QRF_Watch_change_pose" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle02" );
Wp:PlayAnimationAndWait( "QRF_Watch_inspect" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle09" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle10" );
Wp:PlayAnimationAndWait( "QRF_Watch_silence" );
Wp:Goto( "QRF_Watch_C" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle03" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle04" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle05" );
Wp:Goto( "QRF_Watch" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle08" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle09" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle10" );
Wp:PlayAnimationAndWait( "QRF_Watch_return" );
}
endif;
Wp:ScriptCompleted();
}
}
strategy QRF_WATCH_SUBMERGED(wp)
{
precond
{
# (!Wp:IsCrewState(T_HIT) or !Wp:IsCharacterPosture(C)) and
# (!Wp:IsCrewState(DMG_TKN) or !Wp:IsCharacterPosture(A)) and
(Wp:IsSubmerged() or Wp:GetGlobalVariable(VAR_DIVE_ORDER) > 0 ) and
!(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
############## Uncomment for alternate head #######################
# Wp:SetBodyPartVisibility("D_Head12", 0);
# Wp:SetBodyPartVisibility("D_EyeL12", 0);
# Wp:SetBodyPartVisibility("D_EyeR12", 0);
# Wp:SetBodyPartVisibility("D_Head16", 1);
# Wp:SetBodyPartVisibility("D_EyeL16", 1);
# Wp:SetBodyPartVisibility("D_EyeR16", 1);
# Wp:SetBodyPartVisibility("D_Torso03", 0);
# Wp:SetBodyPartVisibility("D_Torso01", 1);
################################################## ################
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_CAP13", 1);
################################################## ################
if !Wp:IsCurrentWaypoint("QRF_Watch_C") and !Wp:IsCurrentWaypoint("QRF_Watch") then
{
if Wp:IsCurrentWaypoint("WT_CR02") then
{
Wp:PlayAnimationAndWait( "DER_DE_CPO_explosion_event04" );
if Wp:GetGlobalVariable(VAR_CR_HF_LOC) < 5 and Wp:GetGlobalVariable(VAR_CR_HA_LOC) < 5 then
{
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 4);
Wp:SetBodyPartVisibility("object1_Binocular", 0);
Wp:Teleport("CT_STAIRS");
Wp:PlayAnimationAndWait( "SQ_COOK_A2C_Part01" );
}
endif;
}
else
{
if Wp:IsCurrentWaypoint("CT_STAIRS") then # wait for HF and HA to clear the stairs
{
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 4);
if Wp:GetGlobalVariable(VAR_CR_HF_LOC) < 3 and Wp:GetGlobalVariable(VAR_CR_HA_LOC) < 3 then
{
Wp:Teleport("CR_LADDER");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 3);
Wp:PlayAnimationAndWait( "QRF_RTeam_01_screw" );
}
else
{
Wp:PlayAnimationAndWait( "SQ_COOK_A2C_Part01" );
}
endif;
}
else
{
if Wp:IsCurrentWaypoint("CR_LADDER") then
{
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 3);
if Wp:GetGlobalVariable(VAR_CR_HF_LOC) < 2 and Wp:GetGlobalVariable(VAR_CR_HA_LOC) < 2 then
{
Wp:PlayAttenuatedSoundWithLipsync("MFCM\fall02", 0);
Wp:Teleport("CR_STAIRS");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 2);
if Wp:GetGlobalVariable(VAR_DIVE_ORDER) == 2 then # jar landing on crash dive
{
Wp:PlayAttenuatedSoundWithLipsync("MFCM\fall02", 0.5);
Wp:PlayAnimationAndWait("DER_DE_CPO_explosion_event01");
}
endif;
}
else
{
Wp:Teleport("CT_STAIRS"); # in case he's blocking HA and HA
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 4);
Wp:PlayAnimationAndWait( "QRF_RTeam_01_screw" );
}
endif;
}
else
{
if Wp:IsCurrentWaypoint("CR_STAIRS") then
{
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 2);
Wp:PlayAttenuatedSoundWithLipsync("MFCM\footsteps02", 0.5);
Wp:Goto("CR_WP08_DOOR");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 1);
Wp:Teleport("RR_WP01_DOOR");
Wp:Goto( "QRF_Watch" );
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 0);
}
else
{
Wp:Teleport( "QRF_Watch" );
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 0);
}
endif;
}
endif;
}
endif;
}
endif;
}
else
{
if Wp:GetGlobalVariable(VAR_DIVE_ORDER) > 0 and Wp:IsSubmerged() and Wp:GetGlobalVariable(VAR_CR_HF_LOC) == 0 and Wp:GetGlobalVariable(VAR_CR_HA_LOC) == 0 then
{
Wp:SetGlobalVariable(VAR_DIVE_ORDER, 0);
}
endif;
Wp:SetBodyPartVisibility("object1_Binocular", 0);
Wp:SetBodyPartVisibility("D_Hat02", 0);
Wp:PlayAnimationAndWait( "QRF_Watch_idle01" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle06" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle07" );
Wp:PlayAnimationAndWait( "QRF_Watch_change_pose" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle02" );
Wp:PlayAnimationAndWait( "QRF_Watch_inspect" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle09" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle10" );
Wp:PlayAnimationAndWait( "QRF_Watch_silence" );
Wp:Goto( "QRF_Watch_C" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle03" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle04" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle05" );
Wp:Goto( "QRF_Watch" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle08" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle09" );
Wp:PlayAnimationAndWait( "QRF_Watch_idle10" );
Wp:PlayAnimationAndWait( "QRF_Watch_return" );
}
endif;
Wp:ScriptCompleted();
}
}
strategy QRF_WATCH_TORPEDO_HIT(wp)
{
precond
{
Wp:IsCrewState(T_HIT) and
Wp:IsCharacterPosture(C) and
!Wp:IsCrewState(DMG_TKN) and
Wp:IsSubmerged() and
!(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
Wp:PlayAnimationAndWait( "QRF_Watch_JOY01" );
Wp:PlayAnimationAndWait( "QRF_Watch_JOY02" );
Wp:Goto( "QRF_Watch" );
Wp:PlayAnimationAndWait( "QRF_Watch_return" );
Wp:DeactivateCrewState(T_HIT);
Wp:ScriptCompleted();
}
}
strategy QRF_WATCH_DAMAGE_TAKEN(wp)
{
precond
{
Wp:IsCrewState(DMG_TKN) and
Wp:IsCharacterPosture(A) and
Wp:IsSubmerged() and
!(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
Wp:PlayAnimationAndWait( "QRF_Watch_explosion_event01" );
Wp:DeactivateCrewState(DMG_TKN);
Wp:ScriptCompleted();
}
}
strategy QRF_WATCH_SURFACED(wp)
{
precond
{
Wp:GetGlobalVariable(VAR_DIVE_ORDER) == 0 and
Wp:IsSurfaced() and
!(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
############## Uncomment for alternate head #######################
# Wp:SetBodyPartVisibility("D_Head12", 0);
# Wp:SetBodyPartVisibility("D_EyeL12", 0);
# Wp:SetBodyPartVisibility("D_EyeR12", 0);
# Wp:SetBodyPartVisibility("D_Head16", 1);
# Wp:SetBodyPartVisibility("D_EyeL16", 1);
# Wp:SetBodyPartVisibility("D_EyeR16", 1);
# Wp:SetBodyPartVisibility("D_Torso03", 0);
# Wp:SetBodyPartVisibility("D_Torso01", 1);
################################################## #################
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_CAP13", 1);
################################################## #################
if !Wp:IsCurrentWaypoint("WT_CR02") then
{
if Wp:IsCurrentWaypoint("QRF_Watch_C") or Wp:IsCurrentWaypoint("QRF_Watch") then
{
Wp:Teleport("QRF_Watch");
# Wp:SetBodyPartVisibility("D_Hat02", 1);
Wp:PlayAnimationAndWait("QRF_Warch_leave_rush");
Wp:Teleport("CR_NAV");
Wp:PlayAttenuatedSoundWithLipsync("MFCM\footsteps02", 0.25);
Wp:PlayAnimationAndWait("SAILOR01_Go_through_hatch");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 1);
}
else
{
if Wp:IsCurrentWaypoint("CR_NAV") then # wait for HA anf HF to go up ladder
{
if Wp:GetGlobalVariable(VAR_CR_HA_LOC) > 2 and Wp:GetGlobalVariable(VAR_CR_HF_LOC) > 2 then
{
Wp:Teleport("CR_STAIRS");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 2);
Wp:PlayAnimationAndWait( "SQ_COOK_A2C_Part01" );
}
else
{
Wp:PlayAnimationAndWait("SAILOR01_Wait_near_ladder");
}
endif;
}
else
{
if Wp:IsCurrentWaypoint("CR_STAIRS") then
{
if Wp:GetGlobalVariable(VAR_CR_HA_LOC) != 3 and Wp:GetGlobalVariable(VAR_CR_HF_LOC) != 3 then
{
Wp:PlayAttenuatedSoundWithLipsync("MFCM\ladder_up", 0);
Wp:Teleport("CR_LADDER");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 3);
Wp:PlayAnimationAndWait( "QRF_RTeam_01_screw" );
Wp:Teleport("WT_CR02");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 5);
}
else
{
Wp:PlayAnimationAndWait("SQ_COOK_A2C_Part01");
}
endif;
}
else
{
if !Wp:IsCurrentWaypoint("WT_CR02") then
{
Wp:Teleport("WT_CR02");
Wp:SetGlobalVariable(VAR_QRF_WATCH_LOC, 5);
}
endif;
}
endif;
}
endif;
}
endif;
}
else
{
Wp:SetBodyPartVisibility("object1_Binocular", 1);
Wp:SetBodyPartVisibility("D_Torso03", 0);
Wp:SetBodyPartVisibility("D_Torso01", 1);
# Wp:SetBodyPartVisibility("D_Hat02", 1);
Wp:PlayAnimationAndWait( "WATCH03_Idle01" );
Wp:PlayAnimationAndWait( "SECONDARY_IdleA09" );
Wp:PlayAnimationAndWait( "SECONDARY_Scan_with_Binoculars" );
}
endif;
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY01_IDLE01(wp)
{
strategies
{
QRF_PETTY01_Sleeping,
QRF_PETTY01_Manning_A01gun
}
}
strategy QRF_PETTY01_Sleeping(wp)
{
precond
{
!Wp:IsGunManned(SLOT_A01)
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_Cap06", 1);
################################################## ################
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A01, ROLE_TRAV)
else
Wp:UnmanTheGun(SLOT_A01, ROLE_GUNNER)
endif;
Wp:Teleport("QRF_Petty_01");
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_talk_01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_1to2" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_2to1" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_01_talk_01" );
Wp:PlayAnimationAndWait( "QRF_Petty01_AtoC" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle01" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle04" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle05" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle02_part01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "QRF_Petty01_idle02_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty01_idle03_part01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty01_idle03_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty01_CtoA" );
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY01_Manning_A01gun(wp)
{
precond
{
Wp:IsGunManned(SLOT_A01)
}
action
{
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:PlayAnimationAndWait( "QRF_Petty01_leave_rush" );
Wp:Teleport("WP_A01_GUN");
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:ManTheGun(SLOT_A01, "Vierling_L_R", ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C30_2) then
Wp:ManTheGun(SLOT_A01, "20mm_C30_2_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_twin_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A01) == CANNON_20mm_C38_Twin_Shield) then
Wp:ManTheGun(SLOT_A01, "20mm_C38_shield_twin_UP_DW", ROLE_GUNNER)
endif;
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_IDLE01(wp)
{
strategies
{
QRF_PETTY02_Tutorial,
QRF_PETTY02_Sleeping,
QRF_PETTY02_Manning_A01gun,
QRF_PETTY02_Manning_A02gun
}
}
strategy QRF_PETTY02_Tutorial(wp)
{
precond
{
Wp:IsTutorial() and !Wp:IsBunkerState()
}
action
{
Wp:Teleport( "QRF_Watch" );
if Wp:GetGlobalVariable(TUT_VAR_QRF_PETTY02_STATE) == 0 then
{
Wp:PlayAnimationAndWait("SAILOR02_Walk_near_player");
Wp:SetGlobalVariable(TUT_VAR_QRF_PETTY02_STATE, 1);
}
endif;
if Wp:GetGlobalVariable(TUT_VAR_QRF_PETTY02_STATE) == 1 then
Wp:PlayAnimationAndWait("SAILOR02_Wait_near_door")
endif;
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_Sleeping(wp)
{
precond
{
!((Wp:GetGunType(SLOT_A01) == CANNON_Vierling and Wp:IsGunManned(SLOT_A01)) or (Wp:GetGunType(SLOT_A01) != CANNON_Vierling and Wp:IsGunManned(SLOT_A02))) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
############## Uncomment for optional beard #####################
# Wp:SetBodyPartVisibility("object1_Barba_Cap18", 1);
################################################## ###############
if (Wp:GetGunType(SLOT_A01) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A01, ROLE_ELEV)
else
Wp:UnmanTheGun(SLOT_A02, ROLE_GUNNER)
endif;
Wp:Teleport("QRF_Petty_02");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Torso06", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_1to2" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep02" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_2to1" );
Wp:PlayAnimationAndWait( "QRF_Petty_02_sleep01" );
Wp:PlayAnimationAndWait( "QRF_Petty02_AtoC" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle01" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle04" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle05" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle02_part01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "QRF_Petty02_idle02_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty02_idle03_part01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty02_idle03_part02" );
Wp:PlayAnimationAndWait( "QRF_Petty02_CtoA" );
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_Manning_A01gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A01) == CANNON_Vierling and Wp:IsGunManned(SLOT_A01) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty02_leave_rush" );
Wp:Teleport("WP_A01_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso06", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
ManTheGun(SLOT_A01, "Vierling_UP_DW", ROLE_ELEV)
Wp:ScriptCompleted();
}
}
strategy QRF_PETTY02_Manning_A02gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A01) != CANNON_Vierling and Wp:IsGunManned(SLOT_A02) and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "QRF_Petty02_leave_rush" );
Wp:Teleport("WP_A02_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso06", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C30) then
Wp:ManTheGun(SLOT_A02, "20mm_C30_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C30_2) then
Wp:ManTheGun(SLOT_A02, "20mm_C30_2_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C38_Twin) then
Wp:ManTheGun(SLOT_A02, "20mm_C38_twin_UP_DW", ROLE_GUNNER)
endif;
if (Wp:GetGunType(SLOT_A02) == CANNON_20mm_C38_Twin_Shield) then
Wp:ManTheGun(SLOT_A02, "20mm_C38_shield_twin_UP_DW", ROLE_GUNNER)
endif;
Wp:ScriptCompleted();
}
}
strategy RR_RADIO_IDLE01(wp)
{
strategies
{
RR_RADIO_TUTORIAL,
# old idle action
RR_RADIO_Nothing_to_do,
# these 3 strategies do exatcly the same thing,
# but with a different condition.
#
# they probabily need to be like this so they can
# be customized in the near future.
RR_RADIO_Entering,
RR_RADIO_In_use,
RR_RADIO_Exiting
}
}
strategy RR_RADIO_TUTORIAL(wp)
{
precond
{
Wp:GetRadarState() == 0 and Wp:IsTutorial() and !Wp:IsBunkerState()
}
action
{
if Wp:GetGlobalVariable(TUT_VAR_RR_RADIO_STATE) == 0 then
{
Wp:PlaySoundWithLipsync("RadioMan\Normal\TTM_RR_RADIO_D01_M8", 28.733);
Wp:PlaySoundWithLipsync("RadioMan\Normal\TTM_RR_RADIO_D01_M9", 32.267);
Wp:SetGlobalVariable(TUT_VAR_RR_RADIO_STATE, 1);
}
endif;
Wp:PlayAnimationAndWait( "RR_RADIO_A_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_Idle02" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_GRAMOPHONE" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_RADIO" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_Write01_Part01" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 1);
Wp:PlayAnimationAndWait( "RR_RADIO_A_Write01_Part02" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 0);
Wp:PlayAnimationAndWait( "RR_RADIO_A_Write01_Part03" );
Wp:Goto( "RR_RADIO_B" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnob_Listen" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnobLeft" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part01" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 1);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part02" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 0);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part03" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnobRight" );
Wp:Goto( "RR_RADIO_C" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_LookAround01" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle02" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle03" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle04" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle05" );
Wp:Goto( "RR_RADIO_A" );
Wp:ScriptCompleted();
}
}
# idle strategy
strategy RR_RADIO_Nothing_to_do(wp)
{
precond
{
# if hydrophone is not used
Wp:GetRadarState() == 0 and !(Wp:IsTutorial() and !Wp:IsBunkerState())
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Beard_CAP04", 1);
################################################## ################
Wp:PlayAnimationAndWait( "RR_RADIO_A_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_Idle02" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_GRAMOPHONE" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_RADIO" );
Wp:PlayAnimationAndWait( "RR_RADIO_A_Write01_Part01" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 1);
Wp:PlayAnimationAndWait( "RR_RADIO_A_Write01_Part02" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 0);
Wp:PlayAnimationAndWait( "RR_RADIO_A_Write01_Part03" );
Wp:Goto( "RR_RADIO_B" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnob_Listen" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnobLeft" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part01" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 1);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part02" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 0);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part03" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnobRight" );
Wp:Goto( "RR_RADIO_C" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle02" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle03" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle04" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle05" );
Wp:Goto( "RR_RADIO_A" );
Wp:ScriptCompleted();
}
}
# captain is entering radar
strategy RR_RADIO_Entering(wp)
{
precond
{
# if radar will be used by captain
# "entering radar" - state
Wp:GetRadarState() == 1
}
strategies
{
RR_RADIO_MoveToB,
RR_RADIO_DoIdle
}
}
# captain is at the hydrophone
strategy RR_RADIO_In_use(wp)
{
precond
{
# if captain is at the radar, and leaving
# "exiting radar" - state
Wp:GetRadarState() == 2
}
strategies
{
RR_RADIO_MoveToB,
RR_RADIO_DoIdle
}
}
# captain is at the hydrophone
strategy RR_RADIO_Exiting(wp)
{
precond
{
# if captain is at the hydrophone, and leaving
# "exiting hydrophone" - state
Wp:GetRadarState() == 3
}
strategies
{
RR_RADIO_MoveToB,
RR_RADIO_DoIdle
}
}
strategy RR_RADIO_MoveToB(wp)
{
precond
{
Wp:IsCurrentWaypoint( "RR_RADIO_A" ) == 1
}
action
{
Wp:Goto( "RR_RADIO_B" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnob_Listen" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part01" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 1);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part02" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 0);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part03" );
Wp:Goto( "RR_RADIO_C" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_LookAround01" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle01" );
Wp:ScriptCompleted();
}
}
strategy RR_RADIO_DoIdle(wp)
{
precond
{
Wp:IsCurrentWaypoint( "RR_RADIO_A" ) == 0
}
strategies
{
RR_RADIO_DoIdle_B,
RR_RADIO_DoIdle_C
}
}
strategy RR_RADIO_DoIdle_B(wp)
{
precond
{
Wp:IsCurrentWaypoint( "RR_RADIO_B" ) == 1
}
action
{
Wp:PlayAnimationAndWait( "RR_RADIO_B_Idle01" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_TurnKnob_Listen" );
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part01" );
Wp:SetBodyPartVisibility("object2_Pencil_radio", 1);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part02" );
Wp:SetBodyPartVisibility("object2_Pencil_radio_radio", 0);
Wp:PlayAnimationAndWait( "RR_RADIO_B_Write01_Part03" );
Wp:Goto( "RR_RADIO_C" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_LookAround01" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle01" );
Wp:ScriptCompleted();
}
}
strategy RR_RADIO_DoIdle_C(wp)
{
precond
{
Wp:IsCurrentWaypoint( "RR_RADIO_C" ) == 1
}
action
{
Wp:PlayAnimationAndWait( "RR_RADIO_C_LookAround01" );
Wp:PlayAnimationAndWait( "RR_RADIO_C_Idle01" );
Wp:ScriptCompleted();
}
}
strategy RR_HIDRO_IDLE01(wp)
{
strategies
{
# old idle action
RR_HIDRO_Nothing_to_do_surfaced,
RR_HIDRO_Nothing_to_do_submerged,
# these 3 strategies do exatcly the same thing,
# but with a different condition.
#
# they probabily need to be like this so they can
# be customized in the near future.
RR_HIDRO_Entering,
RR_HIDRO_In_use,
RR_HIDRO_Exiting
}
}
# idle strategy
strategy RR_HIDRO_Nothing_to_do_surfaced(wp)
{
precond
{
# if hydrophone is not used
Wp:GetHydrophoneState() == 0 and !Wp:IsSubmerged()
}
action
{
Wp:Goto( "RR_HIDRO02" );
Wp:PlayAnimationAndWait( "RR_HIDRO_C_Idle11" );
Wp:PlayAnimationAndWait( "RR_HIDRO_C_Idle12" );
Wp:PlayAnimationAndWait( "RR_HIDRO_C_Idle13" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle08" );
Wp:PlayAnimationAndWait( "RR_HIDRO_D_Idle14" );
Wp:PlayAnimationAndWait( "RR_HIDRO_D_Idle15" );
Wp:PlayAnimationAndWait( "RR_HIDRO_D_Idle16" );
Wp:ScriptCompleted();
}
}
strategy RR_HIDRO_Nothing_to_do_submerged(wp)
{
precond
{
# if hydrophone is not used
Wp:GetHydrophoneState() == 0 and Wp:IsSubmerged()
}
action
{
Wp:Goto( "RR_HIDRO" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle10" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle02" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle03" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle04" );
# Wp:PlayAnimationAndWait( "RR_HIDRO_Drop_headphones_part01" );
# Wp:SetBodyPartVisibility("object1_headphone01", 1);
# Wp:SetBodyPartVisibility("object2_headphone02", 0);
# Wp:PlayAnimationAndWait( "RR_HIDRO_Drop_headphones_part02" );
# Wp:SetBodyPartVisibility("object1_headphone01", 0);
# Wp:PlayAnimationAndWait( "RR_HIDRO_Drop_headphones_part03" );
# Wp:SetBodyPartVisibility("object1_headphone01", 1);
# Wp:PlayAnimationAndWait( "RR_HIDRO_Drop_headphones_part04" );
# Wp:SetBodyPartVisibility("object1_headphone01", 0);
# Wp:SetBodyPartVisibility("object2_headphone02", 1);
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle05" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle06" );
Wp:ScriptCompleted();
}
}
# captain is entering hydrophone
strategy RR_HIDRO_Entering(wp)
{
precond
{
# if hydrophone will be used by captain
# "entering hydrophone" - state
Wp:GetHydrophoneState() == 1
}
action
{
# if on "RR_HIDRO", go to "RR_HIDRO02" to
# make room for the captain
Wp:Goto( "RR_HIDRO02" );
# do idle stuff
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle02" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle03" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle04" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle05" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle06" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle10" );
Wp:ScriptCompleted();
}
}
# captain is at the hydrophone
strategy RR_HIDRO_In_use(wp)
{
precond
{
# if captain is at the hydrophone, and leaving
# "exiting hydrophone" - state
Wp:GetHydrophoneState() == 2
}
action
{
# if on "RR_HIDRO", go to "RR_HIDRO02" to
# make room for the captain
Wp:Goto( "RR_HIDRO02" );
# do idle stuff
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle02" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle03" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle04" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle05" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle06" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle10" );
Wp:ScriptCompleted();
}
}
# captain is at the hydrophone
strategy RR_HIDRO_Exiting(wp)
{
precond
{
# if captain is at the hydrophone, and leaving
# "exiting hydrophone" - state
Wp:GetHydrophoneState() == 3
}
action
{
# if on "RR_HIDRO", go to "RR_HIDRO02" to
# make room for the captain
Wp:Goto( "RR_HIDRO02" );
# do idle stuff
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle02" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle03" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle04" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle05" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle06" );
Wp:PlayAnimationAndWait( "RR_HIDRO_Idle10" );
Wp:ScriptCompleted();
}
}
QR2:
# Crew_Idle_Actions_QR2.aix
# Stock script modified by MightyFine Crew Mod 1.2 03/21/2010
# Edited by gap for The Wolves of Steel Mega Mod on 03/01/2016
strategy SQ_COOK_IDLE01(wp)
{
strategies
{
SQ_COOK_STEALING_FOOD_SCENE,
SQ_COOK_NORMAL,
SQ_COOK_DAMAGE_TAKEN,
SQ_COOK_SILENT_RUNNING
}
}
strategy SQ_COOK_STEALING_FOOD_SCENE(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) > 0 and Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) > 0) or (Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) == 2)
}
action
{
Wp:SetGlobalVariable( VAR_SQ_COOK_STATE, 2 );
if Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) == 1 then
Wp:DoNothing()
else
{
Wp:PlayAnimationAndWait( "SQ_COOK_B_TALK_BOSUN" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_CHOPPING01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_THREATEN_BOSUN" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_HIT_BOSUN" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_LAUGH_AT_BOSUN" );
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part01" );
Wp:SetBodyPartVisibility("object2_knife", 0);
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part02" );
Wp:SetBodyPartVisibility("object2_spoon", 1);
Wp:Goto( "SQ_COOK_A" );
Wp:SetGlobalVariable( VAR_SQ_COOK_STATE, 0 );
}
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_COOK_NORMAL(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) != 2) and (!Wp:IsCrewState(DMG_TKN) or !Wp:IsCurrentWaypoint( "SQ_COOK_A" ) or !Wp:IsCurrentWaypoint( "SQ_COOK_B" )) and (!Wp:IsCrewState(SIL_RUN) or !Wp:IsCurrentWaypoint( "SQ_COOK_B" ))
}
action
{
if Wp:IsCharacterPosture(D) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_D2B_Part01" );
Wp:PlayAnimationAndWait( "SQ_COOK_D2B_Part02" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Dance01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part01" );
Wp:SetBodyPartVisibility("object2_knife", 0);
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part02" );
Wp:SetBodyPartVisibility("object2_spoon", 1);
Wp:Goto( "SQ_COOK_A" );
}
endif;
if !Wp:IsCharacterPosture(D) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_A_StirPot01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_StirPotDancing01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A2B_Part01" );
Wp:SetBodyPartVisibility("object2_spoon", 0);
Wp:PlayAnimationAndWait( "SQ_COOK_A2B_Part02" );
Wp:SetBodyPartVisibility("object2_knife", 1);
Wp:SetGlobalVariable( VAR_SQ_COOK_STATE, 1 );
Wp:Goto( "SQ_COOK_B" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_CHOPPING01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Dance01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_CHOPPING01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Dance01" );
Wp:SetGlobalVariable( VAR_SQ_COOK_STATE, 0 );
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part01" );
Wp:SetBodyPartVisibility("object2_knife", 0);
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part02" );
Wp:SetBodyPartVisibility("object2_spoon", 1);
Wp:Goto( "SQ_COOK_A" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_StirPotDancing01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_Taste01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_StirPot01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_DANCE02" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_TASTE_BURN01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_ADJUST_HEAT" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_TASTE_ADD_SALT" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_TASTE_DELICIOUS" );
Wp:PlayAnimationAndWait( "SQ_COOK_A_DANCE01" );
Wp:PlayAnimationAndWait( "SQ_COOK_A2C_Part01" );
Wp:SetBodyPartVisibility("object2_spoon", 0);
Wp:Goto( "SQ_COOK_C" );
Wp:PlayAnimationAndWait( "SQ_COOK_C_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_COOK_C_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_C2B_Part01" );
Wp:SetBodyPartVisibility("object2_knife", 1);
Wp:SetGlobalVariable( VAR_SQ_COOK_STATE, 1 );
Wp:Goto( "SQ_COOK_B" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Dance01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Dance01" );
Wp:SetGlobalVariable( VAR_SQ_COOK_STATE, 0 );
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part01" );
Wp:SetBodyPartVisibility("object2_knife", 0);
Wp:PlayAnimationAndWait( "SQ_COOK_B2A_Part02" );
Wp:SetBodyPartVisibility("object2_spoon", 1);
Wp:Goto( "SQ_COOK_A" );
}
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_COOK_SILENT_RUNNING(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) != 2) and Wp:IsCrewState(SIL_RUN) and Wp:IsCurrentWaypoint( "SQ_COOK_B" )
}
action
{
if Wp:IsCharacterPosture(B) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_B2D_Part01" );
Wp:SetBodyPartVisibility("object2_knife", 0);
Wp:PlayAnimationAndWait( "SQ_COOK_B2D_Part02" );
}
endif;
if Wp:IsCharacterPosture(D) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_D_Idle01" );
Wp:PlayAnimationAndWait( "SQ_COOK_D_Idle02" );
Wp:PlayAnimationAndWait( "SQ_COOK_D_Idle03" );
}
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_COOK_DAMAGE_TAKEN(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) != 2) and Wp:IsCrewState(DMG_TKN) and !Wp:IsCrewState(SIL_RUN) and (Wp:IsCurrentWaypoint( "SQ_COOK_A" ) or Wp:IsCurrentWaypoint( "SQ_COOK_B" ) or Wp:IsCurrentWaypoint( "SQ_COOK_D" ))
}
action
{
if Wp:IsCurrentWaypoint( "SQ_COOK_A" ) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_A_Explosion_Event01" );
Wp:DeactivateCrewState(DMG_TKN);
}
endif;
if Wp:IsCurrentWaypoint( "SQ_COOK_B" ) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_B_explosion_event02" );
Wp:PlayAnimationAndWait( "SQ_COOK_B_Idle01" );
Wp:Goto( "SQ_COOK_A" );
Wp:DeactivateCrewState(DMG_TKN);
}
endif;
if Wp:IsCurrentWaypoint( "SQ_COOK_D" ) then
{
Wp:PlayAnimationAndWait( "SQ_COOK_D_explosion_event03" );
Wp:DeactivateCrewState(DMG_TKN);
}
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_BED01_IDLE01(wp)
{
strategies
{
SQ_BED01_Sleeping,
SQ_BED01_Manning_A02gun,
SQ_BED01_Manning_deck_gun
}
}
strategy SQ_BED01_Sleeping(wp)
{
precond
{
!((Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)) or (Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)))
}
action
{
############## Uncomment for optional beard #####################
# Wp:SetBodyPartVisibility("object1_Barba_Cap18", 1);
################################################## ###############
if (Wp:GetGunType(SLOT_A02) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A02, ROLE_TRAV)
else
Wp:UnmanTheGun(SLOT_M01, ROLE_TRAV)
endif;
Wp:Teleport("SQ_BED01");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Torso05", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:PlayAnimationAndWait( "SQ_BED01_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_A_Scratch01" );
Wp:PlayAnimationAndWait( "SQ_BED01_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_A2B_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED01_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_B_Dream01" );
Wp:PlayAnimationAndWait( "SQ_BED01_B2A_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED01_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_AtoC" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle04" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle05" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle02_part01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "SQ_BED01_idlle02_part02" );
Wp:PlayAnimationAndWait( "SQ_BED01_idlle03_part01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_idlle03_part02" );
Wp:PlayAnimationAndWait( "SQ_BED01_CtoA" );
Wp:ScriptCompleted();
}
}
strategy SQ_BED01_Manning_A02gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_leave_rush" );
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso05", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:Teleport("WP_A02_GUN");
Wp:ManTheGun(SLOT_A02, "Vierling_L_R", ROLE_TRAV);
Wp:ScriptCompleted();
}
}
strategy SQ_BED01_Manning_deck_gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED01_leave_rush" );
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso05", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:Teleport("WP_DECK_GUN");
Wp:ManTheGun(SLOT_M01, "88mm_L_R", ROLE_TRAV);
Wp:ScriptCompleted();
}
}
strategy SQ_BED02_IDLE01(wp)
{
strategies
{
SQ_BED02_Sleeping,
SQ_BED02_Manning_A02gun,
SQ_BED02_Manning_deck_gun
}
}
strategy SQ_BED02_Sleeping(wp)
{
precond
{
!((Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)) or (Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)))
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_Cap06", 1);
################################################## ################
if (Wp:GetGunType(SLOT_A02) == CANNON_Vierling) then
Wp:UnmanTheGun(SLOT_A02, ROLE_ELEV)
else
Wp:UnmanTheGun(SLOT_M01, ROLE_ELEV)
endif;
Wp:Teleport("SQ_BED02");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Torso03", 1);
Wp:SetBodyPartVisibility("A_Torso07", 0);
Wp:SetBodyPartVisibility("A_Pants02", 1);
Wp:SetBodyPartVisibility("A_Pants01", 0);
Wp:PlayAnimationAndWait( "SQ_BED02_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_A2B_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED02_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_B2A_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED02_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_AtoC" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle02_01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "SQ_BED02_idlle02_02" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle03_01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED02_idlle03_02" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle04" );
Wp:PlayAnimationAndWait( "SQ_BED02_idlle05" );
Wp:PlayAnimationAndWait( "SQ_BED02_CtoA" );
Wp:ScriptCompleted();
}
}
strategy SQ_BED02_Manning_A02gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) == CANNON_Vierling and Wp:IsGunManned(SLOT_A02)
}
action
{
Wp:PlayAnimationAndWait( "SQ_BED02_leave_rush" );
Wp:Teleport("WP_A02_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso03", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:ManTheGun(SLOT_A02, "Vierling_UP_DW", ROLE_ELEV);
Wp:ScriptCompleted();
}
}
strategy SQ_BED02_Manning_deck_gun(wp)
{
precond
{
Wp:GetGunType(SLOT_A02) != CANNON_Vierling and Wp:IsGunManned(SLOT_M01)
}
action
{
Wp:PlayAnimationAndWait( "SQ_BED02_leave_rush" );
Wp:Teleport("WP_DECK_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Torso03", 0);
Wp:SetBodyPartVisibility("A_Torso07", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
Wp:ManTheGun(SLOT_M01, "88mm_UP_DW", ROLE_ELEV);
Wp:ScriptCompleted();
}
}
strategy SQ_BED03_IDLE01(wp)
{
strategies
{
SQ_BED03_Sleeping,
SQ_BED03_Manning_Flakgun
}
}
strategy SQ_BED03_Sleeping(wp)
{
precond
{
!Wp:IsGunManned(SLOT_S01)
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Barba_Cap18", 1);
################################################## ################
Wp:UnmanTheGun(SLOT_S01, ROLE_ELEV);
Wp:Teleport("SQ_BED03");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:PlayAnimationAndWait( "SQ_BED03_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED03_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED03_A2B_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED03_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED03_B_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED03_B2A_Turn" );
Wp:PlayAnimationAndWait( "SQ_BED03_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED03_AtoC" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle01" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle02_part01" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle02_part02" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle03_part01" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle03_part02" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle04" );
Wp:PlayAnimationAndWait( "SQ_BED03_idle05" );
Wp:PlayAnimationAndWait( "SQ_BED03_CtoA" );
Wp:ScriptCompleted();
}
}
strategy SQ_BED03_Manning_Flakgun(wp)
{
precond
{
Wp:IsGunManned(SLOT_S01)
}
action
{
Wp:PlayAnimationAndWait( "SQ_BED03_leave_rush" );
Wp:Teleport("WP_FLAK_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
if (Wp:GetGunType(SLOT_S01) == CANNON_37mmM) then
Wp:ManTheGun(SLOT_S01, "37mmM_UP_DW", ROLE_ELEV)
endif;
if (Wp:GetGunType(SLOT_S01) == CANNON_37mmSA) then
Wp:ManTheGun(SLOT_S01, "37mmSA_UP_DW", ROLE_ELEV)
endif;
if (Wp:GetGunType(SLOT_S01) == CANNON_37mmTSA) then
Wp:ManTheGun(SLOT_S01, "37mmTSA_UP_DW", ROLE_ELEV)
endif;
if (Wp:GetGunType(SLOT_S01) == CANNON_Vierling) then
Wp:ManTheGun(SLOT_S01, "Vierling_UP_DW", ROLE_ELEV)
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_BED04_IDLE01(wp)
{
strategies
{
SQ_BED04_Sleeping,
SQ_BED04_Manning_Flakgun
}
}
strategy SQ_BED04_Sleeping(wp)
{
precond
{
!Wp:IsGunManned(SLOT_S01)
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Beard_CAP04", 1);
################################################## ################
Wp:UnmanTheGun(SLOT_S01, ROLE_TRAV);
Wp:Teleport("SQ_BED04");
Wp:SetBodyPartVisibility("A_Hat01", 0);
Wp:SetBodyPartVisibility("A_Pants02", 1);
Wp:SetBodyPartVisibility("A_Pants01", 0);
Wp:PlayAnimationAndWait( "SQ_BED04_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED04_Scratch01" );
Wp:PlayAnimationAndWait( "SQ_BED04_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BED04_FallAsleep" );
Wp:PlayAnimationAndWait( "SQ_BED04_Sleep01" );
Wp:PlayAnimationAndWait( "SQ_BED04_Sleep01" );
Wp:PlayAnimationAndWait( "SQ_BED04_WakeUp01" );
Wp:PlayAnimationAndWait( "SQ_BED04_AtoC" );
Wp:PlayAnimationAndWait( "SQ_BED04_idlle01" );
Wp:PlayAnimationAndWait( "SQ_BED04_idle04" );
Wp:PlayAnimationAndWait( "SQ_BED04_Pik_Up_Book_PART01" );
Wp:SetBodyPartVisibility("object2_book01", 1);
Wp:PlayAnimationAndWait( "SQ_BED04_Pik_Up_Book_PART02" );
Wp:PlayAnimationAndWait( "SQ_BED04_Put_Down_Book_PART01" );
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED04_Put_Down_Book_PART02" );
Wp:PlayAnimationAndWait( "SQ_BED04_idlle05" );
Wp:PlayAnimationAndWait( "SQ_BED04_CtoA" );
Wp:ScriptCompleted();
}
}
strategy SQ_BED04_Manning_Flakgun(wp)
{
precond
{
Wp:IsGunManned(SLOT_S01)
}
action
{
Wp:SetBodyPartVisibility("object2_book01", 0);
Wp:PlayAnimationAndWait( "SQ_BED04_leave_rush" );
Wp:Teleport("WP_FLAK_GUN");
Wp:SetBodyPartVisibility("A_Hat01", 1);
Wp:SetBodyPartVisibility("A_Pants02", 0);
Wp:SetBodyPartVisibility("A_Pants01", 1);
if (Wp:GetGunType(SLOT_S01) == CANNON_37mmM) then
Wp:ManTheGun(SLOT_S01, "37mmM_L_R", ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_S01) == CANNON_37mmSA) then
Wp:ManTheGun(SLOT_S01, "37mmSA_L_R", ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_S01) == CANNON_37mmTSA) then
Wp:ManTheGun(SLOT_S01, "37mmTSA_L_R", ROLE_TRAV)
endif;
if (Wp:GetGunType(SLOT_S01) == CANNON_Vierling) then
Wp:ManTheGun(SLOT_S01, "Vierling_L_R", ROLE_TRAV)
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_BOSUN_IDLE01(wp)
{
strategies
{
SQ_BOSUN_STEALING_FOOD_SCENE,
SQ_BOSUN_NORMAL,
SQ_BOSUN_DAMAGE_TAKEN,
SQ_BOSUN_PROXIMITY_EXPLOSIONS,
SQ_BOSUN_HUNT
}
}
strategy SQ_BOSUN_STEALING_FOOD_SCENE(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) > 0 and Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) > 0) or (Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) == 2)
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Beard_CAP04", 1);
################################################## ################
Wp:SetGlobalVariable( VAR_SQ_BOSUN_STATE, 2 );
if Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) == 1 then
Wp:DoNothing()
else
{
Wp:PlayAnimationAndWait( "SQ_BOSUN_Talk02" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_taking_food01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_eating" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_taking_food02" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_pull_hand" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_taking_food01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_eating" );
Wp:Goto( "SQ_BOSUN_B" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookAround01" );
Wp:Goto( "SQ_BOSUN_A" );
Wp:SetGlobalVariable( VAR_SQ_BOSUN_STATE, 0 );
}
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_BOSUN_NORMAL(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) != 2) and (!Wp:IsCrewState(DMG_TKN|PROX_EXPL) or !Wp:IsCurrentWaypoint( "SQ_BOSUN_B" ) or !Wp:IsCurrentWaypoint( "SQ_BOSUN_C" )) and (!Wp:IsCrewState(HUNTER|HUNTED) or !Wp:IsCurrentWaypoint( "SQ_BOSUN_A" ))
}
action
{
############## Uncomment for optional beard ######################
# Wp:SetBodyPartVisibility("object1_Beard_CAP04", 1);
################################################## ################
Wp:PlayAnimationAndWait( "SQ_BOSUN_A_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_A_LookLeft01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_A_LookRight01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_AtoD_part01" );
Wp:SetBodyPartVisibility("object2_Pencil02", 1);
Wp:SetBodyPartVisibility("object1_letter02", 1);
Wp:PlayAnimationAndWait( "SQ_BOSUN_AtoD_part02" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_Poetry01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_Poetry02" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_Poetry03" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_Poetry01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_Poetry04" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_DtoA_part01" );
Wp:SetBodyPartVisibility("object1_letter02", 0);
Wp:SetBodyPartVisibility("object2_Pencil02", 0);
Wp:PlayAnimationAndWait( "SQ_BOSUN_DtoA_part02" );
Wp:Goto( "SQ_BOSUN_B" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookAround01" );
if Wp:GetGlobalVariable( VAR_SQ_COOK_STATE ) == 0 then
{
Wp:PlayAnimationAndWait( "SQ_BOSUN_idle01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_idle02" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_idle03" );
}
endif;
Wp:SetGlobalVariable( VAR_SQ_BOSUN_STATE, 1);
Wp:Goto( "SQ_BOSUN_C" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_Idle01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_Talk01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_Idle01" );
Wp:SetGlobalVariable( VAR_SQ_BOSUN_STATE, 0 );
Wp:Goto( "SQ_BOSUN_B" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookAround01" );
Wp:Goto( "SQ_BOSUN_A" );
Wp:ScriptCompleted();
}
}
strategy SQ_BOSUN_DAMAGE_TAKEN(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) != 2) and Wp:IsCrewState(DMG_TKN) and (Wp:IsCurrentWaypoint( "SQ_BOSUN_B" ) or Wp:IsCurrentWaypoint( "SQ_BOSUN_C" )) and !Wp:IsCrewState(PROX_EXPL)
}
action
{
Wp:SetBodyPartVisibility("object1_letter02", 0);
Wp:SetBodyPartVisibility("object2_Pencil02", 0);
if Wp:IsCurrentWaypoint( "SQ_BOSUN_B" ) then
{
Wp:PlayAnimationAndWait( "SQ_BOSUN_explosion_event01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookAround01" );
Wp:Goto( "SQ_BOSUN_A" );
Wp:DeactivateCrewState(DMG_TKN);
}
endif;
if Wp:IsCurrentWaypoint( "SQ_BOSUN_C" ) then
{
Wp:PlayAnimationAndWait( "SQ_BOSUN_explosion_event04" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_C_Idle01" );
Wp:Goto( "SQ_BOSUN_B" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookAround01" );
Wp:Goto( "SQ_BOSUN_A" );
Wp:DeactivateCrewState(DMG_TKN);
}
endif;
Wp:ScriptCompleted();
}
}
strategy SQ_BOSUN_HUNT(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) != 2) and !Wp:IsCrewState(DMG_TKN|PROX_EXPL) and Wp:IsCurrentWaypoint( "SQ_BOSUN_A" ) and Wp:IsCrewState(HUNTER|HUNTED)
}
action
{
Wp:SetBodyPartVisibility("object1_letter02", 0);
Wp:SetBodyPartVisibility("object2_Pencil02", 0);
Wp:PlayAnimationAndWait( "SQ_BOSUN_worry01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_worry02" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_worry01" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_worry02" );
Wp:ScriptCompleted();
}
}
strategy SQ_BOSUN_PROXIMITY_EXPLOSIONS(wp)
{
precond
{
(Wp:GetGlobalVariable( VAR_SQ_BOSUN_STATE ) != 2) and Wp:IsCrewState(PROX_EXPL) and (Wp:IsCurrentWaypoint( "SQ_BOSUN_B" ) or Wp:IsCurrentWaypoint( "SQ_BOSUN_C" ))
}
action
{
Wp:SetBodyPartVisibility("object1_letter02", 0);
Wp:SetBodyPartVisibility("object2_Pencil02", 0);
if Wp:IsCurrentWaypoint( "SQ_BOSUN_B" ) then
{
Wp:PlayAnimationAndWait( "SQ_BOSUN_explosion_event02" );
Wp:Goto( "SQ_BOSUN_A" );
Wp:DeactivateCrewState(PROX_EXPL);
}
endif;
if Wp:IsCurrentWaypoint( "SQ_BOSUN_C" ) then
{
Wp:PlayAnimationAndWait( "SQ_BOSUN_explosion_event04" );
Wp:Goto( "SQ_BOSUN_B" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookLeft" );
Wp:PlayAnimationAndWait( "SQ_BOSUN_B_LookAround01" );
Wp:Goto( "SQ_BOSUN_A" );
Wp:DeactivateCrewState(PROX_EXPL);
}
endif;
Wp:ScriptCompleted();
}
}
Squid launcher? You're planning a new mod ? :yeah:
Yep: :03:
http://www.subsim.com/radioroom/showthread.php?p=2383289#post2383289
Not exactly my mod: that's a project of LGN1 for SHIII. I offered to create 3d models for it, but once it is ready I don't think LGN1 will have problems if we ask to port the mod to SH5 :up:
vdr1981
03-01-16, 02:47 PM
Thanks Gap ! :up:
By the way, that launcher looks ...:yep::rock:
vdr1981
03-01-16, 03:22 PM
Naah...CTD as soon as mission is loaded...:hmm2:
Nevermind...U-flak will do the job such as it is , for now...:yep: You finish those cool looking launchers. :up:
Naah...CTD as soon as mission is loaded...:hmm2:
Except for some simple scipts, this the first time that I modify python code of a certain complexity. Either I made a syntax error or adding new crew strategies is not allowed. In either case I hope I can track down the problem in the next future. Now...
for now...:yep: You finish those cool looking launchers. :up:
that launcher looks ...:yep::rock:
Thank you. I have the feeling that I overdid with that mortar though. My squid launcher is probably the most detailed ship equipment ever done for a SHIII game and I hope it wont slow-down the game, otherwise I will be forced to postpone its release for bringing its polycount down :)
Ashikaga
09-15-16, 06:23 AM
These mods, including the U-Flak boat look stunning.
But I am wondering about the VII B which has an optional extra flak tower on the stern which is separated from the conning tower and Flak stand.
I never have seen such a boat in historic images. It seems to me it is a fantasy boat. Is it possible somehow to remove that option until a proper Type VII C-41 becomes available ?
http://uboat.net/technical/flak.htm
Ashikaga,
Aktungbby
02-22-23, 12:32 PM
Mon Homme!:Kaleun_Salute:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.