[A13] Scheduled Caravans with Supply & Demand

Started by Kaizyn, May 08, 2016, 08:58:04 PM

Previous topic - Next topic

Kaizyn

Trade caravan overhaul!

I thought it was weird that vanilla traders will only trade in what their type is, rather than trading in what they would need.   Plus, the storyteller will send the same number of caravans with the exact same goods no matter what the world or factions who live there.

No more!  Factions have actual supply & demand now, so you may have a reason to maintain relations with specific factions.


Current Features:

  • Schedule trade caravans from any non-hostile factions.
  • Traders pay more for goods their faction doesn't have.
  • More logical supply & demand based on each faction's situation:
  • -- Biome and landform based supply - (for example, traders from mountainous colonies generally have more stone & metals)
  • -- Tech level based supply & demand - Neolithics bring more raw materials, meat, food, and pay more for high tech weapons.
  • Caravan schedules so you know approximately when you can expect a trader.
  • Interface to see details of any given faction, showing what their supply & demand is, including quantities and/or prices.
  • Many more factions compared to vanilla, so you have more potential trading partners with their own unique imports and exports.
  • Probably some other tweaks or adjustments that I can't remember while I write this.

Known Issue:
It seems that if you save your game while a caravan is on the map, then reload - it will cause their stock to be mucked up somewhat.   I know the problem, just need to find a good way to resolve.     It won't hurt anything, but if you save the game and then try to trade with them to get their pile of steel, you may find they won't sell it to you anymore, even though it's on their pack muffalo!


Download from Google Drive:

v0.13.01 - Additional mod support (Apparello, first pass at Hardcore SK compatibility)     Less tested than the original release.

Previous release:
v0.13.00 - Original - Seems stable.  Works with mods that don't extensively change vanilla core categories.

For installation, just unzip to your Mods folder and then enable it.   It has no requirements, but it should probably be loaded near the end of the mod load order.


How to use / how it works:

Build a "Trade Caravan Manager" building from the Misc tab to enable trading.    If you don't have a building, caravans will revert to vanilla.  Select a pawn and right click the building to open the management window. (It acts like a Comms Console)    (I'm not 100% happy with this, but it was a way to keep things non-interfering with any other mods touching Comms Consoles or the Faction tabs.   Feedback here is good, because it may be annoying enough to warrant changing.)

Caravans come once per season, per faction.   Their first visit will come within 1-2 weeks of when you ask them.   After that, they come every 30 days on average.   Be aware that at present there is no downside to just asking for caravans from all factions (later I want to balance it such that you need to trade some % of their wares to keep them happy).    However, if you get factions hostile to each other arriving at the same time, you may have some troubles!

Overall, caravans don't bring huge amounts of goods.    You're not going to get "bulk goods" with 1000+ steel ore, but you're likely to get hundreds from tribals living in mountains.   


For goods:

Tribals generally have cheaper prices, and they bring more raw resources, crops, meat, textiles, leathers.    They'll pay more for higher tech weapons, and sometimes have slaves for trade.

Outlanders will supply some resources, but usually at higher prices.   They'll also have better medicine for trade, as well as bringing you guns, and if they are slavers, they will deal in organs and/or prosthetics!   Outlanders have more money overall and have higher prices, but will buy more resources and such from you. 

(Spacers are handled, but there are no vanilla spacer factions to trade with - if you have any mods that add non-hostile Spacer tech factions - they should work and will supply Spacer tech gear, and buying & selling resources similarly to Outlanders)

You'll find traders have various prices for different things, depending on their type, what they have, what they want.  All factions can bring components, but they bring fairly small amounts if they bring them at all, and they range anywhere from cheap to exorbitant, depending on their type and tech level.    Neolithics will *generally* serve cheaper components, and outlanders will often gouge you.



Full compatibility:

Built in support for Combat Realism and Expanded Prosthetics & Organ Engineering.    (No separate downloads.   If you have either of these, traders will bring their items appropriately).


Basic compatibility:

More Factions Spawn  --  This changes # of vanilla spawning factions, and so does my mod.   If you use More Factions Spawn, you'll have 6 non-hostile and 6 hostile.    My mod will set 8 non-hostile and 4 hostile.    So whichever you prefer, it will have little impact.

Hospitality -- Compatible, except scheduled caravans aren't Hospitalitized.   


Any mods that add new items and use existing categories, tech levels, etc, should all work as-is.     I'll add in support for other mods as time goes.   I just need to review them and look at what new categories they add.    Some that I've already tried and work fine are cuproPanda's mods (Soda, Pharmacy).    Scheduled caravans buy/sell some of the new resources/items, but not all.   


Suggested Mods:
Muffalo Packs by A Friend.   They're just excellent to see with the trade caravans!


Incompatibilities:

None that I'm aware of.   The worst cases I've found are mods that add new categories of items will not have their items on scheduled caravans.  Custom traders and caravans in the mod, as well as orbital traders are fine though, so there are no problems.

Any mod that adds new categories will likely not have their items show up on caravans.   However, I don't touch orbital traders, nor do I touch non-vanilla caravans.   So any mod with new items who adds their own trader types will (hopefully) have no problems. 

Update:  Mods that recategorize items, especially ones that remove vanilla base categories, or mods that don't follow "standard" vanilla conventions may not work well.   It will still be unusual for them to break, but say you have a mod that adds new gear, and they don't bother setting the tech level for any of it, then you'll see it arrive on not-tech-appropriate caravans.



License:
Modpack people are welcome to include this, as I was intending it to be used as a quality-of-life improvement for overall gameplay.   (However, I would suggest giving it just a little while, as I may make changes depending on bugs/problems/new things)     Just ask me first, in case I'm about to have any major changes.



Future features, assuming anyone uses the mod and it becomes worthwhile to carry on with:  :P


  • Dwarf Fortress style trade request system.   Rather than having traders bring a random selection of everything their faction produces, you can request specific goods, and they will request specific goods from you.
  • Dynamic trading where factions would change supply & demand depending on events
  • Base caravan time and prices on actual distance from your colony on the map
  • Allow you to send your own caravans, using tamed colony animals as pack animals with a colonist trader (you'd get better prices)

Kaizyn






Included are screenshots of the supply/demand page for factions.    The left one is a tribe, which will tend to have more raw materials, and cheap prices.  They also import weapons at higher prices (if higher tech).   They may bring you bows and clothing as well (this one in particular doesn't), and they'll usually have low quality medicine, and pay more for high quality.

Right side is an outlander town, which will tend to have less resources, and pay higher prices for them.     They also more frequently bring weapons.   (And they pay more if you sell them high tech weapons)


Example trade screen of a Neolithic tech faction:



So here you can see they brought a bunch of resources   (and note they bring the same type of leather as they do meat - I thought that was a little detail worth having.    The animals also come from the biome their faction lives in)

I've also sold them 1 medicine and a pistol to show the price differences.    They pay more for higher tech weapons and medicine.   

Nanao-kun

"but it will change who you can trade with a bit."

What do you mean by this in regards to More Factions Spawn?

Kaizyn

Quote from: Nanao-kun on May 08, 2016, 09:47:19 PM
"but it will change who you can trade with a bit."

What do you mean by this in regards to More Factions Spawn?


More Factions Spawn increases vanilla factions to 4/4/4 for tribal/outlander/pirate, but pirates can't trade (always hostile).   My mod will generate 5/5/2.

So, if you use More Factions Spawn, you'll get slightly less tribals & outlanders to trade with, but a couple more pirate factions on the map.


I've been toying with the idea of allowing you to bribe pirates to be non-hostile for a year or something, in order to enable trade, but it was another feature that would have made it take that much longer to get this out the door  :P   

RagingLoony

Is this compatible with Hospitality?

Shinzy

Jessie! I'm just curious, how would this work with modded factions (ones with their own traders)?
Would a separate compatibility patch be required?

Kaizyn

Quote from: RagingLoony on May 09, 2016, 04:57:37 AM
Is this compatible with Hospitality?

I play with Hospitality myself, and it seems to behave correctly.     It's possible at worst case you wouldn't be able to recruit or charm people from trade caravans, but there's no impact at all on normal visitor groups or things from this mod. 



Quote from: Shinzy on May 09, 2016, 05:06:45 AM
Jessie! I'm just curious, how would this work with modded factions (ones with their own traders)?
Would a separate compatibility patch be required?

I'm actually hoping people add other factions!    I coded in support for Spacer tech people, even though there are none in vanilla.   (I didn't do a lot special with them - they act like Outlanders, but have better equipment on the traders, and want ultra tech stuff themselves)

Custom trade caravans are unaffected by this mod as well, so if you wanted very special traders for a new faction, they will still come per storyteller generation.

Other than that, this mod will grab any new factions and give them scheduled caravans, with goods based on their tech level and where their colony appears on the map.    Almost nothing is hard coded, so any other mods should get picked up and work right away!   ... at least I hope.

RagingLoony

sweet :) quick question though, would it be possible to edit the carry cap of visitors? I have the issue when using combat realism that visitors will drop most all of their trade goods as they eneter a map because they just cant carry it, and what they can carry max out their weight and they move so slow they starve before reaching my base o.O TRADERs are fine as the muffalo carry everything but normal visitors always die :(

Kaizyn

Quote from: RagingLoony on May 09, 2016, 05:57:21 AM
sweet :) quick question though, would it be possible to edit the carry cap of visitors? I have the issue when using combat realism that visitors will drop most all of their trade goods as they eneter a map because they just cant carry it, and what they can carry max out their weight and they move so slow they starve before reaching my base o.O TRADERs are fine as the muffalo carry everything but normal visitors always die :(


As I understand, NoImageAvailable was going to disable small traders due to this.

I don't touch them myself, so it's not something I'd want to interfere with, as it's related to weight & bulk introduced in Combat Realism.

I only adjust caravans, and they have no troubles.

RagingLoony

Ahh that sucks, thanks for all the replies though :) I'll just have to stick to deleting all the shit they drop on the floor as they spawn, feels kinda cheaty to get loads of free weapons and stuff lol

vteam

Quick question, do I need to start a new game or can this be added to an existing one?

Kaizyn

Quote from: vteam on May 09, 2016, 08:13:43 AM
Quick question, do I need to start a new game or can this be added to an existing one?


It should work fine if you add this to an existing game.     I haven't tested it a lot for mod interactions, but should be safe.   Just load this mod last in the list or so.

You will need to make a new world map to get additional factions though.   So if you have vanilla factions only, you may be a bit light on trade partners.

Hyena

I was just thinking about trying a flat extreme desert settlement and living on trade, so this comes at a perfect time. Gonna give it a try.  ;D

Nanao-kun

Just tried this out, it's pretty cool. It took me a moment to realize how to use the trade caravan workbench thing, but it all works.

Grogfeld

This looks interesting. I'm just starting new colony and will give it a try. Do you take data from map? Is time to arrival just constant + RNG, or is it possible to take into account distance factor?