Files
Main File - Version v1.0 Latest
Description
X2-Shop
Overview
x2-shop introduces a functional in-game store to Xenonauts 2, allowing players to list items for sale and purchase them. It works by extending the game’s existing systems, effectively adding an extra data layer to support shop functionality.
Installation
Place the x2-shop.dll file into your mod directory at:
%your_mod_folder%/assembly/common
(Here, %your_mod_folder% refers to your mod’s root folder inside the game’s Mods directory.)
First Launch & Starting Inventory
On the first run, the mod generates the following file:
%your_mod_folder%/mods_settings/x2-shop/initial_shop_items.txt
You can edit this file to define which items are available in the shop at the beginning of a new campaign.
Pricing System
By default, most base items have a buy price of 10. However, individual items can override this value within their JSON files using specific pricing parameters.
Shop Pricing Fields (JSON)
Inside an item’s strategy section, pricing is controlled through the _components array:
-
BuyPrice: The base cost of the item in the shop.
-
BuyPriceMin: The minimum possible price under market fluctuations.
-
BuyPriceMax: The maximum possible price under the same system.
-
BuyPriceTransactionDelta: Adjusts price after each purchase; negative values increase future prices, while positive values decrease them.
Adding Items to the Shop Mid-Campaign
You can inject items into the shop using project JSON files (such as research). This is done through the EntryEffects → Finished section.
-
MainShopTag selector: Targets the main shop entity.
-
DeltaItemEffect: Adds a specific item (via its JSON template path).
-
Quantity: Number of items added.
-
SlotType: Defines where the item is stored (e.g., Stores or MainBaseSlots).
This method isn’t limited to research files—it can be applied anywhere compatible effect blocks are supported.
Notes
The mod links the initial_shop_items.txt file with the in-game shop system, while pricing and inventory behavior can be fully customized through JSON settings and project effects.
Rate This Mod
Login to rate this mod.
by