Oxygen Not Included

Oxygen Not Included

563 ratings
Closest Material
42
49
9
13
12
13
20
20
9
9
9
9
2
7
7
6
6
4
4
4
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
671.139 KB
22 Nov, 2022 @ 5:51am
11 Apr @ 6:55pm
25 Change Notes ( view )

Subscribe to download
Closest Material

Description
Do you plan to build stairs that go from your base to the top of the map, passing through several different biomes and materials, but you want them to build the stairs using the materials that are available near the building, regardless of which one it is, just using the closest one? Or do you just want them to build anything, without caring about the material used? This MOD is for you.

When building the blueprint with the option active or using the MOD tool after having already set it to build (blueprint), it will change the materials to the closest ones, obeying the original construction category. If it does not find the material for that category, it leaves the original material of the blueprint.

DISABLED


ACTIVATED


TOOL


This mod uses the excellent PLib by Peter Han under the MIT license:

PLib: https://github.com/peterhaneve/ONIMods/tree/master/PLib
License: https://opensource.org/licenses/MIT

GAME LIMITATIONS

NOTE 1: The DUPLICANT will not always get the first material that is next to the building, the game calculates the PATHFIND and he gets it from wherever is faster, so the MOD helps in the sense that he does not need to get a material far away to continue constructions. For example, if you ask it to build 10 stairs, it will take the material closest to it and the stairs and if there is a lack of material, it will use the one closest to the stairs, since the stairs were built using the closest materials.

NOTE 2: When creating pipes and the like, the DUPs already start digging, other buildings do not. This allows you to more or less use the MOD material as a planner. Unfortunately, this happens in the core logic of the game, there is no way to remove it.

NOTE 3: Sometimes while building pipes and blocks, they seem to get disconnected, especially when you click on just one that is connected to other blueprints, but it is only visual, as soon as you build all of them they connect... When you are replacing this does not happen. I am looking for a way to fix it, but it is only visual.

NOTE 4: Due to the unavailability of a specific method/logic for this in the game code, I cannot fully validate the amount of available material. Sometimes it may assign 400kg of Copper (since it is the closest element) to build 10 blocks (2000kg would be used), and the rest remains as "Unavailable Material" until more material is excavated/manufactured.

Update 1.1:
Fixed some items not being built:
Fiber and Wood are not exactly "Building Materials" in the game, so I made a specific condition for them.

Update 1.2:
Now the MOD allows you to build inside rockets or use the material that is inside the rockets.

A) Builds in the world using materials inside landed rockets
B) Builds on a landed rocket, using materials from the world it is in or from inside other rockets that are landed in the same world
C) If the rocket is taking off, flying or landing, it will only use materials inside the passenger module itself

Update 1.3:
Fixed the category of secondary materials, due to the game update and generating an error when deconstructing things built using the MOD functionality. Unfortunately, constructions already made can still generate an error when deconstructing, because the game changes the categories, but allows building using the old data.

Update 2.0:
Refactoring of the MOD to simplify functionality and use

=> Any errors/suggestions/criticisms/compliments can be reported to me.

Did you like the MOD? Buy me a coffee... More features coming soon...
Buy me a Coffee[www.buymeacoffee.com]

[www.paypal.com]
Popular Discussions View All (1)
1
18 Mar @ 6:31am
Contributing to the mod
wooaple
228 Comments
青与烟凝 10 Jul @ 7:41am 
哦,你好,你的mod的咖啡杯模样的快捷键能不能用你的mod名字Closest Material来命名?我曾一直认为他没有快捷键,plan看起来真的和这个mod毫不相干
另外能不能和挖掘工具一样显示框选的范围?这对我有很大帮助,非常感谢,期待你的更新


Oh, hello! Could the shortcut for your mod's coffee cup model be named after your mod, like "Closest Material"? And could it also display the shortcut key when hovering over it, just like other tools do? I have always thought that it didn't have a shortcut because "plan" seems completely unrelated to Closest Material. I believe it would be much better if it were named after the mod itself.
Additionally, could it display the size of the selected area like a mining tool? That would be really helpful for me. Thank you very much, and I'm looking forward to your update!
Mauro Júnior  [author] 11 Apr @ 6:26pm 
I'm not able to simulate this error, could you give me specific details on how to reproduce the problem?
The seed 11 Apr @ 1:01am 
The problem with this mod still exists. I just used the functionality of this mod yesterday, this game immediately crashed and the save was also damaged with cannot be opened. Although I deleted the mod and reinstalled the game, the problem still exists

The error message is the same as the previous two friends' errors in this message

Assert failed: Missing primary element for Constructable

Do you have a corresponding solution?
Mauro Júnior  [author] 26 Mar @ 2:32pm 
Fixed bug with MATERIAL menu
Mauro Júnior  [author] 26 Mar @ 1:11pm 
I'm checking
Darkerowl 24 Mar @ 6:07pm 
Same here If you click material on a building it crashes your game instantly...
Raz 22 Mar @ 3:49pm 
Hi, I get this crash report when I click on anything and click the Material tab in the Options of any building. I first noticed it on an automatic dispenser but it's happened for pretty much everything else as well.

https://pastes.io/error-5379
Mauro Júnior  [author] 18 Mar @ 6:29am 
I couldn't simulate the problem, I click on the Ratio Box and it appears normally without any crashes or errors in the LOG.

Create a Discussion in the MOD, so we can look into it more thoroughly, I think it's better than staying here in the chat...

In the discussion, put the link to a save that has the problem so I can download it and test it on my side, I actually created it with all the asteroids and it worked without any problems.

But I noticed that the native game, whenever I click on an element on the screen, writes FALSE in the log, I found it strange..
Mauro Júnior  [author] 18 Mar @ 6:15am 
Thanks, I will reproduce this test.
Mauro Júnior  [author] 18 Mar @ 4:07am 
Strange, I will add more validations in some points in the next few hours, but I was unable to simulate the problem itself.