pioneerspacesim / pioneer

A game of lonely space adventure
https://pioneerspacesim.net
1.62k stars 374 forks source link

Allow ship-to-ship communication in space #3070

Open impaktor opened 10 years ago

impaktor commented 10 years ago

Introduction

Current mission system is very limited. Everything is "deliver x to y" or "go from x to y", since we can only interact through the BBS.

Solution

If we could interact with NPC ships through a dialogue screen that would go a very long way to make it more fun. Pirates could hold you for ransom, you could threaten NPCs, you can have covert meetings in deep space, whisper secrets in the dark, you could communicate with a towing ship when out of fuel, or when the engine is busted (#2691).

It's probably a good idea to also use the same system for talking to crew, and passengers (on a "ship intercom"?), and let them hail you, just as other ships aught to be able to do.

2363 is very much what I have in mind.

impaktor commented 9 years ago

Related: #770

impaktor commented 8 years ago

This used to be #3069, which was split into this one and #3071.

impaktor commented 6 years ago

Intro

This is a further hammering out of the idea presented above. The best way to get something into the game is to actually make use of it right away, and with the search and rescue missions by @clausimu, we have a perfect candidate, paired with @The-EG who is happy to hack on UI/imgui.

Below is my rough sketchy thoughts, which I'll pass on to the community to improve upon. @nozmajner might even do a way better mockup.

(Also: sorry, this probably should be on the dev forum, but I also wanted to ping some people, and it logically fits in here)

Description on UI function/usage

  1. Select target ship

  2. When within range, some greyed out button will be enabled, and the "comms-transfer" window can be opened (note: we might want to have some window where all AI-Player communication happens? Or "captain's computer" shows all this + all F3 screens, each under a separate tab?)

  3. Here, one would see two panels, one for player's (see Ship B, in figure), and one for the AI ship. Each panel might have three tabs (called 1,2,3 below for ascii-art reasons), that shows:

    • commodities / goods
    • crew / passengers
    • ship equipment
  4. To see what's available in the AI ship, one might want to ask that captain basically "what's up for grabs", by clicking the REQUEST LISTING button, so some tabs might be empty, if they only want to trade e.g. goods. (I don't quite know how the API would look for this, but a first implementation would maybe always expose everything on the AI ship?).

  5. You select what, and how much, of each listed item to put in the transfer panel

  6. Here's where I'm a bit foggy on an easy, yet immersive, way to pull this off: how will the AI and player agree that both are content with what is being transferred? Maybe the easiest is to have the AI suggest the transfer, and player just accept it for now? Ideally, one would click SEND, and AI would maybe modify what is suggested, and then player get an "Accept/reject" button?

  7. Bonus/for later: For immersion, the transfer takes some seconds, and there's a little progress bar? (Not shown in mockup, maybe a pop-up window? Will one see how things are incremented up/down between the panels as transfers happen?

   +--------------------+--------------------+
   | Ship A:            | Ship B:            |
   +--------------------+--------------------+
   |-----+-----+-----+  |-----+-----+-----+  |
   |  1  |  2  |  3  |  |  1  |  2  |  3  |  |
   +-----+-----+-----+--+-----+-----+-----+--+
   |                    |                    |
   |                    |  10 hydrogen       |
   |    +---------+     | 144 grain          |
   |    | REQUEST |     |                    |
   |    | LISTING |     |                    |
   |    +---------+     |                    |
   |                    |                    |
   |                    |                    |
   +--------------------+--------------------+
   | Ammount:                       +------+ |
   |        +100 +10 +1 -1 -10 -100 |SELECT| |
   |                                +------+ |
   +-----------------------------------------+
   | Transfer:                               |
   |      <--  10 military fuel              |
   |      --> 100 credits                    |
   |      -->   1 radar                      |
   |                             +----+      |
   |                             |SEND|      |
   |                             +----+      |
   +-----------------------------------------+

(thanks emacs artist-mode!)

Initial purpose

I'm sure a functionality like this will become really handy in the Search and Rescue missions:

Future usage

Down the line, this might be expanded upon:

EDIT: This sure looks interesting: http://fallout.wikia.com/wiki/Barter see video

bszlrd commented 6 years ago

A quick and ugly mockup of how it could function: transferwindow-001

ghost commented 6 years ago

I'm all for it - and would be happy to tweak the SAR missions to this updated ship-to-ship transfer style! I like the idea of having each ship's cargo/comms/passengers on either side with the barter/negotiation/transfer action panel in the middle. As for triggering with F4 - I would say that applies to initiating communications when in close range. But once we have actual ship-ship docking (which I CAN'T WAIT for :wink:), this window should come up automatically.

The-EG commented 6 years ago

I saw some chat about this: I'm game! Unfortunately, my other hobby (brewing beer) has been taking some of my time and I've been letting this churn in my brain a bit before I take off with it, but I have started fleshing out this UI.

That being said, is there any thoughts on a tree view vs. tabs for the different categories?

ghost commented 6 years ago

That being said, is there any thoughts on a tree view vs. tabs for the different categories?

Do you mean the Comms/Cargo/Equipment/Passenger tabs or different categories of commodities that will be exchanged?

The-EG commented 6 years ago

Do you mean the Comms/Cargo/Equipment/Passenger tabs or different categories of commodities that will be exchanged?

Yes, I mean the 4 tabs at the top. Obviously comms would be it's own thing, but the cargo, equipment and (maybe) passengers could possibly be condensed down. Just an idea for thought. I should have something soon that can be played around with in game that might make more sense

Tichy commented 6 years ago

Let me say that this Norton Commander-ish panel mockup for ship to ship transfers is really cool! :)

ghost commented 6 years ago

I think tree view would be fine for commodities and equipment. But conceptually, three different kind of screens would be needed for:

1) Comms Still left and right for each captain. Maybe even a way to barter and exchange money for information?

2) Commodities/Equipment See mockup by @nozmajner above, but with tree view to include equipment.

3) Passengers I don't think they should be traded like cattle or slaves. Money needs to be exchanged, for example if you are shuttling a passenger between ships. But the general setup should not imply you are selling or buying them.

impaktor commented 6 years ago

I don't think we ever discussed or considered tree view. If it's something you want to pursue, then I suspect a minimal working example / mockup would be helpful. I refer to @nozmajner for all design/UI decisions. I assume whatever system is adopted, it will be close to the comming Imgui commodity market.

What puzzles me more is how the API would work from a scripting perspective? At least it's not obvious to me. Maybe one gives a list of what the AI captain considers a "fair price" for each commodity? Maybe that's an optional argument when adding goods to the ship? If it's up for barter then what equivalent base-price value the captain considers it worth? So he wants something close to that value in return? I haven't dug into the Fallout system.

Will AI ships have a barter mode? So when not in transit to a star port for regular trade, they can be set to have an AI that's open to negotiates the price with anyone interested? Would then be modelled as in Fallout.

(Our half used RPG system (see Character.lua) is based on GURPS which I think is what Fallout initially used during development, before they made their own system)

Cyborgscode commented 4 years ago

pls add a "CALL POLICE" button.