Page 1 of 3
Ship-to-Ship Comms OXP
Posted: Mon Jul 28, 2014 3:40 pm
by Zireael
My latest idea has been to port over Kaks' old
Comms Demo so that it uses a combination of MFD [to display comms] and primable equipment [to choose answers].
We already have an OXP which combines a primable equipment and MFDs: [wiki]CommsLogMFD[/wiki]
/And after Kaks's stuff is ported, we could expand on it!/
I could probably make the mode switch pick messages like that:
https://www.dropbox.com/s/rxl5cfs8ag5s7 ... mms_mfd.js
The main problem is that I'm unable to test anything (computer I'm writing from won't run Oolite) so I'm shooting while blind.
How do I restrict the mode (answer picker) so that
1) there has to be a target checked? something to do with player.ship.target?
2) it displays limited options depending on the stage we're in?
3) How do I change the text displayed on the MFD? the CommsLogMFD uses sender, message in the relevant function but I guess they are inherited from the core comms functions, and I need to use the target and set the message manually every time.
HELP?
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 1:36 am
by phkb
Some messages might not require a target (eg "Someone help me! I'm under attack!").
I suspect some of how the MFD might work will depend how we want the functions to work. Let me put an idea forward:
Code: Select all
BroadcastComm MFD:
>> (wideband) Help me! I'm under attack!
(wideband) Is anyone going to {destination}?
(target) I surrender!
(target) Drop 5 ton of cargo
(target) Insult
(target) Send greeting
Then, the primable equipment mode (b) moves the ">>" from one message type to the next. Activate (n) would send out the comms.
The available "(target)" message types could be restricted based on threat status. If they're firing at you, you probably don't want to send a greeting. If they're not firing at you (yellow dot on scanner), you might want to be able to issue a "Drop 5 ton of cargo" message.
If no target is currently selected, only the "(wideband)" options would be visible. In condition yellow, the default option would automatically be set to "(wideband) Is anyone going to {destination}?", but only if a destination is currently set. Otherwise there would be no default set. In condition red, the default option would automatically be set to "(wideband) Help I'm under attack".
If a station is targeted, it might be possible to add "(station) Request permission to dock", and do the "Shift-L" function, mainly for completeness sake (not because I think this would be an inherently better method).
It might be useful to work out a way to change the "Drop 5 tons" to another amount. A Ship Interface screen would certainly do it, but possibly adding another piece of primable equipment that just changes the value.
To make this as easy as possible, it would be ideal to keep the number of possible comms to less than 10 (that being the total number of lines in an MFD), which I think is preferable just because scrolling an MFD would be awkward during a battle.
Some questions for the devs (or someone who knows more about the inner workings that I do):
1. Can the player ship "surrender"? eg. Player is offender status and comes under fire of GalCop Vipers. Could a "surrender" message get the Vipers to say "Get to the station and pay your fine"?
2. Can other NPC's respond to an SOS from the player? Or a request to drop 5 tons of cargo?
3. At what point do NPC's decide to attack the player, or at least be hostile towards the player? Is it decided during population? Does it change during play? The reason I ask is that if the player sends a greeting to a NPC, and the NPC responds with "Greetings, Commander Jameson!", and moments later starts attacking the player, some immersion might be lost. It would be better to have no response come from the NPC in this scenario. (And thinking this through for a moment, it might be better to only have responses to greetings in a random number of circumstances, so the comms message can't be used to determine if someone is hostile or not).
For everyone else, what sort of comms would be useful for these scenarios, and what sort of responses would you expect?
- - Target (non-hostile)
- Target (hostile)
- Thargoids
- GalCop vessels
- Navy vessels
- Wideband (non specific target)
- Stations
- Space bars
- Hermits
- Other types?
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 1:36 am
by phkb
By the way, Zireael, I'd be happy to work with you on getting this up and running.
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 5:37 am
by Neelix
phkb wrote:
3. At what point do NPC's decide to attack the player, or at least be hostile towards the player? Is it decided during population? Does it change during play? The reason I ask is that if the player sends a greeting to a NPC, and the NPC responds with "Greetings, Commander Jameson!", and moments later starts attacking the player, some immersion might be lost.
I don't think so. Being about to kill someone is no excuse for poor manners or being unpleasant.
phkb wrote:
For everyone else, what sort of comms would be useful for these scenarios, and what sort of responses would you expect?
- - Target (non-hostile)
- Target (hostile)
I've frequently wanted to send something back to pirates telling me they just want my Cargo with something along the lines of:
"I want my cargo too, so it seems we are at an impasse"
Ooh.... that gives me a idea, I'd love something that let me drop selected Princess Bride quotes! "You killed my father, Prepare to Die!"
- Neelix
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 5:58 am
by phkb
Maybe we should provide a set of character responses. You want to sound like Inago Montoya -- here's a version for you. You want to sound like a pirate (eg "Arrr...Be gone with ye!") -- here's a version for you. You want to sound like Yoda ("5 tons of cargo give you must") -- here's a version for you. If we put all the text into a missiontext.plist file that would be easily achievable.
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 6:06 am
by Neelix
phkb wrote:Maybe we should provide a set of character responses. You want to sound like Inago Montoya -- here's a version for you. You want to sound like a pirate (eg "Arrr...Be gone with ye!") -- here's a version for you. You want to sound like Yoda ("5 tons of cargo give you must") -- here's a version for you. If we put all the text into a missiontext.plist file that would be easily achievable.
Ooh nice... and you could make the personality selectable via the interfaces screen or I suppose though OXP Config.
- Neelix
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 6:08 am
by cim
phkb wrote:1. Can the player ship "surrender"? eg. Player is offender status and comes under fire of GalCop Vipers. Could a "surrender" message get the Vipers to say "Get to the station and pay your fine"?
The player can surrender (currently handled implicitly by the game by watching for the player appearing to flee, or in the case of surrendering to pirates, explicitly by dropping the requested cargo)
For an explicit "surrender" to AIs which support it I would first check that the player is credibly surrendering (maybe even make them disarm their weapons first?) and then remove the player as the primary target and from the defense target list of any ship which accepts the surrender. (In certain cases, this may result in the ship instantly retargeting the player and resuming the attack - some people just want you dead...)
phkb wrote:2. Can other NPC's respond to an SOS from the player? Or a request to drop 5 tons of cargo?
Yes. For a SOS, call the
distressMessageReceived
event handler on the scripts and AI scripts of all nearby ships. For piracy ... it's a little more complicated, but you can do it for ships with JS AIs (only traders will care) by setting a particular parameter within their AI (or, currently, implicitly by shooting at them).
phkb wrote:3. At what point do NPC's decide to attack the player, or at least be hostile towards the player? Is it decided during population? Does it change during play?
How an NPC perceives a player is determined on creation of the NPC (copied from the NPC's group leader if one exists; selected randomly from the player's "equivalent role" list if not). The perceived role won't change during play, but the response might change for other reasons (e.g. police/hunters mostly check the player's bounty, not their role, when deciding whether to attack)
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 6:33 am
by Neelix
cim wrote:How an NPC perceives a player is determined on creation of the NPC (copied from the NPC's group leader if one exists; selected randomly from the player's "equivalent role" list if not). The perceived role won't change during play, but the response might change for other reasons (e.g. police/hunters mostly check the player's bounty, not their role, when deciding whether to attack)
I think that's my biggest issue with the Comms Pack A comms chatter actually... all the chatter coming from NPCs seems to be based on a preconceived assumptions of my role, without any consideration given to my behavior or the current circumstances,
or where they do react to circumstances, disregarding their own previous behavior or attitude... Having someone who's just come at me gun's blazing and fully expecting me to die then turn and run with the words "you wouldn't kill me for just a few credits would you?" seems somewhat out of place.
Similarly I find it very hard to believe it when an NPC claims to surrender, while simultaneously firing a missile at me.
Perhaps I'm looking for an unreasonable level of complexity.. *shrugs*
- Neelix
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 8:43 am
by phkb
I'd like this pack to actually make a difference in the players world. That is, if you send a message to a NPC it has an impact. For instance, if a "taunt" message is sent to a previously non-threatening NPC, maybe there's a chance the NPC will attack. Maybe they'll ignore you, or even respond in kind.
Some messages are going to just be flavour (like sending anything to a Thargoid). But I'd certainly be aiming for most of the message options to actually produce a result of some sort.
My ambition may outstrip my abilities, though. I'll start putting a demo together with Zireael and we'll see what we can come up with.
cim, thanks for the pointers. That helps a lot. I'll undoubtedly have other questions the further into this I go.
Neelix, for the initial release I might limit it to one persona, but what might be possible is to have downloadable personas. We'll see how we go.
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 8:59 am
by Neelix
phkb wrote:
Neelix, for the initial release I might limit it to one persona, but what might be possible is to have downloadable personas. We'll see how we go.
That makes sense.
Thinking on this I think it would make sense to have a selection of default messages and offer personality packs but encourage the player to fill in their own selection of messages to match the various situations.
- Neelix
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 9:15 am
by Zireael
Pkb, I've already replied to your PM, collaboration is welcome.
I didn't think of the wideband
but all ideas are great. Let's just stick to making the basic pack work, let's say 2 wideband messages and a set of targeted messages (demand money, demand cargo, insult, whatever) with say 2 NPC replies for each and possibly 2-3 variants of the message that the player picks.
One it gets off the ground, we can expand on it pretty indefinitely.
Same applies to Cim's Communications Pack A - once I'm back at my own computer, I might make a Pack B to complement it
Re: Ship-to-Ship Comms OXP
Posted: Tue Jul 29, 2014 5:42 pm
by dertien
Awesome idea, waiting for this one.
Re: Ship-to-Ship Comms OXP
Posted: Wed Jul 30, 2014 1:36 am
by phkb
My first specific question: Is it possible to send a message to a station requesting permission to dock? Essentially simulating pressing the Shift-L key when a station is targeted.
I can see there is a "stationReceivedDockingRequest" event handler, but I think that's after the request is received. It doesn't initiate the request.
There also appears to be a "requestDockingInstructions" method, but it seems to be relating to flight instructions, rather than docking clearance.
Am I missing something or is this "a bridge too far"?
Re: Ship-to-Ship Comms OXP
Posted: Wed Jul 30, 2014 6:02 am
by cim
Calling requestDockingInstructions()
when the ship is not yet in the station's queues is how NPCs request clearance (and the player, through the plist AI equivalent, when on autopilot)
I haven't actually tested just calling it on the player ship when not on autopilot, but it might work. I suspect it would end up with the station expecting to the player to use the autopilot docking procedure rather than the manual flight one, though.
Re: Ship-to-Ship Comms OXP
Posted: Wed Jul 30, 2014 9:52 am
by phkb
Thanks cim, I'll give it a try and see what I find.
Another issue: I'm using shipTargetLost to track when the players target disappears out of range, which works fine. However, the event doesn't appear to fire if the target disappears down a wormhole. How can I determine if the target vanishes via a wormhole?