A different way of doing character creation

There's been a lot of threads about different ways of doing character creation. And quite often, someone comments that it looks inelegant using tail recursion [which isn't as inefficient as it looks, because Quest doesn't do lexical scope], or stacking a load of ShowMenu blocks inside each other.

Here's a slightly different way of doing it, in case anyone's interested.

Here's a turnscript:

if (not HasAttribute(game.pov, "alias")) {
  Ask ("What's your name?") {
    game.pov.alias = result
else if (not HasAttribute(game.pov, "class")) {
else if (not HasAttribute(game.pov, "race")) {
else if (not HasAttribute(game.pov, "gender")) {
else {
  msg ("Congratulations, character creation is finished! Now you can start to play.")
  DisableTurnScript (this)
  game.showdescriptiononenter = true

And because turnscripts don't run until you've taken a turn, put do (character creation turnscript, "script") in the game's start script :)

I'm actually building a library on this base, making a CharacterCreationQuestion type, so that the turnscript will keep on asking questions as long as there's one in the inventory. You can just put objects to represent a race/class/job etc inside the Question object, and they will be presented as options. You can put more questions inside a question object to have them only be asked after the first one; and questions inside a Race/Class/etc to have them only asked if you choose that option.

That is pure genius!

Thanks, MrAngel!

Mr.Angel! Did you ever get my message :D?

Probably. I've put off replying to a lot of things while I didn't have a computer for a month; trying to catch up now I'm not in panic most days.

This topic is now closed. Topics are closed after 60 days of inactivity.