Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Shivan Hunter on March 02, 2014, 02:35:29 am

Title: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Shivan Hunter on March 02, 2014, 02:35:29 am
Is there a good workaround for this? I also added "$Scannable: YES" to the ship's objecttype via -obt.tbm but that does nothing. There are a number of AI-related reasons I'm not going to use a "cargo" objecttype for this ship.
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Trivial Psychic on March 02, 2014, 08:00:06 am
Are you creating a whole new class or modifying one of the existing ones?  Have you added cargo content to the ship in FRED?

I am assuming that the Scannable option refers to whether or not a ship can carry cargo.  If this is the case, I am surprised to see in the sample default table in the Wiki that the "cargo" and "freighter" classes have this set to TRUE, when it seems that it should be "Cargo" and "Transport".
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Shivan Hunter on March 02, 2014, 01:13:19 pm
I'm not creating a new class (its normal class is "capital" though it doesn't work with others as well), and the ship has cargo in FRED.

The source of he problem is the "cargo" objecttype because I can change the type to "cargo" and it suddenly works - and like I said, using an objecttypes tbm to add "Scannable: YES" to the "capital" objecttype does nothing.
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Goober5000 on March 04, 2014, 11:39:06 pm
There is no good workaround.  You need to make your ship class either "cargo" or "transport", or else mess with objecttypes.tbl.
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Droid803 on March 05, 2014, 12:39:35 am
or else mess with objecttypes.tbl.

using an objecttypes tbm to add "Scannable: YES" to the "capital" objecttype does nothing.
This gives the impression that perhaps the objecttypes setting may be broken/behaviour is hardcoded?
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Shivan Hunter on March 05, 2014, 09:52:25 am
yeah it's hardcoded. I found in a poast (http://www.hard-light.net/forums/index.php?topic=75632.0) that there's a bunch of objecttypes options such as "$Allow Checking Cargo:" (which I assume is what I want), but when I added "$Allow Checking Cargo: YES" the parser complained, so it hasn't been implemented. Looks like antipodes 10 will be The Big Objecttypes Update which is when I imagine all this stuff will be added.

Droid: "scannable" probably does something slightly different than "allow checking cargo" because scanning and checking cargo technically are two different things. idk, FS is weird. Dunno why this is even an objecttypes flag when it could be controlled entirely from within FRED.
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Wobble73 on March 05, 2014, 12:24:25 pm
"scannable" and "allow Checking Cargo" are probably different as you can normally scan subsystems?
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Shivan Hunter on March 05, 2014, 12:47:15 pm
Yes, that's what I just said.
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Wobble73 on March 05, 2014, 12:53:36 pm
I was trying to point out why they are different.
Title: Re: Can't scan cargo of a ship unless its objecttype is "cargo"
Post by: Droid803 on March 05, 2014, 07:34:35 pm
You can normally "scan" ships too but it won't reveal its cargo - will just say "scanned", instead of showing cargo - whatever.
Yeah.