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 > Silent Hunter 5
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 04-27-10, 05:00 AM   #1
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

The ship weapons.aix file contains info on them.
Wonder if its called?

Code:
# Ship weapons:
#
strategy ShipFire(Ship)
{
precond
{
Ship:ContactDetected()
}
strategies
{
DC,
ShipFireStarShells,
Cannons
}
}
strategy DC(Ship)
{
precond
{
Ship:GetRole() != ROLE_SPIRAL
}
strategies
{
DCRacks,
HHogs,
DCThrower
}
}
strategy Cannons(Ship)
{
precond
{
Ship:CanFireCannons()
}
action
{
Ship:FireCannons();
}
}
strategy DCRacks(Ship)
{
precond
{
Ship:CanFireDCRacks() 
}
action
{
Ship:FireDCRacks();
}
}
strategy HHogs(Ship)
{
precond
{
Ship:CanFireHHogs()
}
action
{
Ship:FireHHogs();
}
}
strategy DCThrower(Ship)
{
precond
{
Ship:CanFireDCThrowers()
}
action
{
Ship:FireDCThrowers();
}
}
strategy ShipFireStarShells(Ship)
{
precond
{
Ship:CanFireStarShells()
}
action
{
Ship:FireStarShells();
}
}
Also in the ship tatics.aix file

Code:
strategy Role_Pineapple1(Ship)
{
precond
{
Ship:GetRole() == ROLE_PINEAPPLE1 
}
action
{
Ship:SetGotoDestRelToContact(-500);
Ship:GotoAction(0, false, 100);
 
Ship:SetGotoForwardDist(1000);
Ship:EnableStarshells(true); 
Ship:GotoAction(0, false, 100);
Ship:EnableStarshells(false);
 
newHeading = Ship:GetCurrentHeading() - 180.0;
Ship:TurnToHeading(newHeading, 1.0);
 
Ship:SetGotoForwardDist(300); 
Ship:GotoAction(0, false, 100);
} 
}
EDIT:

Just found this in the ship commander.aix file

Code:
strategy Commander(Ship)
{
precond
{
Ship:IsCommander()
}
strategies
{
#OperationPlasterComm,
OperationSpiralSearchComm,
OperationFollow,
#OperationSinglePlasterComm,
#PineappleComm,
#RaspberryComm,
TerminateOperationComm
} 
}
As you can see above the Pineapple stragey is disabled - The AI ships won't call the Pineapple stratagies which have the starshells in them.

Can someone test if we change #PineappleComm to PineappleComm
will it enable the AI to use the strategy Role_Pineapple1(Ship)

Still in development stage of my UI Mod so can't test this out at the moment.

Last edited by reaper7; 04-27-10 at 05:30 AM.
reaper7 is offline   Reply With Quote
Reply


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 08:21 AM.


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