How to add onto existing variable?

I don’t know if this is the most elegant way to do it, but I think you could do it with multiple variables

For example (modifying your code):

*if (gender =1)
   *set step1 "1"
   *goto race
*elseif (gender =2)
   *set step1 "2"
etc

*label race
*if race ="human"
   *set step2 "1"
*if race ="dwarf"
   *set step2 "2"

*set password "$!{step1}$!{step2}"

I’ve tested to see if this works, and it appears to. Screenshots attached.

Pics

create
set
display

ETA: Although not immediately relevant to the question you’ve posed here, I think this topic belongs in the general conversation since it theoretically works in the opposite direction → extracting a character from an already created string (which could be a password)