-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New mission: Find person #4746
base: master
Are you sure you want to change the base?
New mission: Find person #4746
Conversation
Hey! I think I have a very old branch, where I have a lot of "mysterious" messages that can be delivered. Could that be incorporated in this? (I have not tried this PR or looked at your code yet). Look at EDIT: the reason I never opened a PR on that branch is because the code is just a copy-pase of DeliverPackage, which wouldn't really add any novel game play. |
You can modify: Line 1064 in 0c66156
In order to obtain a "Warning" for missile launch, you should change the "for" to handle Optionally, you can add a method to get the target of |
You're welcome :) If I may, why not to "push" a different string instead of "ship-firing" (in And another thing I would note and could be done here or in a different PR:
Found (and probably a change here will also close #4713) :
...which have an obious fix ;) Though I can't beat it will works well. It's still quite limited even if you let any ship as a target: for example only a single mercenary/pirate will be prosecuted; if you fire back even you will be prosecuted... But at least you can obtain a more realistic behaviour. |
Just an update from my side: I intend to review this (read code, and test play a mission), I'll have time over Christmas, which for me starts now on Tuesday (I had some vacation saved up), so please nag on me if I'm inactive. |
I've just done a fist quick glance, and I note:
I'll get back with more feedback. |
I'll make an icon, not sure when I can get to it though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some comments, mainly suggestions on the en.json file. I see you have many of the strings doubled, to have a female and male gendered sentence. I don't think any other module does that, but I guess that helps with translation for some languages. I've not repeated my comments for both male/female versions of sentences, so I'll leave that up to you.
I have yet to go through the Lua file. I'm curious how a player can find an NPC in a "bar" or "shipyard", or just "anywhere in System X", that the language file seems to suggest should be possible.
8aab57b
to
c2d02f9
Compare
Please do not expect too much! You need a bit of imagination here. ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have yet to go through the actual Lua file, but I've done the en.json / language strings, and glanced over the C++ commit. Perhaps @Web-eWorks, or other team-C++ people could have a quick gander at the commit that implements an Alert Missile Warning state in Ship.cpp:
dc8b031
(I'll get cracking on the Lua file now)
The C++ code looks good to me so far, fairly standard and in keeping with the rest of the code. You'll need to make sure it conforms with our existing style guides as best as possible, but I don't have any objections. ...That doesn't mean I like how the alert system is implemented in general, but that's a complaint for another time, when I have the energy to rip the whole thing out. |
introAm I understanding it correctly, that the format for this mission type is:
(plus chance of being attacked/intercepted) feedbackIf So, it's quite similar to all our other delivery missions, except the player now has to figure out the correct starport? I tried two missions, one to Sol, and another to some other densely populated system, so I really didn't feel like visiting 10-20 stations, so I gave up (sorry). Due to the amount of in-system travel, it might be worth only assigning missions to single star systems, and possibly have the number of stations in it add to the deadline in some way (square root of the number?), or filter out the worst offenders (although that wouldn't be stable if we change our universe to be more densely packed in the future). Maybe only use the N most sparse system within some radius of the BBS? Anyway, these are just some random thoughts/suggestions, you decide if you want to act on them, I'm just pointing out what struck me when I played it. The best would be if any of our players could test this out. (By the way, the new Missile Alert state isn't needed for this PR, right? So anyone wanting to test can just download the lua + json file, and not needing any recompile?) Some more suggested changes:
|
c2d02f9
to
4354969
Compare
I increased the probability of the tipster. After a few stations the player should now know where to go. |
Yes, that should work. |
I'll give it another play through. By the way, something that I thought of, you have a flavour that's very specific, a drone flying into someone's apartment, it just struck me that the more specific a description is, the stranger it will look to see that one twice, or multiple times. I.e. "Hi, I'm X, I want transport to Y" works repeatedly, but "Hi find Y because a drone flew into their apartment" is less general. But perhaps in the future there's serious drone hazard? Anyway, it could be more general by being un-specific about what caused the damaged. or even more general to say property, rather than apartment, but that might be a little flavour less. Anyway, that's just what came into my mind when I read it. |
If that's not worth a headline in a BBS newspaper ... |
OK, I've tested it now. I get tip of which station I should go to every time (3 out of 3) times I land. Maybe fluke? I haven't looked at the code, but I imagine it could be some cumulative probability, i.e. after you landed on 2-3 stations the probability of getting a tip next time you land is close to 100% Just a thought. What probably should be fixed, is that I get tip for station even if I'm not in the mission system. E.g. if I land on a base in Tau Ceti, I get "I heard Jimmy Hoffa is in London". I imagine such information of which starbase they're on to only be "local", in the mission system? |
Is it possible to add options to the other items on the bulletin board with the question of the person you are looking for? |
OK, I really hate it when I do work, get a little feedback, fix it, thinking I'm done, then get some more nitpick feedback, fix it thinking, "OK, now I'm done", and loop continues iterating. Thus I don't want to be like that here. Also, I've seen many PRs die because people suggest to "make it more general", or is some other way expand the scope beyond what the author contributed. Thus, I apologize for doing all of the above now, but I just need to shoot off these ideas:
It's kind of hackish solution, but maybe less so than the current one, i.e. land and you "auto detect" people's presence. Such a button would do best to e.g. engage the lobby-staff in a conversation, and get a box:
They might answer something like:
(If we could engage the lobby in conversation, then the advice/rumor module could move to that as well.) Anyway, my main objection with this module is it's too similar to delivery package / taxi missions / cargo mission, i.e. 1. go to mission system, 2. land on stations until you notice a message on your comms, 3. go back to client's system/station. Although pioneer is more limited than I'd like, in what is possible to do, there are still some interesting modules left to be written:
I realize what I'm suggesting above regarding lobby is way more work, but it would really make this "unique", I think, but, yeah, main work is of course figuring out how to bend that code to this will. I guess other's have to give feedback on how much work that might be. Logs say @vakhoir is the main Lobby-hacker. Anyway, there is that bug I pointed out in my previous post that needs fixing on this PR. EDIT Updated 2025-02-22 after fluffy's comment below reminded me this PR is still open. Checked off many of the boxes above of mission modules we now have in the game. |
Or add a new tab view for a very simple bar e.g. only clickable faces |
@robothauler This is what I've been doing this morning: I need to replace that list with clickable names, that opens an interaction dialogue. Not sure I have the skill to do that, but I'll see how deep into pigui territory I can get. But my thinking was to move advice module, and illegal goods trader into the bar, plus assassination missions, which you get by talking to the people there, a bar would consist of random NPC visitors + permanent "fixers", and shady "Tony Soprano"-characters. Downside with using a bar for finding missing people, is then they're always in the bar, and never found through the BBS. In the original Frontier the BBS adverts weren't modularised like we have it, so their "find missing person" mission worked across all characters in the station, which I guess is the "propper way" (not sure if we can/should do that even in the long run). Today I realized it might make "the most" sense to have the previously described ask-lobby-for-missing-person in the police tab instead? That's not even in pigui, so even more work... |
It seems to me not very difficult to organize a dialogue with any character in the game. with the lobby, the police, the service man, the pilot of another ship. When a certain button is pressed, a communication window may appear, and an event is generated with the parameters of this character, which any script can catch, and add its own dialogue branches to this window. Maybe I'm too optimistic. |
And I would like to clarify about the bar, does the player leave the ship at all? I ask because the entire menu of the station is accessible through the "comms" button. |
4354969
to
fe7e6f8
Compare
90e4530
to
6a3a044
Compare
Instead of asking people to clear bars and add functionality to other areas before allowing new features in, I think it's better to take what is presented with it's current scope. Utilising the persistent character work might be nice, but what really happens is that a new features gets abandoned for 5 years and eventually dropped. |
d219462
to
17d5f56
Compare
@@ -0,0 +1,606 @@ | |||
-- Copyright © 2008-2020 Pioneer Developers. See AUTHORS.txt for details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copyright 2025
Update 5 years laterOK, I've gone through the above discussions to remember what this was about (I've fixed broken link to forum, and updated one of my key posts above). This PR was stalled in part because we were in the process of moving BBS (and police) screens to pigui, which this PR then needs to take into consideration. @robothauler I see you've pushed updated code, I'm very happy to see you're still with us and motivated (enough) to keep this PR alive. Pardon the 5 years in limbo. I see you've put it as a draft release (also new github feature that did not exist 5 years ago). What is the minimum work needed to move this PR to 'active'(non-draft) state? Where do we find missing persons?If I'm to think out loud how we ideally like things to work (not saying poor @robothauler should implement this). Above several possibilities were suggested:
That's the summary of above discussions. @robothauler is this in playable testable state? |
I'm just trying to find out what works and what doesn't. |
It is now in a playable condition again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried one mission, was of type visit some stations, then get tip of where to go, go there, then return. Nice.
Have some additional thoughts:
LSP
I recommend you use a LSP (language server protocol) in your editor (they all support it nowadays, unless you're in Notepad) e.g. on Arch Linux I use lua-language-server upstream source it shows various issues in the code (and gives you variable auto-complete, bells and whistles)
debug info
This is just a suggestion, but for your own sanity (and who ever else will be working on this code), displaying values of internal active mission varialbes to the debug window (Ctrl+i) helps a lot with future development, testing, and debugging, and will pay off in the long run. Look at NewsEventCommodity module code and how it's usied in the debug window (Ctrl+i, click the "i"-icon).
(I know sturnclaw has mentioned grouping mission module debug tabs in some nifty way in the future, but for now it can play nice with the other tabs in the debug window.)
other thoughts
I note there are several different versions of this mission, i.e. quite diverse set of missions, that each will have to be tested. some look to be taxi-missions requiring empty cabin. I've not tested those. (spawning these different types of missions on the BBS could be implemented in the debug window).
local Character = require 'Character' | ||
local NameGen = require 'NameGen' | ||
local Equipment = require 'Equipment' | ||
local ShipDef = require 'ShipDef' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L18 L17, L20 are unused & can be dropped.
|
||
local onCreateBB = function (station) | ||
local num = Engine.rand:Integer(0, math.ceil(Game.system.population) / 2) | ||
for i = 1, num do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mind is foggy, from not coding in a while, but in Python (and according to my lua lint checker) unused variables should be named _
, rather than i
here.
local onShipFiring = function (ship) | ||
if ship:IsPlayer() then return end | ||
|
||
for ref, mission in pairs(missions) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're to do the _
thingy, then there are a bunch of for loops with ref
that are unused from this point forward. Personally, I don't mind as it might be useful for future re-visits to re-write the code.
data/lang/module-findperson/en.json
Outdated
}, | ||
"INTROTEXT_TAXI_FEMALE_1": { | ||
"description": "", | ||
"message": "Hi. I'm {client}. I'm looking for a relative in the {system} ({sectorx}, {sectory}, {sectorz}) system. Her name is {wanted}. Time is very crucial because her mother is seriously ill. Please find her and bring her back to {domicile}. I pay you {cash}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought: it's less weird to see repeated entries on the BBS of a more generic statement than a specific, here the "sick mother" could be "medical emergency in the family", or something similar
data/lang/module-findperson/en.json
Outdated
}, | ||
"INTROTEXT_DELIVER_MESSAGE_FEMALE_1": { | ||
"description": "", | ||
"message": "Hi, my name is {client}. I'm looking for my stepsister {wanted}. She left the family in anger a few years ago. A friend of mine has seen her recently in the {system} ({sectorx}, {sectory}, {sectorz}) system. So I think the time has come for a reconciliation. I pay you {cash} if you can deliver a message to her and return to {domicile} with an answer. Please do it! Will you?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think the time has come for a reconciliation
Nitpick: The "So" word makes it sound like reconciliation follows from someone having seen her/him. I don't know what other's think, but that doesn't follow in my mind. Perhaps "I'd like to see if time (or he/she) is ripe (ready) for reconciliation",
"description": "", | ||
"message": "I don't know. That's up to you!" | ||
}, | ||
"HOW_TO_TAXI_MALE": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flavor response (male/female) has me split. On one hand, I think there should be a hint. Or maybe there is a point in having the player have to experiment (what say you @bszlrd ?). Should there be hand-holding, or throwing out the player in the deep end of the pool? But I'm currently reading the source to figure out what I'm to do. :P
am I to look for a ship in the system, or land at a station and hope someone contacts me, or check crew contracts lists, names in BBS adverts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps have "maybe someone in the system has information?" as hint?
local max_mission_dist = 20 | ||
local typical_reward = 50 | ||
|
||
local flavours = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought for @bszlrd this module has many flavours, perhaps different icons for some/all? of them?
local flavours = {
{ id = "DELIVER_MESSAGE", ship = false, taxi = false, company = false, max_risk = 0.1 },
{ id = "TRAITOR", ship = false, taxi = false, company = true, max_risk = 1 },
{ id = "PRIVATEER", ship = true, taxi = false, company = false, max_risk = 0.75 },
{ id = "DELIVER_DOCUMENT", ship = true, taxi = false, company = true, max_risk = 1 },
{ id = "TAXI", ship = false, taxi = true, company = false, max_risk = 0.1 },
{ id = "EVACUATION", ship = false, taxi = true, company = true, max_risk = 1 },
}
"description": "", | ||
"message": "System:" | ||
}, | ||
"TIP_FEMALE_1": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these tips are quite similar, but never mind. I suggest at least one starts with "I heard you were looking for {name}, I've seen them in X"
if station.path ~= mission.visited[#mission.visited] then | ||
table.insert(mission.visited, station.path) | ||
end | ||
if #mission.visited > Engine.rand:Number(4) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks strange to me. So the strategy is to increase probability of player finding the person based on number of stations they've landed on (good), but there's no mechanism for how many stations there are in the system to land on?
It should not be possible to run out of stations, i.e. when landed on 100% of the stations (or lower), then the probability of finding the person should be 100%. Here, if the system has fewer than 4 stations, they might not be able to find the person?
I have a vague memory of using Bebbington's algorithm [A.C. Bebbington, Appl. Stat. vol. 24, p. 136 (1975).] somewhere in the pioneer code before, it's not exactly applicable in your case, but for inspiration, it sates how to place n
particles on M
lattice sites with equal probability:
- Start with the first lattice site. Choose to occupy that lattice site with probability
n/M
. If the lattice site was chosen to be occupied decreasen
by 1,(n → n − 1)
. ReduceM
by one(M → M − 1)
, and proceed to the next lattice site and occupy with probabilityn/M
etc. Note thatn
andM
changes during the loop over lattice sites.
Going through all lattice sites, 1, ..., M
, using the scheme above results in exactly n
lattice sites being chosen (with equal probability).
Now, in your case, n
might be people to find in the system (n=1
always), and M
be the number of stations, but perhaps replaced with a capped version, M_cap <= M if M is too large (like in Sol).
What I've written might be goobely-gook, but I had it easily accessible so that's where my brain went.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the probability of the tipster! The wanted person always sits in the selected station.
By the way. How about moving the tipster to the BB and letting the player decide whether he wants to pay for the information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the probability of the tipster!
Ah, OK.
By the way. How about moving the tipster to the BB and letting the player decide whether he wants to pay for the information?
Actually, I think @bszlrd (or someone else?) suggested this a while back on IRC. I think, long term, the player should do some action when they land to do the "search", like looking up station listing/logs, asking someone, pressing a button that issues a request for finding person (I imagine police would know, but I think @sturnclaw was not sold on that). Making a BBS advert could be one way, but feels like a solution in the realm "this is what we could implement", rather than "how it aught to be", but that's just my initial thoughts.
Would all stations have a permanent BBS advert where you could ask for a person? (This is what would make most sense for me, if it's a BBS advert). So this would be a new "service" offered on the BBS? You could select person to ask for (if having multiple missing person missions"), they would "check with their contacts, or look up in a computer for instant response"? Would it cost money to ask? Would they advice another station that might know, so player would effectively land on 3 stations? Or the BBS tipster would have the same 25% chance of spawning on the BBS? If so, when player lands they don't really know what to do, as there's just a absence of actionable things to do the "search".
@robothauler Anything more you intend to do here, or should we just merge? (Also, if you're interested in debug power for this module #6085 might be inspirational) |
No, not at the moment. Just merge. Would be great!
I will take a look and start a separate PR later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. Maybe a bit repetitive when you've got a lot of ads at the same time.
"ADTITLE_3": { | ||
"description": "", | ||
"message": "SHIP FOR SEARCH REQUIRED" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some more adtitles/adtexts to spice up the bulletin board would be worth the effort.
Something like:
"ADTITLE_4": {
"description": "",
"message": "MISSING PERSON"
},
---
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 3 are OK, if distinct, but I'm thinking some are unclear if it's a SEARCH AND RESCUE (module) for a ship or searching for a person.
status:
EDIT: Have done first point now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions (I did not duplicate them for male/female flavor).
Do with them as you wish.
{ | ||
"ACCEPTED_DELIVER_DOCUMENT": { | ||
"description": "", | ||
"message": "Very well. The data has been copied." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be "data" & "copied", or "document" and "transferred"/"sent"? Just going by the name of the variable, and comparing it to ACCEPTED_DELIVER_MESSAGE
}, | ||
"ACCEPTED_PRIVATEER": { | ||
"description": "", | ||
"message": "Good. I think you will find the ship very quickly." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"think" or "hope"?
}, | ||
"ADTITLE_1": { | ||
"description": "", | ||
"message": "PERSON WANTED" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PERSON WANTED indicates the PERSON wanted is the pilot/player to do mission, or PERSON is a fugitive, in my mind. If the "PERSON" is the missing one, I'd say "MISSING PERSON". I haven't checked the flavor, which is best. Just a thought.
"ADTITLE_3": { | ||
"description": "", | ||
"message": "SHIP FOR SEARCH REQUIRED" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 3 are OK, if distinct, but I'm thinking some are unclear if it's a SEARCH AND RESCUE (module) for a ship or searching for a person.
}, | ||
"COMPANY_6": { | ||
"description": "Name of a company", | ||
"message": "{name} Special IT Services Foundation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been thinking of splitting out company names to a separate module. I think several other modules have company names. That would also establish which companies are in the game.
No action needed, unless you feel up to doing that now.
}, | ||
"INTROTEXT_PRIVATEER_FEMALE_1": { | ||
"description": "", | ||
"message": "Hi there! My name is {client}. I'm looking for {wanted}. She owes me a lot of money. According to the latest information, she's doing missions in the {system} ({sectorx}, {sectory}, {sectorz}) system. Please tell her my patience is running out. Return to {domicile} for your payment of {cash}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or: "my patience is running thin"
}, | ||
"INTROTEXT_TAXI_FEMALE_1": { | ||
"description": "", | ||
"message": "Hi. I'm {client}. I'm looking for a relative in the {system} ({sectorx}, {sectory}, {sectorz}) system. Her name is {wanted}. Time is of the essence because there is a medical emergency in the family. Please find her and bring her back to {domicile}. I pay you {cash}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time is of the essence because there is a medical emergency in the family
->
Time is of the essence due to a medical emergency in the family
}, | ||
"MERCENARY_GREETING_MALE_3": { | ||
"description": "", | ||
"message": "You want to meet {wanted}? Over my dead body!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "over your dead body"?
More fun, and I think it works?
}, | ||
"PIRATE_TAUNTS_3": { | ||
"description": "", | ||
"message": "You actually went all this way to deliver this stupid message to me? You better get out of here!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer "silly" over "stupid", a word/insult we've not used thus far in the game. "Silly" feels less harsh, more child friendly.
}, | ||
"SUCCESS_MSG_2": { | ||
"description": "", | ||
"message": "Thanks for the service. Your salary was transferred." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd write:
was -> has been
9799bc4
to
1a498bb
Compare
The player has to find a person or a person with a ship and hand over a message. Which means hopping from station to station. Then return, or transport the person back. The ideas are taken from https://forum.pioneerspacesim.net/viewtopic.php?f=3&t=487. I tried to add some surprises like pirates firing missiles or mercenaries who try to intercept if close to the planet.
Unfortunately, merging this will cause two issues.
The missile launch is not detected. No warning.No police action.While 2. can be solved later.
It would be great if someone can take care of 1. e.g. play a warning sound and trigger an event so that other modules can take action.