Is BuildingBase required?

Started by hoochy, April 18, 2016, 01:33:05 PM

Previous topic - Next topic

hoochy

I see that in many mods they define their own "BuildingBase". However in Alpha 13 at least I can't seem to find the base definition of it. Does anyone know the .XML it is in or is it is just some standard you don't have to worry about? My own mod uses it as a parent and it seems to work, even though I didn't define it.

RemingtonRyder

It is defined in Buildings_Art as follows. I don't know if it's the true base definition though.

  <ThingDef Name="BuildingBase" Abstract="True">
    <category>Building</category>
    <thingClass>Building</thingClass>
    <soundImpactDefault>BulletImpactMetal</soundImpactDefault>
    <selectable>true</selectable>
    <drawerType>MapMeshAndRealTime</drawerType>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <repairEffect>Repair</repairEffect>
    <leaveResourcesWhenKilled>true</leaveResourcesWhenKilled>
    <filthLeaving>BuildingRubble</filthLeaving>
  </ThingDef>


You don't have to worry about it, no. All of this is pretty standard stuff.

1000101

Abstract definitions are shared by all files in the same directory.  You can't unfortunately, have a file which is nothing but abstract definitions.  There must be at least one "complete" def in the file.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

hoochy

#3
Ok thanks for finding it ! Explorers "find in files" option is so useless! And I'm assuming it is in building_art because that is the first file? Is there a reason my object is working fine, even though I don't have that definition, yet I have declared it as a parent? There is no warning, is it using the definition found in buildings_art in core ?

Is it "proper" to declare my own or just use whatever it is using atm if it works?

Rock5

I came here looking for a solution to a problem but this topic helped me solve it. So I can answer your question, well sort of.

I was literally adding just 1 line to the Wall def. I saw that absence of BuildingBase definitions so I left it out in my mod. The problem I was having was walls now have the Re-install and Uninstall designations which is not what I wanted. After reading this topic it occurred to me I didn't actually try it with the BuildingBase added. So I added it and now it works as intended.

So my answer to you is, yes, you need to define the BuildingBase or you might get unexpected results.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

Nictis

Quote from: Rock5 on April 20, 2016, 01:05:56 AM
I came here looking for a solution to a problem but this topic helped me solve it. So I can answer your question, well sort of.

I was literally adding just 1 line to the Wall def. I saw that absence of BuildingBase definitions so I left it out in my mod. The problem I was having was walls now have the Re-install and Uninstall designations which is not what I wanted. After reading this topic it occurred to me I didn't actually try it with the BuildingBase added. So I added it and now it works as intended.

So my answer to you is, yes, you need to define the BuildingBase or you might get unexpected results.
And yet you have found a colony of lego, the ultimate trap for sappers and resource saviors.

Now if only there was a way to mass reinstall...