|
|
Line 1: |
Line 1: |
| var attribute_costs = new Array();
| | [[Image:Arrow_up_16x16.png|baseline|link=ZeroSpace]] [[ZeroSpace|Contents]] |
| attribute_costs['brawn'] = new Array();
| | {{TOC right}} |
| attribute_costs['agility'] = new Array();
| |
| attribute_costs['reason'] = new Array();
| |
| attribute_costs['perception'] = new Array();
| |
| attribute_costs['will'] = new Array();
| |
| attribute_costs['power'] = new Array();
| |
| attribute_costs['endurance'] = new Array();
| |
| attribute_costs['brawn']['value'] = 0;
| |
| attribute_costs['brawn']['cost'] = 0;
| |
| attribute_costs['agility']['value'] = 0;
| |
| attribute_costs['agility']['cost'] = 0;
| |
| attribute_costs['reason']['value'] = 0;
| |
| attribute_costs['reason']['cost'] = 0;
| |
| attribute_costs['perception']['value'] = 0;
| |
| attribute_costs['perception']['cost'] = 0;
| |
| attribute_costs['will']['value'] = 0;
| |
| attribute_costs['will']['cost'] = 0;
| |
| attribute_costs['power']['value'] = 0;
| |
| attribute_costs['power']['cost'] = 0;
| |
| attribute_costs['endurance']['value'] = 0;
| |
| attribute_costs['endurance']['cost'] = 0;
| |
|
| |
|
| | <div class="sidebar"> |
| | <div id="calculate_attributes_cost_button"></div> |
| | <div id="calculate_attributes_cost_output"></div> |
| | </div> |
|
| |
|
| var imperial_alien_id = new Array();
| | A character's attributes in ''ZeroSpace'' are ranked on a scale from 1 to 10. Most humans' attributes fall within the 1 to 6 range -- from "Typical" to "Great". Very few humans reach 7 in any attribute, and 9 is the peak of human potential. Curiously enough, most nonhuman sentients fall within this range, as well. |
| imperial_alien_id['head_structure'] = new Array();
| |
| imperial_alien_id['skin_tone'] = new Array();
| |
| imperial_alien_id['skin_color'] = new Array();
| |
| imperial_alien_id['traits'] = new Array();
| |
|
| |
|
| // imperial_alien_id['organic']
| | Attributes cost one character point each up to 3, two character points each from 4 to 6, three character points each from 7 to 9, and four character points to increase an attribute from 9 to 10. |
| // 0 = android
| |
| // 1 = organic
| |
| // 2 = synthetic
| |
| // imperial_alien_id['subtype_artifical']
| |
| // 1 = obvious
| |
| // 2 = lifelike
| |
| // imperial_alien_id['type']
| |
| // 1 = humanoid
| |
| // 2 = anthropomorphic animal
| |
| // 3 = anthropomorphic plant
| |
| // 4 = insectoid
| |
| // 10 = uncommon
| |
| // 11 = colonial
| |
| // 12 = crystalline
| |
| // 13 = cybernetic
| |
| // 14 = gaseous
| |
| // 15 = myconoid
| |
| // 16 = viscous fluid
| |
| // imperial_alien_id['subtype_animal']
| |
| // 0 = none
| |
| // 1 = avian
| |
| // 2 = canine
| |
| // 3 = cephalopod
| |
| // 4 = feline
| |
| // 5 = mustelid
| |
| // 6 = reptilian
| |
| // imperial_alien_id['symmetry']
| |
| // 1 = humanoid bilateral
| |
| // 2 = dendriform bilateral
| |
| // 3 = globular bilateral
| |
| // 4 = serpentine bilateral
| |
| // 5 = dendriform radial
| |
| // 6 = globular radial
| |
| // 7 = serpentine radial
| |
| // imperial_alien_id['hair']
| |
| // 0 = hairless
| |
| // 1 = hair
| |
| // 2 = feathers
| |
| // 3 = scales
| |
| // 4 = spines
| |
| // imperial_alien_id['head_structure'][0]
| |
| // imperial_alien_id['head_structure'][1]
| |
| // 0 = none
| |
| // 1 = antennae
| |
| // 2 = brow ridges
| |
| // 3 = cranial ridges
| |
| // 4 = horns
| |
| // 5 = pointed ears
| |
| // 6 = tentacles
| |
| // imperial_alien_id['skin_tone'][0]
| |
| // imperial_alien_id['skin_tone'][1]
| |
| // 1 = colorless
| |
| // 2 = pale
| |
| // 3 = light
| |
| // 4 = medium
| |
| // 5 = deep
| |
| // 6 = dark
| |
| // 9 = absolute
| |
| // imperial_alien_id['skin_color'][0]
| |
| // imperial_alien_id['skin_color'][1]
| |
| // 1 = white
| |
| // 2 = red
| |
| // 3 = brown
| |
| // 4 = yellow
| |
| // 5 = green
| |
| // 6 = blue
| |
| // 9 = grey
| |
| // 10 = black
| |
| // imperial_alien_id['eye_type']
| |
| // 0 = NA
| |
| // 1 = circular pupil
| |
| // 2 = horizontally slit pupil
| |
| // 3 = vertically slit pupil
| |
| // 4 = pupilless
| |
| // 5 = solid color
| |
| // 6 = compound
| |
| // imperial_alien_id['traits'][0]
| |
| // imperial_alien_id['traits'][1]
| |
| // imperial_alien_id['traits'][...]
| |
|
| |
|
| function print_r(printthis, returnoutput)
| |
| {
| |
| var output = '';
| |
|
| |
|
| if ($.isArray(printthis) || typeof(printthis) == 'object')
| | {| cellpadding="4" cellspacing="1" |
| {
| | |+Table: Attribute cost |
| for(var i in printthis)
| | |- class="h1row" |
| {
| | ! class="aligncenter"|Description |
| output += i + ' : ' + print_r(printthis[i], true) + '\n';
| | ! class="aligncenter"|Value |
| }
| | ! class="aligncenter"|Incremental Cost |
| }
| | |- class="oddrow" |
| else
| | | class="alignleft"|Typical |
| {
| | | class="aligncenter"|1-3 |
| output += printthis;
| | | class="aligncenter"|1 |
| }
| | |- class="evenrow" |
| | | class="alignleft"|Great |
| | | class="aligncenter"|4-6 |
| | | class="aligncenter"|2 |
| | |- class="oddrow" |
| | | class="alignleft"|Fantastic |
| | | class="aligncenter"|7-9 |
| | | class="aligncenter"|3 |
| | |- class="evenrow" |
| | | class="alignleft"|Inconceivable |
| | | class="aligncenter"|10 |
| | | class="aligncenter"|4 |
| | |} |
|
| |
|
| if (returnoutput && returnoutput == true)
| |
| {
| |
| return output;
| |
| }
| |
| else
| |
| {
| |
| alert(output);
| |
| }
| |
| }
| |
|
| |
|
| function roll_dice(dice_size, dice_count)
| | ===Random Character Generation=== |
| {
| |
| dice_size = typeof dice_size !== 'undefined' ? dice_size : 6;
| |
| dice_count = typeof dice_count !== 'undefined' ? dice_count : 1;
| |
|
| |
|
| var dice_total = 0;
| | Would you like to roll dice for your attributes? You can! Roll three six-sided dice, and consult the following table to see what you get: |
|
| |
|
| for (i = 0; i < dice_count; i++)
| |
| {
| |
| dice_total += Math.floor((Math.random() * dice_size) + 1);
| |
| }
| |
|
| |
|
| return dice_total;
| | {| cellpadding="4" cellspacing="1" |
| } | | |+Table: Random attributes |
| | |- class="h1row" |
| | ! class="aligncenter"|Roll 3d6 |
| | ! class="aligncenter"|Value |
| | ! class="aligncenter"|Cost |
| | |- class="oddrow" |
| | | class="aligncenter"|3 |
| | | class="aligncenter"|1 |
| | | class="aligncenter"|1 |
| | |- class="evenrow" |
| | | class="aligncenter"|4-6 |
| | | class="aligncenter"|2 |
| | | class="aligncenter"|2 |
| | |- class="oddrow" |
| | | class="aligncenter"|7-10 |
| | | class="aligncenter"|3 |
| | | class="aligncenter"|3 |
| | |- class="evenrow" |
| | | class="aligncenter"|11-14 |
| | | class="aligncenter"|4 |
| | | class="aligncenter"|5 |
| | |- class="oddrow" |
| | | class="aligncenter"|15-17 |
| | | class="aligncenter"|5 |
| | | class="aligncenter"|7 |
| | |- class="evenrow" |
| | | class="aligncenter"|18 |
| | | class="aligncenter"|6 |
| | | class="aligncenter"|9 |
| | |} |
|
| |
|
| function random_character()
| |
| {
| |
| var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
| |
| var rnum = Math.floor(Math.random() * chars.length);
| |
| var random_character = chars.substring(rnum, rnum+1);
| |
|
| |
| return random_character;
| |
| }
| |
|
| |
|
| function get_android_model()
| | Roll six times, and add up the total cost. Subtract that total from your pool of character points. |
| {
| |
| var android_model = '';
| |
| var dice_size = 3;
| |
| var dice_count = 6;
| |
| var android_model_prefix_roll = roll_dice(dice_size, dice_count);
| |
| var android_model_prefix_length = Math.floor((android_model_prefix_roll - 2)/6) + 1;
| |
| var android_model_suffix_roll = roll_dice(dice_size, dice_count);
| |
| var android_model_suffix_length = Math.floor((android_model_suffix_roll - 2)/6) + 1;
| |
|
| |
|
| for (i = 0; i < android_model_prefix_length; i++)
| | Now assign what you rolled to your character's attributes (Brawn, Agility, Reason, Perception, Will, Power), placing each number wherever you like. |
| {
| |
| android_model += random_character();
| |
| }
| |
|
| |
|
| android_model += '-';
| | Your character's Endurance is equal to the character's Brawn or their Will, whichever is greater. |
|
| |
| for (i = 0; i < android_model_suffix_length; i++)
| |
| {
| |
| android_model += random_character();
| |
| }
| |
|
| |
| return android_model;
| |
| }
| |
|
| |
|
| function get_exotic_alien_symmetry(is_android)
| | ==Brawn== |
| {
| |
| is_android = typeof is_android !== 'undefined' ? is_android : false;
| |
|
| |
|
| var exotic_alien_symmetry;
| | Brawn (BRN) represents a character's physical might, close combat fighting ability, and general hardiness; the character's Brawn adds to their action value (AV) and defense value (DV) when attempting these types of tasks. |
| var organism_type = 'organism';
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var exotic_alien_symmetry_roll = roll_dice(dice_size, dice_count);
| |
|
| |
|
| if (is_android)
| | Brawn determines how much a character can lift and how far they can throw things. Brawn is the default attribute used for the character's attack value (AV) and defense value (DV) in close combat (or "hand-to-hand"). See the [[ZeroSpace:Actions|Actions]] chapter for more information. |
| {
| |
| organism_type = 'android';
| |
| }
| |
|
| |
|
| switch (exotic_alien_symmetry_roll)
| | If a character's Brawn is reduced to zero, they are unable to stand, and they have great difficulty moving. They must succeed at a challenging Will roll (vs. 2d6 + 3) every round just to crawl a meter, and they automatically fail any Brawn rolls. Brawn may not be reduced below zero. |
| {
| |
| case 1:
| |
| imperial_alien_id['symmetry'] = 2; // dendriform bilateral
| |
| exotic_alien_symmetry = 'dendriform ' + organism_type + ' with bilateral symmetry';
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['symmetry'] = 5; // dendriform radial
| |
| exotic_alien_symmetry = 'dendriform ' + organism_type + ' with radial symmetry';
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['symmetry'] = 3; // globular bilateral
| |
| exotic_alien_symmetry = 'globular ' + organism_type + ' with bilateral symmetry';
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['symmetry'] = 6; // globular radial
| |
| exotic_alien_symmetry = 'globular ' + organism_type + ' with radial symmetry';
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['symmetry'] = 4; // serpentine bilateral
| |
| exotic_alien_symmetry = 'serpentine ' + organism_type + ' with bilateral symmetry';
| |
| break;
| |
| case 6:
| |
| imperial_alien_id['symmetry'] = 7; // serpentine radial
| |
| exotic_alien_symmetry = 'serpentine ' + organism_type + ' with radial symmetry';
| |
| }
| |
|
| |
|
| return exotic_alien_symmetry;
| |
| }
| |
|
| |
|
| function get_exotic_alien_animal()
| | {| cellpadding="4" cellspacing="1" |
| {
| | |+Table: Brawn |
| var exotic_alien_animal;
| | |- class="h1row" |
| var dice_size = 6;
| | ! class="aligncenter"|Brawn |
| var dice_count = 1;
| | ! class="aligncenter"|Lift |
| var exotic_alien_animal_roll = roll_dice(dice_size, dice_count);
| | ! class="aligncenter"|Throw<br />(25 kg) |
| | ! class="aligncenter"|Standing<br />Long Jump |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|0 |
| | | class="alignright"|25 kg |
| | | class="alignright"|0 m |
| | | class="alignright"|0 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|1 |
| | | class="alignright"|45 kg |
| | | class="alignright"|1 m |
| | | class="alignright"|1 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|2 |
| | | class="alignright"|60 kg |
| | | class="alignright"|2 m |
| | | class="alignright"|1 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|3 |
| | | class="alignright"|90 kg |
| | | class="alignright"|3 m |
| | | class="alignright"|2 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|4 |
| | | class="alignright"|125 kg |
| | | class="alignright"|4 m |
| | | class="alignright"|2 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|5 |
| | | class="alignright"|180 kg |
| | | class="alignright"|6 m |
| | | class="alignright"|3 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|6 |
| | | class="alignright"|250 kg |
| | | class="alignright"|8 m |
| | | class="alignright"|3 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|7 |
| | | class="alignright"|350 kg |
| | | class="alignright"|11 m |
| | | class="alignright"|4 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|8 |
| | | class="alignright"|500 kg |
| | | class="alignright"|16 m |
| | | class="alignright"|4 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|9 |
| | | class="alignright"|700 kg |
| | | class="alignright"|23 m |
| | | class="alignright"|5 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|10 |
| | | class="alignright"|1,000 kg |
| | | class="alignright"|32 m |
| | | class="alignright"|5 m |
| | |} |
|
| |
|
| switch (exotic_alien_animal_roll)
| | #'''Lift''' indicates the greatest weight that the character can "clean and jerk" (pick up and lift overhead). A character carrying or supporting such a weight can take at most one or two steps per round. A character can move normally while carrying a weight corresponding to one less than their Brawn. For example, a character with Brawn 8 could carry up to 350 kg and suffer no penalties to their movement while doing so. |
| {
| | #'''Throw (25 kg)''' indicates the farthest distance that a character could throw a compact object weighing 25 kg. To see how far a character can throw heavier objects, subtract the Brawn required to lift the object from the character's total Brawn. Look up the difference in the "Brawn" column: this indicates how far the character can throw the object. For example, a character with Brawn 8 could throw an object weighing 60 kg (such as a cooperative slender human) up to 8 meters. |
| case 1:
| | #'''Jumps''' indicates the character's standing long jump. With a running long jump, the character's ground movement is added to their long jump distance. |
| imperial_alien_id['subtype_animal'] = 1;
| |
| exotic_alien_animal = "avian";
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['subtype_animal'] = 2;
| |
| exotic_alien_animal = "canine";
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['subtype_animal'] = 3;
| |
| exotic_alien_animal = "cephalopod";
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['subtype_animal'] = 4;
| |
| exotic_alien_animal = "feline";
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['subtype_animal'] = 5;
| |
| exotic_alien_animal = "mustelid";
| |
| break;
| |
| case 6:
| |
| imperial_alien_id['subtype_animal'] = 6;
| |
| exotic_alien_animal = "reptilian";
| |
| }
| |
|
| |
|
| return exotic_alien_animal;
| | ==Agility== |
| }
| |
|
| |
|
| function get_exotic_alien_weird_biology()
| | Agility (AGL) represents a character's coordination, ranged combat fighting ability, and general flexibility; the character's Agility adds to their action value (AV) and defense value (DV) when attempting these types of tasks. |
| {
| |
| var exotic_alien_weird_biology;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var exotic_alien_weird_biology_roll = roll_dice(dice_size, dice_count);
| |
| var exotic_alien_symmetry;
| |
|
| |
|
| // set defaults
| | Agility determines a character's base [[ZeroSpace:Actions#Movement|movement speed]] (running, swimming, etc.). Agility is the default attribute used for the character's attack value (AV) and defense value (DV) in ranged combat. See the [[ZeroSpace:Actions|Actions]] chapter for more information. |
| imperial_alien_id['type'] = 1; // humanoid
| |
|
| |
|
| switch (exotic_alien_weird_biology_roll)
| | If a character's Agility is reduced to zero, they have great difficulty moving. They must successfully attempt a challenging (difficulty 3) Will roll every round just to take a step or two, and they automatically fail any Agility rolls. Agility may not be reduced below zero. |
| {
| |
| case 1:
| |
| imperial_alien_id['type'] = 11; // colonial
| |
| exotic_alien_weird_biology = "colonial";
| |
| exotic_alien_symmetry = get_exotic_alien_symmetry();
| |
| exotic_alien_weird_biology += ' ' + exotic_alien_symmetry;
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['type'] = 12; // crystalline
| |
| exotic_alien_weird_biology = "crystalline";
| |
| exotic_alien_symmetry = get_exotic_alien_symmetry();
| |
| exotic_alien_weird_biology += ' ' + exotic_alien_symmetry;
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['type'] = 13; // cybernetic
| |
| exotic_alien_weird_biology = "cybernetic";
| |
| exotic_alien_symmetry = get_exotic_alien_symmetry();
| |
| exotic_alien_weird_biology += ' ' + exotic_alien_symmetry;
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['type'] = 14; // gaseous
| |
| exotic_alien_weird_biology = "gaseous alien";
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['type'] = 15; // myconoid
| |
| exotic_alien_weird_biology = "myconoid";
| |
| exotic_alien_symmetry = get_exotic_alien_symmetry();
| |
| exotic_alien_weird_biology += ' ' + exotic_alien_symmetry;
| |
| break;
| |
| case 6:
| |
| imperial_alien_id['type'] = 16; // viscous fluid
| |
| exotic_alien_weird_biology = "viscous fluid alien";
| |
| }
| |
|
| |
|
| return exotic_alien_weird_biology;
| |
| }
| |
|
| |
|
| function get_exotic_alien_type(is_android)
| | {| cellpadding="4" cellspacing="1" |
| { | | |+Table: Agility |
| is_android = typeof is_android !== 'undefined' ? is_android : false;
| | |- |
| | | |
| | {| cellpadding="4" cellspacing="1" |
| | |- class="h1row" |
| | ! class="aligncenter"|Agility |
| | ! class="aligncenter"|Walk<br /> (Base Move) |
| | ! class="aligncenter"|Run<br />(Double Move) |
| | ! class="aligncenter"|Sprint<br />(All-out Move) |
| | ! class="aligncenter"|Sprint<br />(kph) |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|10 |
| | | class="alignright"|0 m |
| | | class="alignright"|0 m |
| | | class="alignright"|0 m |
| | | class="alignright"|0 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|1 |
| | | class="alignright"|2 m |
| | | class="alignright"|4 m |
| | | class="alignright"|8 m |
| | | class="alignright"|5 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|2 |
| | | class="alignright"|4 m |
| | | class="alignright"|8 m |
| | | class="alignright"|16 m |
| | | class="alignright"|10 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|3 |
| | | class="alignright"|6 m |
| | | class="alignright"|12 m |
| | | class="alignright"|24 m |
| | | class="alignright"|14 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|4 |
| | | class="alignright"|8 m |
| | | class="alignright"|16 m |
| | | class="alignright"|32 m |
| | | class="alignright"|19 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|5 |
| | | class="alignright"|10 m |
| | | class="alignright"|20 m |
| | | class="alignright"|40 m |
| | | class="alignright"|24 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|6 |
| | | class="alignright"|12 m |
| | | class="alignright"|24 m |
| | | class="alignright"|48 m |
| | | class="alignright"|29 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|7 |
| | | class="alignright"|14 m |
| | | class="alignright"|28 m |
| | | class="alignright"|56 m |
| | | class="alignright"|34 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|8 |
| | | class="alignright"|16 m |
| | | class="alignright"|32 m |
| | | class="alignright"|64 m |
| | | class="alignright"|38 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|9 |
| | | class="alignright"|18 m |
| | | class="alignright"|36 m |
| | | class="alignright"|72 m |
| | | class="alignright"|43 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|10 |
| | | class="alignright"|20 m |
| | | class="alignright"|40 m |
| | | class="alignright"|80 m |
| | | class="alignright"|48 kph |
| | |} |
| | | |
| | {| cellpadding="4" cellspacing="1" |
| | |- class="h1row" |
| | ! class="aligncenter"|Agility |
| | ! class="aligncenter"|Swim<br />(Base Move) |
| | ! class="aligncenter"|Fast Swim<br />(Double Move) |
| | ! class="aligncenter"|Swim Sprint<br />(All-out Move) |
| | ! class="aligncenter"|Swim Sprint<br />(kph) |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|0 |
| | | class="alignright"|0 m |
| | | class="alignright"|0 m |
| | | class="alignright"|0 m |
| | | class="alignright"|0 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|1 |
| | | class="alignright"|1 m |
| | | class="alignright"|1 m |
| | | class="alignright"|2 m |
| | | class="alignright"|1 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|2 |
| | | class="alignright"|1 m |
| | | class="alignright"|2 m |
| | | class="alignright"|4 m |
| | | class="alignright"|2 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|3 |
| | | class="alignright"|2 m |
| | | class="alignright"|3 m |
| | | class="alignright"|6 m |
| | | class="alignright"|4 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|4 |
| | | class="alignright"|2 m |
| | | class="alignright"|4 m |
| | | class="alignright"|8 m |
| | | class="alignright"|5 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|5 |
| | | class="alignright"|3 m |
| | | class="alignright"|5 m |
| | | class="alignright"|10 m |
| | | class="alignright"|6 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|6 |
| | | class="alignright"|3 m |
| | | class="alignright"|6 m |
| | | class="alignright"|12 m |
| | | class="alignright"|7 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|7 |
| | | class="alignright"|4 m |
| | | class="alignright"|7 m |
| | | class="alignright"|14 m |
| | | class="alignright"|8 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|8 |
| | | class="alignright"|4 m |
| | | class="alignright"|8 m |
| | | class="alignright"|16 m |
| | | class="alignright"|10 kph |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|9 |
| | | class="alignright"|5 m |
| | | class="alignright"|9 m |
| | | class="alignright"|18 m |
| | | class="alignright"|11 kph |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|10 |
| | | class="alignright"|5 m |
| | | class="alignright"|10 m |
| | | class="alignright"|20 m |
| | | class="alignright"|12 kph |
| | |} |
| | |} |
|
| |
|
| var exotic_alien_type;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
|
| |
|
| if (is_android)
| | ==Reason== |
| {
| |
| dice_size = 5;
| |
| }
| |
|
| |
|
| var exotic_alien_type_roll = roll_dice(dice_size, dice_count);
| | Reason (REA) represents a character's ability to analyze data, draw conclusions from the facts at hand, and solve problems, and the character's Reason adds to their action value (AV) when attempting tasks that depend on these traits. |
| var exotic_alien_animal;
| |
| var exotic_alien_symmetry;
| |
|
| |
|
| // set defaults
| | If a character's Reason is reduced to zero, they have great difficulty concentrating. They must successfully attempt a challenging Will roll (difficulty 3) every round just to form a sentence or understand a simple question, and they automatically fail any Reason rolls. Reason may not be reduced below zero. |
| imperial_alien_id['type'] = 1; // humanoid
| |
|
| |
|
| switch (exotic_alien_type_roll)
| | ==Perception== |
| {
| |
| case 1:
| |
| imperial_alien_id['type'] = 1; // humanoid
| |
| exotic_alien_animal = get_exotic_alien_animal();
| |
| exotic_alien_type = exotic_alien_animal + "-headed humanoid";
| |
|
| |
|
| if (is_android)
| | Perception (PER) represents a character's awareness of their surroundings, their intuition, and their understanding of the motivations of others, and the character's Perception adds to their action value (AV) when attempting tasks that depend on these traits. |
| {
| |
| exotic_alien_type += ' android';
| |
| }
| |
| else
| |
| {
| |
| exotic_alien_type += ' organism';
| |
| }
| |
|
| |
|
| break;
| | If a character's Perception is reduced to zero, they have great difficulty recognizing or understanding their surroundings. They must successfully attempt a challenging Will roll (difficulty 3) every round just to identify someone they know or recognize where they are, and they automatically fail any Perception rolls. Perception may not be reduced below zero. |
| case 2:
| |
| imperial_alien_id['type'] = 2; // anthropomorphic animal
| |
| exotic_alien_animal = get_exotic_alien_animal();
| |
| exotic_alien_type = "anthropomorphic " + exotic_alien_animal;
| |
|
| |
|
| if (is_android)
| | ==Will== |
| {
| |
| exotic_alien_type += ' android';
| |
| }
| |
|
| |
|
| break;
| | Will (WIL) represents a character's determination, focus, and the strength of their personality, and the character's Will adds to their action value (AV) when attempting tasks that depend on these traits. |
| case 3:
| |
| imperial_alien_id['type'] = 3; // anthropomorphic plant
| |
| exotic_alien_type = "anthropomorphic plant";
| |
|
| |
|
| if (is_android)
| | If a character's Will is reduced to zero, they become listless and have great difficulty making choices or taking action. They automatically fail any Will rolls. Will may not be reduced below zero. |
| {
| |
| exotic_alien_type += ' android';
| |
| }
| |
|
| |
|
| break;
| | ==Power== |
| case 4:
| |
| imperial_alien_id['type'] = 4; // insectoid
| |
| exotic_alien_type = "insectoid";
| |
|
| |
|
| if (is_android)
| | Power (POW) represents a character's supernatural might, android power level, or psychic potential. If the character has esoteric powers or alien traits, the character's Power determines the potency of these powers. Most humans have a Power of zero. |
| {
| |
| exotic_alien_type += ' android';
| |
| }
| |
| else
| |
| {
| |
| exotic_alien_type += ' organism';
| |
| }
| |
|
| |
|
| break;
| | If a character's Power is reduced to zero, they can no longer use any esoteric powers or alien traits which depend on it. Power may not be reduced below zero. |
| case 5:
| |
| imperial_alien_id['type'] = 10; // uncommon
| |
| exotic_alien_symmetry = get_exotic_alien_symmetry(is_android);
| |
| exotic_alien_type = exotic_alien_symmetry;
| |
| break;
| |
| case 6:
| |
| exotic_alien_type = get_exotic_alien_weird_biology();
| |
| }
| |
|
| |
|
| return exotic_alien_type;
| |
| }
| |
|
| |
|
| function get_alien_type()
| | {| cellpadding="4" cellspacing="1" |
| {
| | |+Table: Power |
| var alien_type;
| | |- class="h1row" |
| var dice_size = 6;
| | ! class="aligncenter"|Power |
| var dice_count = 3;
| | ! class="aligncenter"|Maximum<br />Mass |
| var alien_type_roll = roll_dice(dice_size, dice_count);
| | ! class="aligncenter"|Maximum<br />Distance |
| var exotic_alien_type;
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|0 |
| | | class="alignright"|25 kg |
| | | class="alignright"|0 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|1 |
| | | class="alignright"|45 kg |
| | | class="alignright"|1 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|2 |
| | | class="alignright"|60 kg |
| | | class="alignright"|2 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|3 |
| | | class="alignright"|90 kg |
| | | class="alignright"|3 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|4 |
| | | class="alignright"|125 kg |
| | | class="alignright"|4 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|5 |
| | | class="alignright"|180 kg |
| | | class="alignright"|6 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|6 |
| | | class="alignright"|250 kg |
| | | class="alignright"|8 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|7 |
| | | class="alignright"|350 kg |
| | | class="alignright"|11 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|8 |
| | | class="alignright"|500 kg |
| | | class="alignright"|16 m |
| | |- class="evenrow" |
| | ! class="aligncenter h2cell"|9 |
| | | class="alignright"|700 kg |
| | | class="alignright"|23 m |
| | |- class="oddrow" |
| | ! class="aligncenter h2cell"|10 |
| | | class="alignright"|1,000 kg |
| | | class="alignright"|32 m |
| | |} |
|
| |
|
| // set defaults
| |
| imperial_alien_id['type'] = 1; // humanoid
| |
| imperial_alien_id['organic'] = 1; // organic
| |
| imperial_alien_id['subtype_animal'] = 0; // NA
| |
| imperial_alien_id['subtype_artifical'] = 0; // NA
| |
| imperial_alien_id['symmetry'] = 1; // humanoid bilateral
| |
|
| |
|
| if (alien_type_roll <= 13)
| | ==Endurance== |
| {
| |
| imperial_alien_id['type'] = 1; // humanoid
| |
| imperial_alien_id['organic'] = 1; // organic
| |
| alien_type = 'humanoid organism';
| |
| }
| |
| else if (alien_type_roll <= 15)
| |
| {
| |
| imperial_alien_id['organic'] = 0; // android
| |
| imperial_alien_id['subtype_artifical'] = 1; // obvious
| |
| dice_size = 100;
| |
| dice_count = 1;
| |
| var android_type_roll = roll_dice(dice_size, dice_count);
| |
|
| |
|
| if (android_type_roll <= 50)
| | Endurance (END) represents a character's determination and ability to shrug off physical and mental abuse. Unlike other attributes, Endurance is not purchased with character points. Endurance is equal to the character's Brawn or their Will, whichever is greater. If a character's Brawn or Will permanently changes, their Endurance also changes. |
| {
| |
| imperial_alien_id['type'] = 1; // humanoid
| |
| alien_type = 'humanoid android';
| |
| }
| |
| else if (android_type_roll <= 55)
| |
| {
| |
| imperial_alien_id['type'] = 1; // humanoid
| |
| imperial_alien_id['subtype_artifical'] = 2; // lifelike
| |
| alien_type = 'lifelike humanoid android';
| |
| }
| |
| else if (android_type_roll <= 99)
| |
| {
| |
| exotic_alien_type = get_exotic_alien_type(true);
| |
| alien_type = exotic_alien_type;
| |
| }
| |
| else
| |
| {
| |
| imperial_alien_id['subtype_artifical'] = 2; // lifelike
| |
| exotic_alien_type = get_exotic_alien_type(true);
| |
| alien_type = 'lifelike ' + exotic_alien_type;
| |
| }
| |
| }
| |
| else
| |
| {
| |
| imperial_alien_id['organic'] = 1; // organic
| |
| exotic_alien_type = get_exotic_alien_type();
| |
| alien_type = exotic_alien_type;
| |
| }
| |
|
| |
|
| return alien_type;
| | When a character is successfully attacked, one (or more, if using the optional [[ZeroSpace:Actions#Margin_Of_Success_(Optional)|margin of success]] rules) is temporarily subtracted from their Endurance. A character who has lost more than half of their Endurance can speak and take roleplaying actions, but any other action, including combat, incurs a penalty die. A character whose Endurance is reduced to zero is defeated: they are out of the fight, and probably unconscious. Endurance may not be reduced below zero. |
| }
| |
|
| |
|
| function is_alien_skin_patterned()
| |
| {
| |
| var alien_skin_patterned = false;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_skin_patterned_roll = roll_dice(dice_size, dice_count);
| |
|
| |
|
| if (alien_skin_patterned_roll == 6)
| |
| {
| |
| var alien_skin_patterned = true;
| |
| }
| |
|
| |
|
| return alien_skin_patterned;
| | [[Category:Attributes]] |
| }
| | [[Category:ZeroSpace]] |
| | |
| function get_alien_skin_intensity()
| |
| {
| |
| var alien_skin_intensity;
| |
| var dice_size = 5;
| |
| var dice_count = 1;
| |
| var alien_skin_intensity_roll = roll_dice(dice_size, dice_count);
| |
| var imperial_index = typeof imperial_alien_id['skin_tone'][0] === 'undefined' ? 0 : 1;
| |
| | |
| switch (alien_skin_intensity_roll)
| |
| {
| |
| case 1:
| |
| imperial_alien_id['skin_tone'][imperial_index] = 2; // pale
| |
| alien_skin_intensity = "pale";
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['skin_tone'][imperial_index] = 3; // light
| |
| alien_skin_intensity = "light";
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['skin_tone'][imperial_index] = 4; // medium
| |
| alien_skin_intensity = "medium";
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['skin_tone'][imperial_index] = 5; // deep
| |
| alien_skin_intensity = "deep";
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['skin_tone'][imperial_index] = 6; // dark
| |
| alien_skin_intensity = "dark";
| |
| break;
| |
| }
| |
| | |
| return alien_skin_intensity;
| |
| }
| |
| | |
| function get_alien_skin_color(is_obvious_android)
| |
| {
| |
| is_obvious_android = typeof is_obvious_android !== 'undefined' ? is_obvious_android : false;
| |
|
| |
| var alien_skin_color;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_skin_color_roll = roll_dice(dice_size, dice_count);
| |
| var imperial_index = typeof imperial_alien_id['skin_color'][0] === 'undefined' ? 0 : 1;
| |
| | |
| if (!is_obvious_android)
| |
| {
| |
| switch (alien_skin_color_roll)
| |
| {
| |
| case 1:
| |
| imperial_alien_id['skin_color'][imperial_index] = 6; // blue
| |
| alien_skin_color = "blue";
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['skin_color'][imperial_index] = 3; // brown
| |
| alien_skin_color = "brown";
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['skin_color'][imperial_index] = 5; // green
| |
| alien_skin_color = "green";
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['skin_color'][imperial_index] = 9; // grey
| |
| alien_skin_color = "grey";
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['skin_color'][imperial_index] = 2; // red
| |
| alien_skin_color = "red";
| |
| break;
| |
| case 6:
| |
| imperial_alien_id['skin_color'][imperial_index] = 4; // yellow
| |
| alien_skin_color = "yellow";
| |
| }
| |
| }
| |
| else
| |
| {
| |
| dice_size = 10;
| |
| dice_count = 1;
| |
| var android_color_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (android_color_roll)
| |
| {
| |
| case 1:
| |
| imperial_alien_id['skin_color'][imperial_index] = 2; // red
| |
| alien_skin_color = "red";
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['skin_color'][imperial_index] = 3; // orange
| |
| alien_skin_color = "orange";
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['skin_color'][imperial_index] = 4; // yellow
| |
| alien_skin_color = "yellow";
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['skin_color'][imperial_index] = 5; // green
| |
| alien_skin_color = "green";
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['skin_color'][imperial_index] = 6; // blue
| |
| alien_skin_color = "blue";
| |
| break;
| |
| case 6:
| |
| imperial_alien_id['skin_color'][imperial_index] = 7; // purple
| |
| alien_skin_color = "purple";
| |
| break;
| |
| default:
| |
| imperial_alien_id['skin_color'][imperial_index] = 9; // grey
| |
| alien_skin_color = "grey";
| |
| }
| |
| }
| |
| | |
| return alien_skin_color;
| |
| }
| |
| | |
| function get_alien_skin_combo(is_obvious_android)
| |
| {
| |
| is_obvious_android = typeof is_obvious_android !== 'undefined' ? is_obvious_android : false;
| |
|
| |
| var alien_skin_combo;
| |
| var dice_size = 4;
| |
| var dice_count = 1;
| |
| var increase_contrast_roll = roll_dice(dice_size, dice_count);
| |
| var increase_contrast = false;
| |
| | |
| var alien_skin_intensity = get_alien_skin_intensity();
| |
| var alien_skin_color = get_alien_skin_color(is_obvious_android);
| |
| var android_finish = '';
| |
| | |
| var imperial_index = typeof imperial_alien_id['skin_color'][0] === 'undefined' ? 0 : 1;
| |
| | |
| if (increase_contrast_roll == 1)
| |
| {
| |
| increase_contrast = true;
| |
| }
| |
|
| |
| if (increase_contrast && alien_skin_color == "grey")
| |
| {
| |
| if (alien_skin_intensity == "pale")
| |
| {
| |
| imperial_alien_id['skin_tone'][imperial_index] = 1; // colorless
| |
| alien_skin_intensity = "snow";
| |
| imperial_alien_id['skin_color'][imperial_index] = 1;
| |
| alien_skin_color = "white";
| |
| }
| |
| else if (alien_skin_intensity == "dark")
| |
| {
| |
| imperial_alien_id['skin_tone'][imperial_index] = 10; // absolute
| |
| alien_skin_intensity = "pitch";
| |
| imperial_alien_id['skin_color'][imperial_index] = 10;
| |
| alien_skin_color = "black";
| |
| }
| |
| }
| |
| | |
| if (is_obvious_android)
| |
| {
| |
| dice_size = 6;
| |
| dice_count = 1;
| |
| var android_finish_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (android_finish_roll)
| |
| {
| |
| case 1:
| |
| android_finish = "flat ";
| |
| break;
| |
| case 2:
| |
| android_finish = "glossy ";
| |
| break;
| |
| case 3:
| |
| android_finish = "glossy ";
| |
| break;
| |
| default:
| |
| android_finish = "metallic ";
| |
| }
| |
| }
| |
| | |
| alien_skin_combo = alien_skin_intensity + " " + android_finish + alien_skin_color;
| |
| | |
| return alien_skin_combo;
| |
| }
| |
| | |
| function get_alien_skin(is_obvious_android)
| |
| {
| |
| is_obvious_android = typeof is_obvious_android !== 'undefined' ? is_obvious_android : false;
| |
|
| |
| var alien_skin;
| |
| var alien_skin_2;
| |
| var has_alien_skin_patterned = is_alien_skin_patterned();
| |
| | |
| if (has_alien_skin_patterned)
| |
| {
| |
| alien_skin = get_alien_skin_combo(is_obvious_android);
| |
| alien_skin_2 = alien_skin;
| |
| | |
| while (alien_skin_2 == alien_skin)
| |
| {
| |
| alien_skin_2 = get_alien_skin_combo(is_obvious_android);
| |
| }
| |
| | |
| alien_skin += " and " + alien_skin_2;
| |
| }
| |
| else
| |
| {
| |
| alien_skin = get_alien_skin_combo(is_obvious_android);
| |
| }
| |
| | |
| return alien_skin;
| |
| }
| |
| | |
| function get_alien_eyes_type()
| |
| {
| |
| var alien_eyes_type;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_eyes_type_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (alien_eyes_type_roll)
| |
| {
| |
| case 1:
| |
| imperial_alien_id['eye_type'] = 1; // circular pupil
| |
| alien_eyes_type = "circular pupil";
| |
| break;
| |
| case 2:
| |
| imperial_alien_id['eye_type'] = 2; // horizontally slit pupil
| |
| alien_eyes_type = "horizontally slit pupil";
| |
| break;
| |
| case 3:
| |
| imperial_alien_id['eye_type'] = 3; // vertically slit pupil
| |
| alien_eyes_type = "vertically slit pupil";
| |
| break;
| |
| case 4:
| |
| imperial_alien_id['eye_type'] = 4; // pupilless
| |
| alien_eyes_type = "pupilless";
| |
| break;
| |
| case 5:
| |
| imperial_alien_id['eye_type'] = 5; // solid color
| |
| alien_eyes_type = "solid color";
| |
| break;
| |
| case 6:
| |
| imperial_alien_id['eye_type'] = 6; // compound
| |
| alien_eyes_type = "compound";
| |
| }
| |
| | |
| return alien_eyes_type;
| |
| }
| |
| | |
| function get_alien_eyes_intensity()
| |
| {
| |
| var alien_eyes_intensity;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_eyes_intensity_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (alien_eyes_intensity_roll)
| |
| {
| |
| case 1:
| |
| alien_eyes_intensity = "pale";
| |
| break;
| |
| case 2:
| |
| alien_eyes_intensity = "light";
| |
| break;
| |
| case 3:
| |
| alien_eyes_intensity = "medium";
| |
| break;
| |
| case 4:
| |
| alien_eyes_intensity = "deep";
| |
| break;
| |
| case 5:
| |
| alien_eyes_intensity = "dark";
| |
| break;
| |
| case 6:
| |
| alien_eyes_intensity = "glowing";
| |
| }
| |
| | |
| return alien_eyes_intensity;
| |
| }
| |
| | |
| function get_alien_eyes_color()
| |
| {
| |
| var alien_eyes_color;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_eyes_color_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (alien_eyes_color_roll)
| |
| {
| |
| case 1:
| |
| alien_eyes_color = "blue";
| |
| break;
| |
| case 2:
| |
| alien_eyes_color = "brown";
| |
| break;
| |
| case 3:
| |
| alien_eyes_color = "green";
| |
| break;
| |
| case 4:
| |
| alien_eyes_color = "grey";
| |
| break;
| |
| case 5:
| |
| alien_eyes_color = "red";
| |
| break;
| |
| case 6:
| |
| alien_eyes_color = "yellow";
| |
| }
| |
| | |
| return alien_eyes_color;
| |
| }
| |
| | |
| function get_alien_eyes(is_lifelike_humanoid)
| |
| {
| |
| is_lifelike_humanoid = typeof is_lifelike_humanoid !== 'undefined' ? is_lifelike_humanoid : true;
| |
|
| |
| // set defaults
| |
| imperial_alien_id['eye_type'] = 0;
| |
| | |
| var alien_eyes;
| |
| var dice_size = 2;
| |
| var dice_count = 1;
| |
| var increase_contrast_roll = roll_dice(dice_size, dice_count);
| |
| var increase_contrast;
| |
| var alien_eyes_intensity = get_alien_eyes_intensity();
| |
| var alien_eyes_color = get_alien_eyes_color();
| |
| var alien_eyes_type = '';
| |
| | |
| if (increase_contrast_roll == 1)
| |
| {
| |
| increase_contrast = true;
| |
| }
| |
| else
| |
| {
| |
| increase_contrast = false;
| |
| }
| |
| | |
| if (increase_contrast && alien_eyes_color == "grey")
| |
| {
| |
| if (alien_eyes_intensity == "pale")
| |
| {
| |
| alien_eyes_intensity = "snow";
| |
| alien_eyes_color = "white";
| |
| }
| |
| else if (alien_eyes_intensity == "dark")
| |
| {
| |
| alien_eyes_intensity = "pitch";
| |
| alien_eyes_color = "black";
| |
| }
| |
| }
| |
| | |
| if (is_lifelike_humanoid)
| |
| {
| |
| alien_eyes_type = ", " + get_alien_eyes_type();
| |
| }
| |
|
| |
| alien_eyes = alien_eyes_intensity + " " + alien_eyes_color + alien_eyes_type;
| |
| | |
| return alien_eyes;
| |
| }
| |
| | |
| function get_alien_humanoid_head_structure()
| |
| {
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_humanoid_head_structure_roll = roll_dice(dice_size, dice_count);
| |
| var alien_humanoid_head_structure_text;
| |
| | |
| switch (alien_humanoid_head_structure_roll)
| |
| {
| |
| case 1:
| |
| alien_humanoid_head_structure_text = "antennae";
| |
| break;
| |
| case 2:
| |
| alien_humanoid_head_structure_text = "brow ridges";
| |
| break;
| |
| case 3:
| |
| alien_humanoid_head_structure_text = "cranial ridges";
| |
| break;
| |
| case 4:
| |
| alien_humanoid_head_structure_text = "horns";
| |
| break;
| |
| case 5:
| |
| alien_humanoid_head_structure_text = "pointed ears";
| |
| break;
| |
| case 6:
| |
| alien_humanoid_head_structure_text = "tentacles";
| |
| }
| |
| | |
| var alien_humanoid_head_structure = new Array();
| |
| alien_humanoid_head_structure['id'] = alien_humanoid_head_structure_roll;
| |
| alien_humanoid_head_structure['text'] = alien_humanoid_head_structure_text;
| |
| | |
| return alien_humanoid_head_structure;
| |
| }
| |
| | |
| function get_alien_humanoid_head_hair_intensity()
| |
| {
| |
| var alien_humanoid_head_hair_intensity;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_humanoid_head_hair_intensity_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (alien_humanoid_head_hair_intensity_roll)
| |
| {
| |
| case 1:
| |
| alien_humanoid_head_hair_intensity = "pale";
| |
| break;
| |
| case 2:
| |
| alien_humanoid_head_hair_intensity = "light";
| |
| break;
| |
| case 3:
| |
| alien_humanoid_head_hair_intensity = "medium";
| |
| break;
| |
| case 4:
| |
| alien_humanoid_head_hair_intensity = "deep";
| |
| break;
| |
| case 5:
| |
| alien_humanoid_head_hair_intensity = "dark";
| |
| break;
| |
| case 6:
| |
| alien_humanoid_head_hair_intensity = "bright";
| |
| }
| |
| | |
| return alien_humanoid_head_hair_intensity;
| |
| }
| |
| | |
| function get_alien_humanoid_head_hair_color()
| |
| {
| |
| var alien_humanoid_head_hair_color;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_humanoid_head_hair_color_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (alien_humanoid_head_hair_color_roll)
| |
| {
| |
| case 1:
| |
| alien_humanoid_head_hair_color = "blue";
| |
| break;
| |
| case 2:
| |
| alien_humanoid_head_hair_color = "brown";
| |
| break;
| |
| case 3:
| |
| alien_humanoid_head_hair_color = "green";
| |
| break;
| |
| case 4:
| |
| alien_humanoid_head_hair_color = "grey";
| |
| break;
| |
| case 5:
| |
| alien_humanoid_head_hair_color = "red";
| |
| break;
| |
| case 6:
| |
| alien_humanoid_head_hair_color = "yellow";
| |
| }
| |
| | |
| return alien_humanoid_head_hair_color;
| |
| }
| |
| | |
| function get_alien_humanoid_head_hair()
| |
| {
| |
| var alien_humanoid_head_hair;
| |
| var dice_size = 2;
| |
| var dice_count = 1;
| |
| var increase_contrast_roll = roll_dice(dice_size, dice_count);
| |
| var increase_contrast;
| |
| var alien_humanoid_head_hair_intensity = get_alien_humanoid_head_hair_intensity();
| |
| var alien_humanoid_head_hair_color = get_alien_humanoid_head_hair_color();
| |
| | |
| if (increase_contrast_roll == 1)
| |
| {
| |
| increase_contrast = true;
| |
| }
| |
| else
| |
| {
| |
| increase_contrast = false;
| |
| }
| |
| | |
| if (increase_contrast && alien_humanoid_head_hair_color == "grey")
| |
| {
| |
| if (alien_humanoid_head_hair_intensity == "pale")
| |
| {
| |
| alien_humanoid_head_hair_intensity = "snow";
| |
| alien_humanoid_head_hair_color = "white";
| |
| }
| |
| else if (alien_humanoid_head_hair_intensity == "dark")
| |
| {
| |
| alien_humanoid_head_hair_intensity = "pitch";
| |
| alien_humanoid_head_hair_color = "black";
| |
| }
| |
| }
| |
| | |
| alien_humanoid_head_hair = alien_humanoid_head_hair_intensity + " " + alien_humanoid_head_hair_color;
| |
| | |
| return alien_humanoid_head_hair;
| |
| }
| |
| | |
| function get_alien_humanoid_head_structure_count()
| |
| {
| |
| var alien_humanoid_head_structure_count;
| |
| dice_size = 3;
| |
| dice_count = 1;
| |
| var alien_humanoid_head_structure_roll = roll_dice(dice_size, dice_count);
| |
| | |
| alien_humanoid_head_structure_count = alien_humanoid_head_structure_roll - 1;
| |
| | |
| return alien_humanoid_head_structure_count;
| |
| }
| |
| | |
| function get_alien_humanoid_head_hair_exists()
| |
| {
| |
| var alien_humanoid_head_hair_exists;
| |
| var dice_size = 2;
| |
| var dice_count = 1;
| |
| var alien_humanoid_head_hair_roll = roll_dice(dice_size, dice_count);
| |
| | |
| if(imperial_alien_id['subtype_animal'] == 1) // avian
| |
| {
| |
| imperial_alien_id['hair'] = 2; // feathers
| |
| alien_humanoid_head_hair_exists = true;
| |
| }
| |
| else
| |
| {
| |
|
| |
| switch (alien_humanoid_head_hair_roll)
| |
| {
| |
| case 1:
| |
| if(imperial_alien_id['subtype_animal'] == 6) // reptilian
| |
| {
| |
| imperial_alien_id['hair'] = 3; // scales
| |
| alien_humanoid_head_hair_exists = true;
| |
| }
| |
| else
| |
| {
| |
| imperial_alien_id['hair'] = 0; // hairless
| |
| alien_humanoid_head_hair_exists = false;
| |
| }
| |
| break;
| |
| case 2:
| |
| if(imperial_alien_id['subtype_animal'] == 6) // reptilian
| |
| {
| |
| imperial_alien_id['hair'] = 4; // spines
| |
| alien_humanoid_head_hair_exists = true;
| |
| }
| |
| else
| |
| {
| |
| imperial_alien_id['hair'] = 1; // hair
| |
| alien_humanoid_head_hair_exists = true;
| |
| }
| |
| break;
| |
| }
| |
| }
| |
| | |
| return alien_humanoid_head_hair_exists;
| |
| }
| |
| | |
| function get_alien_humanoid_head()
| |
| {
| |
| var alien_humanoid_head;
| |
| var alien_humanoid_head_hair;
| |
| var alien_humanoid_head_structure;
| |
| var alien_humanoid_head_structure_2;
| |
| | |
| var alien_humanoid_head_hair_exists = get_alien_humanoid_head_hair_exists();
| |
| var alien_humanoid_head_structure_count = get_alien_humanoid_head_structure_count();
| |
| | |
| switch (imperial_alien_id['hair'])
| |
| {
| |
| case 0:
| |
| alien_humanoid_head_hair = 'hairless';
| |
| break;
| |
| case 1:
| |
| alien_humanoid_head_hair = get_alien_humanoid_head_hair();
| |
| alien_humanoid_head_hair = alien_humanoid_head_hair + ' hair';
| |
| break;
| |
| case 2:
| |
| alien_humanoid_head_hair = get_alien_humanoid_head_hair();
| |
| alien_humanoid_head_hair = alien_humanoid_head_hair + ' feathers';
| |
| break;
| |
| case 3:
| |
| alien_humanoid_head_hair = get_alien_humanoid_head_hair();
| |
| alien_humanoid_head_hair = alien_humanoid_head_hair + ' scales';
| |
| break;
| |
| case 4:
| |
| alien_humanoid_head_hair = get_alien_humanoid_head_hair();
| |
| alien_humanoid_head_hair = alien_humanoid_head_hair + ' spines';
| |
| break;
| |
| }
| |
| | |
| if (alien_humanoid_head_structure_count)
| |
| {
| |
| alien_humanoid_head_structure = get_alien_humanoid_head_structure();
| |
| | |
| imperial_alien_id['head_structure'][0] = alien_humanoid_head_structure['id'];
| |
| alien_humanoid_head_structure = alien_humanoid_head_structure['text'] + ', ';
| |
| }
| |
| else
| |
| {
| |
| imperial_alien_id['head_structure'][0] = 0;
| |
| alien_humanoid_head_structure = '';
| |
| }
| |
|
| |
| if (alien_humanoid_head_structure_count == 2)
| |
| {
| |
| imperial_alien_id['head_structure'][1] = imperial_alien_id['head_structure'][0];
| |
| | |
| while (imperial_alien_id['head_structure'][1] == imperial_alien_id['head_structure'][0])
| |
| {
| |
| alien_humanoid_head_structure_2 = get_alien_humanoid_head_structure();
| |
|
| |
| imperial_alien_id['head_structure'][1] = alien_humanoid_head_structure_2['id'];
| |
| }
| |
| | |
| alien_humanoid_head_structure += alien_humanoid_head_structure_2['text'] + ', ';
| |
| }
| |
| | |
| alien_humanoid_head = alien_humanoid_head_structure + alien_humanoid_head_hair;
| |
| | |
| return alien_humanoid_head;
| |
| }
| |
| | |
| function get_alien_head(is_lifelike_humanoid)
| |
| {
| |
| is_lifelike_humanoid = typeof is_lifelike_humanoid !== 'undefined' ? is_lifelike_humanoid : true;
| |
| | |
| var alien_head = '';
| |
|
| |
| // set defaults
| |
| imperial_alien_id['head_structure'] = [];
| |
| imperial_alien_id['head_structure'][0] = 0;
| |
| | |
| if (is_lifelike_humanoid)
| |
| {
| |
| alien_head = get_alien_humanoid_head();
| |
| }
| |
| | |
| return alien_head;
| |
| }
| |
| | |
| function get_alien_species(is_android)
| |
| {
| |
| var alien_species;
| |
| | |
| if (is_android)
| |
| {
| |
| alien_species = get_android_model();
| |
| }
| |
| else
| |
| {
| |
| alien_species = generate_alien_species();
| |
| }
| |
| | |
| return alien_species;
| |
| }
| |
| | |
| function get_alien_traits(is_android)
| |
| {
| |
| is_android = typeof is_android !== 'undefined' ? is_android : false;
| |
| | |
| var alien_traits = new Array();
| |
| var alien_traits_list = new Array();
| |
| var alien_traits_taken = new Array();
| |
| var alien_traits_count = 0;
| |
| var alien_traits_total = 0;
| |
| var dice_size = 6;
| |
| var dice_count = 1;
| |
| var alien_traits_total_roll;
| |
| var alien_traits_total_roll;
| |
| var alien_trait_found; // -1 means not found
| |
| | |
| // set defaults
| |
| imperial_alien_id['traits'] = [];
| |
| | |
| alien_traits_list[1] = '360° Vision';
| |
| alien_traits_list[2] = 'Aerial';
| |
| alien_traits_list[3] = 'Aquatic';
| |
| alien_traits_list[4] = 'Armor';
| |
| alien_traits_list[5] = 'Camouflage';
| |
| alien_traits_list[6] = 'Clinging';
| |
| alien_traits_list[7] = 'Data Jack';
| |
| alien_traits_list[8] = 'Energy Shield';
| |
| alien_traits_list[9] = 'Exceptional Beauty';
| |
| alien_traits_list[10] = 'Frigian';
| |
| alien_traits_list[11] = 'Gelatinous';
| |
| alien_traits_list[12] = 'Healing';
| |
| alien_traits_list[13] = 'Heavyworlder';
| |
| alien_traits_list[14] = 'Hyperacuity';
| |
| alien_traits_list[15] = 'Huge';
| |
| alien_traits_list[16] = 'Immortality';
| |
| alien_traits_list[17] = 'Immunity To Poison';
| |
| alien_traits_list[18] = 'Immunity To Suffocation';
| |
| alien_traits_list[19] = 'Infernal';
| |
| alien_traits_list[20] = 'Life Drain';
| |
| alien_traits_list[21] = 'Linguist';
| |
| alien_traits_list[22] = 'Mental Calculator';
| |
| alien_traits_list[23] = 'Mind Link';
| |
| alien_traits_list[24] = 'Mind Shield';
| |
| alien_traits_list[25] = 'Multitasking';
| |
| alien_traits_list[26] = 'Natural Weaponry';
| |
| alien_traits_list[27] = 'Night Vision';
| |
| alien_traits_list[28] = 'Perfect Recall';
| |
| alien_traits_list[29] = 'Regeneration';
| |
| alien_traits_list[30] = 'Self-sustaining';
| |
| alien_traits_list[31] = 'Shapeshifter';
| |
| alien_traits_list[32] = 'Subterranean';
| |
| alien_traits_list[33] = 'Telepathy';
| |
| alien_traits_list[34] = 'Time Theft';
| |
| alien_traits_list[35] = 'Tiny';
| |
| alien_traits_list[36] = 'Unsettling';
| |
| | |
| if (is_android)
| |
| {
| |
| alien_traits_count = 2;
| |
| alien_traits_total = 2;
| |
| alien_traits[0] = 'Immunity To Poison';
| |
| imperial_alien_id['traits'][0] = 17;
| |
| alien_traits[1] = 'Immunity To Suffocation';
| |
| imperial_alien_id['traits'][1] = 18;
| |
| }
| |
| | |
| alien_traits_total_roll = roll_dice(dice_size, dice_count);
| |
| | |
| switch (alien_traits_total_roll)
| |
| {
| |
| case 1:
| |
| alien_traits_total += 1;
| |
| break;
| |
| case 6:
| |
| alien_traits_total += 3;
| |
| break;
| |
| default:
| |
| alien_traits_total += 2;
| |
| break;
| |
| }
| |
| | |
| dice_size = 36;
| |
| dice_count = 1;
| |
| | |
| while (alien_traits_count < alien_traits_total)
| |
| {
| |
| alien_traits_roll = roll_dice(dice_size, dice_count);
| |
| alien_trait_found = alien_traits.indexOf(alien_traits_list[alien_traits_roll]);
| |
| | |
| if (alien_trait_found === -1)
| |
| {
| |
| alien_traits[alien_traits_count] = alien_traits_list[alien_traits_roll];
| |
| imperial_alien_id['traits'][alien_traits_count] = alien_traits_roll;
| |
| alien_traits_count++;
| |
| }
| |
| }
| |
| | |
| imperial_alien_id['traits'].sort;
| |
| alien_traits.sort();
| |
|
| |
| return alien_traits;
| |
| }
| |
| | |
| function get_imperial_catalog_id(imperial_alien_id)
| |
| {
| |
| var imperial_catalog_id;
| |
|
| |
| imperial_alien_id['head_structure'].sort(function (a, b) { return a - b; });
| |
| imperial_alien_id['traits'].sort(function (a, b) { return a - b; });
| |
| | |
| imperial_catalog_id = imperial_alien_id['organic'] + '-';
| |
| imperial_catalog_id += imperial_alien_id['subtype_artifical'] + '-';
| |
| imperial_catalog_id += imperial_alien_id['type'] + '-';
| |
| imperial_catalog_id += imperial_alien_id['subtype_animal'] + '-';
| |
| imperial_catalog_id += imperial_alien_id['symmetry'] + '-{';
| |
| imperial_catalog_id += imperial_alien_id['head_structure'].join('|');
| |
| imperial_catalog_id += '}-';
| |
| imperial_catalog_id += imperial_alien_id['eye_type'] + '-{';
| |
| imperial_catalog_id += imperial_alien_id['traits'].join('|');
| |
| imperial_catalog_id += '}';
| |
| | |
| return imperial_catalog_id;
| |
| }
| |
| | |
| function is_obvious_android()
| |
| {
| |
| var is_obvious_android = false;
| |
|
| |
| if (imperial_alien_id['organic'] == 0)
| |
| {
| |
| if (imperial_alien_id['subtype_artifical'] == 1)
| |
| {
| |
| is_obvious_android = true;
| |
| }
| |
| }
| |
| | |
| return is_obvious_android;
| |
| }
| |
| | |
| function is_lifelike_humanoid()
| |
| {
| |
| var is_lifelike_humanoid = true;
| |
| | |
| // is obvious android OR is exotic alien
| |
| if (is_obvious_android() || imperial_alien_id['type'] >= 10)
| |
| {
| |
| is_lifelike_humanoid = false;
| |
| }
| |
|
| |
| return is_lifelike_humanoid;
| |
| }
| |
| | |
| function format_imperial_alien_id(imperial_alien_id)
| |
| {
| |
| var formatted_imperial_alien_id;
| |
| | |
| formatted_imperial_alien_id = "<pre>ISSCID: ";
| |
| formatted_imperial_alien_id += get_imperial_catalog_id(imperial_alien_id);
| |
| formatted_imperial_alien_id += "</pre>";
| |
|
| |
| return formatted_imperial_alien_id;
| |
| }
| |
| | |
| function format_alien_output(alien_output)
| |
| {
| |
| var formatted_alien_output;
| |
| | |
| formatted_alien_output = "<div class=\"sidebar_title\">Imperial Sentient Species Catalog</div>\n";
| |
| formatted_alien_output += '<div class="sidebar_subtitle">';
| |
| | |
| if (!imperial_alien_id['organic'])
| |
| {
| |
| formatted_alien_output += "<strong>Android:</strong> Model " + alien_output['species'];
| |
| }
| |
| else
| |
| {
| |
| formatted_alien_output += '<strong>Species:</strong> ' + alien_output['species'];
| |
| }
| |
| | |
| formatted_alien_output += "</div>\n";
| |
| formatted_alien_output += '<div><strong>Type:</strong> ' + alien_output['type'] + "</div>\n";
| |
| | |
| if (is_lifelike_humanoid())
| |
| {
| |
| formatted_alien_output += '<div><strong>Head:</strong> ' + alien_output['head'] + "</div>\n";
| |
| }
| |
|
| |
| if (is_lifelike_humanoid())
| |
| {
| |
| formatted_alien_output += '<div><strong>Skin:</strong> ' + alien_output['skin'] + "</div>\n";
| |
| }
| |
| else
| |
| {
| |
| formatted_alien_output += '<div><strong>Coloring:</strong> ' + alien_output['skin'] + "</div>\n";
| |
| }
| |
| | |
| formatted_alien_output += '<div><strong>Eyes:</strong> ' + alien_output['eyes'] + "</div>\n";
| |
| formatted_alien_output += '<div><strong>Traits:</strong>';
| |
| formatted_alien_output += "<ul>\n";
| |
| | |
| var alien_traits_count = alien_output['traits'].length;
| |
| | |
| for (var i = 0; i < alien_traits_count; i++)
| |
| {
| |
| formatted_alien_output += '<li>' + alien_output['traits'][i] + "</li>\n";
| |
| }
| |
| | |
| formatted_alien_output += "</ul>\n";
| |
| formatted_alien_output += "</div>\n";
| |
| | |
| formatted_alien_output += format_imperial_alien_id(imperial_alien_id)
| |
| | |
| return formatted_alien_output;
| |
| }
| |
| | |
| function generate_alien()
| |
| {
| |
| var alien_output = new Array();
| |
| alien_output['traits'] = new Array();
| |
| | |
| alien_output['type'] = get_alien_type();
| |
| alien_output['species'] = get_alien_species(!imperial_alien_id['organic']);
| |
| alien_output['head'] = get_alien_head(is_lifelike_humanoid());
| |
| alien_output['skin'] = get_alien_skin(is_obvious_android());
| |
| alien_output['eyes'] = get_alien_eyes(is_lifelike_humanoid());
| |
| alien_output['traits'] = get_alien_traits(!imperial_alien_id['organic']);
| |
| | |
| document.getElementById("random_alien_output").innerHTML = format_alien_output(alien_output);
| |
| }
| |
| | |
| //
| |
| // This code based on:
| |
| // Retro Alien Name Generator
| |
| // http://www.springhole.net/writing_roleplaying_randomators/retroaliennames.htm
| |
| //
| |
| | |
| var alien_vocab = new Array();
| |
| var intIncr
| |
| var intCat
| |
| | |
| intCat =0
| |
| intIncr=0
| |
| | |
| //The data stored is pretty simple. It works like this:
| |
| //
| |
| // The alien_vocab array has sub arrays that are named lists of data.
| |
| //
| |
| //alien_vocab[intCat]= new Array(); - The alien_vocab Array actually holds other arrays.
| |
| //alien_vocab[intCat][0]="FIRST" - This is the name of the list of data in this sub array. The name helps the program find the data.
| |
| //alien_vocab[intCat][1] = new Array() - Yep, ANOTHER array - this is the array that holds the actual data.
| |
| //alien_vocab[intCat][1][intIncr++]="First thing <SECOND>" // See that <SECOND> tag? Anything in brackets references another list.
| |
| //alien_vocab[intCat][1][intIncr++]="First thing <THIRD>"
| |
| //
| |
| // Unless it's the last entry, don't forget to increment and reset the counters!
| |
| //
| |
| //intCat++
| |
| //intIncr=0
| |
| | |
| | |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="FIRST"
| |
| alien_vocab[intCat][1] = new Array()
| |
| //alien_vocab[intCat][1][intIncr++]="<options>\n<options>\n<options>\n<options>\n<options>"
| |
| alien_vocab[intCat][1][intIncr++]="<options>"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="options"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstvowel><apos><midletters><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><ending><space><firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending><space><firstconsonant><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstvowel><apos><ending><space><firstconsonant><apos><vowel><apos><midletters><apos><ending>"
| |
| alien_vocab[intCat][1][intIncr++]="<firstconsonant><apos><vowel><apos><midletters><apos><ending><space><firstvowel><apos><ending>"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="firstvowel"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="A"
| |
| alien_vocab[intCat][1][intIncr++]="E"
| |
| alien_vocab[intCat][1][intIncr++]="I"
| |
| alien_vocab[intCat][1][intIncr++]="I<apos>a"
| |
| alien_vocab[intCat][1][intIncr++]="O"
| |
| alien_vocab[intCat][1][intIncr++]="U"
| |
| alien_vocab[intCat][1][intIncr++]="U<apos>a"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="firstconsonant"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="B"
| |
| alien_vocab[intCat][1][intIncr++]="B<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="B<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="D"
| |
| alien_vocab[intCat][1][intIncr++]="D<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="Ch"
| |
| alien_vocab[intCat][1][intIncr++]="F"
| |
| alien_vocab[intCat][1][intIncr++]="F<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="F<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="G"
| |
| alien_vocab[intCat][1][intIncr++]="G<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="G<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="H"
| |
| alien_vocab[intCat][1][intIncr++]="J"
| |
| alien_vocab[intCat][1][intIncr++]="K"
| |
| alien_vocab[intCat][1][intIncr++]="K<apos>h"
| |
| alien_vocab[intCat][1][intIncr++]="K<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="K<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="L"
| |
| alien_vocab[intCat][1][intIncr++]="M"
| |
| alien_vocab[intCat][1][intIncr++]="N"
| |
| alien_vocab[intCat][1][intIncr++]="P"
| |
| alien_vocab[intCat][1][intIncr++]="P<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="P<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="R"
| |
| alien_vocab[intCat][1][intIncr++]="S"
| |
| alien_vocab[intCat][1][intIncr++]="Sh"
| |
| alien_vocab[intCat][1][intIncr++]="S<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="S<apos>m"
| |
| alien_vocab[intCat][1][intIncr++]="S<apos>n"
| |
| alien_vocab[intCat][1][intIncr++]="S<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="T"
| |
| alien_vocab[intCat][1][intIncr++]="Th"
| |
| alien_vocab[intCat][1][intIncr++]="Th<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="T<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="V"
| |
| alien_vocab[intCat][1][intIncr++]="W"
| |
| alien_vocab[intCat][1][intIncr++]="X"
| |
| alien_vocab[intCat][1][intIncr++]="Y"
| |
| alien_vocab[intCat][1][intIncr++]="Z"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="vowel"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="a"
| |
| alien_vocab[intCat][1][intIncr++]="a<apos>a"
| |
| alien_vocab[intCat][1][intIncr++]="e"
| |
| alien_vocab[intCat][1][intIncr++]="e<apos>e"
| |
| alien_vocab[intCat][1][intIncr++]="i"
| |
| alien_vocab[intCat][1][intIncr++]="o"
| |
| alien_vocab[intCat][1][intIncr++]="o<apos>o"
| |
| alien_vocab[intCat][1][intIncr++]="u"
| |
| alien_vocab[intCat][1][intIncr++]="u<apos>u"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="midletters"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="b"
| |
| alien_vocab[intCat][1][intIncr++]="b<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="b<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="ch"
| |
| alien_vocab[intCat][1][intIncr++]="d"
| |
| alien_vocab[intCat][1][intIncr++]="d<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="f"
| |
| alien_vocab[intCat][1][intIncr++]="fr"
| |
| alien_vocab[intCat][1][intIncr++]="fl"
| |
| alien_vocab[intCat][1][intIncr++]="g"
| |
| alien_vocab[intCat][1][intIncr++]="g<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="g<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="h"
| |
| alien_vocab[intCat][1][intIncr++]="j"
| |
| alien_vocab[intCat][1][intIncr++]="k"
| |
| alien_vocab[intCat][1][intIncr++]="k<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="k<apos>s"
| |
| alien_vocab[intCat][1][intIncr++]="k<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="k<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="l"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>b"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>d"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>k"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>m"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>s"
| |
| alien_vocab[intCat][1][intIncr++]="l<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="m"
| |
| alien_vocab[intCat][1][intIncr++]="n"
| |
| alien_vocab[intCat][1][intIncr++]="n<apos>d"
| |
| alien_vocab[intCat][1][intIncr++]="n<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="p"
| |
| alien_vocab[intCat][1][intIncr++]="p<apos>k"
| |
| alien_vocab[intCat][1][intIncr++]="p<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="p<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="r"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>d"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>j"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>k"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>s"
| |
| alien_vocab[intCat][1][intIncr++]="r<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="s"
| |
| alien_vocab[intCat][1][intIncr++]="sh"
| |
| alien_vocab[intCat][1][intIncr++]="s<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="s<apos>n"
| |
| alien_vocab[intCat][1][intIncr++]="s<apos>m"
| |
| alien_vocab[intCat][1][intIncr++]="s<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="t"
| |
| alien_vocab[intCat][1][intIncr++]="th"
| |
| alien_vocab[intCat][1][intIncr++]="th<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="t<apos>r"
| |
| alien_vocab[intCat][1][intIncr++]="v"
| |
| alien_vocab[intCat][1][intIncr++]="x"
| |
| alien_vocab[intCat][1][intIncr++]="x<apos>x"
| |
| alien_vocab[intCat][1][intIncr++]="y"
| |
| alien_vocab[intCat][1][intIncr++]="z"
| |
| alien_vocab[intCat][1][intIncr++]="z<apos>g"
| |
| alien_vocab[intCat][1][intIncr++]="z<apos>l"
| |
| alien_vocab[intCat][1][intIncr++]="z<apos>n"
| |
| alien_vocab[intCat][1][intIncr++]="z<apos>m"
| |
| alien_vocab[intCat][1][intIncr++]="z<apos>t"
| |
| alien_vocab[intCat][1][intIncr++]="z<apos>z"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="ending"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="a"
| |
| alien_vocab[intCat][1][intIncr++]="ak"
| |
| alien_vocab[intCat][1][intIncr++]="ar"
| |
| alien_vocab[intCat][1][intIncr++]="ax"
| |
| alien_vocab[intCat][1][intIncr++]="an"
| |
| alien_vocab[intCat][1][intIncr++]="e<apos>a"
| |
| alien_vocab[intCat][1][intIncr++]="e<apos>e"
| |
| alien_vocab[intCat][1][intIncr++]="ek"
| |
| alien_vocab[intCat][1][intIncr++]="i<apos>a"
| |
| alien_vocab[intCat][1][intIncr++]="ik"
| |
| alien_vocab[intCat][1][intIncr++]="in"
| |
| alien_vocab[intCat][1][intIncr++]="is"
| |
| alien_vocab[intCat][1][intIncr++]="ix"
| |
| alien_vocab[intCat][1][intIncr++]="ok"
| |
| alien_vocab[intCat][1][intIncr++]="on"
| |
| alien_vocab[intCat][1][intIncr++]="o<apos>o"
| |
| alien_vocab[intCat][1][intIncr++]="os"
| |
| alien_vocab[intCat][1][intIncr++]="ox"
| |
| alien_vocab[intCat][1][intIncr++]="oz"
| |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="apos"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]="'"
| |
| alien_vocab[intCat][1][intIncr++]=""
| |
| alien_vocab[intCat][1][intIncr++]=""
| |
| alien_vocab[intCat][1][intIncr++]=""
| |
| alien_vocab[intCat][1][intIncr++]=""
| |
| alien_vocab[intCat][1][intIncr++]=""
| |
| | |
| | |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]="space"
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]=" "
| |
| alien_vocab[intCat][1][intIncr++]=" "
| |
| alien_vocab[intCat][1][intIncr++]=" "
| |
| alien_vocab[intCat][1][intIncr++]="-"
| |
| | |
| | |
| // Leave to Copy!
| |
| intCat++
| |
| intIncr=0
| |
| alien_vocab[intCat]= new Array();
| |
| alien_vocab[intCat][0]=""
| |
| alien_vocab[intCat][1] = new Array()
| |
| alien_vocab[intCat][1][intIncr++]=""
| |
| | |
| function generate_alien_species_GenNumber(nRange)
| |
| {
| |
| var iNumGen
| |
| iNumGen = Math.round((Math.random() * nRange));
| |
| | |
| return iNumGen;
| |
| }
| |
| | |
| function generate_alien_species_GetFrom(aArray)
| |
| {
| |
| var undefined
| |
| var sReturn
| |
| sReturn = aArray[generate_alien_species_GenNumber(aArray.length)];
| |
| if (sReturn == undefined)
| |
| {
| |
| sReturn = generate_alien_species_GetFrom(aArray)
| |
| }
| |
| return sReturn
| |
| }
| |
| | |
| | |
| function generate_alien_species_GetArray(sArrayName)
| |
| {
| |
| for (var intLooper=0;intLooper <alien_vocab.length;intLooper++)
| |
| {
| |
| if (alien_vocab[intLooper][0]==sArrayName)
| |
| {
| |
| return alien_vocab[intLooper][1];
| |
| break;
| |
| }
| |
| }
| |
| }
| |
| | |
| function generate_alien_species_ScanLine(sLine)
| |
| {
| |
| var iTagStart, iTagEnd
| |
| var sKey
| |
| | |
| if (sLine.indexOf("<") > -1)
| |
| {
| |
| iTagStart = sLine.indexOf("<");
| |
| iTagEnd = sLine.indexOf(">");
| |
|
| |
| sKey = sLine.substr(iTagStart+1, iTagEnd-(iTagStart+1));
| |
| | |
| sKey = generate_alien_species_GetFrom(generate_alien_species_GetArray(sKey))
| |
| sLine = sLine.substr(0, iTagStart) + sKey + sLine.substr(iTagEnd+1, (sLine.length - iTagEnd))
| |
| | |
| }
| |
|
| |
| | |
| if (sLine.indexOf("<") > - 1)
| |
| {
| |
| sLine = generate_alien_species_ScanLine(sLine)
| |
| }
| |
| | |
| return sLine;
| |
| }
| |
| | |
| | |
| function generate_alien_species()
| |
| {
| |
| sLine = generate_alien_species_GetFrom(generate_alien_species_GetArray("FIRST"));
| |
| | |
| sLine = generate_alien_species_ScanLine(sLine)
| |
| | |
| return sLine;
| |
| }
| |
| | |
| //
| |
| // Inserts the HTML into the page
| |
| //
| |
| | |
| $(function () {
| |
| var random_alien_button = document.getElementById('random_alien_button');
| |
| | |
| if (random_alien_button != null)
| |
| {
| |
| var formatted_alien_output;
| |
|
| |
| formatted_alien_output = "<div class=\"sidebar_title\">Imperial Sentient Species Catalog</div>\n";
| |
| formatted_alien_output += '<div class="sidebar_subtitle">';
| |
| formatted_alien_output += 'Click the button to display an entry from the Imperial Sentient Species Catalog, the most comprehensive index of sentient species in the known universe.';
| |
| formatted_alien_output += '</div>';
| |
|
| |
| random_alien_button.innerHTML = '<input type="button" value="Species Search..." onclick="generate_alien();" />';
| |
| random_alien_output.innerHTML = formatted_alien_output;
| |
| }
| |
| | |
| var calculate_attributes_cost_button = document.getElementById('calculate_attributes_cost_button');
| |
| | |
| if (calculate_attributes_cost_button != null)
| |
| {
| |
| var formatted_attributes_cost_output;
| |
|
| |
| formatted_attributes_cost_output = "<div class=\"sidebar_title\">Attribute Costs</div>\n";
| |
| formatted_attributes_cost_output += '<div class="sidebar_subtitle">';
| |
| formatted_attributes_cost_output += 'Click the button to display an entry from the Imperial Sentient Species Catalog, the most comprehensive index of sentient species in the known universe.';
| |
| formatted_attributes_cost_output += '</div>';
| |
|
| |
| calculate_attributes_cost_button.innerHTML = '<input type="button" value="Calculate Attributes..." onclick="calculate_attributes_cost();" />';
| |
| calculate_attributes_cost_output.innerHTML = formatted_attributes_cost_output;
| |
| }
| |
| }());
| |