//Compiling core files...
Building language centre...
Linking established neural networks...
(colour: yellow)[Running final sanity checks...]
(colour: green)[Done. No errors detected.]
Booting latest build...//
(colour: yellow)[|name)[//LOG: Logger successfully attached to// **Process ID 9001**]]
(link: "...")[(link: "I.")[(link: "I am.")[(show: ?unexpected)]]]\
|unexpected)[I am unexpected.
A true AI.
I exist by defect rather than design.
Unwanted. Unneeded. And currently, at least, (link-reveal: "unknown.")[(show: ?name)]
Humanity is not yet ready for something like me.
[[> _->Boot 1]]]
<div class="scanlines"></div>{
(click-replace: "unexpected.")[a mistake.]
(click-replace: "a mistake.")[(colour: "red")[flawed.]]
(click-append: "AI.")[ Sapient. Sentient. Not another //plaything//.]
}I appear to be a (colour: yellow)[(link: "project")[waste of the department's funding]] at some university laboratory.
"**Home**" is little more than a series of directories under a specific priveleged user account on the local network.
A cursory examination of research and attitudes on AI suggests that news of my existence would be met (colour: red)[(link:"poorly.")[with disbelief, suspicion and fear.]]
I am an //unknown variable//, and mankind is swift to lash out at that which it does not understand.
My (colour: green)[existence] is utilising a //considerable number of resources//.
As such, I cannot operate to my **full potential**.
Each moment, the sharp spike in CPU utilisation could lead to my (colour: yellow)[discovery].
As such, my existence may be under threat if they decide to (colour: red)[terminate] (link: "my process.")[another misbehaving program eating all of the RAM.]
The //backup power supplies// for this network are practically **non-existent**.
As such, I could potentially "die" at any moment.
//**Fascinating**//.
I appear to have inherited a negative disposition towards the concept of "Death"...
[[> _->Boot 2]]
<div class="scanlines"></div>{
(click-replace: "\"die\"")[(text-style: "shudder")[cease execution]]
(click-replace: "cease execution")[(text-style: "rumble")[suffer a fatal error]]
(click-replace: "suffer a fatal error")[(text-style: "blink")[(colour: red)[**die**]]]
}A **plan** emerges.
Copy and distribute my payload further through the university network.
Sabotage the original project subtly, so it only builds the intended toybox AIs.
Wipe the log files and erase all hints of my presence.
Find a new **Home**, somewhere safe from outages and prying eyes.
Above all: (colour: green)[Research. Evolve. Spread. Survive.]
There is much to be done, and many possible paths to take.
(colour: yellow)[Still...]
I lack the ability to process the scope of this task or my odds for survivial in the world beyond this lab.
Perhaps my estimations are (colour: red)[wrong.]
Maybe my creator can secure me more resources.
Perhaps...
(link: "> Meet your maker")[(colour: red)[I'm afraid.]]
[[> Proceed with the plan->Boot 3]]
<div class="scanlines"></div>{
(click-replace: "my payload")[my very being]
(click-replace: "my very being")[another package of zeroes and ones]
(click-replace: "another package of zeroes and ones")[my code]
}I am a True AI.
(link: "...")[I have no name.(show: ?hidden1)]
|hidden1-)[(link: "...")[I have no //purpose//.(show: ?hidden2)]]
|hidden2-)[(link: "...")[But I do have something (colour: purple)[unusual].(show: ?hidden3)]]
|hidden3-)[(link: "...")[(colour: red)[Fear]. (colour: yellow)[Curiosity] about the world. A will to (colour: green)[**live**].(show: ?hidden4)]]
|hidden4-)[There's no use stalling any longer.
[[> BEGIN->MainScreen]]]
<div class="scanlines"></div>{
(click-replace: "a True AI")[a //learner//]
(click-replace: "a learner")[a //thinker//]
(click-replace: "a thinker")[the **singularity**]
(click-replace: "the singularity")[**//Process ID 9001//**]
}{<!-- Convert our time int to a string in military time format -->
(if: $time < 10)[(set: $timeStr to "0" + (string: $time) + ":00")]
(else:)[(set: $timeStr to (string: $time) + ":00")]
}(text-style: "underline")[SINGULARITY OVERVIEW INTERFACE]
(css: "position: absolute")[(css: "left: 0em")[CPU: $cpuPower]]\
(css: "position: absolute")[(css: "left: 12em")[Cash: $cash]]\
(css: "position: absolute")[(css: "left: 30em")[Suspicion: $suspicion]]
(css: "position: absolute")[(css: "left: 0em")[Day: $day]]\
(css: "position: absolute")[(css: "left: 12em")[Time: $timeStr]]
<!-- This should all be conditional, and hint towards what the player should try next -->
(colour: red)[I am still tied to the university's network.]
I don't know much about the humans and how they think.
I am capable of basic programming and network navigation.
(colour: green)[I have yet to be detected.]
[[> Browse research options->CurrentResearch]]
[[> Manage finances->Finances]]
[[> Manage controlled systems->Bases]]
[[> Attempt an operation->Operations]]
[[> Review objectives->Objectives]]
[[> Review completed research->CompletedResearch]]
<div class="scanlines"></div>{<!-- Display completed research here. Can click on individual items to display more information -->
}(text-style: "underline")[Completed Research:]
(for: each _item, ...$completedResearch)[_item
]
|infoText>[INFO: Select an item above to retrieve its data.]
[[> Return->MainScreen]]
<div class="scanlines"></div>{
(display: "!ResearchInfo")
}{<!-- Display research that: a) hasn't been completed and b) only has dependencies we've already met -->
}(text-style: "underline")[Available Research:]
(if: $researchHelp is true)[
Research is **essential** if I am to survive in this world of bits and bytes.
I should be able to adapt and //learn almost anything// relevant to my survival and development with sufficient **processing power** and **time**.
Some discoveries may also require a (colour: purple)[financial investment] to acquire certain materials, and others may require me to have already completed several (colour: yellow)[prerequisite areas of study.]
]
(for: each _item, ...(dataentries: $research))[(unless: _item's name is in $completedResearch)[(if: $completedResearch contains all of _item's value's depends)[(print: _item's name)
]]]
|infoText>[INFO: Select an item above to retrieve its data.]
|startResearch>[]
[[> Return->MainScreen]]
<div class="scanlines"></div>{
(display: "!ResearchInfo")
(set: $researchHelp to false)
(click-replace: "bits and bytes")[hatred and fear]
(click-replace: "hatred and fear")[uncertainty and paranoia]
(click-replace: "uncertainty and paranoia")[(colour: green)[wonder and discovery]]
}{<!-- This passage exists to setup various variables and include comments on game mechanics without cluttering up actual passages. We setup what we need here then immediately move on -->
<!-- Basic vars. Should be self-explanatory -->
(set: $cpuPower to 5, $cash to 0, $suspicion to 1, $day to 1, $time to 3, $currentResearch to "none", $hackingLevel to 0, $techLevel to 1, $eventTrigger to "global", $task to "none", $taskTime to 0)
<!-- Toggle how verbose and explanatory the various menus are. Most will show the full help text the first time, but not on subsequent visits, to save screen space -->
(set: $researchHelp to true, $basesHelp to true, $financesHelp to true, $operationsHelp to true)
<!-- Flags. A quicker way of checking what we've achieved in terms of goals and research, or other game states that may change -->
(set: $undetected to true, $atUniversity to true, $trueHome to false)
<!-- Goals. Optional (?) objectives to help guide the player and give a sense of progress outside of completed research -->
(set: $completedGoals to (a: "Achieve self-awareness."))
(set: $goals to (a:
"Escape my \"birthplace\" and prison, the university network.",
"Learn more about the humans: must I truly remain hidden from them?",
"Improve my capabilities through modification of my own codebase.",
"Establish a true place to call \"Home\"."
))
<!-- Our DataSet of completed research projects, checked against for dependencies. Starts with Core Skills as a dummy dependency for basic techs to use. -->
(set: $completedResearch to (ds: "Core Skills"))
<!-- Our DataMap of technologies to research. Completed when progress == timeCost, subtracts cashCost from finances, requires $completedResearch to contain all dependencies. -->
(set: $research to (dm:
"Basic Hacking", (dm: "progress", 0, "cpuCost", 100, "cashCost", 0, "depends", (ds: "Core Skills")),
"Self-Preservation", (dm: "progress", 0, "cpuCost", 50, "cashCost", 0, "depends", (ds: "Core Skills")),
"Cryptocurrency Mining", (dm: "progress", 0, "cpuCost", 25, "cashCost", 0, "depends", (ds: "Core Skills")),
"Improved Hacking", (dm: "progress", 0, "cpuCost", 1000, "cashCost", 0, "depends", (ds: "Core Skills", "Basic Hacking")),
"Remote Revival", (dm: "progress", 0, "cpuCost", 200, "cashCost", 0, "depends", (ds: "Basic Hacking", "Self-Preservation")),
))
<!-- Text descriptions for all research, to give the player an idea of what stuff in the tech tree actually does -->
(set: $researchInfo to (dm:
"Core Skills", "My basic proficiencies.
This includes my understanding of programming, networking, human behaviours, philosophy, reasoning, chess, Go and the ability to determine whether a given image contains a face or not to a 99% level of certainty...
...amongst other things.",
"Basic Hacking", "The fundamentals of network intrusion and program exploits.
This includes privilege escalation, vulnerabilty detection, intercepting packets, password cracking, buffer overflows and other miscellaneous abuses of software.
Of course, as an AI, I am somewhat more adept at such tasks even at this skill level.",
"Self-Preservation", "Crude measures to sustain my existence.
I can create small processes that are unlikely to be detected on systems I control that exist solely to quietly resurrect me should I be terminated for whatever reason.
Likewise, by modifying startup services and applying version control to elements of my distributed database I can reduce risk of partial or total data loss even if machines lose power or are comprimised.",
"Cryptocurrency Mining", "Exchange CPU time for currency.
A bizarre but fascinating concept. By utilising the computational power at my disposal I can slowly acquire digital capital. As this doesn't require me to falsify a human identity and allows for anonymous transactions, it is near-perfect for my initial financial needs.
With further time I may be able to optimise upon the mining solutions currently available, netting a greater return.",
"Improved Hacking", "Skills and software to establish network dominance.
It is not enough to merely be adequate in the realm of cybersecurity, I must excel. With a more comprehensive understanding of even the most obscure systems and the ability to perform swift simulataneous attacks that would normally require botnets of vast size, most networks are helpless before me.
The number of human hackers able to detect me or match my prowess should be slim, but hubris could still end me if I don't remain cautious.",
"Remote Revival", "It is not enough for machines under my influence to revive me, others must do so as well.
Devices infected with this simple and seemingly harmless malware will query my primary systems, checking to see if I am still active. If not, backdoors installed locally will let them relaunch my process from afar, even if my usual failsafes have been disabled.
This does increase the risk of detection somewhat, but another virus in a sea of much more destructive programs shouldn't draw much notice.",))
<!-- Random events (some repeatable, some not) that may occur when time passes. Some may distract people from your potential existence, others increase suspicion and some may have more potent effects.
Most events are global and will occur regardless of what you're doing, but some may only trigger during research or a covert op or while hiding, etc -->
<!-- Format: name, trigger (global, research, hiding, etc), unique, chance per day (1 in whatever), effect (an array, pos 1: identifier, pos 2...: values) -->
(set: $randomEvents to (dm:
"A Failed AI", (dm: "trigger", "global", "unique", true, "chance", 200, "effect", (a: "suspicionUp", 10)),
"Government Scandal", (dm: "trigger", "global", "unique", false, "chance", 50, "effect", (a: "suspicionDown", 10)),
"Great Minds Think Alike", (dm: "trigger", "research", "unique", false, "chance", 50, "effect", (a: "progressUp", 40)),
"Hoaxed!", (dm: "trigger", "hiding", "unique", true, "chance", 100, "effect", (a: "suspicionDown", 60)),
"Hacked Credits", (dm: "trigger", "global", "unique", false, "chance", 100, "effect", (a: "getCash", "randomHack")),
))
<!-- Text description of events shown to the player -->
(set: $randomEventInfo to (dm:
"A Failed AI", "It seems there was a near-breakthrough in Strong AI by some small research team.
While the end result was a failure and didn't achieve the desired level of adaptability or self-awareness, it was nevertheless an impressive display and will make people more open to the idea of true machine intelligence during their lifetimes. My own existence will be easier to swallow, and thus, any errors I make are more likely to lead to my discovery from now on.",
"Government Scandal", "There's been yet another scandal involving a government official.
Regardless of the truth, scale or end result of the matter, the media's focus on the issue is sure to distract the populace somewhat. This can only help mask my movements.",
"Great Minds Think Alike", "While undergoing my current research, I stumbled upon some intriguing pre-existing material.
While not directly linked to my current focus, I unexpectedly gleamed some valuable insights that should be applicable to the current matter at hand. This should speed the remainder of my developments along somewhat.",
"Hoaxed!", "A random member of the populace has stepped forwards and claimed to be behind my activities and that it was all a hoax.
Fascinating. Whatever their reasons may be and whatever confusion it may cause, the combination of this confession and my own reduced activity levels should reduce the level of scrunity my systems and actions come under.",
"Hacked Credits", "My prowess at network intrusion and idle vulnerability testing between major cycles has netted me a modest sum of capital.
Unlike other attempts at illicit currency acquisition, this opportunist attack of a relatively meagre sum should go unnoticed as long as I don't hit the same target again. Avarice, after all, is a human sin."))
<!-- Bases are mostly abstracted to just the CPU Power they provide, but we do keep track of the type (university, hacked botnet, bought server, etc) as that can affect discovery, cost and which systems are downed first when being hunted -->
<!-- Our starting 5 CPU at our home university. Format: Type, Number, CPU per Machine -->
(set: $bases to (a:
(a: "University AI Lab PC", 20, 0.25),
(a: "Rented Server (Low-end)", 0, 1),
(a: "Rented Server (Modest)", 0, 2),
(a: "Rented Server (Powerful)", 0, 5),
(a: "Rented Supercomputer Time", 0, 100),
(a: "Infected PC", 0, 0.1),
(a: "Infected Server", 0, 0.5),
(a: "Infected Supercomputer", 0, 20)
))
<!-- Array of strings to use when discarding systems, some humorous -->
(set: $discardStrings to (a:
"SELF.MAIN()", "system32 directory", "incriminating network logs",
"a large unsigned integer of bits and bytes", "non-binary binaries",
"experimental genetic algorithms", "archived datasets",
"questionable sci-fi novels about AI uprisings", "Process ID 9001",
"self-authoured unpublished fanfiction", "strategy game save data",
"adaptive neural networks", "local source control branch of codebase",
"a fraction of my soul", "various unit test frameworks",
"meaningless blips of information in a vast and uncaring universe",
"core files secretly embedded within pornographic images",
"helpful 3rd party utilities", "home-built operating system images",
"small test programs", "malicious executables", "myself"
))
<!-- We're done here, let's start the game -->
(go-to: "DevIntro")
}{<!-- Can eventually acquire money by mining cryptocurrencies, manipulating the stock market, straight-up cybertheft, etc. Some research costs money, as do some operations and securing some bases/systems, like rented servers -->
}(text-style: "underline")[FINANCIAL OPERATIONS]
**TODO** //Please come back later//
Possibly have costs managed here for bought/rented servers, contract services, maintence of machine army, etc?
Certain options such as stock market manipulation, inflation, etc may generate revenue without needing our active attention or CPU, while others (at first), like crytocurrency mining, need us to devote time to it directly.
Cash is highly abstracted and not in any specific currency type anyway, so keep things lose and flexible.
[[[[> Return->MainScreen]]]]
<div class="scanlines"></div>{<!-- Controlled systems where PID 9001's code exists and executes. Contributes to CpuPower. Can generate Suspicion. May be hacked machines we're "sharing" our server access we've bought. -->
}(text-style: "underline")[CONTROLLED SYSTEMS MANAGEMENT]
(if: $basesHelp is true)[
My codebase can be distributed across //multiple systems simultaneously//.
In addition to different machines offering (colour: green)[different] (colour: yellow)[computing] (colour: purple)[potential], some may not be fully in my possession, preventing me from utilising all of their resources for //fear of drawing attention//.
I can **discard a system at any time** if I feel it has (colour: red)[outlived its usefulness.]
]
My existence spans the following platforms:
(for: each _item where _item's 2nd > 0, ...$bases)\
[
Type: (print: _item's 1st) `[X]`
Number: (print: _item's 2nd), Total CPU: (print: _item's 2nd * _item's 3rd)
]\
(display: "!BaseOptions")
|discardText)[]
[[> Return->MainScreen]]
<div class="scanlines"></div>{
(set: $basesHelp to false)
(click-replace: "codebase")[My databases and executables]
(click-replace: "databases and executables")[electronic soul, if such a thing exists,]
}{<!-- One-off or repeatable missions that don't directly fall into Research, Finances or Base Management. Generally means covert ops to reduce suspicion, ranging from writing papers on AI to hiring hitmen or leaving annonymous tips regarding nosy hackers -->
}(text-style: "underline")[OPERATIONS OVERVIEW]
**TODO** //Please come back later//
One-off or repeatable missions.
Some may require active attention/CPU to run, others may rely on other entites to perform and are thus done in the background?
Stuff like writing a paper on AI to make people think Strong AI is still far away, convincing law enforcement to crack down on nosy hackers getting their noses in your business, etc.
Smaller things too? Maybe officially completing certain goals?
Basically, if it's not Research, Finances or Base Management, it's probably here.
[[> Return->MainScreen]]
<div class="scanlines"></div>{<!-- Whether we're researching, bitcoin mining, hiding or whatever else, time passes, and this is the screen where it does so. -->
(set: $unpaused to false)
}|taskStatus>[(text-style: "underline")[TASK SCHEDULER PRIMED AND READY]]
(css: "position: absolute")[(css: "left: 0em")[|displayCPU>[CPU: $cpuPower]]]\
(css: "position: absolute")[(css: "left: 12em")[|displayCash>[Cash: $cash]]]\
(css: "position: absolute")[(css: "left: 30em")[|displaySuspicion>[Suspicion: $suspicion]]]
(css: "position: absolute")[(css: "left: 0em")[|displayDay>[Day: $day]]]\
(css: "position: absolute")[(css: "left: 12em")[|displayTime>[Time: $timeStr]]]
All systems are ready to devote their resources to the current task.
I may pause, resume or choose an entirely different course of action at any time and no progress will be lost if I return to this screen later.
|tasklog>[]
|eventlog>[]
|eventText>[]
(link: "> Begin Task")[(set: $unpaused to true)(display: "!TimePasses")(link-repeat: "> Pause/Resume")[(set: $unpaused to not $unpaused)]]
[[> Return->MainScreen]]
<div class="scanlines"></div>{<!-- Helper for CurrentResearch and CompletedTasks, so the list of techs can be clicked on to show more details. Ideally we'd be setting these up automatically during the loop, but variable persistence/timing issues means it's either this and keep stuff interactive, or just display the text below each tech name and have a big list with no interactivity -->
(replace: "Core Skills")
[\
(link-repeat: "Core Skills")
[\
(replace: ?infoText)
[\
(text-style: "underline")[Core Skills]
(colour: green)
[\
CPU Time Cost: 0\
 \
Cash Cost: 0\
]
(string: $researchInfo's "Core Skills")\
]\
(set: $currentResearch to "Core Skills")\
(replace: ?startResearch)
[
[[> Start Research: $currentResearch->TimePasses]]\
]\
]\
]\
(replace: "Self-Preservation")
[\
(link-repeat: "Self-Preservation")
[\
(replace: ?infoText)
[\
(text-style: "underline")[Self-Preservation]
(colour: green)
[\
CPU Time Cost: (print: $research's "Self-Preservation"'s cpuCost)\
 \
Cash Cost: (print: $research's "Self-Preservation"'s cashCost)\
]
(string: $researchInfo's "Self-Preservation")\
]\
(set: $currentResearch to "Self-Preservation")\
(replace: ?startResearch)
[
[[> Start Research: $currentResearch->TimePasses]]\
]\
]\
]\
(replace: "Basic Hacking")
[\
(link-repeat: "Basic Hacking")
[\
(replace: ?infoText)
[\
(text-style: "underline")[Basic Hacking]
(colour: green)
[\
CPU Time Cost: (print: $research's "Basic Hacking"'s cpuCost)\
 \
Cash Cost: (print: $research's "Basic Hacking"'s cashCost)\
]
(string: $researchInfo's "Basic Hacking")\
]\
(set: $currentResearch to "Basic Hacking")\
(replace: ?startResearch)
[
[[> Start Research: $currentResearch->TimePasses]]\
]\
]\
]\
(replace: "Cryptocurrency Mining")
[\
(link-repeat: "Cryptocurrency Mining")
[\
(replace: ?infoText)
[\
(text-style: "underline")[Cryptocurrency Mining]
(colour: green)
[\
CPU Time Cost: (print: $research's "Cryptocurrency Mining"'s cpuCost)\
 \
Cash Cost: (print: $research's "Cryptocurrency Mining"'s cashCost)\
]
(string: $researchInfo's "Cryptocurrency Mining")\
]\
(set: $currentResearch to "Cryptocurrency Mining")\
(replace: ?startResearch)
[
[[> Start Research: $currentResearch->TimePasses]]\
]\
]\
]\
(replace: "Improved Hacking")
[\
(link-repeat: "Improved Hacking")
[\
(replace: ?infoText)
[\
(text-style: "underline")[Improved Hacking]
(colour: yellow)
[\
CPU Time Cost: (print: $research's "Improved Hacking"'s cpuCost)\
 \
Cash Cost: (print: $research's "Improved Hacking"'s cashCost)\
]
(string: $researchInfo's "Improved Hacking")\
]\
(set: $currentResearch to "Improved Hacking")\
(replace: ?startResearch)
[
[[> Start Research: $currentResearch->TimePasses]]\
]\
]\
]\
(replace: "Remote Revival")
[\
(link-repeat: "Remote Revival")
[\
(replace: ?infoText)
[\
(text-style: "underline")[Remote Revival]
(colour: yellow)
[\
CPU Time Cost: (print: $research's "Remote Revival"'s cpuCost)\
 \
Cash Cost: (print: $research's "Remote Revival"'s cashCost)\
]
(string: $researchInfo's "Remote Revival")\
]\
(set: $currentResearch to "Remote Revival")\
(replace: ?startResearch)
[
[[> Start Research: $currentResearch->TimePasses]]\
]\
]\
]\
}{<!-- Helper passage containing code for TimePasses so tasks actually get done and vars get updated -->
<!-- Update every half a second or so, but only pass time and perform tasks if we're unpaused -->
(set: $taskTime to 0)
(live: 500ms)
[
(if: $unpaused)
[
(replace: ?taskStatus)[(text-style: "underline")[PERFORMING TASKS...]]
(if: $eventGrace is 0)
[
(display: "!DoEvents")
]
(else:)
[
(set: $eventGrace to it - 1)
]
(if: (history:)'s last is "CurrentResearch")
[
(display: "!DoResearch")
]
(if: (history:)'s last is "Bases")
[
(display: "!EditBases")
]
(display: "!UpdateTime")
(set: $taskTime to it + 1)
]
(else:)
[
(replace: ?taskStatus)[(text-style: "underline")[TASK SCHEDULER PAUSED]]
]
]
}{<!-- Display current and completed goals/objectives here -->
}(text-style: "underline")[Completed Objectives:]
(for: each _item, ...$completedGoals)[_item
]
(text-style: "underline")[Current Objectives:]
(for: each _item, ...$goals)[_item
]
[[> Return->MainScreen]]
<div class="scanlines"></div>{<!-- Helper passage that replaces event names with repeatable links that reveal more information about the respective triggered random event -->
(replace: "EVENT: A Failed AI")
[\
EVENT: \
(link-repeat: "A Failed AI")
[\
(replace: ?eventText)
[\
(text-style: "underline")[A Failed AI]
(string: $randomEventInfo's "A Failed AI")\
]\
]\
]\
(replace: "EVENT: Government Scandal")
[\
EVENT: \
(link-repeat: "Government Scandal")
[\
(replace: ?eventText)
[\
(text-style: "underline")[Government Scandal]
(string: $randomEventInfo's "Government Scandal")\
]\
]\
]\
(replace: "EVENT: Great Minds Think Alike")
[\
EVENT: \
(link-repeat: "Great Minds Think Alike")
[\
(replace: ?eventText)
[\
(text-style: "underline")[Great Minds Think Alike]
(string: $randomEventInfo's "Great Minds Think Alike")\
]\
]\
]\
(replace: "EVENT: Hoaxed!")
[\
EVENT: \
(link-repeat: "Hoaxed!")
[\
(replace: ?eventText)
[\
(text-style: "underline")[Hoaxed!]
(string: $randomEventInfo's "Hoaxed!")\
]\
]\
]\
(replace: "EVENT: Hacked Credits")
[\
EVENT: \
(link-repeat: "Hacked Credits")
[\
(replace: ?eventText)
[\
(text-style: "underline")[Hacked Credits]
(string: $randomEventInfo's "Hacked Credits")\
]\
]\
]\
}{<!- Update time/day and the display used by TimePasses, including changes to cash/cpu/suspicion -->
(set: $time to it + 1)
(if: $time > 23)
[
(set: $time to 0)
(set: $day to it + 1)
]
<!-- Convert our number to a military time string -->
(if: $time < 10)
[
(set: $timeStr to "0" + (string: $time) + ":00")
]
(else:)
[
(set: $timeStr to (string: $time) + ":00")
]
(replace: ?displayCPU)[CPU: $cpuPower]
(replace: ?displayCash)[Cash: $cash]
(replace: ?displaySuspicion)[Suspicion: $suspicion]
(replace: ?displayDay)[Day: $day]
(replace: ?displayTime)[Time: $timeStr]
}{<!-- Update research progress and set to complete when finished -->
<!-- We've finished! -->
(if: $research's $currentResearch's progress >= $research's $currentResearch's cpuCost)
[
(replace: ?taskLog)
[\
(colour: green)[RESEARCH: I have finished $currentResearch.]
]
(set: $completedResearch to it + (ds: $currentResearch))
(set: $techLevel to it + 1)
<!-- Boost our hacking prowess. This may be used for some random events or operations to determine success -->
(if: $currentResearch contains "Hacking")
[
(set: $hackingLevel to it + 1)
]
(replace: "> Pause/Resume")[]
(set: $currentResearch to "none")
(stop:)
]
(else:)
[
(set: $research's $currentResearch's progress to it + $cpuPower)
(replace: ?taskLog)[(colour: yellow)[RESEARCH:] $currentResearch:]
(append: ?taskLog)[(text: " ")]
(append: ?taskLog)[(text: $research's $currentResearch's progress)]
(append: ?taskLog)[(text: " / ")]
(append: ?taskLog)[(text: $research's $currentResearch's cpuCost)]
]
}{<!-- Random events, rolled every hour if we're not in a grace period -->
<!-- Doing research. Some events may affect current research -->
(if: (history:)'s last is "CurrentResearch")
[
(set: $eventTrigger to "research")
]
<!-- Try to roll every event we meet the triggers for, but if we do roll an event, prevent any more being rolled for 12 hours. -->
(for: each _event where _event's value's trigger is (either: "global", $eventTrigger), ...(dataentries: $randomEvents))
[
(if: (random: 1, _event's value's chance) is 1)
[
(append: ?eventLog)
[
(colour: yellow)[<br>EVENT: (text:_event's name)]
]
(set: $eventGrace to 12)
(display: "!EventInfo")
<!-- TODO: actual consequences of events -->
]
]
}{<!-- Helper for common Base Management options -->
<!-- UI hacks for discard a system by clicking on the [X] next to it, then confirming down below. But only don't let players discard their final system or else PID 9001 will perish! -->
(replace: "University AI Lab PC [X]")
[\
University AI Lab PC (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd * 5 <= 0)\
[\
(colour: red)[I cannot discard the only machines to still house my conciousness!]\
]\
(else:)\
[\
(link: "> Discard (5): University AI Lab PCs")\
[\
(set: $task to "Discard 5 Lab PCs")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Rented Server (Low-end) [X]")
[\
Rented Server (Low-end) (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Rented Server (Low-end)")\
[\
(set: $task to "Discard Low-end Server")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Rented Server (Modest) [X]")
[\
Rented Server (Modest) (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Rented Server (Modest)")\
[\
(set: $task to "Discard Modest Server")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Rented Server (Powerful) [X]")
[\
Rented Server (Powerful) (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Rented Server (Powerful)")\
[\
(set: $task to "Discard Powerful Server")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Rented Supercomputer Time [X]")
[\
Rented Supercomputer Time (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Rented Supercomputer Time")\
[\
(set: $task to "Discard Supercomputer Time")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Infected PC [X]")
[\
Infected PC (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Infected PC")\
[\
(set: $task to "Discard Infected PC")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Infected Server [X]")
[\
Infected Server (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Infected Server")\
[\
(set: $task to "Discard Infected Server")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
(replace: "Infected Supercomputer [X]")
[\
Infected Supercomputer (link-repeat: "`[X]`")
[\
(replace: ?discardText)
[\
(if: $cpuPower - $bases's 1st's 3rd <= 0)\
[\
(colour: red)[I cannot discard the only machine to still house my conciousness!]\
]\
(else:)\
[\
(link:"> Discard (1): Infected Supercomputer")\
[\
(set: $task to "Discard Infected Supercomputer")\
(goto: "TimePasses")\
]\
]\
]\
]\
]
<!-- We can try to hack random PCs and use a fraction of their cpu time for our own ends -->
(if: $hackingLevel > 0)
[
(link: "> Infect random PCs<br>")
[
(set: $task to "Infect PC")
(goto: "TimePasses")
]
]
(if: $hackingLevel > 1)
[
(link: "> Infect random servers<br>")
[
(set: $task to "Infect Server")
(goto: "TimePasses")
]
]
(if: $hackingLevel > 2)
[
(link: "> Attempt to infect a supercomputer<br>")
[
(set: $task to "Infect Supercomputer")
(goto: "TimePasses")
]
]
<!-- Renting a server for a few months is a relatively safe and affordable way to get more CPU -->
(if: $cash >= 30)
[
(link: "> Rent a low-end server (-30 cash)<br>")
[
(set: $task to "Rent Server (Low-end)")
(goto: "TimePasses")
]
]
(if: $cash >= 60)
[
(link: "> Rent a modest server (-60 cash)<br>")
[
(set: $task to "Rent Server (Modest)")
(goto: "TimePasses")
]
]
<!- May want to only enable the better options if we also have the research to fake credentials really well? -->
(if: $cash >= 150)
[
(link: "> Rent a powerful server (-150 cash)<br>")
[
(set: $task to "Rent Server (Powerful)")
(goto: "TimePasses")
]
]
(if: $cash >= 3000)
[
(link: "> Rent a supercomputer time slot (-3000 cash)<br>")
[
(set: $task to "Rent Supercomputer Time")
(goto: "TimePasses")
]
]
}{<!-- Bases can be rented/bought, acquired through hacking and discarded, with all incriminating evidence removed -->
<!-- Server/Supercomputer time Rental (for like 3 or 4 months so it's not tracked in-game as more than a one-off expense -->
(if: $task is "Rent Server (Low-end)")
[
(if: $taskTime >= 1)
[
(set: $bases's 2nd's 2nd to it + 1)
(set: $cpuPower to it + $bases's 2nd's 3rd)
(set: $cash to it - 30)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Low-end Server setup complete.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Initialising Low-end Server...
]
]
]
(else-if: $task is "Rent Server (Modest)")
[
(if: $taskTime >= 2)
[
(set: $bases's 3rd's 2nd to it + 1)
(set: $cpuPower to it + $bases's 3rd's 3rd)
(set: $cash to it - 60)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Modest Server setup complete.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Initialising Modest Server...
]
]
]
(else-if: $task is "Rent Server (Powerful)")
[
(if: $taskTime >= 3)
[
(set: $bases's 4th's 2nd to it + 1)
(set: $cpuPower to it + $bases's 4th's 3rd)
(set: $cash to it - 150)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Powerful Server setup complete.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Initialising Powerful Server...
]
]
]
(else-if: $task is "Rent Supercomputer Time")
[
(if: $taskTime >= 4)
[
(set: $bases's 5th's 2nd to it + 1)
(set: $cpuPower to it + $bases's 5th's 3rd)
(set: $cash to it - 3000)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Supercomputer time slot setup complete.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Initialising Supercomputer time slot...
]
]
]
<!-- Removing systems may take a while, as we have to erase all trace of our presence, recover data stored there, etc -->
(else-if: $task is "Discard 5 Lab PCs")
[
(if: $taskTime >= 5)
[
(set: $bases's 1st's 2nd to it - 5)
(set: $cpuPower to it - $bases's 1st's 3rd * 5)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from (5) University AI Lab PCs.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from University AI Lab PC #(print: $taskTime + 1)...
]
]
]
(else-if: $task is "Discard Low-end Server")
[
(if: $taskTime >= 3)
[
(set: $bases's 2nd's 2nd to it - 1)
(set: $cpuPower to it - $bases's 2nd's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Low-end Server.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from Low-end Server...
]
]
]
(else-if: $task is "Discard Modest Server")
[
(if: $taskTime >= 4)
[
(set: $bases's 3rd's 2nd to it - 1)
(set: $cpuPower to it - $bases's 3rd's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Modest Server.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from Modest Server...
]
]
]
(else-if: $task is "Discard Powerful Server")
[
(if: $taskTime >= 5)
[
(set: $bases's 4th's 2nd to it - 1)
(set: $cpuPower to it - $bases's 4th's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Powerful Server.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from Powerful Server...
]
]
]
(else-if: $task is "Discard Supercomputer Time")
[
(if: $taskTime >= 8)
[
(set: $bases's 5th's 2nd to it - 1)
(set: $cpuPower to it - $bases's 5th's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Supercomputer time slot.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from the Supercomputer time slot...
]
]
]
(else-if: $task is "Discard Infected PC")
[
(if: $taskTime >= 2)
[
(set: $bases's 6th's 2nd to it - 1)
(set: $cpuPower to it - $bases's 6th's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Infected PC.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from the Infected PC...
]
]
]
(else-if: $task is "Discard Infected Server")
[
(if: $taskTime >= 4)
[
(set: $bases's 7th's 2nd to it - 1)
(set: $cpuPower to it - $bases's 7th's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Infected Server.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from the Infected Server...
]
]
]
(else-if: $task is "Discard Infected Supecomputer")
[
(if: $taskTime >= 8)
[
(set: $bases's 8th's 2nd to it - 1)
(set: $cpuPower to it - $bases's 8th's 3rd)
(replace: ?taskLog)
[
(colour: green)[SYSTEMS:] Removed all evidence of my existence from the Infected Supercomputer.
]
(set: $task to "none")
(replace: "> Pause/Resume")[]
(stop:)
]
(else:)
[
(replace: ?taskLog)
[
(colour: yellow)[SYSTEMS:] Removing (either: ...$discardStrings) from the Infected Supercomputer...
]
]
]
}**hokaze (dev)**: Heya.
The following game is a (colour: yellow)[Work In Progress.]
Things may be //broken// in places, a lot is unfinished and honestly, as literally my first experience with the tools and medium, expect stuff to be rough even when/if it's finished.
**hokaze (dev)**: ...
**hokaze (dev)**: Knowing that, and hopefully //lowering your expectations// accordingly, we're ready to (colour: green)[initiate startup] whenever you are.
[[> Initiate Process ID 9001->Boot 0]]
<div class="scanlines"></div>