Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Nightly Builds => Topic started by: SirKnightly on May 19, 2014, 04:13:03 am

Title: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: SirKnightly on May 19, 2014, 04:13:03 am
Here is the nightly for FreeBSD on 19 May 2014 - Revision 10705

Group: Standard
fso_Standard_20140519_r10705.tar.bz2 (http://swc.fs2downloads.com/builds/FREEBSD/fso_Standard_20140519_r10705.tar.bz2)
MD5Sum (http://swc.fs2downloads.com/builds/FREEBSD/fso_Standard_20140519_r10705.md5)

Code: [Select]
------------------------------------------------------------------------
r10689 | niffiwan | 2014-05-13 05:41:23 -0500 (Tue, 13 May 2014) | 3 lines
Changed paths:
   M /trunk/fs2_open/code/menuui/barracks.cpp

Fix assertion when entering barracks in debug

Assert that there's one more line free, not number-of-ships lines
------------------------------------------------------------------------
r10695 | chief1983 | 2014-05-15 12:26:07 -0500 (Thu, 15 May 2014) | 1 line
Changed paths:
   M /trunk/fs2_open/configure.ac

Add some lib locations for Solaris for software installed from OpenCSW.
------------------------------------------------------------------------
r10701 | The_E | 2014-05-17 09:48:04 -0500 (Sat, 17 May 2014) | 2 lines
Changed paths:
   M /trunk/fs2_open/code/ship/ship.cpp

Checking a ship_info flag against a ship flag isn't going to work

------------------------------------------------------------------------
r10702 | The_E | 2014-05-17 11:24:23 -0500 (Sat, 17 May 2014) | 2 lines
Changed paths:
   M /trunk/fs2_open/code/ship/ship.cpp

See 10701, same issue here

------------------------------------------------------------------------
r10704 | The_E | 2014-05-17 16:15:50 -0500 (Sat, 17 May 2014) | 2 lines
Changed paths:
   M /trunk/fs2_open/code/parse/sexp.cpp

More ship flag/ship info flag confusion cleared up

------------------------------------------------------------------------
r10705 | m_m | 2014-05-18 02:03:14 -0500 (Sun, 18 May 2014) | 1 line
Changed paths:
   M /trunk/fs2_open/code/weapon/weapon.h
   M /trunk/fs2_open/code/weapon/weapons.cpp

Add support for countermeasures that will pull aspect seekers away from their previous targets.
------------------------------------------------------------------------


Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: Aardwolf on May 19, 2014, 02:22:43 pm
Quote
Add support for countermeasures that will pull aspect seekers away from their previous targets.

More info please!
Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: General Battuta on May 19, 2014, 03:28:00 pm
It was a feature request to make capship-launched countermeasures more effective for BP.

According to Rian's analysis, countermeasures have the following effect in retail:
The countermeasure attempts to decoy the incoming munition. If the decoy attempt succeeds:
Heatseekers alter course to chase the countermeasure.
Aspect seekers go dumbfire, and proceed along their last course at full speed.

The latter behavior is problematic for capship-launched CMs because most bombs are aspect seekers. This means that a warship can successfully CM an incoming bomb, but it will proceed along its last course and still strike the warship.

The flag should cause aspect seekers to chase flagged CMs, just as heatseekers do.

You can see the desired behavior by opening the BP2 mission 'One Future', approaching the Morena MacDuff, waiting for it to launch a volley of missiles, and firing your countermeasures in response. Because the Morena's Ouster missiles use a heat seeker, they will chase the countermeasures instead of going dumbfire.
Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: m!m on May 19, 2014, 03:49:43 pm
I also added documentation to the wiki: http://www.hard-light.net/wiki/index.php/Weapons.tbl#.22pulls_aspect_seekers.22
Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: General Battuta on May 19, 2014, 03:50:38 pm
Now we just need to figure out how the seeker strength value interacts with countermeasures to determine the chance of being pulled off target...
Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: niffiwan on May 19, 2014, 04:55:37 pm
I think I've found the relevant code (see below), which means that the chance of a homing missile chasing a countermeasure is:

+Heat Effectiveness: (default 1.0) / +Seeker Strength: (default 3.0)
or
+Aspect Effectiveness: (default 1.0) / +Seeker Strength: (default 2.0)

(The homer has to be inside the CM +Effective Radius: (default 300.0), and each CM has one chance to decoy any given missile)

Code: (void find_homing_object_cmeasures_1(object *weapon_objp)) [Select]
...
if (dist < cm_wip->cm_effective_rad)
{
float chance;
if (wip->wi_flags & WIF_HOMING_ASPECT) {
// aspect seeker this likely to chase a countermeasure
chance = cm_wip->cm_aspect_effectiveness/wip->seeker_strength;
} else {
// heat seeker and javelin HS this likely to chase a countermeasure
chance = cm_wip->cm_heat_effectiveness/wip->seeker_strength;
}
if ((objp->signature != wp->cmeasure_ignore_objnum) && (objp->signature != wp->cmeasure_chase_objnum))
{
if (frand() >= chance) {
wp->cmeasure_ignore_objnum = objp->signature; // Don't process this countermeasure again.
} else  {
wp->cmeasure_chase_objnum = objp->signature; // Don't process this countermeasure again.
}
}
...

Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: General Battuta on May 19, 2014, 04:58:04 pm
HAIL SATAN
Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: AdmiralRalwood on May 19, 2014, 07:08:42 pm
I think I've found the relevant code (see below), which means that the chance of a homing missile chasing a countermeasure is:

+Heat Effectiveness: (default 1.0) / +Seeker Strength: (default 3.0)
or
+Aspect Effectiveness: (default 1.0) / +Seeker Strength: (default 2.0)
So by default, heat seekers are less likely to be decoyed than aspect seekers?
Title: Re: Nightly (FreeBSD): 19 May 2014 - Revision 10705
Post by: niffiwan on May 19, 2014, 07:10:16 pm
Yeah, that seems to be the case.