I needed a horizontal percentage bar for my current project and since I didn't find one I figured out how it could be done with simple twine syntax. I decided that it might be of use for some other people so I made a sample tws. file. The Bar shows the relation between two values. I did both a linear and a non linear bar, which I personally needed. Both can be adapted easily for different purposes. For example as health bar, progress bar, or even as some sort of pseudo-slider. The ascii-Symbols that compose the bar in the example can be customized or exchanged by fitting gif graphics. By fiddling with the formula a different kind of non-linearity can be achieved and the granulation of the bar can be modified. You can download the tws or try the example html file here
. By twiddling with the values in the example you can see how the different bars work.
Please let me know if you find this useful! ;D
PS: I think there was a way to send variables to a a <<display>> function but I couldnt find the description of how it worked again. This bar could be made even more flexible using this trick, so feel free to ad that and post it here if you know how.