SHOPPING CART

Onex

Command Palette

Search for a command to run...

PRICING SYSTEM#

The pricing configuration (config/pricing.lua) provides a comprehensive system for clothing costs with category prices, rarity multipliers, sales, and bundles.

Enable/Disable Pricing#

config/pricing.lua
Config.Pricing = { enabled = true, everythingFree = false, globalMultiplier = 1.0, currency = "$" }
OptionTypeDefaultDescription
enabledbooleantrueEnable the pricing system
everythingFreebooleanfalseMake all items free (testing mode)
globalMultipliernumber1.0Multiply all prices by this value
currencystring"$"Currency symbol displayed in UI

Set everythingFree = true during development to test without money requirements.

Category Base Prices#

Set the base price for each clothing category:

config/pricing.lua
Config.Pricing.categoryPrices = { -- Components face_skin = 0, mask = 50, hair = 100, arms = 0, pants = 120, bag = 80, shoes = 100, accessory = 75, shirt = 90, vest = 110, decals = 50, torso = 150, -- Props hat = 60, glass = 80, ear = 50, watch = 100, bracelet = 75, -- Appearance eyebrows = 20, beard = 30, chesthair = 10, makeup = 50, lipstick = 40, blush = 30, -- Tattoos(per tattoo) tattoos = 500 }
CategoryDefault PriceType
face_skin$0Component
mask$50Component
hair$100Component
torso$150Component
pants$120Component
shoes$100Component
hat$60Prop
glass$80Prop
watch$100Prop
tattoos$500Per tattoo

Rarity Multipliers#

Adjust prices based on item rarity/source:

config/pricing.lua
Config.Pricing.rarityMultipliers = { base = 0.5, -- Base game items(50% of category price) dlc = 1.0, -- DLC items(100% of category price) addon = 1.5, -- Addon items(150% of category price) premium = 3.0 -- Premium items(300% of category price) }
RarityMultiplierExample (Base $100)
base0.5x$50
dlc1.0x$100
addon1.5x$150
premium3.0x$300

Use rarity multipliers to make DLC and addon clothing more valuable than base game items.

Collection-Specific Pricing#

Override prices for specific clothing collections:

config/pricing.lua
Config.Pricing.collectionPrices = { ["mpheist4"] = { multiplier = 2.0, -- Cayo Perico items cost 2x categories = { torso = 300, -- Override torso price for this collection pants = 250 } }, ["mpsum2"] = { multiplier = 1.5 -- Summer update items cost 1.5x } }
PropertyTypeDescription
multipliernumberMultiply all items in collection
categoriestableOverride specific category prices

Shop Type Multipliers#

Different shop types can have different price scales:

config/pricing.lua
Config.Pricing.shopMultipliers = { clothes = 1.0, -- Standard clothing stores barber = 0.8, -- Barber shops(20% discount) tattoos = 1.2, -- Tattoo parlors(20% markup) admin = 0.0, -- Admin menu(free) newchar = 0.0, -- New character(free) family_edit = 2.0 -- Plastic surgery(expensive) }
Shop TypeMultiplierEffect
clothes1.0xNormal prices
barber0.8x20% discount
tattoos1.2x20% markup
admin0.0xFree
newchar0.0xFree
family_edit2.0xDouble price

Texture Pricing#

Charge additional fees for texture variants:

config/pricing.lua
Config.Pricing.texturePricing = { enabled = true, baseCost = 10, -- Base cost per texture change perTextureCost = 5, -- Additional cost per texture ID maxTextureCost = 100 -- Cap on texture costs }
OptionTypeDefaultDescription
enabledbooleantrueEnable texture pricing
baseCostnumber10Flat fee for any texture change
perTextureCostnumber5Cost multiplied by texture ID
maxTextureCostnumber100Maximum texture cost cap

Formula: min(baseCost + (textureId * perTextureCost), maxTextureCost)

Advanced Pricing Rules#

Create pattern-based pricing rules:

config/pricing.lua
Config.Pricing.advancedRules = { { name = "Premium Masks", condition = function(item) return item.category == "mask" and item.drawableId > 100 end, multiplier = 2.5 }, { name = "Rare Hats", condition = function(item) return item.category == "hat" and item.collection == "mpheist3" end, flatPrice = 500 -- Override with flat price } }
PropertyTypeDescription
namestringRule identifier
conditionfunctionFunction returning true/false
multipliernumberApply multiplier if condition met
flatPricenumberOverride with fixed price

Scheduled Sales#

Create time-based discount events:

config/pricing.lua
Config.Pricing.sales = { { name = "Weekend Sale", startDay = 5, -- Friday(1=Monday) endDay = 7, -- Sunday discount = 0.25, -- 25% off categories = { "torso", "pants", "shoes" } }, { name = "Happy Hour", startHour = 18, -- 6 PM endHour = 20, -- 8 PM discount = 0.15, -- 15% off categories = nil -- All categories } }
PropertyTypeDescription
namestringSale name (shown in UI)
startDay / endDaynumberDay of week (1-7)
startHour / endHournumberHour (0-23)
discountnumberDiscount percentage (0.0-1.0)
categoriestable/nilAffected categories (nil = all)

Bundle Discounts#

Create multi-item discount packages:

config/pricing.lua
Config.Pricing.bundles = { { name = "Full Outfit", items = { "torso", "pants", "shoes" }, discount = 0.20 -- 20% off when buying all three }, { name = "Accessory Pack", items = { "hat", "glass", "watch", "bracelet" }, discount = 0.30 -- 30% off accessory bundle } }
PropertyTypeDescription
namestringBundle name
itemstableRequired categories
discountnumberDiscount when all items purchased

Bundle discounts are applied automatically when players purchase all items in a bundle during the same session.

Price Calculation Order#

Final price is calculated in this order:

  1. Base Category Price
  2. × Rarity Multiplier
  3. × Collection Multiplier (if applicable)
  4. × Shop Type Multiplier
  5. + Texture Cost (if enabled)
  6. × Global Multiplier
  7. - Sale Discount (if active)
  8. - Bundle Discount (if applicable)

Example Configuration#

Complete pricing setup example:

config/pricing.lua
Config.Pricing = { enabled = true, everythingFree = false, globalMultiplier = 1.0, currency = "$", categoryPrices = { torso = 150, pants = 120, shoes = 100, hair = 80, tattoos = 500 }, rarityMultipliers = { base = 0.5, dlc = 1.0, addon = 1.5, premium = 3.0 }, shopMultipliers = { clothes = 1.0, barber = 0.8, newchar = 0.0 } }

Next Steps#