Jump to content

Claim Auto Repair Block


ocbMaurice

Recommended Posts

If I had to pick one mod to keep, it would be this one. Playing solo, this mod alleviates so much tedious work after horde night. Thank you :)


I have a desire to increase the repair area a few blocks outside of my land claim area. I poked around the code and decided to make this change in
Mods\ClaimAutoRepair-0.7.0\Harmony\TileEntityClaimAutoRepair.cs

int claimBuffer = 5;
int claimSize = ((GameStats.GetInt(EnumGameStats.LandClaimSize) - 1) / 2) + claimBuffer;


I'm not seeing any changes in the game so that leads me to a dumb question:
Do I need to compile this? I work with JavaScript but never messed with C. Offhand I know sometimes it needs to be compiled but I'm not certain.
If it does not need to be complied and my code change looks correct, then the next question would be is 'ground' considered a block?
What I want to accomplish here is repairing all the bullet-divots in my 'yard'. I can repair the ground with clay, just not sure if ground qualifies as a block to your code.

Anyway, great mod and please bear with my dumb sounding questions.

Edit: I answered my own question about ground blocks by increasing the land claim area in the game. It did repair the ground, but I would still like to know about compiling my change.

Edited by austin457
More Info (see edit history)
Link to comment
Share on other sites

Hello went to install this on my small private server. Ive downloaded the master from GitHub and dropped it into the mods folder. I have turned off EAC and keep getting the following error:

ERR XML loader: Loading and parsing " failed
EXC Class 'ClaimAutoRepair, ClaimAutoRepair' not found on block ocbBlockClaimAutoRepair!

Any help would be super appreciated. I can almost garentee I missed something small

Link to comment
Share on other sites

This is right from our serverconfig file: <property name="EACEnabled"                        value="false"/>
Where would I find this full log, sorry if it seems like a noob questions Im new to 7D2D hosting
I tried using the same version you posted above and still was unable to get this mod to work on my server.

Link to comment
Share on other sites

  • 2 months later...

Hello. Started using this and it seems pretty great, only I have a hard time telling how effective it is beyond the number of materials that are consumed by it because I repaired all the major damage to my base during the horde night.

 

However, when I open the claim repair block it gives me an error "Claim Auto Repair could use Land Claim Block". The CRB's outline is sometimes white, and it IS consuming materials. The CRB's outline is also sometimes red, to indicate that it doesn't detect an LCB. I did read the original post and the meanings of the outlines, but considering the CRB is directly next to the Land Claim Block I don't know how it's not detecting that. (To clarify, it IS repairing things, but it also apparently doesn't detect the LCB)

 

I am using a few other mods but none of them effect land claims.

 

I do have the claim area size increased higher than its default (not through a mod). I don't think that would effect it though.

 

EDIT: It's clearly eating my materials and doing something with them, but there are a few blocks that I found that did not get repaired.

Edited by Aithaed (see edit history)
Link to comment
Share on other sites

  • 1 month later...

Hello, after installing this mode the game would not start. In the console an error message appears and the startup gets stuck, it is necessary to Alt+F4.
Another thing, after deleting this mod and then starting the game, over 1500 rounds of ammo in my smg turret, 5 engines and all the fuel from the generator disappeared, completely disconnected all the connected cables and it's two days till horde, thank you very much.

Link to comment
Share on other sites

  • 1 month later...

Repair speed, once a block is found, can be increased, but not the speed at which blocks are found:
https://github.com/OCB7D2D/ClaimAutoRepair/blob/master/Config/blocks.xml#L29
I'll just quote the pinned nexusmods comment for reasons why find speed is not configurable:

Quote

One auto repair block covers a perimeter of normally e.g. 40x40x40 blocks, which equates to 64'000 blocks. We search for a repairable block each `tick`, which is the in-game-engine timing, normally around 1/50s. In order to find every damaged block we would need to check 64k blocks 50 times per second. Doesn't sound like a good idea if you want to leave some CPU power for other tasks. That is why this mod uses a CPU friendly approach. On every tick we only scan a few random blocks (blocks closer will be scanned more often). The further away a block is, the less the chance the auto repair block will find it. And if you have multiple damaged blocks instead of just one, the random scan will much easier find a block to repair (statistics anybody?). If there is only exactly one damaged block in all of the 64k blocks, don't expect the repair block to find it quickly!

 

Edited by ocbMaurice (see edit history)
Link to comment
Share on other sites

  • 5 months later...

Hey guys. Any plans to make it compatible with Alpha21 now that's its stable? This mod adds so much qol by repairing 2+ blocks deep builds. Danf zombies and their long a55 arms that damage blocks behind other blocks. Cheers.

Link to comment
Share on other sites

4 hours ago, Yvels said:

Hey guys. Any plans to make it compatible with Alpha21 now that's its stable? This mod adds so much qol by repairing 2+ blocks deep builds. Danf zombies and their long a55 arms that damage blocks behind other blocks. Cheers.

https://github.com/OCB7D2D/OcbClaimAutoRepair/releases/tag/0.8.0 

 

It was updated quietly, working fine for me A21 stable!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...