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

Messages - Stolij

#1
Quote from: Master Bucketsmith on September 20, 2016, 12:25:26 PM
Quote from: Stolij on September 20, 2016, 12:19:48 PM
First i tried in <graphicData> then it said there was no such function as "<rotatable>"
Then i tried it in the <ThingDef ParentName="Buildingbase"> and it didnt give a error, but once i tried to build the table it gave the same error as before.
Yeah it goes anywhere under the ThingDef tags, but not inside other tags.

Anyways, try removing the placeworker lines. You can comment them out for testing.
It's looking for linked facility buildings when the comps say there is no such property to your workbench.

Unless you want it to be affected by other buildings, in which case you have to add the second snippet I posted before and change ToolCabinet to the defname of the special structure you want it to link to.
removing the linked facility buildings (which were none) helped, now it does not give the error anymore, Thanks!
#2
First i tried in <graphicData> then it said there was no such function as "<rotatable>"
Then i tried it in the <ThingDef ParentName="Buildingbase"> and it didnt give a error, but once i tried to build the table it gave the same error as before.
#3
Is it actually possible to make a rotatable object from one picture?
#4
Quote from: Master Bucketsmith on September 20, 2016, 12:01:13 PM

Hah. It does look a bit weird - I thought you forgot </graphicData> at first, but it was further down.

Okay, so I take it you have  a folder called Textures in your modfolder?
And within that folder lies; Things/Building/Production/PowerCellProduction/PowerCellProductionTable.PNG?
thats correct, but it gives the exception in the first post when i try to place the production table (it does place if i turn off debug log auto-open) also the texture does show
#5
well this is what i have:
(looks a bit wierd here)
<?xml version="1.0" encoding="utf-8" ?>

<ThingDefs>

<ThingDef ParentName="BuildingBase">
<defName>PowerCellCreator</defName>
<label>Power Cell Creator Table</label>
<ThingClass>Building_WorkTable</ThingClass>
<Description>A High tech table to create Transcendent Power Cells.</Description>
<graphicData>
<texPath>Things/Building/Production/PowerCellProduction/PowerCellProductionTable</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>(3,1)</drawSize>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
</graphicData>
<CostList>
<Steel>500</Steel>
            <Component>10</Component>
            <SpecificComponents>10</SpecificComponents>
            <Gold>5</Gold>
            <Plasteel>20</Plasteel>
        </CostList>
<AltitudeLayer>Building</AltitudeLayer>
<fillPercent>0.5</fillPercent>
<useHitPoints>True</useHitPoints>
<statBases>
<WorkToMake>7000</WorkToMake>
<MaxHitPoints>600</MaxHitPoints>
<Flammability>1.0</Flammability>
</statBases>
<Size>(3,1)</Size>
<DesignationCategory>Production</DesignationCategory>
  <passability>PassThroughOnly</passability>
<pathCost>70</pathCost>
<hasInteractionCell>True</hasInteractionCell>
<interactionCellOffset>(0,0,-1)</interactionCellOffset>
<surfaceType>Item</surfaceType>
<recipes>
<li>CreateTranscendentPowerCell</li>
</recipes>
<inspectorTabs>
<li>ITab_Bills</li>
</inspectorTabs>
<building>
<spawnedConceptLearnOpportunity>BillsTab</spawnedConceptLearnOpportunity>
</building>
        <comps> 
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <startElectricalFires>true</startElectricalFires>
        <shortCircuitInRain>true</shortCircuitInRain>
        <basePowerConsumption>2000</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
        </comps>
    <researchPrerequisites>
    <li>TranscendentPowerStorage</li>
    <li>MicroelectronicsBasics</li>
    </researchPrerequisites>
    <placeWorkers>
<li>PlaceWorker_ShowFacilitiesConnections</li>
</placeWorkers>
</ThingDef>


</ThingDefs>
#6
Quote from: Master Bucketsmith on September 20, 2016, 09:27:57 AM
Oof, without context, I'm not able to pitch in much.
What are you modifying?

A building like a vitals monitor?
Well its for a production table
#7
could someone help me with this error?

Exception in UIRootUpdate: System.NullReferenceException: Object reference not set to an instance of an object at
RimWorld.CompFacility.DrawLinesToPotentialThingsToLinkTo iVerse.ThingDef myDef.IntVec3 myPos.Rot4 myRot) [0x00000] in <filename unknown>:0


Any help is appreciated.
#8
Thanks masterbucketsmith for the reply, but i dont know how to child a item to another. could you maybe explain how to do that?
#9
i got a comment on my steam workshop page saying that the battery i made did not satisfy the
"need batteries" message on the right hand side above the time controls, how could i fix this?

any help is really appreciated.
#10
I was looking at a suggestion from one of my steam workshop items, but to make the mod work i need to check if a cryptosleep casket contains a colonist, but i dont have that much experience with dll modding rimworld, my question is: How do you check if a cryptosleep casket contains a colonist and if so do something else.

Any help is really appreciated.
#11
well i have this public class Class1 : ThingWithComps
    {
        private Hediff foundAddiction = null;
        private Pawn OwnerPawn = null;
        public override void Tick()
        {
            foreach (Hediff Addiction in OwnerPawn.health.hediffSet.GetHediffs<Hediff>())
            {
                if (Addiction is Hediff_Addiction)
                {
                    foundAddiction = Addiction;
                    OwnerPawn.health.hediffSet.hediffs.Remove(foundAddiction);
                }
            }
        }
#12
actually im trying to make a drug that removes all addictions, but it probably does not know which pawn to remove the addiction from, so it doesn't.
#13
Quote from: Master Bucketsmith on September 01, 2016, 08:31:39 AM
Ah, I see. :)
Have you looked at existing items to what you're trying to achieve and traced the code?
ILSpy will allow you to click on names and it'll show you where it's defined. Can be helpful figuring out how vanilla does it.
(I do use ILSpy) I looked in the workshop and the forum, the Dermal Regenerator (by Skullywag) does remove hediffs but is a building instead of an item.
#14
Quote from: Master Bucketsmith on September 01, 2016, 07:22:51 AM
Well, what exactly is your question?
my question is
How do you get which colonist used an item (like drugs etc)
#15
i was getting into dll modding rimworld,
but i have no idea how to get which pawn used an item.

Sorry if this is a dumb/obvious question.


Any help is really appreciated.