![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 | |
Navy Seal
![]() |
![]() Quote:
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); # } #} ![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
#2 |
Ocean Warrior
![]() |
![]() ![]() ![]() If my IRAI 0.37 (its files) isn't damaged I'll send it to you later..
__________________
. Where does human stupidity end? . ![]() ![]() El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
![]() |
![]() |
![]() |
#3 | |
Navy Seal
![]() |
![]() Quote:
![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
#4 |
Navy Seal
![]() |
![]()
Small breakthrough...Unquoting linkname values from ships eqp file will remove starshells effects...
Code:
;SH5 FX Update [Equipment 23] NodeName=M90 LinkName=NULL;5InchStarShellGun;NULL StartDate=19380101 EndDate=19451231 ;SH5 FX Update [Equipment 24] NodeName=M91 LinkName=NULL;scc_9_gun;NULL StartDate=19380101 EndDate=19451231
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
![]() |
![]() |
![]() |
#5 |
Ocean Warrior
![]() |
![]()
__________________
. Where does human stupidity end? . ![]() ![]() El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
![]() |
![]() |
![]() |
#6 |
Navy Seal
![]() |
![]()
Sure,why not!
I can remove starshells but i could use more elegant solution... ![]()
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
![]() |
![]() |
![]() |
#7 | |
Ocean Warrior
![]() |
![]() Quote:
__________________
. Where does human stupidity end? . ![]() ![]() El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
|
![]() |
![]() |
![]() |
#8 | |
Navy Seal
![]() |
![]() Quote:
__________________
Best regards... Vecko ![]() The Wolves of Steel v2.2.25_SH5 Expansion Pack_Full The Wolves of Steel v2.2.xx to v2.2.25 - Update ![]() PDF Install Instructions How to report an issue ![]() If You wish to support my work... |
|
![]() |
![]() |
![]() |
|
|