Forum rules - please read before posting.

Managing Inventory, Objectives, and Variables with Git across multiple branches

Hello. In my team there's multiple people who will be working on the project. If I create a new inventory item, variable, or objective, but somebody else does too, there will be a conflict when merging our branches. Is there a way to avoid conflicts without having to resolve them manually?

Comments

  • edited April 2022

    Welcome to the community, @rafael_1996.

    Inventory items, (global) variables, and objectives are all game-wide/global properties, referenced by unique ID values. The main issue with merging two branches that affect such properties is that you'd have to update the ID of one of them. This ID value is how AC references that property across the project - so doing so alone would break such references.

    It is possible to find these references ahead of time, however. For example, the cog icon beside an Inventory item can be used to print a list of all entities that reference that item in the Console. These could then be noted beforehand, and corrected once the two branches have been merged and the item's ID had been manually updated.

    However, it should be possible to automate the process of modifying e.g. an Inventory item's ID value - updating references made to it through Hotspot/Actions etc along with it. This could feasibly be done already via custom script, but I'd like to look into this further an official feature - you raise a good case for it.

    Admittedly this isn't exactly an elegant alternative, but for completness: bulk-creating such properties ahead of time would at least allow these references to be retained. For example, create 20 Inventory items, and assign user #1 to items 1-10, #2 to 11-20 etc.

    I shall look into a possible "Update ID value" feature - thanks for bringing the need for it to my attention.

  • Thanks for the response!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.