2018-09-25 23:45 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001779FSSCPgameplaypublic2008-09-28 16:58
ReporterKeldorKatarn 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.9 
Target VersionFixed in Version 
Summary0001779: AI ships with low missile ammount exhaust their supply too fast
DescriptionHere a suggested fix for this:

added
$Friendly AI Secondary Fire Delay Scale:
and
$Hostile AI Secondary Fire Delay Scale:

to ai_profiles.tbl and entered retail values into FS2 RETAIL profile.
Additional InformationThis is a must have for WC Saga since Wing Commander ships traditionally have a very low ammount of missiles compared to FS2 standards.
TagsNo tags attached.
Attached Files
  • patch file icon ai_secondary_fire_delay.patch (3,283 bytes) 2008-09-26 09:32 -
    Index: code/ai/ai_profiles.cpp
    ===================================================================
    --- code/ai/ai_profiles.cpp	(revision 4831)
    +++ code/ai/ai_profiles.cpp	(working copy)
    @@ -301,6 +301,12 @@
     			if (optional_string("$Hostile AI Fire Delay Scale:"))
     				parse_float_list(profile->ship_fire_delay_scale_hostile, NUM_SKILL_LEVELS);
     
    +			if (optional_string("$Friendly AI Secondary Fire Delay Scale:"))
    +				parse_float_list(profile->ship_fire_secondary_delay_scale_friendly, NUM_SKILL_LEVELS);
    +
    +			if (optional_string("$Hostile AI Secondary Fire Delay Scale:"))
    +				parse_float_list(profile->ship_fire_secondary_delay_scale_hostile, NUM_SKILL_LEVELS);
    +
     			if (optional_string("$Player Subsys Damage Factor:") || optional_string("$AI Damage Reduction to Player Subsys:"))
     				parse_float_list(profile->subsys_damage_scale, NUM_SKILL_LEVELS);
     
    Index: code/ai/ai_profiles.h
    ===================================================================
    --- code/ai/ai_profiles.h	(revision 4831)
    +++ code/ai/ai_profiles.h	(working copy)
    @@ -119,6 +120,10 @@
     	float ship_fire_delay_scale_hostile[NUM_SKILL_LEVELS];
     	float ship_fire_delay_scale_friendly[NUM_SKILL_LEVELS];
     
    +	//	Multiplicative secondary delay factors for increasing skill levels.
    +	float ship_fire_secondary_delay_scale_hostile[NUM_SKILL_LEVELS];
    +	float ship_fire_secondary_delay_scale_friendly[NUM_SKILL_LEVELS];
    +
     	//	Maximum turrets of one ship allowed to shoot the same target
     	int max_turret_ownage_target[NUM_SKILL_LEVELS];
     	int max_turret_ownage_player[NUM_SKILL_LEVELS];
    Index: code/ai/aicode.cpp
    ===================================================================
    --- code/ai/aicode.cpp	(revision 4831)
    +++ code/ai/aicode.cpp	(working copy)
    @@ -8641,10 +8668,9 @@
     {
     	float t = swip->fire_wait;		//	Base delay for this weapon.
     	if (shipp->team == Player_ship->team) {
    -		//	On player's team, _lower_ skill level = faster firing
    -		t = t * (Game_skill_level+2) / (NUM_SKILL_LEVELS);
    -	} else {		//	Not on player's team, higher skill level = faster firing
    -		t = t * (NUM_SKILL_LEVELS - Game_skill_level+2) / (NUM_SKILL_LEVELS);
    +		t *= The_mission.ai_profile->ship_fire_secondary_delay_scale_friendly[Game_skill_level];
    +	} else {
    +		t *= The_mission.ai_profile->ship_fire_secondary_delay_scale_hostile[Game_skill_level];
     	}
     
     	t += (Num_ai_classes - aip->ai_class + 1) * 0.5f;
    Index: code/globalincs/def_files.cpp
    ===================================================================
    --- code/globalincs/def_files.cpp	(revision 4831)
    +++ code/globalincs/def_files.cpp	(working copy)
    @@ -762,6 +762,12 @@
     ;; factor applied to 'fire wait' for hostile ships						\n\
     $Hostile AI Fire Delay Scale: 4, 2.5, 1.75, 1.25, 1						\n\
     																		\n\
    +;; factor applied to 'fire wait' for secondaries of friendly ships		\n\
    +$Friendly AI Secondary Fire Delay Scale: 0.4, 0.6, 0.8, 1.0, 1.2		\n\
    +																		\n\
    +;; factor applied to 'fire wait' for secondaries of hostile ships		\n\
    +$Hostile AI Secondary Fire Delay Scale: 1.4, 1.2, 1.0, 0.8, 0.6			\n\
    +																		\n\
     ;; factor applied to time it takes for enemy ships to turn				\n\
     $AI Turn Time Scale: 3, 2.2, 1.6, 1.3, 1								\n\
     																		\n\
    
    patch file icon ai_secondary_fire_delay.patch (3,283 bytes) 2008-09-26 09:32 +

-Relationships
+Relationships

-Notes

~0009712

Goober5000 (administrator)

Ok. Technically this is not a bugfix, though. How urgent is it?

~0009717

KeldorKatarn (reporter)

Well, right now Saga is using AI weapons with longer lock time and longer refire delay to adjust the AI behavior. The problem is, this completely rules out using the loadout selection screen since you cannot make weapons available for the player's wingmen and not have them show up in that screen and be assignable to the player too, so the player would see every missile/torpedo twice like "Torpedo and AI-Torpedo".
So as long as we do not have this feature we cannot use the loadout selection screen hence it is a release blocker.
So since this isn't going to change any of the retail behavior as should be obvious by looking at the code adn the FS2 RETAIL settings for this, we'd really appreciate having this in the SVN. This is one of the most urgent requests we have right now except for from dynamic message limit.

~0009725

Goober5000 (administrator)

I agree that the loadout screen issue is a serious problem (I have commented on it before). I will post a thread in the SCP internal.

~0009733

Goober5000 (administrator)

K, done.
+Notes

-Issue History
Date Modified Username Field Change
2008-09-26 09:32 KeldorKatarn New Issue
2008-09-26 09:32 KeldorKatarn File Added: ai_secondary_fire_delay.patch
2008-09-27 01:57 Goober5000 Note Added: 0009712
2008-09-27 07:52 KeldorKatarn Note Added: 0009717
2008-09-27 20:30 Goober5000 Note Added: 0009725
2008-09-28 16:58 Goober5000 Note Added: 0009733
2008-09-28 16:58 Goober5000 Status new => resolved
2008-09-28 16:58 Goober5000 Resolution open => fixed
+Issue History