(Not) Working with Traders

Started by Nasikabatrachus, March 09, 2014, 07:05:27 PM

Previous topic - Next topic

Nasikabatrachus

So I added some new Things which I'd like to be able to buy from and sell to traders as commodities, but when I open the trading interface and try to do it, well:

http://puu.sh/7psiZ.png

Here's a sample ThingDef:

<ThingDef Name="CrateBase" Abstract="True">
<eType>Debris</eType>
<category>Item</category>
<thingClass>ThingWithComponents</thingClass>
<altitudeLayer>Item</altitudeLayer>
<passability>PassThroughOnly</passability>
<fillPercent>0.4</fillPercent>
<maxHealth>100</maxHealth>
<selectable>true</selectable>
<neverMultiSelect>false</neverMultiSelect>
<pathCost>55</pathCost>
<overdraw>false</overdraw>
<comps>
<li><compClass>CompForbiddable</compClass></li>
</comps>
<drawerType>MapMeshOnly</drawerType>
<naturalBuilding>true</naturalBuilding>
<randomizeRotationOnSpawn>false</randomizeRotationOnSpawn>
<designateHaulable>false</designateHaulable>
<dropSound>Interaction/Haul/JunkDrop</dropSound>
<saveCompressible>true</saveCompressible>
<stackLimit>1</stackLimit>
</ThingDef>


<ThingDef ParentName="CrateBase">
<defName>PotatoCrate</defName>
<label>Potato Crate (300)</label>
<basePrice>250</basePrice>
<textureFolderPath>Things/Item/PotatoCrate</textureFolderPath>
<alwaysHaulable>true</alwaysHaulable>
<storeCategories>
<li>PlantFoodRaw</li>
</storeCategories>
</ThingDef>


And here it is in the Trader Def:

<li>
<itemDef>PotatoCrate</itemDef>
<dropPriceModifier>Cheap</dropPriceModifier>
<amountMin>2</amountMin>
<amountMax>4</amountMax>
</li>


Am I doing something wrong, or is this impossible to do in Alpha 2?

Tynan

Looks like your ThingDef has no defName.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Nasikabatrachus

Thanks. Looks like my texture problem was using texturefolderpath and the other bugs were a result of using the debris base rather than the resource base for the parent.

hawkwing

 ::) That's a nice texture pack you've got there... Loving the high-contrast.
Rimworld mods are now available on The Nexus!
Rimworld Nexus
(Goodbye, 600kb upload limit!)