If the information associated within your race types isn't going to change once the game has started (eg. if that data is Static) then it doesn't need to be stored within a story variable, and thus doesn't need to be tracked by the History / Save systems. In this case you should use the built-in 'global like' setup special object to define your races on.
Place the followin example within your project's Story Javascript area, it defines a setup.races object which you can use to contain each of your different race definitions.
/*
Define the static race definitions.
NOTE: The properties of these definitions shouldn't be changed within the game.
*/
setup.races = {
"common elf": {
hair: "blue",
skin: "copper"
},
"wood elf": {
hair: "green",
skin: "brown"
},
"high elf": {
hair: "gold",
skin: "blonde"
},
"grey elf": {
hair: "grey",
skin: "grey"
},
"human": {
hair: "brown",
skin: "pale"
}
};
You can then use the new setup.races object within a TwineScirpt based Passage to: allocate a random race-type to a variable; display the value of properties associated with a specific race-type.
/* Assign a random race to a variable. */
<<set $race to Object.keys(setup.races).random()>>
/* Print the hair colour of that race. */
Race: $race
Hair: <<= setup.races[$race].hair>>
> Also how much can you store in twine, I dont think the space that holds the passages are infinite
There are two distinct storage areas:
1. The storage area used by the Twine 2.x application to store that contents of your project(s)
2. The storage area used by a published Twine based story HTML file to store the data of it's variables.
If you are using the Desktop release of the Twine 2.x application then the contents of your project is being stored on your hard-drive, so the amount of free space left on that hard-drive is the main limit on how large that project can get.
In regards to the 2nd storage area, the default settings of the web-browser being used to view the story HTML file are what limits how much data can be stored, and that is generally limitied to 5-10 MBs.