opentype programming

Alternative letters in the same Open Type font


Hello experts on the field

I created a font that has 2 variations of the capital letters and 3 variations of the lower cases. It is a serif font traced from a popular children's book from the end of the 19th century so it was done by hand. I consulted the 2006 post by steff_en and got some answers.

I set my classes and followed twardoch instructions and I got no errors, I generated the font but it does not do what I intended. That is: everytime I type a particular letter for the second or third time I want them different. As I mentioned, I made 3 versions of every small cap letters and 2 versions of the capital letters.
Ex: in the word "tomorrow", I would like the three "o"s and the two "r"s to be diferent in the same word.