SUBSIM Radio Room Forums



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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 10-11-13, 11:51 AM   #10
vdr1981
Navy Seal
 
Join Date: May 2010
Location: Србија
Posts: 6,095
Downloads: 587
Uploads: 13


Default

Quote:
Originally Posted by volodya61 View Post
OK then... Here's entry from IRAI patch1, can you see something strange then?

Code:
# Edited by TheDarkWraith for IRAI_0_0_40
# Edited on 2/11/2013 @ 1700

# Copyright notice:
# The code changes made to this file are the intellectual property of TheDarkWraith and may not be used, modified, or duplicated in whole,
# or in part, without the express written permission of TheDarkWraith. The code changes made to this file may not be used in any commercial
# application of any form without the express written permission of TheDarkWraith.


###################################################################################################
#
#	Ship weapons:
#

strategy ShipFire(Ship)
 {
	precond
	{
		Ship:ContactPresenceIs(PRESENCE_SENSORS, 0) or (Ship:ContactPresenceIs(PRESENCE_LOOSING, 0) and Ship:GetContactLostTime() <= 360.0)
	}
	strategies
	{
		DC,
		Cannons,
		CannonsAtSubmerged
		#CheckStarshellEnable,
		#ShipFireStarShells,
		#ShipFireStarShellsDistance
	}
}

strategy DC(Ship)
{
	precond
	{
		Ship:ContactIs(SUBMARINE) or (Ship:ContactIs(UNITUNKNOWN) and Ship:GetContactDepth() <= -4.0)		#SUBISSUBMERGEDDEPTH
	}
	strategies
	{
		DCRacks,
		HHogs,
		DCThrower
	}
}

strategy DCRacks(Ship)
{
	precond
	{
		Ship:CanFireDCRacks() and Ship:GetContactDepth() <= -4.0 and Ship:GetCurrentSpeed() >= 2		#SUBISSUBMERGEDDEPTH
	}
	action
	{
		Ship:FireDCRacks();
	}
}

strategy HHogs(Ship)
{
	precond
	{
		Ship:CanFireHHogs()
	}
	action
	{
		Ship:FireHHogs();
	}
}

strategy DCThrower(Ship)
{
	precond
	{
		Ship:CanFireDCThrowers()
	}
	action
	{
		Ship:FireDCThrowers();
	}
}

strategy Cannons(Ship)
{
	precond
	{
		Ship:CanFireCannons()
	}
	action
	{
		Ship:FireCannons();
	}
}

strategy CannonsAtSubmerged(Ship)
{
	precond
	{
		(Ship:ContactPresenceIs(PRESENCE_LOOKOUT, 0) or Ship:ContactPresenceIs(PRESENCE_SONAR, 0)) and (Ship:ContactIs(SUBMARINE) or Ship:ContactIs(UNITUNKNOWN)) and Ship:GetContactDepth() <= 0.0 and Ship:GetContactDepth() >= -20.0 and Ship:GetContactRelDist() <= 8000
	}
	action
	{
		Ship:FireCannons();
	}
}




#strategy CheckStarshellEnable(Ship)
#{
#	precond
#	{
#		(Ship:ContactPresenceIs(PRESENCE_SENSORS, 0) or Ship:ContactPresenceIs(PRESENCE_LOOSING, 0)) and Ship:GetContactRelDist() <= 10000
#	}
#	action
#	{
#		Ship:EnableStarshells();
#	}
#}



#
#strategy ShipFireStarShells(Ship)
#{
#	precond
#	{
#		Ship:CanFireStarShells() and Ship:GetContactRelDist() <= 10000
#	}
#	action
#	{
#		Ship:FireStarShells();
#	}
#}
#
#strategy ShipFireStarShellsDistance(Ship)
#{
#	precond
#	{
#		Ship:GetContactRelDist() <= 10000
#	}
#	action
#	{
#		Ship:FireStarShells();
#		#Ship:ShipWaitAction(10)
#		Ship:TimeEventHappen(5);
#	}
#}
Maybe i have wrong version or something?
vdr1981 is offline   Reply With Quote
 

Thread Tools
Display Modes

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

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

Forum Jump


All times are GMT -5. The time now is 11:25 PM.


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