Plantable & Printable Trees

by Yes-Man

Craft and plant (blue-printable) tree saplings that grow into trees, and automate it with the Recursive Blueprints mod. This is an update of 'My Tree Mod' from SamuelCombrinck, which was inspired by 'Simple Saplings' made by hypermark which apparently was a fork of 'JJtJJs Tree Planting Mod'.

Content
2 years ago
1.0 - 1.1
2.08K
Environment

b Error w Rampant

2 years ago

Hi,
I loaded your mod into a save that had Rampant and got this error:
75.410 Error MainLoop.cpp:1288: Exception at tick 26005148: The mod Rampant (3.3.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Rampant::on_tick (ID 0)
The mod Plantable & Printable Trees (1.2.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Blueprintable-Plantable-Trees::script_raised_built (ID 79)
Blueprintable-Plantable-Trees/control.lua:16: attempt to index field 'created_entity' (a nil value)
stack traceback:
Blueprintable-Plantable-Trees/control.lua:16: in function 'processEvent'
Blueprintable-Plantable-Trees/control.lua:36: in function <Blueprintable-Plantable-Trees/control.lua:35>
stack traceback:
[C]: in function 'create_entity'
Rampant/libs/Processor.lua:677: in function 'processPendingUpgrades'
Rampant/control.lua:990: in function <Rampant/control.lua:969>

2 years ago

Link to fixed mod - https://mods.factorio.com/mod/Blueprintable-Plantable-Trees-RampantFix

I fixed the issue, its caused by line 16 of control.lua trying to access the name method of "event.created_entity"

it was - if event.created_entity.name == 'tree-sapling' then

now it's - if event.created_entity ~= nil and event.created_entity.name == 'tree-sapling' then

2 years ago

Thx for the hint. I'll apply the same fix.

New response