*if choice_quicktest *set male false *if name_ready *if title = " " [b]$!{name}[/b] *if male [b]${father_name}son[/b] *elseif female [b]${mother_name}sdaughter[/b] *else [b]${mother_name}schild[/b] *else [b]$!{title} $!{name}[/b] *else [b]As-Yet Nameless Protagonist[/b] *if (not(clothing = "none")) and (not(male = "?")) *text_image appearance.png center Appearance *line_break $!{appearance1} *if player_tortoise tortoise *elseif specter negative-energy specter *elseif player_great_creature ${great_creature_type} *elseif mole mole *elseif bird bird *elseif male man *elseif female woman *else person *if ((not(mole or bird)) and (not(player_great_creature or player_tortoise))) ${appearance2} wearing *if shimmering_cloak a shimmering *if (not(hat = "none")) cloak, *else cloak and *elseif pendant a ${pendant_type} *if (not(hat = "none")) pendant, *else pendant and *if (not(hat = "none")) a ${hat} and *gosub_scene utils clothing_description *elseif player_great_creature with a ${great_creature_skin} body and ${great_creature_wings} wings *text_image magic.png center Magic *temp textwidth "13ch" *gosub coloredbar textwidth "Negation" "#a5006f" (((negation*4)+4)&"%") false *gosub coloredbar textwidth "Automation" "#c6e2ff" (((automation*4)+4)&"%") true *gosub coloredbar textwidth "Glamor" "#f0d000" (((glamor*4)+4)&"%") true *gosub coloredbar textwidth "Divination" "#00addc" (((divination*4)+4)&"%") false *gosub coloredbar textwidth "Vivomancy" "#218312" (((vivomancy*4)+4)&"%") false *text_image skills.png center Skills ${ancient_history_name}: ${ancient_history} *gosub skillDesc ancient_history *line_break ${fighting_name}: ${fighting} *gosub skillDesc fighting *line_break ${subtlety_name}: ${subtlety} *gosub skillDesc subtlety *line_break ${charisma_name}: ${charisma} *gosub skillDesc charisma *text_image personality.png center Personality *stat_chart opposed_pair Optimism Caution opposed_pair Humor Solemnity opposed_pair Empathy Calculation *line_break *if fateshaper and (fateshaper_setting = "divination") *text_image fate_shaper.png center Fateshaper [b]Current Most Likely Climax Scene[/b] *line_break *comment Don't mess with the climax after it's actually begun *if chapter < 8 *gosub_scene war set_climax $!{climax} *text_image relationships.png center Relationships *if (likes_men or likes_women) [b]Romances (Interested[/b] *if ace [b]romantically, but not sexually,[/b] [b]in[/b] *if likes_men and likes_women [b]men and women)[/b] *elseif likes_men [b]men)[/b] *else [b]women)[/b] *line_break *if tal_romance Tal *if married (married) *elseif engaged (engaged) *line_break *if cos_romance Cos *if married (married) *elseif engaged (engaged) *line_break *if sam_romance Sam *if married (married) *elseif engaged (engaged) *line_break *if v_romance ${v_name} *if married (married) *elseif engaged (engaged) *line_break *if thecla_romance Queen Thecla *if married (married) *elseif engaged (engaged) *line_break *if (((not(tal_romance)) and (not(cos_romance))) and ((not(sam_romance)) and (not(v_romance)))) and (not(thecla_romance)) None *if hide_relationships Relationships are hidden for this encounter. *else *if (not(tal_dead)) Tal: ${tal_rel} *gosub relDesc tal_rel *line_break *if (met_cos and (not(cos_dead))) Cos: ${cos_rel} *gosub relDesc cos_rel *line_break *if (met_sam and (not(sam_dead))) Sam: ${sam_rel} *gosub relDesc sam_rel *line_break *if (met_v and (not(v_dead))) ${v_name}: ${v_rel} *gosub relDesc v_rel *line_break *if (met_thecla and (not(thecla_dead))) Thecla: ${thecla_rel} *gosub relDesc thecla_rel *line_break Church: ${church_rel} *gosub relDesc church_rel *temp undiscovered_rel 0 *if (not(met_cos)) *set undiscovered_rel +1 *if (not(met_sam)) *set undiscovered_rel +1 *if (not(met_v)) *set undiscovered_rel +1 *if (not(met_thecla)) *set undiscovered_rel +1 *if undiscovered_rel > 0 *line_break Undiscovered relationships: ${undiscovered_rel} *text_image kingdom.png center Kingdom *if chapter >= 6 Kingdom Power: ${kingdom_power} *temp adjustedKP kingdom_power *comment "Decent" to start, but threshold for "good" is 6 *if kingdom_power >= 4 *set adjustedKP -2 *gosub skillDesc adjustedKP *stat_chart opposed_pair Adoration Vilification *text_image inventory.png center Inventory *line_break [b] Gold: ${gold} gold [/b] *line_break *if (not(weapon="fists")) Sword *line_break *if glamorous_shirt Glamorous Shirt *line_break *if glamorous_dress Glamorous Dress *line_break *if sneaky_ring Ring of Camouflage *line_break *if sneaky_bracers Bracers of Stealth *line_break *if charisma_ring Charisma Ring *line_break *if alchemy Alchemy Set *line_break *if serving_tray Flying Serving Tray *line_break *if torc Torc of Life and Death *line_break *if luxgladius $!{luxgladius_color} Luxgladius *line_break *if (antidivination_ring) Antidivination Ring *line_break *if crystal_ball Crystal Ball *line_break *if golem *if golem_name = "the golem" Golem *else $!{golem_name} the Golem *line_break *if clutch_of_eggs Clutch of Dragon Eggs *line_break *elseif dragon_egg Dragon Egg *line_break *if spare_parts Spare Parts *line_break *if chain_armor Chain Armor *line_break *if history_book History Book, [i]True Life of Abraxas[/i] *line_break *if fateshaper Fateshaper *line_break *if plate_armor Plate Armor *line_break *if fancy_clothes Fancy Clothing *line_break *if glamor_ring Ring of Glamor *line_break *if golem_manual Golem Manual *line_break *if took_panopticon_crystals Watcher's Crystals *line_break *if negation_wand Negation Wand *line_break *if murder_golem_friend Terrifying Golem *line_break *if shield Shield *line_break *if mah_cool_hat Hierophant's Miter *line_break *comment TODO: Remember to update items past Ch. 4. *comment NOTE: If inventory is updated, confiscations should be as well *text_image students.png center Students *line_break *temp numStudents 0 *if taught_teller Seer Marie *set numStudents +1 *line_break *if teach_sam_magic *set numStudents +1 Blessed Sam *line_break *if v_apprentice *set numStudents +1 ${v_name} *line_break *if p_apprentice *set numStudents +1 Pir *line_break *if dina_student *set numStudents +1 Dina *if numStudents < 1 None *text_image pets.png center Pets *line_break *if baby_dragon $!{dragon_name} the Baby Dragon *line_break *if viv_pet $!{pet_name} the $!{viv_creature_name} *line_break *if great_creature and (not(player_great_creature)) $!{great_creature_title} $!{great_creature_name}, a $!{great_creature_type} *line_break *if (((not(baby_dragon)) and (not(viv_pet))) and (not(great_creature))) None *comment Players expect this stuff to work rather differently than it does, *comment leading to complaints from playtesters that it appears broken. *comment (These stats interact with other variables the players can't see, and it's *comment a highest score of several that determines which catastrophe happens, *comment while scores like this seem to suggest a high enough score will always *comment trigger.) We're going to hide them and address M. Duffy's previous complaint *comment about hidden stats by obliterating all stat-like mentions of the negative *comment effects. There are, after all, a zillion other hidden variables, *comment so what's three more? *comment *temp displayedStorms round(storms/3) *comment [b]Magic Consequences[/b] *comment *line_break *comment $!{rot_name}: ${rot} *comment *gosub badnessDesc rot *comment *line_break *comment $!{storms_name}: ${displayedStorms} *comment *gosub badnessDesc storms *comment *line_break *comment $!{burn_name}: ${burn} *comment *gosub badnessDesc burn *comment *line_break *text_image dead.png center The Dead *line_break *temp deadCount 0 *if (not(inquisitor_alive)) The Academy Inquisitor *set deadCount +1 *line_break *if tal_dead Hunter Tal *set deadCount +1 *line_break *if cos_dead Mayor Cos *set deadCount +1 *line_break *if sam_dead Blessed Sam *set deadCount +1 *line_break *if jacob_dead Blessed Jacob *set deadCount +1 *line_break *if (v_dead and met_v) Student ${v_name} *set deadCount +1 *line_break *if watcher_dead The Watcher *set deadCount +1 *line_break *if sara_dead Banker Sara *set deadCount +1 *line_break *if hiero_dead Hierophant Elizabeth *set deadCount +1 *line_break *if dan_dead Saint Dan *set deadCount +1 *line_break *if twimsby_dead Saint Twimsby *set deadCount +1 *line_break *if thecla_dead Queen Thecla *set deadCount +1 *line_break *if ann_dead Saint Ann *set deadCount +1 *line_break *if espar_dead Espar the Neighbor *set deadCount +1 *line_break *if high_magister_dead The High Magister *set deadCount +1 *line_break *if deadCount < 1 Nobody *text_image plot_points.png center Plot Points *if chapter >= 1 [b]Chapter 1[/b] *line_break ${ch1_summary} *if chapter >= 2 [b]Chapter 2[/b] *line_break ${ch2_summary} *if chapter >= 3 [b]Chapter 3[/b] *line_break ${ch3_summary} *if chapter >= 4 [b]Chapter 4[/b] *line_break ${ch4_summary} *if chapter >= 5 [b]Chapter 5[/b] *line_break ${ch5_summary} *if chapter >= 6 [b]Chapter 6[/b] *line_break ${ch6_summary} *if chapter >= 7 [b]Chapter 7[/b] *line_break ${ch7_summary} *if chapter >= 8 [b]Chapter 8[/b] *line_break ${ch8_summary} *if chapter >= 9 [b]Chapter 9[/b] *line_break ${ch9_summary} *comment Debug code for copying and pasting stats of characters to do things *comment like "stage select" and let playtesters continue where they left off *if debug Debug *comment *script var txt = document.getElementById("text"); for (var key in stats) { if (!isNaN(stats[key]- 0)) { txt.innerHTML += "*set " + key + " " + stats[key] + "
"; } else if (Object.prototype.toString.call(stats[key]) == '[object String]') { txt.innerHTML += "*set " + key + " \"" + stats[key] + "\"
"; } } *comment *page_break Click Here to Restart the Chapter *comment Dan's comments on setting and changing scenes in the stats screen: *comment https://forum.choiceofgames.com/t/grr-more-restrictions-found-on-the-stats-screen/2568/24 *comment Unfortunately, I get an odd bug with this where on visiting the stats screen again, *comment it dumps me back where I was before the redirect_scene. I think it's Dan's bug. *comment But, arguably it's not terrible to make players play it where it lies for non-deaths. *comment *redirect_scene utils restore_and_jump *finish *label coloredbar *params textwidth label colorhex width black *comment uhhh how do you pass things to script? indirectly I guess, via stats *set textwidth_ textwidth *set label_ label *set colorhex_ colorhex *set width_ width *set black_ black *comment TODO: make hardcoded stat start be calculated from textwidth *comment (only really matters if we reuse the code) *comment Blind accessibility hackily achieved by printing the raw scores *comment of the stats as the same color under the bar; couldn't get aria-label *comment to work with my screenreader *comment Check for setClass being defined is a sneaky way of telling *comment whether we're in a quicktest, since quicktest executes *comment the "else" of both branches of conditionals like *comment "if choice_quicktest" (which is strange...) *script if (typeof document !== "undefined" && typeof setClass !== "undefined") { bg_color = "#F7F4F1"; text_color = "#000000"; if (document.body.classList.contains("nightmode")) { bg_color = "#242424"; text_color = "#FFFFFF"; } else if (document.body.classList.contains("whitemode")) { bg_color = "#FFFFFF"; }; target = document.getElementById('text'); div = document.createElement("div"); setClass(div, "statBar statLine"); div.style.backgroundColor = bg_color; labelbox = document.createElement("span"); labelbox.style.display = "inline-block"; labelbox.style.color = text_color; labelbox.style.backgroundColor = bg_color; labelbox.style.lineHeight="2em"; labelbox.style.width = stats["textwidth_"]; printx("\u00a0\u00a0" + stats["label_"], labelbox); div.appendChild(labelbox); statValue = document.createElement("div"); setClass(statValue, "statValue"); statValue.style.width = stats["width_"]; statValue.style.backgroundColor = stats["colorhex_"]; statValue.innerHTML = stats[stats["label_"].toLowerCase()].toString(); statValue.style.color = stats["colorhex_"]; statValue.style.left = "14ch"; div.appendChild(statValue); target.appendChild(div); } *return *label skillDesc *params number *if number >= 10 (Amazing) *elseif number >= 8 (Fantastic) *elseif number >= 6 (Excellent) *elseif number >= 4 (Good) *elseif number >= 2 (Decent) *else (Bad) *return *comment Not used unless we bring back negative effects *label badnessDesc *params number *if number >= 10 (Extreme) *elseif number >= 8 (Dire) *elseif number >= 6 (Looming) *elseif number >= 4 (Advancing) *elseif number >= 2 (Some) *else (Pristine) *return *label relDesc *params number *if number >= 65 (Great) *elseif number >= 60 (Very Good) *elseif number >= 55 (Good) *elseif number >= 50 (Fine) *else (Bad) *return