Author Topic: Calling Shield Strength with ship.tbm Question  (Read 1493 times)

0 Members and 1 Guest are viewing this topic.

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Calling Shield Strength with ship.tbm Question
I have a ships.tbm that is modifying shield behavior, to add auto spreading.

The original table just states

“$Shields:                     400” ;;ie nothing about auto spreading.

In my ships.tbm I wanted to add auto spreading to the ship “MyShip” so I have:

$Name:      MyShip
   +nocreate
$Shields:                     400
  +Auto Spread: 0.5
  +Spread From LOD: 2
$Flags:                  ( "auto spread shields" ) +noreplace

This all works great. However, I wanted to know if there was a way that I didn’t have to copy the shield value to my tbm? In other words can I call the tbl value of the shields and then add the auto spread lines?

I know for the lines with the “+” to work it needs “$Shields” first, but is there a line of code or trick to tell the tbm to refer to the original table shield value? I tried “$Shields:                     +noreplace” but that doesn’t work. I am thinking this is not possible, but I figured I would ask!

Thanks!


 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Calling Shield Strength with ship.tbm Question
However, I wanted to know if there was a way that I didn’t have to copy the shield value to my tbm?
No.

But there will be, in the future, when I finally get around to overhauling parsing to add Variants.
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 wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Calling Shield Strength with ship.tbm Question
However, I wanted to know if there was a way that I didn’t have to copy the shield value to my tbm?
No.

But there will be, in the future, when I finally get around to overhauling parsing to add Variants.

Good to know. Ah count me in the people very much looking forward to that variants update!