Jump to content

Dynamic Door Filters - set Access Restrictions by attribute, condition etc.


Recommended Posts

So at the moment, doors can have filters based on Duplicant identity, but filters based on property would be really useful!

Because I have a confession: 9 times out of 10 when I set door access restrictions, I don't care if it's Meep, Max or Mi-ma: I just want the dupes with at least 10 operating to access the Metal Refinery and am manually making a list of the duplicants that satisfies that criteria.

Example useful filters:

  • By attribute: "athletics < 5", use the Manual Generator to train athletics. Operating > 10: allowed to go into Metal Refinery.
  • By skill: "Has exosuit training": allowed to access use the Atmo Suits docks.
  • By condition: "absorbed rad dose > 50", allowed to access the rad pills.
  • By schedule: "has downtime": stay in the goddamn sweatshop until it's time to poop and eat.

Implementation (UI):

  • When a door is set to "filtered", access restrictions per dupe are grayed out and set dynamically by the filter instead of the being ticked by the player.
  • The door restrictions would work differently than normal, the arrows could be set to one of three states: always allow, always forbid, respect filters.
  • Filters would apply to both directions, but one or both directions can be overridden on the door: setting both directions to allowed/forbidden functionally disables the filter.
  • As an example, say you want duplicants to train if their athletics is less than 5. The door to the gym can have entrance set to "respect filters" (athletics < 5), while exit is to to "always allowed", so after a duplicant has "graduated" they are allowed to leave instead of being trapped forever.
  • A filter would be set a lot like an automation sensor: choose the attribute, choose the comparison operator, choose the value. For skill it'd just be choose the skill, choose has/has not.

Implementation (Internal):

  • The dumb and probably good enough way, is to just iterate over every door once a second, and test the filter against every duplicant, in other words the complexity would be N(doors) * N(duplicants). This would probably be fine unless the player decides to make 100 duplicants and 1000 doors with filters set, but there are plenty of dumb things players can do to destroy performance.
  • By just using the filters to automatically set the Access Restriction per dupe, pathfinding and such doesn't need to be touched at all.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...