You three guys are right onto it. Yep the next thing is to set up some database values for materials. I think I will make use of the material interaction flags to indicate whether a material can burn (being sure to deactivate the part of the code that causes scrolls to spontaneously combust, which is a function I want to preserve by building it into the new fire scheme). I want to make the burn-time dependant on the density of the material and perhaps the mass of the object. I will also introduce a new database variable BurnModifier, set this to a standard value except for materials which will have longer burn times, and allow this variable to dynamically influence the burn time and activation energy in conjunction with say rings of fire resistance, cloak of fire resistance etc.
To answer Azba:
4zb4 wrote
Why does it need identical RGB values to work?
Yep I have appropriated that code from the rust subsystem, down to the letter. The few lines that cause pixels in the ironalloys to take on a rusty poo colour, I replaced with a hard-coded colour value, sort of a dark grey. Identical RGB values give colours that appear along the grayscale, the darker end of which I would like to exploit to turn the pixels to a charcoal colour. It is just a bit of mathematics to finish the last step, and there are a multitude of ways of doing it, so I'm just letting my subconscious think of a way for me. Basically it is the problem where I have a material which has a particular colour, and I need to change a random colour to dark grey. There is a variable, Index, in the relevant part of the function which represents the intensity (so whether it is a light shade or a dark shade). I think I will normalise the colour to a known shade of gray and use the intensity to scale the brightness within a small range of values. I think this is your suggestion right?