As part of my current project I am implementing a character customization system which allows players to pick their skin and hair color, and possibly hair style. So far I have been glad to find the SetPersonMask option, but as I have been planning out the customization system I have encountered a problem.
Would it be possible for me to create a single spriteset, with no mask, from multiple spritesets that are masked? If so, how would I do that, and what kind of things would I need to set up?
If I understand correctly, you could using something like this (needs to be adapted for exactly what you are doing).
var ss = LoadSpriteset("some_spriteset.rss");
var newss = CreateSpriteset(ss.images[0].width, ss.images[0].height, num_images, ss.directions.length, num_frames): //num_frames and num_images will depend on the spritesets to be combined.
for(var i = 0; i<newss.images.length; i++){
newss.images[i] = ss.images[i] //also take from the other spritesets
}
The wiki has definitions for these functions (http://wiki.spheredev.org/API:Functions#Spritesets).
FBNil once had a demo of just such functionality (I think it was called "Spriteset Factory" or something similar). Now if we only had it in the Downloads Repo...
Edit: OH MY MOUSTACHE, FBN'S SITE IS SHOCKINGLY STILL UP (http://members.chello.nl/n.castillox/chibitutorials/). It keeps going down and up too randomly. I was close, it's called SpriteFactory (http://members.chello.nl/n.castillox/chibitutorials/data/TechDemo_SpriteFactory.zip).
By Merlin's Beard, I can't believe we can still get at that stuff! To the repo with it!
Fantastic. Downloaded these and putting them on the drive (under the tech demos, tutorials, libraries and unfinished games directories).