File information

Last updated

Original upload

Created by

Ghostkeeper666

Uploaded by

Ghostkeeper666

Virus scan

Some suspicious files

Tags for this mod

About this mod

This is not a mod. This is the 'mod generator tool' for the mod 'My Trade'. With this tool and with the provided Google Sheet you will be able to automatically generate a mod with your own trade settings. This is for advanced users only, don't expect it to be easy to use.

Permissions and credits
DESCRIPTION

This is not a mod. This is the mod generator tool for the mod 'My Trade'. With this tool and with the provided Google Sheet you will be able to automatically generate a mod with your own trade settings. This is for advanced users only, don't expect it to be easy to use.


DETAILS

This tool project generates the 'MyTrade' mods for Space Haven, which allow you to change in-game trade and contraband settings.

The tool requires a 'Trade Settings' spreadsheet exported as CSV format, containing Space Haven's Trade Settings values, which can be found here:

https://drive.google.com/drive/folders/1FyZlNIISYryiZI0Z81jLgp2uN2yKwyMx?usp=drive_link

ATTENTION: You MUST first make a copy of this spreadsheet to your own Google Drive, otherwise it won't work!

To export a sheet as CSV format, using Google Sheets:
- First select the correct sheet within that file: the one containing the trade settings
- Go to File => Download => Comma Separated Values (.csv)
- Save the file in a local folder of your preference, and remember the path to this location!


INSTRUCTIONS

This program is a .NET Framework 4.8 command-line tool for Space Haven.

It needs 2 arguments: 'mod output directory' and 'path to trade settings CSV file'.

If your trade settings are not messed up, the program should smoothly generate a few 'MyTrade***' mods for you.


TRADE SETTINGS

The Trade Settings is a table, stored in CSV file format, with the following 16 columns (header row):
- Item Name
- Item ID
- Mod
- Item Type
- Faction
- Contraband
- Faction don't sell
- Faction don't buy
- Max Price
- Buy Zero
- Hold Back
- Sell factor
- Buy factor
- Offer factor
- Availability
- Desirability

The program will skip the header row and parse the following rows as 'item trade settings'.

For each item, at least 1 row with 'Faction = Default' must be defined. These are the item's default trade settings.

Faction-specific trade settings can also be defined by creating an extra row for that item with e.g. 'Faction = Military'.

You may ignore the values of following columns of item's DEFAULT trade settings, since they cannot be changed by game-design:
- Contraband => always set to FALSE
- Faction don't sell => always set to FALSE
- Faction don't buy => always set to FALSE
- Sell Factor => always set to 100

You may ignore the values of following columns of item's FACTION-SPECIFIC trade settings, since they are copied from the item's default trade settings:
- Item ID
- Mod
- Item Type
- Max Price
- Buy Zero

You may manually populate trade settings values either with original values found in the 'haven' file, or with values of your own.

Valid values for each column:
- Item Name => doesn't have to match exactly the in-game name, but must be unique among the items you define
- Item ID => must match with the in-game item's ID
- Mod => to which mod should the item's trade settings be generated
- Item Type => must be either 'product' or 'item': some stuff are considered as items, other as products by the game, please check the 'haven' file
- Faction => use 'default' for default trade settings or the faction's name for faction-specific trade settings
- Contraband => 'true' or 'false', used for setting this item as contraband for a specific faction
- Faction don't sell => 'true' or 'false', used  for blocking the NPC of a specific faction from selling this item
- Faction don't buy => 'true' or 'false', used for blocking the NPC of a specific faction from buying this item
- Max Price => an integer number greater than zero
- Buy Zero => an integer number greater or equal than zero: how many units the NPC will buy from you
- Hold Back => an integer number greater or equal than zero: how many units the NPC will store for himself and not trade with you
- Sell factor => an integer number ranging from 10 - 190, tipically set to 100: NPC-side price modifier
- Buy factor => an integer number ranging from 10 - 190, tipically set to 90: when NOT in MARKUP market condition, this is the Player-side price modifier
- Offer factor => an integer number ranging from 10 - 190, tipically set to 80: when in MARKUP market condition, this is the Player-side price modifier
- Availability => how much / how frequently will the NPC have this item available
- Desirability => how much / how frequently will the NPC desire to buy this item