Author Topic: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug  (Read 11585 times)

0 Members and 1 Guest are viewing this topic.

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
I think it's so the player cant break a mod by disabling a key feature
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Absolutely the table option. You can always just mod the weapons tables for your personal use.

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Indeed. I can see mods enjoying the ability to have swarm missiles lead without doing funky corkscrew acrobatics.

AI can't use trebs because the missile has conflicting flags telling AI to:
1.Only use it on cap ships. (more accurately described as never using it against anything fighter or bomber-sized)
2. Only use it on bombers.

Oh, I see. That's easy to fix.

 

Offline Mastadon

  • Contributes SCP patches and doesn't afraid of anything
  • 26
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Absolutely the table option. You can always just mod the weapons tables for your personal use.

Would implementing both options be considered acceptable for inclusion into the SCP?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
I can't speak for the coders, but I know there has been a huge effort to reduce the number of command line flags in recent years. Also as a content producer for a major mod, I would be really frustrated with a launcher option, because of the possibility that a user could say 'hey, your missions are all broken!' and then it turns out they've had 'swarm missiles use lead pursuit' turned on and it's somehow made all my bombs behave differently.

I don't want to be discouraging, but I would really discourage a command line flag. In general I would say that command line flags should only alter aesthetic, visual, or interface elements, never anything gameplay-relevant.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Command line flags are depreciated, more or less. If anything, we want to reduce their number as much as we can. Not to mention that Battuta is correct, having more than one place to change a given setting is a recipe for disaster.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Mastadon

  • Contributes SCP patches and doesn't afraid of anything
  • 26
Swarmers lead target patch, version 2.0
I have gone ahead and implemented conditional logic that allow the swarm missile tracking to be enabled either by the command-line switch "-swarms_lead_target " or by a weapon author / campaign editor's inclusion of the following new optional sub-flag for the $Swarm flag: the "+swarmLeadTarget" flag.

To use the +swarmLeadTarget, just add it below a $Swarm: flag, like so:
Code: [Select]
$Swarm: 4
+swarmLeadTarget;

To test out the +swarmLeadTarget; sub-flag, you can either modify your weapons.tbl file or use the attached weapons.tbl file, which modifies the FS2 reatail weapons.tbl file entry for the Hornet swarm missiles to use the +swarmLeadTarget sub-flag.

[attachment deleted by ninja]

[attachment deleted by a ninja]
« Last Edit: May 17, 2012, 02:58:41 pm by Mastadon »

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
How is this patch applied to the game? Do you need to download a new build?

 

Offline Mastadon

  • Contributes SCP patches and doesn't afraid of anything
  • 26
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
How is this patch applied to the game? Do you need to download a new build?

You apply this patch to a working copy of the FS2 source code tree. One item to note: the patch was originally generated against r8789, so if you run into problems using the patch, update your working copy to r8789, then apply the patch, then update to current and Subversion will auto-merge the changes.

If you don't know where to get the source code for FS2, read this post.

 

Offline Legate Damar

  • Keeping up with the Cardassians
  • 29
  • Hail Cardassia!
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
I think I'd rather wait until a build is released that incorporates it

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Patches are for coders only.

As for the patch itself: Command-line flags, especially gratuitous ones like this, will not be included. Ever. We used to have a few of these, and they are nothing but trouble.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Mastadon

  • Contributes SCP patches and doesn't afraid of anything
  • 26
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Patches are for coders only.

As for the patch itself: Command-line flags, especially gratuitous ones like this, will not be included. Ever. We used to have a few of these, and they are nothing but trouble.

Ok. I've stripped out the command-line switch code and left in the weapons.tbl modifications. The patch is good against r8792.

[attachment deleted by a ninja]

 

Offline Cyker

  • 28
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
*puts his hand up*

Uhh, did I miss something here?

I'm pretty sure we already have lead-tracking swarm missiles - They are called Tornados...

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
*puts his hand up*

Uhh, did I miss something here?

I'm pretty sure we already have lead-tracking swarm missiles - They are called Tornados...

Those are corkscrew missiles. The engine handles them differently, they don't use the swarm flag.

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Swarmers lead target patch, version 2.0
To use the +swarmLeadTarget, just add it below a $Swarm: flag, like so:
Code: [Select]
$Swarm: 4
+swarmLeadTarget;
Why is that needed? I though that it'd be enough to just make +Target lead scaler: work on swarm missiles. I'm asking because somebody may want them to use pure pursuit. This flag, as I understand it, only allows toggling between lead and lag pursuit.

 

Offline Sushi

  • Art Critic
  • 211
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Alright, let's slow down and concretely determine the following:

Does or does not +Target lead scaler work correctly with swarm missiles?

If it is indeed the case that it doesn't, then IMO the correct solution is to fix the code so that it does. +Target lead scaler is an SCP flag, and a relatively recent one, so I think we can implement a bug fix to make it work correctly for all missiles without needing any new table or command line flags.

 

Offline Cyker

  • 28
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
@Bats - Ahh, I see! I didn't notice that...! Learn something new every day :)

Hrm... now you've got me wondering how that superswarmy thing in (I think) one of the JADs was implemented...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Alright, let's slow down and concretely determine the following:

Does or does not +Target lead scaler work correctly with swarm missiles?

If it is indeed the case that it doesn't, then IMO the correct solution is to fix the code so that it does. +Target lead scaler is an SCP flag, and a relatively recent one, so I think we can implement a bug fix to make it work correctly for all missiles without needing any new table or command line flags.

I was about to say the same thing.

The SCP doesn't change the behaviour of retail. We can however change the behaviour of SCP additions. Especially if they have a bug, and especially if the bug is recent.


Sorry that you're having a hard time with such a simple patch Mastadon. If I were you, I'd move on to another feature/bug and let the SCP coders decide how we're going to implement your fix. You'll still get the credit and you won't have to worry about changing how it works every 5 minutes. :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Mastadon

  • Contributes SCP patches and doesn't afraid of anything
  • 26
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
Alright, let's slow down and concretely determine the following:

Does or does not +Target lead scaler work correctly with swarm missiles?

If it is indeed the case that it doesn't, then IMO the correct solution is to fix the code so that it does. +Target lead scaler is an SCP flag, and a relatively recent one, so I think we can implement a bug fix to make it work correctly for all missiles without needing any new table or command line flags.

I was about to say the same thing.

The SCP doesn't change the behaviour of retail. We can however change the behaviour of SCP additions. Especially if they have a bug, and especially if the bug is recent.


Sorry that you're having a hard time with such a simple patch Mastadon. If I were you, I'd move on to another feature/bug and let the SCP coders decide how we're going to implement your fix. You'll still get the credit and you won't have to worry about changing how it works every 5 minutes. :D

In a nutshell, no, the +Target Lead Scalar does not work with swarm missiles, since the only time the target lead scalar information is used is to modify an l-valued vec3d called target_pos in the weapon_home method, which is then used to change the direction of non-swarm missiles. However, swarm missiles are not affected since neither the value of target_pos is stored back to the wp->homing_pos in the case of swarm missiles nor is the wip->target_lead_scaler value used at all in the swarm homing code.

BTW, no problems about the hard time for my first patch. I've learned a few useful tips for streamlining the submission process for patches to the SCP community. Unless one of the SCP members needs additional input from me regarding my patch, I'm going to move on to other features / bugs.
« Last Edit: May 17, 2012, 06:54:26 pm by Mastadon »

 

Offline Ace

  • Truth of Babel
  • 212
    • http://www.lordofrigel.com
Re: Patch for the "My entire bank of swarm missiles missed a moving freighter" bug
It'd be good to make sure that +target lead scalar works properly with hornets and tornadoes then, overriding default behaviors as necessary.

For instance Diaspora uses tornado flags on a bunch of weapons to give that slight trail jerkiness seen in the show on some weapons. So it'd be nice to have trailing tornadoes for some cases.
Ace
Self-plagiarism is style.
-Alfred Hitchcock