Mining changes and basic character backgrounds.

Attempt #2.
replacing 7 lines of code with a costly mod operation ? in theory yes, but in practise ouch...
just replace the else ifs with a switch.