in reply to Re:{3} Daft text adventure project
in thread Daft text adventure project

Ok. The code you provide is roughly how my creation program looks at the moment. (I don't want initialise redone anyway - some of that is going to be replaced by a function call, and the rest will doubtless be exported to a module, but for the interim, it just gets called once and does the dirty work.) However, what the desired state of affairs is, is that there are several functions, function1, function2, etc., which each set a different bunch of data (so that function1 sets %hash1, @array1 and $string1, for example), and the completed character is the union of all those sets, recast by a final function into a format the adventure will want to read. Each function is set up so that the player can choose a result (an arrangement of ability scores or a character race, in the currently operative functions), see what it looks like, and then accept it and proceed or reject it and go back to the top of the procedure. However, if a player, having chosen his ability scores, sees the races and wants to go back and re-arrange or re-roll his/her scores, we need to be able to call the ability-rolling procedure again, preferably preserving the old stats so that s/he can rearrange them, rather than utterly clobbering them as a re-start of the main program would do. Similarly, if, having seen the classes, the player wants a different race, we need to offer up the race procedure again.

I get the feeling I'm not articulating this very well. Ah, well.

Thanks again - Tiefling.