Author Topic: well THAT was frustrating! ("A Game of TAG")  (Read 16583 times)

0 Members and 3 Guests are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: well THAT was frustrating! ("A Game of TAG")
EDIT: I think revision 1899 (committed by phreak) is what changed this behavior. Here's the revision comment:
Quote
stop turrets from targeting non-bombs.  also some tagged-only fixes.
So, instead of just making a build from the next midway point, I suggest making one from 1898 and another from 1899.

Good call.  Try these:
http://scp.indiegames.us/builds/WIN/fs2_open_r1898.zip
http://scp.indiegames.us/builds/WIN/fs2_open_r1899.zip

EDIT: There's another related commit by phreak in revision 1900, so try this as well:
http://scp.indiegames.us/builds/WIN/fs2_open_r1900.zip
« Last Edit: April 28, 2014, 01:00:24 am by Goober5000 »

 

Offline Yarn

  • 210
Re: well THAT was frustrating! ("A Game of TAG")
Good call.  Try these:
http://scp.indiegames.us/builds/WIN/fs2_open_r1898.zip
http://scp.indiegames.us/builds/WIN/fs2_open_r1899.zip

EDIT: There's another related commit by phreak in revision 1900, so try this as well:
http://scp.indiegames.us/builds/WIN/fs2_open_r1900.zip
Just tried those builds; the Warspite fires its weapons in revision 1898, but not in 1899 or 1900.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
Good work on all that testing  :yes:

Note that part of 1899 was reverted in 1903.  And I thought I'd already tested removing the remnants of the code added in 1899, so maybe there's something else that's changed in the meantime (or my testing was borked).
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline deathspeed

  • 29
  • i can't think of a good avatar
    • Steam
Re: well THAT was frustrating! ("A Game of TAG")
I just want to say you all are amazing!  I posted here just to vent about how frustrating that mission was for me, assuming it was my lack of skills.  I had no idea that it would turn into four pages of posts, advice, and some serious bughunting!  Thank you all.
Maybe someday God will give you a little pink toaster of your own.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
:D

And I tried reverting 1899 again and it seems my previous testing was accurate, something else will need changing to get the original behaviour back.

Here's what I reverted:

Code: [Select]
diff --git a/code/ai/aiturret.cpp b/code/ai/aiturret.cpp
index ad8c4da..388a1e5 100644
--- a/code/ai/aiturret.cpp
+++ b/code/ai/aiturret.cpp
@@ -2250,18 +2250,11 @@ void ai_fire_from_turret(ship *shipp, ship_subsys *ss, int parent_objnum)
                                                ss->turret_time_enemy_in_range = 0.0f;
                                                continue;
                                        }
-                               }
-                               else
-                               {
+
                                        //can't tag anything else, other than asteroids
                                        //but we don't want to waste this type of
                                        //weaponary on asteroids now do we?
-                                       if ((wip->wi_flags2 & WIF2_TAGGED_ONLY) || (ss->weapons.flags & SW_FLAG_TAGGED_ONLY))
-                                       {
-                                               continue;
-                                       }
                                }
-
                                //Add it to the list
                                valid_weapons[num_valid++] = i;
                        }

And here's the original commit for comparison:

Code: [Select]
diff --git a/code/ai/aiturret.cpp b/code/ai/aiturret.cpp
index 4f48981..c7955ff 100644
--- a/code/ai/aiturret.cpp
+++ b/code/ai/aiturret.cpp
@@ -1,12 +1,16 @@
 /*
  * $Logfile: /Freespace2/code/ai/aiturret.cpp $
- * $Revision: 1.14 $
- * $Date: 2005-05-13 02:50:47 $
+ * $Revision: 1.15 $
+ * $Date: 2005-05-14 21:35:04 $
  * $Author: phreak $
  *
  * Functions for AI control of turrets
  *
  * $Log: not supported by cvs2svn $
+ * Revision 1.14  2005/05/13 02:50:47  phreak
+ * fixed another minimum range bug that prevented the Colossus and the Beast from
+ * properly engaging one another in the mission: Their Finest Hour (SM3-08)
+ *
  * Revision 1.13  2005/05/10 15:49:04  phreak
  * fixed a minimum weapon range bug that was causing turrets to fire at ships beyond
  * the actual range of a weapon.
@@ -613,7 +617,12 @@ int get_nearest_enemy_objnum(int turret_parent_objnum, ship_subsys *turret_subsy
                // Missile_obj_list
                for( mo = GET_FIRST(&Missile_obj_list); mo != END_OF_LIST(&Missile_obj_list); mo = GET_NEXT(mo) ) {
                        objp = &Objects[mo->objnum];
-                       evaluate_obj_as_target(objp, &eeo);
+                       
+                       Assert(objp->type == OBJ_WEAPON);
+                       if (Weapon_info[Weapons[objp->instance].weapon_info_index].wi_flags & WIF_BOMB)
+                       {
+                               evaluate_obj_as_target(objp, &eeo);
+                       }
                }
                // highest priority
                if ( eeo.nearest_homing_bomb_objnum != -1 ) {                                   // highest priority is an incoming homing bomb
@@ -1462,7 +1471,22 @@ void ai_fire_from_turret(ship *shipp, ship_subsys *ss, int parent_objnum)
                                                ss->turret_time_enemy_in_range = 0.0f;
                                                continue;
                                        }
+
+                                       // check if we're using a tagged only type weapon and the target ship isn't tagged
+                                       if (((wip->wi_flags2 & WIF2_TAGGED_ONLY) || (ss->weapons.flags & SW_FLAG_TAGGED_ONLY)) && !ship_is_tagged(lep))
+                                       {
+                                               continue;
+                                       }
+                               }
+                               else
+                               {
+                                       //can't tag anything else
+                                       if ((wip->wi_flags2 & WIF2_TAGGED_ONLY) || (ss->weapons.flags & SW_FLAG_TAGGED_ONLY))
+                                       {
+                                               continue;
+                                       }
                                }
+
                                //Add it to the list
                                valid_weapons[num_valid++] = i;
                        }
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
I think I've got a possible solution that should return to the retail behaviour of only beams requiring a tag to be fired. More work would need to be done to provide new SEXPs/ship flags that'd behave like FSO currently does, i.e. all weapons (except spawners) require a tag to fire.

Yarn, would you be able to test/confirm if these executables behave the same as retail? (I can't run retail myself)
http://www.mediafire.com/download/qlig2jgsb77x8z5/turret-tagged-only.7z

FYI - here's the code changes I made (2x commits, 1st commit is reverting what's left of 1899):
https://github.com/niffiwan/fs2open.github.com/commits/tagged-issue
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: well THAT was frustrating! ("A Game of TAG")
Suspecting that the Warspite was really targeting the bombs, I replaced Virgo's bombs with Tempests and tried this mission again in retail. It turns out I was right; without the bombs being present, the Warspite only fired its cluster bombs.

So, to reiterate, the retail behavior of a turret-tagged-only ship is to fire its weapons only at bombs and tagged ships. This involves all non-cluster-bomb weapons, not just beams.

I'll post here again once I finish testing this in the various FSO builds, including the one that Niffiwan posted.
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: well THAT was frustrating! ("A Game of TAG")
Very interesting. I wonder if 'fixing' this would cause warships to start firing their main beams at bombs again.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
Suspecting that the Warspite was really targeting the bombs, I replaced Virgo's bombs with Tempests and tried this mission again in retail. It turns out I was right; without the bombs being present, the Warspite only fired its cluster bombs.

So, to reiterate, the retail behavior of a turret-tagged-only ship is to fire its weapons only at bombs and tagged ships. This involves all non-cluster-bomb weapons, not just beams.

I'll post here again once I finish testing this in the various FSO builds, including the one that Niffiwan posted.

Thanks for that testing.  And based on what you said, you don't need to bother with my patch/build as it lets all the non-beam turrets open fire on anything. In fact, in my test mission the Warspite positively murders the wing of Basilisks I had attacking it.

Very interesting. I wonder if 'fixing' this would cause warships to start firing their main beams at bombs again.

Hopefully not! :D
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Mongoose

  • Rikki-Tikki-Tavi
  • Global Moderator
  • 212
  • This brain for rent.
    • Steam
    • Something
Re: well THAT was frustrating! ("A Game of TAG")
I'm not sure if it was that issue, but I remember an ancient build where warships seemed to fire their main beams at the player.  That was not fun times. :D

 
Re: well THAT was frustrating! ("A Game of TAG")
Very interesting. I wonder if 'fixing' this would cause warships to start firing their main beams at bombs again.
I thought that behavior was regulated by AI profiles now?

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: well THAT was frustrating! ("A Game of TAG")
Very interesting. I wonder if 'fixing' this would cause warships to start firing their main beams at bombs again.
I thought that behavior was regulated by AI profiles now?

Don't think so, but maybe. Are you thinking of $allow beams to damage bombs?

 
Re: well THAT was frustrating! ("A Game of TAG")

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
Here's another build which should let all turrets (with the tagged-only flag) fire at bombs in addition to tagged ships. It was a bit surprising to see the Ultra AAA's let rip at bombs, but I guess that's what we're after.  Could you please run another test and let me know what you think of the behaviour now? Thanks :)

http://www.mediafire.com/download/z7j76jpy1a0zrtd/fs2_open_3_7_1_SSE2_turret_tagged_only_v2.7z

Code is here again:
https://github.com/niffiwan/fs2open.github.com/commits/tagged-issue
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: well THAT was frustrating! ("A Game of TAG")
I tried Niffiwan's build, and it behaves like retail, with one exception: the custer bombs didn't fire unless bombs were present or an enemy ship was tagged. (In retail, cluster bombs fire regardless of whether turret-tagged-only is set, unlike the other weapons.)
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
Thanks for the feedback, I'll see what I can find wrt changing the cluster bomb behaviour.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: well THAT was frustrating! ("A Game of TAG")
This set of fixes remains completely terrifying to me.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
I understand that, the AI code is... interesting. I intend to marry the changes to an AI profiles flag or flags. i.e. default to be "retail", with a flag to retain the behaviour present before any of the changes in this thread were made. And, *cross fingers* it should also only affect AI behaviour when stuff is tagged, which shouldn't be that many missions. Right?  :nervous:
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Yarn

  • 210
Re: well THAT was frustrating! ("A Game of TAG")
The Warspite is still not firing at the bombs. Is this still being investigated?
"Your fighter is running out of oil.  Please check under the hood and add more if necessary"
--strings.tbl, entry 177

"Freespace is very tired.  It is shutting down to get some rest."
--strings.tbl, entry 178

 

Offline niffiwan

  • 211
  • Eluder Class
Re: well THAT was frustrating! ("A Game of TAG")
I haven't worked on this for a while, I'll pick it back up once I get the font stuff sorted out.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...