Kaks wrote:Frame seemed to be able to tweak the plasma cannons somewhat, without touching the Oolite code, but I might be wrong.
Custom Spawned high yield dumb fire missiles that acquire lead on launch, then never again, until they hit their target or they exceed their range.
Range is customised via javascript, while effective range is determined in the AI..
when hostile target
The script runs down a subjectivity array/list, when it encounters a specific role it checks the targets dot product in regard to up/down/right vectors. and finds out where exactly the target is, for example a right side turret cannot fire on a target that is on the left side..
Turrets are Shipdata entries like this..
Code: Select all
"Frame_DeFenseGrid_NonFrontNonBottomNonLeft" =
{
ai_type = "dumbwreckAI.plist";
max_flight_pitch = 20;
max_flight_roll = 20;
max_flight_speed = 41;
model = "oolite-ball-turret.dat";
name = "Turret Subentity";
max_cargo = 0;
likely_cargo = 0;
roles = "FrameDefenseGrid";
smooth = yes;
scanClass = "CLASS_SHIP";
scanner_range = 4;
};
as the name indicates it simply determines where the target must not be in order for the turret to launch its Pulses.
As when to put the object the right place i simply go about the same rules.
The javascript uses the sub entities max_flight_speed like bitwise operations.
Code: Select all
/1 = vector up //means fire if only at Vector Up
//2 = vector down //means fire if only at Vector Down.. carefull a craft is allways at either forward or at the rear
//4 = vector Right
//8 = vector left
//16 = vector forward
//32 = vector aft
Give it a high enough thrust the wreck model for example will destroy vipers and the likes with 1 or two hits..
And it is deadly accurate in targeting attacking fighters Atm..
, while fleeing ones have much better chance at surviving.
Ofcourse if your ship is large, it is an easier target...
Cheers Frame