Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Kaizyn

#1
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)
#2
Unfinished / [WIP][A13] Trade Caravan revamp
April 28, 2016, 10:15:55 AM
So trading always kind of bugged me slightly, and I decided it was time to change it.  I thought it was weird that traders will only trade in what they bring, rather than trading in what they would need.    I've revamped things and have actual supply & demand from each faction to create something more like an economy, and to actually give you a reason to maintain relations with specific factions.

So some tribe  may have a supply of steel, wood, food, and they want high tech stuff and will pay more for it.   Outlanders may want a mix of things, and can supply some weapons or medicine and things.        Right now you only ever have contact with a few factions, and none of them matter because one Tribe is just like another, and you get the same number of raids/caravans/etc regardless of who you're friends with.

Things have come along well, though I have a bit more to do before an initial usable version is ready.    It's far enough along that I thought it would be worth sharing the status and seeing what people think.


Completed Features:

  • Schedule trade caravans from any non-hostile factions. 
  • Traders want goods other than the types they bring
  • Supply & demand based each faction's situation
  • -- Biome and landform based supply - (for example, traders from mountainous colonies generally have more stone & metals)
  • -- Tech level based supply - Neolithics bring more raw materials, and want higher tech weapons. 
  • Interface to see all factions and their general status (how long until they arrive)
  • Interface to see details of any given faction, showing what their supply & demand is, including quantities and/or prices.


[Newer screenshots, still a few tweaks / changes may come]





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.   


I got fed up with traders always having a blanket price for everything.    Now you'll find traders with 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.    Neoliths will *generally* serve cheaper components, and outlander will often gouge you.





The hard ground work is done, so now I'm just implementing and tweaking things a bit.     Things are basically done and all core features are set.    I'm just finishing some last bits, then I'll do some preliminary testing and put out a test version.    It's totally playable, just lacks some balance.    Traders don't bring huge amounts of stuff, so it's not a free ticket to get everything you want, but there is also nothing to stop you from trading with every faction on the map.    I plan to add something in such that you'll lose goodwill if they show up and you don't trade enough stuff with them, and later on I want them to request specific things from you, and if you don't supply them, they'll be a bit cranky.   



I've gone out of my way to make the mod as non-interfering as possible, in fact I specifically want it to work with some mods (More Factions Spawn would pretty much be a requirement to get the most of this), so all things I've done are new additions.    It shouldn't have any conflict with any other mods that play with storyteller caravans, factions, or trading, except in extreme cases.

No changes to existing storyteller traders have been made, so balancing things may take a little work, even though the storyteller is pretty shy when it comes to sending traders as it is.

Requested caravans will require you to buy a certain value of their goods, or you'll lose a little goodwill  (to help balance, and it's kind of realistic...  you keep asking people to send traders but you don't buy their stuff, they'd get cranky!)   Will do something with this later.   Probably via requests.. they'll ask you to provide them at least X number of prepared meals, or X amount of higher tech weapons, or they leave upset.





Things I want to add, but haven't started working on.   I'd probably release a basic version of the mod before tackling some of these:


  • Dwarf Fortress style trade request system.   Rather than having traders bring a random hodge-podge of 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)
#3
Help / [SOLVED] Building.Tick() not firing
April 26, 2016, 03:56:14 PM
If anyone has a suggestion here, it would be great.    I'm working on a mod and hit an issue - I can't see any obvious reason, but the .Tick() (and  .TickRare() ) functions aren't firing.


    public class Building_TradePost : Building
    {

        public Building_TradePost()
        {
            Log.Message("TradePost initialization - start.");
        }

        public override void Tick()
        {
            base.Tick();
            Log.Message("Ticking");
        }

        public override void ExposeData()
        {
            Log.Message("Expose Data called as " + Scribe.mode.ToString());
           
            if (Scribe.mode == LoadSaveMode.LoadingVars)
            {
                Log.Message("Loading variables called");
                base.ExposeData();
                Scribe_Values.LookValue<bool>(ref RWTradeRequestData.dataGenerated, "dataGenerated", false, false);
            }
           
            if (Scribe.mode == LoadSaveMode.Saving)
            {
                Log.Message("Saving called");
                base.ExposeData();
                Scribe_Values.LookValue<bool>(ref RWTradeRequestData.dataGenerated, "dataGenerated", false, false);
            }           
        }

    }



This is a trimmed down version of the class, I deleted most of the contents and just left a few lines in these functions for examples, but as far as I can tell everything is fine -- the building appears fine, when I interact with it, the window I make pops up and does its stuff, and

ExposeData() runs as expected and my data is loaded & saved without any troubles.

... But .Tick() never gets called ...  I also implemented TickRare() and TickLong() as tests, but they also don't fire.   


I was digging and snooping to see if there was some flag you had to set for a Thing to mark it as being in the queue for Tick calls, but I couldn't find anything so far ...
#4
So I've lurked on the forums for a long time, in particular the modding area, and something I've noticed is that there are no trade system mods to speak of.   I often see people complaining about a lack of traders (even Tynan himself mentioned them being overly scarce in a13) and I found myself constantly hacking the Storyteller XML files a bit to try and increase traders.

Is there any real reason why nobody has modded the trade system at all?    Seems like something people gripe about often, such that there are mining mods made to give sources of steel once you've exhausted your supply due to the lack of traders (or lack of traders of the type you want/need.) and I've seen people asking about ways to have the storytellers send more, etc.


So, I've started on a mod and just laid the basic foundations for it, but I've been wondering if it's worth fleshing out.    I've thought of doing something similar to Dwarf Fortress for the trade caravans of local factions.    That is, you'd request goods and they'd be more inclined to bring those.

At the moment, what I've done allows you to call non-hostile factions and request them to send a trade caravan.   



Features I was thinking about adding, in the rough order I'd do it:

1) Requesting specific items, similar to Dwarf Fortress (priority based, which also increases the price asked for them).    You can only request caravans from factions over a certain reputation, and you need to trade some minimum % of their goods or they'll leave slightly unhappy.   Probably also have a limit of 1 caravan / season / faction or something.

2) Individualize each faction.   Right now there's hardly any meaning in the factions and which ones are hostile or peaceful to you, as you get the same number of raids/hostile events regardless.    I want to make each faction have specific supply & demand items, so you could have meaningful trade, and you may want to make nice with certain people because they're the only ones with plasteel to trade. 

3) Allow you to send your own trade caravans.    Similar to #1, you could set up a trade caravan with things you want to sell and things you want them to buy, then send them to a faction and they'll trade things you requested to you at better rates (since there would be risks involved in sending a caravan, and you'd lose one or more colonists for a while during the trip).   It'd also require tamed animals trained in obedience as pack animals.



This is just a basic outline of what I was thinking - would there be any particular interest in such a mod?    If so, I'll actually look into making it a bit more of a real thing, rather than just a little personal thing for myself.
#5
I noticed something peculiar happening with coolers happening.   Here's the scenario:


2 enclosed rooms.   A and B with a shared wall.

There's a cooler set to -10C on the shared wall, cold side to A and hot side to B.

Outdoor temperature at -15C.


When I load the game, the cooler stays in "High power" mode and room A is -10C always, and room B is around +16C, so what seems to be happening is the cooler is just trying to change the temperature to the target -10C, even though it's already below that.

If I have a pawn flip the power off and then on, it works as expected (cooler goes to low power mode, and room A and B are both around -14C)


Every time I save and reload, the cooler locks A at -10C again, and B goes back up around +15 to +20C.



I do have a few mods, but nothing related to this in any way that I can think of.   (usual fare like UI/Colonist bar, Hospitality, More Factions, Rimfire, Manager ...)


(edited title after further checking revealed it was a bit different)