Test

by Super Saiyan X
ID:676227
 
.configure //commands for dream seeker
delay #
sound on/off
last-url //no idea, if you type just .configure, it'll show this as the last world you visited
query-files on/off
query-links on/off
echo-commands on/off
graphics-hwmode on/off
debug on/off
.hub //pager commands(you can also type JUST $ for this)
add-ban
add-friend
add-game
list-friends
list-games
ping
remove-ban
remove-friend
remove-game
resume
write
.debug //debug stuff lul
profile
reboot
resume
status
trace-client
.key //changing keys during run time(you can also type JUST @ for this)
//all your keys from your keys.txt file
create-key
download-key
resume
roving-key
.script // run a script file to define command aliases
.quit
.logout //disconnect without closing the window
.reconnect
.url //connect to another world in the same window by typing .url byond://bleh:bleh
.winset "[control.param=value;...]" // Sets parameters in response to a menu or button command (or a manually typed command). You can set more than one by separating them with semicolons.
.options // Shows the Options and Messages box.
.reboot // Reboots the world.
.host // Opens hosting options box.
.profile // Profiles the running time of procs.
.screenshot // Saves a screenshot of the map.
.screenshot auto // Saves a screenshot of the map, but does not prompt for a filename. The file will be saved in the client's user directory in BYOND/screenshots.
.command // Prompts the user to enter a command, which can be one of these commands as well.
.resume
.prompt
.ping

//movement
.center .southwest .southeast .northwest .northeast .west .east .south .north .walk

//mouse functions
.mouse-over .mouse-drag .mouse-drop .mouse-down .mouse-up .dblclick .click

If you get stuck, as in unable to use a command bar after doing any of these just type resume (or $/@resume) and it'll work.

Some games will allow you to press space, to auto complete and see the list of commands and stuffs
they all have some extra parameters and stuffs, but they're not all documented, and the BYOND staff says they're so old they don't give a flying poo about them. Most of them are documented inside of the byondcore.dll, however they the descriptions of them, and the defining of the commands aren't in any real order.

!OTHER FANCY STUFF ALSO RELATED TO THE ABOVE!
Pre-defined topic calls? This is an example, of one.
You can do byond://?debug=status which is what .debug status calls. Through this, you get a list of client connections, and the time the server has been running, I also think there's other things that show up, but there have to be specific requirements. When you click the links, they are also topic calls...we're able to mimic them like in this example:
    Click(o)
world << "<a href=byond://?\ref[url_encode(o)]_debug>[o]</a>"


You may also emulate the debug profiler in the same way, these commands make the profiler open in the default browser. You CAN disable these commands even if you have debug on by overwriting the "debug" topic data or whatever and not calling ..() in client/Topic


byond://?debug=profile
byond://?debug=profile;avg=0 or byond://?debug=profile;avg=1
byond://?debug=profile;switch=on or byond://?debug=profile;switch=off
byond://?debug=profile;clear=1
byond://?debug=profile;clear=1;avg=1 and so on



and the latest stddef.dm

var/const
NORTH = 1
SOUTH = 2
EAST = 4
WEST = 8
NORTHEAST = 5
NORTHWEST = 9
SOUTHEAST = 6
SOUTHWEST = 10
UP = 16
DOWN = 32
var/const
BLIND = 1
SEE_MOBS = 4
SEE_OBJS = 8
SEE_TURFS = 16
SEE_SELF = 32
SEE_INFRA = 64
SEE_PIXELS = 256
#define SEEINVIS 2
#define SEEMOBS 4
#define SEEOBJS 8
#define SEETURFS 16
var/const
MOB_PERSPECTIVE = 0
EYE_PERSPECTIVE = 1
EDGE_PERSPECTIVE = 2
var/const
FLOAT_LAYER = -1
AREA_LAYER = 1
TURF_LAYER = 2
OBJ_LAYER = 3
MOB_LAYER = 4
FLY_LAYER = 5
EFFECTS_LAYER = 5000
TOPDOWN_LAYER = 10000
BACKGROUND_LAYER = 20000
var/const
TOPDOWN_MAP = 0
ISOMETRIC_MAP = 1
SIDE_MAP = 2
TILED_ICON_MAP = 32768
#define NO_STEPS 0
#define FORWARD_STEPS 1
#define SLIDE_STEPS 2
#define SYNC_STEPS 3
var/const
TRUE = 1
FALSE = 0
var/const
MALE = "male"
FEMALE = "female"
NEUTER = "neuter"
PLURAL = "plural"
var/const
MOUSE_INACTIVE_POINTER = 0
MOUSE_ACTIVE_POINTER = 1
MOUSE_DRAG_POINTER = 3
MOUSE_DROP_POINTER = 4
MOUSE_ARROW_POINTER = 5
MOUSE_CROSSHAIRS_POINTER = 6
MOUSE_HAND_POINTER = 7
var/const
MOUSE_LEFT_BUTTON = 1
MOUSE_RIGHT_BUTTON = 2
MOUSE_MIDDLE_BUTTON = 4
MOUSE_CTRL_KEY = 8
MOUSE_SHIFT_KEY = 16
MOUSE_ALT_KEY = 32
#define CONTROL_FREAK_ALL 1
#define CONTROL_FREAK_SKIN 2
#define CONTROL_FREAK_MACROS 4
var/const
MS_WINDOWS = "MS Windows"
UNIX = "UNIX"
#define ASSERT(c) if(!(c)) {CRASH("[__FILE__]:[__LINE__]:Assertion Failed: [#c]"); }
#define _DM_datum 0x001
#define _DM_atom 0x002
#define _DM_movable 0x004
#define _DM_sound 0x020
#define _DM_Icon 0x100
#define _DM_RscFile 0x200
var/const
SOUND_MUTE = 1
SOUND_PAUSED = 2
SOUND_STREAM = 4
SOUND_UPDATE = 16
sound
var
file
repeat
wait
channel
frequency = 0
pan = 0
volume = 100
priority = 0
status = 0
environment = -1
echo
x = 0; y = 0; z = 0
falloff = 1
_dm_interface = _DM_datum|_DM_sound|_DM_RscFile
New(file,repeat,wait,channel,volume=100)
src.file = fcopy_rsc(file)
src.repeat = repeat
src.wait = wait
src.channel = channel
src.volume = volume
return ..()
proc
RscFile()
return file
#define ICON_ADD 0
#define ICON_SUBTRACT 1
#define ICON_MULTIPLY 2
#define ICON_OVERLAY 3
#define ICON_AND 4
#define ICON_OR 5
#define ICON_UNDERLAY 6
icon
_dm_interface = _DM_datum|_DM_Icon|_DM_RscFile
var/icon
New(icon,icon_state,dir,frame,moving)
src.icon = _dm_new_icon(icon,icon_state,dir,frame,moving)
proc
Icon()
return icon
RscFile()
return fcopy_rsc(icon)
IconStates(mode=0)
return icon_states(icon,mode)
Turn(angle,antialias)
if(antialias) _dm_turn_icon(icon,angle,1)
else _dm_turn_icon(icon,angle)
Flip(dir)
_dm_flip_icon(icon,dir)
Shift(dir,offset,wrap)
_dm_shift_icon(icon,dir,offset,wrap)
SetIntensity(r,g=-1,b=-1)
_dm_icon_intensity(icon,r,g,b)
Blend(icon,f,x=1,y=1)
_dm_icon_blend(src.icon,icon,f,x,y)
SwapColor(o,n)
_dm_icon_swap_color(icon,o,n)
DrawBox(c,x1,y1,x2,y2)
_dm_icon_draw_box(icon,c,x1,y1,x2,y2)
Insert(new_icon,icon_state,dir,frame,moving,delay)
_dm_icon_insert(icon,new_icon,icon_state,dir,frame,moving,delay)
MapColors(a,b,c,d,e,f,g,h,i,j=0,k=0,l=0)
if(istext(a))
if(!e) _dm_icon_map_colors(icon,a,b,c,d)
else _dm_icon_map_colors(icon,a,b,c,d,e)
else if(args.len <= 12) _dm_icon_map_colors(icon,a,b,c,d,e,f,g,h,i,j,k,l)
else _dm_icon_map_colors(icon,a,b,c,d,e,f,g,h,i,j,k,l,args[13],args[14],args[15],args[16],args[17],args[18],args[19],args[20])
Scale(x,y)
_dm_icon_scale(icon,x,y)
Crop(x1,y1,x2,y2)
_dm_icon_crop(icon,x1,y1,x2,y2)
GetPixel(x,y,icon_state,dir,frame,moving)
return _dm_icon_getpixel(icon,x,y,icon_state,dir,frame,moving)
Width()
return _dm_icon_size(icon,1)
Height()
return _dm_icon_size(icon,2)
filedata

source Hiead wrote:
In ID:329010, Shadowdarke stated:
Icons become data like this when you save them as text:
filedata("name=px.dmi;length=41;crc32=0x75a5bbbc;encoding=base64",{" BERNSQECAMDAwAAAAAEAAQABAAEAAAAAAAAAAAYA////4wEfEAIABAA= "})

He further stated that you could use that to get info from icons, and was supported with a statement by Lummox JR.

What exactly would you do to access the stated information at runtime with BYOND, and how would you access the individual arguments of the filedata() proc?

[Edit]
Problem Solved! Here's what I did:
    var/savefile/S = new
> S["icon"] << file("test.dmi")
> var/text = S.ExportText("icon")

Hiead

more:
crc32
In response to Super Saiyan X
source Hiead wrote:
[Edit]
Problem Solved! Here's what I did:
    var/savefile/S = new
> > S["icon"] << file("test.dmi")
> > var/text = S.ExportText("icon")


For reference purposes, this can be simplified as such:
var/savefile/S = new
S << f
var/fdata = S.ExportText()

For example:
mob
icon = 'test.dmi'
verb/foo()
var/savefile/S = new
S << icon
usr << S.ExportText()
mob/verb
join()
src << link("a key here")

mailto()
src << link("mailto:user@domain.com") //MAIL TO
file_test()
src << link("file://Test.dmb")
// winset(src, null, "command=\".url seeker://Test.dmb\"")
//.url seeker://Test.dmb

seeker_test(t as text) //commands replaced by pager://, which now only work in the pager.
src << link("seeker://[t]")

dung_test() //same functionality as byond://
src << link("dung://user.hub")
dung_test_topic()
src << link("dung://?poop")

hardware_mode_on() //all config commands work now too?
winset(src, null, "command=\".configure graphics-hwmode on\"")
hardware_mode_off()
winset(src, null, "command=\".configure graphics-hwmode off\"")

relog_topic()
src << link("file://test.dmb?poop")
    num_check(n as num)
switch(n)
if(-1.#INF to -6)
world << "less than -6"
if(-5 to -1)
world << "less than 0, greater than -5"
if(0)
world << "equal to 0"
if(1 to 5)
world << "greater than 0, less than 5"
if(6 to 1.#INF)
world << "greater than 6"
^ the undocumentedness of this, is that 1.#INF is not really...documented as a possible statement.
In your BYONDuserDirectory/cfg folder, there is a file called pager.txt, this is where all of your pager settings and such are saved.
There is an undocumented flag, which will turn your pager into a new pager Tom and Lummox tried to introduce, it used an embedded browser, with html pages replacing the old pager.[1][2] The pages are now removed, and can't be accessed, but if you want to see what it could have look like, the flag is:
new-style on
Undocumented macro foo:

// You can use #_var_ to replace a variable with
// a text string of the literal token that was
// passed to it.

// In the example below, I'm taking the numbers
// passed into the macros and converting them
// to text so I can use them to build a text
// string for world/icon_size and world/view

// See ASSERT() above for a second example.

#define define_icon_size(_w_,_h_) \
world/icon_size=#_w_+"x"+#_h_;\
var/const/WORLD_ICON_WIDTH=_w_;\
var/const/WORLD_ICON_HEIGHT=_h_;


#define define_world_view(_w_,_h_) \
world/view=#_w_+"x"+#_h_;\
var/const/WORLD_VIEW_WIDTH=_w_;\
var/const/WORLD_VIEW_HEIGHT=_h_;


define_icon_size(32,64)
define_world_view(17,13)

var/icon_center_x = (WORLD_ICON_WIDTH+1) * 0.5
var/icon_center_y = (WORLD_ICON_HEIGHT+1) * 0.5

var/view_center_x = (WORLD_VIEW_WIDTH-1) * 0.5 + 1
var/view_center_y = (WORLD_VIEW_HEIGHT-1) * 0.5 + 1


// You can also combine macro tokens using a backslash (\)
// Here, I use it to build a simple type path from two tokens

#define CREATE_PATH(_a_,_b_) _a_\_whyhellothere_\_b_

TestDatum
// Defines /TestDatum/Aloha_whyhellothere_Ahoy
CREATE_PATH(Aloha, Ahoy)





In response to LordAndrew
Another item of note is 1.#IND.
1.#IND compiles, but it doesn't act as inf, or -inf. What's up with that?!?!!?
test
In response to Super Saiyan X
Super Saiyan X wrote:
test

hi