Shuttle Reservation System Users Manual

Shuttle Reservation System Users Manual

Goals Of This Mod

This mod was built to give Shuttle Hubs and Shuttles smarter and optimized intelligence around colonist transportation and resource distribution.

This mod also introduces a few options to give the user more control of how shuttles make decisions and operate. These controls allow for fine tuning of deliveries.

The smarter A.I. results in a significant reduction of flight time, fuel usage and busy conditions for shuttles allowing you to move more with greater efficiency.

Shuttle Reservation System A.I is here - SRS A.I. - Link

Optionally team this mod up with the following two mods:

Faster Warehouse - Link

Extended Relocation Info - Link

Terminology

The following terminology is used in this manual:

Hub: The shuttle hub that all shuttles belong to.

Udepot: A universal storage depot storing 180 units of one type of resource.

Mechdepot: A mechanized mass storage depot

Multi-Udepot: A universal storage depot storing 30 units of each type of resource.

Dump Site: The dumping site for Waste Rock.

Mysterydepot: A universal storage depot storing mystery resources like black cubes.

LR Task System: Also known as LRManagerInstance in the code is the global task system responsible for long range tasks.

Demand Queues: These are the internal queues for all depots that are asking the Task System for something.

How Shuttle Hubs And Shuttles Work

Why do I need to know this?This section is a brief primer describing how shuttle hubs and shuttles work. It is important to understand these basic game mechanics to also understand how the A.I. changes them.

LR Task System

There is a task system called LRManagerInstance. It is responsible for long range (hence the LR part) movement of colonists and resources, when colonists can't walk the distance, or local drones can't move the resources.

Shuttle Hubs and Tasks

Shuttle Hubs that have their assigned shuttles still in the hanger bay will regularly ask the LR Task System if there is any task it can do. Once it finds one, it assigns a shuttle to do it. The hub only assigns tasks to shuttles in the hangar bay.

Shuttles and Tasks

Shuttles get their initial instructions from the hub they belong to. Once they get launched they are fully autonomous as long as they have fuel.

Shuttles that are idle and still in flight, will ask the LR Task System if there is any other task it can do. If it finds a task it can do it will proceed as normal and continue to do more tasks as long as it has fuel. If there are no more tasks it goes back to its home hub hangar.

Once a shuttle runs out of fuel, it goes back to its home hub, refuels and waits for the hub to give it another instruction.

New Built In Shuttle Hub Controls


Shuttle Reservation System Users Manual image 29
Shuttle Reservation System Users Manual image 30

You may have noticed the new built in hub controls for Gagarin.

I am honored that portions of my mod have made it into the game. These controls are identical to the controls of Shuttle Reservation Systems A.I. controls around reservations for colonists or resources.

Technically you can use either or. The mods controls or the built in ones. I have added some code around SRS's reservation system to disable the code of the built in game controls, if you use the mods controls. This is purely to prevent user confusion from wondering which control is the active control.

When SRS reservation is set to Colonist, Resources, or Normal, the built in controls are disabled and the button is greyed out. If you set the SRS reservation controls to Disabled, then the in game controls are enabled and active.

Just pick one, they work the same. I prefer my code.

BTW, that icon in the screenshot, may change. It seems like just a placeholder for the devs.

Reminder, this is separate from the Delivery A.I. which can be controlled separately from the reservation system, mod or in game controls.

How Depots Work


Shuttle Reservation System Users Manual image 39

Normally if you have a depot around some buildings and a drone controller in the area, the depot has one demand queue. If it runs out of a resource and a drone controller needs that resource a demand for the amount of resources is put into the depots' queue and the Drone Controllers Task System will attempt to fill it. If a drone can fill it, it will, if it cannot, the task is given to the LR Task System (if hubs are built) and a shuttle is dispatched to fill it.

Setting the depot to a minimum desired amount as in the example to the right (100) causes a second demand queue to be added to the depot. Not only will a demand be generated for the building in need but a second demand will be generated to fill the depots' desired amount.

Depots with zero desired amount set do not get refilled if a drone controller (drone hub or rc controller) is not in range of the depot.

Shuttles will take from that depot but not deliver to that depot.

If a depot has no controller in range and the desired amount is anything other than zero then shuttles will deliver (and take) resources to that depot.

Mystery DepotsWhats a Mystery depot? If you are playing a mystery that provides some sort of additional resource then a new type of storage depot will be available in the build menu once that portion of the mystery executes.

Examples are Black Cube storage depot and Curetatoe storage depot. There are a few more.

These are the same as a regular Udepot. All the same rules and controls set in this guide apply to these as well. Just keep that in mind.

Waste Rock Dump SiteThe dump site storage is nothing more than a fancy storage depot that holds one resource, Waste Rock. Gagarin Patch now allows for Shuttles to pickup and delivery to waste rock dump sites.

For the purposes of this guide, as well as Shuttle Reservation System's A.I, Dump Sites are treated exactly the same way as single resource universal depots. Anyplace in this guide you see Udepot you can safely assume it also includes the Dump Sites.

New Depot Shuttle Access Controls


Shuttle Reservation System Users Manual image 51

You may have noticed some new controls in every depot that have a shuttle on it.

These controls are depot specific. You can click it to disable or enable shuttles access to/from the depots based on this setting. A setting of on allows shuttles access to pickup or deliver. A setting of Off disallows shuttles from picking up or dropping off to the depot.

These settings work with the built in hub controls or with Shuttle Reservation System's Advanced Delivery A.I.

Just keep in mind there are more rules in the SRS Delivery A.I. than with the base game, and these rules will take effect with these depot controls as well.

Being blunt here, this control on the depot has one function. Using it can make the shuttles ignore your depot. If this is the effect you want then go for it.

You can literally shoot yourself using this depot control if you are not thoughtful in their applications.

Remember the rules, read below.

Screwy Shuttle Behavior


Shuttle Reservation System Users Manual image 60

I use the term screwy here because its been called worse on the forums.

This behavior is also exhibited by drones at times.

Example

Take the following example:

You have a large colony with several outposts far away from each other so that drones cannot distribute resources among them.

You have a shuttle hub and the shuttles normally pickup a resources from one depot and move it to a depot that is in need of a refill of a resources. This is called demand.

If that where it and things worked this way, this mod would not be needed.

But the screwy nature you may have noticed is after one or more shuttles drops a resource on the depot that is in need, a different shuttle comes by and grabs the new resources and moves them someplace else, maybe even back to the original depot it came from.

This happens often with resource depots, especially when you have many of them scattered around a large colony.

CausesThere are several causes that create this screwy behavior. I address them here.

This is for shuttle behavior. Drones and colonists are not addressed in the A.I.

Desired Amount Settings

The number one reason why this happens is improperly setting desired amount in a depot.

Setting a desired amount greater than zero adds a second demand queue in the depot.

Normally if you have a depot around some buildings and a drone controller in the area, the depot has one demand queue. If it runs out of a resource and a drone controller needs that resource a demand for the amount of resources is put into the depots' queue and the Drone Controllers Task System will attempt to fill it. If a drone can fill it, it will, if it cannot, the task is given to the LR Task System (if hubs are built) and a shuttle is dispatched to fill it.

Setting the depot to a minimum desired amount as in the example above (100) causes a second demand queue to be added to the depot. Not only will a demand be generated for the building in need but a second demand will be generated to fill the depots' desired amount.

Here is where things get screwy. Shuttles will try and continuously fill all demands with resources from other storage locations if resources are available in other storage locations. If those other depots also have demands then another shuttle may come by and steal resources from the first depot to fill the second. That is when you see multiple shuttles moving resources around for no good reason. Screwy huh? It stops when all the demands are filled or you run out of fuel.

Zero Desired Amount Settings

This means you haven't set any desired amounts on any depots, so only local demands from controllers are in effect and one demand queue is present.

You don't see screwy behavior? Congratulations for having enough resources in your colony to fill all the demands. The behavior is quite evident when not enough resources are in your colony to fill these demands.

It is exasperated by setting total desired amounts on depots higher than what is in stock or when the basic demands (Zero Desired but there is a demand) are higher than what is in stock.

Colonists Cause Flight Issues Too

Unchecked, dumb A.I. delivery behavior is just one thing that causes shuttles to be screwy. Colonists can add to the misery as well.

The following is how the default LR Task System decides which task to assign a shuttle:

- Shuttle (or hub) asks the LR Task System for a task

- If a colonists needs transport a colonist task is assigned.

- Once done with that task the shuttle asks for more.

- If the shuttles' last task was a colonist task, then a resource task is assigned.

- If the shuttles' last task was a resource task, then a colonist task is assigned if it exists.

- If no colonist task, then assign a resource task.

- Repeat if more tasks, go home if out of fuel or no more tasks.

As you can tell from the above, this is a poor round robin type load balancing when there are both resource and colonist tasks to perform.

This causes shuttles to become inefficient if lots of resources tasks are waiting and there are colonists that want a transport.

The situation is exasperated when you have lots of domes far away from each other and colonists wanting transport.

This would not be so bad if colonists didn't move around so much, several variables in your current game will severely impact performance.

Colonists change their minds - A colonist wants a transport, a transport is sent, the colonist changes their mind, either on the ground or in flight. A new shuttle must take them back.

Colonists searching for housing or work - They ask for a transport to relocate only to find the destination dome has neither, so they want to go back and find their old home not available, so they start searching more domes. All this means, more colonist shuttle tasks.

Change in dome filters - You change dome filters and cause mass migrations.

Colonist A.I. mods - You have a colonist A.I. mod that forces colonists to move/migrate/change jobs. These A.I.'s contribute to creating more colonist tasks.

Fix this by dedicating a hub as a Colonist Reservation and build more hubs set dedicated to Resource Reservations.

How This Mod Works


Shuttle Reservation System Users Manual image 102

Once the mod is loaded and running you will see new button sections in every Shuttle Hubs' information panel.

There are two button sections.

The first is called Reservation. This button section controls how the hub and assigned shuttles respond to task requests.

The second is called Resource Delivery A.I., this button section controls turning on or off the resource delivery A.I. for the hub and assigned shuttles.

Setting Resource Delivery A.I. will significantly improve handling and performance of shuttles delivering resources and allow you to manage resource stock efficiently.

Having at least two hubs, one set for Colonist Reservation and one set for Resource Reservation will significantly improve performance task decision making of shuttles dedicated to those tasks.

You can monitor this by watching the hubs and seeing how many in flight shuttles there are and how heavy the workload is. Both should go down as workload settles down and the new A.I.'s are working.

Shuttle Reservations


Shuttle Reservation System Users Manual image 111

Shuttle Reservations are set by clicking one of the options in the reservations button section.

Left click on the button section to toggle between the three states for the Shuttle Hub reservation mode of operation.

Right click on the button section to return the Shuttle Hub to normal operation.

The icon will change color and the text updated to show the mode of operation.

The reservation is set for both the shuttle hub and its own assigned shuttles.

Reservation: [NORMAL] - Icon is Blue

This setting is the default setting for all Shuttle Hubs.

The Shuttle Hub and its shuttles will operate normally assigning any tasks to any shuttle.

You can optionally set the Resource Delivery A.I. on in this mode, and hubs and shuttles that have a resource task will use the new Resource Delivery A.I.

Reservation: [COLONISTS] - Icon is Green

This mode sets the Shuttle Hub and its shuttles to look for Colonists attempting to relocate to a far away dome and ignores any Resource tasks.

A hub (and shuttles) set for Colonist reservations will turn off Resource Delivery A.I. for the hub and its shuttles. No need for it.

Reservation: [RESOURCES] - Icon is Purple

This mode sets the Shuttle Hub and its shuttles to look for Resources that need to be moved and ignores any Colonists asking for a ride.

You can optionally set the Resource Delivery A.I. on in this mode, and hubs and shuttles that have a resource task will use the new A.I.

Reservation: [DISABLED] - Icon is Greyed out

This mode disables the Shuttle Reservation System and returns control of reservations to the built in game controls. Delivery A.I. is unaffected in this mode and will continue to work as set.

Changes to the reservation system mode are immediate. Shuttles will finish their current task before abiding by a new reservation system setting.

Changes to the Resource Delivery A.I. mode are immediate. Hubs and shuttles will immediately use either the games built in A.I. (OFF) or the new Resource Delivery A.I. (ON).

Caution: if you set all your shuttle hubs to Resource Only, no colonist pickups will happen. Same thing for all Colonists reservations.

When to use shuttle reservationsIn the Optimal Game Play section below I detail an optimal strategy.

Shuttle reservations make sense when the colony is spread out, or has lots of colonists wanting shuttles to move around.

Resource Delivery A.I.


Shuttle Reservation System Users Manual image 135

The resource delivery A.I. is a new A.I. that handles resource delivery in a better, streamlined, and optimized mode.

It does not affect colonists transport.

It does not apply to drones.

The default setting is OFF which sets the shuttles to use their own default A.I. to figure out resource delivery.

Turning this setting on will set all shuttles that belong to the hub to use the new Resource Delivery A.I.

New A.I. Statistics ScreenYou will immediately notice a new A.I. screen appear under the A.I. selection button.

Three important items show when the A.I. is turned on for the Shuttle Hub.

The two botom lines are the statistics from the day from hour 00:00 to 23:59, resetting at 00:00 again.

They show the most delivered resource and the second most delivered resource.

This is helpful to show you if you need to augment that far away dome with a transporter or build that extra electronics plant locally, etc. Refer to it throughout the day to check in on you shuttles.

The states are totals, so you just need to click one of the hubs to see everything.

Delivery Optimization Mode

This refers to the two modes the A.I. works in.

Enabled means both the Supply A.I. is working and the Demand A.I. is working. This is the default.

You can turn off the demand optimizations through Mod Config Reborn.

So what are the two modes?

Supply Mode is the traditional A.I. that this mod has been running for years now. This A.I. governs how distribution from Mechanized depots will work and optimizes those deliveries. Read below for how it works.

New: Demand A.I.This is just for the Mechanized depots. What it does is prevent the back and forth swapping of stock by multiple shuttles at the Mechanized depots. In a nutshell, if a mechanized depot has enough stock in its large stockpile to service all the demands from around the colony, then dont send a shuttle to stock the little pad in front when it dips below the normal supply on the pad, grab it from the big stock instead. Simple, yet effective, and if the mech depot truly needs some stock from someplace else, then the A.I. will send it.

By default both are on, showing the word Enabled. Turning off Delivery Optimizations in Mod Config Reborn then leaves just the Supply Optimization routines running.

How the Supply A.I worksPlease refer to the terminology section if one of these terms is new to you.

The new A.I. uses several parameters to decide where it grabs a resource from to satisfy a demand somewhere in the colony.

Order of Preference

Mechanized Depot (Mechdepot)

Space Elevator

Single Resource Universal Depot (Udepot)The A.I. will prefer to use a Mechdepot most of the time.

For a Mechdepot to qualify it must not have a desired amount set (zero) and it must have at least 1 resource in it.

If you have more than one qualified Mechdepot, the A.I. selects the one that is that is either closest to the demand or the closest to the shuttle for pickup.

If you have a qualified Mechdepot with resources in it then a Udepot for that resource is never used.

If you do not have a qualified Mechdepot for the resource a Udepot will be used.

For a Udepot to qualify for resource pickup it must not have a desired amount set (zero), and it must have 16 or more of that type of resource in stock.

If you have more than one qualified Udepot, the A.I. selects the one with the most amount of resources in it. Why a minimum of 16? That is so the Udepot keeps a few resources reserved for local drone use and does not compete with demand from Multi-Udepots. A Mechdepot has no such constraint.

The A.I. prevents shuttles from picking up resources from any Multi-Udepots.

The space elevator is used by shuttles when a delivery is on it. A shuttle will decide if the resource is closer to itself or the demand destination to grab it or use the Mechdepot or Udepot instead.

Deliveries, Demands and DesiresDeliveries and Demands

The A.I. will allow shuttles to deliver resources to any depot with demand, including Multi-Udepots, Udepots, Mechdepots, or Space Elevator (for rare metals export only).

Remember the A.I. will never take from Multi-Udepots.

Read the section How Depots Work to understand demand.

Desires

Setting a desired amount more than zero causes that depot to have a second demand queue for itself. If you set a desired amount in any depot then it is disqualified from being used as a source to pickup from for a demand.

Shuttle Access Controls on Depots

Shuttle Access controls on depots turn shuttle access on or off. Off disallows shuttles from any access pickup or delivery. On allows access, pickup or delivery.

Empty Depots or Low ResourcesThe following assumes Resource Delivery A.I. is turned on.

What happens if all my Mechdepots are empty? See above, a Udepot will be selected.

What happens if all my Mechdepots are empty and my Udepots have less than 16 of a resource? Then the shuttles will not delivery any of that resource.

What happens if I dont have a Mechdepot for a particular resource? It is the same as having an empty Mechdepot, see above.

What happens if I dont have a Mechdepot or a Udepot of a particular resource? Then shuttles will not deliver that particular resource.

What happens if I dont have a Mechdepot and stored amount of all Udepots of that resource drops below 16? The shuttles will not deliver that resource.

What happens if my resource depots all have desired amounts set? Its the same as having none of those depots, shuttles disqualify depots with desires as a source for pickup.

Resource Delivery A.I. Rules At A Glance

This section is a quick overview of the rules of the Resource Delivery A.I. so it can be referred to quickly after you read the details section.

Order of preferenceMechdepot if it has one or more of a resource in demand.

Single resource Udepot with the largest quantity of the resource

** Space Elevator is an exception and is always available for pickup if something is on the receiving dock.

Disqualified from being a source for pickupAny multi resource Udepot

Any depot with a desired amount higher than zero

Any UDepot with less than 16 of that resource

Any depot with Shuttle Access Turned Off

Load balancing depotsOnly Mech depots will attempt a load balance in which shuttles are allowed to figure out whiich one makes more sense to pickup from, if you have more than one of a pareticalr resource mech depot.

Optimal Game Play Strategy

Using the new Shuttle Resource Delivery A.I. offers many advantages for game play. You will certainly be able to tailor the following strategy to your unique game play.

Below is the optimal strategy to use for Reservations:

If you have lots of colonists and/or they are spread out not within walking distance and if you can build two Shuttle Hubs, dedicate one for Colonists and the other for Resources. If you need more Resource deliveries then build another dedicated Resource Shuttle Hub.

You can start with the minimum shuttles in each and increase them as your demands increase or build more of either type.

If you don't have lots of colonists or they can walk between domes and rarely call for a shuttle, then leave the reservation set to Normal. The shuttles and hubs will perform colonist transport and resource transport.

Below is the optimal strategy to use the Resource Delivery A.I. for peak efficiency:

Shuttle A.I. works in either Normal Reservation or Resource Reservation.

Resource reservation will work faster since shuttles ignore colonists, but this is dependent on demand load. Read above section on when to set a reservation.

Build Mechdepots as soon as you can.

Build Mechdepots of each type and centrally locate them in early game.

Move Mechdepots closer to factories when factories are built.

Try to only have one of each type of Mechdepot, but if you need or want more of the same Mechdepot it will not be a problem, please read the Downsides and Caveats section.

Tear down old Mechdepots or set the desire to 1 or more if they are no longer important or primary.

Use Udepots as central storage if you cant build Mechdepots yet.

Use Multi-Udepots only as destination depots for areas that are distant such as outposts or a science dome on the other side of the colony.

Only set desired amount on depots when you want that particular minimum always available in a distant location. Remember a desired amount disqualifies the depot as a source for pickup.

Always keep track of your depots that have desires, otherwise you can shoot yourself in the foot.

Downsides And Caveats

Desired Amounts

You have already read all the downsides to desired amounts settings. Use carefully since that is primarily the reason why screwy shuttles get screwy to begin with.

Desired Amounts are handy to turn on when you dont want that depot to be used as a source.

Multiple Mechdepots of the same type

You can really shoot yourself in the foot having more than one of these but if you carefully plan their layout and controls you can easily and effectively plan large scale storage facilities around the map with them.

Note that when multiple Mechdepots of the same type are present shuttles are allowed to determine which one to use based on a priority system built into the game based on demand location and pickup location. Normally this is pretty good which is why I only put in one control for it.

What to watch out for is the condition that one Mechdepot is supplying another Mechdepot causing shuttles to pickup and drop back and forth. This only happens when you are very low on resources of that type. Why did you build a second Mechdepot if you dont have the capacity to fill it?

To solve that, turn the desired amount of one of the Mechdepots to at least 1. This will cause the Mechdepot to be considered as a destination only and shuttles will not pickup from it elliminating back and forth dropoff.

Multiple Udepots

Not a problem, the largest resource amount (31 and above) with zero desire is always chosen.

Custom Storage Mods

This mod is designed around the games' built in assets and works perfectly with them.

There are a number of custom asset storage mods on the workshop.

Most use the built in game assets (Udepot, Multi-Udepot) and change storage amounts.

Those should still work as long as the storage classes they use are the same as the built in game storage classes.

Silva's Storage Mods and AssetsThere are some awesome custom storage assets in the workshop like the ones Silva builds.

As of this writing, I have checked out Silva's storage mods and spoken to him to confirm.

They are completely compatible.

They are of type class Udepot, so follow the guide above and know in the back of your head these mods will act like Udepots in the A.I.

Suggestion for gaming using Silva's Storage Mods

Since they are Udepots they are technically treated as "secondary" by the new A.I.

This means if you have Mechdepos and Silva's Storage Depots, the Mechdepos are preferred unless they are disqualified.

If you only want to have Silva's storage used as primary distribution sources, then dont build Mechdepots or if you build Mechdepots, set desired amount to at least 1, which disqualifies them as sources for pickup.

They will get deliveries just like any other depot.

Important note on Silva's mods: There are two kinds, the universal multi resource large depot and the single resource large depots. The multi resource depot is automatically disqualified since it has more than one resource. See rules above about how the new A.I. operates. However the single resource depots work great. Remember if you have more than one of the same type of depot the largest quantity depot is marked as the source for pickup.

I welcome any other modder to contact me to make their assets work with this A.I.

Modders, if you intend on building storage assets, then consider keeping the default classes the game provides such as how Silva did it.

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=1518823484					

More Surviving Mars guilds