Jump to content

Claim Auto Repair Block


ocbMaurice

Recommended Posts

  • 2 weeks later...

Hello Maurice,

I found a little "bug":

When I try to produce one of these Repair Blocks and cancel the production in the Workbench, I get batteries in Quality 4 back, equal, which batteries I used to produce.

Kind Regards

Thomas

P.S.: I will try, if the repair block works well even when I use more then one claim block (placing one repair block next to each claim block).

Link to comment
Share on other sites

I've implemented some fixes in develop branch to address this issue.
But the code I needed to copy and patch is rather big (~400 lines).
So I'm a bit hesitant if I really want to go that route and would need more testing for sure:
https://github.com/OCB7D2D/ClaimAutoRepair/archive/develop.zip
On the upside it should also improve vanilla crafting, as it should now use the lowest
quality item available in your inventory or toolbelt and not the first one it finds.
It might bite me in the ass on updates though, but I hope TFP would fix this by then too.

Link to comment
Share on other sites

Super stoked for this mod.  Just can't seem to get it to chooch.

 

1.) You mentioned "On the upside it should also improve vanilla crafting, as it should now use the lowest
quality item available in your inventory or toolbelt and not the first one it finds."  Does this mean it uses the repair tool in your toolbelt/inventory to do the repairs?  Meaning I have to have the item available in MY inventory for it to work?  Such as a NailGun?  

 

2.) Is the distance hardcoded?  Will it not work if the server's land claim blocks have significantly higher area of influence?  

 

3.) For those who have run into the above errors, definitely make sure that it is installed on BOTH the client, and the server, and that the server AND THE CLIENT have EAC turned off.  To turn it off in the client, you have to go to the "launcher" first, and disable it.

Link to comment
Share on other sites

1) No, it will use the lowest batteries available when being crafted (applies to all other recipes with ingredients that have quality). Simply means it doesn't use your 6 level batteries when you have lower qualities available (vanilla would just use the first items it finds, regardless of quality).

2) It uses land-claim distance as configured in game settings + 3 blocks as search radius.

Link to comment
Share on other sites

Thanks for the quick reply!  And yes, I came on to post the same thing.  After some experimentation, I've found the exact same thing:  It definitely uses the server settings for the "distance".  HOWEVER (I don't know whether this is intentional, but I like it) damaged blocks that are closer to the source are more likely to get repaired than the ones further away.  Those furthest away will EVENTUALLY get repaired, but those closer will get repaired quickly.  For example: 

 

spacer.png

 

Blocks closer to the repair block are more likely to get "found" during a tick.  If you're on a server like mine where land claim blocks protect a very large area, this will encourage you to create multiple repair blocks and place them in various locations to increase the repair speed.  

 

GREAT mod, and well balanced.  I'm a big fan of the cost (6 batteries and 40 steel is no joke) and the slow pace at which it repairs.  Definitely balances it out without making it op.  And thank GOD it removes the micro-tedium of repairing minor damage in EVERY block.  Especially grass/ground.

 

One request I would have:  Is it possible to make it repair spikes?  If a spike is damaged without breaking to the next level, it will repair it, but if a spike is broken down to the next level, it won't.  For those of us that absolutely SURROUND our bases with spikes, it would be super handy to have it also repair them back to full state.

 

Thanks for such a handy mod!

Link to comment
Share on other sites

Thanks for the feedback, it is indeed intentional that closer blocks are found easier and faster. As for the spike upgrades I also kept it that way to at least not fully take away that you have to repair some stuff yourself from time to time. I might revisit that decision, but adding upgrading of (certain) blocks into the mix could blow the code up quite a bit. The goal was exactly to help with the little tedious repairs while not being overpowered (and also CPU friendly).

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 3 weeks later...

Just tested and wasted 30 minutes; still works OK for me and 20.4 b42.

Also tested multiplayer shortly and didn't see any problems either.

 

Most obvious things you might done wrong:
- Didn't place a land claim block!?

- Didn't wait long enough!?
- Didn't disable EAC!?

- Didn't provide enough details ...

 

As for server-side only, won't happen as mentioned multiple times.

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

Hi

I need some help, i am playing in a server with this Mod and it worked until today, now i have an error seen in the Img.

Server side is 0.7.1 and me as well on my side, all the others players can login in to the server just not me! 

Any additional info required just ask

Thanks

 

spacer.png 

Link to comment
Share on other sites

  • 3 weeks later...

Absolutely beautiful work.

 

After testing i noticed a few things.

 

Presently any number of them can be put down but anymore then two and all will start having land claim block connection issue quite often.

I would frankly leave it that way as it prevent the mod from being abused and too op.

 

It also allows for larger claims and base sizes, since the math says it will eventually find all damaged blocks that time can vary wildly depending on claim and base size.

Two  allows for the max possible base/claim size allowed and still keeps it long enough without going op and but not so long that it defeats the purpose of the mod itself.

 

The second thing would be basically just a minor lack of info about the mod itself.

 

Adding the information that it is random in block discover but it does find closer blocks faster gives them a better idea of placement.

That direct connection to the land claim is best but not required for function and a second one can be put anywhere in the claim although it will occasionally lose connection to the land claim block if  it is used in this way.

Some are likely to assume because of the video direct connection the the land claim is a requirement and never bother to test.

 

 

Link to comment
Share on other sites

So one repair block next to land claim no issues

 

A second repair block 6 or 7 blocks away  also no issues

 

Third repair block 12 blocks away will lose connection to the land claim block and want to stay there.

 

A fourth will make this worse and basically keep it and the third in red with loss of land claim connection but there is exception here.

 

If a block is damaged near the third or fourth repair block it will cause it to come out of red land claim mode and start repairing again.

Once done it will operate normal for a bit then go back to red

 

Add too many and it can start affecting all the repair blocks causing them to lose connection to the land claim block.

 

So if you want to maintain connection to the land claim stick to one or two repair blocks.

 

If you have a have a big base and need more adding two more is possible but they well go red but shall work if there damage near by.

 

Anymore then that though and its likely going to create serious headaches.

 

On a side note if a block is being repaired and a zombie goes to hit it the zombie can phase through the block thanks to a bug in the game.

Link to comment
Share on other sites

Thanks for the feedback! The direct connection is in fact not needed, but once you move it like 5 blocks away, you start loosing coverage on what the land claim block actually covers (given that the auto repair block only looks for claim size + 5). So if you'd put it on the corner of the covered land claim, it would only repair one quarter of the cube the land claim covers. It is unfortunately kinda hard to convey this constraint in easy words, but I hope people do get it. Mathematically it is just the intersection of both cubes where blocks will be eligible for repairing. It just boils down to a) repair block finding a block to repair in radius "claim size + 5" and then b) checking if that block is also inside a allied land claim cube. Btw. you can adjust amount of allowed claim blocks and the claim size in the game options, which will influence how this block can be used. And it should also work if your allies place another claim block adjacent to your claim block (so you have two cubes of "claim size" where blocks found for repair are actually repaired). Finally the bug you mentioned certainly doesn't sound to be caused by this mod.

 

Btw. the red indicator was just added lately to give a bit better visual feedback and is indeed just a rough indicator (it doesn't really mean you made an error). I made it to show only if the block we found for possible repair, and is not covered by a land claim, is at least half the distance of a land claim away from the repair block. Means that if land claim size is 40, and the block found is 25 blocks away from the repair block (and not inside land claim), the red outline will show. If distance is lower than 20, the red outline shouldn't be shown. Basically means you could add 4 repair blocks on each "half" corner and it should never tell you to have "lost connection". Agree that this feature could be more deterministic, but haven't yet figured out the math to do it in the best way possible. The message I also added lately might get a bit annoying at some point though. Guess it's a minor nuisance for now, but will try to keep it in mind if I revisit that function. Finally to be very clear, the red indicator doesn't mean the block stops working. It only means that it detected a case it thinks you might have missed to place down a land claim block. Before the red indicator, people sometimes wondered why the block isn't doing anything, because they forgot to place a land claim at all. A threshold to only show it if it happens a certain times in a row though may already help to mitigate this confusion.

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

Has anyone done any testing in Darkness Falls? This mod really feels like it would it in nicely with the overall technology level in DF, and it would make sense narrative-wise. 

 

Does the mod stop at vanilla steel in the hardcoding, or will it handle the advanced materials (like stainless steel)?

 

Great mod!

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...