[MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable time

This is the place to request new mods or give ideas about what could be done.
Post Reply
uberdubersoldat
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Sep 08, 2020 6:28 pm
Contact:

[MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable time

Post by uberdubersoldat »

Hello, I'm looking for a relatively simple concept - A Wall Type which has no general alarm associated with it. I want play Deathworld without this spam, but I want to keep Alarms for everything else getting destroyed.

I'm looking specifically for these features:
  • Wall Type which does not give an alarm when destroyed
    Wall Type which only triggers a repair if it's been undamaged for a specific period of time
    Keep the normal Wall Type which does not have these features, separate
This way, you can make your fire line outer base wall with this wall type, and not suffer the alert/repairbot spam. You'd put a normal wall where you actually care to receive alerts. This way, your logistic bots wont repair walls which are actively under fire, and they won't burn themselves to death, trying to repair a wall which is getting lit up by flamethrowers. I'd even welcome other balance related differences with this wall type if people have ideas

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by Qon »

uberdubersoldat wrote:
Tue Sep 08, 2020 6:32 pm
  1. Wall Type which does not give an alarm when destroyed
  2. Wall Type which only triggers a repair if it's been undamaged for a specific period of time
    Keep the normal Wall Type which does not have these features, separate
  1. is fairly trivial. data.raw.wall['stone-wall'].alert_when_damaged = false to update the current one, some more lines if you want to update tech and add item to make it a separate thing. But still easy to do.
  2. Would require some Lua to keep track of time since last damage event and somehow prevent the walls from being repaired, probably by switching their force to another when they get hurt and then swap it back when they should be repaired. That's a lot more work.
For a similar-ish effect as (2) you might consider not tracking if they get hurt and let the walls get killed instead. Then you just have to switch their force when placed and then switching the ghost back to your force when it dies. The turrets will kill anything that gets past the wall anyways, or you have several layers of walls, and when a wall dies it gets replaced with a new one by bots. And that doesn't happen as often.

uberdubersoldat
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Sep 08, 2020 6:28 pm
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by uberdubersoldat »

Qon wrote:
Tue Sep 08, 2020 7:38 pm
uberdubersoldat wrote:
Tue Sep 08, 2020 6:32 pm
  1. Wall Type which does not give an alarm when destroyed
  2. Wall Type which only triggers a repair if it's been undamaged for a specific period of time
    Keep the normal Wall Type which does not have these features, separate
  1. is fairly trivial. data.raw.wall['stone-wall'].alert_when_damaged = false to update the current one, some more lines if you want to update tech and add item to make it a separate thing. But still easy to do.
  2. Would require some Lua to keep track of time since last damage event and somehow prevent the walls from being repaired, probably by switching their force to another when they get hurt and then swap it back when they should be repaired. That's a lot more work.
For a similar-ish effect as (2) you might consider not tracking if they get hurt and let the walls get killed instead. Then you just have to switch their force when placed and then switching the ghost back to your force when it dies. The turrets will kill anything that gets past the wall anyways, or you have several layers of walls, and when a wall dies it gets replaced with a new one by bots. And that doesn't happen as often.
Yeah if it's an easier implementation that's sufficient as #1 was the primary reason for the request. I'm curious now what is more efficient in terms of resources, is it more cost efficient to repair or replace walls. My original assumption was repairing is less costly.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by Qon »

uberdubersoldat wrote:
Tue Sep 08, 2020 7:58 pm
Yeah if it's an easier implementation that's sufficient as #1 was the primary reason for the request. I'm curious now what is more efficient in terms of resources, is it more cost efficient to repair or replace walls. My original assumption was repairing is less costly.
Walls cost 10 stone and have 350 hp. Repair packs cost 3 copper 6 iron and repair 300 hp.

Walls have repair speed 2 though, which probably means that they get 600 hp out of 1 repair pack. Maybe, haven't tested. But you probably rather lose some stone than some iron anyways, even if the resource count would be higher with replacements. And it probably doesn't matter that much anyways, because repair packs and walls are both such a minor spend compared to science which is going to cost thousand times more. Even on a death world the cost is going to be all ammo and science. And attack might take 30 AP ammo or more and just scratch a few walls a small percentage. So it doesn't matter. Also if you lose less bots then that is a cost you might notice more.

My death world base has currently produced 373k iron plates, researched almost all red-green science and 1 blue science, 13k AP ammo, 18k yellow ammo, 2.2k repair packs, 862 stone wall. The repair packs were probably mostly spent on repairing turrets btw.

Code: Select all

/cc print(count_entities_filtered{name = 'stone-wall'})
gives me 696 walls standing. But I have some in my inventory, all time losses stats gives me 18 walls lost. I started with some roboports so that I wouldn't have to run around and repair manually so my walls have been repaired instead of replaced. Also added "snappers" which are extra tanky enemies.

I actually started out with barely any stone but I need much more iron so I don't really care about stone cost that much.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by eradicator »

If you're going to mod anyway it's probably easiest to just use one of the force field / laser fence type mods. If those still exist in 1.0 space...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

uberdubersoldat
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Sep 08, 2020 6:28 pm
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by uberdubersoldat »

another value add, is the data behind number of walls replaced. number of repair packs used isn't as indicative of how much "damage" a section took, but number of walls, and locations of those walls could be useful information. Either way sounds like we just need to make a cloned dummy wall type with the alerts and repair turned off.

masterpi
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Mar 26, 2019 9:24 am
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by masterpi »

I just did a bunch of testing on repair pack durability, and discovered you can actually repair 1200HP of wall per pack, and 600HP of other entities. I think this is because of the base repair speed of 2. I'm curious where the wall's repair speed modifier is specified though - I see it mentioned in the prototype specification but not in the data files anywhere -- is it in the non-lua code?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: [MOD REQUEST] A 2nd Wall Type - Doesn't give an Alert if damaged, Doesn't repair unless no damage for configurable t

Post by DaveMcW »

masterpi wrote:
Sat Oct 02, 2021 3:47 pm
I'm curious where the wall's repair speed modifier is specified though - I see it mentioned in the prototype specification but not in the data files anywhere -- is it in the non-lua code?
There is only one repair_speed_modifier in the data files, with the right search tool it will take you straight to the wall definition. I recommend Notepad++ or VSCode.

Post Reply

Return to “Ideas and Requests For Mods”