TwitchBot and Trading Spot updated today? Ubie’s been busy!

So, yeah…exactly as the name says.  I got around to doing some maintenance work on mods today, rather than working on new features.

Trading spot has been plagued by an issue in Tynan’s code that caused trader’s LordJob defs to be orphaned from time to time.  For example, this is a healthy non-orphaned lordjob in the save file:

<li>
	<loadID>1</loadID>
	<faction>Faction_8</faction>
	<ownedPawns>
		<li>Thing_Human62340</li>
		<li>Thing_Muffalo62373</li>
		<li>Thing_Muffalo62374</li>
		<li>Thing_Human62356</li>
		<li>Thing_FoxFennec62365</li>
		<li>Thing_Monkey62369</li>
		<li>Thing_Monkey62367</li>
		<li>Thing_Human62354</li>
		<li>Thing_FoxFennec62366</li>
		<li>Thing_Human62358</li>
		<li>Thing_FoxFennec62368</li>
		<li>Thing_Human62375</li>
		<li>Thing_Human62381</li>
		<li>Thing_Human62391</li>
	</ownedPawns>
	<lordJob Class="LordJob_TradeWithColony">
		<faction>Faction_8</faction>
		<chillSpot>(118, 0, 102)</chillSpot>
	</lordJob>
	<ticksInToil>591</ticksInToil>
	<numPawnsEverGained>14</numPawnsEverGained>
	<initialColonyHealthTotal>31450</initialColonyHealthTotal>
	<extraForbiddenThings />
	<lordToilData>
		<keys>
			<li>0</li>
			<li>1</li>
			<li>2</li>
			<li>4</li>
			<li>5</li>
		</keys>
		<values>
			<li Class="Verse.AI.Group.LordToilData_Travel">
				<dest>(118, 0, 102)</dest>
			</li>
			<li Class="Verse.AI.Group.LordToilData_DefendPoint" />
			<li Class="Verse.AI.Group.LordToilData_DefendPoint">
				<defendPoint>(111, 0, 121)</defendPoint>
			</li>
			<li Class="Verse.AI.Group.LordToilData_ExitMap" />
			<li Class="Verse.AI.Group.LordToilData_ExitMap">
				<locomotion>Walk</locomotion>
				<canDig>True</canDig>
			</li>
		</values>
	</lordToilData>
	<triggerData>
		<keys>
			<li>4</li>
			<li>5</li>
			<li>7</li>
		</keys>
		<values>
			<li Class="Verse.AI.Group.TriggerData_TicksPassed" />
			<li Class="Verse.AI.Group.TriggerData_TicksPassed" />
			<li Class="Verse.AI.Group.TriggerData_TicksPassed" />
		</values>
	</triggerData>
	<curLordToilIdx>0</curLordToilIdx>
</li>

And this is from a bugged save file:

<li>
	<loadID>139</loadID>
	<faction>Faction_8</faction>
	<ownedPawns />
	<lordJob Class="LordJob_TradeWithColony">
		<faction>Faction_8</faction>
		<chillSpot>(28, 0, 63)</chillSpot>
	</lordJob>
	<ticksInToil>1109768</ticksInToil>
	<numPawnsEverGained>12</numPawnsEverGained>
	<initialColonyHealthTotal>826269</initialColonyHealthTotal>
	<extraForbiddenThings />
	<lordToilData>
		<keys>
			<li>0</li>
			<li>1</li>
			<li>2</li>
			<li>4</li>
			<li>5</li>
		</keys>
		<values>
			<li Class="Verse.AI.Group.LordToilData_Travel">
				<dest>(116, 0, 38)</dest>
			</li>
			<li Class="Verse.AI.Group.LordToilData_DefendPoint" />
			<li Class="Verse.AI.Group.LordToilData_DefendPoint">
				<defendPoint>(116, 0, 38)</defendPoint>
			</li>
			<li Class="Verse.AI.Group.LordToilData_ExitMap" />
			<li Class="Verse.AI.Group.LordToilData_ExitMap">
				<locomotion>Walk</locomotion>
				<canDig>True</canDig>
			</li>
		</values>
	</lordToilData>
	<triggerData>
		<keys>
			<li>4</li>
			<li>5</li>
			<li>7</li>
		</keys>
		<values>
			<li Class="Verse.AI.Group.TriggerData_TicksPassed" />
			<li Class="Verse.AI.Group.TriggerData_TicksPassed">
				<ticksPassed>43528</ticksPassed>
			</li>
			<li Class="Verse.AI.Group.TriggerData_TicksPassed">
				<ticksPassed>54</ticksPassed>
			</li>
		</values>
	</triggerData>
	<curLordToilIdx>3</curLordToilIdx>
</li>

 

As you see, the bugged file has no pawns it owns, yet it still exists.  What’s worse is that without any pawns to trigger the exitmap condition, it will NEVER go away.  It’s annoying to say the least.

I also implemented a fix to prevent the animals the traders bring with them from eating all the food you just bought.  And your crops.  And everything in your freezer.  The traders themselves usually bring their own meals, but they let their animals fend for themselves.  There’s NOTHING more aggravating than having a starving colony that is saved by a trade caravan selling it food, only to be doomed again because their greedy muffalos eat all the food you just bought.

As for TwitchBot, I fixed the bug that was causing most people’s mod lists to fail.  I wasn’t checking the out going messages for length, so people with long mod lists were sending messages too long for IRC to handle.  That should be fixed.  Also, I have figured out the whisper system, so I’d like to get some input from streamers:  Do you want to be able to have commands replied to via whisper to keep your channel clean?  The only down side to using that is that if you are using your primary twitch user as your bot, you’re going to get a whisper popup every time it replies.

I’ll go with whatever the majority wants to go with.

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

View our Privacy Policy