The Forge is currently under heavy construction. Expect nothing to work. Data is reset every hour.

Mod Details

Kiki-EZPreset2Assort

Kiki-EZPreset2Assort 1.0.0

Created by kikirio

148 Downloads

SPT 3.7.6 Compatible

This mod is a tool for taking presets that you have built in your profile, and exports them into a format compatible with trader assorts, whilst preserving locales tags.

Put the ID of your profile in const profileID.
Run the server, then close the server.
Copy the assort.JSON and setup.JSON files that have been created in the output folder, and paste them into the res folder of your trader mod.

In your trader mod you will require the following to be pasted into its mod.ts.postDBLoad (you can find chomps example here to build off)

//Bring in your assorts const newAssort = require("../res/assort.json") const newSetup = require("../res/setup.json") //Add your assorts for(let item in newAssort) { //add assort to trader this.fluentTraderAssortHeper.createComplexAssortItem(newAssort[item]._items) .addUnlimitedStackCount() //would have to handle differnt currency / barters seperately .addMoneyCost(Money.ROUBLES, newSetup[item].addMoneyCost) .addBuyRestriction(newSetup[item].addBuyRestriction) .addLoyaltyLevel(newSetup[item].addLoyaltyLevel) .export(tables.traders[baseJson._id]); //add assort name to locales for(let local in tables.locales.global) { let thisLocal = tables.locales.global[local] thisLocal[newAssort[item]._id] = newAssort[item]._name } //add to globals presets tables.globals.ItemPresets[newAssort[item]._id] = newAssort[item] } You can then set your prices and requirements in setup.JSON.
This works with roubles only currently, you can repeat with different sets of presets with additional currencies / barters if required. (Or you could add a prefix to your builds names to determine type of currency and strip it at import, go wild)

Version 1.0.0

148 Downloads

Created Feb 9th, 2024 Updated 1 hour ago

Not quite yet...