This is a remix of Customizable Temperature Tower Version 2 by quirxi.
I replaced the post-process script with code in the .scad file which outputs a Slicer PE "Before Layer Change G-Code" script directly.
You do need to specify the layer_height that you will use when you build the scad file.
Just copy the text in the echo statements, use something like notepad to strip of the leading
ECHO: " and the trailing quote.
Note that this approach means that you need to have OpenScad to use the tower.