RimWorld

RimWorld

Movable Sandbags
33 Comments
Nick Molliger Oct 16, 2023 @ 10:53am 
Actually, this works well on 1.4
SMOVA (PCMasterRays) Sep 2, 2023 @ 4:10pm 
PLEASE update this
hsenna Nov 18, 2021 @ 1:12pm 
Update?
Botclone Feb 24, 2020 @ 4:18am 
does it work with 1.1 ?
keylocke Jul 16, 2019 @ 8:27pm 
it doesn't seem to work with cloth sandbags mod
kaptain_kavern  [author] Nov 4, 2018 @ 4:05pm 
Updated to 1.0 !
Thundercraft Nov 3, 2018 @ 6:04am 
Can't MinifyEverything be used to move sandbags? In the comments, the author claims to use it all the time to move walls, so...
gamer nerd Sep 28, 2018 @ 2:29pm 
will this be upadte dto b19? it's such a simple ease-of-life mod, and i wanna have it. :(
dnecro Sep 18, 2018 @ 8:42am 
any update?
Fistandantillus7 Mar 13, 2018 @ 3:26pm 
This makes sense! Duh, it is just a bag of sand.
Showbiz Dec 13, 2017 @ 10:33am 
Sweet!
Arturia Dec 6, 2017 @ 10:35pm 
Thank you, that's cute! \o/
kaptain_kavern  [author] Dec 6, 2017 @ 10:26pm 
You're "featured" in mod's picture above now ;-)
kaptain_kavern  [author] Dec 6, 2017 @ 10:25pm 
So as me but you end up with something more elegant than I did. And I like elegance in code ;-)

Not to mention it's quicker. If all modders switchhave time, knowledge and patience to speed-benchmarks their mods, heavy mod users would gain some serious loading time. Speaking as someone that spend several hours a week helping to debug error logs on reddit ;-)
______

You see how this mod is small? But using sequenced patches like you suggested have cut down the load time from nearly 2 sec - way much than I thought lol, I was ready to switch methods for a couple of ms - So I can only imagine for bigger mods (including some of mines I will upgrade soon now ^^).

And I still wantes to thank you just for being involved ;-) It's a great community we have here
Arturia Dec 6, 2017 @ 10:14pm 
@kaptain_kavern Thanks, I can't take all the credit though. I spent a good time reading this -> https://gist.github.com/Zhentar/4a1b71cea45b9337f70b30a21d868782
kaptain_kavern  [author] Dec 6, 2017 @ 9:09pm 
@Arturia

After doing some test, another added benefit of writing the patch how you suggested is that the mod is loading a tiny bit quicker. 1713ms faster to be exact.

So I switch to the method you suggested. Many thanks for that :-D
kaptain_kavern  [author] Dec 6, 2017 @ 7:52pm 
kaptain_kavern  [author] Dec 6, 2017 @ 7:45pm 
@Arturia

You are correct. In fact I just upload a new version that use something similar (but with an enhanced version of vanilla patchOperation - ModCheck by Nightinggale). It permits me to display a personalised message even, depending on loaded mods.

While conditional statements are not something completely new to me (I'm a coder amateur), I'm just starting to understand how to use the whole system properly.

In fact the whole patching system was just introduced with A17 and technical conversation about xpath patching performance are still rare on the forum. Until recently, mostly because of Nightinggale and his Modcheck mod/tool.

Back to my patch, you are right and I was about to make a similar change.

Thank you for your interest, BTW
Arturia Dec 6, 2017 @ 7:27pm 
@kaptain_kavern Curious, wouldn't using PatchOperationSequence fix this kind of error? I noticed in your patch file you are only using PatchOperationAdd - Woudn't this be better?

<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationTest">
<xpath>/Defs/ThingDef[defName = "Sandbags"]/minifiedDef</xpath>
<success>Invert</success>
</li>
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Sandbags"]</xpath>
<value>
<minifiedDef>MinifiedFurniture</minifiedDef>
</value>
</li>
</operations>
</Operation>
kaptain_kavern  [author] Dec 4, 2017 @ 7:22pm 
You're welcome, mate
Showbiz Dec 4, 2017 @ 5:46pm 
That's it! Thanks for your support
kaptain_kavern  [author] Dec 3, 2017 @ 8:37am 
Are you using "Rainbeau Fertile Field" by any chance? If yes, just disable mine (Fertile Field changes the way sandbags are made and also made them movable). No need for my mod if you're already using FF
Showbiz Dec 3, 2017 @ 2:52am 
Talking abouth this line:

XML error: Duplicate XML node name minifiedDef in this XML block: <ThingDef ParentName="BuildingBase"><defName>Sandbags</defName><label>sandbags</label><thingClass>Building</thingClass><category>Building</category><graphicData><texPath>Things/Building/Linked/Sandbags_Atlas</texPath>(...)
Showbiz Dec 3, 2017 @ 2:50am 
kaptain_kavern  [author] Nov 18, 2017 @ 7:27pm 
Just updated to B18. For user that want to still play in A17, I've added link to older versions (manual installation though)
BioFringe Sep 24, 2017 @ 3:56pm 
Thank you for making this mod. I've used it with pleasure for quite awhile now but I just installed Fertile Fields and have come to realize that this mod has become obsolete to my needs. To anyone not using a conflicting mod I would HIGHLY reccmmend this with a big smile :)
BlueTressym Sep 7, 2017 @ 6:01pm 
Ah, I came here with the same problem as Luinthil and have the answer! Thank you.
Luinithil Aug 6, 2017 @ 7:22am 
@kaptain_kavern I AM using Fertile Fields.. didn't realise that it affected sandbags (really what even lol). Will disable this and KIV for future use. Thanks!
kaptain_kavern  [author] Aug 5, 2017 @ 11:03am 
Then you are using another mod that does the same as this one (mine only does that : adding the minifiedDef so sandbags can be moved). Are you using "Rainbeau Fertile Field" by any chance? If yes, just disable mine (Fertile Field changes the way sandbags are made and also made them movable).

If not it is another one I'm not aware of.
Luinithil Aug 5, 2017 @ 10:10am 
Hi @kaptain_kavern. Have some sandbag related errors after using this mod: <minifiedDef>MinifiedFurniture</minifiedDef> appears twice in sandbag defs.
cammillotto Aug 3, 2017 @ 1:23pm 
upvoted!
CyuglCaesak Jul 31, 2017 @ 3:59am 
I had been thinking strangely that I could not move it, and thank you for making it like this.
Oneira Jul 30, 2017 @ 10:06pm 
Holy fuck you are a beautiful human being. Thank you for this.