RimWorld

RimWorld

Dismantle Ancient Junk
174 Comments
veoba 5 Sep @ 4:33am 
Thanks anyway, Proxyer!
Proxyer  [author] 4 Sep @ 4:09pm 
You can see the details of what this mod does by looking at the files yourself. If you want to know more, I recommend asking questions on the official Rimworld Discord.

I won't be technical information in comments.
Proxyer  [author] 4 Sep @ 3:54pm 
Update : 5 Sep, 2025
v1.6.12
- Added Cinders of the Embergarden compatibility, and now ancient vehicles, ancient tanks, and war strikers will drop resources when dismantled. But, while destroying them will drop 100%, dismantling them will only drop 50% of the resources due to RimWorld's specifications. If you want to fully recover the resources, destroy them.

@veoba
Done. :cupup:
Due to RimWorld's specifications, only 50% of the resources can be recovered when dismantled.
veoba 4 Sep @ 2:48pm 
Wait. You know. If you destroy this cinder junk then you get special resource and some items. Will your patch do something with this? Or dismantling and destroying - two dif pages in code?
Proxyer  [author] 4 Sep @ 2:38pm 
@veoba
I've checked Cinders of the Embergarden . Fortunately, there are items that drop when destroyed, so it seems possible to deal with them.

The reason why nothing is dropped during dismantling is that it can be dismantled by calling "NonDeconstructibleAncientBuildingBase", but there is no material cost setting. I can solve this problem by specifying the appropriate cost.

I will create a patch to add the building cost set in the mod. Please wait a moment.
Proxyer  [author] 4 Sep @ 2:22pm 
Hello veoba.
It's simply because you haven't created a patch for that mod.

I haven't created a general-purpose patch for ancient buildings/objects because it has too much impact on patching the wrong ones and because it is not possible to set material costs. The results of that patch were terrible in testing.

So, even if it's a hassle, I will checked each mod patch it. I check the relevant mod.
veoba 4 Sep @ 11:02am 
I have a question. This mod in my list: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3421959154
So - there is ancient remains from this mod which one, when i disassemble them, gives nothing - just zero. I placed 100 of them by using devmod and not a single one droped something. Can this mods conflict with each other? For example - vanilla remains give junk very well
Proxyer  [author] 29 Aug @ 8:27pm 
Hello Malnormalulo.
Thank you for reporting this.

The original materials for the ancient structures added in Odyssey are based on parts for gravity ships and other structures that players can construct (because they were not originally designed to be dismantled).

As a result, if you dismantle them and they drop valuable items, that's because they are materials for the modern structures of the same name.

Indeed, for objects that have stopped functioning and are thousands of years old, like ancient cars, there may be more junk that is actually unusable. I will consider the materials and quantities for Odyssey's structures. It may take some time, including testing.
Malnormalulo 29 Aug @ 6:51pm 
Just noticed that some of the Odyssey buildings got (very valuable) drops added to them, where before they wouldn't drop anything. Any chance of making that optional? I really just use this mod so I can get rid of junk without having a pawn spend half a day shooting it — I wasn't really looking for it to tempt me with an easy source of advanced components that doesn't exist in vanilla.
Proxyer  [author] 11 Aug @ 8:31am 
@Sithgrim
Compatibility patches with other vehicle mods will be applied without any issues as they do not overlap.
The patches that overlap are those related to ancient cars from the Core and DLC.

Probably because the URL was copied and pasted outside of the Steam client, causing duplicate HTTPS.

VVE - Deconstructable Vehicles Junk
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3108171008
Sithgrim 11 Aug @ 12:46am 
@proxyer So in theory that will give me the vehicle parts from VVE and then the ability to scrap all the other random junk. Thank you for the reply!

Also sorry for any scare idk why steam is saying that link is malicious when I go to click it I just copied it off of steam. @_@
Proxyer  [author] 11 Aug @ 12:08am 
Hello Sithgrim.
Technically, both mods are patch mods. When modifying the same element, the order of patching is determined by the mods listed first. Therefore, placing the mods in the following order in the mod list may achieve the desired results. However, you may receive an error indicating duplicate patching (this error will not affect the game once it starts).

Mod list order:
VVE - Deconstructable Vehicles Junk
Dismantle Ancient Junk

However, due to the majority of conflicts, we recommend using only one of them. Compatibility between the "Dismantle Ancient Junk" mod and "VVE - Deconstructable Vehicles Junk" cannot be guaranteed.
Sithgrim 10 Aug @ 9:40pm 
Does anyone know if this works with VVE - Deconstructable Vehicles Junk (https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3108171008&searchtext=exostrider)? Or if correct load order is enough to solve compatibility if not?
kagora2 8 Aug @ 11:02am 
the pawn is a Sanguophage, but this also happens with a Impid or normal human
i started a new game
will have a look if it happens there too
Proxyer  [author] 8 Aug @ 9:08am 
The only thing that bothers me is that the error log "Verse.Pawn,string,System.Exception,Verse.AI.JobDriver", which makes it seem like a non-human pawn is doing the work.
Proxyer  [author] 8 Aug @ 9:04am 
I also checked the muffalo corpse and there were no problems. Try starting a new game with the mod list intact and see if the same problem occurs. If the error doesn't occur, it may be due to your save data.
Proxyer  [author] 8 Aug @ 9:00am 
@kagora2
In error log, "Thing_Corpse_Mech_Militor166514", so something may be wrong with the save data. For now, I'll check out the muffalo's corpse.
kagora2 8 Aug @ 8:44am 
thx for your test, but i didnt try to smash a mechanoid.
i tried to butcher an animal at the butcher table.
it was a muffalo
Proxyer  [author] 8 Aug @ 8:42am 
Tested with a minimum configuration (30 mods).

Workbench used: crafting spot
Corpse used: Militor x2
Bill used: smash mechanoid

Test result: No errors

The materials for the Militor are set in Recipes_MechGestator_Light.xml in the RecipeDefs folder of the Biotech DLC under Name="LightMechanoidRecipe" on line 14. They are 50 steel, and are not affected by the patch included in the mod.

This is likely a compatibility issue with another mod.
This mod is patch-only, so changes are made at game start. If there are any mods in the game that modify bills using dlls, etc., they will be overwritten. If that dll does not contain a null check such as "if (products == null || products.Count == 0)," a NullReferenceException will be returned and an error will occur.

It is unclear from the error message you submitted which mod in your mod list is causing the conflict. Sorry I couldn't find a solution.
Proxyer  [author] 8 Aug @ 8:20am 
Hello kagora2.
From the error, it looks like you're trying to process Corpse_Mech_Militor with CraftingSpot. I'll look into it.
kagora2 8 Aug @ 6:19am 
Part 2 of the error in my log:

(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.ReadyForNextToil_Patch1 (Verse.AI.JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.ReadyForNextToil_Patch1 (Verse.AI.JobDriver)
Verse.AI.Toils_Recipe/<>c__DisplayClass2_0:<DoRecipeWork>b__2 (int)
Verse.AI.JobDriver:DriverTickInterval (int)
Verse.AI.Pawn_JobTracker:JobTrackerTickInterval (int)
Verse.Pawn:TickInterval (int)
Verse.Thing:DoTick ()
Verse.TickList:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch4 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch1 (Verse.Game)
Verse.Root_Play:Update ()
kagora2 8 Aug @ 6:18am 
hi,
i butchered a mufflo but didnt get any meat
i removed your mod and it was working again

part 1 of the error in my log:

JobDriver threw exception in toil FinishRecipeAndStartStoringProduct's initAction for pawn Astarion driver=JobDriver_DoBill (toilIndex=31) driver.job=(DoBill (Job_3140661) A = Thing_CraftingSpot65237 B = Thing_Corpse_Mech_Militor166514 C = (134, 0, 124) Giver = JobGiver_Work [workGiverDef: DoBillsUseCraftingSpot_SmashCorpseMechanoid_DesignationWorkGiver])
System.NullReferenceException: Object reference not set to an instance of an object
[Ref FFB58A53] Duplicate stacktrace, see ref for original
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch3 (string)
Verse.AI.JobUtility:TryStartErrorRecoverJob (Verse.Pawn,string,System.Exception,Verse.AI.JobDriver)
Verse.AI.JobDriver:TryActuallyStartNextToil ()
Proxyer  [author] 6 Aug @ 2:55pm 
Update : 7 Aug, 2025
v1.6.11
- Fixed update Mechanoid Upgrades mod patch.
Proxyer  [author] 6 Aug @ 2:46pm 
Since Mechanoid Upgrades was updated, so experiencing issues with the mod patch. Now currently working on a fix, so please wait a little while.
KahirDragoon 4 Aug @ 1:27pm 
@Proxyer Thank you for your work and super fast fix
Proxyer  [author] 4 Aug @ 10:04am 
Update : 5 Aug, 2025
v1.6.10
- Added compatibility patch for Vehicles Wrecks Expanded .
- Fixed compatibility patch for Mechanoid Upgrades .

@KahirDragoon
Thank you for your report.
Proxyer  [author] 4 Aug @ 8:42am 
Hello KahirDragoon.
Thank you for reporting this. I think it's probably for the same reason as the error with other mods, so I'll need some time to check and fix it. Please wait a little while.
KahirDragoon 4 Aug @ 8:16am 
Causing red error with Vehicles Wrecks Expanded .

Posted it also there. Not sure which sides can solve it.

Log: https://gist.github.com/HugsLibRecordKeeper/7e509c76cbcf94ae669c87392d2f80f5
Proxyer  [author] 3 Aug @ 4:18pm 
Hello Alandauron.
To briefly explain your question, the "<killedLeavings>" setting in RimWorld's xml specifies what is dropped when an object is destroyed.

When an object is dismantled, the "<costList>" of building or creating that object is referenced. In vanilla RimWorld, only 50% of the resources are returned.

So, if you use the same resources and quantity for both, you will get 100% of the resources when destroying something, and 50% when dismantling it.
Alandauron 3 Aug @ 3:10pm 
Destroying granting more resources than deconstructing seems backward, is there a reason for this?
PvtGrumpy 31 Jul @ 4:00pm 
Just saw the ping notif, and noticed the new change in the game, THANK YOU!!!!
RogueCmdr 31 Jul @ 1:08pm 
yea but i only get slag for alot of that stuff
Proxyer  [author] 31 Jul @ 1:04pm 
Quick Tip:
For objects that can be destroyed by attacking them, destroying them will take longer than dismantling them, but you'll get more resources. Dismantling an object will only give you 50% of the resources set (50% off is vanilla settings).

For this reason, if only one material is specified, there's a higher chance of getting nothing.
RogueCmdr 31 Jul @ 12:56pm 
awesome - thanks I just landed at a abandon warehouse and so much wasnt scrapping until i grab ur mod but still feel some amounts bit low not worth the effort of scapping and gathering but i was early game so steel starved on grav ship scenario
Proxyer  [author] 31 Jul @ 12:39pm 
Hello RogueCmdr.
I'm currently testing a method that someone else suggested the other day (checking the Odyssey DLC to drop Biofuel). I'm testing it in conjunction with other updates, so please be patient. Thank you.
RogueCmdr 31 Jul @ 12:24pm 
any chance any of the odyssey stuff with chem fuel in the name, dropped extra chem fuel with steel
Proxyer  [author] 31 Jul @ 12:06am 
Update : 31 Jul, 2025
v1.6.9
- Updated the patch added in v1.6.8 (Preliminary problem fix.).
- Add new patches for Odyssey DLC, Gauss Cannon. (add HP, work time, cost, destructible, can dismantled)
Proxyer  [author] 30 Jul @ 5:14pm 
Update : 31 Jul, 2025
v1.6.8
- Update compatibility patch for Medieval Overhaul .

Thank you PvtGrumpy for your report.

- Add new patches for Odyssey DLC, Mech Pylon, Mechanoid Processor, Mechanoid DropPod, Ancient Terraformer.

Thank you PvtGrumpy for your request.
Proxyer  [author] 30 Jul @ 4:14pm 
@PvtGrumpy
Ok, I've reworked an old patch for Medieval Overhaul, so that ancient ruined battering rams and ancient ruined siege towers can now be properly deconstructed and will give half the resources when destroyed (compared to the vanilla system: 50% of the cost).

These changes will be included in the next update, v1.6.8.
Proxyer  [author] 30 Jul @ 3:23pm 
Hello Alan Mandrake, thank you for your suggestion. I will decide what to do once I have reviewed and worked on the Medieval Overhaul Mod I am currently working on. Please wait a little while.
Alan Mandrake 30 Jul @ 1:45pm 
Hi, I dont know if this fits the scope of this mod becaust its not really junk, but could you include mech pylons, mechanoid processors and drop pods that are spawned in orbital stations? Also anicent tile currently does not yield any resources with the remove floor option, adding a unit of steel might fir the theme.
Proxyer  [author] 30 Jul @ 1:33pm 
@PvtGrumpy
Thank you for reporting this. I will also check the contents of the mod.
PvtGrumpy 30 Jul @ 12:01pm 
Hi, It's the "Ancient Ruined Siege Tower" and "Ancient Ruined Battering Ram" from Medieval Overhaul, now reloading my save and looking again, i'm able to deconstruct some of them but then the exact same building next to it won't allow me. So it might be just my modpack causing issues or I just need to update some things. But I apologize if i'm wasting time here. I mean it's not that big of a deal, I can dismantle all the vanilla buildings just fine which is the goal. I'll test later with just the mod installed if i'm still having that issue or not.
Proxyer  [author] 30 Jul @ 8:12am 
Hello PvtGrumpy.
This mod is an xml patch mod that does not include a dll, so there are no mod settings.

I may be able to help you if you tell me not only the object name but also which mod name added it.
PvtGrumpy 30 Jul @ 8:02am 
How do I access the settings? if there are any? Seems like I can't dismantle the Old battering rams/siege towers from medieval
Proxyer  [author] 27 Jul @ 3:30pm 
Update : 27 Jul, 2025
v1.6.7
- Added compatibility patch for Mechanoid Upgrades .

Thank you AshSmurf for your report.
Proxyer  [author] 27 Jul @ 3:29pm 
@AshSmurf
I figured out the answer to the quiz by myself.

The cause of the error was that Mechanoid Upgrades ignored the Core's Parent (Name = AncientMechBuildingBase) setting because each defs had <Mdeconstructible>false.

The error disappeared after adding a patch, and the demolition time and cost were added.
But, ancient light was not touched.
Proxyer  [author] 27 Jul @ 12:59pm 
Hello AshSmurf.
I don't know what mods use "MU_AncientMechUpgrader" or "MU_AncientBasicUpgradesAssembler" in defName or Name, so could you please tell me the names of mods that you have enabled in your mod list that use words like "Ancient", "Mech", or "Upgrad"? I'm not good at quizzes, so a no-hint would save me the trouble of having to search.
AshSmurf 27 Jul @ 8:52am 
Just FYI Getting config errors after change:
Config error in MU_AncientMechUpgrader: alwaysDeconstructible=true but deconstructible=false
MU_AncientBasicUpgradesAssembler
MU_AncientMechUpgrader
MU_AncientBasicUpgradesAssembler
MU_AncientAdvancedUpgradesAssembler
MU_AncientUpgradesStorage
MU_AncientLargeUpgradesStorage
MU_AncientAdvancedUpgradesAssembler
MU_AncientUpgradesStorage
MU_AncientLargeUpgradesStorage
Fralee 27 Jul @ 8:08am 
not sure if you are able to re-balance some of the items when you dismantle them?
thing like cars make sense to give a few pieces of slag but things like the wheel rims should give a few pieces of steel instead of 1-2 pieces of slag