Ok, so
here's the latest on this development front.
I battled the source trying to change the bone's ghost hair and eye color for two weeks, not realising that I was attempting this for a long time with uninitialized data. Sad but true.
The solution was
this, which I am uneasy about, but should work as expected, as long as a bones ghost is not spawned elsewhere, which is impossible.
The main changes are:
Changed config "GHOST" gas type material colour to RGB(200, 200, 255).
Created a humanoid "bonesghost" which is a derived class of a humanoid spirit.
Game creates a bonesghost rather than a character::ghost.
Old-style nonhumanoid type ghosts can no longer be generated, but are still hanging out vestigally in the code.
SPOILER ALERT. Click here to see text.Reinstated the function where the bonesghost hovering above its own corpse will be resurrected into a friendly bones pet when hit by a blast from a wand of resurrection.
Spirits do not pick up and equip gear and weapons.
SPOILER ALERT. Click here to see text.Spirits cannot be polymorphed above 100 HP, as with first-generation ghosts from before.
Bonesghosts cannot be polymorphed.
Importantly, the bones ghost will retain the hair color, eye color, head and left/right arm bitmap positions, thereby retaining the appearance of the bone file player character.
Spirit limbs cannot be hacked off.
Spirit "touches" you, for now...