Global Procs

These procs are globally accessible, and can be called from anywhere in the code.

Arguments:
msg: The message to be included in the stack trace.

Immediately terminates the running procedure, providing a stack trace with the given message, output to the /world/var/Log.

/proc/alert(Usr, Message, Title, Button1, Button2, Button3)
Arguments:
Usr: The user
Message
Title
Button1 = Ok
Button2
Button3
Returns:
text

Displays a customizable alert message to a user (either a /mob or /client). It accepts a title, message, and up to three buttons as text. If no buttons are specified, the first defaults to "Ok".

If no user is explicitly provided, the current user is used and arguments are shifted. The function checks for a valid connection; if none exists, it returns "OK". Otherwise, it sends the alert and returns the user's interaction.

Arguments:
Object
time
loop
easing
flags
delay
pixel_x
pixel_y
pixel_z
maptext
maptext_width
maptext_height
maptext_x
maptext_y
dir
alpha
transform
color
luminosity
infra_luminosity
layer
glide_size
icon
icon_state
invisibility
suffix
Returns:
null
Arguments:
N: number, character code
Returns:
text: The converted character

Returns the character corresponding to a UTF-32 character code - despite the name of this proc, it is not limited to ASCII characters.

world.log << ascii2text(5660) //
/proc/block(/atom/Start, /atom/End, StartZ, EndX, EndY, EndZ)
Usage:
block(/atom/Start, /atom/End)
Start: The lower left corner of the block.
End: The upper right corner of the block.
block(StartX, StartY, StartZ, EndX, EndY, EndZ)
Returns:
/list: A list of turfs in a 3D block

This proc allows for us to get a list of the turfs within a specified area.

for(var/turf/my_turf in block(1, 1, 1, 10, 10, 10))
    my_turf.icon_state = "green"

This will change the /atom/var/icon_state of every turf, beginning at the turf located at X = 1, Y = 1, Z = 1 and finishing at the turf located at X = 10, Y = 10 and Z = 10, to "green". This list is inclusive of the Start and End turfs.

/proc/bounds(Ref, Dist)
Arguments:
Ref
Dist = 0
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/bounds_dist(Ref, Target)
Arguments:
Ref
Target
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/browse(Body, Options)
Arguments:
Body: A HTML text, a file, or null
Options: A parameter string of options.
Arguments:
A: Number
Returns:
num: The ceiling of the provided number.

The ceiling is the largest integer greater than or equal to the provided number.

world.log << ceil(1.00001) // 2
world.log << ceil(-0.00001) // 0
Arguments:
Key: The string to canonicalize
Returns:
null, text: The canonical form of the provided string

The canonical form of a given key is composed of lowercase letters between A-Z, numbers between 0-9 and the @ symbol. This is pre-generated on both /mob/var/ckey and /client/var/ckey, based on the user's /client/var/key.

var/my_evil_key = "W0w!!IGotLots-ofFunCharacters!!!InHere@@"

world.log << ckey(my_evil_key) // w0wigotlotsoffuncharactersinhere@@
Arguments:
Text
Returns:
null, text

This is similar to ckey(), however, case is preserved, along with - and _ characters. All other special characters (apart from the @ symbol, as with ckey()) will be removed.

world.log << ckeyEx("OhSoWe'ReKeeping!MyCapitalLetters?Now") // OhSoWeReKeepingMyCapitalLettersNow
/proc/clamp(Value, Low, High)
Usage:
clamp(Number, Low, High)
Number: A number.
Low: The lowest number that can be returned.
High: The highest number that can be returned.
clamp(/list/List, Low, High)
List: A list of numbers.
Returns:
null, num, /list: The provided number, kept between the Low and High values.
The original list, with the numeric contents kept between the Low and High values.

Constricts a number between the Low and High values provided. If the number is between those values, it is unchanged. If it exceeds the Low or High values, those will be returned.

world.log << clamp(5, 1, 10) // 5
world.log << clamp(1, 5, 10) // 5
world.log << clamp(15, 1, 10) // 10

When operating on a list, this functions as if clamp() has been run on each entry in the list.

var/my_list = list(1, 2, 3, 4, 5, 6, 7, 8, 9)
for(var/num in clamp(my_list, 1, 5))
    world.log << num // 1, 2, 3, 4, 5, 5, 5, 5, 5
Parity Issue ⚠️
In the OpenDream implementation of DreamMaker, this feature differs in implementation:
A new list will always be returned from the clamp() proc, it does not operate in place
Usage:
cmptext(string1, string2, ...)
Returns:
num: 1 if all the provided arguments are the same, 0 otherwise

This proc is case insensitive, unlike cmpTextEx(). Any number of arguments can be given to this proc, and it will return 1 if they are all the same.

if(cmptext("letsplayagame", "LETSPLAYAGAME", "letsPlayAGame"))
    world.log << "Yay!" // "Yay!" is printed
Arguments:
T1
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/copytext(T, Start, End)
Arguments:
T: The text string to copy from
Start = 1: The position in the string to start the copy
End = 0: The position in the string to finish the copy, exclusive
Returns:
null, text: A new string copied from the provided points

Copies characters in the provided string between the Start and End position. By default, the End value will copy the remainder of the string. You can also specify negative positions for the Start or End, which will cause it to work backwards.

world.log << copytext("Foo Bar", 5) // Bar
world.log << copytext("Foo Bar", 1, 4) // Foo

world.log << copytext("Foo Bar", -3) // Bar
world.log << copytext("Foo Bar", -7, -3) // Foo

For non-ASCII strings, where the string position does not necessarily correlate to character position, you will need the _char variant of this proc. copytext_char() works in text elements, and otherwise functions identically.

/proc/eval(script)
Arguments:
script
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/fcopy(Src, Dst)
Arguments:
Src: The file to copy.
Dst: Where the file should be copied to.
Returns:
num: 1 on success; 0 on failure.

The source file can be a savefile, a file on the filesystem or a loaded resource, such as an icon.

// resources are specified with 'single quotes'
fcopy('icons/mob.dmi', "temp/mob.dmi")

// "double quotes" specify an external file
fcopy("temp/mob.dmi", "the_void/")
Parity Issue ⚠️
In the OpenDream implementation of DreamMaker, this feature differs in implementation:
In BYOND, if both the source and destination have a trailing slash, they will be treated as directories. This recursively copies the contents of directories into the target path.
Arguments:
File: The file to copy into the cache
Returns:
null, num
Arguments:
File: The file system entry to delete.
Returns:
num: 1 on success; 0 on failure

Deletes the specified entry in the file system. If the filename ends with a /, it will recursively delete all contents within the directory.

Arguments:
File: The name of the file to check.
Returns:
num: 1 if the file exists; 0 if it does not.

Determines if the file exists in the file system. Unlike fdel(), this exclusively operates on files - it cannot determine if a directory exists.

if(!fexists("code.dme"))
    world.log << "How did we get here?"
Arguments:
Path

Returns a resource object of the file on the file system. This can then be manipulated using a variety of procs, such as allowing for output to a player using << and browse().

Arguments:
File: The file to read.
Returns:
null, text: The contents of the file, or null on invalid files.

This allows you to read the contents of a file from the file system directly as a string.

Arguments:
type
/proc/findlasttext(Haystack, Needle, Start, End)
Arguments:
Haystack: The string to search through.
Needle: The text to search for.
Start = 1: The byte position in the string to start searching at. As this is searching backwards, this defaults to the end of the string.
End = 0: The byte position immediately before the last character that should be searched.
Returns:
num: The position in the string of the first match; 0 if no match was found.

The comparison occurs case insensitively - for the case sensitive version, see findlasttextex.md.

world.log << findlasttext("FooFoo", "foo") // 4
world.log << findlasttext("FooFoo", "foo", 3) // 1
/proc/findlasttextEx(Haystack, Needle, Start, End)
Arguments:
Haystack: The string to search through.
Needle: The text to search for.
Start = 1: The byte position in the string to start searching at. As this is searching backwards, this defaults to the end of the string.
End = 0: The byte position immediately before the last character that should be searched.
Returns:
num: The position in the string of the first match; 0 if no match was found.

The comparison occurs case sensitively - for the case insensitive version, see findlasttext.md.

world.log << findlasttext("FooFoo", "Foo") // 4
world.log << findlasttext("FooFoo", "Foo", 3) // 1
/proc/findtext(Haystack, Needle, Start, End)
Arguments:
Haystack: The string to search through.
Needle: The text to search for, or the /regex to search with.
Start = 1: The byte position in the string to start searching at.
End = 0: The byte position immediately after the last character that should be searched.
Returns:
num: The position in the string of the first match; 0 if no match was found.

If the Needle provided is a string, the comparison occurs case insensitively. For the case sensitive version, see findtextex.md.

if(findtext("Foo Bar", "foo"))
    world.log << "This succeeds!"

if(findtext("Foo Bar", "Foo", 3))
    world.log << "This does not!" // as the Start is set after the occurence in the string

Negative amounts for the Start or End value count from the end of the string.

if(findtext("Foo Bar", "Bar", -3))
    world.log << "We get here!"
/proc/findtextEx(Haystack, Needle, Start, End)
Arguments:
Haystack: The string to search through.
Needle: The text to search for, or the /regex to search with.
Start = 1: The byte position in the string to start searching at.
End = 0: The byte position immediately after the last character that should be searched.
Returns:
num: The position in the string of the first match; 0 if no match was found.

If the Needle provided is a string, the comparison occurs case sensitively. For the case insensitive version, see findtext.md.

if(findtext("Foo Bar", "foo"))
    world.log << "This fails!"
/proc/flick(Icon, Object)
Arguments:
Icon: An icon file, or a named icon state.
Object: The object being changed.

Temporarily replaces the /atom/var/icon, or /atom/var/icon_state, of the specified object for the duration of the animation. This only occurs on the client - the icon or icon_state variable is not actually altered.

/obj/button/Click()
    flick("pressed_animation", src)
    usr << "You pressed me!"
Arguments:
Path: The path in the file system to return the contents of.
Returns:
/list: A list of files and directories in the specified path.

This is non-recursive, and only returns the contents of the directory specified. Names returned are relative to the specified path.

Path must be a directory with a trailing slash.

// given a directory structure like
//
// example
// ├── maps
// │   └── map.dmm
// ├── code.dme
// └── icons
//     ├── icon.dmi
//     └── other_icon.dmi

for(var/item in flist("icons/"))
    world.log << item // "icon.dmi", "other_icon.dmi"

for(var/item in flist("./"))
    world.log << item // "maps/", "code.dme", "icons/"

Arguments:
A: A number.
Returns:
num: The largest integer less than or equal to A.
world.log << floor(0.999999) // 0
world.log << floor(-0.00001) // 1
Arguments:
n: A number.
Returns:
num: The numbers after the decimal point.
world.log << fract(0.1234) // 1234
world.log << fract(-0.1234) // -1234
/proc/ftime(File, IsCreationTime)
Arguments:
File: The path to the entry on the file system to test.
IsCreationTime = 0: 1 return the creation date; 0 for last modified date
Returns:
num: Date expressed as number of deciseconds since Jan 1, 2000.

This value can be formatted using time2text().

var/time = ftime("environment.dme") // 7.76174e+09
world.log << time2text(time) // Mon Aug 05 12:58:22 2024
/proc/generator(type, A, B, rand)
Arguments:
type
A
B
rand
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
Arguments:
Loc1 (/atom): An object on the map.
Loc2 (/atom): An object on the map.
Returns:
num: The number of tiles between both arguments.

If either object is not on the map, 127 will be returned. If both arguments are the same object, -1 will be returned.

Parity Issue ⚠️
In the OpenDream implementation of DreamMaker, this feature differs in implementation:
In BYOND, the distance in Z level is also calculated.
Arguments:
Ref (/atom/movable): The moving object.
Trg (/atom): The object being moved away from.
Max = 5: The maximum distance between Ref and Trg.
Returns:
/turf, num: The new position; or 0 if no movement has occured.

Calculates the step in the opposite direction from the provided object.

Arguments:
Ref (/atom/movable): The moving object.
Returns:
/turf, num: The new position; or 0 if no movement has occured.

Calculates the destination of Ref taking a step in a random direction.

/proc/get_step_to(Ref, Trg, Min)
Arguments:
Ref: The moving object.
Trg: The object being moved away towards.
Min = 0: If the two objects are within this many steps, no step is calculated.
Returns:
/turf: The location that should be moved to; 0 if no path is calculated.
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
Arguments:
Ref (/atom/movable): The moving object.
Trg (/atom): The object being moved towards.
Returns:
/turf, num: The new position; or 0 if no movement has occured.
/proc/get_steps_to(Ref, Trg, Min)
Arguments:
Ref: The moving object.
Trg: The object being moved towards.
Min = 0: If the two objects are within this many steps, no step is calculated.
Returns:
/list, null: A list of directions to step in to reach the Trg; or null if no path is available.
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.

Calculates a path from Ref to Trg, avoiding dense objects. If the target is more than double /world/var/view, null is returned.

for(var/dir in get_steps_to(me, them))
    step(me, dir) // on our way!
/proc/gradient(A, index)
Usage:
gradient(Item1, Item2, ..., index)
Item1: Elements of a color gradient list.
gradient(/list/Gradient, index)
Gradient: A color gradient list.
index: The index on the gradient to perform the interpolation on.
Returns:
text: A color, either in #rrggbb or #rrggbbaa format.

Generates a gradient between the specified elements, and retrieves the color at the specified point along the gradient, per the index argument.

world.log << gradient("#FF0000", "#000000", 0.5) // outputs #7F0000, as we have halved the red value
/proc/hascall(Object, text/ProcName)
Arguments:
Object: The object to check.
ProcName (text): The name of the proc.
Returns:
num: 1 if the object has the specified proc; 0 if it does not
/datum/my_thingy/proc/does_something()

/world/New()
    var/datum/my_thingy/thing = new

    if(hascall(thing, "does_something"))
        world.log << "The thing does something!"
/proc/hearers(Depth, Center)
Arguments:
Depth: The radius to check for hearers in.
Center: An object on the map to check for hearers around.
Returns:
/list: A list of /mobs that can hear the center object.

An object that can hear another object is calculated similarly to viewers(), but ignores darkness, as you can still hear in the dark.

Arguments:
HtmlText: A string to unescape.
Returns:
text: The provided string, unescaped.

The inverse of html_encode(), text that has already been escaped - such as & becoming &amp; - can be decoded into a normal string.

world.log << html_decode("My &amp; strin&#39;g full &gt; of reserved &#39; &lt; characters &quot;.")
// My & strin'g full > of reserved ' < characters \".
Arguments:
PlainText: A string to escape.
Returns:
text: The provided string, escaped.

Before text can be displayed in a HTML document, certain reserved characters must be encoded, as they have special meaning in HTML. Using html_encode() on the string before it is displayed ensures that it is displayed literally.

world.log << html_encode("My & strin'g full > of reserved ' < characters \".")
// My &amp; strin&#39;g full &gt; of reserved &#39; &lt; characters &quot;.
/proc/icon(icon, icon_state, dir, frame, moving)
Arguments:
icon: An icon file, or /icon.
icon_state: Optional, the icon state within the icon to retrieve.
dir: Optional, the direction to retrieve.
frame: Optional, the animation frame to retrieve.
moving: If truthy, extracts only movement states; 0 for non-movement states; null for both.

This constructs a new /icon, similar to using new /icon(), with the specified icon.

/proc/icon_states(Icon, mode)
Arguments:
Icon
mode = 0
Returns:
null, /list: A list of strings containing the name of icon states.

Icon files containing multiple icon states can be retrieved. The default, unnamed icon state is retrieved as "".

/proc/image(icon, loc, icon_state, layer, dir, pixel_x, pixel_y)
Arguments:
icon: An icon, object type, object instance or image.
loc: Optional, the location to display the image.
icon_state: Optional, the icon state to use.
layer = FLY_LAYER for icons, otherwise inherited from the object: Optional, the layer this should appear on.
dir: Optional, the direction to use.
pixel_x
pixel_y

This constructs a new /image, similar to using new /image().

/obj/hat_giver/Clicked()
    usr.overlays += image('hat.dmi', "big_hat")

The arguments accepted by the proc can be used to override the values inherited from the object, if passed an object in the first argument.

The image is attached to the specified loc, following movable atoms, and can be removed by reassigning the /image/var/loc or deleting the image.

Usage:
isarea(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all provided arguments are /areas; 0 if any are not
Arguments:
File: The potential file to check.
Returns:
num: 1 for a file; 0 if it is not.

This works for both resource files, and files retrieved via file().

var/my_resource = 'icons/turf.dmi'

if(isfile(my_resource))
    world.log << "It's true!"
Arguments:
Icon: The potential icon to check.
Returns:
num: 1 for an icon; 0 if it is not.

This works for both /icon objects, and icon files loaded into the resource cache.

if(isicon('sounds/zworp.ogg'))
    // this will not pass

if(isicon('icons/alien.dmi'))
    // but this will
Arguments:
n: The number to test.
Returns:
num: 1 for an infinite value; 0 if it is not.
/proc/islist(Object)
Arguments:
Object: The potential list to check.
Returns:
num: 1 for a list; 0 if it is not.
Usage:
isloc(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all provided arguments are valid locs; 0 if any are not.

A valid loc is defined as being an /area, /turf, /obj or /mob. It can be thought of as being ifatom(), and works for any descendent of /atom, including user defined objects.

Usage:
ismob(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all provided arguments are /mobs; 0 if any are not.
Usage:
ismovable(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all provided arguments are valid movable atoms; 0 if any are not.

All children of /atom/movable pass this test, including user defined children, so is similar, but distinct to isobj(loc) || ismob(loc).

Arguments:
n: The number to test.
Returns:
num: 1 for a numeric NaN value; 0 if it is not.

For undefined maths operations, a NaN can be returned. A NaN is a special number that is never equal to, less than or greater than any other number, including NaN.

Arguments:
Val
Returns:
num: 1 if Val is null; 0 if is not.
Arguments:
Val
Returns:
num: 1 if Val is a number; 0 if is not.
Usage:
isobj(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all provided arguments are /objs; 0 if any are not.
/proc/ispath(Val, Type)
Usage:
ispath(Val)
ispath(Val, Type)
Val: A type path.
Type: A type path or instance.
Returns:
num:
If Type is provided: 1 if Val is a typepath derived from Type; 0 if it is not.
If Type is not provided, 1 if Val is a typepath; 0 if is not.
var/what_thing = /mob/player

if(ispath(what_thing))
    world.log << "it's a path..."

if(ispath(what_thing, /mob))
    world.log << "it's some kind of mob..."

if(ispath(what_thing, /mob/player))
    world.log << "it's a player!"
Arguments:
v: The variable to test
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.

A variable that can be saved is any variable that is not declared as /global, /const, or /tmp.

/datum/a
    var/tmp/foo = "aaa"
    var/bar = "bbb"

/proc/main()
    var/datum/a/thing = new

    world.log << issaved(thing.foo) // 0
    world.log << issaved(thing.bar) // 1
Arguments:
Val
Returns:
num: 1 if Val is a string; 0 if it is not.
Usage:
isturf(Loc1, Loc2, ...)
Loc1: Any number of objects to test.
Returns:
num: 1 if all the provided arguments are /turfs; 0 if any are not.
Usage:
istype(Val)
istype(Val, Type)
Val: An instantiated object
Type: A type or object. If this argument is not specified, it will use the inferred type of the first argument.
Returns:
num: 1 if Val is the same as, or a child type of, Type
var/atom/my_atom = new /obj(loc) // the variable is declared as an /atom, but we create an /obj
if(istype(my_atom))
    // this will not pass, as the inferred type is different from the actual type

if(istype(my_atom, /obj))
    // this will pass, as we are providing a second argument to test with, which matches the type

For testing paths, use ispath().

/proc/jointext(/list/List, Glue, Start, End)
Arguments:
List (/list)
Glue
Start = 1
End = 0
Returns:
text
Arguments:
JSON
/proc/json_encode(Value, flags)
Arguments:
Value
flags
Arguments:
E
Returns:
num
Arguments:
T
Returns:
num
Arguments:
url
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
Arguments:
List
Returns:
text
Arguments:
File
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
Arguments:
T
Returns:
text
/proc/matrix(a, b, c, d, e, f)
Arguments:
a
b
c
d
e
f
Arguments:
A
Returns:
null, text, num
Arguments:
T
Returns:
null, text
Arguments:
A
Returns:
null, text, num
/proc/missile(Type, Start, End)
Arguments:
Type
Start
End
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
Returns:
num
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/nonspantext(Haystack, Needles, Start)
Arguments:
Haystack
Needles
Start = 1
Returns:
num
/proc/nonspantext_char(Haystack, Needles, Start)
Arguments:
Haystack
Needles
Start = 1
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
Arguments:
N
A
B
Returns:
text
/proc/obounds(Ref, Dist)
Arguments:
Ref
Dist = 0
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/ohearers(Depth, Center)
Arguments:
Depth
Center
Returns:
/list
/proc/orange(Dist, Center)
Arguments:
Dist = 5
Center
Returns:
null, /list
/proc/oview(Dist, Center)
Arguments:
Dist = 5
Center
Returns:
/list
/proc/oviewers(Depth, Center)
Arguments:
Depth = 5
Center
Returns:
/list
Arguments:
Params
Returns:
/list
Arguments:
L
H
Returns:
num
Arguments:
Seed
Returns:
null
/proc/range(Dist, Center)
Arguments:
Dist
Center
Returns:
null, /list
/proc/ref(Object)
Arguments:
Object
Returns:
text
Arguments:
Object
Returns:
num
/proc/regex(pattern, flags)
Arguments:
pattern
flags
/proc/replacetext(Haystack, Needle, Replacement, Start, End)
Arguments:
Haystack
Needle
Replacement
Start = 1
End = 0
Returns:
null, text
/proc/replacetextEx(Haystack, Needle, Replacement, Start, End)
Arguments:
Haystack
Needle
Replacement
Start = 1
End = 0
Returns:
null, text
/proc/rgb(R, G, B, A, space)
Arguments:
R
G
B
A
space
Returns:
null, text
/proc/rgb2num(color, space)
Arguments:
color
space
Returns:
/list
/proc/roll(ndice, sides)
Arguments:
ndice = 1
sides
Returns:
num
Arguments:
A
B
Returns:
num
/proc/run(File)
Arguments:
File
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/sha1(input)
Arguments:
input
Returns:
null, text
/proc/shell(command)
Arguments:
command
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/shutdown(Addr, Natural)
Arguments:
Addr
Natural = 0
Arguments:
Delay
Arguments:
T1
T2
Returns:
num
Arguments:
T1
T2
Returns:
num
/proc/sound(file, repeat, wait, channel, volume)
Arguments:
file
repeat = 0
wait
channel
volume
/proc/spantext(Haystack, Needles, Start)
Arguments:
Haystack
Needles
Start = 1
Returns:
num
/proc/splicetext(Text, Start, End, Insert)
Arguments:
Text
Start = 1
End = 0
Insert
Returns:
null, text
/proc/splittext(Text, Delimiter)
Arguments:
Text
Delimiter
Returns:
/list
/proc/stat(Name, Value)
Arguments:
Name
Value
/proc/statpanel(Panel, Name, Value)
Arguments:
Panel
Name
Value
/proc/step(/atom/movable/Ref, Dir, Speed)
Arguments:
Ref (/atom/movable): The thing to be moved.
Dir: The direction to attempt to move it in, must be one of the 8 valid directions (NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST).
Speed = 0: The speed to move, in pixels.
Unimplemented 🏗️
Returns:
num: Returns 1 on success (successfully moved) and 0 on failure (was blocked by something).

Moves Ref in direction Dir, respecting collision defined by /atom/var/density and /atom/proc/Cross().

/proc/step_away(/atom/movable/Ref, /atom/Trg, Max, Speed)
Arguments:
Trg (/atom)
Max = 5
Speed = 0
Returns:
num
Arguments:
Speed = 0
/proc/step_to(/atom/movable/Ref, /atom/Trg, Min, Speed)
Arguments:
Trg (/atom)
Min = 0
Speed = 0
Returns:
num
Arguments:
Trg (/atom)
Speed
Returns:
num
Arguments:
T
pos = 1
Returns:
text
/proc/text2file(Text, File)
Arguments:
Text
File
/proc/text2num(T, radix)
Arguments:
T
radix = 10
Returns:
null, num
Arguments:
T
/proc/time2text(timestamp, format)
Arguments:
timestamp
format
Returns:
text
Arguments:
Text
Returns:
null, text
Arguments:
n
Returns:
num
/proc/turn(Dir, Angle)
Arguments:
Dir
Angle
Arguments:
Item1
Returns:
/list
Arguments:
T
Returns:
text
Arguments:
UrlText
Returns:
text
/proc/url_encode(PlainText, format)
Arguments:
PlainText
format = 0
Returns:
text
/proc/view(Dist, Center)
Arguments:
Dist = 5
Center
Returns:
/list
/proc/viewers(Depth, Center)
Arguments:
Depth
Center
Returns:
/list
/proc/walk(Ref, Dir, Lag, Speed)
Arguments:
Ref
Dir
Lag = 0
Speed = 0
/proc/walk_away(Ref, Trg, Max, Lag, Speed)
Arguments:
Ref
Trg
Max = 5
Lag = 0
Speed = 0
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/walk_rand(Ref, Lag, Speed)
Arguments:
Ref
Lag = 0
Speed = 0
/proc/walk_to(Ref, Trg, Min, Lag, Speed)
Arguments:
Ref
Trg
Min = 0
Lag = 0
Speed = 0
Unimplemented 🏗️
In the OpenDream implementation of DreamMaker, this proc is marked as unimplemented.
/proc/walk_towards(Ref, Trg, Lag, Speed)
Arguments:
Ref
Trg
Lag = 0
Speed = 0
/proc/winclone(player, window_name, clone_name)
Arguments:
player
window_name
clone_name
/proc/winexists(player, control_id)
Arguments:
player
control_id
Returns:
text
/proc/winget(player, control_id, params)
Arguments:
player
control_id
params
/proc/winset(player, control_id, params)
Arguments:
player
control_id
params
/proc/winshow(player, window, show)
Arguments:
player
window
show = 1