Quote from: Master Bucketsmith on September 20, 2016, 12:25:26 PMremoving the linked facility buildings (which were none) helped, now it does not give the error anymore, Thanks!Quote from: Stolij on September 20, 2016, 12:19:48 PMYeah it goes anywhere under the ThingDef tags, but not inside other tags.
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.
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.
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.
Pages1 2
#1
Help / Re: Using one sprite for a rotatable object gives a error
September 20, 2016, 01:22:54 PM #2
Help / Re: Using one sprite for a rotatable object gives a error
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.
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
Help / Re: Using one sprite for a rotatable object gives a error
September 20, 2016, 12:13:49 PM
Is it actually possible to make a rotatable object from one picture?
#4
Help / Re: Using one sprite for a rotatable object gives a error
September 20, 2016, 12:05:01 PMQuote from: Master Bucketsmith on September 20, 2016, 12:01:13 PMthats 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
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?
#5
Help / Re: Using one sprite for a rotatable object gives a error
September 20, 2016, 11:55:03 AM
well this is what i have:
(looks a bit wierd here)
(looks a bit wierd here)
Code Select
<?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
Help / Re: Using one sprite for a rotatable object gives a error
September 20, 2016, 09:54:51 AMQuote from: Master Bucketsmith on September 20, 2016, 09:27:57 AMWell its for a production table
Oof, without context, I'm not able to pitch in much.
What are you modifying?
A building like a vitals monitor?
#7
Help / Using one sprite for a rotatable object gives a error
September 20, 2016, 04:33:07 AM
could someone help me with this error?
Any help is appreciated.
Code Select
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>:0Any help is appreciated.
#8
Help / Re: modded battery does not satisfy the "need batteries" message on the right
September 11, 2016, 04:29:47 AM
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
Help / modded battery does not satisfy the "need batteries" message on the right
September 11, 2016, 02:24:03 AM
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.
"need batteries" message on the right hand side above the time controls, how could i fix this?
any help is really appreciated.
#10
Help / How do you check if a cryptosleep casket contains a colonist?
September 03, 2016, 06:28:12 AM
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.
Any help is really appreciated.
#11
Help / Re: rimworld dll modding: getting the pawn that used an item
September 01, 2016, 03:57:38 PM
well i have this
Code Select
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
Help / Re: rimworld dll modding: getting the pawn that used an item
September 01, 2016, 02:40:13 PM
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
Help / Re: rimworld dll modding: getting the pawn that used an item
September 01, 2016, 09:05:28 AMQuote from: Master Bucketsmith on September 01, 2016, 08:31:39 AM(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.
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.
#14
Help / Re: rimworld dll modding: getting the pawn that used an item
September 01, 2016, 07:35:54 AMQuote from: Master Bucketsmith on September 01, 2016, 07:22:51 AMmy question is
Well, what exactly is your question?
How do you get which colonist used an item (like drugs etc)
#15
Help / rimworld dll modding: getting the pawn that used an item
September 01, 2016, 07:04:11 AM
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.
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.
Pages1 2
