r/factorio•
host65

Can we have a mod that shows the direction of the nearest deposit of a certain resource?

Question

I am always looking for salt (py mods). Unfortunately with rso it's not enough and I currently use console commands to reveal the map, look where salt is and then reload to a save just before.

I wish there was a less cheaty way. And no, radars don't do it. Their range is way to small. (I usually console a radius of 2k tiles to find something)

Posted Feb 20, 2019, 5:45 AM UTC

529
paco7748•

interesting that salt is the issue on your map. I have over 100M in rocks around the map. Only have 114 million of iron though. And that is 80 square chunks

2
host65OP•

For me RSO is the problem for that. If I turn it off I get plenty. But then the remaining ores just look ugly and are spaced way to close to each other.

I tried editing the frequency in rso but somehow it does not take effect (on newly generated chunks). Maybe someone knows how to edit it correctly. I feel that the other rocks that pyro spawn mess up the generation of salt

Iron is just the right amount for me. I am now on my third field with 10mio and have another fresh 8 and 15 if I wanted.

1
paco7748•

I think you'd have to change the config file prior to map generation. (Or just salt to a higher size/richness

1
host65OP•

Did that and then reload the game. Did not make any visible difference

1
paco7748•

Interesting, you started a new game after the settings were changed and nothing happened? that is odd. I'm not sure what's up then. RSO has always obeyed the changes I've made. Last thing I would do is contact the authors with two saves to compare.

Maybe something in the PyRO code is preventing RSO from the changes but that sounds doubtful.

1
NameLips•

I'm not sure a mod could do this easily. The problem being that the chunks where the salt are don't exist yet. Even the program doesn't know what's in unexplored chunks until you visit or scan them -- then it generates them according to your random number seed.

The world literally doesn't exist until you explore it and add it to your map, so there would be no salt for the mod to point to.

2
__randomdude__•

chunks in a small radius outside your view area are already generated, just not charted (visible) to you.

https://wiki.factorio.com/World_generator#Invisible_chunks_.28fog_of_war.29

​

But it still would not be possible to do what he wants most likely, as scanning whole chunks all the time they are generated will probably stutter your game slightly whenever they are created

​

The only way to help with this early would be making a mod that, on game creation, preemptively generates chunk in an X radius from the spawn, scan those chunks and then keep track of resource positions, but it would take some time to do all this at the beginning while you won't be able to do anything and I don't know if generating those chunks can have any side effect

1
host65OP•

The idea would be to generate the chunks. Map it. Delete the chunks.

The resources will be there when the chunk is revealed again

1
__randomdude__•

Well, if you delete the chunks, they will be randomly generated again. What you mean is what I said at the end of my previous post, where you generate the chunks, but don't 'reveal' them (factorio api uses the term 'chart' for that), so they can be scanned by the factorio API to see where things are, but that would make the game grind to a halt for more or less time depending on what radius you want checked and mapped at the start

1
host65OP•

Factorio is deterministic. There is is no randomness. Every chunk is always the same

3
Der_tolle_Emil•

That's an interesting idea for a mod. I have always wanted to try writing a mod for Factorio, maybe I'll try to do this because should it work it could actually be useful.

I think the biggest difficulty is determining how far is the mod allowed to look for resources. Resources are not there until Factorio generates the map, which means the mod will have to force the game to generate a map until all possible resources are found at least once. Once all of them have been found it will have to do that again and again so it will always be able to point to the nearest one relative to your character. If you are playing just a few patches this could have quite an performance impact after a while because even on the very first second you will already have revealed the map extensively.

Nevertheless, it's an interesting idea well worth exploring.

2
host65OP•

I am not even requiring nearest to character. Closest to spawn would be just fine.

The idea would be generate chunks, map it, delete the chunks

1
Der_tolle_Emil•

Is it possible to delete chunks? Map generation should be reproducible when using the same seed so that might be an option, although I would be surprised if chunks could be deleted.

1
host65OP•

Yes they can. There is even a mod out there that deletes emtpy chunks

1
Der_tolle_Emil•

Cool. I'm interested, I'll see if I can come up with something. As I said, I've been toying with the idea of modding Factorio just to see how it works anyway and this seems simple enough for a beginner project.

1
zurkka•

With the new pathfinding that's coming with the new update (there is some new mods taking advantage of that) maybe a survey vehicle would be possible, make it run until it finds what you need or something like that

1
Night_Thastus•

Hmm. Maybe a second-tier radar could be made. More power, more range. Or something directional.

1