According to the Carnival site there will be 2 formal nights on a 12 day cruise. I believe the other nights are "resort casual". I don't think Carnival has any semi-formal nights, but I could be wrong .
Don't know about the masquerade ball, but someone else will probably be along to help you!
Have a wonderful cruise!
"A truly happy person is one who can enjoy the scenery on a detour."