FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.72k stars 400 forks source link

Escort/transport missions may have empty node as a destination #7497

Open ghost opened 2 years ago

ghost commented 2 years ago

Description Occasionally, escort / transport / haul people missions might end up having empty node as a destination. Which looks borderline silly: the sub arrives, the captain dumps passengers from the hatch, the sub swims away like a boss. Had it reproduced at once with both usual and triggerable-by-conversation (i. e. mudraptor boy) quests. The former's description states that the destination is 'nearest station' - yet the station in question is nowhere to be seen. . .

Steps To Reproduce Synthetic steps to reproduce:

  1. Generate a world map at which the only outgoing route from sub's starting position is an empty, outpost-less node.
  2. Force only escort/people hauling quests availability.
  3. Load the save, schmooze with outpost dwellers, grab quests.
  4. Set sail on a quest of hauling people to nowhere. . .

Version Latest Steam release.

Additional information Do note that Tectamus Linea is an empty node (1st screenie) yet both hauling quests have it as a destination (2nd screenie). 20211126195351_1 20211126195457_1 Due to a series of rather outrageous brain farts, I forgot to write the seed down. . .

StruggleDuck commented 2 years ago

I can confirm this bug does still exist, as I have recently experienced this exact issue, but I unfortunately also have forgotten to save the seed.

Regalis11 commented 2 years ago

Related ticket: https://github.com/Regalis11/Barotrauma/issues/3425

ubertpendragon commented 1 year ago

Continued from #11132

image

Regalis11 commented 1 year ago

The missions can also end up choosing an outpost belonging to the opposing faction as the destination: https://github.com/Regalis11/Barotrauma/issues/11338

itchyOwl commented 1 year ago

Moved to backlog for re-evaluating. I think we should address this somehow.

ubertpendragon commented 6 months ago

Okay so the main issue is:

Mission giver Events (admin NPC) are generated on loading the outpost WITHOUT CHECKING FOR SURROUNDING LOCATIONS. Then the mission uses Locationtype "from => to" to try and apply the rules as best as it can. But if your outpost is surrounded with empty nodes, it has no choice but to send the destination to an empty node location.

The location check in MISSIONS <LocationType from="Start" to="Destination"/> should be on the event and not the mission; or on both, as well as the faction (see above ticket)

Regalis11 commented 3 months ago

Addressed in https://github.com/FakeFishGames/Barotrauma-development/commit/665800bf841e3733ea0c9f0df1799ecb5c1c6a11

Finally fixed escort and cargo missions that lead to locations with no outpost. It seems that we had a field called requiredDestinationTypes in scripted events, which we can use to prevent the mission events from triggering if there's no adjacent outposts. https://github.com/FakeFishGames/Barotrauma/issues/7497

Also added support for configuring the required destination as "anyoutpost", and to make things easier for modders, location types with an outpost can be marked as being excluded from "any outpost" (so if you want to have lets say husk cult locations, you can disable cargo/escort missions into those).