Okay so I had this idea for my game/story/whatever where you can go to a petshop and buy cats (at the moment only cats, but maybe something else later, so far one type of animal seems to be complicated enough). It makes sense in the context, trust me.
Anyway, at the petshop, you are able to purchase as many cats as you want. Originally, I was just going to make up a few different ones to choose from, but then I thought that it could be neat if instead of me making all them, the cats could each be randomized.
The traits that would be described/randomized would be gender, breed, eye colour, and a name that would be chosen by the player.
So, the question is, what would be the best way to go about doing this, if there is any?
I was thinking of doing something like this:
You look at the new cat.
<<set $totalcats = $totalcats + 1>><<set $cat1gender to random(1, 2)>><<set $cat1breed to random(1, 2)>><<set $cat1eyes to random(1, 2)>>
<<if $cat1gender is 1>>\It is male, <<else>>\It is female, <</if>><<if $cat1breed is 1>>\is a calico, <<else>>\is a tabby, <</if>><<if $cat1eyes is 1>>\and has blue eyes.<<else>>\and has green eyes.<</if>>
What would you like to name the cat? <<textbox "$cat1name" "Cat1">>
But then I realized that since I have no idea how many cats the player/reader would want, I'd have no idea what to set the limit to. Also, it would be rather tedious to make every alternate $cat2name, $cat3name, $cat4name, etc.
So, is there a way I could have the game/story auto create a variable like that, since they'd almost be indentical, save for the single number difference? If I could do that, I wouldn't really need a limit either, and then the player/reader could buy as a ridiculous amount of cats as he/she/they would like.
Also, I don't think I could reuse the same variable for each cat, because I want there to be a page where you can view all of your cats.
So, is there anyway to do this, or am I being too ambitious? It'd be kind of nice if I could do something like this though, as it could potentially be good for things other than silly cats.
Thank you in advance to anybody who reads/replies to this!