[1.3.0] Hospitality

Started by Orion, March 13, 2015, 11:19:16 AM

Previous topic - Next topic

harpo99999

orion, I am getting lots of errors and a spamming of visitors are leaving, when they start to leave ,and they do not, they just stay on the map till they  and their animals die(using the 1.17a on a a17b rimworld with many other mods)

Orion

Yeah visitors are not supposed to have animals. So some mod is adding them and that's most likely messing things up for you.

gariba

#1652
I've had that same error, I have a mod that adds animals to the game.
Quote from: Orion on June 08, 2017, 05:21:57 AM
Yeah visitors are not supposed to have animals. So some mod is adding them and that's most likely messing things up for you.
On that note, I found something on said mod that may be the cause of this bug:
<Operation Class="PatchOperationAdd"> <!-- Insert Rare animals in traders stock  -->
<xpath>/DefPackage-TraderKindDef/TraderKindDef[defName = "Base_Neolithic_Standard" or "Base_Outlander_Standard" or "Caravan_Neolithic_WarMerchant" or "Caravan_Neolithic_Slaver" or "Caravan_Outlander_PirateMerchant" or "Caravan_Outlander_Exotic" or "Orbital_BulkGoods" or "Orbital_Exotic"]/stockGenerators</xpath>
<value>
<li Class="StockGenerator_Animals">
<checkTemperature>true</checkTemperature>
<tradeTags>
<li>CK_RareAnimal</li>
</tradeTags>
<kindCountRange>
<min>1</min>
<max>3</max>
</kindCountRange>
<countRange>
<min>2</min>
<max>6</max>
</countRange>
</li>
</value>
</Operation>

So basically, it tells caravans and traders to bring animals with them for trading. I'll try removing this piece of code, and I'll post the results later.

EDIT: Yep, removing that piece of code solved it. For clarification, I'm using the TropiCKAPP Rainforest Mod.
So it seems anything that modifies visitor groups to include animals can cause this bug.

DariusWolfe

A bug, or at least I'd assume it's not intended behavior: I rarely recruit, but today, one of my colonists and one of the visitors became lovers; Faction relationship was at 29, so I went ahead and took the chance, and boom, instant success. However, the pawn I recruited was the trader from the party, and now I've got all of the stuff they were carrying, including the stuff I already sold them; It just dropped on the ground where they stood.

Wraithling

I believe it isn't a bug, or at least I hope it is working as intended  ;D  I've discovered that whenever I successfully persuaded someone to join, I also get everything in that person's inventory.

@ Orion: I've accidentally found a minor exploit on the recruiting system. With A17's mechanics rewarding us for forming caravans to raid and explore the map, I just need to send out 6 of my 10 colonists (4 colonists remaining in base) to reduce the recruiting difficulty from '3 friends needed' to '1 friend needed'. I'm sooo tempted to do it >.<

Orion

@Gariba: Thanks for looking into it! I'm glad you could find the source.
@Darius: It's sorta intended but can be exploited sometimes. I could try and make the trader harder to convince or give more penalty.
@Wraithling: That's a good one. I've seen it too, but in the moment it made sense. I had started a temporary colony with one poor survivor from a caravan, and being able to convert some people to the cause was a blessing. But yeah, quickly stuffing some people into a caravan to make recruiting easier is clearly an exploit. Not sure yet how to solve this one.
Maybe they have to travel at least x tiles away from the base, or they will still count.

DariusWolfe

Would it be doable to have visitors who have items to trade (as opposed to just carrying around with them) to have a pack animal that holds most of the trade goods? I don't really think the trader being harder to convince is the right solution, especially in this case; I didn't want Moon to be separated from his newfound lover, after all.

I think I just sort of assumed there was a "trader" inventory, but now that I think about it, I realize that was probably never the case, even in vanilla; That's why large trading caravans always brought so many people. It wasn't about protection (at least, not entirely) but largely about carrying capacity.

Orion

I'd rather remove the trader from visitors. Adding in the animals is tricky for me.

Canute

Other people recruit visitors because they got some Masterwork/legendary items, or because they got very good stats.

How much values does these tradegood got on the visitor, maybe a few hundret silver. Not realy much, ok some other got less scruple and just kill them if they got any that they want.


Orion

True. I'm thinking in terms of how much work a solution will be.

kaptain_kavern

Quote from: Gariba
Quote from: Orion on June 08, 2017, 05:21:57 AM
Yeah visitors are not supposed to have animals. So some mod is adding them and that's most likely messing things up for you.
On that note, I found something on said mod that may be the cause of this bug:
<Operation Class="PatchOperationAdd"> <!-- Insert Rare animals in traders stock  -->
<xpath>/DefPackage-TraderKindDef/TraderKindDef[defName = "Base_Neolithic_Standard" or "Base_Outlander_Standard" or "Caravan_Neolithic_WarMerchant" or "Caravan_Neolithic_Slaver" or "Caravan_Outlander_PirateMerchant" or "Caravan_Outlander_Exotic" or "Orbital_BulkGoods" or "Orbital_Exotic"]/stockGenerators</xpath>
<value>
<li Class="StockGenerator_Animals">
<checkTemperature>true</checkTemperature>
<tradeTags>
<li>CK_RareAnimal</li>
</tradeTags>
<kindCountRange>
<min>1</min>
<max>3</max>
</kindCountRange>
<countRange>
<min>2</min>
<max>6</max>
</countRange>
</li>
</value>
</Operation>

So basically, it tells caravans and traders to bring animals with them for trading. I'll try removing this piece of code, and I'll post the results later.

EDIT: Yep, removing that piece of code solved it. For clarification, I'm using the TropiCKAPP Rainforest Mod.
So it seems anything that modifies visitor groups to include animals can cause this bug.

Hi Orion, I'm the author of the concerned mod.  Could you help me to understand this a bit more please ?

My patch "only" add another StockGenerator for animals into TraderKind that were already had one. I'm not sure I understand how modifying traderStock change Visitors at all.

Thank you for your time

E_T

Hello,

Love your mod...

Anyways, I recently had an issue with this mod.  I am running the A17b version with your 1.17a mod version.  In my current game, I am running Randy Rough Rich Survivor game.  I recently had two issues:

1) while still by myself and having just recently gotten my first prisoner, I had a visiting group, about 7 to 9 in the group and I was caught flat footed trying to get accommodations up (did not satisfy).  The group sizes should be limited in the early game, so as to allow You to try to have or be able to get something together when your very limited as to what might be expected of you at that time.  That or a score weight handicap for the early game that is reduced to zero after a set time (let's say based on difficulty level, etc), that way you don't get as bad of a score in the very early game...

2) After having set up some accommodations, have gotten 3 to 4 more colonist on board and was able to house a large group (or was just about to finish the last of the beds for them - group was 7 to 8 IIRC), an ADDITIONAL group of even more people showed up (IIRC same faction) and I just could not put them anywhere, while in the middle of a mid-spring cold snap.  I could not build the beds fast enough and several slept outside in the freezing cold....

Anyways, thought that you should know....
WIP

DariusWolfe

I wonder if visitor group size scales by wealth? My first two groups were only a couple people each; If you're playing Rich Explorer, that might explain a large initial group size.

You can also plop down sleeping spots and designate them as guest-use to avoid visitors sleeping outside. (Love this modification, btw; I recall you said at one point you couldn't do it, so whatever changed is a welcome change)

Orion

@E_T: Use sleeping spots to make sure visitors have space to sleep. This will remove the -15 for no beds. The large group size is because you use Randy Random. "Normal" storytellers build up the size over time.

@Darius: I don't know the exact formula for group sizes. I'm using the vanilla function for generating them. It took me quite some effort to make any bed work with Hospitality, but now that it's there, it will work even with 3rd party beds. So for all I care, create a 4 unit size rumbling massage bed for guests, or cheap sleeping bags that only cost 10 leather.

@kaptain_kavern: The issue here is that visitors are modified a lot for Hospitality. But the animals they bring apparently not. Usually guests never have animals to trade (only caravans do). So guests will break when they bring animals along. This also applies if the player is allowed to sell them animals.

Orion

Version 1.17c
There's an update with some minor fixes.