Making production tables (un) installable

Started by Soesah, April 29, 2016, 09:25:35 AM

Previous topic - Next topic

Soesah

How can I make the production tables 'moveable', for example like beds, which can be installed and uninstalled. Is there a flag in the XML for it, or is there something else I need to do?

1000101

I've done this for myself ever since minifiable furniture was implemented several alphas ago.

Just copy the defs to a new mod (I call mine "Minified Production") and add the following tag to the xml:

<minifiedDef>MinifiedFurniture</minifiedDef>
(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

Soesah

Thanks, that worked great.

I tried adding the tag to the Name="BenchBase" node, but that had no effect. And why do I need to copy the entire ThingDef? By copying and using the same name, am I replacing or extending the old one?

1000101

If you want to change one thing about a def, you need to copy the entire def.  The way RimWorld works is that it does a complete replacement with the new information supplied.  It needs to do it as a complete replacement as the game doesn't know if you left out a tag because you don't want it or because you aren't changing it want want to keep it the same.  Therefore, it takes the override def (def with the same defName) as is.  Unfortunately there is no "remove-tag tag" feature for xml and coding that in specifically for RimWorld would be a lot of work which is only of use to modders.  Then there is the inevitable "mod A needs tag B but mod C removed tag B" if such a thing was available.
(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

RemingtonRyder

My approach to making worktables moveable was to copy the defs but give the moveable versions their own defs and workgivers. That way if someone else modifies a vanilla worktable, it doesn't conflict.

Sunny

#5
Quote from: 1000101 on April 29, 2016, 11:59:26 AM
Just copy the defs to a new mod (I call mine "Minified Production") and add the following tag to the xml:
<minifiedDef>MinifiedFurniture</minifiedDef>
I make it in my mod. Dismount and reinstall buttons available. Dismount (dump to storage) works fine, but reinstall not working.

Pawns not come to reinstall and no commands to manage it.

Anyone know why it happens?


sulusdacor

there was a small issue with reinstall and rotation. if you have rotate set to false and reinstall stuff (not using the minified button) your pawns will not do the job. if you order them to minfy, they will minify and then reinstall it properly where you previously set the positon to reinstall. you can "fix" this by setting the rotation to true. sounds a bit like that.

Sunny

Thanks!
<rotatable>true</rotatable>
Works great.