Skip to content

MES Acquisition contracts are broken after the Economy 2 update #353

Description

@ZIC-team

Hello! I found several issues with MES-generated Acquisition contracts.

Symptoms
• Money reward is always 0 SC
• Reputation reward is always 0
• Required items are not recognized in the player’s inventory
• The log reports: Critical: Definition of "(null)/Component" is missing.

Likely cause

In Mission.cs, MES selects an entry from StoreProfile.OrderItems and calls storeItem.GetItemId() directly.

For RandomCraftable and RandomItem, this does not resolve the entry into a valid MyDefinitionId. The store-block code already resolves random entries, but the Acquisition contract generator does not.

As a result, the contract may receive an invalid ID such as (null)/Component. The reward calculation also uses the unresolved item, causing GetPrice() to return zero.

The mission profile values ReputationReward and FailReputationPrice are also not assigned to the created MyContractAcquisition, so both remain zero.

Possible fix

  1. Resolve RandomCraftable and RandomItem into a valid MyDefinitionId.
  2. Pass the resolved ID to GetPrice(..., overrideId: resolvedId).
  3. Use the same resolved ID as newAcquisition.ItemTypeId.
  4. Assign:
    newAcquisition.RewardReputation = ReputationReward;
    newAcquisition.FailReputationPrice = FailReputationPrice;

Testing

I implemented this workaround in a Trade Operators Coalition compatibility patch. After resolving the item IDs and assigning the reputation values:

✅ Items were detected correctly
✅ Contracts completed successfully
✅ Money rewards were paid
✅ Reputation rewards worked

There is also a separate Economy 2 issue where interacting with MES Shipyard or Suit Upgrade terminals can crash the client. I temporarily disabled those handlers.

I can provide logs, screenshots, and the workaround code if needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions