Schall Tank Woodcutting


Harvest wood on the way of vehicles driving over trees. Can also harvest stone and coal when driving over rocks. (Locale: English, Deutsch, 正體中文, 简体中文, Português Brasileiro)

Utilities
2 years ago
0.16 - 1.1
2.01K
Transportation Mining

i [Solved] Feature requests...Rockcrushing...Vehicle equipment grid items/expand vehicle support... (As Option)

3 years ago

Add: Schall Tank Rockcrushing? Perhaps expand the mod for it to work for all vehicles?(if it doesn't already). Make the Woodcutter/Rockcrusher into vehicle equipment modules; they should need power to work.

3 years ago

It is possible, I will see what I can do when having the time.

This mod is working for all type = "car" entities, which include the car and all possible tanks. One can do "Car Woodcutting", but it would be a rather strange mod name. :-D
The only other vehicle types are "locomotive" and various "xxx-wagon". They are operating on fixed tracks with no possibility to impact trees or rocks. So it does not matter.
That's why I have used the term "vehicles driving" in the mod description, probably already working for all usual vehicles.
Note that this mod only triggers when the vehicle is colliding and dealing damage to a tree. So modded vehicles that evade such collisions (e.g., aircrafts, helicopters) will not harvest wood when flying. It does not make sense anyway, so it is not a problem.

I would rather not touch with the equipment side. They are not so easily accessed as you may have thought. Having to loop through most of the equipment modules inside grid, upon impact on every rock? Does not sound UPS-healthy...
Probably the way to implement would be just a new mod option, allowing rock harvesting with a single selection.

3 years ago

I may not be understanding this well, but would it really cause an issue with UPS? Couldn't you set up the module to trigger on event rather then constantly checking for damaged trees? Such as @vehicle.collision and if collided object is tree or rock, then subtract the necessary energy and mine it... Not sure if I used the right lingo or not. Oh also, is it possible to get rid of the damage to the vehicle? I know it only deals like 1 damage, but it's distracting and my bots are dying. Is it possible to remove.event(vehicle.collision.damage), or something like that? Again, I'm not familiar with the exact object terms used.

3 years ago

If you know the code or have a better built-in event to use, please tell me. I do not know how to set up such a custom event that could trigger when a specific module is installed on a vehicle, at least not to my current knowledge of Factorio API.
What I meant about UPS, is that the process of "loop through most of the equipment modules inside grid, upon impact on every rock" is not UPS-efficient.

For the vehicle damage thing...
Tank over trees does not take health reduction. (Still take shield damage, but there are no events triggered for pure shield damage, so nothing I can do.)
Car over trees take damage. Yes, I know that, but it makes the car too good if it is as powerful as tanks. I do not like buffing the car that much, at least when tanks can already do the job without damage.

For bots flying out to repair, do you know there is a "toggle personal roboport" shortcut?

I do not know ANY scripts or events to "remove.event(vehicle.collision.damage)" or prevent the damage. If it can be so easily done, I would have already done that. Or again, are you knowing such code about Factorio API that I do not know yet?

3 years ago

Rock crushing is now an option available in recently released 0.17.2 / 0.18.2.

New response