Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: SadisticSid on December 20, 2003, 01:25:16 pm
-
Any chance the SCP team could please enable turrets to fire once every 'fire wait' seconds instead of what they seem to be now? (put a Subach HL-7 on a turret and watch it fire very slowly to see what I mean.)
Hope this hasn't already been discussed, sorry if so!
-
that would be very useful, indeed :nod:
-
I discovered that upping the turret AI's accuracy increases the rate of fire to what it's meant to be. I have no idea why this should be.
-
Even hostile fighters(with Ai) fire any kind of lasers far slower than the 'normal' fire rate. It is simply a balance thing. Nothing more, nothing less. But yeah, a slight RoF increase would be fine.
-
Originally posted by diamondgeezer
I discovered that upping the turret AI's accuracy increases the rate of fire to what it's meant to be. I have no idea why this should be.
Low accuracy gunners take longer trying to line up a shot? :p
-
With an SMG you'd do that while holding down the trigger, that's why they have the motto "spray and pray!" - the same would go for many weapons with hight ROF.
-
Yeah, in Starforce, I'd like the turrets to really put out a hail of fire at you. However, it should be a FRED setting that can be enabled/disabled for each turret.
-
I discovered that upping the turret AI's accuracy increases the rate of fire to what it's meant to be. I have no idea why this should be.
yeah, "accuracy" is quite a misnomer for that setting; the AI's accuracy is always pretty much the same, and what it really controls is the rate of fire. It seems to affect both turrets and primary guns, but I am not sure about missile mounts.
I'm suspecting that the patience setting also does something completely unrelated to patience, as there certainly does not seem to be any difference in the patience levels of the computer ships (would be of little use anyway considering FS2's game mechanics). Maybe one of the coders can find some information on this.
-
The $Patience is surely only for fighters. The turret fire rate decrease is only to balance the difficulty settings.
-
this looks like the culprit
void turret_set_next_fire_timestamp(ship_subsys *turret, ai_info *aip)
{
float wait;
int weapon_id;
weapon_id = turret->system_info->turret_weapon_type;
wait = Weapon_info[weapon_id].fire_wait * 1000.0f;
// make side even for team vs. team
#ifndef NO_NETWORK
if ((Game_mode & GM_MULTIPLAYER) && (Netgame.type_flags & NG_TYPE_TEAM)) {
// flak guns need to fire more rapidly
if (Weapon_info[weapon_id].wi_flags & WIF_FLAK) {
wait *= Ship_fire_delay_scale_friendly[Game_skill_level] * 0.5f;
wait += (Num_ai_classes - aip->ai_class - 1) * 40.0f;
} else {
wait *= Ship_fire_delay_scale_friendly[Game_skill_level];
wait += (Num_ai_classes - aip->ai_class - 1) * 100.0f;
}
}
else
#endif
{
// flak guns need to fire more rapidly
if (Weapon_info[weapon_id].wi_flags & WIF_FLAK) {
if (Ships[aip->shipnum].team == TEAM_FRIENDLY) {
wait *= Ship_fire_delay_scale_friendly[Game_skill_level] * 0.5f;
} else {
wait *= Ship_fire_delay_scale_hostile[Game_skill_level] * 0.5f;
}
wait += (Num_ai_classes - aip->ai_class - 1) * 40.0f;
} else if (Weapon_info[weapon_id].wi_flags & WIF_HUGE) {
// make huge weapons fire independently of team
wait *= Ship_fire_delay_scale_friendly[Game_skill_level];
wait += (Num_ai_classes - aip->ai_class - 1) * 100.0f;
} else {
// give team friendly an advantage
if (Ships[aip->shipnum].team == TEAM_FRIENDLY) {
wait *= Ship_fire_delay_scale_friendly[Game_skill_level];
} else {
wait *= Ship_fire_delay_scale_hostile[Game_skill_level];
}
wait += (Num_ai_classes - aip->ai_class - 1) * 100.0f;
}
}
// vary wait time +/- 10%
wait *= frand_range(0.9f, 1.1f);
turret->turret_next_fire_stamp = timestamp((int) wait);
}
-
...wait. Does that program it so that different teams fire at different rates?
-
different teams and AI classes
-
I figured as much. I didn't bother to read the whole thing through... *shrugs*
Anyone gonna change it? :p
-
Yeah! Change the darn thing! We want real ROF!
-
[color=cc9900]What's wrong with just changing the AI level, TrashMan?[/color]
-
Well look at the code - for one thing, flak always fires faster than normal weapons. If we could have an 'obey TBL fire wait' override flag for the weapon, that would let us have more flexibility in designing weapons while maintaining vanilla FS2 compatibility.
-
i was thinking of having weapons that have refire times of <=1/2 second should be fired as fast as possible instead of being modified like that.
-
Sounds good, yeah, although you might want to leave in those limitations for multiplayer.