Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: sigtau on April 25, 2009, 10:12:12 pm
-
I have an Orion class destroyer emerged from subspace. When it emerges, I need to have a directive telling the player to inspect the "unknown" Orion destroyer. Upon scanning it, the cargo appears as "Unknown Personnel." Setting the flag "Scannable" in the ship's misc properties hasn't really made a difference, although the directive seems to be working.
How would I make the cargo scannable? (The Cargo Known flag is NOT enabled for the destroyer)
-
This one comes up over and over and I'm not really positive of this answer so.....
Plan A: You need to give the destroyer cargo.
Plan B: Since plan A may not work so you need to give a subsystem of the destroyer cargo and have the player scan that subsystem. Drawback is there is a open bug report on subsystem scanning. http://scp.indiegames.us/mantis/view.php?id=1677
Plan C: Assuming that you are able to scan the destroyer and are just not getting the cargo just send a message when the scan is complete. So basically add a send-message to the directive event.
-
But I've set the Misc properties as "Scannable" and unchecking "Cargo Known" and closing my distance isn't scanning the ship. What about that?
-
Cap ship scanning is problematic. Even if the cap ship can be scanned you have to be in the right place and pointing the right direction to do it. Same with subsystems on caps. :v: faked it.
-
I just ran a test using RC2. You can only scan subsystems of a cap even if it has cargo and only certain subsystems. I did the test with an Orion.
The strange part is I did not have subsystem scanning on.
Test 2 shows that the subsystem scanning flag actually does the revers of what you think. It makes the whole ship scannable instead of it's subsystems. Still it does not reveal the cargo. Send message would work though.
-
FUBAR has got most of the solution here (I fixed a bug in this code only a couple of days ago so how it works is quite fresh in my mind).
Scanning works like this. If you have a huge ship (destroyer, juggernaut) then you can scan certain subsystems. Otherwise you scan the whole ship. The subsystem scanning flag reverses this behaviour for both types, allowing you to scan subsystems on small ships and an entire huge ship at once.
(When a coder calls a something a toggle it's usually a big clue that the feature has more than one type of behaviour. In coder speak toggle means "What the hell am I going to call this button! It does two different things depending on the circumstances!" Toggle nebula trails is another good example of this. :D )
So it sounds as though you want to use that flag to make the entire Orion scannable.
Test 2 shows that the subsystem scanning flag actually does the revers of what you think. It makes the whole ship scannable instead of it's subsystems. Still it does not reveal the cargo.
Sounds like a bug to me. It's probably the same incorrect assumption I fixed for the cap-subsys-cargo-known-delay SEXP in a different part of the code. Remind me if you haven't seen this one fixed (or at least commented on/Mantised) by this evening.
EDIT : Okay, it's not a bug. Apparently you can only show cargo on Transports and Cargo. Everything else gets scanned/not scanned :wtf:
-
Alright, I'll go ahead and toggle the Subsystem Scan flag.
...
Huh. It worked perfectly. O_o
Well, just being able to scan it will suffice.
-
EDIT : Okay, it's not a bug. Apparently you can only show cargo on Transports and Cargo. Everything else gets scanned/not scanned :wtf:
I noticed that in a mission of mine, I wanted the pilot to scan a wrecked Satis freighter for life signs, and the cargo was supposed to be "Hull Breach." It wasn't that important so I didn't fret.