{= <!--Starts the player out with 100 hp and gives them a random amount of money between 5 and 500 silver--> (set: $morale to 100) (set: num-type $gold to 0) (set: num-type $silver to (random: 5,499)) (set: num-type $copper to (random: 0,99)) Your name is (print: $name) <br> Your pronouns are (print: $pronouns) <br> You are a(if: $race is "Elf")[n] (print: $race) (if: $race is "Beorning")[](else:)[(print: $class)] (if: $race is "Hobbit")[of](else: )[from] (print: $origin) <br> <!--Test actions--> (link-rerun: "Get Copper")[(set: $copper to it + 99)] <br> (link-rerun: "Get Silver")[(set: $silver to it + 999)] <br> (link-rerun: "Lose Silver")[(set: $silver to it - 999)] <br> (link-rerun: "Lose Copper")[(set: $copper to it - 99)] <br> (link-rerun: "Eat the Barrow-brie")[(set: $morale to it - 5)] <br> (link-rerun: "Snort the Athelas")[(set: $morale to it + 5)] <!--When the player's health reaches 0 they will be immediately redirected to the defeat page.--> (event: when $morale <= 0)[(redirect: "You Lose")]<!--Stops the default sidebar from showing.--> (hide: ?sidebar) (t8n: "fade") <!--The player can pick any name they like, which will be printed whenever the game calls for $name.--> (input: 2bind $name, "X=", "Name") <br> <!--The player can pick pronouns from the given options. Someone with a better understanding of neopronouns than me could perhaps make this an input box and use string macros to try and get the pronouns to display throughout the story. However since the pronouns will primarily be used when NPCs are talking about the player within their hearing, which is an edge case that I doubt will happen often, I didn't worry about it too much.--> (dropdown: 2bind $pronouns, "he/him", "she/her", "they/them") <br> <!--This calls a variable to test what the last viewed passage was.--> (set: $last to (history:)'s last) <!--If the last viewed passage was the title page, text will fly in from the right. If it was the race selection passage, text will fly in from the left. This transition, combined with the illusion of the name and gender remaining static at the top of the passage, creates the illusion of all the character creation elements being on the same "page." Separate passages are still required for each of the three major variables because the variables are dependent upon each other, and the options do not update correctly if a new passage is not loaded between viewing them.--> (if: $last is "TitlePage")[(t8n: "slide-left")[(display: "ClassData")]] (if: $last is "CharacterCreatorPage2")[(t8n: "slide-right")[(display: "ClassData")]](hide: ?sidebar) (t8n: "fade") <!--The use of 2bind causes the $name and $pronouns variables to remain the same, even though these are different inputs.--> (input: 2bind $name, "X=", "Name") <br> (dropdown: 2bind $pronouns, "he/him", "she/her", "they/them") <br> (set: $last to (history:)'s last) (if: $last is "CharacterCreatorPage1")[(t8n: "slide-left")[(display: "RaceData")]] (if: $last is "CharacterCreatorPage3")[(t8n: "slide-right")[(display: "RaceData")]](hide: ?sidebar) (t8n: "fade") (input: 2bind $name, "X=", "Name") <br> (dropdown: 2bind $pronouns, "he/him", "she/her", "they/them") <br> (set: $last to (history:)'s last) (if: $last is "CharacterCreatorPage2")[(t8n: "slide-left")[(display: "OriginData")]] (if: $last is "Next")[(t8n: "slide-right")[(display: "OriginData")]](hide: ?sidebar) Welcome! <br> [[Create a Character|CharacterCreatorPage1]]{= <!--A dropdown that allows the player to select their class.--> [(dropdown: 2bind $class, "Beorning", "Brawler", "Burglar", "Captain", "Champion", "Guardian", "Hunter", "Lore-master", "Mariner", "Minstrel", "Rune-keeper", "Warden") <br> <!--The live macro constantly checks the value of $class and updates the flavor text accordingly.--> {(live: )[ <!--if: checks to see if the conditions in the macro are met. else-if: is only run if the previous hook was hidden with its if: or else-if:. else: displays only if the whole list fails to show.--> (if: $class is "Beorning")[The Beornings of Middle-earth are a largely reclusive people. They trace their ancestry to Beorn himself, and spend most of their time deep in the wilderness. The solitude of the forest gives little comfort in recent times, with the enemy encroaching from all sides. The time has come for the descendants of Beorn to lend their strength to the Free People of Middle-earth. <br> This class is inspired by Beorn, who bravely stood with the Free Peoples during the Battle of Five Armies.] (else-if: $class is "Brawler")[Brawlers are formidable fighters whose bold manoeuvres can topple their foes and safeguard their allies. <br> This class is inspired by Helm Hammerhand, who to the astonishment of many, would take to the battlefield barehanded.] (else-if: $class is "Burglar")[Burglars are masters of stealth and misdirection. They rely on sleight-of-hand and starting attacks that allow their companions to overwhelm adversaries. <br> This class is inspired by the famous Bilbo Baggins, who accompanied Thorin and Company on their quest to the Lonely Mountain.] (else-if: $class is "Captain")[The Captains of Middle-earth hold the future in their hands. By their own strength of arms and the inspiration they instill in others, they must lead the Free Peoples to victory. <br> This class is inspired by Eärnur, last King of Gondor, who was revered both as a Captain skilled in arms, and as a Lore-Master.] (else-if: $class is "Champion")[Unrelenting in battle, Champions are the consummate warriors. A Champion cares not for their own well-being, but relies instead on strength and prowess to slay the Enemy before they can bring further destruction to Middle-earth. <br> This class is inspired by Gimli son of Glóin, whose skill in arms matched the bow-skills of Legolas.] (else-if: $class is "Guardian")[The Guardians are the stout protectors of the weak, and defenders of those in need. They are loyal companions to the end. True Guardians stand in the forefront of battle, shielding allies from enemy assaults. <br> This class was inspired by the hobbit Samwise Gamgee, whose loyalty to Frodo Baggins knew no bounds.] (else-if: $class is "Hunter")[Hunters are masters of field and forest, unmatched in their dexterity with the bow. They use their survival skills to guide companions and lay traps for enemies. The coming of the Enemy has forced them to adapt these skills to use against new prey. <br> This class was inspired by Legolas, Prince of Mirkwood, a mighty hunter and companion of Aragorn.] (else-if: $class is "Lore-master")[Lore-masters are seekers of knowledge and the guardians of wisdom. Through study of bygone Ages, they learn ancient secrets that allow them to hinder foes, as well as protect against the dark powers of the Enemy. <br> This class was inspired by Elrond Halfelven, Elf-lord and Master of Rivendell.] (else-if: $class is "Mariner")[Mariners are resourceful combatants, capable of using strange devices as well as their surroundings to aid them in battle. <br> This class is inspired by Eärendil, who alone of men successfully sailed to the Uttermost West to plead for the aid of the Valar.] (else-if: $class is "Minstrel")[Middle-earth is a land deeply infused with music, and true Minstrels are skilled at tapping into that power. They weave songs and tales so stirring that their companions' morale will not fail, and they will be driven to perform greater feats of prowess. They can even utter words of true power, and ward against the forces of darkness with their Anthems. <br> This class was inspired by Lúthien Tinúviel, whose Elven voice beguiled friend and foe alike.] (else-if: $class is "Rune-keeper")[Rune-keepers are gifted linguists and masters of true names. With this knowledge, a Rune-keeper crafts powerful rune-words that help the Free Peoples. Through unparalleled mastery of Angerthas and Tengwar runes, a Rune-keeper evokes much more than a normal scribe. Dagor runes deal with battle, Nestad with healing, and Thalas with support. <br> The class is inspired by the master Elf-smith Celebrimbor, whose skill with runes of power was unparalleled.] (else-if: $class is "Warden")[The Warden patrols the borders of civilized lands, preventing the encroachment of fell creatures from the Wild. They limit themselves to medium armour, so they can travel swiftly and silently to defend those they protect from threats. Wardens all have some military training, and have mastered a style of combat that uses combinations of basic attacks to create masterful Gambits. <br> The class was inspired by the marchwarden of Lothlórien, Haldir, and his brothers Rúmil and Orophin.] (else: )[If you're reading this, something is broken. Did you know the bumblebee bat is the world's smallest flying mammal?] ]}] <br> <!--Columns--> =|= [] =|= <!--Right aligned exit link. This passage will fade out as the next one fades/flies in. Columns were not necessary for right alignment here, but it makes the words line up with subsequent passages.--> (align:"==>")[(t8n-depart: "fade")[[Next|CharacterCreatorPage2]]] |==|{= <!--Most hooks on this page contain a dropdown allowing the player to select a race based on the class they selected in the CharacterCreatorPage1 passage. If they selected the Beorning class then they are given no other options and Beorning is automatically set as their race. The (set: $race to "Beorning") command must be inside the associated hook or it will be rerun each time the passage is loaded and all races will be reset to the default value allowed for the selected class, rather than auto scrolling to the preselected $race value.--> (if: $class is "Beorning")[(set: $race to "Beorning")] (else-if: $class is "Burglar")[(dropdown: 2bind $race, "Elf", "High Elf", "Hobbit", "Man", "River Hobbit", "Stout-axe")] (else-if: $class is "Captain")[(dropdown: 2bind $race, "Dwarf", "High Elf", "Man", "River Hobbit", "Stout-axe")] (else-if: $class is "Lore-master")[(dropdown: 2bind $race, "Elf", "High Elf", "Hobbit", "Man", "River Hobbit")] (else-if: $class is "Mariner")[(dropdown: 2bind $race, "High Elf", "Man", "River Hobbit", "Stout-axe")] (else-if: $class is "Rune-keeper")[(dropdown: 2bind $race, "Dwarf", "Elf", "High Elf", "Man", "River Hobbit", "Stout-axe")] (else: )[(dropdown: 2bind $race, "Dwarf", "Elf", "High Elf", "Hobbit", "Man", "River Hobbit", "Stout-axe")] <br> {(live: )[ (if: $race is "Beorning")[Beornings descend from ancient Men, and can "skin-change" into bears when angered. They are gruff, distrustful, impolite, respect all creatures of nature, and hate Orcs more than anything. <br> The Beornings have a famous affinity with animals, which they foster and keep in their homes more as friends than as pets or livestock. Beorn, the former chief of the Beornings, was known to speak with animals and understand their own speech - many of his descendants have fostered this talent. <br> This uncommon ability is supplanted by a greater gift; Beorn could change into the shape of a bear. This skill has been passed down through the generations, such that most if not all of the Beornings can muster the change. Most do so only in great need or at festivals that come with the changing of the seasons and phases of the moon. No stranger has ever witnessed the transformation. Beorning women also have this ability, and they share the robust physicality of the Beornings. <br> The Beornings do not eat animals, but live in the main on cream, honey from their Bee pastures and crops that they cultivate themselves in their rich gardens.] (else-if: $race is "Dwarf")[Dwellers of stone and miners of metal, the Dwarves are a doughty folk, resistant to the corruption of the Enemy -- but not to greed. <br> Dwarves can be excellent warriors, displaying unique toughness in battle and ability to craft great things. <br> The stout Dwarves of Middle-earth are known for their steadfast determination, hearty strength, and commitment to all things found in the world’s deep places. Living a secretive life in their homes beneath the great mountains, Dwarves are expert miners and workers of stone and metal. They stand on average four-and-a-half to five feet high, and live long lives, occasionally reaching an age of 250 years.] (else-if: $race is "Elf")[Long ago, the Elves, also known as the Fair Folk, welcomed the younger Races of Middle-earth and allied with them when the need was great, but centuries of war, betrayal, and hardship have made them fiercely protective of their seclusion. <br> Tall and strong, fair and graceful, Elves have keen senses and a deep affinity for the beauty of the natural world. Throughout the ages, the deeds and struggles of the noble races of Elves have been entwined with the history of Middle-earth. Elves do not grow old as other races do — there are Elves abroad in Middle-earth today who still remember their youth in the First Age. They remember all too well the devastation caused by the tides of evil that once darkened the land — a shadow that threatens to do so once again. In ages past, the Elves divided into many different groups, and settled throughout Middle-earth, primarily in the ancient forested realms where they still live.] (else-if: $race is "High Elf")[High Elves, who have beheld the beauty of Valinor, possess grace and strength beyond even their woodland kin. Those few who remain yearn to see that Middle-earth is safe to bequeath to Men before they depart for the Undying Lands.] (else-if: $race is "Hobbit")[Happiest when enjoying a simple life with six square meals a day, Hobbits are a solid and dependable Race when called to action. <br> There are few recorded deeds of Hobbits until late in the Third Age of Middle-earth, which is just the way Hobbits prefer it. They are a simple, quiet folk, preferring to dwell in hillside holes in and around the land known as the Shire. These small folk enjoy the peaceful endeavors of farming, eating and gift giving, rather than concerning themselves with the dangerous affairs of the rest of Middle-earth. <br> In these dark days, however, it is the unassuming Hobbits, with their often surprising cleverness in both word and action, that will have the greatest impact in the war between the Free Peoples of Middle-earth and the lengthening shadows of evil... from Angmar, to the north.] (else-if: $race is "Man")[Not as long-lived as Elves, sturdy as Dwarves, or resilient as Hobbits, the Race of Man is renowned for their courage and resourcefulness. <br> The Race of Man is the shortest-lived of the Races of Middle-earth, yet it is also the race destined to rule in the years beyond the Third Age. Their mortality was considered a unique gift, but in time it became known as “The Doom of Men” and the source of lamentation. Men and Women are capable of great courage and honour, yet they can also easily fall prey to ambition, deceit and betrayal.] (else-if: $race is "River Hobbit")[The last of their kind remaining east of the Misty Mountains, River Hobbits are a lithe and silvan folk, steeped in wood-lore and attuned to the mountains where they remain hidden.] (else-if: $race is "Stout-axe")[The Stout-axes were once a part of one of the Seven Houses of the Dwarves, known as Drása's Folk. Brought to ruin by their desire for the Ring granted to them by Sauron, Drása's Folk doomed their descendants to an era of thralldom in the Black Land.] (else: )[If you're seeing this, something is broken. Did you know the circulatory system is over 60,000 miles long?] ]} <br> =|= [(t8n-depart: "fade")[[Back|CharacterCreatorPage1]]] =|= (align:"==>")[(t8n-depart: "fade")[[Next|CharacterCreatorPage3]]] |==|{= (if: $race is "Beorning")[(set: $origin to "The Vales of Anduin")] (else-if: $race is "Dwarf")[(dropdown: 2bind $origin, "The Blue Mountains", "The Grey Mountains", "The Iron Hills", "The Lonely Mountain", "The White Mountains")] (else-if: $race is "Elf")[(dropdown: 2bind $origin, "Edhellond", "Lindon", "Lórien", "Mirkwood", "Rivendell")] (else-if: $race is "High Elf")[(dropdown: 2bind $origin, "Beleriand", "Gondolin", "Imladris", "Nargothrond", "Ossiriand")] (else-if: $race is "Hobbit")[(dropdown: 2bind $origin, "The Fallohides", "The Harfoots", "The Stoors")] (else-if: $race is "Man")[(dropdown: 2bind $origin, "Bree-land", "Dale", "Gondor", "Harad", "Rhûn", "Rohan", "Umbar")] (else-if: $race is "River Hobbit")[(set: $origin to "Misthallow")] (else-if: $race is "Stout-axe")[(set: $origin to "Mordor")] (else: )[If you're seeing this, something is broken. Did you know that German chocolate cake isn't actually German?] <br> {(live: )[ (if: $origin is "The Vales of Anduin")[Like all Beornings, you hail from the woods and dales surrounding the Anduin, from the shores near the Carrock up to the High Pass through the Misty Mountains.] (else-if: $origin is "The Blue Mountains")[Your home is in Ered Luin, the Blue Mountains, where there had once been two great dwarf-kingdoms and where the kinsmen of Thráin and his son Thorin Oakenshield lived in exile after Smaug drove them from the Lonely Mountain.] (else-if: $origin is "The Grey Mountains")[You are from Ered Mithrin, the Grey Mountains, the chief of which is Mount Gundabad, from whence came Durin the Deathless, first Father of the Dwarves. Your kindred returned to the Mountains after the Dragons perished.] (else-if: $origin is "The Iron Hills")[You come from the Iron Hills, settled by dwarves as a refuge from the Cold-drakes, and whence came Dáin Ironfoot, King under the Mountain, kinsman of the great Thorin Oakenshield.] (else-if: $origin is "The Lonely Mountain")[You hail from Erebor, the Lonely Mountain, where Smaug the Golden made his Lair until Thorin Oakenshield reclaimed it for his people. There does Dáin Ironfoot now rule as King under the Mountain.] (else-if: $origin is "The White Mountains")[You are from the southwestern halls of Ered Nimrais, the White Mountains in the south bordering the lands of Andrast. Though your kingdom lies far from the central mountains where Men once dwelt, the rumour of the Oathbreakers has given your realm an ill name.] (else-if: $origin is "Edhellond")[You are of the Nandor of Edhellond, the great Elf-haven in the south built by Amroth at the Mouths of Anduin.] (else-if: $origin is "Lindon")[You hail from Lindon, the green lands of the Elves between Ered Luin and the Sea, where Gil-galad, the last great Elf-king, once ruled. Círdan the Shipwright now rules there from Mithlond, the Grey Havens.] (else-if: $origin is "Lórien")[You come from Lothlórien, the fabled golden woods whose Elves dwell high in the mallorn-trees and are ruled by Celeborn, wisest of the Eldar of Middle-earth, and the Lady Galadriel.] (else-if: $origin is "Mirkwood")[You are a Wood-elf of Mirkwood, once called Greenwood the Great, where King Thranduil keeps watch against the growing darkness of Dol Guldur, former stronghold of Sauron in his guise as the Necromancer.] (else-if: $origin is "Rivendell")[You hail from Imladris, called Rivendell by Men, built by Elrond Halfelven as a refuge for the Elves of Eregion as they fled destruction at the hands of Sauron.] (else-if: $origin is "Beleriand")[In Elder Days, you dwelt in the fair Elf-lands of Beleriand, now broken and lost forever beneath the Sea.] (else-if: $origin is "Gondolin")[The memory of the white towers of Gondolin, hidden city of the High Elves, still burns within you, though it fell to treachery long ago.] (else-if: $origin is "Imladris")[Driven from your home by Death and war, you came to the hidden vale of Imladris, where you have long dwelt under Elrond's protection.] (else-if: $origin is "Nargothrond")[You spent your younger days in the cavern-fortress of Nargothrond, the hall of Finrod Felagund, whose beauty was lost in the wars of old.] (else-if: $origin is "Ossiriand")[Your home of Ossiriand survived the fall of Beleriand to be come Gil-galad's realm of Lindon, now grown empty as the Elves depart for Valinor.] (else-if: $origin is "The Fallohides")[Lovers of trees and woodlands, the Fallohides were the first hobbits to come to the Shire. They generally tend to be fairer of skin and hair, as well as taller and more slender.] (else-if: $origin is "The Harfoots")[The Harfoots are the most prodigious hole-dwellers and were the first to cross west into Eriador. They generally tend to be browner of skin than the other kindreds, as well as smaller and shorter.] (else-if: $origin is "The Stoors")[The Stoors were the last of the hobbit kindreds to come to the Shire, settling at last in the eastern marshlands of the Shire. They generally tend to be heavier and broader of build than the other kindreds.] (else-if: $origin is "Bree-land")[You grew up in Bree-land, once part of the North Kingdom of Arnor, once ruled by Elendil the Tall as High King of Middle-earth, and later by his elder son Isildur. Now it is but a simple, rustic land, and the North Kingdom is no more.] (else-if: $origin is "Dale")[You come from the Dale-lands in the northeast of Middle-earth, beneath the Lonely Mountain, where Bard the Bowman slew the dragon Smaug and fought in the Battle of Five Armies.] (else-if: $origin is "Gondor")[You hail from the land of Gondor, the South Kingdom once ruled conjointly by the sons of Elendil, Isildur and Anárion, ever-watchful against the looming threat of Mordor.] (else-if: $origin is "Harad")[You are from the Great Southern Empire, known in the north as Harad but called Shagâna by its own people. It is a land sworn to serve Sauron. Though many of its folk defy his rule.] (else-if: $origin is "Rhûn")[Your home lies in the eastern lands of Rhûn, a land of nomadic clans and warring kingdoms long held in conflict between the servants of Sauron and brave folk who dare to resist him.] (else-if: $origin is "Rohan")[You are one of the Horse-lords of the Riddermark, the realm granted to Eorl the Young by Cirion, Steward of Gondor, currently ruled by Théoden, Son of Thengel.] (else-if: $origin is "Umbar")[You hail from Umbar, land of the Corsairs, whose ships spread fear up and down Middle-earth's shores. Though its current rulers worship Sauron, its people yearn for freedom.] (else-if: $origin is "Misthallow")[Dwelling among the dells of the Misty Mountains, the River Hobbits of Misthallow are a rustic folk, quick-tongued and nimble-fingered. Known mainly in old tales and songs, they seldom venture outside their secret vales.] (else-if: $origin is "Mordor")[You are a Stout-axe, a Dwarf of the Khirvísa clan, in thrall to the Dark Lord of Mordor. Stripped of your history, your clan name, and even your own language, the Stout-axes have become a lost people, with each generation growing stronger and grimmer than the last as ceaseless labour and suffering reshapes them. As Mordor grows in might, the Enemy has put the Stout-axes to ever more dangerous work in the furnaces of Udûn and beneath Barad-dûr itself, heedless of how many lives are spent as he musters his armies for War.] (else: )[If you're seeing this, something is broken. There are 7,641 islands in the Phillipines.] ]} <br> =|= [(t8n-depart: "fade")[[Back|CharacterCreatorPage2]]] =|= (align:"==>")[(t8n-depart: "fade")[[Finish|TestPage]]] |==|{= (t8n: "fade")+ <!--Allows me to tag passages with "noheader" to prevent the stat bar from showing on them.--> (unless: (passage:)'s tags contains "noheader")[ <!--Replaces the default sidebar.--> (replace: ?sidebar)[ <!--Displays static character info.--> (print: $name) (print: $race) <!--Hides the class display if the player is a Beorning, preventing the double Beorning readout--> (if: $class is "Beorning")[] (else: )[(print: $class)] <br> <!--Displays live updating character info.--> {(live: )[ <!--Creates a health bar bound to the variable $morale. Sets the max value of the bar to 100. Makes the bar green.--> (b4r:'solid')(meter: bind $morale, 100, "X", green) <!--Makes it so that the player's health cannot be greater than 100--> (if: $morale >= 100)[(set: $morale to 100)] <br> <!--Displays the amount of money the player has--> (print: $gold) Gold<br> (print: $silver) Silver<br> (print: $copper) Copper <!--Converts copper and silver into silver and gold respectively when they reach their maximum values.--> (if: $silver is >= 1000)[(set: $silver to it - 1000, $gold to it + 1)] (if: $copper is >= 100)[(set: $copper to it - 100, $silver to it + 1)] <!--Makes it so that if the player loses more gold than they have the sidebar displays 0 gold instead of a negative number, and ensures that they lose all their silver and copper too--> (if: $gold < 0)[(set: $gold to 0, $silver to 0, $copper to 0)] <!--Makes it so that if the player loses more silver than they have a gold piece will be converted--> (if: $silver is < 0 and $gold is > 0)[(set: $silver to it + 1000, $gold to it - 1)] <!--Makes it so that if the player loses more silver than they have and they have no gold to break, the sidebar displays 0 silver instead of a negative number and they lose all their copper too--> (if: $silver is < 0 and $gold is <= 0)[(set: $silver to 0, $copper to 0)] <!--Makes it so that if the player loses more copper than they have a silver piece will be converted--> (if: $copper is < 0 and $silver is > 0)[(set: $copper to it + 100, $silver to it - 1)] <!--Makes it so that if the player loses more copper than they have and they have no silver to break a gold piece will be converted--> (if: $copper is <0 and $silver is <=0 and $gold is > 0)[(set: $copper to it + 100, $silver to it + 999, $gold to it - 1)] <!--Makes it so that if the player loses more copper than they have and they have no silver or gold to break, the sidebar displays 0 copper instead of a negative number--> (if: $copper is < 0 and $silver is <= 0 and $gold is <= 0)[(set: $copper to 0)]] }]]<!--This can be a game over page with links to restart or undo but personally I'm excited about its potential as a way to advance the story through defeat as a mechanic. Something like Skyrim's Death Alternative mod. Defeat represents being knocked out rather than death and storylets can be used to introduce a number of scenarios, either randomly chosen or possibly predetermined. I believe global values can be used to force the game to choose certain storylets over others; perhaps a value like $ransom is true could narrow the possible storylets to ones where an enemy knocks you out and then turns you in for a ransom? or they could simply be among available options and $ransom is false could hide them. Something to that effect, anyway.--> Your morale reached 0