// standard menu definitions // don't modify, add personal menus to autoexec.cfg instead bind ESCAPE [if (cleargui 1) [] [showgui main]] // it all starts here newgui main [ guibutton "load map.." "showgui maps" guibutton "singleplayer.." "showgui singleplayer" guibutton "multiplayer.." "showgui multiplayer" guibutton "editing.." "showgui editing" guibutton "options.." "showgui options" guibutton "about.." "showgui about" guibutton "quit" "quit" "exit" ] newgui about [ guitext "Sauerbraten engine" guitext "by Wouter van Oortmerssen" guitext "with contributions from Eihrul, Gilt and others" guitext "(for a full list of contributors see the readme)" guitext "http://sauerbraten.org/" ] maprotation = [ n = (listlen $arg1) loop i $n [ curmap = (at $arg1 $i) next = (mod (+ $i 1) $n) nextmap = (at $arg1 $next) (if (= $numargs 2) [concatword nextmap_ $arg2 $curmap] [concatword nextmap_ $curmap]) = $nextmap ] ] genmapitems = [ n = (listlen $arg1) loop i $n [ curmap = (at $arg1 $i) aliasname = (concatword bestscore_ $curmap) title = (if (= (getalias $aliasname) 0) [ result $curmap ] [ concatword $curmap " (best score: " (getalias $aliasname) ")" ]) guibutton $title (concat map $curmap) "sauer" ] ] mainmaps = "metl4 deathtek fanatic_quake aard3c metl2 ruby curvedm metl3 nmp8_d complex douze killfactory lostinspace oasis aqueducts thor" moremaps1 = "academy tartech orbe corruption hades paradigm island roughinery shadowed DM_BS1 shindou stemple chronos moonlite darkdeath thetowers" moremaps2 = "kmap5 fanatic_castle_trap nmp10 neonpanic orion katrez_d serpentine aard3b ksauer1 fanatic_complexities q1dm4 phosgene pgdm mechanic battleofthenile oddworld" oldmaps1 = "chthon wdcd jungle yesterday neon drianmp4 aard3 boo2 id nmp7 vootdm1 vootdm2 vootdm3 space nod ogromines" oldmaps2 = "skycastle ladder spiralz secondevermap firstevermap" capturemaps = "river_c paradigm fb_capture urban_c serenity nevil_c lostinspace face-capture nmp9 c_valley nmp4 nmp8_c ph-capture corruption hades" rpgmaps = "k_rpg1 demomap rpg_01 village rpg" maprotation $mainmaps maprotation $moremaps1 maprotation $moremaps2 maprotation $oldmaps1 maprotation $oldmaps2 maprotation $capturemaps capture_ maprotation $rpgmaps alias showmapshot [ guibar; guiimage (concatword "packages/base/" (at $guirollovername 0) ".jpg") $guirolloveraction 4 1 ] newgui maps [ guilist [ guilist [ genmapitems $mainmaps ] showmapshot ] guitab more guilist [ guilist [ genmapitems $moremaps1 ] guilist [ genmapitems $moremaps2 ] showmapshot ] guitab old guilist [ guilist [ genmapitems $oldmaps1 ] guilist [ genmapitems $oldmaps2 ] showmapshot ] guitab capture guilist [ guilist [ genmapitems $capturemaps ] showmapshot ] guitab rpg_test guilist [ guilist [ genmapitems $rpgmaps ] showmapshot ] ] newgui capturemaps [ genmapitems $capturemaps ] spmaps = "vr ogrowaystation frozenbase orgosville theancientstone sp3 sp2 stsp1 n_sp1 n_sp2 door_demo" ep1maps = "base/sp_maps/sauer_sp1-1 base/sp_maps/sauer_sp1-2 base/sp_maps/sauer_sp1-3 base/sp_maps/sauer_sp1-4 base/sp_maps/sauer_sp1-5 base/sp_maps/sauer_sp1-6 base/base/sp_maps/sauer_sp1-7 base/base/sp_maps/sauer_sp1-8" maprotation $spmaps maprotation $ep1maps newgui spmaps [ guilist [ guilist [ genmapitems $spmaps ] showmapshot ] ] newgui singleplayer [ guibutton "Start An Army Of One" "mode -2; showgui armyofone" guibutton "Start Four Bases" "mode -2; showgui fourbases" guibutton "start SP map.." "mode -2; showgui spmaps" guibutton "start DMSP map.." "mode -1; showgui maps" guitext "skill (default: 3)" guislider skill ] newgui armyofone [ guilist [ guilist [ guibutton "mpsp6a" "sp mpsp6a" "sauer" guibutton "mpsp6b" "sp mpsp6b" "sauer" guibutton "mpsp6c" "sp mpsp6c" "sauer" ] showmapshot ] ] newgui fourbases [ guilist [ guilist [ guitext "Ithaqua's Depot" guibutton "4b1" "sp 4b1" "sauer" guitext "Defense Quarters" guibutton "4b2" "sp 4b2" "sauer" guitext "Distraction" guibutton "4b3" "sp 4b3" "sauer" guitext "Escher Space" guibutton "4b4" "sp 4b4" "sauer" ] showmapshot ] ] newgui multiplayer [ guilist [ guitext "name: " player guifield newname 15 [name $newname] [newname = (getname)] ] guibutton "server browser.." "showgui servers" guibutton "update server list from master server" "updatefrommaster; showgui servers" guibutton "vote game mode / map.." "showgui gamemode" guibutton "lanconnect" guibutton "connect localhost" guibutton "disconnect" guibutton "team good" guibutton "team evil" ] newgui servers [ guiservers ] newgui gamemode [ guibutton "ffa/default" "mode 0; showgui maps" guibutton "coop edit" "mode 1; showgui maps" guibutton "ffa/duel" "mode 2; showgui maps" guibutton "teamplay" "mode 3; showgui maps" guibutton "instagib" "mode 4; showgui maps" guibutton "instagib team" "mode 5; showgui maps" guibutton "efficiency" "mode 6; showgui maps" guibutton "efficiency team" "mode 7; showgui maps" guibutton "insta arena" "mode 8; showgui maps" guibutton "insta clan arena" "mode 9; showgui maps" guibutton "tactics arena" "mode 10; showgui maps" guibutton "tactics clan arena" "mode 11; showgui maps" guibutton "capture" "mode 12; showgui capturemaps" guibutton "insta capture" "mode 13; showgui capturemaps" ] newmapsize = 12 newgui editing [ guibutton "materials.." "showgui materials" guibutton "toggle edit mode (key E)" "edittoggle" guibutton "deselect (key SPACE)" "cancelsel" guibutton "passthrough (hold ALT)" "passthrough" guibutton "select drag left mouse " "" guibutton "select corners drag middle mouse " "" guibutton "extend selection right mouse" "" guibutton "reorient right mouse" "" guibutton "move selection drag right mouse" "" guibutton "copy (key C)" "copy" guibutton "paste (key V)" "paste" guitab ents guilist [ guilist [ guibutton "drop entities.." "showgui dropent" guibutton "mapmodels.." "showgui mapmodels" guibutton "light.." "resetlight;showgui newlight" guibutton "newent playerstart " guibutton "newent shells" guibutton "newent bullets" guibutton "newent rockets" guibutton "newent riflerounds" guibutton "newent grenades" ] guilist [ guibutton "teleport.." "showgui newteleport" guibutton "monster.." "showgui monsters" guibutton "trigger.." "showgui triggers" guibutton "newent cartridges" guibutton "newent health" guibutton "newent healthboost" guibutton "newent greenarmour" guibutton "newent yellowarmour" guibutton "newent quaddamage" ] ] guitab keys guibutton "flip / mirror cube (key X)" "flip" guibutton "undo (key Z, U)" "undo" guibutton "redo (key I)" "redo" guibutton "delete (BACKSPACE)" "editdel" guibutton "heightmap mode (key H)" "getheightmap" guibutton "smoothmap (key H in heightmap mode)" "smoothmap" guibutton "edit entity gui (TAB)" "showentgui" guibutton "select all in box (N)" "entselect insel" guibutton "select all matching (M)" "selentfindall" guibutton "center view on ent (COMMA + scroll)" "entautoview" guibutton "edit entity console (PERIOD)" "selentedit" guitab scroll guitext "push/pull selection scroll wheel only" guitext "push the face of a cube hold F + scroll wheel" guitext "change gridsize hold G + scroll wheel" guitext "change textures hold Y + scroll wheel" guitext "rotate hold R + scroll wheel" guitext "push corner with cursor hold Q + scroll wheel" guitext "push/pull heightmap scroll wheel only" guitext "change heightmap brush hold B + scroll wheel" guicheckbox "toggle outline (key 7)" outline guicheckbox "toggle wireframe (key 8)" wireframe guitab light guibutton "recompute lights (SLOW: 8xAA, alpha-masked model shadows)" "calclight 3" guibutton "recompute lights (SLOW: 8xAA, model shadows)" "calclight 2" guibutton "recompute lights (slow: 8xAA)" "calclight 1" guibutton "recompute lights (default: 4xAA)" "calclight 0" guibutton "recompute lights (quick: 2xAA)" "calclight -1" guibutton "recompute lights (FAST: no AA, no shadows)" "calclight -2" guibutton "patch lighting" "patchlight" guicheckbox "fullbright" fullbright guitext "lightprecision (default: 32)" guislider lightprecision guitext "lighterror (default: 8)" guislider lighterror //guibutton "lightlod high (6)" "lightlod 6" //guibutton "lightlod low (2)" "lightlod 2" //guibutton "lightlod off (0)" "lightlod 0" guitab mapop guibutton "save temp map" "savemap temp" guibutton "load temp map" "map temp" guibutton "newmap (default size: 12)" "newmap $newmapsize" guislider "newmapsize" 10 16 guibutton "increase mapsize (2x)" "mapenlarge" guitext "max undo size (default: 5 MB)" guislider "undomegs" 1 10 guibutton "optimize geometry" "remip" guibutton "set map title/author" "saycommand [/mapmsg ]" ] newgui materials [ guibutton "air" "editmat air" guibutton "water" "editmat water" guibutton "lava" "editmat lava" guibutton "clip" "editmat clip" guibutton "glass" "editmat glass" guibutton "noclip" "editmat noclip" guicheckbox "show material volumes" showmat //guibutton "waterlod very high (3)" "waterlod 3" //guibutton "waterlod high (2)" "waterlod 2" //guibutton "waterlod default (1)" "waterlod 1" //guibutton "waterlod low (0)" "waterlod 0" //guibutton "watersubdiv very fine (0)" "watersubdiv 0" //guibutton "watersubdiv fine (1)" "watersubdiv 1" //guibutton "watersubdiv default (2)" "watersubdiv 2" //guibutton "watersubdiv coarse (3)" "watersubdiv 3" //guibutton "water waves on" "waterwaves 1" //guibutton "water waves off" "waterwaves 0" ] setting_entediting = 1 newgui dropent [ guitext "drop entities:" guiradio "to the floor" entdrop 1 guiradio "on selection" entdrop 2 guiradio "to the floor at selection" entdrop 3 guiradio "at current position" entdrop 0 guibar guicheckbox "entity snap-to-grid" entselsnap guicheckbox "entity selection" setting_entediting 1 0 [ entediting $setting_entediting ] ] newgui triggers [ guibutton [invisible] [BTmm = -1; showgui trigger2] guibutton [a carrot] [BTmm = 23; showgui trigger2] guibutton [switch #1] [BTmm = 24; showgui trigger2] guibutton [switch #2] [BTmm = 25; showgui trigger2] guibutton [door #1] [BTmm = 26; showgui trigger2] guibutton [door #2] [BTmm = 27; showgui trigger2] guibutton [door #3] [BTmm = 28; showgui trigger2] ] newgui trigger2 [ guibutton [animation loop] [BTtt = 0; showgui trigger3] guibutton [trigger once (popback)] [BTtt = 1; showgui trigger3] guibutton [trigger once (popback & rumble)] [BTtt = 2; showgui trigger3] guibutton [trigger once] [BTtt = 3; showgui trigger3] guibutton [trigger once (rumble)] [BTtt = 4; showgui trigger3] guibutton [trigger multiple (popback)] [BTtt = 5; showgui trigger3] guibutton [trigger multiple (popback & rumble)] [BTtt = 6; showgui trigger3] guibutton [trigger multiple] [BTtt = 7; showgui trigger3] guibutton [trigger multiple (rumble)] [BTtt = 8; showgui trigger3] guibutton [door (open once)] [BTtt = 9; showgui trigger3] guibutton [door (auto close)] [BTtt = 10; showgui trigger3] guibutton [door (locked)] [BTtt = 11; showgui trigger3] guibutton [vanishing trigger] [BTtt = 12; showgui trigger3] guibutton [vanishing trigger (rumble)] [BTtt = 13; showgui trigger3] guibutton [End Of Level Trigger] [BTtt = 29; showgui trigger3] ] build_trigger = [newent mapmodel $BTmm $BTtt $BTti] newgui trigger3 [ loop i 9 [ tjt = (concat tag (concatword # $i)) tjc = (concat BTti "=" $i ";" "build_trigger") guibutton $tjt $tjc ] ] resetlight = [ lightcolour = 0 lightrgb = "255 255 255" lightbright = 1 lightradius = 128 ] lightcmd = [ lightr = (at $lightrgb 0) lightg = (at $lightrgb 1) lightb = (at $lightrgb 2) if (= $lightbright 0) [ if (strcmp $lightrgb "255 255 255") [ lightr = 192; lightg = 192; lightb = 192 ] [ lightr = (div $lightr 2); lightg = (div $lightg 2); lightb = (div $lightb 2) ] ] result (concat newent light $lightradius $lightr $lightg $lightb) ] newgui newlight [ guibutton "sunlight" "newent light 0 255 200 100" guibutton (lightcmd) guibar guicheckbox "bright" lightbright guitext "color:" guiradio "white" lightcolour 0 [lightrgb = "255 255 255"] guiradio "blue" lightcolour 1 [lightrgb = "192 192 255"] guiradio "red" lightcolour 2 [lightrgb = "255 192 192"] guiradio "green" lightcolour 3 [lightrgb = "192 255 192"] guiradio "yellow" lightcolour 4 [lightrgb = "255 255 192"] guiradio "purple" lightcolour 5 [lightrgb = "255 192 255"] guiradio "turquoise" lightcolour 6 [lightrgb = "192 255 255"] guitext "radius:" guislider lightradius 0 512 ] newgui newteleport [ guibutton "newent teleport 1" guibutton "newent teledest 1" guibutton "newent teleport 2" guibutton "newent teledest 2" guibutton "newent teleport 3" guibutton "newent teledest 3" guibutton "newent teleport 4" guibutton "newent teledest 4" ] mapmodellist = [ "tree1" "dcp/tree2" "dcp/tree3" "dcp/palmtree" "dcp/thorns" "dcp/plant1" "dcp/grass" "dcp/ivy" "dcp/barrel" "dcp/streetlamp" "dcp/bench" "dcp/pillar" "dcp/waterbowl" "dcp/jumppad2" "dcp/leafs" "dcp/valve" "dcp/palette" "dcp/vent" "dcp/mushroom" "dcp/biotank" "dcp/groundlamp" "dcp/console" "dcp/turret" "carrot" "switch1" "switch2" "doors/door_01" "doors/door_02" "doors/door_03" "dcp/cask" "dcp/cart" "dcp/candle" "dcp/vase" "dcp/sack" "dcp/chandelier" "dcp/chest" "dcp/firebowl" "dcp/smplant" "dcp/insect" "dcp/reed" "makke/nocamp" "makke/strahler" "tentus/food-drink/goblet" "tentus/food-drink/apple" "tentus/food-drink/pear" "tentus/food-drink/appleslice" "tentus/food-drink/meat" "tentus/food-drink/bowl" "tentus/food-drink/pieslice" "tentus/food-drink/mug" "tentus/food-drink/winebottle" "tentus/food-drink/pie" "tentus/books/flat" "tentus/books/multi" "tentus/chains/chain" "tentus/chains/curvechain" "tentus/barrel" "tentus/sidebarrel" "tentus/pot1" "tentus/rope" "tentus/ropelamp" "tentus/ladder" "tentus/fattree" "tentus/moneybag" "tentus/woodbench" "tentus/hammer" "tentus/anvil" "tentus/spear" "tentus/key" "tentus/redshield" "tentus/greenshield" "tentus/bombs" "objects/window01" "objects/sign01" "objects/lamp01" "objects/chair01" "objects/bed01" "vegetation/tree00" "vegetation/tree01" "vegetation/bush01" "vegetation/tree02" "vegetation/tree04" "vegetation/tree05" "vegetation/tree06" "vegetation/tree07" "vegetation/tree03" "objects/window02/window02_1" "objects/window02/window02_2" "objects/bench01" "objects/lantern01" "objects/lantern02" "objects/woodchop" "objects/table01" "objects/torch" "objects/torch_cold" "objects/fire" "objects/sail01" "objects/well_base" "objects/well_roof" "objects/lamp02" "objects/med_chand"] newgui mapmodels [ loop i (listlen $mapmodellist) [ cmd = (concat newent mapmodel $i) guibutton (at $mapmodellist $i) $cmd ] ] newgui monsters [ guibutton "ogro / fireball" "newent monster 0" guibutton "rhino / chaingun" "newent monster 1" guibutton "ratamahatta / shotgun" "newent monster 2" guibutton "slith / rifle" "newent monster 3" guibutton "bauul / RL" "newent monster 4" guibutton "hellpig / bite" "newent monster 5" guibutton "knight / iceball" "newent monster 6" guibutton "goblin / slimeball" "newent monster 7" ] newgui options [ guitext "(basic keybinds, for anything" guitext "more use the 'bind' command)" guitext "select action to bind:" guilistsplit 2 $actions [ guibutton $n (concat menubind $n) ] guitab "shaders" guicheckbox "shaders" shaders guitext "shader detail (default: 3)" guislider shaderdetail guicheckbox "glass reflection" glassenv guicheckbox "water refraction" waterrefract guicheckbox "water reflection" waterreflect guicheckbox "caustics" caustics guicheckbox "grass" grass guicheckbox "dynamic lights" maxdynlights 5 0 guicheckbox "dynamic shadows" dynshadow 60 0 guicheckbox "model lighting" lightmodels guicheckbox "model reflection" envmapmodels guicheckbox "model glow" glowmodels guicheckbox "water vertex animation" vertwater guitab "display" guicheckbox "v-sync" vsync 1 0 guicheckbox "fullscreen" fullscreen guitext "gamma (default: 100)" guislider gamma guitext "fullscreen anti-aliasing (default: 0)" guilistslider fsaa "0 2 4 8 16" guitext "color depth (default: 0)" guilistslider colorbits "0 8 16 24 32" guitext "z-buffer depth (default: 0)" guilistslider depthbits "0 8 16 24 32" guitext "stencil bits (default: 1)" guislider stencilbits guicheckbox "hardware mipmaps" hwmipmap guitab "res" guilist [ guilist [ guibutton "320x240" "screenres 320 240" guibutton "640x480" "screenres 640 480" guibutton "800x600" "screenres 800 600" guibutton "1024x768" "screenres 1024 768" guibutton "1152x768" "screenres 1152 768" guibutton "1200x960" "screenres 1200 960" ] guilist [ guibutton "1280x800" "screenres 1280 800" guibutton "1280x1024" "screenres 1280 1024" guibutton "1440x900" "screenres 1440 900" guibutton "1600x1200" "screenres 1600 1200" guibutton "1680x1050" "screenres 1680 1050" guibutton "1920x1200" "screenres 1920 1200" ] ] guitab "sound" guitext "sound volume" guislider soundvol guitext "music volume" guislider musicvol guitext "sound channels" guislider soundchans guitext "sound frequency" guilistslider soundfreq "11025 22050 44100" guitext "sound buffer length" guislider soundbufferlen guitab "fx" guibutton "(effect OFF)" "setfullscreenshader" guibutton "bloom (subtle: 80)" "setfullscreenshader bloom 80" guibutton "bloom (bright: 140)" "setfullscreenshader bloom 140" guibutton "bloom (intense: 200)" "setfullscreenshader bloom 200" guibutton "sobel" "setfullscreenshader sobel" guibutton "invert" "setfullscreenshader invert" guibutton "gbr" "setfullscreenshader gbr" guibutton "bw" "setfullscreenshader bw" guitab "misc" guicheckbox "2D user interface" gui2d guicheckbox "invert mouse" invmouse guicheckbox "hudguns" hudgun guicheckbox "blood" blood guicheckbox "ogro" ogro guicheckbox "always use team skins" teamskins guicheckbox "outline meters" outlinemeters guicheckbox "particle text" particletext guicheckbox "crosshair effects" crosshairfx guicheckbox "hudgun sway" hudgunsway guibutton "Restore Defaults" "exec data/defaults.cfg" ] actions = [forward backward left right jump attack "saycommand " "universaldelta 1" "universaldelta -1" edittoggle "weapon 1" "weapon 2" "weapon 3" "weapon 4"] menubind = [ tobind = $arg1; showgui binditto ] bindit = [ bind $arg1 $tobind ] keys = "MOUSE1 MOUSE2 MOUSE3 MOUSE4 MOUSE5 SPACE LCTRL RCTRL ALT TAB ESCAPE BACKQUOTE SHIFT BACKSPACE ENTER INSERT DELETE HOME END PAGEUP PAGEDOWN A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9 0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12" newgui binditto [ guilistsplit 4 $keys [ guibutton $n (concat bindit $n) ] ] entupdate = [ entset $tmpt $tmp0 $tmp1 $tmp2 $tmp3 ] initentgui = [ tmpt = ( et ) tmp0 = ( ea 0 ) tmp1 = ( ea 1 ) tmp2 = ( ea 2 ) tmp3 = ( ea 3 ) ] genentattributes = [ entattributes = "" n = ( listlen $arg2 ) loop i $n [ do [ t@i = [ guitext @(at $arg2 $i) ] a@i = [ guislider tmp@i @(at $arg3 (* 2 $i)) @(at $arg3 (+ 1 (* 2 $i))) entupdate ] entattributes = [ @@entattributes @t@@i; @a@@i; ] ] ] ] guilistsplit = [ guilist [ i = 0 z = ( div ( listlen $arg2 ) $arg1 ) loop a $arg1 [ guilist [ t = ( + $i $z ) while [ < $i $t ] [ n = (at $arg2 $i) @@arg3 i = (+ $i 1) ] ] ] ] ] quickcommands = [ guitext "Quick Commands:" guitext "" guibutton "savemap (F5)" "savemap" guibutton quicklight "calclight -1" guibutton "optimize map" "remip" guibutton "new entity" "newent shells" guitext "" guibutton newmap guitext "" guibutton help "showgui editing" ] newgui quickedit [ @quickcommands guitab materials guibutton "air" "editmat air" guibutton "water" "editmat water" guibutton "clip" "editmat clip" guibutton "glass" "editmat glass" guibutton "noclip" "editmat noclip" guibutton "lava" "editmat lava" ] newentgui = [ do [ genentattributes $arg1 $arg2 $arg3 newgui @arg1 [ @quickcommands guitab type guilistsplit 2 $enttypelist [ guibutton $n [ entset @n ] ] guitab attr guitext $tmpt guitext "" @entattributes ] ] ] loop i $enttypelength [ newentgui (at $enttypelist $i) "" "" ] newentgui light "radius red green blue" "0 400 0 255 0 255 0 255" newentgui spotlight "radius" "0 200" newentgui playerstart "direction" "0 360" newentgui teleport "tag" "0 20" newentgui teledest "direction tag" "0 360 0 20" newentgui monster "direction type" "0 360 0 7" newentgui mapmodel "direction model type trigger" "0 360 0 100 0 29 0 20" newentgui envmap "radius" "0 400" newentgui jumppad "Z Y X" "0 200 0 200 0 200" newentgui carrot "tag type" "0 50 0 29" newentgui sound "type radius size" "0 20 0 500 0 500" newentgui particles "type" "0 3" showentgui = [ if (! (enthavesel)) [ showgui quickedit ] [ initentgui; do [ showgui (et) ] ] ]