Author Topic: Oi! Command! SHUT IT!!!  (Read 3181 times)

0 Members and 1 Guest are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Oi! Command! SHUT IT!!!
Well people (including me) have been asking for this one for ages so I figured it was worth trying.

If you have a mission like Lions Den how can you shut command up while still being able get pilot chatter? Until now you couldn't. The only way to shut up command was to shut down all built in messages. Well now you can. The feature isn't available in FRED yet cause I don't have a clue how to use MFC yet but simply open a mission in notepad look for the value following the +Flags: line and add 262144 to whatever it says there (remember to turn off disable built-in messages or it will do nothing).

You can play it with the build I've added to this topic on recent builds for now but it will be in CVS as soon as I have access. I've included a copy of Into the Lions Den using this feature. The pilots should now warn you about enemy ships jumping in but you shouldn't ever hear a peep out of command.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline Shade

  • 211
Re: Oi! Command! SHUT IT!!!
Hot damn. This is really nice  :yes:
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline Solatar

  • 211
Re: Oi! Command! SHUT IT!!!
Sweet.

Along a (somewhat) similar line of thought, is it possible to set Command to be a ship? Say I was in the area with a destroyer and I wanted "Command" to be aboard the ship or something. I'd want all the automatic transmissions to come from that ship. Is it possible with current stuff/a little hackage.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Oi! Command! SHUT IT!!!
It might be possible but it would probably be simpler just to use the normal messaging system and the send the standard command messages that way.

What I'm probably going to look into next is making it so that you can tell individual ships to shut up. It's very easy to have a flag which shuts up all pilots but I'd rather have it so that pilots can be told to maintain radio silence via a SEXP. As you may notice if you play the mission I included you'll occasionally get a warning from Snipes ship with a different voice from Snipes. It would be much better if you could shut him up and just have Alpha 3 and 4 warn you about new wings.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline bfobar

  • 28
Re: Oi! Command! SHUT IT!!!
Yeah, when you're playing as a vasudan in a FS1 port user campaign, it's really odd to have the FS2 command guy jump in and scream, "Incoming Jump Signature! Hostile configuration!"

Especially when it's a wing launching out of a destroyer's fighter bay. They're not jumping, you're not vasudan, and you haven't even made it out of grade school, Command Guy. What sort of back-to-the-future timewarp crap did the GTVA invent? Quit poking random buttons on that ETAK panel! You don't know what you're doing to the continuum!

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Oi! Command! SHUT IT!!!
What I'm probably going to look into next is making it so that you can tell individual ships to shut up. It's very easy to have a flag which shuts up all pilots but I'd rather have it so that pilots can be told to maintain radio silence via a SEXP. As you may notice if you play the mission I included you'll occasionally get a warning from Snipes ship with a different voice from Snipes. It would be much better if you could shut him up and just have Alpha 3 and 4 warn you about new wings.

If you go that route it might be better to remove the flag, rather than have three different ways of incrementally doing the same thing.
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Oi! Command! SHUT IT!!!
I don't know how easy it would be to do that actually. I can't remove the flag for turning both off since that's used a lot. I was thinking about adding the ability to turn off the radio for ship by creating a new ship property. Since command isn't a ship I've got no idea where I'd put that for them though.

That said doing Command as something other than a mission flag would mean that I could make it SEXP dependent whether they can talk or not too.
« Last Edit: February 20, 2006, 02:00:03 am by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Oi! Command! SHUT IT!!!
I think you can filter messages based on who sent them. If not then ignore my suggestion.

I just mean that it seems a little silly to have a mission flag to just turn off Command if you can do it another way...since if you can get at the data to figure out who's sending the message, you can probably change who the message shows as it's being sent by. Change "Command" to "Terran Command", or "Alpha 4" to "Mary", for instance.

But that's really thinking ahead. ;)
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Oi! Command! SHUT IT!!!
Yeah you can filter them. I'm just wondering where would be the correct place to store the information that Command should keep quiet. I couldn't find a struct corresponding to ship for command to store it in.

Any ideas?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Oi! Command! SHUT IT!!!
Just store it by name

Code: [Select]
struct my_struct{
char original_sender[NAME_LENGTH];
char replacement_sender[NAME_LENGTH];
}

Then check if(strlen(replacement_sender)) to see whether the message should be sent at all. :)
-C

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Oi! Command! SHUT IT!!!
That said doing Command as something other than a mission flag would mean that I could make it SEXP dependent whether they can talk or not too.

You can link mission flags to sexps too, you know.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Oi! Command! SHUT IT!!!
Yeah. I noticed that while poking around today. :)

Pilots should be done via a ship flag rather than a mission flag so that each ship can be set as silenced either directly from the misc properties editor or via a SEXP.

Which brings up another point. I was looking at simply copying and editing the ship-stealthy SEXP code to make the new SEXPs but I've noticed it goes through the sexp_deal_with_ship_flag() function which would mean that I couldn't use it with wings, only individual ships. Is their any reason why Ship-Stealthy has to go through that function or was it just simpler to do it that way?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Oi! Command! SHUT IT!!!
sexp_deal_with_ship_flag deals with setting the flag for all ships for all further SEXP nodes (arguments) for the given SEXP.

Basically you should only use it when:
- You have a SEXP that takes an infinitely long list of ships
- You've already taken care of the other nodes
- You're passing the node location to sexp_deal_with_ship_flag after the other nodes (ie sexp_deal_with_ship_flag(CDR(CDR(n)) )
- You have a ship flag that should be set for parse objects (Ships that haven't entered the mission yet) too.

It might be best to make a subfunction that the main loop in sexp_deal_with_ship_flag calls every time that only deals with a specific ship and use that in your function. You'll have to set the parse object flag if you want to set it in the misc properties editor. (Or if you want to be able to use the SEXP on ships that haven't entered the mission yet) Otherwise you can probably skip the whole sexp_deal_with_ship_flag and just set the flag directly and easily with a for loop.

This whole parse object thing seems screwy...wondering whether it could be consolidated to the Ships array...
-C

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Oi! Command! SHUT IT!!!
The parse object stuff is weird, but it's necessary if you want to set a ship flag before the ship is actually in the mission.