Dark Matter Replicators


This mod adds replicators, machines which can produce items using nothing but electricity. Lower tiers of replicators are the most energy efficient and can essentially transform depleted, empty land into a resource. Higher tier replicators can simplify production lines or otherwise act as a convenience. Tier 1 replicators can replace depleted mining drills, allowing your expansion to be for growth rather than necessity.

Content
5 years ago
0.13 - 0.17
115
Manufacturing

b Error loading the mod in V17.52

5 years ago

Hello

I have this error message in V17.52.
http://zupimages.net/viewer.php?id=19/26/dads.jpg

Thanks

5 years ago

I have the same error (there is no need to repeat the capture).
Please that the created of the mod fix it as quickly as possible.

Thank you

5 years ago

just downgrade to 17.50 then it should work

5 years ago

Cmon Brah update pls ! :D

5 years ago

It looks like the error is from a change in how a mod adds a new ore to the game. By what I read the game can now handle the thing that needs to be done automatically, so the function was removed. So just for S&Gs, I removed just that line, started a new game (v0.17.54) with only this mod, and it worked.
Try this:
1. Unzip mod
2. open this file in a plain text file editor (Notepad on Windows):
dark-matter-replicators_0.7.13\prototypes\raw-resources.lua
3. Look for this line (line 35):
resource_index = resource_autoplace.get_next_resource_index(),
4. Ether remove the whole line or put two hyphens at the beginning.
5. Save the file and rezip the entire dark-matter-replicators_0.7.13 directory
6. Put new zip archive in mods directory and try it out.

5 years ago
(updated 5 years ago)

Edit: Everything I said here is probably wrong. Keeping the comment here around for my own shame. Cheers!

Note: Apparently my quote went away. This is in reference to the above message from randiskhan.

TL;DR: This isn't a fix, this basically just turns off the ore in the mod that is required for all parts of the mod, meaning loading it in existing worlds will utterly ruin them. And to randiskhan, I'm sorry if I'm mistaken, but assuming I'm correct then you really need to double check this shit before posting. When you make a post like that, I figured you knew what you were doing. I was wrong.

TL: Damn it. I wasn't paying attention to when this post was made, so I assumed it was made days ago and that other people had tried it too. Successfully, that is. Anyways, PSA, do not do this. Ever. It's been a while since I loaded up my save, but I'm pretty sure a patch of ore in my save (I hadn't started mining the new ore yet) used to be the new ore added by this mod. And now it's iron. Maybe Factorio keeps the ore index for ore patches the same even if it's invalid, so when I load up this mod next once its updated it will return to being the new ore, but if not then this "solution" really did just break my world. Or at least that ore patch, which really sucks. And I'm already 15+ minutes in so all my autosaves have been overwritten, and I also saved over my old save. So again, PSA, this isn't a solution.

5 years ago

TL;DR randiskhan's solution worked well for my pre-existing save, but I found what pY Petroleum Handling did and that might be more stable? Also, remember to backup your saves <3

The following worked for me (mostly borrowing what pY Petroleum Handling did: https://github.com/pyanodon/pypetroleumhandling/compare/e1f545e...4b8d811).

It's essentially the same as what randishkhan said, but with one addition: After removing the resource_index = resource_autoplace... line, also add local resource_autoplace = require("resource-autoplace"); at the top of the file.

This worked for me on my pre-existing map without any issues, but I also tried randiskhan's fix above, and that seemed to work as well, all old Tenemut patches remained Tenemut, so I'm not sure what happened to alj0.

That being said, I'd recommend taking a backup of your save before doing any manual modification to your mods (really, backups are a good idea to have anyways when upgrading mods or Factorio, but you should especially do it before doing manual stuff to your mods). I make no guarantees that this fix will work for you, I'm still quite new to Factorio scripting and modding.

If you don't know how to backup your saves, it's in the same place as your mods (except in the saves directory instead of the mods directory, %AppData\Factorio\saves on Windows), just copy and paste the zip file for your map somewhere safe (or add that folder to your backup software, if you're using one), or copy and paste the entire Factorio folder to backup your settings and everything).

5 years ago

I will try to remember when I post how to change a mod that fixes an error for me, that anyone applying said instructions does so at their own risk.

5 years ago

I definitely should have backed up my saves, I just hadn't played Factorio in a while (I'd been waiting for this mod to update, as it happens), so it completely skipped my mind. It's totally possible it didn't replace any tenemut, I just could have sworn that a patch in my world used to be tenemut and now isn't. But yeah, it had been a while since I played, so I could be wrong. I'd have checked, but I didn't back up my world ^^

5 years ago
(updated 5 years ago)

Sorry if I was particularly aggressive btw, I was just left in a position where I couldn't really be sure what (if anything) happened, so I was a bit frustrated.

Edit: Also, the irony of my essentially saying "check your facts" and most likely turning out to be wrong is not lost on me :) I knew it was a possibility going in

5 years ago
(updated 5 years ago)

To sum up above for everyone reading past and had trouble like I did reading this:

In the file location in the mod, "dark-matter-replicators_0.7.13\prototypes\raw-resources.lua", Your first 40 lines should look like below:

local resource_autoplace = require("resource-autoplace");

data:extend(
{
{
type = "tool",
name = "tenemut",
icon = "dark-matter-replicators/graphics/icons/tenemut.png",
icon_size = 32,
subgroup = "raw-resource",
order = "f[tenemut]",
stack_size = 200,
durability = 1,
durability_description_key = "description.science-pack-remaining-amount"
},
{
type = "resource",
name = "tenemut",
icon = "dark-matter-replicators/graphics/icons/tenemut.png",
icon_size = 32,
flags = {"placeable-neutral"},
order = "b-b-rep",
tree_removal_probability = 0.2,
tree_removal_max_distance = 16 * 16,
minable = {
mining_particle = "tenemut-particle",
mining_time = 2.5,
result = "tenemut"
},
collision_box = {{ -0.1, -0.1}, {0.1, 0.1}},
selection_box = {{ -0.5, -0.5}, {0.5, 0.5}},
autoplace = resource_autoplace.resource_autoplace_settings{
name = "tenemut",
order = "b-b-rep",
base_density = 4,
has_starting_area_placement = false,
--resource_index = resource_autoplace.get_next_resource_index(),
regular_rq_factor_multiplier = 1,
starting_rq_factor_multiplier = 1

Thanks to everyone above who put in the effort to find a fix!

5 years ago

FWIW, I'll independently verify that the above fix seems to work perfectly fine. I applied it to my install and DMR works \o/

5 years ago

has anybody got a changed package as zip? I applied the changes but the game is not recognizing the package

5 years ago

It would be nice to get the file as a download. i have spent multiple hours trying to get it to work.

5 years ago

IIRC, somewhere between this fix for v0.17.52 and the current (v0.17.66 as of 8/30/2019) version, there was another change breaking this mod again.

5 years ago

has anybody a link on how to zip the modified mods?

5 years ago

has anybody a link on how to zip the modified mods?

The way you phrased this question it sounds like you're trying to combine more than one mod into a single zip archive. This will not work. Each mod needs to be in its own directory zip archive.

If you're on Windows (Taken from here: https://support.microsoft.com/en-us/help/14200/windows-compress-uncompress-zip-files):
1. Locate the file or folder that you want to zip.
2. Press and hold (or right-click) the file or folder, select (or point to) Send to, and then select Compressed (zipped) folder.

Be sure not to change the name of any files or directories/folders, or the zip archive.
I believe Factorio will load a mod unzipped too, as long as you don't have a zipped version in mods directory at same time.

5 years ago

No, I have the problem that just zipping files in factorio doesn't work for me and I read that they have a specific way to zip files. Also unzipping and chaning the file didn't work for me.

5 years ago

There are two forks of this mod that supposedly work in the latest version (0.17.69). You could give those a try. I haven't yet, so backup saves.
https://mods.factorio.com/mod/Dark_Matter_Replicators_Replicated
https://mods.factorio.com/mod/dark-matter-replicators-R

5 years ago

cheers

New response