Jump to content

Increase digging and construction range by +1


Recommended Posts

I want to make a mod or at least edit the files to increase the digging and construction range by +1. Since a lot of buildings are 4 blocks high and creating a "ceiling" for them is a pain. I am not sure what property to target for this? Can someone please point me in the right direction?

Link to comment
Share on other sites

@Pholith If you do happen to find this. Would it also possible to integrate this into the skill tree?
I think reducing initial range by 1 and then having each Construction skill apply a +1 bonus, so in the end it becomes +2 range.
Would be wonderful. Or give leave default range as is. And give a +2 range increase upon mastering Construction.
However I gladly settle for a quick mod that increase range + 2 as I like to design my floors as 4 high and 2 inbetween layers, and that way I can easily construct a new level from the bottom, without cumbersome ladder builds.

Link to comment
Share on other sites

Going through the code, I cannot find any reference to an attribute or value that easily changes this.
Furthermore the way the code seems structured, it seems that if we want to change this, it will be for all duplicants and all tasks at the same time.

Will be gladly proven otherwise.

The first indication I found regarding what a duplicant standard has as reach is the following
In Class OffsetGroups

public static CellOffset[] Standard = OffsetGroups.InitGrid(-2, 2, -3, 3);

However various other functions seems that increasing this grid won't suffice.

Link to comment
Share on other sites

public static bool IsValidBuildingCell(int cell)
{
	return cell >= 0 && cell < Grid.CellCount - Grid.WidthInCells * Grid.TopBorderHeight;
}
public static int TopBorderHeight = 2;

Found this under Grid. Not sure if this would be of any help.

Link to comment
Share on other sites

On 9/1/2019 at 5:11 PM, Nezerathian said:

Sooo.... Any progress? :)

Yup. I've been fiddling with a compute shader to improve pathing performance with multiple dupes, and haven't gotten around to this yet, but I have identified the functionality.

It may not be a trivial thing to increase, but it's doable (it may have a performance hit, but not sure). I might look into it this week. Construction and digging doesn't have a range as much as it has a "reach" through sets of paths determined by offsets in space that are run through a filter of obstacles (which is why we can't dig stuff that's behind walls, something that happened when I initially tried a simple solution), and the possible paths need to be added to the correct arrays in the correct way.

FWIW, if I remember correctly, the reach table for digging and single tile placement appears to be the InvertedStandardTable in OffsetGroups class, and for structure placement it's the one with corners (or the other way around, not sure, at work).

Link to comment
Share on other sites

On 9/4/2019 at 8:08 AM, Pixelettee said:

I really hope this "problem" gets solved quickly.

Are you mainly concerned with upwards reach? I can very quickly add the global possibility to dig and build tiles one or two tiles higher if you are standing below the chore target. Currently the way I have it working is for the three tiles directly above the dupe and on each side. I haven't modded the animation yet, though, so the beam doesn't reach all the way. It's not ugly though.

Without mod:

image.png.72685d2717378c84aaddf2a8031e202e.png

With mod:

image.png.f5cb748c150bc795b8016a06198e831b.png

 

Link to comment
Share on other sites

Thanks for the mod! It would be great as you mention that ends up having a config file. That way it will make happy everybody... you know, people here have discussions about what is cheating or not like it is matter of life or death.

Anyway, thanks for the mod again, really good work.

Link to comment
Share on other sites

51 minutes ago, Pixelettee said:

Thank you very. It is way better than nothing.

It works!. :love_heart:

 

9 minutes ago, mihe said:

Thanks for the mod! It would be great as you mention that ends up having a config file. That way it will make happy everybody... you know, people here have discussions about what is cheating or not like it is matter of life or death.

Anyway, thanks for the mod again, really good work.

 

3 hours ago, Haze33E said:

Wish it was all directions but this is nice too. Thanks for the mod.

This just in: I made a full reach increase. Here's a mod with all directions! The Duplicant Reacharound.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...