Hardy fire resistant bush


Fire bugs delight :) Forrest regrow after being destroyed and allows player to grow trees.

7 years ago
0.13 - 0.14
6

g Renewal

7 years ago

Does this work with renewal, or replace it?

7 years ago

It is completely different to renewal, I don't exactly know about the renewal MOD, but I believe that Renewal and NaturalTreeExpansion MODs are very similar, and this mod worked fine while NaturalTreeExpansion was installed on my version of Factorio, hence it should work fine with renewal but I haven't tested it.

As I see it Renewal and NaturalTreeExpansion are very random in the way they select places to place new trees, where as this MOD doesn't place trees randomly all over the map or near where the player is, like the other two do.

Instead it is triggered when either a tree is destroyed or the player plants a sapling, giving the player more "control" over where the trees grow.
ie a section of forest that is never interacted with will never grow new trees, but sections of forest that are in the middle of heavy combat will.

Either way I see no reason why you shouldn't be able to run either of the other two mods along side this one, however for me this mod is capable of being a complete replacement and it wont grow trees in the middle of your roads etc.

7 years ago

I tested it and it works fine alongside renewal, however renewal will only grow trees around where the player is.

7 years ago

Loving this mod so far, thanks.
Two questions though:
I only get seeds when I manually harvest trees, construction bots only bring back wood. Is this intended?
Can you make an exception for things like Agent Orange and Alien Termites so the trees don't grow back when destroyed en mass? I used Agent Orange to defoliate my base and the trees were back an hour later. That made pollution a snap, but it was a pain to build or interact with everything covered in trees.

7 years ago

Yes it is intentional that the construction bots don't get seeds, do you think that this is good or bad?

I will see what I can do about the Agent Orange and Alien Termites MODs :)

However if you harvest/destroy the saplings you will stop the regrowth cycle.
ie destroy the forest then come back 5 mins 30 seconds later and destroy the saplings not further trees should grow. (barring bugs)

7 years ago

If you hand mine or use robots to clear trees, the trees won't grow back!

The chainsaw is also particularly useful for this task.
https://mods.factorio.com/mods/devilwarriors/Chainsaw
Warning:: currently the chainsaw MOD doesn't play well with the AussyBush MOD, however DevilWarriors has said that this will be fixed by this weekend.
However in the discussions I have listed 3 lines of code in the control.lua file that you can edit to make it work with AussyBush.

Unfortunately in regards to the Agent Orange MOD I had a quick look at the code and ATM can't think of a good way to exclude trees from spawning saplings that have been destroyed by the Agent Orange MOD. sorry.

7 years ago

Can you tell what damage type kills the tree? Agent Orange uses poison damage so maybe you could limit the sapling spawn to fire damage only. Thanks for the info on the sapling removal. I have the deforest planner mod and it recognizes the saplings as trees so that should be easy enough to do.

As for robots bringing seeds back it would make artificial forests much easier, probably too easy so no don't change it imo.

Thanks for the response.

7 years ago

ATM it doesn't matter what type of damage kills the tree, whether it be from biters eating them to clean a path to you driving over them with a tank or car for any reason or just destroying them by poisoning, burning, grenadine, rocket or just shooting them with any gun.

Any action that triggers the on_entity_died event that results in the destruction of an entity of type tree, that is not a sapling will have a 66% chance of being recorded into a FIFO buffer or seed record queue.
Of these recorded events there is a 50/50 chance of either initiating the spread of 1 or 2 new seeds to a random position with in the set max_seed_fall_distance as a radius.

After a period of time governed by the set ticks_to_germination + how many other trees were destroyed prior to the event multiplied by ticks_between_updates the game code will test if the randomly chosen spot is viable to place a sapling.

If the sapling is place-able, its data will be popped off the seed record and placed onto the end of the sapling record queue, but if the sapling is not-place-able the data is simply popped off and discarded.

The sapling queue is handled in a similar fashion to the seed queue but places a random tree type from the tree_names list instead of a sapling, then based on a random dice roll will have repropergation_chance % (I really must remove the "re" from that variable name)
to begin the cycle again.

The biggest problem with the idea of limiting the growth to (or excluding the growth from) an particular damage type is the lack of information given by the on_entity_died event as it only returns the entity that died and the force that did the killing (if any).

Their is no direct information on how the entity died that I can see.
If I am wrong about this please please let me know?
as this would resolve the problem easily :)

With the limited information given from the event in regards to our problem of damage type
I don't see any fast way of implementing this feature.

I have had two ideas on how to do this but neither has really inspired any confidence.

My first idea was to search the force object and retrieve its players list and find the what weapons that the players had.
Unfortunately I quickly realized that this would turn into a bug fest as I would be unable to determine which player did the poisoning etc or which weapon was actually responsible.
ie if you drove over a tree (or destroyed it in any fashion that you would expect regrowth) but your friend on the other side of the map was holding the type of weapon that excludes the regrowth.
Also any of these types of scenarios quickly compound after taking into account that weapons can be switched in the mean time between firing them and the entity dies event, eventually making it impossible, by the fact that capsules can be used from any inventory position and need not (probably can't) be used from the weapons slots.

My second idea looks more promising!
By using the on)trigger_created_entity event and creating a data structure that marks no growth zones, I then would be able to exclude and remove seeds and trees from their queues that fell into these areas.

But unfortunately Factorio is a real-time game (well only unfortunate for this type of code)
The AussyBush MOD already makes use of two potentially massive data queues and I get around the potential lag and game performance hits, by never searching them.

The simple pop from the front is expensive enough, but unfortunately I haven't worked out a way to use a stack, that functions as expected.

I would say on average, burning down the odd forest here and there (<200 trees) the AussyBush MOD consumes ~0.050, however on my stress tests, where I play pyromaniac and burn down every tree (nearly) on a 38mb save I have managed to push it to ~0.780 and it actually starts to effect the FPS/UPS (don't know how much the FPS is due to my MOD or the Black Wednesday type fires), but implementing a search on these data structures is just not going to be possible in real time.

7 years ago

If you like I could guide you through making the second modification and you could test it and release it as a separate MOD

New response