[Solved][Modding help]Workbench won't show in any category

Started by WolfgangPolska, August 21, 2014, 11:01:09 AM

Previous topic - Next topic

WolfgangPolska

Hello, I'm starting to make my very own quarry mod, but I'm stuck on start :C

Namely my new-quarry-workbench won't show in production category. It is my first mod, so maybe i don't do things right.

Here are the code:

<?xml version="1.0" encoding="utf-8" ?>
<Buildings>

  <!-- Boilerplate -->

  <ThingDef Name="BuildingBase" Abstract="True">
    <category>Building</category>
    <bulletImpactSound>BulletImpactMetal</bulletImpactSound>
    <selectable>true</selectable>
    <drawerType>MapMeshAndRealTime</drawerType>
    <surfaceNeeded>Light</surfaceNeeded>
    <constructionEffect>ConstructMetal</constructionEffect>
    <repairEffect>Repair</repairEffect>
  </ThingDef>

  <!-- Smelter building definition -->

  <ThingDef ParentName="BuildingBase">
    <DefName>BuildingQuarry</DefName>
    <EType>BuildingComplex</EType>
    <Label>Quarry</Label>
    <ThingClass>Building</ThingClass>
    <Description>A quarry to dig up stuff.</Description>
    <TexturePath>Things/Building/TableStonecutter</TexturePath>
    <CostList>
      <li>
        <thingDef>Stone</thingDef>
        <count>30</count>
      </li>
    </CostList>
    <AltitudeLayer>BuildingTall</AltitudeLayer>
    <WorkToBuild>600</WorkToBuild>
    <maxHealth>200</maxHealth>
    <Size>(4,4)</Size>
    <surfaceNeeded>Heavy</surfaceNeeded>
    <DesignationCategory>Production</DesignationCategory>
    <Passability>Impassable</Passability>
  </ThingDef>
</Buildings>


Oh, yes. I'm using sample from wiki modding tutorial.
Found here:http://rimworldwiki.com/wiki/Modding_Tutorials/Smelter
I have no idea how, but it works!!!

Haplo

It can be the size. I don't know if it still is a problem, but it wasn't possible to build a workbench that was deeper than 1..2... Something like that.
Try it with 1x1 and look if it is available then.

WolfgangPolska

#2
Thank you, I'll try it in minute and say if it worked

Edit: Nah, it still dont work :C
I have no idea how, but it works!!!

Haplo

Hmm, can it be, that the tutorial is a bit out of date? I've tried to get it to work, without success.
I'm sorry, but I couldn't bring yours to show up. There were a few errors because of the old file version. But still.. Strange..

My suggestion: Take an alpha 6 mod and tinker with its thing defs a bit.
I think my workplaces would come rather close to what you wanted to make.

Rikiki

Hi!

I'm also modding a kind of quarry building and ran in the same problem.
You can't for now have a workbench with a height greater than 2
=>  <Size>(8,2)</Size> will be OK
=>  <Size>(8,3)</Size> will be KO

I bypassed this problem with the Overdraw set to true but you then run into some other problem: the placement restrictor to avoid... overdraw with other quarries! ;D

I also noticed you use the Building class. It should obviously be a custom DLL class (like <ThingClass>Deepdriller.Building_DeepdrillerMachine</ThingClass>) or just Building_WorkTable for a standard worktable.

Good luck!

WolfgangPolska

Oh, thank ya :) I'd ask also, Is it possible to make quarry require rock near it to be built?
I have no idea how, but it works!!!

Rikiki

Yep!
Just use a custom placement restricter
There are some exemples in the forum here: http://ludeon.com/forums/index.php?topic=3449

WolfgangPolska

I think, I'll surrender :C I've tried everything. But it just won't work. I even copied vanilla crematorium text to my file, and changed only defname and label, and it won't work too :C.

Here are mod files, maybe they are just wrong construted:

[attachment deleted by admin: too old]
I have no idea how, but it works!!!

Rikiki

You don't use a correct template.

Here is a correct example:


<Buildings>

<ThingDef Name="BuildingBase" Abstract="True">
<category>Building</category>
                <soundBulletHit>BulletImpactMetal</soundBulletHit>
<selectable>true</selectable>
<drawerType>MapMeshAndRealTime</drawerType>
<surfaceNeeded>Light</surfaceNeeded>
<constructionEffect>ConstructMetal</constructionEffect>
<repairEffect>Repair</repairEffect>
</ThingDef>

<ThingDef ParentName="BuildingBase">
<defName>Mine_pozioma</defName>
<EType>Building_WorkTable</EType>
<Label>A wonderful quarry</Label>
                ...


I strongly recommend to base your work on the Glassworks mod which is quite complete (worktable, resource, research, recipe, filth...): http://ludeon.com/forums/index.php?topic=3223.0

RawCode

you must place your xml into subfolder ThigDefs

also you can read my article about database assembler generic rules here:
http://ludeon.com/forums/index.php?topic=5641.0

WolfgangPolska

GLOURIUS VITORY!! :D:D
And now run into another problem :C. In production menu there is icon, and name, but i can't click on it :/
I have no idea how, but it works!!!

WolfgangPolska

Yah, thanks everyone for help, especially for Rikiki. Well I have a lot moooooore erros to solve but this one is over.

Everyone, have a  cookie :)
I have no idea how, but it works!!!