I know we all dislike trees and wish our automated defenses shared our disdain for these arboreal abominations.
What I have in mind is making trees targetable entities for things like turrets and personal defenses.
I have tried in the past but didn't know enough about lua or factorio modding to get it done myself at the time.
Not sure if this is even feasible, but really hope it is...
Auto target trees as hostiles
-
- Burner Inserter
- Posts: 5
- Joined: Mon Apr 08, 2019 8:50 pm
- Contact:
Re: Auto target trees as hostiles
I was Qonsidering making a mod that lets artillery auto target trees as well if loaded with poison capsules. That way you also don't destroy your own base if any trees are trying to get their grubby roots on your precious metallic factory. But I haven't really prioritised it.
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: Auto target trees as hostiles
My first idea would be to mark tress as enemy forces. But could you still chop them down for wood then?
-
- Burner Inserter
- Posts: 5
- Joined: Mon Apr 08, 2019 8:50 pm
- Contact:
Re: Auto target trees as hostiles
I had that idea as well but didn't know how to do that
-
- Burner Inserter
- Posts: 5
- Joined: Mon Apr 08, 2019 8:50 pm
- Contact:
Re: Auto target trees as hostiles
Iirc the prototype has a setting for how entitites are placed. Some are neutral, some not. Compare the prototypes for trees, chests and worms.Krimsonkiler wrote: ↑Thu Apr 11, 2019 2:15 pmHow is that done? Is it some kind of inheritance? I am familiar with coding, just not Lua.
-
- Burner Inserter
- Posts: 5
- Joined: Mon Apr 08, 2019 8:50 pm
- Contact:
Re: Auto target trees as hostiles
Ooooooh, I was not aware of that part, I was fiddling with the tree prototype directly, didnt know there were placement settings...mrvn wrote: ↑Thu Apr 11, 2019 3:14 pmIirc the prototype has a setting for how entitites are placed. Some are neutral, some not. Compare the prototypes for trees, chests and worms.Krimsonkiler wrote: ↑Thu Apr 11, 2019 2:15 pmHow is that done? Is it some kind of inheritance? I am familiar with coding, just not Lua.
-
- Burner Inserter
- Posts: 5
- Joined: Mon Apr 08, 2019 8:50 pm
- Contact:
Re: Auto target trees as hostiles
So I think "all" I would have to do is make Trees inherit from Prototype/SimpleEntityWithForce instead of Prototype/EntityWithHealth. Then they can be added to "Enemy" force, I don't think that will have any other effect. Now I just have to figure out HOW to do that...
(Biters MAY not attack them if they get stuck anymore, but am not sure.)
(Biters MAY not attack them if they get stuck anymore, but am not sure.)
Re: Auto target trees as hostiles
Here is a BP for automated deforestation! A constant combinator (in the bp: value 1000) sends the distance to scan for trees. The scanner scans one tile randomly within this distance so set it to whetever you want but extremely high values means close by trees will take a while to find. Only scans a single tile/tick so isn't very CPU intensive.
Mod list:
Mod list:
- (Optional) https://mods.factorio.com/mod/NapalmArtillery Kill trees quickly and with style with massive AoE fire.
- (Optional) https://mods.factorio.com/mod/Clean_Tree_Burning Kill all of them! Now that spreading wildfire will spare no tree alive!
- https://mods.factorio.com/mod/aai-progr ... structures A radar that can scan for trees and tell you where they are.
- Artillery Combinator is my brand new mod that is the final link that makes it possible to automate deforestation!
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser