Author Topic: The Lightning Marshall weapon errors  (Read 2518 times)

0 Members and 1 Guest are viewing this topic.

Offline CT27

  • 211
The Lightning Marshall weapon errors
I was playing a recent nightly for Windows
http://www.hard-light.net/forums/index.php?topic=91831.0  ( I used the "Standard" version) while playing the campaign "The Lightning Marshall (chapter 0-The Regulus Campaign)".


However, I came into a pretty big problem with weapons.  After a briefing when I went to select weapons all but one of the weapons (Katana primary cannon) was grayed out instead of the blue-ish green color selectable weapons usually are.  This means I can't change primaries or secondaries for myself or wingmen.  I tried a number of other nightlies I had and they had the same problem.  I had to go all the way back in my nightly list to one dated October 6 before weapons were selectable again.

I don't know if it will do any good but I'll attach a debug log.

Can anyone figure out the issue?



[attachment DELETED!! by Strong Bad]

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
Something I forgot to mention: 

What's weird is that when I went to check my weapons it already had me loaded with Rockeyes, but Rockeyes were greyed out on the left side of the screen and said a Myrmidon couldn't carry them even though it had them in my default loadout.

I tested this nightly on another campaign (Luyten Civil War) and didn't have this problem so it may be unique to this campaign for some reason.

 

Offline Solatar

  • 211
Re: The Lightning Marshall weapon errors
http://www.hard-light.net/forums/index.php?topic=91220.msg1807841#msg1807841


A SCP change made it so that you have to use the +noreplace parameter on weapon flags if you want the game to merge the two sets of entries instead of clearing the first set when it loads a .tbm.  In that release, LM-shp.tbm has a bunch of ships with the +nocreate paramater, but not the +noreplace. I thought you'd just have to add +noreplace to the weapon entries, but it throws an error when I add them right after.

This worked on older versions:
Code: [Select]
$Name:                          GTF Myrmidon
+nocreate
$Allowed PBanks:        ( "Katana HR-11" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" )

But now the behavior has been changed/fixed. Something like this?
Code: [Select]
$Name:                          GTF Myrmidon
+nocreate
$Allowed PBanks:        ( "Katana HR-11" )
+noreplace
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" )
+noreplace

That's why you can use the Katana, but nothing else.
« Last Edit: April 07, 2016, 10:49:59 pm by Solatar »

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
So basically if I want access to the fullest range of weapons I should stick to using the older nightly?

 

Offline Solatar

  • 211
Re: The Lightning Marshall weapon errors
As long as the new behavior isn't broken, it'll just take a quick table edit to fix.  I'm just not sure exactly how to add in +noreplace without throwing a parser error. Either I'm doing it wrong (likely), or it's a bug. If I'm doing it wrong, it's an easy fix once someone who knows what they're doing comes along. Here is the nightly build where the behavior most likely started (it's the last thing in the commit log - bd1aa5e).

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
Regretfully I'm not that tech savvy on the inner workings of SCP/FSO so I'd be a little worried about going in and messing with files myself.    :(

Unless someone else can provide a downloadable table fix for me I'll probably stick to using the older nightly for this campaign.

 

Offline Solatar

  • 211
Re: The Lightning Marshall weapon errors
Does a nightly newer than December 17th, 2015 but older than the most recent work correctly? If I can figure out how to add the +noreplace parameter, I'll post up a fixed table.

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
I haven't found any in that range that worked, sorry.

 

Offline Solatar

  • 211
Re: The Lightning Marshall weapon errors
Put this in the data/tables folder of the Lightning Marshall mod folder (If it's not there, just create it). Name it LM-shp.tbm so it will override the one that's sitting in the .vp.


Code: [Select]
#Ship Classes
$Name:                          GTF Ulysses
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" "Targeting Laser" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Rockeye" "Tempest"  "Hornet" "Tornado" "Hornet#Weak" "Harpoon" "Harpoon#Weak" "EMP Adv." "TAG-A" )

$Name:                          GTF Hercules
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "Infyrno" )

$Name:                          GTF Hercules Mark II
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Infyrno" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "TAG-A" "TAG-B" )

$Name:                          GTF Ares
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "Infyrno"  )

$Name:                          GTF Erinyes
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" "Lamprey" "Circe" "Maxim"  )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Infyrno" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "TAG-A" "TAG-B" )

$Name:                          GTF Loki
+nocreate
$Allowed PBanks:        ( "Katana HR-11"  "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" "Lamprey" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." )

$Name:                          GTF Pegasus
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus R" "Prometheus S" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Rockeye"  "Tempest" "TAG-A" "TAG-B" "Harpoon" "Trebuchet" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." )

$Name:                          GTF Perseus
+nocreate
$Allowed PBanks:        ( "Katana HR-11"  "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Rockeye"  "Tempest" "Harpoon" "Trebuchet" "Stiletto II" "Hornet" "Tornado" "Hornet#Weak" "EMP Adv." "TAG-A" "TAG-B" )

$Name:                          GTF Myrmidon
+nocreate
$Allowed PBanks:        ( "Katana HR-11"  "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "UD-8 Kayser" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye" "Hornet" "Tornado" "Tempest" "Trebuchet" "Stiletto II" "Hornet#Weak" "EMP Adv." "Infyrno" "Helios" )

$Name:                          GTB Artemis
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye" "Hornet" "Tornado" "Trebuchet" "Stiletto II" "Piranha" "Cyclops"  "cyclops#short"  "Hornet#Weak" "EMP Adv." "Infyrno" )

$Name:                          GTB Artemis D.H.
+nocreate
$Allowed PBanks:        ( "Katana HR-11"  "Subach HL-7" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye" "Hornet" "Tornado" "Trebuchet" "Stiletto II" "Piranha" "Cyclops"  "Cyclops#short"  "Hornet#Weak" "EMP Adv." "Infyrno" )

$Name: GTB Medusa
+nocreate
$Allowed PBanks:        ( "Katana HR-11"   "Subach HL-7" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Rockeye" "Hornet" "Tornado" "Trebuchet" "Stiletto II" "Piranha" "Cyclops" "Cyclops#short" "Hornet#Weak" "EMP Adv." "Infyrno" "Rebel Bomb"  )

$Name: GTB Ursa
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Akheton SDG" "Morning Star" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  "Rockeye"  "Tempest" "Harpoon" "Hornet" "Tornado" "Trebuchet" "Piranha" "Stiletto II" "Cyclops" "Cyclops#short" "Helios" "EMP Adv." "Infyrno" )

$Name:                  GTB Zeus
+nocreate
$Allowed PBanks:        ( "Katana HR-11"  "Subach HL-7" "Akheton SDG" "Morning Star" "Lamprey" "Prometheus S" "Prometheus R" "Circe" "Maxim" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Tempest" "Trebuchet" "Piranha" "Stiletto II" "Hornet#Weak" "Harpoon" "EMP Adv." "Infyrno" "Cyclops" "Cyclops#short")

$Name:                          GTB Boanerges
+nocreate
$Allowed PBanks:        ( "Katana HR-11" "Subach HL-7" "Prometheus S" "Prometheus R" "Lamprey" "Circe" "Maxim" "UD-8 Kayser" )
$Allowed SBanks:        ( "TempestS"  "Phoenix-S" "Rockeye" "Hornet" "Tornado" "Trebuchet" "Stiletto II" "Piranha" "Cyclops" "Cyclops#short" "Hornet#Weak" "EMP Adv." "Infyrno" "Helios")

$Name:                          NTD Liberty
$Short name: TCap
$Species:                       Terran
+Tech Description:
XSTR("The NTD Liberty is a modified Orion design, built by the Neo-Terran Front, to counter the Alliance's blockade in Deneb. The Liberty has superior armor and powerful weaponry, which comes at the cost of maneuverability. It seems improbable that so great advantages come at so little cost, which is why Allied Command believes, that the Liberty has a big weakness, which should be exploited..", 3051)
$end_multi_text
$POF file: capital01.pof
$Detail distance: (0, 3500, 9000, 22000)
$Show damage: NO
$Density: 1
$Damp: 0.2
$Rotdamp: 1.5
$Max Velocity: 0.0, 0.0, 10.0
$Rotation time: 180.0, 180.0, 180.0
$Rear Velocity: 0.0
$Forward accel: 20.0
$Forward decel: 10.0
$Slide accel: 0.0
$Slide decel: 0.0
$Expl inner rad: 100.0
$Expl outer rad: 2800.0
$Expl damage: 450.0
$Expl blast: 7000.0
$Expl Propagates: YES                                                     ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed: 600.0                                           ;; speed shockwave expands at, 0 means no shockwave
$Shockwave Count: 5
$Default PBanks: ()
$Default SBanks: ()
$SBank Capacity: ()
$Shields: 0
$Power Output: 100.0
$Max Oclk Speed: 8.0
$Max Weapon Eng: 100.0
$Hitpoints: 200000
$Flags: ( "capital" "big damage")
$AI Class: Major
$Afterburner: NO
$Countermeasures: 0
$Scan time:                     2000
$EngineSnd:       138                   ;; Engine sound of ship
$Closeup_pos:           0.0, 0.0, -2820
$Closeup_zoom:          0.5
$Score:             1000
$Subsystem:                     Turret01a, 1.875, 3.0
$Default PBanks:        ( "BGreen" )
$Subsystem:                     Turret02a, 1.875, 3.0
$Default PBanks:        ( "Terran Huge Turret" "Terran Huge Turret" "Terran Huge Turret" )
$Subsystem:                     Turret03a, 1.875, 3.0
$Default PBanks:        ( "Terran Huge Turret" "Terran Huge Turret" "Terran Huge Turret" )
$Subsystem:                     Turret04a, 1.875, 3.0
$Default PBanks:        ( "Terran Huge Turret" "Terran Huge Turret" "Terran Huge Turret" )
$Subsystem:                     Turret05a, 1.875, 3.0
$Default PBanks:        ( "Terran Huge Turret" "Terran Huge Turret" "Terran Huge Turret" )
$Subsystem:                     Turret06, 0.625, 2.0
$Default PBanks:        ( "BGreen" )
$Subsystem:                     Turret07, 0.625, 2.0
$Default PBanks:        ( "TerSlash" )
$Subsystem:                     Turret08, 0.625, 2.0
$Default PBanks:        ( "AAAf" )
$Subsystem:                     Turret09, 0.625, 2.0
$Default PBanks:        ( "Bgreen" )
$Subsystem:                     Turret10, 0.625, 2.0
$Default PBanks:        ( "AAAf" )
$Subsystem:                     Turret11, 0.625, 2.0
$Default PBanks:        ( "BGreen" )
$Subsystem:                     Turret12, 0.625, 2.0
$Default PBanks:        ( "Standard Flak" )
$Subsystem:                     Turret13, 0.625, 2.0
$Default PBanks:        ( "Standard Flak" )
$Subsystem:                     Turret14, 0.625, 2.0
$Default PBanks:        ( "BGreen" )
$Subsystem:                     Turret15, 0.625, 2.0
$Default PBanks:        ( "Standard Flak" )
$Subsystem:                     Turret16, 0.625, 2.0
$Default PBanks:        ( "AAAf" )
$Subsystem:                     RadarDish01,    2, 0.0
$Subsystem:                     RadarDish02,    2, 0.0
$Subsystem:                     RadarDish03,    2, 0.0
$Subsystem:                     navigation,     5, 0.0
$Subsystem:                     communication,  5, 0.0
$Subsystem:                     weapons,        15, 0.0
$Subsystem:                     sensors,        5, 0.0
$Subsystem:                     engines,        35, 0.0
$Engine Wash: Default900
$Subsystem:                     fighterbay,     0, 0.0

#End

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
What kind of document do I put in in data/tables as?

 

Offline Solatar

  • 211
Re: The Lightning Marshall weapon errors
You can just copy this file directly. It's a .tbm, but they can be opened in any text editor (like Notepad). Attached below.

[attachment DELETED!! by Strong Bad]

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The Lightning Marshall weapon errors
As long as the new behavior isn't broken, it'll just take a quick table edit to fix.  I'm just not sure exactly how to add in +noreplace without throwing a parser error. Either I'm doing it wrong (likely), or it's a bug. If I'm doing it wrong, it's an easy fix once someone who knows what they're doing comes along. Here is the nightly build where the behavior most likely started (it's the last thing in the commit log - bd1aa5e).
As the person who implemented the new behavior, you're doing it wrnog. The +noreplace goes before the list of weapons, not after.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline Solatar

  • 211
Re: The Lightning Marshall weapon errors
So an entry that just adds a weapon would look like this?
Code: [Select]
$Name:                          GTF Ulysses
+nocreate
+noreplace
$Allowed PBanks:        ( "Katana HR-11" )
+noreplace
$Allowed SBanks:        ( "TempestS"  "Phoenix-S"  )

I know it sounds silly, but I can't find a spot to stick "+noreplace" that doesn't cause a parser error on startup. Even if I just add one in between the two lists of weapons, it still throws an error.

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
You can just copy this file directly. It's a .tbm, but they can be opened in any text editor (like Notepad). Attached below.

I tried this and it worked!  I used an April 7, 2016 nightly and weapons are selectable now.

Thank you for your help.

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: The Lightning Marshall weapon errors
So an entry that just adds a weapon would look like this?
No. After "$Allowed [banktype]:", before the list of weapons. It behaves exactly like +noreplace used for ship flags.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
I'm sorry to say I ran into another problem on this campaign.

In the Lightning Marshall 3 mission "Crime Never Pays" your two main objectives are to capture a GTVA traitor and protect the GTCv Escher.  I accomplished both those goals (I protected the SOC transport that docked with the traitors's transport and the GTCv Escher).  Both those ships jumped out successfully.  However, that never registered (I never got "Primary complete 1/2 or 2/2).  I did what the mission wanted me to but it never acknowledged that it actually happened so I failed the mission.

I thought this might have something to do with the new table that I put in so I temporarily deleted it to try it that way...unfortunately it didn't work.

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
I don't know what's wrong (because in the past I've been able to complete this mission okay) but it's really broken now.  I just tried it again and when transport 2 (I let transport 1 get destroyed to see if 2 would work) docked with the traitor's transport and eventually jumped out it now said both primary objectives were failed (even the protect Escher objective which is really weird since the Escher was still alive).

 

Offline CT27

  • 211
Re: The Lightning Marshall weapon errors
The only way I was able to get by that mission was to do the die 5x thing.

 
Re: The Lightning Marshall weapon errors
Hm, on build 3.7.2 RC4 I get all objectives completed in mission LM3_08 "Crime Never Pays", on RC5 or later - not.