endless-sky / endless-sky

Space exploration, trading, and combat game.
https://endless-sky.github.io/
GNU General Public License v3.0
5.87k stars 1.03k forks source link

Feature request: conditional hails #8379

Open bene-dictator opened 1 year ago

bene-dictator commented 1 year ago

Problem Description

It would be useful for people who like editing and making hails (me...) to have hails that only happen when some conditions are met. Currently using events repeatedly is not feasible because it would bloat up the save file.

I see uses in:

While a lot of people would ignore hails, I think these would go some way into having NPC ships that appear to respond and participate in what's going on instead of telling a joke as they're bombarded by a Pirate Leviathan.

Related Issue Links

Desired Solution

For example:

Alternative Approaches

The problem is that what I suggest above would not fit the current syntax well and would go better with a refactor of the hail system or something like that. Another problem is that configuring hails are already very annoying because a government can only have one set of them at a time for friendly, hostile etc.

Right now it is too late for me to think of better syntax for this so I'll leave it as it is for now, just to give you all an idea of what I was thinking.

Additional Context

No response

Hurleveur commented 1 year ago

We can already do this (sort of) using hail replacements that have conditions. That said its very finicky, so what we could do is have a to display optional node for phrases, simply making it so that they're not taken if the conditions are not met.

reticent-rem commented 3 weeks ago

Mentioned this in discord last week but figured I should also post here for posterity. Another use case for conditional hails/news would be to direct players to available missions in an in-universe way, so the player gets nudges towards available missions that stop appearing once those missions are done.