Ludeon Forums

RimWorld => Mods => Help => Topic started by: Soesah on April 29, 2016, 09:25:35 AM

Title: Making production tables (un) installable
Post by: Soesah on April 29, 2016, 09:25:35 AM
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?
Title: Re: Making production tables (un) installable
Post by: 1000101 on April 29, 2016, 11:59:26 AM
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>
Title: Re: Making production tables (un) installable
Post by: Soesah on May 02, 2016, 07:06:27 AM
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?
Title: Re: Making production tables (un) installable
Post by: 1000101 on May 02, 2016, 04:53:18 PM
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.
Title: Re: Making production tables (un) installable
Post by: RemingtonRyder on May 02, 2016, 07:00:18 PM
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.
Title: Re: Making production tables (un) installable
Post by: Sunny on January 12, 2017, 04:42:44 PM
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?
Title: Re: Making production tables (un) installable
Post by: Sunny on January 28, 2017, 09:15:56 AM
Up  ::)
Title: Re: Making production tables (un) installable
Post by: sulusdacor on January 28, 2017, 10:32:23 AM
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.
Title: Re: Making production tables (un) installable
Post by: Sunny on November 19, 2017, 09:15:11 AM
Thanks!
<rotatable>true</rotatable>
Works great.