Skip to content

Instantly share code, notes, and snippets.

@sfiera
Last active October 23, 2024 02:57
Show Gist options
  • Save sfiera/e121ff29fadc1c46ec0488db8f1aa89e to your computer and use it in GitHub Desktop.
Save sfiera/e121ff29fadc1c46ec0488db8f1aa89e to your computer and use it in GitHub Desktop.
Rebooting the Facility (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
title Rebooting the Facility
author Nicholas Peres DaSilva
homepage www.puzzlescript.net
verbose_logging
run_rules_on_level_start
========
OBJECTS
========
Background
darkgreen
Powered
transparent
0....
.....
.....
.....
.....
Wall
darkgray
WiredWall
darkgray darkred
00100
00000
10101
00000
00100
WiredWallOn
darkgray red
00100
00000
10101
00000
00100
Bolts
darkgray
0...0
.....
.....
.....
0...0
PowerBlock
red darkred
10001
00000
00000
00000
10001
Player
yellow
0000.
.000.
00000
00000
.0.0.
ButtonOn
red
.000.
00000
00000
00000
.000.
Button
darkRed
.000.
00000
00000
00000
.000.
Switch
darkred gray darkbrown
.000.
00100
00200
00200
.000.
SwitchOn
red lightgray darkred
.000.
00200
00200
00100
.000.
pushcrate
gray
.....
.000.
.000.
.000.
.....
WireU
darkred
..0..
..0..
..0..
.....
.....
WireR
darkred
.....
.....
..000
.....
.....
WireD
darkred
.....
.....
..0..
..0..
..0..
WireL
darkred
.....
.....
000..
.....
.....
WireC
darkred gray
..0..
..1..
01010
..1..
..0..
WireOnU
red
..0..
..0..
..0..
.....
.....
WireOnR
red
.....
.....
..000
.....
.....
WireOnD
red
.....
.....
..0..
..0..
..0..
WireOnL
red
.....
.....
000..
.....
.....
WireOnC
red gray
..0..
..1..
01010
..1..
..0..
RepeaterU
gray darkred darkgray
00000
00100
00200
02220
00000
RepeaterD
gray darkred darkgray
00000
02220
00200
00100
00000
RepeaterL
gray darkred darkgray
00000
00020
01220
00020
00000
RepeaterR
gray darkred darkgray
00000
02000
02210
02000
00000
LockRepeaterU
gray darkred darkgray black
00000
00100
03330
02220
00000
LockRepeaterD
gray darkred darkgray black
00000
02220
03330
00100
00000
LockRepeaterL
gray darkred darkgray black
00000
00320
01320
00320
00000
LockRepeaterR
gray darkred darkgray black
00000
02300
02310
02300
00000
RepeaterOnU
gray red darkgray
00000
00100
00200
02220
00000
RepeaterOnD
gray red darkgray
00000
02220
00200
00100
00000
RepeaterOnL
gray red darkgray
00000
00020
01220
00020
00000
RepeaterOnR
gray red darkgray
00000
02000
02210
02000
00000
LockRepeaterOnU
gray red darkgray black
00000
00100
03330
02220
00000
LockRepeaterOnD
gray red darkgray black
00000
02220
03330
00100
00000
LockRepeaterOnL
gray red darkgray black
00000
00320
01320
00320
00000
LockRepeaterOnR
gray red darkgray black
00000
02300
02310
02300
00000
Goalblock
gray darkred
00.00
0...0
..1..
0...0
00.00
GoalblockOn
gray red
00.00
0...0
..1..
0...0
00.00
LockedDoor
darkgray gray
01110
10.01
1.0.1
10.01
01110
UnlockedDoor
darkgray darkgreen
01110
1...1
1...1
1...1
01110
=======
LEGEND
=======
. = Background
# = Wall
P = Player
B = Button
Y = Button
O = Goalblock
" = Goalblock
Q = pushcrate
k = lockeddoor
W = lockeddoor
T = Button and pushcrate
? = WiredWall
I = WiredWall
N = Button and pushcrate and Bolts
M = Switch
X = SwitchOn
Œ = Player and Button
(wires)
: = WireU and WireD
- = WireL and WireR
L = WireU and WireR
J = WireU and WireL
U = WireD and WireR
R = WireD and WireL
+ = WireC
(repeaters)
1 = RepeaterU
2 = RepeaterD
3 = RepeaterL
4 = RepeaterR
6 = LockRepeaterU
' = LockRepeaterD
8 = LockRepeaterL
9 = LockRepeaterR
€ = RepeaterU and Bolts
„ = RepeaterD and Bolts
† = RepeaterL and Bolts
Š = RepeaterR and Bolts
µ = LockRepeaterU and Bolts
¶ = LockRepeaterD and Bolts
» = LockRepeaterL and Bolts
¼ = LockRepeaterR and Bolts
(groups)
Repeaters = RepeaterU or RepeaterD or RepeaterL or RepeaterR
LockRepeaters = LockRepeaterU or LockRepeaterD or LockRepeaterL or LockRepeaterR
RepeatersOn = RepeaterOnU or RepeaterOnD or RepeaterOnL or RepeaterOnR
LockRepeatersOn = LockRepeaterOnU or LockRepeaterOnD or LockRepeaterOnL or LockRepeaterOnR
Cosmetic = WireOnU or WireOnR or WireOnD or WireOnL or WireOnC or RepeatersOn or LockRepeatersOn or ButtonOn or GoalBlockOn
Pushable = pushcrate or repeaters
buttons = Button or Switch
goalblocks = Goalblock
weighted = player or pushcrate
movable = player or pushcrate or repeaters
walls = Wall or WiredWall or PowerBlock
InA = Buttons or WiredWall or LockedDoor or UnlockedDoor or GoalBlock
InU = WireU or WireC or RepeaterD or LockRepeaterD or InA
InR = WireR or WireC or RepeaterL or LockRepeaterL or InA
InD = WireD or WireC or RepeaterU or LockRepeaterU or InA
InL = WireL or WireC or RepeaterR or LockRepeaterR or InA
OutA = Buttons or WiredWall or LockedDoor or UnlockedDoor or GoalBlock
OutU = WireU or WireC or RepeaterU or LockRepeaterU or OutA
OutR = WireR or WireC or RepeaterR or LockRepeaterR or OutA
OutD = WireD or WireC or RepeaterD or LockRepeaterD or OutA
OutL = WireL or WireC or RepeaterL or LockRepeaterL or OutA
=======
SOUNDS
=======
================
COLLISIONLAYERS
================
Background
unlockeddoor
WireU
WireR
WireD
WireL
WireC
buttons, SwitchOn
ButtonOn
WireOnU
WireOnR
WireOnD
WireOnL
WireOnC
Player, walls, goalblocks, pushable, LockedDoor, LockRepeaters
RepeatersOn, LockRepeatersOn, WiredWallOn, GoalBlockOn
bolts
Powered
======
RULES
======
(Toggles switches when actioned)
[ Action Player SwitchOn ] -> [ Player Switch ]
[ Action Player Switch ] -> [ Player SwitchOn ]
(Lets players push)
[ > Player | Pushable ] -> [ > Player | > Pushable ]
(allows you to pull pushable when pressing action)
[ Action Player | pushable no bolts ] -> [ < Player | < pushable no bolts ]
(Stops players from intersecting with bolted objects)
late [Player Bolts ] -> cancel
(Remove power from everything but power sources)
late [Powered] -> []
late [weighted Button ] -> [Powered weighted Button]
late [SwitchOn] -> [Powered SwitchOn]
(Conduct power along power lines)
late up [Powered OutU | InD] -> [Powered OutU | Powered InD]
+ late right [Powered OutR | InL] -> [Powered OutR | Powered InL]
+ late down [Powered OutD | InU] -> [Powered OutD | Powered InU]
+ late left [Powered OutL | InR] -> [Powered OutL | Powered InR]
(Lock doors that lack power or anything holding them open)
late [Powered LockedDoor] -> [Powered UnlockedDoor]
late [no Powered no Weighted UnlockedDoor] -> [LockedDoor]
(Draw cosmetic “power on” tiles over appropriate tiles)
late [Cosmetic] -> []
late [Powered WireU] -> [Powered WireU WireOnU]
late [Powered WireR] -> [Powered WireR WireOnR]
late [Powered WireD] -> [Powered WireD WireOnD]
late [Powered WireL] -> [Powered WireL WireOnL]
late [Powered WireC] -> [Powered WireC WireOnC]
late [Powered Button] -> [Powered Button ButtonOn]
late [Powered GoalBlock] -> [Powered GoalBlock GoalBlockOn]
late [Powered RepeaterU] -> [Powered RepeaterU RepeaterOnU]
late [Powered RepeaterR] -> [Powered RepeaterR RepeaterOnR]
late [Powered RepeaterD] -> [Powered RepeaterD RepeaterOnD]
late [Powered RepeaterL] -> [Powered RepeaterL RepeaterOnL]
late [Powered LockRepeaterU] -> [Powered LockRepeaterU LockRepeaterOnU]
late [Powered LockRepeaterR] -> [Powered LockRepeaterR LockRepeaterOnR]
late [Powered LockRepeaterD] -> [Powered LockRepeaterD LockRepeaterOnD]
late [Powered LockRepeaterL] -> [Powered LockRepeaterL LockRepeaterOnL]
==============
WINCONDITIONS
==============
all GoalBlock on Powered
=======
LEVELS
=======
(Test level for fixing the "doors killing you" glitch)
o..........
...........
.....w.....
.....:.....
.....:.....
..w..i..w..
..:..:..:..
..L--t--J..
.....:.....
.....wp....
...........
(Intro dialogue)
message ...
message IKOSS Labs Maintenence Report - Outpost TO-96b-01 Power Failure
message Doctor Olivia Charlotte D.G.S., 8:01 PM, 11/21/20.
message At approximately 7:53 PM, Outpost TO-96b-01, "The Facility", experienced seismic activity comparable to a magnitude 4.5 earthquake.
message Accompanied by this activity was a loud sound, akin to an explosion, originating from the lower floors of The Facility, as well as the total loss of power to all of The Facility's electronic devices.
message A quick investigation of the lower floors revealed no damage to the building,
message However, Subject M-B-01, a large chunk of a meteorite recovered from Outpost TO-96b-02, now appears to emit a faint purple light.
message As of writing this report, personell Dr. G, Dr. B, and Dr. R are currently situated at Outpost TO-96b-02, requiring me to attempt to fix the power by myself.
message ...
message ===ENTERING FLOOR ONE===
message 1-1: Box Pusher
message TIP: Buttons are weight-activated, and boxes are heavy.
#########
#.......#
#.o---y.#
#.......#
#.p.y.q.#
#...o...#
#########
message 1-2: Box Puller
message TIP: Press [ACTION] to pull movable objects.
###########
#........q#
#......####
#.........#
#.y-o.o-y.#
#.........#
####......#
#p........#
###########
message 1-3: Crossroads
#######
#q#.#.#
#...#.#
#.#.#.#
#.#.###
o-y.t-"
###.#.#
#.#.#.#
#.#...#
#.#y#p#
###o###
message 1-4: Janitor's Closet
message TIP: Doors stay open as long as they have power
###########
#.........#
#......"..#
#.u-y..:..#
#.:....œ..#
#.:.......#
##k##.y.t.#
#...#.:.:.#
#.q.#.o.".#
#...#.....#
###########
message 1-5: Door Stuck
##############
##o######...##
#.:.#.....y.##
#.:.#.q...:.##
#.:.#...##k###
#.y.#####.y.##
#.....#.....##
#.p..yk-y...##
#.....#.....##
#.y.#####.y.##
#.:.#...##k###
#.:.k-y.....##
#.:.#.......##
##o######...##
##############
(Aim to add a 6th level eventually)
message ===FLOOR 1 COMPLETE===
message ...
("World" 2 Dialogue)
message TO: Beatrix S. ([email protected])
message SUBJECT: Facility power grid from hell
message Bea, when you get back from messing around at the crash site, we seriously need to have a talk about this power grid you designed.
message Why, under any circumstance, did you think it was a good idea to hook up this entire building's power supply to a wiring puzzle?
message This whole thing is ridiculous. Do you have ANY idea how annoying it is to reconnect the power every time it goes out?
message Have you even tried to do it yourself? You should have! Cause it sucks!!
message And since when have you added so many more layers to this? I swear there were not multiple floors worth of puzzles that I had to go through last time the power died.
message I know I'm one to talk, but this meteor stuff is serious business. We're on the verge of something huge, we can't afford to mess around anymore.
message I worry about you, Bea. Our lives are on the line here. You need to get your head out of the clouds before Ikoss puts it on a stick.
message Get back to me ASAP. And please, for both of our sakes, do something about the power grid. At LEAST don't make me walk down five flights of stairs again.
message ...
message ===ENTERING FLOOR 2===
message 2-1: Frayed Wires
Message TIP: Repeaters can be pushed and pulled, but do not weigh down buttons.
#############
#......#....#
#..y...#....#
#..l.--k..4.#
#.y....#....#
#.:....#....#
##w##########
#.:..#......#
#.œ..#..T-4-"
#.......t...#
#....#..l-.-o
#....#......#
#############
(
Message 2-2: Crossing Streams
message TIP: Repeaters can only recieve and output power in the direction they are facing.
##############
#########...##
#########.3.##
#########...##
##########k###
#...#.....:.##
o-+-?--r..:.##
#.:.#..1....##
#.l-k..l.-+.o#
#...#.p...:.##
#.4.#.....:.##
#...#..t..y.##
#####..a....##
#######"######
Message 2-3: Mixed Signals
###############
#t#...#.......#
#i#...k-r.fcg.#
#dg...#.:.".!.#
#.a...#.:...t.#
#.4...#...p...#
#.:...#.:.....#
#.l-o.#.y-2-o.#
#.....#.......#
###############
Message 2-4: Switch On
message TIP: Stand on a switch and press [ACTION] to toggle it.
#########o###
#.....#..:..#
#.....#..:..#
o.ctcc"..y..#
#.....#.....#
#..p..#..3..#
#.....#.....#
#..y--k--m..#
#.....#.....#
#.....#.....#
#############
message 2-5: Janitor's Other Closets
##o###############
#.:........#######
#.l.y..o...#...###
#..........#.3.###
#...:..œ.--k...###
#u--j......#.y.###
#k###.t.u.y#.:.###
#...#.@.:.###?####
#.4.#.".:.k--j..##
#...#...:.#.....##
#####.....#.1.m-?r
#####..uj.#.....#:
#######k#########:
#####.....#######:
#####.tccc"-----?j
#####.....########
##################
(Aim to add a 6th level eventually)
message ===FLOOR 2 COMPLETE===
message ...
(Cutting all of floor 3 alongside this note because I do not have enough time to try and design 5 more levels. Oh well!)
(message New note (9:48 PM)
message reminder rewrite this in actual journal when home
message i have a report to submit before 8am tomorrow and i am still stuck down here in this basement solving puzzles. i hate my job
message ive been here for one hour and it already feels like its been days. i swear, my head is going to explode if i see the color red one more time.
message how did bea even build this place. how do these puzzles power the entire building. there is no way this is real. this has to be some sort of messed up prank.
message unfortunately for me, if i go back now and it turns out its not a prank, itll be my head on that stick.
message god he owes me so many beers after what ive been through tonight. my head hurts so bad
message finsih writing this later i need to get back to work
message ...
message ===ENTERING FLOOR 3===
Message 3-1: Locked In
Message TIP: Objects with bolts on them can not be moved. Repeaters that are locked can not change their output.
(level where a switch locks a repeater but opens a door)
message 3-2: Rinse and Repeat
message 3-3: Three Times Around
(redesign this later it sucks)
##.##?##.##
#...#2#...#
#.m-+ç--o.#
#...lr....#
##.##?##.##
#...#2#...#
#."ccæhct.#
#....fe...#
##.##i##.##
#...#@#...#
#.y-+ø--o.#
#.p.lr....#
##.##?##.##
message 3-4: Redline Run
(Aim to add a 6th level eventually, turn Combination Lock into 3-6)
Message 3-5: Combination Lock
message ===FLOOR 3 COMPLETE===
message ...)
(message ===ENTERING POWER CORE===
message FINAL: Power Core
message ===POWER CORE COMPLETE===
message === POWER RESTORED ===
message = = = ALL SYSTEMS ONLINE = = =
message ...)
message FROM: Beatrix S. ([email protected])
message RE: Facility power grid from hell
message Ollie, something seriously isn't right.
message I'll admit, yes, I did hook up the breaker to a wiring puzzle because I was bored while building it,
message But you said it yourself. There were never multiple puzzles. I only ever built one.
message I looked around the whole facility for whatever multi-story puzzle you were talking about, but there was nothing.
message I decided to check the security footage, and it cuts for about four hours before turning on again. The room is completely empty in both clips.
message Listen, I'm not saying you're lying about the power outages, but something has been off about you ever since you were assigned to get up close with that meteor.
message Your constant headaches, hallucinations, the night terrors you've been having?
message Those never started until after you started working with the meteor, and they've only been getting worse.
message There's something up with that thing. Dr. G keeps telling us it's just radiation, but I've never heard of radiation causing night terrors.
message I handled some meteorite samples the other day, and half of my hand is still numb. Radiation doesn't just do that to someone.
message Personally? With all the other weird shit going on in this town? I don't think what we're dealing with has been discovered by science yet.
message And I think Ikoss knows that.
message Anyways, you seriously need to take some time off. Ask Dr. G to caress the stupid rock for a while or something.
message Don't worry about heads on sticks. We're way too important to the company to be replaced right now. Plus, I feel like they'd want to keep you alive, at the very least.
message I'll talk to you more about this later. I've got errands to run. Take care, Ollie. o7
message ===END===
(Extra lore stuff: The pulse of energy that The Meteor created was due to Xal'Gyron's presence becoming increasingly powerful as The Meteor developed his gateway. The pulse did actually shut off the power, but also formed a temporary field of magic around The Facility in which Xal's creation powers could take root for a bit.
Because Olivia's essence has been heavily corrupted by the Essence of Dreams, her mind was able to subconciously "communicate" with Xal's creation powers, similarly to all of Xal's other creations (who all also contain the Essence of Dreams).
Because she knew that the Facility lost power and that she needed to look for the breaker puzzle, Xal's creation powers reacted accordingly and began creating a bunch of breaker puzzles around The Facility's basement. Combined with the hallucinations and other symptoms she was already suffering from due to the meteor infection, it all felt extremely real to her in the moment.
In the same way that Xal's creatures can die because Xal subconsciously believes that "Getting hurt enough = Death", the Facility's power returned because Olivia subconsciously believed that "Solved last puzzle = Power turns on". Xal's creation powers within the magic field were able to interact with her consciousness in a similar way to how it interacts with the consciousness of any other Xaloid.
If you're my professor reading this right now, or just someone who managed to stumble across this without knowing about the story I'm writing then none of this probably means anything to you sorry lol.
)
(
==========
CUT LEVELS
==========
if you wanna play them just copy all the text and paste it at the underneath the text for the LEVELS section. keep in mind some of these are not possible lol
message 0-0: Test Level
........................
........o...............
.....y-4j.uor.y.y.......
..........1.1.:.:.......
.....y-4r.:.:.2.2.......
..........y.y.l.j.......
.....u3-y..o............
.....o....o+.y........4.
.....l3-y..1.:..........
...........:.2..........
.....y-4+..y.+--........
.............:..y.......
.....+3-y....:..:.......
...........ur...2.......
...........::...9.......
.o...:.....::...1.......
.:..-y--p--j:...:.......
.l-3-+-4---r:...y.......
...........::...........
...........::...........
........................
........................
save this idea for a level with locked repeaters
#########"#########
#.....#..a..#.....#
#.....#..a..#.....#
#y-.--wcchcci......
#.....#..a..#.....#
#.....#..a..#.....#
##...###.a.###...##
#.....#..!..#.....#
#.....#..a..#.....#
#..tc%i%ch.-k.....#
#.....#..a..#.....#
#.....#..œ..#.....#
###################
message 3-3: This is like, almost good level design but I'm too tired to remember what I was trying to do
......#######.....
......#.....####..
...y..#..t.....#..
...:q.#..i..o..#..
...o..#.#@#.:..#..
......k-?8?-y..#..
......#.:?.....#..
......##?#####.#..
.......#2#.....#..
.....y--4--o..p#..
...............#..
...............#..
...............#..
......##########..
message old 1-2: Dead Signal
###########
#.........#
#...uor...#
#...:.:...#
#...y.y...#
#.........#
#....y....#
#.p..:..q.#
#....o....#
#.........#
###########
Message old 1-3: Double Box
##o###"##
#.:...a.#
#.y.#.œ.#
#...#...#
##.######
#...#...#
#.q.#.q.#
#.......#
##o###.##
#.:.#...#
#.y.....#
#...#...#
#########
Message EX-1: Double Box EX
##o###"##
#.:...a.#
#.y.#.œ.#
#...#...#
##.######
#...#...#
#.q.#.q.#
#.......#
##o###.##
#.:.....#
#.y.#...#
#...#...#
#########
Message SEX-1: Double Box SUPER EX
######o###"##
#...#.:...a.#
#.q.#.y.#.œ.#
#.#.#...#...#
#.#.##.######
#.......#...#
###.#.q.#.#.#
#...#.......#
#.#.##o##.###
#.#...:.....#
#.....y.#...#
#...#...#...#
#############
Message old version of Door Stuck that doesn't work because of the glitch where doors fucking eat the player for some reason
##################
#.....#...########
#..t..k.q.########
#..a..?...########
#..a..??##########
###w###?#o#o#"####
##...#.:.:.:.a...#
##.y-k-y.y.y.t.p.#
##...#...........#
##################
Message older version of Door Stuck that kind of works but not well
#############
#.....#.....#
#.....#.y-o.#
#..t..#.....#
#..a..#.y-o.#
#..a..#.....#
#######.tc".#
#.....#.....#
#.....#.....#
#..y--ky..p.#
#.....#.....#
#q....#.....#
#############
message old 2-3 mixed signals
###########
#...#.....#
#.4.#..o..#
#...#..2..#
##k##..t..#
#uj.......#
#:........#
#....p....#
#lr.......#
#.y--1--o.#
#.........#
###########
message attempt at making mixed signals harder that ended up locking repeaters so I got frustrated and scrapped it
################
#.....#......a.#
#..o..k-r....!.#
#..:..#......a.#
#..2..#.a....t.#
#..hccicœc.r...#
#..a..#.a..:...#
o-4e..#.3..l-o.#
#.....#.:......#
########o#######
message Janitor's Other Closet
#..............
#..............
#..............
#..............
#..............
#..............
#.t.p.t........
#..............
#..............
#..............
#.y-`cw........
#...!..........
####n##########
message Supposed to be a harder version of Janitor's Closet with repeaters n shit but it never got past the name lol
message old 1-1: Button Pusher
#########
#.......#
#...p...#
#.......#
#.y---o.#
#.......#
#########
message old 1-5: Blocked Hall
######o##
#...#.:.#
#.p.#.y.#
#...#...#
##.###.##
##.###q##
##.###q##
##.###.##
#.......#
#.y...y.#
#.:...:.#
##o###o##
message 1-10: Triple Box
....###########....
....#.........#....
....#.........#....
....#.........#....
#########.#########
#...#.q.......#...#
#...#.q..y....#...#
#...#.q..:....#...#
#...#....o....#...#
#.....y-o.o-y.....#
#...#....o....#...#
#...#.p..:....#...#
#...#....y....#...#
#...#.........#...#
#########.#########
....#.........#....
....#.........#....
....#.........#....
....###########....
Message old 2-2: Directional pulse
Message TIP: Repeaters can be pushed and pulled, but are not weighted.
#########
#.......#
#...p...#
#.......#
#.2.4.3.#
#.......#
#...y...#
#...:...#
#.u.+.r.#
#.:...:.#
#.o.:.o.#
#...o...#
#.......#
#########
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment