Working on my own mod now! I still suck though...

Started by Xyntak, October 17, 2016, 02:28:53 AM

Previous topic - Next topic

Xyntak

I'm trying to make different variations of tool cabinets and different buildings that function the same way but for different skill modifiers. Obviously I came across some bugs, this is a test version so that I know what I'm doing with the rest of the buildings I want to make.

Error Log: https://gyazo.com/1fa24b786e0c319dbb722aa2ad6b569a
XML Sheet: http://pastebin.com/GbwG6MqC

Any help would be awesome, thank you!

Dingo

#1
Seems pretty obvious. You removed the thingClass def which is required, you should add that with a proper class.

Also, do you have a texture in your texture path?

Xyntak

That link is broken just FYI, at least I can't get it. Thing is about the class though, I copy pasted from the vanilla ToolCabinet part and didn't remove anything, just changed values. Is there a resource somewhere that helps me with understanding what the different errors are? I don't want to have to pester you nice folks here on the forums. I do have a texture and I checked the spelling and path this time around. Doesn't look to be messed up (even though I'm currently exhausted)

kaptain_kavern

You had thought about including the abstract base and that is good practise. But in the first bit of your XML files, the definition for buildingbase is lacking at least the tag about ThingClass.

The easiest way to fix this is to copy paste buildingbase def again from Core. It's in  Defs/ThingDefs_Buildings/Buildings_Art.xml

Dingo

LOL my bad I used my local copy.

Apparel
Building_AncientCryptosleepCasket
Building_Art
Building_Battery
Building_Bed
Building_CommsConsole
Building_Cooler
Building_CryptosleepCasket
Building_Door
Building_FermentingBarrel
Building_Grave
Building_Heater
Building_MarriageSpot
Building_NutrientPasteDispenser
Building_OrbitalTradeBeacon
Building_PlantGrower
Building_PoisonShipPart
Building_PowerSwitch
Building_PsychicEmanator
Building_ResearchBench
Building_Sarcophagus
Building_ShipComputerCore
Building_SteamGeyser
Building_Storage
Building_SunLamp
Building_TrapExplosive
Building_TrapRearmable
Building_TurretGun
Building_Vent
Building_WorkTable_HeatPush
Building_WorkTable
Building
Bullet
DropPod
DropPodIncoming
Filth
Fire
Hive
LiquidFuel
Medicine
Mineable
MinifiedThing
MoteDualAttached
MoteInteraction
MoteProgressBar
MoteText
MoteThrown
MoteThrownAttached
Pawn
PersonalShield
Plant
Projectile_DoomsdayRocket
Projectile_Explosive
RectTrigger
Spark
Thing
ThingWithComps
UnfinishedThing


About your question with ToolCabinet, that def uses parentname="buildingbase" which you also use but you deleted <thingClass>Building</thingClass> from your buildingbase for some reason.

Xyntak

So I copied the abstract base from the SimpleBlock tutorial file which doesn't have the thingClass, that's why I didn't have it.

kaptain_kavern

Here is a post that explain, way better than I could, how to deal with parents/abstracts and why we always should copy/paste them from Core (dixit Tynan)

https://ludeon.com/forums/index.php?topic=19499.0

Xyntak

The thingDef error has disappeared, not sure what the fix might be for the graphical one though :/

Dingo

You're using Graphic_Multi, try Graphic_Single instead.

kaptain_kavern

Oh i forgot that one, sorry.

Reading your code I see that you set : "<texPath>Things/AdvancedToolCabinet</texPath>" so you have to put your textures in folder called "YOURMOD/textures/Things/AdvancedToolCabinet".  (I think you got this right)

But there is "<graphicClass>Graphic_Multi</graphicClass>" bit.   
Normally "Multi" is used for an item to have have several textures (plants per example) and imply to have a folder called with the same name sets in <texPath> (and you put your multiple textures in it)

You could try to use Graphic_Single instead but then your <texPath> need to point to the file.

TL,DR : If you have your texture in the right folder, try to switch Graphic_Multi to Graphic_Single

Xyntak

I'm obviously not positive on what multi vs. single does but I had the feeling that since there's a front and side view of the cabinet that I would need to use multi, is that not the case?

kaptain_kavern

Not. Multi is for when you have several textures for one items.
Take this example (from a mod I was working on):

The item defname is CigRoll, the path point to the CigRoll folder (the one you see in the pic - don't mind the 4th files) and I used multi. That is how it works.

What you described is set with the "Rotatable" tags; IIRC

Xyntak

Okay! Thank you very much, I'll look into the rotatable tag and see if I can figure this out properly.

Xyntak

So, it turns out that I did want multi because there's two textures for the tool cabinet, one for the 1x2 position, and one for the 2x1 position. Got it figured out though! Time to see if I can change the color at all

Xyntak

Is there a way to add a new linkableFacility to a vanilla building without breaking other mods that change that building?