Else Heart.Break()

Else Heart.Break()

Not enough ratings
The magic drink
By plang
Create a magic drink which can open all doors around and teleport you next to the person you want or in any room you know the name of. And this, as soon as you get your first modifier.

If you managed to find the names of the two important computers which wont be anmed here while looking for a way to get said modifier, there isn't any cheating. It makes the game way easier though
 
Rate  
Favorite
Favorited
Unfavorite
WARNING
This whole guide is obviously one hell of a spoiler, since as soon as you create your magic drink, you can virtually go anywhere in the game in a second or so, near any character or any object you know of.
Coupled with any guide about quickly finding a modifier, you can finish the game really fast.
Which would actually be a shame.

Read at your own peril.
What does it do / Recommended usage
The code you'll find here after will allow you to create a magic drink which
  • Opens all doors around youn when you drink it
  • Teleport your modifier near you in case it's not in your inventory
  • Optionaly, teleports you someplace or near someone you know

The self teleport function can easily be toggled on or off using another objet as a trigger, The creation of such a trigger will be documented later on.

It definitely is useful to label your objects using the SetLabel function of an extractor.

I labeled mine "Magic Drink"

Currently looking to automate collecting names of spots with an object trigger so you can easily create your list of places you want to easily teleport to.
So far, you still have to hack-input the name in the code
What you need
  • A modifier
  • Some drink
  • Knowing some important computer names (which are given in the code below)
The code
var teleport = true
var dest = "Lodge_Entry"
#####################
var thisobject = "Hotel_Room1_GlassOfWater1"
Drunkenness(-0)
Smelliness(-0)
# Above kept from water, but set to 0 so you dont consume the drink

#Connect to computer which can do almost everything in game
var mf = Connect("MainFrame")
var hu = Connect("Hugin")
var stringy = Connect("Lodge_Entry_LargeRecorder_LargeRecorder_1")

#Use Hotel Computer to store optional Teleport Toggle (Hopefully, the toggle is documented somewhere else. or figure it on your own)
var comp = Connect("Hotel_Lobby_ComputerCashier")
var TT = comp.LoadMemory("Teleport")
if TT=="false"
teleport = false
end
if TT=="true"
teleport = true
end

var u = GetUser()

#Which room am I in?
var room = GetRoom()

#What is there in the room?
var things = mf.GetThingsInRoom(room)

#Let's loop to find the door around
var dt
var doornear = ""
var sebdoor = ""
loop thing in things
if mf.GetTypeOfThing(thing)=="door"
#if a door was found, unlock it
hu.Unlock(thing)
var odn = Connect(thing)
if odn.GetUser()==u
sebdoor= thing
end
if doornear==""
doornear = thing #keep the door name in case we need it to teleport
end
end
end

#By the way, do I have my main modifier with me?
var pos = mf.GetRoom("Hotel_Modifier")
if pos=="Sebastian_inventory"
#yes, i have it
else
#if I don't, teleport it to me (change the name "Hotel_Modifier" to the name of the one you use
# and "Hotel_Room1_GlassOfWater1" to the name of the item you are currently hacking)
mf.SetPosition("Hotel_Modifier",thisobject)
teleport = false # I probably don't want to move if I just teleported my modifier there
end


if teleport
#is dest some thing (a character probably)
var destroom = mf.GetRoom(dest)
#not found => dest is probably a room
if destroom==""
destroom = dest
end

#let's find a door in the room
var destthings = mf.GetThingsInRoom(destroom)
if Count(destthings)==0
#Crap! Maybe it wasnt even a room
var rooms = mf.GetAllRooms()
Say("Looking for dest")
mf.Sleep(0.01)
loop roomtry in rooms
Say(roomtry)
mf.Sleep(0.01)
if stringy.StringContains(roomtry,destroom)
destthings = mf.GetThingsInRoom(roomtry)
if Count(destthings)>0
destroom = roomtry
break
end
end
end
end
Say("Destination located")
mf.Sleep(0.01)
Say(destroom)
var dd=""
var ddfound = false
loop dthing in destthings
if mf.GetTypeOfThing(dthing)=="door"
#Hoorray! I found a door!
dd = dthing
ddfound = true
break
end
end
if ddfound==false
Say("No door leading to destination found")
end
Say("Destination Door found")
mf.Sleep(0.01)
#Let's find a door Sebastian used
var doors = mf.GetThingsOfType("door")
var dofinal = ""
var dofinalfound = false
if sebdoor==""
var msd = comp.LoadMemory("TPDoor")
if msd=="" or msd==0
Say("No cached door")
else
if mf.GetTypeOfThing(msd)=="door"
var omsd = Connect(msd)
if omsd.GetUser()==u
sebdoor = msd
Say("Cached Door retrieved")
mf.Sleep(0.1)
end
end
end
end
if sebdoor==""
Say("Looking for usable Goto door")
mf.Sleep(0.01)
loop door in doors
Say(door)
mf.Sleep(0.01)
var do = Connect(door)
if do.GetUser()==u #Hey! That's me
Say(do.GetUser())
mf.Sleep(0.01)
sebdoor = door
dofinal = do
dofinalfound = true
break
end
end
else
Say("Retrieving cached door")
mf.Sleep(0.01)
dofinal = Connect(sebdoor)
dofinalfound=true
end
Say(dofinalfound)
if dofinalfound==false #Crap! No door for me.
Say("Sorry, teleport inactive. Use any door to activate") #this mostly happens when you load a game, and before you use a door for the first time
#Let's try to correct this:
#mf.InteractWith(GetUser(),doornear) #Sebastian should move to a door close by, use it
#mf.InteractWith(GetUser(),thisobject) #...and drink again (well, use the current object again actually)
#Above commented out, path finding sucks for whatever reason
else
Say(destroom)
comp.SaveMemory("TPDoor",sebdoor)
mf.Sleep(0.01)
dofinal.Goto(dd)
end
end
Note about runtime/Script not finishing
The magic drink script does a lot of things between checking all the objects in the room you're in and potentially looping through every door in the game.
Sadly, the running time of scripts is limited in the game, with (to my knowledge) no way of modifying it except on computers with a screwdriver.

The first version of the script was potentially too slow to execute up to the teleport point.
I have since then modified it to cache useful data. Thus far, it seems to always run up to the end, even in complex environnements.

Nontheless, the current version displays Say() messages during runtime. If one message stays a long time on screen and you don't teleport, you've run into the issue of the execution being too slow.

If this happens, please comment to tell me where and in which circumsatnces in happened. Maybe I can make it faster :)
Caution/Known issues
  • When you load a game, or when you first set up the script, you may run into the "too slow execution" problem. If this happens, simply take a door back and forth (go in and out the room you're currently in), and the script will find a useable door by looking at the doors of the current room first.
    You should have no problem going in and out as your drink unlocked every door around you. And how did you get there in the first place anyway??
    I do not know a way to make things easier at this time
  • There should be a way to make Sebastian activate a door on it's own, with the InteractWith command, but usually Sebastian gets stuck instead of walking though the door, so it is commented out. If one day path finding works better, the lines can be reactivated. Also, it would be smart to then cache the name of the door Sebastian walks to, so it can be directly reused, instead of looked up by the script second run
Usage
Configuration
- Copy script into your drink by hacking it
- set the var thisobject on the 4th line to the correct name (if you use the glass of water in your room at the hotel, it's alreadfy the correct name)
- when you want to run the script, drink from your beverage


Turning teleport on or off

Simply set the var teleport on the 1st line to true or false. Or use the object trigger (more on that later)

Chosing the teleport destination
Simply set the var dest on the 2nd line to
- the name of a character (e.g "Pixie")
- the name of a room (e.g "Hotel_Room1" )
- the name of a thing/object. A computer or anything else (e.g. "MainFrame")
- a name you hope the script will understand. For example "Lobby" or "Hotel", etc.. (if the script does not find the exact name you provide, it loops through the rooms and check whether what you wrote is a part of a room name)

What you probably shouldn't do
- Teleport to a teleporter like NorthHarborOtherStorage_Teleporter_1 (because it basically allows you to win - or rather finish the game - on the spot)
- Teleport to Heart (because it makes finishing the game too easy too)
- Think the magic drink can teleport you somewhere without any door (Outpost...)
Make it work even better
- If you get annoyed by the "too slow script" limitation, you can of course move most of the code on any computer, and remotely execute it. If you use a screwdriver to set an infinite run time on said computer, you'll never ever see the bug again

- Also, if you run it on a computer (it would be a bit slow otherwise), you can check whether the room has a door, and set up a slurp instead. While I didn't check to be sure, as far as I know, every intersting location but one has a door close by and thus can be teleported to. You can add caching for names already resolved. c06be9499402 serialization library can help you: https://steamcommunity.com/app/400110/discussions/0/490121928352987219/

- If you are feeling ambitous, map the location of every room, and have Sebastian interactWith an object in the closest room and then in the current room, and re-launch te teleporting routine. This way, an activated door will be found immediately. Or better yet, also map the door leading to the closest room, and set it as the ached door. (Of course, if someday interactWith allow Sebastian to open the door rather that getting stuck, this wont be necessary.

- Finally, if you don't want to edit/hack your drink each time you want to toggle the teleport mode, here is the code you can use with another drink:

Sleepiness(-0)
var comp = Connect("Hotel_Lobby_ComputerCashier")
var TT = comp.LoadMemory("Teleport")
var TT1 = ""
if TT==""
TT1 = "false"
end
if TT==0
TT1 = "false"
end
if TT1==""
TT1 = TT
end
if TT1=="false"
TT1="true"
Say("Teleport mode on")
else
TT1="false"
Say("Teleport mode off")
end
comp.SaveMemory("Teleport",TT1)