RimWorld

RimWorld

Movable Sandbags
33 kommentarer
Nick Molliger 16. okt. 2023 kl. 10:53 
Actually, this works well on 1.4
SMOVA (PCMasterRays) 2. sep. 2023 kl. 16:10 
PLEASE update this
hsenna 18. nov. 2021 kl. 13:12 
Update?
Botclone 24. feb. 2020 kl. 4:18 
does it work with 1.1 ?
keylocke 16. juli 2019 kl. 20:27 
it doesn't seem to work with cloth sandbags mod
kaptain_kavern  [ophavsmand] 4. nov. 2018 kl. 16:05 
Updated to 1.0 !
Thundercraft 3. nov. 2018 kl. 6:04 
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 28. sep. 2018 kl. 14:29 
will this be upadte dto b19? it's such a simple ease-of-life mod, and i wanna have it. :(
dnecro 18. sep. 2018 kl. 8:42 
any update?
Fistandantillus7 13. mar. 2018 kl. 15:26 
This makes sense! Duh, it is just a bag of sand.
Aco 13. dec. 2017 kl. 10:33 
Sweet!
Arturia 6. dec. 2017 kl. 22:35 
Thank you, that's cute! \o/
kaptain_kavern  [ophavsmand] 6. dec. 2017 kl. 22:26 
You're "featured" in mod's picture above now ;-)
kaptain_kavern  [ophavsmand] 6. dec. 2017 kl. 22:25 
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 6. dec. 2017 kl. 22:14 
@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  [ophavsmand] 6. dec. 2017 kl. 21:09 
@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  [ophavsmand] 6. dec. 2017 kl. 19:52 
kaptain_kavern  [ophavsmand] 6. dec. 2017 kl. 19:45 
@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 6. dec. 2017 kl. 19:27 
@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  [ophavsmand] 4. dec. 2017 kl. 19:22 
You're welcome, mate
Aco 4. dec. 2017 kl. 17:46 
That's it! Thanks for your support
kaptain_kavern  [ophavsmand] 3. dec. 2017 kl. 8:37 
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
Aco 3. dec. 2017 kl. 2:52 
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>(...)
Aco 3. dec. 2017 kl. 2:50 
kaptain_kavern  [ophavsmand] 18. nov. 2017 kl. 19:27 
Just updated to B18. For user that want to still play in A17, I've added link to older versions (manual installation though)
BioFringe 24. sep. 2017 kl. 15:56 
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 7. sep. 2017 kl. 18:01 
Ah, I came here with the same problem as Luinthil and have the answer! Thank you.
Luinithil 6. aug. 2017 kl. 7:22 
@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  [ophavsmand] 5. aug. 2017 kl. 11:03 
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 5. aug. 2017 kl. 10:10 
Hi @kaptain_kavern. Have some sandbag related errors after using this mod: <minifiedDef>MinifiedFurniture</minifiedDef> appears twice in sandbag defs.
cammillotto 3. aug. 2017 kl. 13:23 
upvoted!
CyuglCaesak 31. juli 2017 kl. 3:59 
I had been thinking strangely that I could not move it, and thank you for making it like this.
Oneira 30. juli 2017 kl. 22:06 
Holy fuck you are a beautiful human being. Thank you for this.