The [Quest Machine](https://assetstore.unity.com/packages/templates/systems/quest-machine-39834?aid=1100lGdc) integration lets a quest react to the player’s Ultimate Inventory System Items and Currency. For example, a quest can wait until the player has three Health Potions, take those potions when the player returns, and award Gold. Quest Machine owns the quest and its counters; Ultimate Inventory System remains the source of truth for the Inventory and Currency balances.

Pixel Crushers maintains this bridge. The downloaded integration contains Pixel Crushers’ integration manual, but it does not declare a minimum or maximum Quest Machine version. Use the bridge supplied for the installed Quest Machine 1.2 release, and test it before updating either product. Do not combine files from different bridge downloads.

Before you begin

  • Install and compile released Ultimate Inventory System Version 1 and Quest Machine before importing the bridge.
  • Confirm that the player’s Ultimate Inventory System Inventory and Currency Owner work without Quest Machine.
  • Tag the player GameObject Player, or decide on the exact GameObject name that each quest field will use. The bridge looks for Inventory and Currency Owner on that object or its children.
  • Create the Item Definitions and Currency used by the quest. This page uses Health Potion and Gold.
  • Decide whether Pixel Crushers or Ultimate Inventory System owns saving. Use one owner and compatible adapters as described below; the archived Pixel Crushers-owned route does not compile with this UIS save API.

Sign in to Opsive Downloads and download the Quest Machine integration after both products compile. The bridge is not included in the base product’s Integrations folder before download; importing the matched package creates the integration files in the project.

Install the bridge

  1. Back up the project and remove an older duplicate of the Opsive UIS Support folders if you are replacing the integration.
  2. Import a provider package matching the installed UIS release. Its archived SaveSystemManagerNoDisk and UISSaver use removed UIS APIs; exclude those incompatible scripts or replace them with provider-updated versions before compiling.
  3. Confirm that Unity adds support beneath both of these folders:
    • Assets/Pixel Crushers/Common/Third Party Support/Opsive UIS Support
    • Assets/Pixel Crushers/Quest Machine/Third Party Support/Opsive UIS Support
  4. Wait for Unity to compile. Resolve missing Pixel Crushers or Opsive namespaces before configuring a quest.
  5. Open Opsive_UIS_Support.pdf from the imported Quest Machine support folder. It describes the demo, save-system choices, conditions, actions, and procedural generator included with that exact bridge.

The package also includes UIS QM Demo.unity, a handcrafted Stubbed Toe quest, and a generated Fetch quest. Use the demo to learn the integration, but copy only the components and quest assets that your own scene needs.

Create a Health Potion collection quest

This example waits for three Health Potions, removes them at turn-in, and awards ten Gold.

  1. Add a Quest Machine counter named Health Potions to the quest.
  2. On the collection node, add UIS Item Amount Quest Condition to its condition list.
  3. Set Item Name to Health Potion, leave Inventory Name blank to use the Player-tagged GameObject, set Comparison Mode to At Least, and set Amount to 3.
  4. Select the Health Potions counter in the condition. Although the source comments call the counter optional, the released bridge updates it without a null check, so every Ultimate Inventory System amount condition should use a counter.
  5. On the quest’s successful state, add UIS Remove Item Quest Action. Set Item Name to Health Potion, Amount to 3, and Item Collection Name to Bag if the turn-in must remove from that exact collection. Leave Inventory Name blank for the player.
  6. Add UIS Add Currency Quest Action after the removal action. Set Currency Name to Gold, Amount to 10, and leave Currency Owner Name blank for the player.
  7. Add quest content that tells the player to collect three Health Potions and return to the quest giver.

The condition counts the Item Definition across the entire Inventory; it has no Item Collection field. The remove action can target a named collection. If the quest must count only the Bag while the same Item can also exist elsewhere, this bridge does not provide that narrower condition.

Use the quest conditions and actions

Goal Quest Machine type Important fields and behavior
Wait for an Item amount UIS Item Amount Quest Condition Item Name, Inventory Name, Comparison Mode, Amount, and a counter. Supports At Least and At Most and reevaluates when the Inventory updates.
Wait for a Currency amount UIS Currency Amount Quest Condition Currency Name, Currency Owner Name, Comparison Mode, Amount, and a counter. See the archived-source limitation below before using it.
Give Items UIS Add Item Quest Action Item Name, Inventory Name, Item Collection Name, and Amount. The archived action adds to Main even when a valid Item Collection Name is supplied. Use a corrected action or a direct destination collection call for another destination.
Take Items UIS Remove Item Quest Action Uses the same four fields. A blank collection searches the Inventory for a matching Item.
Give Currency UIS Add Currency Quest Action Currency Name, Currency Owner Name, and Amount.
Take Currency UIS Remove Currency Quest Action Uses the same three fields.

Blank Inventory Name and Currency Owner Name fields resolve the GameObject tagged Player. A nonempty field resolves a GameObject with that exact name. Item, Currency, and Item Collection names are also exact and case-sensitive in the bridge’s runtime lookups.

Quest actions run synchronously and do not report success back to Quest Machine. Keep the matching condition in front of a removal, and verify the resulting Ultimate Inventory System balance before another quest step assumes the change occurred.

If another system can spend or move the required Items between collection and turn-in, add a second Item amount condition to the turn-in branch. The removal action will not stop the following Gold action when it cannot remove the requested amount.

Archived Currency condition limitation

Do not rely on UIS Currency Amount Quest Condition from the exact bridge archived in Ultimate Inventory System Version 1 1.3.0 until it passes a Play Mode test or is replaced by a provider-corrected build. In that source revision, the condition resolves Currency Owner into a local variable but does not assign the cached owner used by its comparison. The condition therefore cannot become true as written. The add and remove Currency actions use a separate lookup path and are not affected by that specific defect.

Generate Ultimate Inventory System-aware quests

The bridge can also adapt Quest Machine’s procedural quest generator to Ultimate Inventory System:

  1. Add UIS Quest Generator Entity to the quest-giver NPC. At startup it installs the Ultimate Inventory System-aware plan-to-quest builder.
  2. Create a generator action through Create > Pixel Crushers > Quest Machine > Generator > UIS Get Item Action, then use that action in the generator’s domain and plan.
  3. Add UIS Reward System to the NPC when generated quests should offer Ultimate Inventory System rewards.
  4. Set Currency and Currency Amount for a Gold budget, and add eligible Item Definitions to Items.
  5. Give each reward Item Definition a BuyPrice attribute of type CurrencyAmount. Also declare an Icon attribute of type Sprite for every reward definition. The attribute is required even for a text-only offer; its value may be null when no image should appear.

For a generated collection step, the bridge creates an Item amount condition and counter. If the player drops below the required amount, it creates a backstep that reactivates the collection step. When the quest succeeds, it removes the requested Items. Generated rewards add Item or Currency actions to the quest’s successful state.

The verified reward source consumes its configured Currency budget and Item list while generating rewards. If one UIS Reward System creates several quests in the same session, confirm that later quests still have the intended reward pool.

Choose one save owner

Choose one owner for the combined save:

Save owner Setup boundary
Pixel Crushers Save System Requires updated provider adapters. The archived Save System Manager No Disk and UIS Saver reference removed UIS save APIs and cannot be installed as working replacements. Obtain matching versions before configuring this route.
Ultimate Inventory System Save System Keep the UIS manager and register Pixel Crushers To UIS Saver with it. Do not add UIS Saver or configure Pixel Crushers as a second disk writer.

The archived No Disk adapter uses the former GetSavesFromDisk, m_SaveData, and parameterless OrderSaversByPriority APIs. Its companion UIS Saver calls the removed GetCurrentSaveData and hardcodes load slot 0. Changing Save Slot cannot fix this incompatibility.

If an Opsive character controller saver is also installed, disable its inventory recording when UIS owns that data, so only one saver restores the Inventory.

The demo’s Redirect Save Load Button To Test Menu component is for testing only. Do not include it in a release build.

Editor checkpoint

Before entering Play Mode, confirm all of the following:

  • Unity contains one copy of each Opsive UIS Support folder and no compile errors.
  • The Player tag or every explicit owner name resolves to the intended GameObject.
  • That GameObject or a child has the required Inventory and Currency Owner.
  • Health Potion, Gold, and Bag exactly match Ultimate Inventory System names.
  • Each Item or Currency amount condition has a valid Quest Machine counter.
  • The successful-state actions remove the requested Items before adding the reward.
  • Exactly one save system owns the combined Quest Machine and Ultimate Inventory System save.

Verify in Play Mode

  1. Start with no Health Potions and zero Gold. Accept the quest and confirm that the collection node remains active.
  2. Add two potions. Confirm that the Health Potions counter follows the Ultimate Inventory System amount and that the collection node remains active.
  3. Remove one potion. Confirm that the counter returns to one while the active condition continues waiting.
  4. Add two more potions. Confirm that the node completes when the amount reaches three.
  5. Turn in the quest. Confirm that three Health Potions leave the Bag and ten Gold reaches the player’s Currency Owner.
  6. Repeat with a misspelled Item name on a copy of the quest. The condition should not complete and Ultimate Inventory System data should remain unchanged.
  7. Save, change the quest state and Ultimate Inventory System balances, then load. Confirm that both systems return together exactly once.
  8. Reload the scene and repeat the test to catch duplicate persistent managers or duplicate saver routes.

Troubleshooting

Symptom Check Fix
Unity reports missing Pixel Crushers or Opsive namespaces Check that Quest Machine and Ultimate Inventory System compiled before the bridge and that only one bridge copy is present. Remove the incomplete support folders, install both prerequisites, and import one matched package.
An Item condition never completes Check Item Name, the selected counter, Player tag or Inventory Name, and the Inventory component location. Correct the exact names, select a valid counter, and place Inventory on the resolved object or a child.
A Currency condition never completes Check whether the installed bridge contains the archived cached-owner defect described above. Install a provider-corrected bridge or avoid this condition until the exact build passes a focused Play Mode test.
An action runs but the Item or Currency does not change Check the definition name, owner, collection name, available amount, and Ultimate Inventory System restrictions. Correct the target and verify the Ultimate Inventory System balance immediately after the action; the quest action itself does not return failure.
The wrong collection loses an Item Check whether Item Collection Name is blank or misspelled. Enter the exact collection name, such as Bag, on the remove action.
A generated reward throws an error or has no value or icon Check the reward Item Definition for BuyPrice and Icon attributes with the expected types. Declare both BuyPrice as CurrencyAmount and Icon as Sprite before generating the quest. The Icon value may be null for text-only offers, but the attribute itself must exist.
Later generated quests offer fewer rewards Check whether the same UIS Reward System already consumed its Currency budget or removed entries from its Item list. Reset or recreate the reward source for the intended generation session and verify each generated offer.
Loading duplicates or loses state Check for incompatible archived adapters, two disk writers, both saver routes, or duplicate managers. Install adapters matching the UIS save API, choose one owner, and test a new save. Slot 0 does not repair the archived adapter incompatibility.

Developer and version reference

The released Ultimate Inventory System Version 1 package verified for this page is version 1.3.0. Its QuestMachine.unitypackage contains the four quest actions, two amount conditions and their custom editors, the Ultimate Inventory System-aware generator classes, both save-system adapters, UIS QM Demo.unity, example quest assets, and Opsive_UIS_Support.pdf. It contains no assembly definition, package manifest, or other metadata that pins a Quest Machine version.

Pixel Crushers’ Quest Machine 1.2 manual lists Opsive Ultimate Inventory System as a supported third-party integration and directs users to the manual shipped with each bridge. Because Pixel Crushers updates the bridge independently, the source and PDF included with the matched integration package take precedence over copied setup instructions from another revision.

UISItemAmountQuestCondition subscribes to the Ultimate Inventory System Inventory update event while it is false; UISCurrencyAmountQuestCondition subscribes to the global Currency collection update event. Both support At Least and At Most comparisons and mirror the current amount into a selected Quest Machine counter. UISUtility resolves a blank owner through the Player tag and an explicit owner through Pixel Crushers’ hard GameObject lookup, then searches that object and its children.

UISAddItemQuestAction, UISRemoveItemQuestAction, UISAddCurrencyQuestAction, and UISRemoveCurrencyQuestAction perform one immediate Ultimate Inventory System operation and return no result to the quest. The archived add-item action passes the named collection as source context to Inventory.AddItem, so additions target Main; removal can use the named collection. Their helper warnings are disabled by default because UISUtility.debug defaults to false.