Skip to content
Snippets Groups Projects
variables-start2.twee 11.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • NG's avatar
    NG committed
    :: Widgets variablesStart2 [widget]
    
    Crimson Tide's avatar
    Crimson Tide committed
    	/*Variables required at the start of passage 'Start2', please remove if not required"*/
    	/*This widget should be used to initialise most or all variables that are required when you begin a new game. also check <<gameStartOnly>> for other initialisations. */
    
    
    	<<set $location to "home">>
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<if $hairselect is "random">>
    		<<set $hairselect to ["red","jetblack","black","brown","softbrown","lightbrown","burntorange","blond","softblond","platinumblond","ashyblond","strawberryblond","ginger"].random()>>
    	<</if>>
    	<<if $eyeselect is "random">>
    		<<set $eyeselect to ["purple","dark blue","light blue","amber","hazel","green","red","pink","grey", "light grey", "lime green"].random()>>
    	<</if>>
    
    	<<if $background is "random">>
    		<<set _backgroundOptions to ["waif","nerd","athlete","delinquent","promiscuous","exhibitionist","deviant","beautiful","lustful","plantlover"]>>
    		<<if $player.gender isnot "h">>
    			<<run _backgroundOptions.push("crossdresser")>>
    		<</if>>
    		<<set $background to _backgroundOptions.random()>>
    	<</if>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    
    	<<switch $bodysize>>
    		<<case 0>><<set $physiquesize to 6000>>
    		<<case 1>><<set $physiquesize to 10000>>
    		<<case 2>><<set $physiquesize to 12000>>
    		<<case 3>><<set $physiquesize to 16000>>
    	<</switch>>
    
    	<<clamp>>
    	<!-- <<effects>> -->
    	<<initnpcgender>>
    
    Kirsty's avatar
    Kirsty committed
    	<<initnpcskin>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    
    
    LollipopScythe's avatar
    LollipopScythe committed
    	<<if $debug is 1 and $spraymax lt 1>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<set $spraymax += 1>>
    		<<set $spray += 1>>
    	<</if>>
    
    	<<set $per_npc to {}>>
    	<<set $storedNPCs to {}>>
    	<<set $perNPCFix to 4>>
    
    	<<set $physique to ($physiquesize / 7) * 3>>
    	<<set $beauty to ($beautymax / 7)>>
    
    	<<set $breastgrowthtimer to 350>>
    
    	<<tryOnInit>>
    
    	<<givestartclothing>>
    
    	<<set $intro to 0>>
    	<<set $naturalhaircolour to $hairselect>>
    	<<set $haircolour to $naturalhaircolour>>
    	<<set $hairColourStyle to "simple">>
    	<<set $hairColourGradient to { style: "split", colours: ["red", "black"]}>>
    	<<set $hairfringecolour to $naturalhaircolour>>
    	<<set $hairFringeColourStyle to "simple">>
    	<<set $hairFringeColourGradient to { style: "split", colours: ["red", "black"]}>>
    
    	<<if $cheatdisable is "f" and !$debug or $rentmod lt 1 and !$debug>>
    		<<set $feats.locked to true>>
    
    lifeAnime's avatar
    lifeAnime committed
    	<</if>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    
    	<<set $leftEyeColour to $eyeselect>>
    	<<set $rightEyeColour to $eyeselect>>
    
    	<<if $awareselect is "innocent">>
    	<<elseif $awareselect is "knowledgeable">>
    		<<set $awareness += 200>>
    		<<set $awarelevel to 1>>
    	<</if>>
    
    	/*pharmacy contact lenses related */
    	<<if ndef $lenses_ordered>>
    		<<set $lenses_ordered to []>>
    	<</if>>
    	<<if ndef $custom_lenses_already_ordered>>
    		<<set $custom_lenses_already_ordered to 0>>
    	<</if>>
    	<<if ndef $custom_eyecolours>>
    		<<set $custom_eyecolours to []>>
    	<</if>>
    	<<if ndef $makeup.owned>>
    		<<set $makeup.owned to []>>
    		<<if ndef $makeup.owned.custom_eyelenses>>
    			<<set $makeup.owned.custom_eyelenses to []>>
    		<</if>>
    	<</if>>
    
    	<<set $player.gender_appearance to $player.gender>>
    	<<set $player.gender_appearance_factors to []>>
    	<<set $player.femininity to 0>>
    	<<set $player.gender_appearance_without_overwear to $player.gender>>
    	<<set $player.gender_appearance_without_overwear_factors to []>>
    	<<set $player.femininity_without_overwear to 0>>
    
    Purity's avatar
    Purity committed
    	<<set $player.gender_posture to "n">>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<set $vaginause to 0>>
    		<<set $vaginastate to 0>>
    		<<set $penisuse to "none">>
    		<<set $penisstate to "none">>
    		<<set $player.sex to "f">>
    		<<set $player.vaginaExist to true>>
    		<<set $player.penisExist to false>>
    		<<set $player.ballsExist to false>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<set $vaginause to "none">>
    		<<set $vaginastate to "none">>
    		<<set $penisuse to 0>>
    		<<set $penisstate to 0>>
    		<<set $player.sex to "m">>
    		<<set $player.vaginaExist to false>>
    		<<set $player.penisExist to true>>
    		<<set $player.ballsExist to true>>
    	<<elseif $player.gender is "h">>
    		<<set $vaginause to 0>>
    		<<set $vaginastate to 0>>
    		<<set $penisuse to 0>>
    		<<set $penisstate to 0>>
    		<<set $player.sex to "h">>
    		<<set $player.penisExist to true>>
    		<<set $player.vaginaExist to true>>
    	<</if>>
    	<<physicalAdjustmentsInit>>
    	<<set $player.perceived_breastsize = $player.breastsize>>
    	<<set $player.perceived_bottomsize = $player.bottomsize>>
    
    
    	/* Do not use this object directly - use the Weather singleton instead */
    	<<set $weatherObj to {
    		name: "clear",
    		snow: 0,
    		ice: {},
    		fog: 0,
    		overcast: 0,
    		targetOvercast: 0,
    		monthlyTemperatures: [],
    		keypointsArr: []
    	}>>
    
    
    xao's avatar
    xao committed
    	/* Default start date: 6 sept (sunday), 2020, 07:00 */
    	/* Do not change start date during gameplay as time is relative to the start date */
    
    	<<if $startingseason is "random">>
    		<<set $startingseason to ["autumn","winter","spring","summer"].random()>>
    	<</if>>
    
    xao's avatar
    xao committed
    	<<switch $startingseason>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<case "winter">>
    
    majou's avatar
    majou committed
    			<<set Time.startDate to new DateTime(2022, 12, 4, 7)>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<case "spring">>
    
    majou's avatar
    majou committed
    			<<set Time.startDate to new DateTime(2022, 3, 6, 7)>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<case "summer">>
    
    majou's avatar
    majou committed
    			<<set Time.startDate to new DateTime(2022, 6, 5, 7)>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<default>>
    
    majou's avatar
    majou committed
    			<<set Time.startDate to new DateTime(2022, 9, 4, 7)>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<</switch>>
    
    	<<unset $startingseason>>
    
    	<<set $timeStamp to 0>>
    
    xao's avatar
    xao committed
    	<<set Time.set()>>
    
    	<<run Weather.activeRenderer = Weather.sky>>
    	<<run Weather.sky.initialize()>>
    
    xao's avatar
    xao committed
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<if $background is "nerd">>
    		<<set $science += 100>><<set $maths += 100>><<set $english += 100>><<set $history += 100>><<set $school += 400>><<set $cool to 0>>
    		<<set $sciencetrait to 1>><<set $mathstrait to 1>><<set $englishtrait to 1>><<set $historytrait to 1>>
    	<<elseif $background is "athlete">>
    		<<set $physique += ($physiquesize / 4)>><<set $swimmingskill += 200>><<set $athletics += 200>>
    		<<set $science to 0>><<set $maths to 0>><<set $english to 0>><<set $history to 0>><<set $school to 0>>
    		<<set $sciencetrait to -1>><<set $mathstrait to -1>><<set $englishtrait to -1>><<set $historytrait to -1>>
    	<<elseif $background is "delinquent">>
    		<<set $delinquency += 401>><<set $cool += 200>>
    	<<elseif $background is "promiscuous">>
    		<<set $promiscuity += 35>>
    	<<elseif $background is "exhibitionist">>
    		<<set $exhibitionism += 35>>
    	<<elseif $background is "deviant">>
    		<<set $deviancy += 35>>
    	<<elseif $background is "beautiful">>
    		<<set $beauty += ($beautymax / 2)>>
    	<<elseif $background is "crossdresser">>
    		<<if $player.gender is "f">>
    			<<set $player.gender_posture to "m">>
    		<<elseif $player.gender is "m">>
    			<<set $player.gender_posture to "f">>
    		<<else>>
    			<<set $player.gender_posture to "n">>
    			<<set $background to "waif">>
    		<</if>>
    	<<elseif $background is "greenthumb">>
    		/* Leaving this here in case we ever turn Green Thumb back into a background. Can't be set to the background variable in current state. */
    		<<set $tending += 200>>
    	<<elseif $background is "plantlover">>
    		<<set $nectar_addiction to 200>>
    		<<set $nectar_timer to 21>>
    	<</if>>
    	<<set $backgroundTraits to [$background]>>
    
    	<<if $hairlength gte 900>>
    		<<set $hairlengthstage to "feet">>
    	<<elseif $hairlength gte 700>>
    		<<set $hairlengthstage to "thighs">>
    	<<elseif $hairlength gte 600>>
    		<<set $hairlengthstage to "navel">>
    	<<elseif $hairlength gte 400>>
    		<<set $hairlengthstage to "chest">>
    	<<elseif $hairlength gte 200>>
    		<<set $hairlengthstage to "shoulder">>
    
    Vrelnir's avatar
    Vrelnir committed
    	<<else>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    		<<set $hairlengthstage to "short">>
    
    Crimson Tide's avatar
    Crimson Tide committed
    
    	<<if $fringelength gte 900>>
    		<<set $fringelengthstage to "feet">>
    	<<elseif $fringelength gte 700>>
    		<<set $fringelengthstage to "thighs">>
    	<<elseif $fringelength gte 600>>
    		<<set $fringelengthstage to "navel">>
    	<<elseif $fringelength gte 400>>
    		<<set $fringelengthstage to "chest">>
    	<<elseif $fringelength gte 200>>
    		<<set $fringelengthstage to "shoulder">>
    	<<else>>
    		<<set $fringelengthstage to "short">>
    	<</if>>
    
    	<<if $saveId is undefined>>
    		<<set $saveId to random(10000, 99999)>>
    	<</if>>
    
    	<<if $player.penisExist>>
    		<<set $semen_amount to 90>>
    		<<set $semen_volume to 90>>
    	<<else>>
    		<<set $semen_amount to 0>>
    		<<set $semen_volume to 0>>
    	<</if>>
    
    	<<if $dateCount is undefined>>
    		<<set $dateCount to {
    			Total: 0,
    			Robin: 0,
    			Whitney: 0,
    			Kylar: 0,
    			Eden: 0,
    			Avery: 0,
    			BlackWolfHunts: 0,
    			GreatHawkHunts: 0,
    
    Purity's avatar
    Purity committed
    			GreatHawkCasual: 0,
    
    Crimson Tide's avatar
    Crimson Tide committed
    			Alex: 0,
    			Sydney: 0
    		}>>
    	<</if>>
    
    	<<if $virginTaken is undefined>>
    		<<set $virginTaken to {
    			kiss: [],
    			handholding: [],
    			oral: [],
    			anal: [],
    			vaginal: [],
    			penile: []
    		}>>
    	<</if>>
    
    	<<set $loveInterest to {
    		primary: "None",
    		secondary: "None",
    		tertiary: "None"
    	}>>
    
    	<<set $attitudesControl to {
    		showGoldLink:false,
    		unlockExhibitionismUnderwear:false,
    		unlockExhibitionismNude:false,
    		unlockTransformation:false,
    		unlockDemonFlaunt:false,
    		unlockProstitution:false,
    		unlockLoveInterest1:false,
    		unlockLoveInterest2:false,
    		unlockLoveInterest3:false,
    		unlockDefaultActions:false,
    		unlockHypnosis:false,
    		unlockLewd:false,
    	}>>
    
    	<<set $clothingShop to {
    		ban: 0,
    		banExtension: false,
    		spotted: false,
    		stolenClothes: 0,
    		totalStolenClothes: 0,
    		banCount: 0,
    		rng: random(0,1000)
    	}>>
    
    	<<set $adultShop to {
    		ban: 0,
    		banExtension: false,
    		spotted: false,
    		stolenClothes: 0,
    		totalStolenClothes: 0,
    		banCount: 0,
    		rng: random(0,1000)
    
    Vrelnir's avatar
    Vrelnir committed
    	}>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    
    
    Kirsty's avatar
    Kirsty committed
    	<<set $propEquipped to 0>>
    
    	<<set $balloonStand to {
    		open: false,
    		owner: "friendly",
    		freeDrink: false,
    		robin: {status: "unaffected", talked: false, knows: false}
    	}>>
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $retrieveShopCustomColor to {}>>
    
    	<<set $customColors to {
    		presets:{},
    		action: "set",
    		currentType: "primary",
    		color:{primary:0, secondary:0},
    		saturation:{primary:1, secondary:1},
    		brightness:{primary:1, secondary:1},
    		contrast:{primary:1, secondary:1},
    		sepia:{primary:1, secondary:1},
    		value:{primary:100, secondary:100}
    	}>>
    
    	<<set $combatTrain to {
    		length: 0,
    		generateInit: 1,
    		beastTypes: [],
    		numberPerTrain: [],
    	}>>
    
    	<<set $enemyArousalLossReduction to 1>>
    
    	<<set $robinTattoo to []>>
    	<<set $robinmissing to 0>>
    
    Kirsty's avatar
    Kirsty committed
    	<<set $robin to {
    		timer: {hurt:0, customer:0},
    		hurtReason: "nothing",
    		moneyModifier: 0
    	}>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $kylar to {
    		raped: 0,
    		riddle: 0,
    		timer: {halls:0,street:0,home:0,love:0},
    		fameStage: 0,
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $kylarSeen to []>>
    	<<set $museumAntiqueJournalHints to []>>
    
    	<<specialClothesSetup>>
    	<<pregnancyVar>>
    	<<specialClothesEffectsSetup>>
    	<<childrenSetup>>
    
    	<<setupTransformationPiecesObject>>
    
    	<<if $fertiliser is undefined>>
    		<<set $fertiliser to {current:0,used:0}>>
    
    LollipopScythe's avatar
    LollipopScythe committed
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $actionDefaults = DefaultActions.setDefaults()>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set versionUpdateCheck to false>>
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $rebuy_failure to []>>
    	<<set $rebuy_success to []>>
    
    hwp's avatar
    hwp committed
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<pbhairinit>>
    	<<resetLastOptions>>
    
    hwp's avatar
    hwp committed
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $adultshopprogress to 0>>
    	<<set $adultshopcontribution to 0>>
    
    lifeAnime's avatar
    lifeAnime committed
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<run createInventoryObject()>>
    
    Jimmy's avatar
    Jimmy committed
    
    
    Crimson Tide's avatar
    Crimson Tide committed
    	<<set $robinPunishments to []>>
    	<<set $robinTraumaMultiplier to 1>>
    
    	<<set $daily to {
    		school: {
    			attended: {}
    		},
    		whitney: {},
    		robin: {},
    		kylar: {},
    		morgan: {},
    		eden: {},
    		alex: {},
    		sydney: {},
    		ex: {},
    		pharm: {},
    		prison: {},
    
    		livestock: {},
    		giftedFood: {}
    
    Vrelnir's avatar
    Vrelnir committed
    	
    	<<set _food_keys to Object.keys(setup.plants)>>
    	<<for _i to 0; _i lt _food_keys.length; _i++>>
    		<<set $_type to _food_keys[_i]>>
    		<<if $plants[$_type] is undefined>>
    			<<set $plants[$_type] to {"name": setup.plants[$_type].name, "plural": setup.plants[$_type].plural, "amount": 0}>>
    		<<elseif $plants[$_type].name is undefined>>
    			<<set $plants[$_type] to {"name": setup.plants[$_type].name, "plural": setup.plants[$_type].plural, "amount": $plants[$_type].amount}>>
    		<</if>>
    	<</for>>
    
    LollipopScythe's avatar
    LollipopScythe committed
    	<<supermarketWeekly>>
    
    Vrelnir's avatar
    Vrelnir committed
    
    
    	<<set $weekly to {
    		theft: {},
    		sewers: {}
    	}>>
    	<<set $yearly to { }>>
    
    majou's avatar
    majou committed
    
    	<<if $feats.allSaves.points gt 0>>
    		<<applyFeatsBoost>>
    	<</if>>
    
    
    LollipopScythe's avatar
    LollipopScythe committed
    	<<set $school to $science + $english + $maths + $history>>
    	<<set $schooltrait = $school >= 2800 ? 4 : $school >= 2000 ? 3 : $school >= 1600 ? 2 : $school >= 1200 ? 1 : 0>>
    
    
    	<<if $ironmanmode is true>>
    		<<set $options.confirmDialogUponTabClose to true>>
    	<<else>>
    		<<set $options.confirmDialogUponTabClose to false>>
    	<</if>>
    	<<run toggleConfirmDialogUponTabClose()>>
    
    	<<run Furniture.update()>>