Simple Player Character Race Option

I’ve been struggling for a long while with implementing a race choice (for fantasy races of course). Some people have posted about it but all of the methods seemed too complicated for my liking. I assume that’s because everyone is just coming up with this same system as a matter of common sense since I based off the most simple gender system I could find. But here it is anyway.

What this does is give you a fast flexible way to mention the make of weapons, nationality and the race of a PC. Please note that as is these quicktags {race}, {nationality} and ${make} will always mimic the Players choice.

Startup

*create race "elf" *create nationality "elven" *create make "elven"

Choice Example

[code]

*label race

From which of the people do you hale young ${man}?

*choice

#Elf
	*set race "elf"
	*set nationality "elven"
	*set make "elven"
	*goto race2

#Orc
	*set race "orc"
	*set nationality "orcish"
	*set make "orcish"
	*goto race2

#Eldrich Horror
	*set race "ancient ones"
	*set nationality "eldrich"
	*set make "eldrich"
	*goto race2

*label race2

You are one of the {race} from the lands of the {nationality} people and you’re weapons are of ${make} design.[/code]

Now you could skip right over the race2 label. But it’s a good way to test that all of the variables were actually working when you quicktag them. Hope this was helpful and thanks for reading.

P.S. if anyone knows how I could set up a similar system to reference other races in quicktags I’d love to know how. Especially if there was a way to have say the make of a weapon become randomized.
for example You’re weapons are of “random race” design.

I won’t call the curly-parens tag as “quicktag,” as there’s the correct term reference (under “truly bizarre references”).

As for the use of your {quicktag} (I’ll call it reference next on), I think you still need the dollar sign. Choicescript won't recognize <i>referred</i> variables in-text if you don't put the on it.


As for the randomization, it’s pretty easy. The basic flow of the code should be like this

*create make ""
*create roll 0


#Randomize me
   *rand roll 1 3
   *if roll = 1
      *set make "eldritch"
   *elseif roll = 2
      *set make "elven"
   *else
      *set make "orcish"

Welp sorry for the terminology fail. But thanks for the help. I really struggle with code and wouldn’t be able to use CS at all without this awesome community and people willing to use the coding equivalent of small words.

1 Like

FYI, sandwich your code with triple grave accents (```) to “codify” them.
Or use the button that looks like </> this in the comment toolbar.