SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [REL] Shoot at periscope (https://www.subsim.com/radioroom/showthread.php?t=191772)

Rongel 01-23-12 06:23 AM

[REL] Shoot at periscope
 
[REL] Shoot at periscope

Okay, decided to change this to a REL rather than TEC. I've been using this for some time now without problems so here goes:


This is a work-around to get enemy ships to shoot at your periscope when they notice it. There is a bug in the exe-file that prevents this happening normally. To fix this issue once and for all, it would need hex-editing, currently this is the next best thing.

What it does:

Now merchants and escorts will fire at you with cannons if they spot your periscope, or have other sensors showing that you are nearby and close to the waterline.

Known issues:

-Sometimes escorts continue to fire the last know sub location too long.
-Ships can hit friendly ships accidentally with cannons.

Download links:

SHOOT AT PERISCOPE - IRAI VERSION: http://www.gamefront.com/files/21465...iscope_IRAI.7z

SHOOT AT PERISCOPE - STOCK VERSION: http://www.gamefront.com/files/21465...scope_STOCK.7z



Install with JSGME. There is a test mission included in the mod!

Thanks to TDW for permission to use the IRAI file :yeah:

pedrobas 01-23-12 10:51 AM

Testing now, i was waiting for your news about this. :yeah:

jason210 01-23-12 11:27 AM

Firstly a big thank you for sharing this! I agree, it is a big problem with AI at the moment.

Secondly...

Quote:

Originally Posted by Rongel (Post 1826211)
So the only bad thing about this is that when the escorts lose you, they will bombard the last location 4-8 minutes causing possibly havoc. When they know you are deeper, they'll stop the firing.

...this doesn't sound like a problem to me. It sounds plausible that they will continue trying to hit underwater by bomabarding your last position.

Will test it tonight!

Rongel 01-23-12 03:35 PM

All results are welcome!

I'm heading off for a few days, but will look into this more when I come back. Right now I've had fun encounters with the ships (elite groups just blow the periscope away before I can even lower it!) but I think that large HK groups and heavily escorted convoys can cause problems (ships don't care what's in their line of fire).

pedrobas 01-23-12 04:16 PM

iīve been testing it with a single mission and i was shot at periscope only 1 time of 5 iīve played . With a convoy of 5 armed merchants, periscope sighted messages and running up and down the merchants side. So i canīt asure is working 100% for me. I need to test it more. Anyway is a big improvment. Now you never know and have to be more careful with your scope.
Well done Rongel. :yeah:

Rongel 01-23-12 04:43 PM

Quote:

Originally Posted by pedrobas (Post 1826511)
iīve been testing it with a single mission and i was shot at periscope only 1 time of 5 iīve played . With a convoy of 5 armed merchants, periscope sighted messages and running up and down the merchants side. So i canīt asure is working 100% for me. I need to test it more. Anyway is a big improvment. Now you never know and have to be more careful with your scope.
Well done Rongel. :yeah:

Is the periscope messages from TDW's UI mod? Because they dont actually tell if the ship has noticed you. Try putting some destroyers in the convoy and see how they react. And have the "map contacts" on in options so you can see the enemy's sensor area in the map! Thanks for the info! :DL

pedrobas 01-23-12 05:06 PM

Yes the periscope messages were from TDW's UI mod. But i canīt believe they didnīt see me i was running up and down beside them at less than 100 meters sometimes. Anyway iīll do what you suggest and iīll report results. Thanks.

jason210 01-23-12 06:22 PM

I'm not saying it was this change to the script that caused it, but after altering that .aix file, I couldn't start SH5. I've never had that problem before.

I changed it back but it still wouldn't start.

I had to roll back all my mods and activate them again one by one. Now it's alright.

Rongel 01-24-12 02:00 AM

Quote:

Originally Posted by jason210 (Post 1826569)
I'm not saying it was this change to the script that caused it, but after altering that .aix file, I couldn't start SH5. I've never had that problem before.

I changed it back but it still wouldn't start.

I had to roll back all my mods and activate them again one by one. Now it's alright.

whoa! I have never had any actual crashes testing the scripts or that kind of problems, I wonder what might caused it. Well good that you got it back working. maybe I release a test mod later, it might be a bit safer to try out.

jason210 01-24-12 06:38 AM

I'm not giving up. I'm going to try it again tonight. It could just have been a coincidence.

jason210 01-25-12 12:01 PM

Ok, tried it again and the same thing happened. I couldn't create or load any missions after replacing the code in the aix file with this:

strategy Cannons(Ship)
{
precond
{
Plane:CanFireCannons() and Ship:ContactPresenceIs(PRESENCE_SENSORS, 15) and Ship:GetContactDepth() >= -15
}
action
{
Plane:FireCannons();
}

After about 3 mins loading (which is usual), I got the windows message saying the "Silent Hunter 5 has stopped working". Very odd. Perhaps it has something to do with my mods loadout?

Accurate German Flags
MightyFine Crew Mod 1.2.1 Alt faces
IRAI_0_0_30_ByTheDarkWraith
NewUIs_TDC_6_9_0_ByTheDarkWraith
SteelViking's Interior Mod V1.2
SteelViking's Interior Mod V1.2.2 Patch
Grossdeutscher Rundfunk
Dynamic Environment SH5 Basemod (realistic version) V2.1
Dynamic Environment SH5 Sounds V2.1
Dynamic Environment SH5 Sleet For Winter Campaigns V2.1
German U-Boat Crew Language Pack
Stormys DBSM SH5 v1.3 Basemod
Stormys DBSM SH5 v1.3 optional louder engine sounds
OPEN HORIZONS II_full v1.6
TDW_Mines_Subnets_Detectable_in_hydro (OH II v1.6)
Better Torpedo Graphics
Torpedo_Speed_Abilitie_Fix_for_TDC_SH5_v120
Equipment_Upgrades_Fix_v1_4_byTheBeast
Equipment_Upgrades_Fix_v1_4_Patch_1
#Equipment_Upgrades_Fix_v1_4_Patch_1_HotFix

Perijones 01-26-12 04:53 PM

First of all, I would like to thank Rongel for the effort to improve SH5. Just for feedback, I had the same problem that afected Jason210, the game doesn't start a mission with the change aplied. I believe that a solution to this matter will increase dramatically the realism. Cheers,

Perijones

Rongel 01-27-12 02:47 PM

Quote:

Originally Posted by Perijones (Post 1827948)
First of all, I would like to thank Rongel for the effort to improve SH5. Just for feedback, I had the same problem that afected Jason210, the game doesn't start a mission with the change aplied. I believe that a solution to this matter will increase dramatically the realism. Cheers,

Perijones


Hi and thanks for the feedback! Been away for a while so now I can get back to this. The "not starting bug" is a weird one, right now I can only think that maybe some semicolon is in the wrong place. I tested this with IRAI_0_0_30_ByTheDarkWraith but maybe its possible that some other mod combined with this is causing troubles. Anyway, I'll release hopefully tomorrow a test mod with stock and IRAI compatability and let's see if takes away the problems.

I used this in singleplayer mission and also in campaign and didn't have any technical problems.

Rongel 01-28-12 10:01 AM

Ok, just realized that this it's a bit complicated to make a test mod. The IRAI ship_weapons file is property of TDW and I don't want to step on anyones toes.

If you are having difficulties getting the game to start, try just replacing the two words:

Ship:CanFireCannons() to Plane:CanFireCannons()

and

Ship:FireCannons() to Plane:FireCannons()

So just change the two words, don't touch anything else. Also when I save the .aix file, I have the ANSI coding on in the notepad options. And have IRAI_0_0_30_ByTheDarkWraith installed. If this works, then you can add the other scripts as well.

Later if/when everything is going well, I'll ask TDW for a permission to make a IRAI compatable mod. Have to go now, I'll get back to this later!

EDIT:

If you got the scripts working, here is link to test mission: http://www.gamefront.com/files/21248...t_Periscope.7z

Unpack and enable with JSGME. Load the "Shoot_at_Periscope" mission, raise your persicope fully, and be prepared to emergency dive!

mobucks 01-28-12 12:37 PM

I hate to derail this, but can your periscope really be blown off in SH5? I've been playing SH4 TMO 2.5 and the escorts constantly fire at my periscope, sometimes directly hitting it with a deckgun, and it never breaks. :shifty: One time a DE slammed into the thing perfectly perpendicular and instead of breaking the tube the entire boat rolled almost 90degrees! For zero hull damage/periscope damage...
So then can your periscope take damage in SH5 like being shot and broken or rammed and bent off??


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

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