reference.xml 553 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. To turn this XML document into a "docs.cfg" that can be read by the AssaultCube engine, simply
  4. uncomment the below xml-stylesheet. Then comment the xml-stylesheet below that one. Save your changes.
  5. Then refresh this XML document in your web browser and copy/paste the output into ./config/docs.cfg
  6. If you are using Firefox and you encounter any CORS-related errors try this configuration change -> https://stackoverflow.com/a/18495435
  7. Security concerns have made accessing XSLT locally illegal, even w/ "allow-file-access-from-files" (for Google-Chrome).
  8. If you have python3 use https://stackoverflow.com/a/33814529/3022387 solution:
  9. Go to this docs directory and call: python3 -m http.server
  10. Then browse to http://localhost:8000/reference.xml
  11. <?xml-stylesheet type="text/xsl" href="xml/cuberef2cubescript.xslt"?>
  12. -->
  13. <!--
  14. You may be able to redistribute this content under specific conditions.
  15. Please read the licensing information, available @ https://assault.cubers.net/docs/license.html for the
  16. conditions that would apply to what you may be redistributing.
  17. -->
  18. <?xml-stylesheet type="text/xsl" href="xml/cuberef2xhtml.xslt"?>
  19. <!-- Please ensure the following when writing content for this reference.xml:
  20. General
  21. * Do NOT use any XML editor that breaks the formatting!!!
  22. * This is a big file, please ensure it remains readable and use correct indentations.
  23. * Please see how the markup is currently written and write your new markup accordingly!
  24. * Do NOT write tutorial-like content, this is a reference.
  25. * Focus on the technical description of identifiers as a single unit.
  26. * Some examples may be okay.
  27. * See the XML schema (./xml/cuberef.xsd) for details on the elements.
  28. * Use a CDATA section for content that requires special characters.
  29. Sections
  30. * A section represents a group of identifiers.
  31. * Choose sections based on the usage areas of identifiers.
  32. Identifiers
  33. * An identifier represents a command, variable or an alias that is available through CubeScript.
  34. * Identifiers must be unique across sections (i.e. don't double-up!)
  35. * Avoid documenting CubeScript in ./config/* (such as those in defaults.cfg) that aren't important.
  36. Description
  37. * Provide a short and concise description of what the identifier does or represents, omit details.
  38. Arguments
  39. * Use a single character token if possible.
  40. * Keep the argument description simple, write a remark for details.
  41. * Write restricted integer values in the way of 0..3 (0 to 3) and 1..* (1 to 'infinite').
  42. * If no restrictions apply to values, specify the pseudo data type.
  43. * If the meaning of the arguments depends on other arguments, create multiple identifiers
  44. with the name containing the depending argument. Example: 'newent type v1 v2 v3 v4' depends
  45. on the type, therefore it's split to 'newent light', 'newent ammo', etc.
  46. Remarks
  47. * Describe details and special behavior.
  48. * Give _short_ examples if needed.
  49. References
  50. * Refer to other identifiers that are _directly_ related.
  51. * Refer to _official_ online sources, like the wiki.
  52. * Name other (offline) sources without URI or identifier.
  53. -->
  54. <cuberef xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://assault.cubers.net/docs/xml"
  55. name="AssaultCube Documentation" version="Current" xsi:schemaLocation="xml/cuberef.xsd">
  56. <sections sort="true">
  57. <!--
  58. Sections available: Cubescript, General, Gameplay, Game modes, Keyboard and mouse, Visuals, Heads-Up Display, Sound,
  59. Serverbrowser, Server commands, Authentication, Editing, Editing configs, Menus, Ingame reference,
  60. Bot mode, Optional, TODO
  61. -->
  62. <!-- CubeScript language Section Starts -->
  63. <section name="CubeScript" sortindex="00">
  64. <description>This section describes identifiers that are closely related to the CubeScript language.</description>
  65. <identifiers sort="true">
  66. <command name="&lt;f">
  67. <description>Compares if a particular floating-point value is smaller than another floating-point value.</description>
  68. <return token="F" description="(true)1||0(false)"/>
  69. <arguments>
  70. <argument token="A" description="The first value."/>
  71. <argument token="B" description="The second value."/>
  72. </arguments>
  73. </command>
  74. <command name="&lt;=f">
  75. <description>Compares if a particular floating-point value is less than or equal to another floating-point value.</description>
  76. <return token="F" description="(true)1||0(false)"/>
  77. <arguments>
  78. <argument token="A" description="The first value."/>
  79. <argument token="B" description="The second value."/>
  80. </arguments>
  81. </command>
  82. <command name="=f">
  83. <description>Compares if a particular floating-point value is equal to another floating-point value.</description>
  84. <return token="F" description="(true)1||0(false)"/>
  85. <arguments>
  86. <argument token="A" description="The first value."/>
  87. <argument token="B" description="The second value."/>
  88. </arguments>
  89. </command>
  90. <command name="&gt;f">
  91. <description>Determines if the first floating-point value is greater than the second floating-point value.</description>
  92. <return token="F" description="(true)1||0(false)"/>
  93. <arguments>
  94. <argument token="A" description="the first value"/>
  95. <argument token="B" description="the second value"/>
  96. </arguments>
  97. </command>
  98. <command name="&gt;=f">
  99. <description>Determines if the first floating-point value is greater than or equal to the second floating-point value.</description>
  100. <return token="F" description="(true)1||0(false)"/>
  101. <arguments>
  102. <argument token="A" description="the first value"/>
  103. <argument token="B" description="the second value"/>
  104. </arguments>
  105. </command>
  106. <command name="!=f">
  107. <description>Determines if the first floating-point value is not equal to the second floating-point value.</description>
  108. <return token="F" description="(true)1||0(false)"/>
  109. <arguments>
  110. <argument token="A" description="the first value"/>
  111. <argument token="B" description="the second value"/>
  112. </arguments>
  113. </command>
  114. <command name="result">
  115. <description>Sets the result value of a cubescript block.</description>
  116. <arguments>
  117. <argument token="R" description="the result"/>
  118. </arguments>
  119. <references>
  120. <identifierReference identifier="execute"/>
  121. </references>
  122. </command>
  123. <command name="execute">
  124. <description>Executes the specified string as cubescript.</description>
  125. <arguments>
  126. <argument token="S" description="the string to execute"/>
  127. </arguments>
  128. <examples>
  129. <example>
  130. <code><![CDATA[execute (concat echo (addpunct fov 3))]]></code>
  131. <explanation>Example output: 90.0</explanation>
  132. </example>
  133. </examples>
  134. </command>
  135. <command name="push">
  136. <description>Temporarily redefines the value of an alias.</description>
  137. <arguments>
  138. <argument token="N" description="alias name"/>
  139. <argument token="A" description="action"/>
  140. </arguments>
  141. <examples>
  142. <example>
  143. <code><![CDATA[p = 1; push p 2; echo $p]]></code>
  144. <explanation>Output: 2</explanation>
  145. </example>
  146. </examples>
  147. <references>
  148. <identifierReference identifier="pop"/>
  149. </references>
  150. </command>
  151. <command name="getalias">
  152. <description>Returns the value of the alias.</description>
  153. <arguments>
  154. <argument token="N" description="alias name"/>
  155. </arguments>
  156. <references>
  157. <identifierReference identifier="storesets"/>
  158. <identifierReference identifier="getvarrange"/>
  159. </references>
  160. </command>
  161. <command name="getvarrange">
  162. <description>Gets range attribute for builtin variable.</description>
  163. <arguments>
  164. <argument token="W" description="what" valueNotes="min, max, default"/>
  165. <argument token="N" description="the name of any builtin variable (integer or float)"/>
  166. </arguments>
  167. <references>
  168. <identifierReference identifier="getalias"/>
  169. </references>
  170. </command>
  171. <command name="isIdent">
  172. <description>Returns whether or not there is an identifier by that name.</description>
  173. <arguments>
  174. <argument token="N" description="identifier name"/>
  175. </arguments>
  176. </command>
  177. <command name="modf">
  178. <description>Performs a floating-point modulo operation.</description>
  179. <arguments>
  180. <argument token="A" description="the dividend"/>
  181. <argument token="B" description="the divisor"/>
  182. </arguments>
  183. <return token="F" description="the modulo value"/>
  184. <examples>
  185. <example>
  186. <code><![CDATA[echo (modf 7.5 12.5)]]></code>
  187. <explanation>Output: 7.5</explanation>
  188. </example>
  189. <example>
  190. <code><![CDATA[echo (modf 17.5 12.5)]]></code>
  191. <explanation>Output: 5.0</explanation>
  192. </example>
  193. </examples>
  194. </command>
  195. <command name="powf">
  196. <description>Returns A raised to the power of B (floating-point).</description>
  197. <arguments>
  198. <argument token="A" description="the mantissa"/>
  199. <argument token="B" description="the exponent"/>
  200. </arguments>
  201. <return token="F" description="A raised to the power of B"/>
  202. </command>
  203. <command name="pop">
  204. <description>Resets a previously pushed alias to it's original value.</description>
  205. <remarks>
  206. <remark>
  207. It is allowed to use multiple arguments for "pop".
  208. So instead of "pop var_a ; pop var_b" you can write "pop var_a var_b".
  209. Also, "pop" will now give back the removed value of the first alias from the argument list.
  210. This allows using the pop'd value one last time.
  211. </remark>
  212. </remarks>
  213. <arguments>
  214. <argument token="A" description="alias"/>
  215. </arguments>
  216. <examples>
  217. <example>
  218. <code><![CDATA[p = 1; push p 2; pop p; echo $p]]></code>
  219. <explanation>Output: 1</explanation>
  220. </example>
  221. </examples>
  222. <references>
  223. <identifierReference identifier="push"/>
  224. </references>
  225. </command>
  226. <command name="+">
  227. <description>Performs an addition 2 or more numbers.</description>
  228. <remarks>
  229. <remark>
  230. Example: echo the sum of x and y is (+ $x $y)
  231. </remark>
  232. </remarks>
  233. <arguments>
  234. <argument token="A" description="the first summand"/>
  235. <argument token="B" description="the summand(s)"/>
  236. </arguments>
  237. <return token="N" description="the sum"/>
  238. </command>
  239. <command name="-">
  240. <description>Performs a subtraction.</description>
  241. <arguments>
  242. <argument token="A" description="the minuend"/>
  243. <argument token="B" description="the subtrahend"/>
  244. </arguments>
  245. <return token="N" description="the difference"/>
  246. </command>
  247. <command name="*">
  248. <description>Performs a multiplication 2 or more numbers.</description>
  249. <arguments>
  250. <argument token="A" description="the multiplicand"/>
  251. <argument token="B" description="the multiplier(s)"/>
  252. </arguments>
  253. <return token="N" description="the product"/>
  254. </command>
  255. <command name="div">
  256. <description>Performs an integer division.</description>
  257. <arguments>
  258. <argument token="A" description="the dividend"/>
  259. <argument token="B" description="the divisor"/>
  260. </arguments>
  261. <return token="N" description="the quotient (integer)"/>
  262. </command>
  263. <command name="-f">
  264. <description>Subtracts two floating-point numbers.</description>
  265. <arguments>
  266. <argument token="A" description="the minuend" valueNotes="float"/>
  267. <argument token="B" description="the subtrahend" valueNotes="float"/>
  268. </arguments>
  269. <return token="F" description="the difference"/>
  270. </command>
  271. <command name="+f">
  272. <description>Adds up two or more floating-point numbers.</description>
  273. <arguments>
  274. <argument token="A" description="the first summand" valueNotes="float"/>
  275. <argument token="B" description="the summand(s)" valueNotes="float"/>
  276. </arguments>
  277. <return token="F" description="the sum"/>
  278. </command>
  279. <command name="*f">
  280. <description>Performs a floating point multiplication 2 or more numbers.</description>
  281. <arguments>
  282. <argument token="A" description="the multiplicand"/>
  283. <argument token="B" description="the multiplier(s)"/>
  284. </arguments>
  285. <return token="N" description="the product"/>
  286. </command>
  287. <command name="divf">
  288. <description>Performs a division with floating-point precision.</description>
  289. <arguments>
  290. <argument token="A" description="" valueNotes="the dividend"/>
  291. <argument token="B" description="" valueNotes="the divisor"/>
  292. </arguments>
  293. <return token="F" description="the quotient (floating-point)"/>
  294. </command>
  295. <command name="+=">
  296. <description>Adds a value to an alias.</description>
  297. <remarks>
  298. <remark>
  299. Example: += foo 1337
  300. </remark>
  301. </remarks>
  302. <arguments>
  303. <argument token="A" description="the alias to add to"/>
  304. <argument token="B" description="value to be added"/>
  305. </arguments>
  306. </command>
  307. <command name="-=">
  308. <description>Subtracts a value from an alias.</description>
  309. <remarks>
  310. <remark>
  311. Example: -= foo 1337
  312. </remark>
  313. </remarks>
  314. <arguments>
  315. <argument token="A" description="the alias to subtract from"/>
  316. <argument token="B" description="value to be subtracted"/>
  317. </arguments>
  318. </command>
  319. <command name="*=">
  320. <description>Multiplies an alias by a value.</description>
  321. <remarks>
  322. <remark>
  323. Example: *= foo 1337
  324. </remark>
  325. </remarks>
  326. <arguments>
  327. <argument token="A" description="the alias to be multiplied"/>
  328. <argument token="B" description="the multiplier"/>
  329. </arguments>
  330. </command>
  331. <command name="div=">
  332. <description>Divides an alias by a value.</description>
  333. <remarks>
  334. <remark>
  335. Example: div= foo 1337
  336. </remark>
  337. </remarks>
  338. <arguments>
  339. <argument token="A" description="the alias to be divided"/>
  340. <argument token="B" description="the divisor"/>
  341. </arguments>
  342. </command>
  343. <command name="+=f">
  344. <description>Adds a floating-point value to an alias.</description>
  345. <remarks>
  346. <remark>
  347. Example: +=f foo 13.37
  348. </remark>
  349. </remarks>
  350. <arguments>
  351. <argument token="A" description="the alias to add to"/>
  352. <argument token="B" description="value to be added"/>
  353. </arguments>
  354. </command>
  355. <command name="-=f">
  356. <description>Subtracts a floating-point value from an alias.</description>
  357. <remarks>
  358. <remark>
  359. Example: -=f foo 13.37
  360. </remark>
  361. </remarks>
  362. <arguments>
  363. <argument token="A" description="the alias to subtract from"/>
  364. <argument token="B" description="value to be subtracted"/>
  365. </arguments>
  366. </command>
  367. <command name="*=f">
  368. <description>Multiplies an alias by a floating-point value.</description>
  369. <remarks>
  370. <remark>
  371. Example: *=f foo 13.37
  372. </remark>
  373. </remarks>
  374. <arguments>
  375. <argument token="A" description="the alias to be multiplied"/>
  376. <argument token="B" description="the multiplier"/>
  377. </arguments>
  378. </command>
  379. <command name="div=f">
  380. <description>Divides an alias by a floating-point value.</description>
  381. <remarks>
  382. <remark>
  383. Example: div=f foo 13.37
  384. </remark>
  385. </remarks>
  386. <arguments>
  387. <argument token="A" description="the alias to be divided"/>
  388. <argument token="B" description="the divisor"/>
  389. </arguments>
  390. </command>
  391. <command name="mod">
  392. <description>Performs a modulo operation.</description>
  393. <arguments>
  394. <argument token="A" description="the dividend"/>
  395. <argument token="B" description="the divisor"/>
  396. </arguments>
  397. <return token="N" description="the modulo value"/>
  398. </command>
  399. <command name="=">
  400. <description>Determines if two values are equal.</description>
  401. <arguments>
  402. <argument token="A" description="first value"/>
  403. <argument token="B" description="second value"/>
  404. </arguments>
  405. <return token="N" description="the equality" valueNotes="1 (equal) or 0 (not equal)"/>
  406. <examples>
  407. <example>
  408. <code><![CDATA[echo there are only (concatword (= 1 1) (= 1 0)) types of people in the world]]></code>
  409. <explanation>Output: there are only 10 types of people in the world</explanation>
  410. </example>
  411. </examples>
  412. </command>
  413. <command name="!=">
  414. <description>Determines if two values are not equal.</description>
  415. <arguments>
  416. <argument token="A" description="first value"/>
  417. <argument token="B" description="second value"/>
  418. </arguments>
  419. <return token="N" description="the inequality" valueNotes="1 (not equal) or 0 (equal)"/>
  420. </command>
  421. <command name="&lt;">
  422. <description>Determines if a value is smaller than a second value.</description>
  423. <arguments>
  424. <argument token="A" description="the first value"/>
  425. <argument token="B" description="the second value"/>
  426. </arguments>
  427. <return token="N" description="the comparison" valueNotes="1 (smaller) or 0 (not smaller)"/>
  428. </command>
  429. <command name="&gt;">
  430. <description>Determines if a value is bigger than a second value.</description>
  431. <arguments>
  432. <argument token="A" description="the first value"/>
  433. <argument token="B" description="the second value"/>
  434. </arguments>
  435. <return token="N" description="the comparison" valueNotes="1 (bigger) or 0 (not bigger)"/>
  436. </command>
  437. <command name="&lt;=">
  438. <description>Determines if a values is less than or equal to a second value.</description>
  439. <arguments>
  440. <argument token="A" description="the first value"/>
  441. <argument token="B" description="the second value"/>
  442. </arguments>
  443. </command>
  444. <command name="&gt;=">
  445. <description>Determines if a values is greater than or equal to a second value.</description>
  446. <arguments>
  447. <argument token="A" description="the first value"/>
  448. <argument token="B" description="the second value"/>
  449. </arguments>
  450. </command>
  451. <command name="&amp;&amp;">
  452. <description>Logical AND.</description>
  453. <examples>
  454. <example>
  455. <code><![CDATA[echo (&& 1 1)]]></code>
  456. <explanation>Output: 1</explanation>
  457. </example>
  458. <example>
  459. <code><![CDATA[echo (&& 1 0)]]></code>
  460. <explanation>Output: 0</explanation>
  461. </example>
  462. </examples>
  463. <arguments>
  464. <argument token="A" description="first value"/>
  465. <argument token="B" description="second value"/>
  466. </arguments>
  467. <return token="N" description="A AND B"/>
  468. </command>
  469. <command name="||">
  470. <description>Logical OR.</description>
  471. <examples>
  472. <example>
  473. <code><![CDATA[echo (|| 1 0)]]></code>
  474. <explanation>output: 1</explanation>
  475. </example>
  476. <example>
  477. <code><![CDATA[echo (|| 0 0)]]></code>
  478. <explanation>output: 0</explanation>
  479. </example>
  480. </examples>
  481. <arguments>
  482. <argument token="A" description="first value"/>
  483. <argument token="B" description="second value"/>
  484. </arguments>
  485. <return token="N" description="A OR B"/>
  486. </command>
  487. <command name="!">
  488. <description>Performs a negation.</description>
  489. <arguments>
  490. <argument token="A" description="argument"/>
  491. </arguments>
  492. </command>
  493. <command name="&amp;b">
  494. <description>Performs the operation AND using binary arithmetic on integer values (32-bit signed).</description>
  495. <arguments>
  496. <argument token="A" description="the first argument"/>
  497. <argument token="B" description="the second argument"/>
  498. </arguments>
  499. <references>
  500. <identifierReference identifier="|b"/>
  501. <identifierReference identifier="^b"/>
  502. <identifierReference identifier="!b"/>
  503. </references>
  504. </command>
  505. <command name="|b">
  506. <description>Performs the operation OR using binary arithmetic on integer values (32-bit signed).</description>
  507. <arguments>
  508. <argument token="A" description="the first argument"/>
  509. <argument token="B" description="the second argument"/>
  510. </arguments>
  511. <references>
  512. <identifierReference identifier="&amp;b"/>
  513. <identifierReference identifier="^b"/>
  514. <identifierReference identifier="!b"/>
  515. </references>
  516. </command>
  517. <command name="^b">
  518. <description>Performs the operation XOR using binary arithmetic on integer values (32-bit signed).</description>
  519. <arguments>
  520. <argument token="A" description="the first argument"/>
  521. <argument token="B" description="the second argument"/>
  522. </arguments>
  523. <references>
  524. <identifierReference identifier="&amp;b"/>
  525. <identifierReference identifier="|b"/>
  526. <identifierReference identifier="!b"/>
  527. </references>
  528. </command>
  529. <command name="!b">
  530. <description>Performs the operation NOT using binary arithmetic on integer values (32-bit signed).</description>
  531. <remarks>
  532. <remark>Integer values are 32-bit signed values, so for example "echo (!b 1)" returns "-2".</remark>
  533. </remarks>
  534. <arguments>
  535. <argument token="A" description="argument"/>
  536. </arguments>
  537. <references>
  538. <identifierReference identifier="&amp;b"/>
  539. <identifierReference identifier="|b"/>
  540. <identifierReference identifier="^b"/>
  541. </references>
  542. </command>
  543. <command name="h0">
  544. <description>Returns value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision).</description>
  545. <examples>
  546. <example>
  547. <code><![CDATA[echo (h0 2 1024)]]></code>
  548. <explanation>Output: 400</explanation>
  549. </example>
  550. <example>
  551. <code><![CDATA[echo (h0 4 1024)]]></code>
  552. <explanation>Output: 0400</explanation>
  553. </example>
  554. <example>
  555. <code><![CDATA[echo (h0 6 1024)]]></code>
  556. <explanation>Output: 000400</explanation>
  557. </example>
  558. <example>
  559. <code><![CDATA[echo (h0 0 (&b 0xe 0x3))]]></code>
  560. <explanation>Output: 2</explanation>
  561. </example>
  562. <example>
  563. <code><![CDATA[echo (h0 0 (|b 0xe 0x3))]]></code>
  564. <explanation>Output: f</explanation>
  565. </example>
  566. <example>
  567. <code><![CDATA[echo (h0 0 (^b 0xe 0x3))]]></code>
  568. <explanation>Output: d</explanation>
  569. </example>
  570. <example>
  571. <code><![CDATA[echo (h0 0 (!b 0xe))]]></code>
  572. <explanation>Output: fffffff1</explanation>
  573. </example>
  574. <example>
  575. <code><![CDATA[echo (h0 0 (* -1 0xe))]]></code>
  576. <explanation>Output: fffffff2</explanation>
  577. </example>
  578. </examples>
  579. <arguments>
  580. <argument token="P" description="precision"/>
  581. <argument token="V" description="value"/>
  582. </arguments>
  583. <references>
  584. <identifierReference identifier="l0"/>
  585. </references>
  586. </command>
  587. <command name="rnd">
  588. <description>Random value.</description>
  589. <arguments>
  590. <argument token="A" description="the upper limit of the random value" valueNotes=""/>
  591. </arguments>
  592. <return token="R" description="the random value" valueNotes="larger or equal 0 and smaller than A"/>
  593. </command>
  594. <command name="round">
  595. <description>Rounds the given float.</description>
  596. <arguments>
  597. <argument token="F" description="the float number to round" valueNotes=""/>
  598. </arguments>
  599. <return token="I" description="the rounded integer" valueNotes="the precision is 1 unit"/>
  600. </command>
  601. <command name="ceil">
  602. <description>Upper value of a float number.</description>
  603. <arguments>
  604. <argument token="F" description="the float number to get the ceil from" valueNotes=""/>
  605. </arguments>
  606. <return token="I" description="the ceil value (integer)"/>
  607. </command>
  608. <command name="floor">
  609. <description>Floor value of a float number.</description>
  610. <arguments>
  611. <argument token="F" description="the float number to get the floor from" valueNotes=""/>
  612. </arguments>
  613. <return token="I" description="The floor value (integer)"/>
  614. </command>
  615. <command name="strcmp">
  616. <description>Determines if two strings are equal.</description>
  617. <examples>
  618. <example>
  619. <code><![CDATA[if (strcmp yes yes) [echo the two strings are equal] [echo the two strings are not equal]]]></code>
  620. <explanation>Output: the two strings are equal</explanation>
  621. </example>
  622. </examples>
  623. <arguments>
  624. <argument token="A" description="the first string"/>
  625. <argument token="B" description="the second string"/>
  626. </arguments>
  627. <return token="N" description="the equality" valueNotes="1 (equal) or 0 (unequal)"/>
  628. <references>
  629. <identifierReference identifier="strstr"/>
  630. </references>
  631. </command>
  632. <command name="strstr">
  633. <description>Determines if string B was found in string A.</description>
  634. <remarks>
  635. <remark>It returns position of string B in string A (counting from 1) or zero, if not found.</remark>
  636. </remarks>
  637. <examples>
  638. <example>
  639. <code><![CDATA[if (strstr "Hello world!" Hello) [echo found Hello in Hello world!] [echo did not find Hello in Hello world!]]]></code>
  640. <explanation>Output: found Hello in Hello world!</explanation>
  641. </example>
  642. </examples>
  643. <arguments>
  644. <argument token="A" description="the first string"/>
  645. <argument token="B" description="the second string"/>
  646. </arguments>
  647. <return token="N" description="integer" valueNotes="0 (not found) or position (if found)"/>
  648. <references>
  649. <identifierReference identifier="strcmp"/>
  650. </references>
  651. </command>
  652. <command name="strlen">
  653. <description>Returns the length (in characters, including whitespace) of string S.</description>
  654. <examples>
  655. <example>
  656. <code><![CDATA[echo (strlen "Hello world!")]]></code>
  657. <explanation>Output: 12</explanation>
  658. </example>
  659. </examples>
  660. <arguments>
  661. <argument token="S" description="string"/>
  662. </arguments>
  663. <references>
  664. <identifierReference identifier="substr"/>
  665. </references>
  666. </command>
  667. <command name="substr">
  668. <description>Copies a substring out of the original.</description>
  669. <arguments>
  670. <argument token="S" description="the original string"/>
  671. <argument token="A" description="start position"/>
  672. <argument token="L" description="substring length" optional="true"/>
  673. </arguments>
  674. <return token="S" description="the substring"/>
  675. <remarks>
  676. <remark>
  677. Character indexes begins at 0. If "start position" is negative, the reference is the end of the string.
  678. It also counts negative length from total length, if "substring length" parameter is negative.
  679. </remark>
  680. </remarks>
  681. <examples>
  682. <example>
  683. <code><![CDATA[echo (substr abcdefgh 2 5)]]></code>
  684. <explanation>Output: cdefg</explanation>
  685. </example>
  686. <example>
  687. <code><![CDATA[echo (substr abcdefgh -3 2)]]></code>
  688. <explanation>Output: fg</explanation>
  689. </example>
  690. <example>
  691. <code><![CDATA[echo (substr abcdefgh 2)]]></code>
  692. <explanation>Output: cdefgh</explanation>
  693. </example>
  694. <example>
  695. <code><![CDATA[echo (substr abcdefgh 1 -2)]]></code>
  696. <explanation>Output: bcdefg</explanation>
  697. </example>
  698. </examples>
  699. <references>
  700. <identifierReference identifier="strlen"/>
  701. <identifierReference identifier="strreplace"/>
  702. <identifierReference identifier="parsestring"/>
  703. </references>
  704. </command>
  705. <command name="if">
  706. <description>Controls the script flow based on a boolean expression.</description>
  707. <examples>
  708. <example>
  709. <code><![CDATA[if (> $x 10) [ echo x is bigger than 10 ] [ echo x too small ]]]></code>
  710. </example>
  711. </examples>
  712. <arguments>
  713. <argument token="cond" description="the condition" valueNotes="0 (false) or anything else (true)"/>
  714. <argument token="true" description="the body to execute if the condition is true"/>
  715. <argument token="false" description="the body to execute if the condition is false"/>
  716. </arguments>
  717. </command>
  718. <command name="switch">
  719. <description>Takes an integer argument to determine what block of code to execute.</description>
  720. <remarks>
  721. <remark>This command can only handle up to 23 'cases' (because of cubescript's 24 argument limit).</remark>
  722. </remarks>
  723. <examples>
  724. <example>
  725. <code><![CDATA[switch 2 [echo case 0] [echo case 1] [echo case 2] [echo case 3] [echo case 4]]]></code>
  726. <explanation>Output: case 2</explanation>
  727. </example>
  728. </examples>
  729. <arguments>
  730. <argument token="I" description="integer"/>
  731. <argument token="C" description="a variable number of 'case' arguments..."/>
  732. </arguments>
  733. </command>
  734. <command name="loop">
  735. <description>Loops the specified body.</description>
  736. <remarks>
  737. <remark>This command sets the alias you choose, as first argument, from 0 to N-1 for every iteration.</remark>
  738. </remarks>
  739. <examples>
  740. <example>
  741. <code><![CDATA[loop i 10 [ echo $i ]]]></code>
  742. </example>
  743. </examples>
  744. <arguments>
  745. <argument token="V" description="the alias used as counter"/>
  746. <argument token="N" description="the amount of loops"/>
  747. <argument token="body" description="the body to execute on each iteration"/>
  748. </arguments>
  749. <references>
  750. <identifierReference identifier="break"/>
  751. <identifierReference identifier="continue"/>
  752. <identifierReference identifier="while"/>
  753. <identifierReference identifier="looplist"/>
  754. </references>
  755. </command>
  756. <command name="while">
  757. <description>Loops the specified body while the condition evaluates to true.</description>
  758. <remarks>
  759. <remark>
  760. This command sets the alias "i" from 0 to N-1 for every iteration.
  761. Note that the condition here has to have [], otherwise it would only be evaluated once.
  762. </remark>
  763. </remarks>
  764. <examples>
  765. <example>
  766. <code><![CDATA[alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]]]></code>
  767. </example>
  768. </examples>
  769. <arguments>
  770. <argument token="cond" description="the condition" valueNotes="the code evaluated before each iteration"/>
  771. <argument token="body" description="the body to execute on each iteration"/>
  772. </arguments>
  773. <references>
  774. <identifierReference identifier="break"/>
  775. <identifierReference identifier="continue"/>
  776. <identifierReference identifier="loop"/>
  777. </references>
  778. </command>
  779. <command name="looplist">
  780. <description>Browses a list and executes a body for each element.</description>
  781. <remarks>
  782. <remark>It works optionally with several variables.</remark>
  783. </remarks>
  784. <examples>
  785. <example>
  786. <code><![CDATA[looplist "zero one two three" number [echo $number]]]></code>
  787. </example>
  788. <example>
  789. <code><![CDATA[looplist [0 "is knife" 1 "is pistol"] [n w] [echo weapon $n $w]]]></code>
  790. </example>
  791. </examples>
  792. <arguments>
  793. <argument token="V" description="the list to browse"/>
  794. <argument token="N" description="the alias(es) containing the current element value"/>
  795. <argument token="body" description="the body to execute on each iteration"/>
  796. </arguments>
  797. <references>
  798. <identifierReference identifier="break"/>
  799. <identifierReference identifier="continue"/>
  800. <identifierReference identifier="loop"/>
  801. <identifierReference identifier="looplisti"/>
  802. </references>
  803. </command>
  804. <command name="looplisti">
  805. <description>Browses a list and executes a body for each element.</description>
  806. <remarks>
  807. <remark>
  808. The same as looplist, but it automatically counts the loops in "i", starting with 0.
  809. It works optionally with several variables.
  810. </remark>
  811. </remarks>
  812. <examples>
  813. <example>
  814. <code><![CDATA[a = [u v w]; b = [x y z]; looplisti $a m [echo $m (at $b $i) $i]]]></code>
  815. <explanation>Output: u x 0 , v y 1 , w z 2</explanation>
  816. </example>
  817. </examples>
  818. <arguments>
  819. <argument token="V" description="the list to browse"/>
  820. <argument token="N" description="the alias(es) containing the current element value"/>
  821. <argument token="body" description="the body to execute on each iteration"/>
  822. </arguments>
  823. <references>
  824. <identifierReference identifier="break"/>
  825. <identifierReference identifier="continue"/>
  826. <identifierReference identifier="loop"/>
  827. <identifierReference identifier="looplist"/>
  828. </references>
  829. </command>
  830. <command name="break">
  831. <description>Aborts a loop created with a 'loop', 'looplist' or 'while' command.</description>
  832. <examples>
  833. <example>
  834. <code><![CDATA[loop i 10 [ if (= $i 4) [ break ]; echo $i]]]></code>
  835. <explanation>output: 0 1 2 3</explanation>
  836. </example>
  837. </examples>
  838. <references>
  839. <identifierReference identifier="continue"/>
  840. <identifierReference identifier="loop"/>
  841. <identifierReference identifier="while"/>
  842. </references>
  843. </command>
  844. <command name="continue">
  845. <description>Skip current loop iteration.</description>
  846. <examples>
  847. <example>
  848. <code><![CDATA[loop i 5 [ if (= $i 2) [ continue ]; echo $i]]]></code>
  849. <explanation>output: 0 1 3 4</explanation>
  850. </example>
  851. </examples>
  852. <references>
  853. <identifierReference identifier="break"/>
  854. <identifierReference identifier="loop"/>
  855. <identifierReference identifier="while"/>
  856. </references>
  857. </command>
  858. <command name="concat">
  859. <description>Concatenates multiple strings with spaces inbetween.</description>
  860. <examples>
  861. <example>
  862. <code><![CDATA[alias a "hello"; echo (concat $a "world")]]></code>
  863. <explanation>output: hello world</explanation>
  864. </example>
  865. </examples>
  866. <arguments>
  867. <argument token="S" description="the first string"/>
  868. <variableArgument token="..." description="collection of strings to concatenate"/>
  869. </arguments>
  870. <return token="R" description="The newly created string"/>
  871. </command>
  872. <command name="concatword">
  873. <description>Concatenates multiple strings.</description>
  874. <remarks>
  875. <remark>The newly created string is saved to the alias 's'.</remark>
  876. </remarks>
  877. <examples>
  878. <example>
  879. <code><![CDATA[alias a "Cube"; echo (concatword $a "Script")]]></code>
  880. <explanation>output: CubeScript</explanation>
  881. </example>
  882. </examples>
  883. <arguments>
  884. <argument token="S" description="the first string"/>
  885. <variableArgument token="..." description="collection of strings to concatenate"/>
  886. </arguments>
  887. <return token="R" description="The newly created string"/>
  888. </command>
  889. <command name="at">
  890. <description>Grabs a word out of a string.</description>
  891. <remarks>
  892. <remark>Negative index number returns "".</remark>
  893. </remarks>
  894. <examples>
  895. <example>
  896. <code><![CDATA[echo (at "zero one two three" 2)]]></code>
  897. <explanation>output: two</explanation>
  898. </example>
  899. </examples>
  900. <arguments>
  901. <argument token="S" description="the string"/>
  902. <argument token="N" description="the index of the word"/>
  903. </arguments>
  904. <return token="W" description="the word from the specified idex"/>
  905. </command>
  906. <command name="listlen">
  907. <description>returns the element count of the given list.</description>
  908. <arguments>
  909. <argument token="L" description="the list"/>
  910. </arguments>
  911. </command>
  912. <command name="findlist">
  913. <description>Searches a list for a specified value.</description>
  914. <arguments>
  915. <argument token="L" description="the list"/>
  916. <argument token="I" description="the item to find"/>
  917. </arguments>
  918. <return token="I" description="the index of the item in the list"/>
  919. </command>
  920. <command name="sleep">
  921. <description>Executes a command after specified time period.</description>
  922. <examples>
  923. <example>
  924. <code><![CDATA[sleep 1000 [ echo foo ]]]></code>
  925. <explanation>Prints 'foo' to the screen after 1 second.</explanation>
  926. </example>
  927. </examples>
  928. <arguments>
  929. <argument token="N" description="the amount of milliseconds"/>
  930. <argument token="C" description="the command to execute"/>
  931. <argument token="P" optional="true" description="ignore map change"/>
  932. </arguments>
  933. </command>
  934. <command name="resetsleeps">
  935. <description>Resets all current "sleep".</description>
  936. </command>
  937. <variable name="numargs">
  938. <description>The number of arguments passed to the current alias.</description>
  939. <value description="numargs" minValue="0" maxValue="24" defaultValue="0" readOnly="true"/>
  940. </variable>
  941. <command name="format">
  942. <description>Replaces "%" format specifiers in the string by the values specified in subsequent arguments.</description>
  943. <remarks>
  944. <remark>
  945. In addition, it allows access to more than nine parameters. Parameter numbers of 10 and higher have to be prefixed
  946. with an additional zero. For example "%010" accesses parameter number ten.
  947. </remark>
  948. </remarks>
  949. <arguments>
  950. <argument token="F" description="format" valueNotes="use %1..%9 for the values"/>
  951. <argument token="V" description="value(s)"/>
  952. </arguments>
  953. <examples>
  954. <example>
  955. <code><![CDATA[echo (format "%1 bottles of %2 on the %3, %1 bottles of %2!" 99 beer wall)]]></code>
  956. <explanation>output: 99 bottles of beer on the wall, 99 bottles of beer!</explanation>
  957. </example>
  958. </examples>
  959. <references>
  960. <identifierReference identifier="format2"/>
  961. </references>
  962. </command>
  963. <command name="format2">
  964. <description>Replaces "%" format specifiers in the string by the values specified in subsequent arguments.</description>
  965. <remarks>
  966. <remark>Like "format" command, but all parameters are treated as lists and are exploded first.</remark>
  967. <remark>
  968. In addition, it allows access to more than nine parameters. Parameter numbers of 10 and higher have to be prefixed
  969. with an additional zero. For example "%010" accesses parameter number ten.
  970. </remark>
  971. </remarks>
  972. <arguments>
  973. <argument token="F" description="format" valueNotes="use %1..%9 for the values"/>
  974. <argument token="V" description="value(s)"/>
  975. </arguments>
  976. <examples>
  977. <example>
  978. <code><![CDATA[echo (format "_%1_%2_%3_%4_%5_" "A B C" D E F)]]></code>
  979. <explanation>output: _A B C_D_E_F__</explanation>
  980. </example>
  981. <example>
  982. <code><![CDATA[echo (format2 "_%1_%2_%3_%4_%5_" "A B C" D E F)]]></code>
  983. <explanation>output: _A_B_C_D_E_</explanation>
  984. </example>
  985. </examples>
  986. <references>
  987. <identifierReference identifier="format"/>
  988. </references>
  989. </command>
  990. <command name="\f">
  991. <description>Adds color to a string.</description>
  992. <remarks>
  993. <remark>The whole string has to be included in quotes.</remark>
  994. </remarks>
  995. <examples>
  996. <example>
  997. <code><![CDATA[echo "\f3Hello \f0world!"]]></code>
  998. <explanation>Output: a red "Hello" and a green "world!"</explanation>
  999. </example>
  1000. </examples>
  1001. <arguments>
  1002. <argument token="N" description="color id" valueNotes="0-9, A-Z"/>
  1003. </arguments>
  1004. <references>
  1005. <identifierReference identifier="cncolumncolor"/>
  1006. </references>
  1007. </command>
  1008. <command name="l0">
  1009. <description>Leading zeros for the number V to make it W chars wide.</description>
  1010. <remarks>
  1011. <remark>It may look like 10 - which might be considered a mnemonic - but it's lowercase-L and 0!</remark>
  1012. </remarks>
  1013. <examples>
  1014. <example>
  1015. <code><![CDATA[echo (l0 5 1000)]]></code>
  1016. <explanation>Output: 01000</explanation>
  1017. </example>
  1018. <example>
  1019. <code><![CDATA[echo (l0 3 1000)]]></code>
  1020. <explanation>Output: 1000</explanation>
  1021. </example>
  1022. </examples>
  1023. <arguments>
  1024. <argument token="W" description="width"/>
  1025. <argument token="V" description="value"/>
  1026. </arguments>
  1027. <references>
  1028. <identifierReference identifier="h0"/>
  1029. </references>
  1030. </command>
  1031. <command name="storesets">
  1032. <description>Generates an alias (list) of the current values for the given aliases/CVARs.</description>
  1033. <examples>
  1034. <example>
  1035. <code><![CDATA[storesets "sensitivity hudgun fov" tmp]]></code>
  1036. <explanation>Example result: stores "3.000 1 120" into alias "tmp".</explanation>
  1037. </example>
  1038. </examples>
  1039. <arguments>
  1040. <argument token="L" description="the list of aliases/CVARs"/>
  1041. <argument token="A" description="the alias to store them in"/>
  1042. </arguments>
  1043. <references>
  1044. <identifierReference identifier="getalias"/>
  1045. </references>
  1046. </command>
  1047. <command name="alias">
  1048. <description>Binds a name to commands.</description>
  1049. <arguments>
  1050. <argument token="N" description="the name of the alias" valueNotes="string, must not contain '$'"/>
  1051. <argument token="A" description="the commands" valueNotes="string"/>
  1052. </arguments>
  1053. <examples>
  1054. <example>
  1055. <code><![CDATA[alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ]]]></code>
  1056. <explanation>It is possible to re-bind an alias, even during its evaluation.</explanation>
  1057. </example>
  1058. <example>
  1059. <code><![CDATA[test = [ echo "successful" ]]]></code>
  1060. <explanation>There is also the shorthand version of defining an alias via the "=" sign.</explanation>
  1061. </example>
  1062. </examples>
  1063. <references>
  1064. <identifierReference identifier="const"/>
  1065. <identifierReference identifier="tempalias"/>
  1066. <identifierReference identifier="isconst"/>
  1067. <identifierReference identifier="checkalias"/>
  1068. <identifierReference identifier="persistidents"/>
  1069. </references>
  1070. </command>
  1071. <command name="const">
  1072. <description>Set an alias as a constant.</description>
  1073. <remarks>
  1074. <remark>
  1075. A constant cannot be redefined in the same AC session: its value cannot be changed.
  1076. To get rid of a constant, use "delalias".
  1077. </remark>
  1078. <remark>Constant alias is temporary that will not be written to saved.cfg, and thus will not persist after quitting.</remark>
  1079. </remarks>
  1080. <arguments>
  1081. <argument token="N" description="the name of the alias" valueNotes="string, must not contain '$'"/>
  1082. <argument token="A" description="the value" valueNotes="string" optional="true"/>
  1083. </arguments>
  1084. <examples>
  1085. <example>
  1086. <code><![CDATA[myalias = myvalue; const myalias;]]></code>
  1087. <explanation>Set "myalias" value to "myvalue" then "lock" it as a constant.</explanation>
  1088. </example>
  1089. <example>
  1090. <code><![CDATA[const myalias myvalue;]]></code>
  1091. <explanation>You can directly set a value for your alias when you define it as a constant.</explanation>
  1092. </example>
  1093. <example>
  1094. <code><![CDATA[const myalias myvalue; myalias = anothervalue;]]></code>
  1095. <explanation>Assigning a value to a const will throw you an error. Output: myalias is already defined as a constant</explanation>
  1096. </example>
  1097. </examples>
  1098. <references>
  1099. <identifierReference identifier="alias"/>
  1100. <identifierReference identifier="tempalias"/>
  1101. <identifierReference identifier="isconst"/>
  1102. </references>
  1103. </command>
  1104. <command name="enumalias">
  1105. <description>Lists all persistent aliases that start with prefix.</description>
  1106. <remarks>
  1107. <remark>Returns a table with two entries per alias: 1) full name and 2) name without prefix.</remark>
  1108. </remarks>
  1109. <references>
  1110. <identifierReference identifier="alias"/>
  1111. </references>
  1112. </command>
  1113. <command name="checkalias">
  1114. <description>Determines if the argument given is an existing alias or not.</description>
  1115. <examples>
  1116. <example>
  1117. <code><![CDATA[hello = ""; echo (checkalias hello)]]></code>
  1118. <explanation>Output: 1</explanation>
  1119. </example>
  1120. <example>
  1121. <code><![CDATA[echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)]]></code>
  1122. <explanation>Output: 0</explanation>
  1123. </example>
  1124. </examples>
  1125. <arguments>
  1126. <argument token="A" description="the alias to check for"/>
  1127. </arguments>
  1128. <references>
  1129. <identifierReference identifier="checkinit"/>
  1130. <identifierReference identifier="aliasinit"/>
  1131. </references>
  1132. </command>
  1133. <command name="isconst">
  1134. <description>Determines if the argument given is a constant or not.</description>
  1135. <examples>
  1136. <example>
  1137. <code><![CDATA[const hello ""; echo (isconst hello)]]></code>
  1138. <explanation>Output: 1</explanation>
  1139. </example>
  1140. <example>
  1141. <code><![CDATA[hello = value; echo (isconst hello)]]></code>
  1142. <explanation>Output: 0</explanation>
  1143. </example>
  1144. </examples>
  1145. <arguments>
  1146. <argument token="A" description="the alias to check for"/>
  1147. </arguments>
  1148. <references>
  1149. <identifierReference identifier="const"/>
  1150. </references>
  1151. </command>
  1152. <command name="checkinit">
  1153. <description>Ensures the initialization of an alias.</description>
  1154. <examples>
  1155. <example>
  1156. <code><![CDATA[checkinit mapstartalways]]></code>
  1157. <explanation>Output: if alias mapstartalways does not exist, this command initializes it.</explanation>
  1158. </example>
  1159. <example>
  1160. <code><![CDATA[checkinit mapstartalways [ echo New map, good luck! ]]]></code>
  1161. <explanation>Output: if alias mapstartalways does not exist, it is initialized, and if the block of code "[ echo New map, good luck! ]" does not exist within the aliases contents, this command adds it.</explanation>
  1162. </example>
  1163. </examples>
  1164. <arguments>
  1165. <argument token="A" description="the alias to check for"/>
  1166. <argument token="B" description="the block of code to ensure that the alias contains" optional="true"/>
  1167. </arguments>
  1168. <references>
  1169. <identifierReference identifier="checkalias"/>
  1170. <identifierReference identifier="aliasinit"/>
  1171. <identifierReference identifier="check2init"/>
  1172. <identifierReference identifier="check2initlist"/>
  1173. </references>
  1174. </command>
  1175. <command name="check2init">
  1176. <description>Defines an alias only if it does not already exist.</description>
  1177. <arguments>
  1178. <argument token="A" description="alias name"/>
  1179. <argument token="V" description="alias value"/>
  1180. </arguments>
  1181. <references>
  1182. <identifierReference identifier="check2initlist"/>
  1183. <identifierReference identifier="checkalias"/>
  1184. <identifierReference identifier="checkinit"/>
  1185. <identifierReference identifier="aliasinit"/>
  1186. </references>
  1187. </command>
  1188. <command name="delalias">
  1189. <description>Deletes the passed alias.</description>
  1190. <arguments>
  1191. <argument token="N" description="the name of the alias" valueNotes="string, must not contain '$'"/>
  1192. </arguments>
  1193. </command>
  1194. <command name="forceinit">
  1195. <description>Forcibly sets a list of aliases to a specified value.</description>
  1196. <examples>
  1197. <example>
  1198. <code><![CDATA[alias1 = 0; alias2 = 0; alias3 = 0; alias4 = 0; alias 5 = 0]]></code>
  1199. <explanation>Can be written as:</explanation>
  1200. </example>
  1201. <example>
  1202. <code><![CDATA[forceinit [alias1 alias2 alias3 alias4 alias5] 0]]></code>
  1203. </example>
  1204. </examples>
  1205. <arguments>
  1206. <argument token="L" description="list of alias names"/>
  1207. <argument token="V" description="alias value"/>
  1208. </arguments>
  1209. </command>
  1210. <command name="aliasinit">
  1211. <description>Initializes a group of aliases using checkinit.</description>
  1212. <arguments>
  1213. <argument token="L" description="the list of aliases to check for"/>
  1214. <argument token="B" description="the block of code to ensure the aliases contain" optional="true"/>
  1215. </arguments>
  1216. <references>
  1217. <identifierReference identifier="checkalias"/>
  1218. <identifierReference identifier="checkinit"/>
  1219. <identifierReference identifier="check2init"/>
  1220. <identifierReference identifier="check2initlist"/>
  1221. </references>
  1222. </command>
  1223. <command name="check2initlist">
  1224. <description>Uses check2init on a list of aliases.</description>
  1225. <arguments>
  1226. <argument token="L" description="list of alias names"/>
  1227. <argument token="V" description="alias value"/>
  1228. </arguments>
  1229. <references>
  1230. <identifierReference identifier="checkalias"/>
  1231. <identifierReference identifier="checkinit"/>
  1232. <identifierReference identifier="aliasinit"/>
  1233. <identifierReference identifier="check2init"/>
  1234. </references>
  1235. </command>
  1236. <command name="persistidents">
  1237. <description>Controls whether aliases defined afterwards will be saved (1) or not (0).</description>
  1238. <remarks>
  1239. <remark>Rules:</remark>
  1240. <remark>* aliases created by "const" and "tempalias" are never persistent;</remark>
  1241. <remark>
  1242. * aliases created or altered by "alias" or "=" become persistent, if the "persistidents" flag is set
  1243. during that operation;
  1244. </remark>
  1245. <remark>
  1246. * "persistidents" is false during the execution of almost all config files during game start - those files
  1247. can create aliases with default values which will not be persistent (until changed later while the flag is set);
  1248. </remark>
  1249. <remark>
  1250. * before saved.cfg is executed, the flag is set and stays set all throughout the game - which means,
  1251. that all changes (for example from menus or in console) will change the altered alias to "persistent";
  1252. </remark>
  1253. <remark>
  1254. * exceptions for map or model config files are unnecessary, since those run restricted
  1255. and can't create aliases anyway;
  1256. </remark>
  1257. <remark>* exceptions are necessary for "late run" config files like those in config/opt/ folder.</remark>
  1258. <remark>
  1259. This command may be used to manually set or clear the flag. It also returns the current state
  1260. of the flag. If used in a config file, the flag is restored to its original value when the file ends execution.
  1261. </remark>
  1262. <remark>
  1263. In short: only late-run config files (meaning: run after saved.cfg was restored) may need to manually set/reset
  1264. the flag. Use "const" and "tempalias" where appropriate and clear "persistidents" before creating an alias with
  1265. a not-to-save default value that may be changed and made persistent later.
  1266. </remark>
  1267. </remarks>
  1268. <arguments>
  1269. <argument token="B" description="control option" valueNotes="1: persistent, 0: not persistent"/>
  1270. </arguments>
  1271. <examples>
  1272. <example>
  1273. <code><![CDATA[persistidents 0; foo = [ echo "bar"]]]></code>
  1274. <explanation>foo will not be saved and has to be redefined when restarting AC.</explanation>
  1275. </example>
  1276. <example>
  1277. <code><![CDATA[persistidents 1; bar = [ echo "foo"]]]></code>
  1278. <explanation>bar will be saved and persistent across sessions.</explanation>
  1279. </example>
  1280. </examples>
  1281. <references>
  1282. <identifierReference identifier="alias"/>
  1283. </references>
  1284. </command>
  1285. <command name="addpunct">
  1286. <description>Injects cubescript punctuation.</description>
  1287. <examples>
  1288. <example>
  1289. <code><![CDATA[echo (addpunct hello)]]></code>
  1290. <explanation>Output: "hello"</explanation>
  1291. </example>
  1292. <example>
  1293. <code><![CDATA[echo (addpunct hello 1)]]></code>
  1294. <explanation>Output: [hello]</explanation>
  1295. </example>
  1296. <example>
  1297. <code><![CDATA[echo (addpunct hello 2)]]></code>
  1298. <explanation>Output: (hello)</explanation>
  1299. </example>
  1300. <example>
  1301. <code><![CDATA[echo (addpunct hello 3)]]></code>
  1302. <explanation>Output: $hello</explanation>
  1303. </example>
  1304. <example>
  1305. <code><![CDATA[test = (concat echo (addpunct fov 3)); test]]></code>
  1306. <explanation>Output: 90.0</explanation>
  1307. </example>
  1308. </examples>
  1309. <arguments>
  1310. <argument token="S" description="a string"/>
  1311. <argument token="N" description="ID or name" valueNotes="0 (quotes), 1 (brackets), 2 (parenthesis), 3 (_$_), 4 (quote), 5 (percent)"/>
  1312. </arguments>
  1313. </command>
  1314. <command name="tolower">
  1315. <description>Converts a string to all lowercase characters.</description>
  1316. <examples>
  1317. <example>
  1318. <code><![CDATA[echo (tolower HELLO)]]></code>
  1319. <explanation>Output: hello</explanation>
  1320. </example>
  1321. </examples>
  1322. <arguments>
  1323. <argument token="S" description="a string"/>
  1324. </arguments>
  1325. <references>
  1326. <identifierReference identifier="toupper"/>
  1327. </references>
  1328. </command>
  1329. <command name="toupper">
  1330. <description>Converts a string to all uppercase characters.</description>
  1331. <examples>
  1332. <example>
  1333. <code><![CDATA[echo (toupper hello)]]></code>
  1334. <explanation>Output: HELLO</explanation>
  1335. </example>
  1336. </examples>
  1337. <arguments>
  1338. <argument token="S" description="a string"/>
  1339. </arguments>
  1340. <references>
  1341. <identifierReference identifier="tolower"/>
  1342. </references>
  1343. </command>
  1344. <command name="testchar">
  1345. <description>Tests a character argument for various things.</description>
  1346. <examples>
  1347. <example>
  1348. <code><![CDATA[echo (testchar 1)]]></code>
  1349. <explanation>Output: 1 // It is a 0-9 digit</explanation>
  1350. </example>
  1351. <example>
  1352. <code><![CDATA[echo (testchar a 1)]]></code>
  1353. <explanation>Output: 1 // It is a a-z or A-Z character</explanation>
  1354. </example>
  1355. <example>
  1356. <code><![CDATA[echo (testchar z 2)]]></code>
  1357. <explanation>Output: 1 // It is a a-z or A-Z character or 0-9 digit</explanation>
  1358. </example>
  1359. <example>
  1360. <code><![CDATA[echo (testchar b 3)]]></code>
  1361. <explanation>Output: 1 // It is a lowercase a-z character</explanation>
  1362. </example>
  1363. <example>
  1364. <code><![CDATA[echo (testchar B 4)]]></code>
  1365. <explanation>Output: 1 // It is a uppercase A-Z character</explanation>
  1366. </example>
  1367. <example>
  1368. <code><![CDATA[echo (testchar , 5)]]></code>
  1369. <explanation>Output: 1 // It is a printable character</explanation>
  1370. </example>
  1371. <example>
  1372. <code><![CDATA[echo (testchar . 6)]]></code>
  1373. <explanation>Output: 1 // It is a punctuation character</explanation>
  1374. </example>
  1375. <example>
  1376. <code><![CDATA[echo (testchar " " 7)]]></code>
  1377. <explanation>Output: 1 // It is a whitespace character</explanation>
  1378. </example>
  1379. </examples>
  1380. <arguments>
  1381. <argument token="C" description="the character to test"/>
  1382. <argument token="N" description="type of test to run" valueNotes="min 0/max 7/default 0"/>
  1383. </arguments>
  1384. <remarks>
  1385. <remark>See the following c++ functions for more information about the usage of this command:</remark>
  1386. <remark>isalpha(), isalnum(), isdigit(), islower(), isprint(), ispunct(), isupper(), and isspace()</remark>
  1387. </remarks>
  1388. </command>
  1389. <command name="strreplace">
  1390. <description>Returns a string, with a portion of it replaced with a new sub-string.</description>
  1391. <examples>
  1392. <example>
  1393. <code><![CDATA[echo (strreplace "Hello cruel world" cruel "")]]></code>
  1394. <explanation>Output: Hello world</explanation>
  1395. </example>
  1396. </examples>
  1397. <arguments>
  1398. <argument token="S" description="the original string to modify"/>
  1399. <argument token="T" description="the target sub-string to replace"/>
  1400. <argument token="N" description="the new sub-string to replace the target"/>
  1401. </arguments>
  1402. <references>
  1403. <identifierReference identifier="substr"/>
  1404. </references>
  1405. </command>
  1406. <command name="listaverage">
  1407. <description>Returns the average of a list of numbers.</description>
  1408. <examples>
  1409. <example>
  1410. <code><![CDATA[echo (listaverage "2 5 5")]]></code>
  1411. <explanation>Output: 4.0</explanation>
  1412. </example>
  1413. </examples>
  1414. <arguments>
  1415. <argument token="L" description="the list of numbers" valueNotes="supports ints and floats"/>
  1416. </arguments>
  1417. </command>
  1418. <scriptalias name="add2alias">
  1419. <description>This will append the passed 2nd argument to any existing content of the alias named in the 1st argument.</description>
  1420. <arguments>
  1421. <argument token="A" description="the alias to add to"/>
  1422. <argument token="E" description="the new element to add"/>
  1423. </arguments>
  1424. <remarks>
  1425. <remark>
  1426. Several popular aliases have predefined shortcuts using this scriptalias: addOnLoadOnce, addOnLoadAlways.
  1427. Check config/scripts.cfg for possible omissions in that list.
  1428. </remark>
  1429. </remarks>
  1430. <examples>
  1431. <example>
  1432. <code>
  1433. <![CDATA[
  1434. foo = "one"
  1435. add2alias foo two
  1436. echo foo
  1437. ]]>
  1438. </code>
  1439. <explanation>Output: one two</explanation>
  1440. <explanation>This will output the string and override any other actions that might've been defined.</explanation>
  1441. </example>
  1442. </examples>
  1443. <references>
  1444. <identifierReference identifier="add2bind"/>
  1445. <identifierReference identifier="add2list"/>
  1446. </references>
  1447. </scriptalias>
  1448. <scriptalias name="add2list">
  1449. <description>Appends a new element to a list.</description>
  1450. <examples>
  1451. <example>
  1452. <code><![CDATA[tmp_list = []; add2list tmp_list Hello; add2list tmp_list world!; echo $tmp_list]]></code>
  1453. <explanation>Output: Hello world!</explanation>
  1454. </example>
  1455. </examples>
  1456. <arguments>
  1457. <argument token="A" description="the alias (list) to add to"/>
  1458. <argument token="E" description="the new element to add"/>
  1459. </arguments>
  1460. <references>
  1461. <identifierReference identifier="add2alias"/>
  1462. <identifierReference identifier="add2bind"/>
  1463. </references>
  1464. </scriptalias>
  1465. <command name="listoptions">
  1466. <description>Lists the argument options for several argument types.</description>
  1467. <examples>
  1468. <example>
  1469. <code><![CDATA[echo (listoptions)]]></code>
  1470. <explanation>
  1471. Output: "entities ents weapons teamnames teamnames-abbrv punctuations crosshairnames
  1472. menufilesortorders texturestacktypes cubetypes"
  1473. </explanation>
  1474. </example>
  1475. <example>
  1476. <code><![CDATA[echo (listoptions teamnames)]]></code>
  1477. <explanation>Output: "CLA RVSF CLA-SPECT RVSF-SPECT SPECTATOR"</explanation>
  1478. </example>
  1479. </examples>
  1480. </command>
  1481. <command name="escape">
  1482. <description>Replaces control characters in a string with escaped sequences.</description>
  1483. <arguments>
  1484. <argument token="S" description="string to escape"/>
  1485. </arguments>
  1486. <examples>
  1487. <example>
  1488. <code><![CDATA[echo (escape (concat (c 3) "Hello World"))]]></code>
  1489. <explanation>Output: "\f3Hello World"</explanation>
  1490. </example>
  1491. </examples>
  1492. </command>
  1493. <command name="tempalias">
  1494. <description>Creates a temporary alias that will not be written to saved.cfg, and thus will not persist after quitting.</description>
  1495. <arguments>
  1496. <argument token="N" description="temporary alias name"/>
  1497. <argument token="C" description="cubescript command(s)"/>
  1498. </arguments>
  1499. <references>
  1500. <identifierReference identifier="alias"/>
  1501. <identifierReference identifier="const"/>
  1502. </references>
  1503. </command>
  1504. <command name="editsvar">
  1505. <description>Interactively edits an existing alias in the console buffer.</description>
  1506. <remarks>
  1507. <remark>This takes the current value of the existing alias, and inserts it into the command line / text entry box.</remark>
  1508. </remarks>
  1509. <arguments>
  1510. <argument token="A" description="alias to edit" valueNotes="the alias name, without $"/>
  1511. </arguments>
  1512. <examples>
  1513. <example>
  1514. <code><![CDATA[alias test "Hello World"; editsvar test]]></code>
  1515. <explanation>Result: edit test: Hello World</explanation>
  1516. </example>
  1517. </examples>
  1518. <references>
  1519. <identifierReference identifier="editalias"/>
  1520. <identifierReference identifier="inputcommand"/>
  1521. </references>
  1522. </command>
  1523. <command name="editalias">
  1524. <description>Interactively edits an alias in the console buffer.</description>
  1525. <remarks>
  1526. <remark>This takes the current value of the alias, and inserts it into the command line / text entry box.</remark>
  1527. <remark>If the alias doesn't exist, it is created.</remark>
  1528. </remarks>
  1529. <arguments>
  1530. <argument token="A" description="alias to edit" valueNotes="the alias name, without $"/>
  1531. </arguments>
  1532. <examples>
  1533. <example>
  1534. <code><![CDATA[alias test "Hello World"; editalias test]]></code>
  1535. <explanation>Result: edit test: Hello World</explanation>
  1536. </example>
  1537. </examples>
  1538. <references>
  1539. <identifierReference identifier="editsvar"/>
  1540. <identifierReference identifier="inputcommand"/>
  1541. </references>
  1542. </command>
  1543. <command name="inputcommand">
  1544. <description>Makes an input perform a certain command.</description>
  1545. <remarks>
  1546. <remark>
  1547. It opens a custom console buffer with custom prompt, initial buffer text and execution script (which gets the input
  1548. buffer content in alias cmdbuf). If "nopersist" is not zero, the command will not be stored in console history.
  1549. </remark>
  1550. </remarks>
  1551. <arguments>
  1552. <argument token="I" description="input"/>
  1553. <argument token="C" description="command"/>
  1554. <argument token="P" description="prompt"/>
  1555. <argument token="N" description="nopersist"/>
  1556. </arguments>
  1557. <references>
  1558. <identifierReference identifier="complete"/>
  1559. <identifierReference identifier="listcomplete"/>
  1560. <identifierReference identifier="saycommand"/>
  1561. </references>
  1562. <examples>
  1563. </examples>
  1564. </command>
  1565. <command name="sortlist">
  1566. <description>Returns a sorted version of a list.</description>
  1567. <examples>
  1568. <example>
  1569. <code><![CDATA[echo (sortlist [1 3 2])]]></code>
  1570. <explanation>Output: 1 2 3</explanation>
  1571. </example>
  1572. </examples>
  1573. <arguments>
  1574. <argument token="L" description="list to sort"/>
  1575. </arguments>
  1576. </command>
  1577. <command name="isolatecontext">
  1578. <description>Isolates the given context.</description>
  1579. <remarks>
  1580. <remark>
  1581. This disables access from this context to identifiers located in other contexts,
  1582. also it removes all aliases created in this context once the running context changes.
  1583. </remark>
  1584. </remarks>
  1585. <arguments>
  1586. <argument token="C" description="context (integer or name)" valueNotes="CORE (0), CFG (1), PROMPT (2), MAPCFG (3), MDLCFG(4)"/>
  1587. </arguments>
  1588. <references>
  1589. <identifierReference identifier="scriptcontext"/>
  1590. <identifierReference identifier="sealcontexts"/>
  1591. </references>
  1592. </command>
  1593. <command name="sealcontexts">
  1594. <description>Secures this configuration for the rest of the game.</description>
  1595. <references>
  1596. <identifierReference identifier="scriptcontext"/>
  1597. <identifierReference identifier="isolatecontext"/>
  1598. </references>
  1599. </command>
  1600. <command name="scriptcontext">
  1601. <arguments>
  1602. <argument token="C" description="context (integer or name)" valueNotes="CORE (0), CFG (1), PROMPT (2), MAPCFG (3), MDLCFG(4)"/>
  1603. <argument token="N" description="id name"/>
  1604. </arguments>
  1605. <references>
  1606. <identifierReference identifier="isolatecontext"/>
  1607. <identifierReference identifier="sealcontexts"/>
  1608. </references>
  1609. </command>
  1610. </identifiers>
  1611. </section>
  1612. <!-- CubeScript language Section Ends -->
  1613. <!-- General Section Starts -->
  1614. <section name="General" sortindex="01">
  1615. <description>This section describes general identifiers.</description>
  1616. <identifiers sort="true">
  1617. <command name="setclipboardtext">
  1618. <arguments>
  1619. <argument token="T" description="Text to put in the clipboard."/>
  1620. </arguments>
  1621. </command>
  1622. <variable name="autoscreenshot">
  1623. <description>Toggle for taking an automatic screenshot during intermission.</description>
  1624. <value token="B" description="0=Off, 1=On" minValue="0" maxValue="1" defaultValue="1"/>
  1625. </variable>
  1626. <variable name="screenshottype">
  1627. <description>Toggle format of screenshot image. Your choice is for BMP (0), JPEG (1) or PNG (2).</description>
  1628. <value token="T" description="0=BMP, 1=JPEG, 2=PNG" minValue="0" maxValue="2" defaultValue="1"/>
  1629. <references>
  1630. <identifierReference identifier="getscrext"/>
  1631. </references>
  1632. </variable>
  1633. <variable name="screenshotscale">
  1634. <description>Scales screenshots by the given factor before saving. 1 = original size, 0.5 = half size, etc.</description>
  1635. <value token="S" description="Scale" minValue="0.1" maxValue="1" defaultValue="1"/>
  1636. </variable>
  1637. <command name="getscrext">
  1638. <description>Returns the file extension of the client's current screenshottype setting.</description>
  1639. <examples>
  1640. <example>
  1641. <code><![CDATA[echo (getscrext)]]></code>
  1642. <explanation>Example output: .jpg</explanation>
  1643. </example>
  1644. </examples>
  1645. <references>
  1646. <identifierReference identifier="screenshottype"/>
  1647. </references>
  1648. </command>
  1649. <variable name="jpegquality">
  1650. <description>Sets the JPEG screenshot image quality.</description>
  1651. <remarks>
  1652. <remark>The image quality is set by it's compression level, a value of 10 sets maximum compression and a small file size but results in a bad quality image</remark>
  1653. <remark>while a value of 100 results in a large file but gives the best quality image.</remark>
  1654. </remarks>
  1655. <value token="N" description="Compression level" minValue="10" maxValue="100" defaultValue="70"/>
  1656. </variable>
  1657. <variable name="pngcompress">
  1658. <description>Sets the PNG screenshot file compression.</description>
  1659. <remarks>
  1660. <remark>A value of 9 sets maximum data compression and a smaller file size while a value of 0 results in a large file image, quality is always the same since PNG its a loosless format.</remark>
  1661. </remarks>
  1662. <value token="N" description="Compression level" minValue="0" maxValue="9" defaultValue="9"/>
  1663. </variable>
  1664. <command name="writecfg">
  1665. <description>Writes current configuration to config/saved.cfg - automatic on quit.</description>
  1666. </command>
  1667. <command name="echo">
  1668. <description>Outputs text to the console.</description>
  1669. <arguments>
  1670. <argument token="L" description="List of strings"/>
  1671. </arguments>
  1672. <references>
  1673. <identifierReference identifier="hudecho"/>
  1674. </references>
  1675. </command>
  1676. <command name="hudecho">
  1677. <description>Outputs text to the console and heads up display.</description>
  1678. <arguments>
  1679. <argument token="L" description="List of strings"/>
  1680. </arguments>
  1681. <references>
  1682. <identifierReference identifier="allowhudechos"/>
  1683. <identifierReference identifier="echo"/>
  1684. </references>
  1685. </command>
  1686. <variable name="allowhudechos">
  1687. <description>Enables or disables the ability of hudecho to output text to the heads up display.</description>
  1688. <value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
  1689. <references>
  1690. <identifierReference identifier="hudecho"/>
  1691. </references>
  1692. </variable>
  1693. <command name="saycommand">
  1694. <description>Puts a prompt on screen.</description>
  1695. <remarks>
  1696. <remark>
  1697. This puts a prompt on screen that you can type into, and will capture all keystrokes until you press return (or ESC to cancel).
  1698. If what you typed started with a "/", the rest of it will be executed as a command, otherwise its something you "say" to all players.
  1699. </remark>
  1700. </remarks>
  1701. <defaultKeys>
  1702. <key alias="T" description="opens empty prompt"/>
  1703. <key alias="BACKQUOTE|SLASH|CARET" name="` or / or ^" description="opens a command prompt /"/>
  1704. <key alias="Y" description="opens a command prompt % (for team chat)"/>
  1705. <key alias="TAB" name="Tab" description="autocompletes forwards commands/variables/aliases"/>
  1706. <key alias="LSHIFT+TAB" name="left Shift + Tab" description="autocompletes backwards commands/variables/aliases"/>
  1707. <key alias="LSHIFT+ESCAPE" name="left Shift + Esc" description="resets the commandline to the state before using TAB-completion"/>
  1708. <key alias="UP" name="Up Arrow" description="browse forwards command history"/>
  1709. <key alias="DOWN" name="Down Arrow" description="browse backwards command history"/>
  1710. </defaultKeys>
  1711. <arguments>
  1712. <variableArgument token="S..." description="the text to display in the prompt" optional="true"/>
  1713. </arguments>
  1714. <references>
  1715. <identifierReference identifier="complete"/>
  1716. <identifierReference identifier="listcomplete"/>
  1717. <identifierReference identifier="inputcommand"/>
  1718. </references>
  1719. </command>
  1720. <command name="complete">
  1721. <arguments>
  1722. <argument token="C" description="command" valueNotes="any command or alias"/>
  1723. <argument token="P" description="path" valueNotes="path to search"/>
  1724. <argument token="E" description="extension" valueNotes="extension to match"/>
  1725. </arguments>
  1726. <remarks>
  1727. <remark>The completion will work on the first word of your console input.</remark>
  1728. </remarks>
  1729. <examples>
  1730. <example>
  1731. <code><![CDATA[complete demo "demos" dmo]]></code>
  1732. <explanation>If you enter "/demo " and press TAB you will cycle through all available demos.</explanation>
  1733. </example>
  1734. <example>
  1735. <code><![CDATA[alias mapcomplete [complete $arg1 "packages/maps" cgz]]]></code>
  1736. <explanation>Helper alias for quickly adding complete-definitions for all gamemodes - see config/script.cfg (below "Auto-completions").</explanation>
  1737. </example>
  1738. </examples>
  1739. <references>
  1740. <identifierReference identifier="saycommand"/>
  1741. <identifierReference identifier="listcomplete"/>
  1742. </references>
  1743. </command>
  1744. <command name="listcomplete">
  1745. <argument token="A" description="" valueNotes="value"/>
  1746. <references>
  1747. <identifierReference identifier="saycommand"/>
  1748. <identifierReference identifier="complete"/>
  1749. </references>
  1750. </command>
  1751. <command name="debugargs">
  1752. <description>Dumps all command arguments to STDOUT.</description>
  1753. <arguments>
  1754. <variableArgument token="..." description="..."/>
  1755. </arguments>
  1756. </command>
  1757. <variable name="physinterp">
  1758. <description>Toggles physics interpolation.</description>
  1759. <value token="B" description="" minValue="0" maxValue="1" defaultValue="1"/>
  1760. </variable>
  1761. <command name="millis">
  1762. <description>Returns the number of milliseconds since engine start.</description>
  1763. <examples>
  1764. <example>
  1765. <code><![CDATA[echo (millis)]]></code>
  1766. </example>
  1767. </examples>
  1768. <return token="N" description="the milliseconds"/>
  1769. </command>
  1770. <command name="systime">
  1771. <description>Seconds since the epoch (00:00:00 UTC on January 1, 1970).</description>
  1772. <examples>
  1773. <example>
  1774. <code><![CDATA[echo (systime)]]></code>
  1775. </example>
  1776. </examples>
  1777. </command>
  1778. <command name="timestamp">
  1779. <description>A list of values for current time.</description>
  1780. <remarks>
  1781. <remark>Format: YYYY mm dd HH MM SS</remark>
  1782. </remarks>
  1783. <examples>
  1784. <example>
  1785. <code><![CDATA[echo (timestamp) "2008 08 08 08 08 08"]]></code>
  1786. </example>
  1787. <example>
  1788. <code><![CDATA[echo (timestamp) "2063 04 05 12 00 00"]]></code>
  1789. </example>
  1790. <example>
  1791. <code><![CDATA[echo (at (timestamp) 0) (at (timestamp) 2) (at (timestamp) 1) "2063 05 04"]]></code>
  1792. </example>
  1793. </examples>
  1794. </command>
  1795. <command name="datestring">
  1796. <description>Representation of date.</description>
  1797. <remarks>
  1798. <remark>Format: Www Mmm dd hh:mm:ss yyyy</remark>
  1799. <remark>Use timestamp to create your own formatting.</remark>
  1800. </remarks>
  1801. <examples>
  1802. <example>
  1803. <code><![CDATA[echo (datestring) "Sat Jun 7 17:08:35 2008"]]></code>
  1804. </example>
  1805. </examples>
  1806. </command>
  1807. <command name="timestring">
  1808. <description>The current time in (H)H:MM:SS format.</description>
  1809. <examples>
  1810. <example>
  1811. <code><![CDATA[echo (timestring) "12:34:56"]]></code>
  1812. </example>
  1813. <example>
  1814. <code><![CDATA[echo (timestring) "1:02:03"]]></code>
  1815. </example>
  1816. </examples>
  1817. </command>
  1818. <command name="quit">
  1819. <description>Quits the game without asking.</description>
  1820. </command>
  1821. <command name="screenshot">
  1822. <description>Takes a screenshot.</description>
  1823. <remarks>
  1824. <remark>
  1825. Screenshots are saved to "screenshots/[date]_[time]_[map]_[mode].[ext]",
  1826. where [ext] is the image type selected.
  1827. </remark>
  1828. </remarks>
  1829. <defaultKeys>
  1830. <key alias="F12"/>
  1831. </defaultKeys>
  1832. <references>
  1833. <identifierReference identifier="cleanshot"/>
  1834. </references>
  1835. </command>
  1836. <command name="cleanshot">
  1837. <description>Takes a "clean" screenshot with no HUD items.</description>
  1838. <remarks>
  1839. <remark>Your current HUD configuration is stored into a buffer, and is re-enabled afterwards.</remark>
  1840. </remarks>
  1841. <references>
  1842. <identifierReference identifier="screenshot"/>
  1843. <identifierReference identifier="blankouthud"/>
  1844. </references>
  1845. </command>
  1846. <command name="mapshot">
  1847. <description>Saves an image of the entire radar-overview of the map.</description>
  1848. </command>
  1849. <command name="exec">
  1850. <description>Executes all commands in a specified config file.</description>
  1851. <remarks>
  1852. <remark>
  1853. It also allows to pass arguments to and deliver results from script files -
  1854. when a script file is executed, any additional arguments are passed as execarg1..execargX to the script.
  1855. The number of arguments is in execnumargs and if the script in the file sets the value of execresult,
  1856. the exec command returns that value.
  1857. </remark>
  1858. <remark>Example:</remark>
  1859. <remark>if there is a file testscript.cfg with this content: execresult = (* $execarg1 $execarg2)</remark>
  1860. <remark>then the command: "echo (exec testscript.cfg 6 7)" will output "42".</remark>
  1861. </remarks>
  1862. <arguments>
  1863. <argument token="C" description="the config file"/>
  1864. </arguments>
  1865. </command>
  1866. <command name="execdir">
  1867. <description>Executes all commands in all config files in the specified directory.</description>
  1868. <arguments>
  1869. <argument token="s" description="the directory path from the assaultcube root"/>
  1870. </arguments>
  1871. <examples>
  1872. <example>
  1873. <code><![CDATA[execdir scripts]]></code>
  1874. </example>
  1875. </examples>
  1876. <references>
  1877. <identifierReference identifier="exec"/>
  1878. </references>
  1879. </command>
  1880. <command name="run">
  1881. <description>Executes a config file within "config" folder.</description>
  1882. <arguments>
  1883. <argument token="N" description="the file name (without extension)"/>
  1884. </arguments>
  1885. </command>
  1886. <command name="resetsecuremaps">
  1887. <description>Clears the list of secured maps.</description>
  1888. <references>
  1889. <identifierReference identifier="securemap"/>
  1890. </references>
  1891. </command>
  1892. <command name="securemap">
  1893. <description>Adds a map to the list of secured maps.</description>
  1894. <remarks>
  1895. <remark>Secured maps can not be overwritten by the commands sendmap and getmap.</remark>
  1896. </remarks>
  1897. <references>
  1898. <identifierReference identifier="resetsecuremaps"/>
  1899. <identifierReference identifier="sendmap"/>
  1900. <identifierReference identifier="getmap"/>
  1901. </references>
  1902. <arguments>
  1903. <argument token="S" description="the name of the map"/>
  1904. </arguments>
  1905. </command>
  1906. <command name="getEngineState">
  1907. <description>Returns a list of values describing the current engine (rendering) state.</description>
  1908. <remarks>
  1909. <remark>It will only be filled after the first frame was drawn.</remark>
  1910. <remark>The list is: FPS LOD WQD WVT EVT</remark>
  1911. <remark>FPS = Frames Per Second</remark>
  1912. <remark>LOD = Level Of Detail</remark>
  1913. <remark>WQD = World QuaD Count</remark>
  1914. <remark>WVT = World VerTex Count </remark>
  1915. <remark>EVT = Extra VerTex Count (HUD &amp; menu)</remark>
  1916. </remarks>
  1917. <examples>
  1918. <example>
  1919. <code><![CDATA[echo (getEngineState)
  1920. ]]></code>
  1921. </example>
  1922. </examples>
  1923. </command>
  1924. <variable name="networkdebug">
  1925. <description>Enables output of processed network packets.</description>
  1926. <remarks>
  1927. <remark>This variable only has an effect if the client binary is compiled in debug mode.</remark>
  1928. </remarks>
  1929. <value token="B" description="enable network debugging" minValue="0" maxValue="1" defaultValue="0"/>
  1930. </variable>
  1931. <variable name="autogetmap">
  1932. <description>Determines if the current played map should be automatically downloaded if it is not available locally.</description>
  1933. <value token="B" description="enable auto map download" minValue="0" maxValue="1" defaultValue="1"/>
  1934. </variable>
  1935. <variable name="autogetnewmaprevisions">
  1936. <description>Automatically get new map revisions from the server.</description>
  1937. <value token="N" description="0: no, 1: yes" minValue="0" maxValue="1" defaultValue="0"/>
  1938. </variable>
  1939. <variable name="clockerror">
  1940. <description>Sets the correction value for clockfix.</description>
  1941. <remarks>
  1942. <remark>Engine source-code snippet (main.cpp): if(clockfix) millis = int(millis*(double(clockerror)/1000000));</remark>
  1943. </remarks>
  1944. <references>
  1945. <identifierReference identifier="clockfix"/>
  1946. </references>
  1947. <value token="V" description="correction value" minValue="990000" maxValue="1010000" defaultValue="1000000"/>
  1948. </variable>
  1949. <variable name="clockfix">
  1950. <description>Enables correction of the system clock.</description>
  1951. <references>
  1952. <identifierReference identifier="clockerror"/>
  1953. </references>
  1954. <value token="B" description="enable correction" minValue="0" maxValue="1" defaultValue="0"/>
  1955. </variable>
  1956. <variable name="resetcfg">
  1957. <description>Determines if all settings should be reset when the game quits.</description>
  1958. <remarks>
  1959. <remark>
  1960. It is recommended to quit the game immediately after enabling this setting. Note that the reset happens
  1961. only once as the value of this variable is reset as well.
  1962. </remark>
  1963. </remarks>
  1964. <references>
  1965. <identifierReference identifier="resetbinds"/>
  1966. <identifierReference identifier="quit"/>
  1967. </references>
  1968. <value token="B" description="enable reset" minValue="0" maxValue="1" defaultValue="0"/>
  1969. </variable>
  1970. <variable name="throttle_accel">
  1971. <description>Determines how fast network throttling accelerates.</description>
  1972. <references>
  1973. <identifierReference identifier="throttle_interval"/>
  1974. <identifierReference identifier="throttle_decel"/>
  1975. </references>
  1976. <value token="V" description="acceleration" minValue="0" maxValue="32" defaultValue="2"/>
  1977. </variable>
  1978. <variable name="throttle_decel">
  1979. <description>Determines how fast network throttling decelerates.</description>
  1980. <references>
  1981. <identifierReference identifier="throttle_accel"/>
  1982. <identifierReference identifier="throttle_interval"/>
  1983. </references>
  1984. <value token="V" description="deceleration" minValue="0" maxValue="32" defaultValue="2"/>
  1985. </variable>
  1986. <variable name="throttle_interval">
  1987. <description>Determines the interval of re-evaluating network throttling.</description>
  1988. <references>
  1989. <identifierReference identifier="throttle_accel"/>
  1990. <identifierReference identifier="throttle_decel"/>
  1991. </references>
  1992. <value token="V" description="interval" minValue="0" maxValue="30" defaultValue="5" valueNotes="seconds"/>
  1993. </variable>
  1994. <variable name="version">
  1995. <description>Gets an integer representing the game version. READ ONLY</description>
  1996. <remarks>
  1997. <remark>As example, version 1.2.0.2 is represented as value 1202.</remark>
  1998. </remarks>
  1999. <references>
  2000. <identifierReference identifier="current_version"/>
  2001. </references>
  2002. </variable>
  2003. <command name="current_version">
  2004. <description>Compare given version to current version.</description>
  2005. <remarks>
  2006. <remark>Will show update notifications if the given version is higher than the running one.</remark>
  2007. </remarks>
  2008. <arguments>
  2009. <argument token="s" description="newest available version"/>
  2010. </arguments>
  2011. </command>
  2012. <variable name="protocol">
  2013. <description>Gets an integer representing the game protocol. READ ONLY</description>
  2014. <remarks>
  2015. <remark>As example, the protocol of version 1.2.0.2 is represented as value 1201.</remark>
  2016. </remarks>
  2017. </variable>
  2018. <variable name="connected">
  2019. <description>Indicates if a connection to a server exists.</description>
  2020. <value description="the connection state" valueNotes="1 (connected), 0 (disconnected)" minValue="0" maxValue="1" defaultValue="0" readOnly="true"/>
  2021. </variable>
  2022. <variable name="numconlines">
  2023. <description>Hold the current number of lines on the console.</description>
  2024. </variable>
  2025. <variable name="conline">
  2026. <description>Returns text from the last line in the console.</description>
  2027. </variable>
  2028. <variable name="lang">
  2029. <description>Sets the language for which a translated server MOTD will be fetched, if the server has one for this language.</description>
  2030. <remarks>
  2031. <remark>This is always a two-letter language code as defined in the ISO 639 standard, three-letter codes are currently not allowed.</remark>
  2032. <remark>If lang is not set, or if the server does not have a matching MOTD file, it will fall back to English.</remark>
  2033. <remark>Note: this does not affect the client language, which is derived from the system settings (e.g. on many *nix systems, it may be changed via the "LANG" environment variable).</remark>
  2034. </remarks>
  2035. <examples>
  2036. <example>
  2037. <code>en, de, fr, ...</code>
  2038. </example>
  2039. </examples>
  2040. <value token="L" description="the language code"/>
  2041. </variable>
  2042. <variable name="applydialog">
  2043. <description>Toggles the showing of the "Apply changes now?" menu when changing certain graphical settings.</description>
  2044. <value token="N" description="1 = show, 0 = don't show" minValue="0" maxValue="1" defaultValue="1"/>
  2045. </variable>
  2046. <variable name="conopen">
  2047. <description>Indicates the state of the console.</description>
  2048. <value description="console state" minValue="0" maxValue="2" defaultValue="0" readOnly="true" valueNotes="0: closed, 1: open in an alternate size, 2: open regularly"/>
  2049. <references>
  2050. <identifierReference identifier="altconsize"/>
  2051. <identifierReference identifier="toggleconsole"/>
  2052. </references>
  2053. </variable>
  2054. <command name="history">
  2055. <description>Executes the specified command in the command line history.</description>
  2056. <remarks>
  2057. <remark>
  2058. For example, binding "history 1" to a key allows you to quickly repeat the last
  2059. command typed in (useful for placing many identical entities etc.)
  2060. </remark>
  2061. </remarks>
  2062. <arguments>
  2063. <argument token="N" description="the N'th command from the history"/>
  2064. </arguments>
  2065. </command>
  2066. <command name="conskip">
  2067. <description>Allows to browse through the console history by offsetting the console output.</description>
  2068. <defaultKeys>
  2069. <key alias="KP_MINUS" name="- on the keypad" description="scrolls backwards the console (conskip 5)"/>
  2070. <key alias="KP_PLUS" name="+ on the keypad" description="scrolls forwards the console (conskip -5)"/>
  2071. <key alias="KP_MULTIPLY" name="* on the keypad" description="resets the console (conskip -1000)"/>
  2072. <key alias="HASH|BACKSLASH+MOUSE4|MOUSE5" name="'# or \' + mouse scroll" description="scrolls the console"/>
  2073. </defaultKeys>
  2074. <arguments>
  2075. <argument token="N" description="the offset"/>
  2076. </arguments>
  2077. </command>
  2078. <variable name="maxhistory">
  2079. <description>Sets how many typed console commands to store.</description>
  2080. <remarks>
  2081. <remark>
  2082. This value sets how many command lines to store in memory, everytime a command is entered
  2083. it gets store so it can be recalled using the "/" key along with the arrow keys to scroll back and forth through the list.
  2084. </remark>
  2085. </remarks>
  2086. <value token="N" description="Total of stored commands" minValue="0" maxValue="10000" defaultValue="1000"/>
  2087. </variable>
  2088. <variable name="maxcon">
  2089. <description>Sets the total number of text lines from the console to store as history.</description>
  2090. <value token="V" description="" minValue="10" maxValue="1000" defaultValue="200"/>
  2091. </variable>
  2092. <variable name="omitunchangeddefaults">
  2093. <description>Omit variables with unchanged default values from saved.cfg.</description>
  2094. <remarks>
  2095. <remark>
  2096. If this value is 1, variables that are at their default values are omitted from saved.cfg.
  2097. If 0, the variables are written to saved.cfg, but commented out.
  2098. </remark>
  2099. </remarks>
  2100. <value token="N" description="0 = print, but commented out; 1 = omit" minValue="0" maxValue="1" defaultValue="1"/>
  2101. <references>
  2102. <identifierReference identifier="groupvariables"/>
  2103. <identifierReference identifier="omitunchangeddefaultbinds"/>
  2104. </references>
  2105. </variable>
  2106. <variable name="groupvariables">
  2107. <description>Controls how many variables (with similar names) are grouped together on one line in saved.cfg.</description>
  2108. <remarks>
  2109. <remark>This only pertains to commented variables in saved.cfg caused by omitunchangeddefaults being 0.</remark>
  2110. </remarks>
  2111. <value token="N" description="Variables per line" minValue="0" maxValue="10" defaultValue="4"/>
  2112. <references>
  2113. <identifierReference identifier="omitunchangeddefaults"/>
  2114. </references>
  2115. </variable>
  2116. <variable name="omitunchangeddefaultbinds">
  2117. <description>Omit unchanged default binds from saved.cfg.</description>
  2118. <value token="N" description="0 = print; 1 = print, but commented out; 2 = omit" minValue="0" maxValue="2" defaultValue="1"/>
  2119. <references>
  2120. <identifierReference identifier="omitunchangeddefaults"/>
  2121. </references>
  2122. </variable>
  2123. <command name="addpckserver">
  2124. <description>Adds a packages source server where to download custom content from.</description>
  2125. <remarks>
  2126. <remark>Only add servers you trust.</remark>
  2127. <remark>The list of servers is saved into config/pcksources.cfg on game quit.</remark>
  2128. <remark>
  2129. If a priority is given, it influences the sorting of servers. Servers with higher priority are queried first.
  2130. If servers have the same priority, they are sorted by ping. Default priority is zero.
  2131. </remark>
  2132. </remarks>
  2133. <arguments>
  2134. <argument token="S" description="The server address. Trailing slash not needed."/>
  2135. <argument token="P" description="priority of the server"/>
  2136. </arguments>
  2137. <examples>
  2138. <example>
  2139. <code>addpckserver http://packages.ac-akimbo.net</code>
  2140. </example>
  2141. </examples>
  2142. <references>
  2143. <identifierReference identifier="resetpckservers"/>
  2144. <identifierReference identifier="autodownload"/>
  2145. <identifierReference identifier="getpckserver"/>
  2146. </references>
  2147. </command>
  2148. <command name="getpckserver">
  2149. <description>Returns a table with four columns of all configured package servers.</description>
  2150. <remarks>
  2151. <remark>The columns are: host name, priority, ping and resolved.
  2152. "resolved" is a flag, indicating, if the server answered the ping during game start.
  2153. </remark>
  2154. </remarks>
  2155. <references>
  2156. <identifierReference identifier="addpckserver"/>
  2157. <identifierReference identifier="autodownload"/>
  2158. <identifierReference identifier="resetpckservers"/>
  2159. </references>
  2160. </command>
  2161. <command name="resetpckservers">
  2162. <description>Resets the list of packages source servers where to download custom content from.</description>
  2163. <remarks>
  2164. <remark>Restart AssaultCube to take the effect.</remark>
  2165. </remarks>
  2166. <references>
  2167. <identifierReference identifier="addpckserver"/>
  2168. <identifierReference identifier="autodownload"/>
  2169. <identifierReference identifier="getpckserver"/>
  2170. </references>
  2171. </command>
  2172. <variable name="autodownload">
  2173. <description>Determines if the game should try to download missing packages such as textures or mapmodels on the fly.</description>
  2174. <value token="V" description="Note: This is turned on by default" minValue="0" maxValue="1" defaultValue="1"/>
  2175. </variable>
  2176. <variable name="autodownloaddebug">
  2177. <description>When the variable autodownloaddebug is set to 1 and/or in debug binaries, more debug output is produced.</description>
  2178. <value token="V" description="Add debug info to autodownload" minValue="0" maxValue="1" defaultValue="0"/>
  2179. </variable>
  2180. <command name="addzipmod">
  2181. <description>Add the zip package file "mods/zipname.zip" to the virtual file system.</description>
  2182. <remarks>
  2183. <remark>
  2184. Add the zip package file "mods/zipname.zip" to the virtual file system.
  2185. Only files below the path "packages/" are added (and also files below "config/", if zipname starts with "###").
  2186. If the size of the zip file is below "zipcachemaxsize", the whole zip file is cached in memory.
  2187. (Un-cached zip files are kept open at all time, so caching keeps the number of simultaneously opened files lower.)
  2188. </remark>
  2189. </remarks>
  2190. <arguments>
  2191. <argument token="N" description="the name of the zip mod"/>
  2192. </arguments>
  2193. <references>
  2194. <identifierReference identifier="getmod"/>
  2195. <identifierReference identifier="zipcachemaxsize"/>
  2196. <identifierReference identifier="zipmodremove"/>
  2197. <identifierReference identifier="zipmodclear"/>
  2198. <identifierReference identifier="zipmodlist"/>
  2199. <identifierReference identifier="zipmodgetdesc"/>
  2200. <identifierReference identifier="zipmodgetfiles"/>
  2201. <identifierReference identifier="zipmodgetrevision"/>
  2202. </references>
  2203. </command>
  2204. <variable name="zipcachemaxsize">
  2205. <description>Maximal size of the file, which is cached in memory.</description>
  2206. <remarks>
  2207. <remark>
  2208. If the size of the zip file is below "zipcachemaxsize",
  2209. then during loading the whole zip file is cached in memory.
  2210. When the size is greater, then zip is just opened as a file and read from disk.
  2211. </remark>
  2212. </remarks>
  2213. <value token="S" description="size [kB]" minValue="0" maxValue="1024" defaultValue="512"/>
  2214. <references>
  2215. <identifierReference identifier="addzipmod"/>
  2216. </references>
  2217. </variable>
  2218. <command name="zipmodremove">
  2219. <description>Removes one zip file from the virtual file system.</description>
  2220. <arguments>
  2221. <argument token="N" description="the name of the zip mod"/>
  2222. </arguments>
  2223. <references>
  2224. <identifierReference identifier="addzipmod"/>
  2225. <identifierReference identifier="zipmodclear"/>
  2226. </references>
  2227. </command>
  2228. <command name="zipmodclear">
  2229. <description>Removes all zip files from the virtual file system.</description>
  2230. <references>
  2231. <identifierReference identifier="addzipmod"/>
  2232. <identifierReference identifier="zipmodremove"/>
  2233. </references>
  2234. </command>
  2235. <command name="zipmodlist">
  2236. <description>Lists zip files in "mods/".</description>
  2237. <remarks>
  2238. <remark>
  2239. By default or if "what" is "all", all zips are listed. If "what" is "active", only those zips,
  2240. that are already in use, are listed. If "what" is "inactive", only the unused zip files are listed.
  2241. </remark>
  2242. </remarks>
  2243. <arguments>
  2244. <argument token="W" description="what" valueNotes="all, active, inactive"/>
  2245. </arguments>
  2246. <references>
  2247. <identifierReference identifier="getmod"/>
  2248. <identifierReference identifier="addzipmod"/>
  2249. <identifierReference identifier="zipmodgetdesc"/>
  2250. <identifierReference identifier="zipmodgetfiles"/>
  2251. <identifierReference identifier="zipmodgetrevision"/>
  2252. </references>
  2253. </command>
  2254. <command name="zipmodgetdesc">
  2255. <description>Reads and returns the first 11 lines from the file "desc.txt" in the named zip file.</description>
  2256. <remarks>
  2257. <remark>
  2258. The first line is supposed to contain a descriptive title for the zip (for use in menus)
  2259. and the next 10 lines should contain a more detailed description (also for use in menus).
  2260. The command also unpacks "preview.jpg" from the zip and mounts it as a temporary file
  2261. under the name "packages/modpreviews/zipname.jpg".
  2262. </remark>
  2263. </remarks>
  2264. <arguments>
  2265. <argument token="N" description="the name of the zip mod"/>
  2266. </arguments>
  2267. <references>
  2268. <identifierReference identifier="getmod"/>
  2269. <identifierReference identifier="addzipmod"/>
  2270. <identifierReference identifier="zipmodlist"/>
  2271. <identifierReference identifier="zipmodgetfiles"/>
  2272. <identifierReference identifier="zipmodgetrevision"/>
  2273. </references>
  2274. </command>
  2275. <command name="zipmodgetfiles">
  2276. <description>Returns the list of files contained in a zip file.</description>
  2277. <arguments>
  2278. <argument token="N" description="the name of the zip mod"/>
  2279. </arguments>
  2280. <references>
  2281. <identifierReference identifier="getmod"/>
  2282. <identifierReference identifier="addzipmod"/>
  2283. <identifierReference identifier="zipmodlist"/>
  2284. <identifierReference identifier="zipmodgetdesc"/>
  2285. <identifierReference identifier="zipmodgetrevision"/>
  2286. </references>
  2287. </command>
  2288. <command name="zipmodgetrevision">
  2289. <description>Returns the revision number of the zip file.</description>
  2290. <remarks>
  2291. <remark>
  2292. The number is supposed to be part of a filename: "revision_n".
  2293. If no such file is found in the zip file, the return value is zero.
  2294. The content of the revision file is not relevant and a file size of zero is recommended.
  2295. </remark>
  2296. </remarks>
  2297. <arguments>
  2298. <argument token="N" description="the name of the zip mod"/>
  2299. </arguments>
  2300. <references>
  2301. <identifierReference identifier="getmod"/>
  2302. <identifierReference identifier="addzipmod"/>
  2303. <identifierReference identifier="zipmodlist"/>
  2304. <identifierReference identifier="zipmodgetdesc"/>
  2305. <identifierReference identifier="zipmodgetfiles"/>
  2306. </references>
  2307. </command>
  2308. <command name="demonameformat">
  2309. <description>Sets the formatstring for demo filenames.</description>
  2310. <arguments>
  2311. <argument token="S" description="string"/>
  2312. </arguments>
  2313. <remarks>
  2314. <remark>we use the following internal mapping of formatchars:</remark>
  2315. <remark>%g : gamemode (int) ; %G : gamemode (chr) ; %F : gamemode (full) ;</remark>
  2316. <remark>%m : minutes remaining ; %M : minutes played ;</remark>
  2317. <remark>%s : seconds remaining ; %S : seconds played ;</remark>
  2318. <remark>%h : IP of server ; %H : hostname of server (client only) ;</remark>
  2319. <remark>%n : mapname ;</remark>
  2320. <remark>%w : timestamp "when" (formatted by demotimeformat) .</remark>
  2321. </remarks>
  2322. <references>
  2323. <identifierReference identifier="demotimeformat"/>
  2324. </references>
  2325. </command>
  2326. <command name="demotimeformat">
  2327. <description>Sets the formatstring for demo timestamp.</description>
  2328. <arguments>
  2329. <argument token="S" description="string" valueNotes="strftime format"/>
  2330. </arguments>
  2331. <remarks>
  2332. <remark>If the string starts with 'U', UTC is used - otherwise local time.</remark>
  2333. <remark>The same format options as in strftime().</remark>
  2334. </remarks>
  2335. <references>
  2336. <identifierReference identifier="demonameformat"/>
  2337. <webReference url="http://www.cplusplus.com/reference/clibrary/ctime/strftime/" name="strftime() C++-Reference"/>
  2338. </references>
  2339. </command>
  2340. <scriptalias name="afterinit">
  2341. <description>If defined, this will be executed after saved.cfg is loaded.</description>
  2342. </scriptalias>
  2343. <scriptalias name="autoexec">
  2344. <description>If defined, this will be executed after autoexec.cfg is loaded.</description>
  2345. </scriptalias>
  2346. <command name="enumfiles">
  2347. <description>Lists files in a directory.</description>
  2348. <remarks>
  2349. <remark>If extension is specified, only files of that extension are listed.</remark>
  2350. <remark>If the extension is "dir", only directories are listed.</remark>
  2351. </remarks>
  2352. <arguments>
  2353. <argument token="P" description="path to directory"/>
  2354. <argument token="E" description="extension"/>
  2355. </arguments>
  2356. </command>
  2357. <variable name="dbgzip">
  2358. <description>Output statistics and errors when handling zip compressed data.</description>
  2359. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:yes" defaultValue="0"/>
  2360. <remarks>
  2361. <remark>Advanced usage: may be helpful in debugging map files not loading.</remark>
  2362. </remarks>
  2363. </variable>
  2364. <variable name="debugevents">
  2365. <description>Whether or not to output input events.</description>
  2366. <value token="T" description="threshhold" minValue="0" maxValue="2" valueNotes="0:off,1/2:on" defaultValue="0"/>
  2367. <remarks>
  2368. <remark>If set to at least 1 all events will output their type number. Window events and mouse button/wheel events will output status information.</remark>
  2369. <remark>If set to 2 the KEYUP, TEXTINPUT and MOUSEMOVE events will trigger status output too.</remark>
  2370. </remarks>
  2371. <references>
  2372. <identifierReference identifier=""/>
  2373. </references>
  2374. </variable>
  2375. <variable name="disconnectonmaperror">
  2376. <description>Disconnect from a server making us load an incompatible map.</description>
  2377. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:yes" defaultValue="1"/>
  2378. <remarks>
  2379. <remark>Maps that have not been converted to the new entity attribute scaling map format can cause this.</remark>
  2380. <remark>Edit it offline and make use of the config/opt/convmap.cfg.</remark>
  2381. </remarks>
  2382. </variable>
  2383. </identifiers>
  2384. </section>
  2385. <!-- General Section Ends -->
  2386. <!-- Gameplay Section Starts -->
  2387. <section name="Gameplay" sortindex="02">
  2388. <description>This section describes gameplay related identifiers.</description>
  2389. <identifiers sort="true">
  2390. <scriptalias name="start_intermission">
  2391. <description>If this alias exists it will be run when the game reaches intermission.</description>
  2392. <examples>
  2393. <example>
  2394. <code>
  2395. <![CDATA[
  2396. start_intermission = [
  2397. echo "INTERMISSION - STATISTICS TIME"
  2398. loop p 255 [
  2399. pn = (player $p name)
  2400. if (strcmp $pn "") [ ] [
  2401. echo (concatword Player $p ":") (pstat_score $p) ":" (pstat_weap $p)
  2402. ]
  2403. ]
  2404. echo "------------------------------"
  2405. ]
  2406. ]]>
  2407. </code>
  2408. <explanation>This will output the full statistics line for all players.</explanation>
  2409. </example>
  2410. </examples>
  2411. <references>
  2412. <identifierReference identifier="pstat_score"/>
  2413. <identifierReference identifier="pstat_weap"/>
  2414. </references>
  2415. </scriptalias>
  2416. <scriptalias name="mapstartonce">
  2417. <description>If this alias exists it will be run when the game starts a new map, then it is deleted.</description>
  2418. <examples>
  2419. <example>
  2420. <code>
  2421. <![CDATA[
  2422. mapstartonce = [
  2423. echo "------------------------------"
  2424. ]
  2425. ]]>
  2426. </code>
  2427. <explanation>This will output the string and override any other actions that might've been defined.</explanation>
  2428. </example>
  2429. <example>
  2430. <code>
  2431. <![CDATA[
  2432. addOnLoadOnce [
  2433. echo "------------------------------"
  2434. ]
  2435. ]]>
  2436. </code>
  2437. <explanation>This will output the string after any previously defined actions have run.</explanation>
  2438. </example>
  2439. </examples>
  2440. <references>
  2441. <identifierReference identifier="add2alias"/>
  2442. <identifierReference identifier="mapstartalways"/>
  2443. <identifierReference identifier="onNewMap"/>
  2444. </references>
  2445. </scriptalias>
  2446. <scriptalias name="mapstartalways">
  2447. <description>If this alias exists it will be run every time the game starts a new map.</description>
  2448. <examples>
  2449. <example>
  2450. <code>
  2451. <![CDATA[
  2452. mapstartalways = [
  2453. echo "------------------------------"
  2454. ]
  2455. ]]>
  2456. </code>
  2457. <explanation>This will output the string and override any other actions that might've been defined.</explanation>
  2458. </example>
  2459. <example>
  2460. <code>
  2461. <![CDATA[
  2462. addOnLoadAlways [
  2463. echo "------------------------------"
  2464. ]
  2465. ]]>
  2466. </code>
  2467. <explanation>This will output the string after any previously defined actions have run.</explanation>
  2468. </example>
  2469. </examples>
  2470. <references>
  2471. <identifierReference identifier="add2alias"/>
  2472. <identifierReference identifier="mapstartonce"/>
  2473. <identifierReference identifier="onNewMap"/>
  2474. </references>
  2475. </scriptalias>
  2476. <scriptalias name="onCallVote">
  2477. <description>If this alias exists it will be run every time a vote is called.</description>
  2478. <references>
  2479. <identifierReference identifier="onChangeVote"/>
  2480. <identifierReference identifier="onVoteEnd"/>
  2481. </references>
  2482. </scriptalias>
  2483. <scriptalias name="onChangeVote">
  2484. <description>If this alias exists it will be run every time a vote is changed.</description>
  2485. <references>
  2486. <identifierReference identifier="onCallVote"/>
  2487. <identifierReference identifier="onVoteEnd"/>
  2488. </references>
  2489. </scriptalias>
  2490. <scriptalias name="onVoteEnd">
  2491. <description>If this alias exists it will be run every time a vote passes or fails.</description>
  2492. <references>
  2493. <identifierReference identifier="onCallVote"/>
  2494. <identifierReference identifier="onChangeVote"/>
  2495. </references>
  2496. </scriptalias>
  2497. <variable name="votepending">
  2498. <description>Determines if there is a vote pending or not.</description>
  2499. <examples>
  2500. <example>
  2501. <code><![CDATA[echo $votepending]]></code>
  2502. <explanation>Output: if there is currently a vote pending, returns 1, else returns 0.</explanation>
  2503. </example>
  2504. </examples>
  2505. </variable>
  2506. <scriptalias name="onKill">
  2507. <description>If it exists, this alias will be executing when any player get killed, receiving a few arguments.</description>
  2508. <arguments>
  2509. <argument token="actor" description="The client number of the actor" valueNotes="integer"/>
  2510. <argument token="target" description="The client number of the target" valueNotes="integer"/>
  2511. <argument token="gun" description="The number of the gun used" valueNotes="integer"/>
  2512. <argument token="gib" description="Is it a gib or a normal frag" valueNotes="integer (0 or 1)"/>
  2513. </arguments>
  2514. <remarks>
  2515. <remark>Remark: it works only in singleplayer.</remark>
  2516. </remarks>
  2517. </scriptalias>
  2518. <scriptalias name="onFlag">
  2519. <arguments>
  2520. <argument token="action" description="The action that occured" valueNotes="integer (0 = stolen, 1 = dropped, 2 = lost, 3 = returned, 4 = scored, 5 = ktfscore, 6 = failed to score, 7 = reset)"/>
  2521. <argument token="actor" description="The client number of the actor" valueNotes="integer"/>
  2522. <argument token="flag" description="The flag owner team" valueNotes="integer (0 = CLA, 1 = RVSF)"/>
  2523. </arguments>
  2524. <description>If defined, this will be executed each time a flag action occurs.</description>
  2525. <remarks>
  2526. <remark>Remark: it works only in singleplayer.</remark>
  2527. </remarks>
  2528. </scriptalias>
  2529. <scriptalias name="onPickup">
  2530. <arguments>
  2531. <argument token="item" description="The item that was picked up" valueNotes="integer (0 = pistol clips, 1 = ammo box, 2 = grenade, 3 = health, 4 = helmet, 5 = armour, 6 = akimbo)"/>
  2532. <argument token="q" description="The quantity that was received"/>
  2533. </arguments>
  2534. <description>If defined, this will be executed each time you pick up an item.</description>
  2535. <remarks>
  2536. <remark>Remark: it works only in singleplayer.</remark>
  2537. </remarks>
  2538. </scriptalias>
  2539. <scriptalias name="onAttack">
  2540. <arguments>
  2541. <argument token="weapon" description="The weapon that was used"/>
  2542. </arguments>
  2543. <description>If defined, this will be executed each time you shot a bullet, throw a grenade or use your knife.</description>
  2544. <remarks>
  2545. <remark>Remark: it works only in singleplayer.</remark>
  2546. </remarks>
  2547. </scriptalias>
  2548. <scriptalias name="onHit">
  2549. <arguments>
  2550. <argument token="actor" description="The client number of the actor" valueNotes="integer"/>
  2551. <argument token="target" description="The client number of the target" valueNotes="integer"/>
  2552. <argument token="damage" description="The damage done" valueNotes="integer"/>
  2553. <argument token="gun" description="The number of the gun used" valueNotes="integer"/>
  2554. <argument token="gib" description="Is it a gib or a normal frag" valueNotes="integer (0 or 1)"/>
  2555. </arguments>
  2556. <description>If it's defined, this alias will be executed each time a damage is done.</description>
  2557. <remarks>
  2558. <remark>Remark: it works only in singleplayer.</remark>
  2559. </remarks>
  2560. </scriptalias>
  2561. <scriptalias name="onWeaponSwitch">
  2562. <arguments>
  2563. <argument token="W" description="The weapon number that you switched to"/>
  2564. </arguments>
  2565. <description>If defined, this will be executed each time you switch to a different weapon.</description>
  2566. <remarks>
  2567. <remark>Remark: it works only in singleplayer.</remark>
  2568. </remarks>
  2569. </scriptalias>
  2570. <scriptalias name="onReload">
  2571. <arguments>
  2572. <argument token="B" description="was autoreload?" valueNotes="0 (false), 1 (true)"/>
  2573. </arguments>
  2574. <description>If defined, this will be executed each time you reload a weapon.</description>
  2575. <remarks>
  2576. <remark>Remark: it works only in singleplayer.</remark>
  2577. </remarks>
  2578. </scriptalias>
  2579. <scriptalias name="onConnect">
  2580. <arguments>
  2581. <argument token="player" description="The client number of the player who connected" valueNotes="integer (-1 for local player)"/>
  2582. </arguments>
  2583. <description>If defined, this will be executed when you or another player join(s) a server.</description>
  2584. </scriptalias>
  2585. <scriptalias name="onDisconnect">
  2586. <arguments>
  2587. <argument token="player" description="The client number of the player who disconnected" valueNotes="integer (-1 for local player)"/>
  2588. </arguments>
  2589. <description>If defined, this will be executed when you or another player disconnect(s) from a server.</description>
  2590. </scriptalias>
  2591. <scriptalias name="onSpawn">
  2592. <arguments>
  2593. <argument token="player" description="The client number of the player who spawned" valueNotes="integer"/>
  2594. </arguments>
  2595. <description>If defined, this will be executed each time a player spawns.</description>
  2596. <remarks>
  2597. <remark>Remark: it works only in singleplayer.</remark>
  2598. </remarks>
  2599. </scriptalias>
  2600. <scriptalias name="onNameChange">
  2601. <arguments>
  2602. <argument token="player" description="The client number of the player who changed name" valueNotes="integer"/>
  2603. <argument token="new name" description="The new name of the client" valueNotes="string"/>
  2604. </arguments>
  2605. <description>If defined, this will be executed when you or another player change(s) his name.</description>
  2606. <remarks>
  2607. <remark>The alias is executed before the name is effectively changed, so you can still get the previous name of the client from this alias.</remark>
  2608. <remark>Remark: it works only in singleplayer.</remark>
  2609. </remarks>
  2610. </scriptalias>
  2611. <scriptalias name="onPM">
  2612. <arguments>
  2613. <argument token="player" description="The client number who sent you private message" valueNotes="integer"/>
  2614. <argument token="message" description="The private message" valueNotes="string"/>
  2615. </arguments>
  2616. <description>If defined, this will be executed when another player sent you private message.</description>
  2617. </scriptalias>
  2618. <command name="pstat_weap">
  2619. <description>Returns the shot statistics for the player with the given clientnumber.</description>
  2620. <arguments>
  2621. <argument token="C" description="client" valueNotes="0..N"/>
  2622. </arguments>
  2623. <examples>
  2624. <example>
  2625. <code>
  2626. <![CDATA[
  2627. echo (pstat_weap 0)
  2628. ]]>
  2629. </code>
  2630. <explanation>Output: 0 0 0 0 0 0 0 0 0 0 1 240 15 312 0 0 3 112 0 0</explanation>
  2631. <explanation>The output is a list of tuples for all weapons, SHOTS-FIRED and DAMAGE-DEALT for each.</explanation>
  2632. </example>
  2633. </examples>
  2634. <remarks>
  2635. <remark>The list is:</remark>
  2636. <remark>knife/atk dmg pistol/atk dmg carbine/atk dmg shotgun/atk dmg smg/atk dmg sniper/atk dmg assault/atk dmg nade/atk dmg akimbo/atk dmg</remark>
  2637. </remarks>
  2638. <references>
  2639. <identifierReference identifier="start_intermission"/>
  2640. <identifierReference identifier="pstat_score"/>
  2641. <identifierReference identifier="weapon"/>
  2642. </references>
  2643. </command>
  2644. <command name="shiftweapon">
  2645. <description>Shifts your selected weapon by a given delta.</description>
  2646. <remarks>
  2647. <remark>By default the mouse-wheel shifts one up or down according to your scroll direction.</remark>
  2648. </remarks>
  2649. <defaultKeys>
  2650. <key alias="MOUSE4" description="cycle one up"/>
  2651. <key alias="MOUSE5" description="cycle one down"/>
  2652. </defaultKeys>
  2653. <arguments>
  2654. <argument token="D" description="delta" valueNotes="-N..-1,+1..N"/>
  2655. </arguments>
  2656. </command>
  2657. <command name="setscope">
  2658. <description>Displays a scope for the sniper-rifle.</description>
  2659. <remarks>
  2660. <remark>It is used in the zoom-script (config/scripts.cfg: "const zoom").</remark>
  2661. </remarks>
  2662. <arguments>
  2663. <argument token="Y" description="scope on?" valueNotes="0 or 1"/>
  2664. </arguments>
  2665. <defaultKeys>
  2666. <key alias="MOUSE2" name="right mouse button"/>
  2667. </defaultKeys>
  2668. </command>
  2669. <command name="togglespect">
  2670. <description>Cycles through all available spectator modes.</description>
  2671. <remarks>
  2672. <remark>These modes are: Follow-1stPerson, Follow-3rdPerson, Follow-3rdPerson-transparent and Fly.</remark>
  2673. </remarks>
  2674. <defaultKeys>
  2675. <key alias="SPACE" description="cycle spectator modes"/>
  2676. </defaultKeys>
  2677. </command>
  2678. <command name="whois">
  2679. <description>Get the IP address of a given clientnumber - only admins get shown the last octet.</description>
  2680. <arguments>
  2681. <argument token="C" description="clientnum"/>
  2682. </arguments>
  2683. </command>
  2684. <command name="vote">
  2685. <description>Agree or disagree to the currently running vote.</description>
  2686. <arguments>
  2687. <argument token="V" description="vote value" valueNotes="1 (yes) OR 2 (no)"/>
  2688. </arguments>
  2689. <defaultKeys>
  2690. <key alias="F1" description="votes YES"/>
  2691. <key alias="F2" description="votes NO"/>
  2692. </defaultKeys>
  2693. </command>
  2694. <command name="gonext">
  2695. <description>Go to the next match in the servers rotation for the desired gamemode.</description>
  2696. <arguments>
  2697. <argument token="M" description="gamemode" valueNotes="0:TDM,5:CTF,10:OSOK"/>
  2698. </arguments>
  2699. <remarks>
  2700. <remark>TODO: elaborate</remark>
  2701. </remarks>
  2702. </command>
  2703. <command name="setnext">
  2704. <description>Call a vote for mode and map.</description>
  2705. <arguments>
  2706. <argument token="G" description="gamemode" valueNotes="0:TDM,5:CTF,10:OSOK"/>
  2707. <argument token="M" description="map" valueNotes="ac_mines,ac_douze,megamap"/>
  2708. </arguments>
  2709. <remarks>
  2710. <remark>TODO: elaborate</remark>
  2711. </remarks>
  2712. </command>
  2713. <command name="voicecom">
  2714. <arguments>
  2715. <argument token="S" description="sound" valueNotes="must be a registered voicecom-sound"/>
  2716. <argument token="T" description="text"/>
  2717. </arguments>
  2718. <defaultKeys>
  2719. <key alias="V" description="opens the voicecom menu, use number keys for your choice"/>
  2720. </defaultKeys>
  2721. </command>
  2722. <variable name="voicecomsounds">
  2723. <description>Enables or disables voicecom audio.</description>
  2724. <value token="N" description="voicecom sounds" minValue="0" maxValue="2" defaultValue="1"/>
  2725. <arguments>
  2726. <argument valueNotes="0 (off)"/>
  2727. <argument valueNotes="1 (always play voicecom audio)"/>
  2728. <argument valueNotes="2 (only play voicecom audio from you and your teammates)"/>
  2729. </arguments>
  2730. </variable>
  2731. <command name="loadcrosshair">
  2732. <description>Loads a crosshair for given type.</description>
  2733. <examples>
  2734. <example>
  2735. <code><![CDATA[loadcrosshair red_dot.png]]></code>
  2736. <explanation>Loads the red_dot.png crosshair for all weapons.</explanation>
  2737. </example>
  2738. <example>
  2739. <code><![CDATA[loadcrosshair default red_dot.png]]></code>
  2740. <explanation>Same as above. Loads the red_dot.png crosshair for all weapons.</explanation>
  2741. </example>
  2742. <example>
  2743. <code><![CDATA[loadcrosshair knife red_dot.png]]></code>
  2744. <explanation>Loads the red_dot.png crosshair for your knife only.</explanation>
  2745. </example>
  2746. <example>
  2747. <code><![CDATA[loadcrosshair assault red_dot.png]]></code>
  2748. <explanation>Loads the red_dot.png crosshair for your assault rifle only.</explanation>
  2749. </example>
  2750. <example>
  2751. <code><![CDATA[loadcrosshair scope red_dot.png]]></code>
  2752. <explanation>Loads the red_dot.png crosshair for your sniper rifle scope only.</explanation>
  2753. </example>
  2754. <example>
  2755. <code><![CDATA[loadcrosshair reset]]></code>
  2756. <explanation>Loads all default crosshairs (including teammate and scope).</explanation>
  2757. </example>
  2758. </examples>
  2759. <arguments>
  2760. <argument token="T" description="type" valueNotes="default, teammate, scope, edit, knife, pistol, carbine, shotgun, subgun, sniper, assault, grenade, akimbo, reset"/>
  2761. <argument token="I" description="image"/>
  2762. </arguments>
  2763. </command>
  2764. <command name="listdemos">
  2765. <description>Get the game demos listing from the server we are currently connected.</description>
  2766. <references>
  2767. <identifierReference identifier="getdemo"/>
  2768. <identifierReference identifier="cleardemo"/>
  2769. </references>
  2770. </command>
  2771. <command name="getdemo">
  2772. <description>Gets the recorded demo from a game on the server.</description>
  2773. <remarks>
  2774. <remark>If F10 is pressed earlier than two minutes into the game, the last game will be downloaded.</remark>
  2775. <remark>
  2776. If F10 is pressed later than two minutes into the game, the current game is scheduled to be automatically downloaded when it ends.
  2777. </remark>
  2778. </remarks>
  2779. <arguments>
  2780. <argument token="X" description="number in list"/>
  2781. <argument token="P" description="subpath" optional="true"/>
  2782. </arguments>
  2783. <references>
  2784. <identifierReference identifier="listdemos"/>
  2785. </references>
  2786. </command>
  2787. <command name="dropflag">
  2788. <description>Drops the taken flag.</description>
  2789. <defaultKeys>
  2790. <key alias="BACKSPACE" name="Backspace"/>
  2791. </defaultKeys>
  2792. </command>
  2793. <command name="crouch">
  2794. <description>Triggers a crouch.</description>
  2795. <defaultKeys>
  2796. <key alias="LSHIFT" name="left Shift"/>
  2797. </defaultKeys>
  2798. </command>
  2799. <command name="jump">
  2800. <description>Triggers a jump.</description>
  2801. <defaultKeys>
  2802. <key alias="SPACE|RCTRL" name="Space or right Ctrl"/>
  2803. </defaultKeys>
  2804. </command>
  2805. <command name="changefollowplayer">
  2806. <arguments>
  2807. <argument token="D" description="delta" valueNotes="how many players to shift +/-"/>
  2808. </arguments>
  2809. <references>
  2810. <identifierReference identifier="setfollowplayer"/>
  2811. </references>
  2812. </command>
  2813. <command name="setfollowplayer">
  2814. <arguments>
  2815. <argument token="C" description="clientnum" valueNotes="which player to follow"/>
  2816. </arguments>
  2817. <references>
  2818. <identifierReference identifier="changefollowplayer"/>
  2819. <identifierReference identifier="spectatecn"/>
  2820. </references>
  2821. </command>
  2822. <command name="spectatecn">
  2823. <description>Returns client number of spectated player.</description>
  2824. <references>
  2825. <identifierReference identifier="setfollowplayer"/>
  2826. </references>
  2827. </command>
  2828. <command name="teaminfo">
  2829. <description>Returns attributes of a team.</description>
  2830. <arguments>
  2831. <argument token="T" description="Team" valueNotes="cla, rvsf, 0, 1"/>
  2832. <argument token="A" description="Attribute" valueNotes="Valid attributes: flags, frags, deaths, points, name, players"/>
  2833. </arguments>
  2834. </command>
  2835. <command name="curmap">
  2836. <description>Returns the current map being played.</description>
  2837. <references>
  2838. <identifierReference identifier="gamemode"/>
  2839. <identifierReference identifier="map"/>
  2840. <identifierReference identifier="mode"/>
  2841. </references>
  2842. </command>
  2843. <variable name="curmaprevision">
  2844. <description>Current map revision number.</description>
  2845. </variable>
  2846. <command name="curmastermode">
  2847. <description>Returns the server's current mastermode state.</description>
  2848. </command>
  2849. <command name="curautoteam">
  2850. <description>Returns the server's current autoteam state.</description>
  2851. </command>
  2852. <command name="curpausemode">
  2853. <description>Returns the server's current pause state (1=paused, 0=resumed).</description>
  2854. </command>
  2855. <command name="currentprimary">
  2856. <description>Returns the weapon-index the local player currently has selected as primary.</description>
  2857. <remarks>
  2858. <remark>This is not the same as curweapon - which could be a grenade or the knife.</remark>
  2859. </remarks>
  2860. <references>
  2861. <identifierReference identifier="nextprimary"/>
  2862. <identifierReference identifier="curweapon"/>
  2863. <identifierReference identifier="prevweapon"/>
  2864. <identifierReference identifier="weapon"/>
  2865. <identifierReference identifier="magcontent"/>
  2866. <identifierReference identifier="magreserve"/>
  2867. <identifierReference identifier="hasprimary"/>
  2868. </references>
  2869. </command>
  2870. <command name="hasprimary">
  2871. <description>Determines if the local player (you) are currently carrying a primary weapon.</description>
  2872. <examples>
  2873. <example>
  2874. <code><![CDATA[add2bind MOUSE1 [ if (hasprimary) [ echo you attacked with a primary weapon ] ]]]></code>
  2875. <explanation>Everytime you press the left mouse button, assuming you are carrying your primary weapon, the above echo will be executed.</explanation>
  2876. </example>
  2877. </examples>
  2878. <references>
  2879. <identifierReference identifier="currentprimary"/>
  2880. <identifierReference identifier="curweapon"/>
  2881. <identifierReference identifier="checkmag"/>
  2882. </references>
  2883. <remarks>
  2884. <remark>Returns 0 (false) or 1 (true).</remark>
  2885. </remarks>
  2886. </command>
  2887. <command name="curserver">
  2888. <description>Returns information on the current server - if you're connected to one.</description>
  2889. <remarks>
  2890. <remark>If I is 0 (omitted or any other value than the ones below) you will get a string with 'IP PORT'</remark>
  2891. <remark>If I is 1,2 or 3 you will get the IP, HostName or port respectively.</remark>
  2892. <remark>If I is 4 you get a string representing the current state of the peer - usually this should be 'connected'.</remark>
  2893. <remark>If I is 5 you will get a server name.</remark>
  2894. <remark>If I is 6 or 7 you will get a server description.</remark>
  2895. <remark>If I is 8, you will get a serverbrowser-line with the server - this is handled with caution, sometimes empty, #8 will be outdated w/o serverbrowser open.</remark>
  2896. </remarks>
  2897. <arguments>
  2898. <argument token="I" description="info" valueNotes="0, 1, 2, 3, 4, 5, 6, 7, 8"/>
  2899. </arguments>
  2900. <examples>
  2901. <example>
  2902. <code><![CDATA[echo [I am (curserver 4) to (curserver 2)]]]></code>
  2903. <explanation>Output: I am connected to ctf-only.assault-servers.net</explanation>
  2904. </example>
  2905. <example>
  2906. <code>
  2907. <![CDATA[
  2908. last_server = ""
  2909. remember_server = [ if (strcmp (curserver 4) "connected")
  2910. [ last_server = (curserver 0) echo "I'm remembering:" $last_server ]
  2911. [ echo "you are not 'connected' - you" (concatword "are '" (curserver 4) "' !") ] ]
  2912. bind PRINT [ if (strcmp $last_server "") [ remember_server ]
  2913. [ say (concat "^L2I was just ^Lfon^L3" $last_server) last_server = "" ] ]]]></code>
  2914. <explanation>This will either remember or retrieve the last server you pressed the PrintScreen-key on.</explanation>
  2915. </example>
  2916. </examples>
  2917. </command>
  2918. <command name="curweapon">
  2919. <description>Returns the weapon-index the local player is currently holding.</description>
  2920. <references>
  2921. <identifierReference identifier="currentprimary"/>
  2922. <identifierReference identifier="nextprimary"/>
  2923. <identifierReference identifier="prevweapon"/>
  2924. <identifierReference identifier="weapon"/>
  2925. <identifierReference identifier="magcontent"/>
  2926. <identifierReference identifier="magreserve"/>
  2927. <identifierReference identifier="hasprimary"/>
  2928. </references>
  2929. </command>
  2930. <command name="prevweapon">
  2931. <description>Returns the weapon-index the local player was previously holding.</description>
  2932. <references>
  2933. <identifierReference identifier="currentprimary"/>
  2934. <identifierReference identifier="nextprimary"/>
  2935. <identifierReference identifier="curweapon"/>
  2936. <identifierReference identifier="weapon"/>
  2937. <identifierReference identifier="magcontent"/>
  2938. <identifierReference identifier="magreserve"/>
  2939. </references>
  2940. </command>
  2941. <command name="map">
  2942. <description>Loads up a map in the gamemode set previously by the 'mode' command.</description>
  2943. <remarks>
  2944. <remark>
  2945. If connected to a multiplayer server, it votes to load the map (others will have to type "map M" as well
  2946. to agree with loading this map). To vote for a map with a specific mode, set the mode before you issue the map command.
  2947. </remark>
  2948. <remark>
  2949. A map given as "blah" refers to "packages/maps/blah.cgz", "mypackage/blah" refers to "packages/mypackage/blah.cgz".
  2950. At every map load, "config/default_map_settings.cfg" is loaded which sets up all texture definitions, etc. Everything
  2951. defined there can be overridden per package or per map by creating a "mapname.cfg" which
  2952. contains whatever you want to do differently from the default.
  2953. </remark>
  2954. <remark>
  2955. When the map finishes it will load the next map when one is defined, otherwise it reloads the current map.
  2956. You can define what map follows a particular map by making an alias like (in the map script): alias nextmap_blah1 blah2
  2957. (loads "blah2" after "blah1").
  2958. </remark>
  2959. </remarks>
  2960. <arguments>
  2961. <argument token="M" description="Name of the map to load" valueNotes="string"/>
  2962. </arguments>
  2963. <references>
  2964. <identifierReference identifier="votemap"/>
  2965. <identifierReference identifier="loadmap"/>
  2966. <identifierReference identifier="mode"/>
  2967. </references>
  2968. </command>
  2969. <command name="votemap">
  2970. <description>Sets the next gamemode then calls a vote for a map.</description>
  2971. <arguments>
  2972. <argument token="I" description="mode id"/>
  2973. <argument token="M" description="map name"/>
  2974. </arguments>
  2975. <references>
  2976. <identifierReference identifier="map"/>
  2977. <identifierReference identifier="loadmap"/>
  2978. <identifierReference identifier="mode"/>
  2979. </references>
  2980. </command>
  2981. <command name="loadmap">
  2982. <description>Loads a map directly in the current gamemode (singleplayer only).</description>
  2983. <arguments>
  2984. <argument token="M" description="map name"/>
  2985. </arguments>
  2986. <references>
  2987. <identifierReference identifier="map"/>
  2988. <identifierReference identifier="votemap"/>
  2989. <identifierReference identifier="mode"/>
  2990. </references>
  2991. </command>
  2992. <variable name="nextprimary">
  2993. <description>Sets the primary weapon on next respawn.</description>
  2994. <arguments>
  2995. <argument token="A" description="the weapon number or name" valueNotes="2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault)"/>
  2996. </arguments>
  2997. </variable>
  2998. <command name="reload">
  2999. <description>Reloads the weapon.</description>
  3000. <arguments>
  3001. <argument token="A" description="" valueNotes="value"/>
  3002. </arguments>
  3003. <defaultKeys>
  3004. <key alias="R"/>
  3005. </defaultKeys>
  3006. <references>
  3007. <identifierReference identifier="autoreload"/>
  3008. </references>
  3009. </command>
  3010. <command name="name">
  3011. <description>Sets the nick name for the local player.</description>
  3012. <arguments>
  3013. <argument token="N" description="the name"/>
  3014. </arguments>
  3015. <references>
  3016. <identifierReference identifier="curname"/>
  3017. </references>
  3018. </command>
  3019. <variable name="curname">
  3020. <description>Returns the nick name of the local player.</description>
  3021. <references>
  3022. <identifierReference identifier="name"/>
  3023. </references>
  3024. </variable>
  3025. <command name="say">
  3026. <description>Outputs text to other players.</description>
  3027. <remarks>
  3028. <remark>
  3029. If the text begins with a percent character (%),
  3030. only team mates will receive the message.
  3031. </remark>
  3032. </remarks>
  3033. <arguments>
  3034. <variableArgument token="S..." description="the text"/>
  3035. </arguments>
  3036. </command>
  3037. <command name="pm">
  3038. <description>Sends a private message to a specified client.</description>
  3039. <arguments>
  3040. <argument token="C" description="Client number"/>
  3041. <argument token="L" description="List of strings"/>
  3042. </arguments>
  3043. <references>
  3044. <identifierReference identifier="say"/>
  3045. <identifierReference identifier="quickanswer"/>
  3046. <identifierReference identifier="lastpm"/>
  3047. </references>
  3048. </command>
  3049. <variable name="lastpm">
  3050. <description>Holds the CN of the last client who sent you a private message.</description>
  3051. <references>
  3052. <identifierReference identifier="pm"/>
  3053. <identifierReference identifier="quickanswer"/>
  3054. </references>
  3055. <remarks>
  3056. <remark>If you haven't recieved any private messages, 'lastpm' is -1</remark>
  3057. </remarks>
  3058. </variable>
  3059. <command name="quickanswer">
  3060. <description>Easily respond the last client who sent you a private message.</description>
  3061. <defaultKeys>
  3062. <key alias="N"/>
  3063. </defaultKeys>
  3064. <references>
  3065. <identifierReference identifier="pm"/>
  3066. <identifierReference identifier="lastpm"/>
  3067. </references>
  3068. </command>
  3069. <command name="ignore">
  3070. <description>Ignore a player.</description>
  3071. <arguments>
  3072. <argument token="A" description="client number"/>
  3073. </arguments>
  3074. <remarks>
  3075. <remark>You won't see any further game chat or hear any more voice com messages from that player.</remark>
  3076. </remarks>
  3077. </command>
  3078. <command name="listignored">
  3079. <description>Print a list of all players that you are currently ignoring.</description>
  3080. </command>
  3081. <command name="clearignored">
  3082. <description>Clear list of ignored players.</description>
  3083. <arguments>
  3084. <argument token="A" description="client number, or -1 to clear the whole list"/>
  3085. </arguments>
  3086. <remarks>
  3087. <remark>Omit the client number to clear the whole list.</remark>
  3088. </remarks>
  3089. </command>
  3090. <command name="ignoreall">
  3091. <description>Ignore all clients currently on the server.</description>
  3092. <references>
  3093. <identifierReference identifier="unignoreall"/>
  3094. <identifierReference identifier="ignoreteam"/>
  3095. <identifierReference identifier="ignoreenemy"/>
  3096. </references>
  3097. </command>
  3098. <command name="unignoreall">
  3099. <description>Unignore all clients currently on the server.</description>
  3100. <references>
  3101. <identifierReference identifier="ignoreall"/>
  3102. <identifierReference identifier="ignoreteam"/>
  3103. <identifierReference identifier="ignoreenemy"/>
  3104. </references>
  3105. </command>
  3106. <command name="ignoreteam">
  3107. <description>Ignore all clients on the specified team.</description>
  3108. <references>
  3109. <identifierReference identifier="ignoreall"/>
  3110. <identifierReference identifier="unignoreall"/>
  3111. <identifierReference identifier="ignoreenemy"/>
  3112. </references>
  3113. <arguments>
  3114. <argument token="T" description="the team to ignore" valueNotes="0 or 1 || cla or rvsf"/>
  3115. </arguments>
  3116. </command>
  3117. <command name="ignoreenemy">
  3118. <description>Ignore all clients on the enemy team.</description>
  3119. <references>
  3120. <identifierReference identifier="ignoreall"/>
  3121. <identifierReference identifier="unignoreall"/>
  3122. <identifierReference identifier="ignoreteam"/>
  3123. </references>
  3124. </command>
  3125. <command name="muteplayer">
  3126. <description>Mutes a player.</description>
  3127. <arguments>
  3128. <argument token="A" description="client number"/>
  3129. </arguments>
  3130. <remarks>
  3131. <remark>You won't hear any further voice com messages from that player.</remark>
  3132. </remarks>
  3133. </command>
  3134. <command name="clearmuted">
  3135. <description>Clears a list of muted players.</description>
  3136. <arguments>
  3137. <argument token="A" description="client number, or -1 to clear the whole list"/>
  3138. </arguments>
  3139. <remarks>
  3140. <remark>Omit the client number to clear the whole list.</remark>
  3141. </remarks>
  3142. </command>
  3143. <command name="listmuted">
  3144. <description>Prints a list of all players that you have muted.</description>
  3145. </command>
  3146. <command name="me">
  3147. <description>Action chat message.</description>
  3148. <arguments>
  3149. <variableArgument token="..." description="..."/>
  3150. </arguments>
  3151. </command>
  3152. <command name="nickcomplete">
  3153. <argument token="C" description="command" valueNotes="any command or alias"/>
  3154. <description>Adds a command to complete nicknames on.</description>
  3155. <remarks>
  3156. <remark>Your own nick will be ignored.</remark>
  3157. </remarks>
  3158. <examples>
  3159. <example>
  3160. <code><![CDATA[nickgreet = [ say (concat "Hello," (concatword $arg1 "!")) ]; nickcomplete nickgreet]]></code>
  3161. <explanation>with this you can enter "/nickgreet " and cycle via TAB to the nickname you want to greet.</explanation>
  3162. </example>
  3163. </examples>
  3164. <references>
  3165. <identifierReference identifier="complete"/>
  3166. </references>
  3167. </command>
  3168. <command name="connect">
  3169. <description>Connects to a server.</description>
  3170. <remarks>
  3171. <remark>
  3172. If the server name is omitted, the client will try to connect to an available server in the LAN.
  3173. If the port is omitted or set to 0, the default port will be used.
  3174. </remark>
  3175. </remarks>
  3176. <examples>
  3177. <example>
  3178. <code><![CDATA[connect 127.0.0.1 555 myServerPassword]]></code>
  3179. </example>
  3180. </examples>
  3181. <references>
  3182. <identifierReference identifier="connectadmin"/>
  3183. <identifierReference identifier="disconnect"/>
  3184. <identifierReference identifier="reconnect"/>
  3185. </references>
  3186. <arguments>
  3187. <argument token="N" description="the address of the server (hostname or IP)" optional="true"/>
  3188. <argument token="O" description="the port" optional="true"/>
  3189. <argument token="P" description="the server password" optional="true"/>
  3190. </arguments>
  3191. </command>
  3192. <command name="connectadmin">
  3193. <description>Connects to a server and tries to claim admin state.</description>
  3194. <remarks>
  3195. <remark>
  3196. This command will connect to a server just like the command 'connect' and
  3197. try to claim admin state. If the specified password is correct, the admin
  3198. will be able to connect even if he is locked out by ban, private master mode or taken client slots.
  3199. If successfully connected, bans assigned to the admin's host will be removed automatically. If all
  3200. client slots are taken a random client will be kicked to let the admin in.
  3201. </remark>
  3202. <remark>
  3203. If the server name ist omitted, the client will try to connect to an available server in the LAN.
  3204. If the port is omitted or set to 0, the default port will be used.
  3205. </remark>
  3206. </remarks>
  3207. <examples>
  3208. <example>
  3209. <code><![CDATA[connectadmin 127.0.0.1 777 myAdminPassword]]></code>
  3210. <explanation>connect as admin on port 777 of localhost</explanation>
  3211. </example>
  3212. <example>
  3213. <code><![CDATA[connectadmin "" 0 myAdminPassword]]></code>
  3214. <explanation>will try to connect to a LAN server on the default port as admin with the given password of "myAdminPassword".</explanation>
  3215. </example>
  3216. </examples>
  3217. <references>
  3218. <identifierReference identifier="connect"/>
  3219. <identifierReference identifier="disconnect"/>
  3220. <identifierReference identifier="reconnect"/>
  3221. </references>
  3222. <arguments>
  3223. <argument token="N" description="the address of the server (hostname or IP)" optional="true"/>
  3224. <argument token="O" description="the port" optional="true"/>
  3225. <argument token="P" description="the admin password"/>
  3226. </arguments>
  3227. </command>
  3228. <command name="disconnect">
  3229. <description>Leaves a server.</description>
  3230. <references>
  3231. <identifierReference identifier="reconnect"/>
  3232. <identifierReference identifier="connect"/>
  3233. <identifierReference identifier="connectadmin"/>
  3234. </references>
  3235. </command>
  3236. <command name="reconnect">
  3237. <description>Disconnects then reconnects you to the current server.</description>
  3238. <arguments>
  3239. <argument token="P" description="the server password" optional="true"/>
  3240. </arguments>
  3241. <references>
  3242. <identifierReference identifier="disconnect"/>
  3243. <identifierReference identifier="connect"/>
  3244. <identifierReference identifier="connectadmin"/>
  3245. </references>
  3246. </command>
  3247. <command name="lanconnect">
  3248. <description>Tries to connect to a LAN server.</description>
  3249. </command>
  3250. <command name="team">
  3251. <description>Sets the team for the local player.</description>
  3252. <examples>
  3253. <example>
  3254. <code><![CDATA[team CLA]]></code>
  3255. </example>
  3256. </examples>
  3257. <arguments>
  3258. <argument token="N" description="the team number or name" valueNotes="0 (CLA), 1 (RVSF), 2 (CLA-SPECT), 3 (RVSF-SPECT), 4 (SPECTATOR)"/>
  3259. </arguments>
  3260. <references>
  3261. <identifierReference identifier="changeteam"/>
  3262. </references>
  3263. </command>
  3264. <variable name="changeteam">
  3265. <description>Swaps your player to the enemy team.</description>
  3266. <references>
  3267. <identifierReference identifier="team"/>
  3268. </references>
  3269. </variable>
  3270. <command name="benchme">
  3271. <description>Moves from active team to spectator during match.</description>
  3272. </command>
  3273. <command name="modconnect">
  3274. <description>Connects to a modded server.</description>
  3275. <arguments>
  3276. <argument token="A" description="IP"/>
  3277. <argument token="B" description="port"/>
  3278. <argument token="C" description="password"/>
  3279. </arguments>
  3280. <remarks>
  3281. <remark>
  3282. The modified server needs to use the original client-server protocol. The protocol version number
  3283. will be the negated value of an unmodded server.
  3284. </remark>
  3285. </remarks>
  3286. </command>
  3287. <command name="modconnectadmin">
  3288. <description>Connects to a modded server and tries to claim admin state.</description>
  3289. <arguments>
  3290. <argument token="A" description="IP"/>
  3291. <argument token="B" description="port"/>
  3292. <argument token="C" description="admin password"/>
  3293. </arguments>
  3294. <remarks>
  3295. <remark>
  3296. The modified server needs to use the original client-server protocol. The protocol version number
  3297. will be the negated value of an unmodded server.
  3298. </remark>
  3299. </remarks>
  3300. </command>
  3301. <command name="modlanconnect">
  3302. <description>Tries to connect to a modified LAN server.</description>
  3303. <remarks>
  3304. <remark>
  3305. The modified server needs to use the original client-server protocol. The protocol version number
  3306. will be the negated value of an unmodded server.
  3307. </remark>
  3308. </remarks>
  3309. </command>
  3310. <variable name="akimboautoswitch">
  3311. <description>Whether or not to automatically switch to akimbo upon pickup.</description>
  3312. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:yes" defaultValue="1"/>
  3313. <remarks>
  3314. <remark>If you are brandishing your pistol while walking over the pickup you will switch to akimbo every time.</remark>
  3315. </remarks>
  3316. </variable>
  3317. <command name="weapon">
  3318. <description>Changes the weapon (must be bound to a key).</description>
  3319. <arguments>
  3320. <argument token="N" description="the number/name of available weapon" valueNotes="0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)"/>
  3321. </arguments>
  3322. </command>
  3323. <command name="primary">
  3324. <description>Switches to your current primary weapon (must be bound to a key).</description>
  3325. <defaultKeys>
  3326. <key alias="1"/>
  3327. </defaultKeys>
  3328. <references>
  3329. <identifierReference identifier="secondary"/>
  3330. <identifierReference identifier="melee"/>
  3331. <identifierReference identifier="grenades"/>
  3332. </references>
  3333. </command>
  3334. <command name="secondary">
  3335. <description>Switches to your secondary weapon (must be bound to a key).</description>
  3336. <defaultKeys>
  3337. <key alias="2"/>
  3338. </defaultKeys>
  3339. <references>
  3340. <identifierReference identifier="primary"/>
  3341. <identifierReference identifier="melee"/>
  3342. <identifierReference identifier="grenades"/>
  3343. </references>
  3344. </command>
  3345. <command name="melee">
  3346. <description>Switches to knife (must be bound to a key).</description>
  3347. <defaultKeys>
  3348. <key alias="4" description="switches to knife"/>
  3349. <key alias="MOUSE3" name="middle mouse button" description="switches to knife and attacks (if the key is held)"/>
  3350. </defaultKeys>
  3351. <references>
  3352. <identifierReference identifier="primary"/>
  3353. <identifierReference identifier="secondary"/>
  3354. <identifierReference identifier="grenades"/>
  3355. </references>
  3356. </command>
  3357. <command name="grenades">
  3358. <description>Switches to grenades, if available (must be bound to a key).</description>
  3359. <remarks>
  3360. <remark>See also "quicknadethrow" command.</remark>
  3361. </remarks>
  3362. <defaultKeys>
  3363. <key alias="3" description="switches to grenades"/>
  3364. </defaultKeys>
  3365. <references>
  3366. <identifierReference identifier="primary"/>
  3367. <identifierReference identifier="secondary"/>
  3368. <identifierReference identifier="melee"/>
  3369. <identifierReference identifier="quicknadethrow"/>
  3370. </references>
  3371. </command>
  3372. <command name="sndtoggle">
  3373. <description>Toggles between your primary weapon and secondary weapon (must be bound to a key).</description>
  3374. <references>
  3375. <identifierReference identifier="knftoggle"/>
  3376. <identifierReference identifier="gndtoggle"/>
  3377. </references>
  3378. </command>
  3379. <command name="knftoggle">
  3380. <description>Toggles between your primary weapon and knife (must be bound to a key).</description>
  3381. <references>
  3382. <identifierReference identifier="sndtoggle"/>
  3383. <identifierReference identifier="gndtoggle"/>
  3384. </references>
  3385. </command>
  3386. <command name="gndtoggle">
  3387. <description>Toggles between your primary weapon and grenades (must be bound to a key).</description>
  3388. <references>
  3389. <identifierReference identifier="sndtoggle"/>
  3390. <identifierReference identifier="knftoggle"/>
  3391. </references>
  3392. </command>
  3393. <command name="magcontent">
  3394. <description>Returns contents of current magazine.</description>
  3395. <remarks>
  3396. <remark>A knife will always return 1.</remark>
  3397. <remark>Weapons that aren't available will return -1.</remark>
  3398. </remarks>
  3399. <references>
  3400. <identifierReference identifier="curweapon"/>
  3401. <identifierReference identifier="currentprimary"/>
  3402. <identifierReference identifier="nextprimary"/>
  3403. <identifierReference identifier="prevweapon"/>
  3404. <identifierReference identifier="weapon"/>
  3405. <identifierReference identifier="magreserve"/>
  3406. </references>
  3407. <arguments>
  3408. <argument token="N" description="the weapon number or name" valueNotes="0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)"/>
  3409. </arguments>
  3410. </command>
  3411. <command name="magreserve">
  3412. <description>Returns contents of magazine reserve.</description>
  3413. <references>
  3414. <identifierReference identifier="curweapon"/>
  3415. <identifierReference identifier="currentprimary"/>
  3416. <identifierReference identifier="nextprimary"/>
  3417. <identifierReference identifier="prevweapon"/>
  3418. <identifierReference identifier="weapon"/>
  3419. <identifierReference identifier="magcontent"/>
  3420. </references>
  3421. <arguments>
  3422. <argument token="N" description="the weapon number or name" valueNotes="0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)"/>
  3423. </arguments>
  3424. </command>
  3425. <command name="checkmag">
  3426. <description>Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve)</description>
  3427. <references>
  3428. <identifierReference identifier="magcontent"/>
  3429. <identifierReference identifier="magreserve"/>
  3430. </references>
  3431. <arguments>
  3432. <argument token="N" description="the weapon number or name" valueNotes="0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)"/>
  3433. </arguments>
  3434. </command>
  3435. <command name="getmap">
  3436. <description>Retrieves the last map that was sent to the server using 'sendmap'.</description>
  3437. <remarks>
  3438. <remark>If the command is passed an argument, different than the map being played, the game tries to download the specified map from an available packages source server.</remark>
  3439. </remarks>
  3440. <references>
  3441. <identifierReference identifier="sendmap"/>
  3442. <identifierReference identifier="dlmap"/>
  3443. </references>
  3444. <arguments>
  3445. <argument token="S" description="the name of the map"/>
  3446. <argument token="C" description="cubescript to execute once map is installed" optional="true"/>
  3447. </arguments>
  3448. </command>
  3449. <command name="dlmap">
  3450. <description>Downloads and loads the specified map from an available packages source server.</description>
  3451. <arguments>
  3452. <argument token="S" description="the name of the map"/>
  3453. </arguments>
  3454. <references>
  3455. <identifierReference identifier="getmap"/>
  3456. <identifierReference identifier="sendmap"/>
  3457. </references>
  3458. </command>
  3459. <command name="getmod">
  3460. <description>Try to download mods/modname.zip from all configured package servers.</description>
  3461. <remarks>
  3462. <remark>Does not automatically activate the mod.</remark>
  3463. </remarks>
  3464. <arguments>
  3465. <argument token="N" description="the name of the mod"/>
  3466. </arguments>
  3467. <references>
  3468. <identifierReference identifier="addzipmod"/>
  3469. </references>
  3470. </command>
  3471. <command name="spectatemode">
  3472. <description>Sets the desired spectating mode.</description>
  3473. <arguments>
  3474. <argument token="M" description="the mode" valueNotes="2 (1st-person), 3 (3rd-person), 4 (3rd-person transparent), 5 (free flying)"/>
  3475. </arguments>
  3476. <defaultKeys>
  3477. <key alias="SPACE" description="switch spectator mode"/>
  3478. </defaultKeys>
  3479. <references>
  3480. <identifierReference identifier="spectate"/>
  3481. </references>
  3482. </command>
  3483. <command name="spectate">
  3484. <description>Toggles spectator mode.</description>
  3485. <references>
  3486. <identifierReference identifier="spectatemode"/>
  3487. <identifierReference identifier="spectatepersistent"/>
  3488. </references>
  3489. </command>
  3490. <variable name="spectatepersistent">
  3491. <description>Enables persistent spectating concrete player.</description>
  3492. <remarks>
  3493. <remark>
  3494. For "spectatepersistent" = 1 persistent spectating is enabled in all game modes in multiplayer (that means,
  3495. that spectated player isn't changed after his death), for "0" it is enabled only in non-arena modes.
  3496. </remark>
  3497. </remarks>
  3498. <value token="N" description="0: enabled in non-arena modes, 1: always enabled" minValue="0" maxValue="1" defaultValue="1"/>
  3499. <references>
  3500. <identifierReference identifier="spectate"/>
  3501. </references>
  3502. </variable>
  3503. <command name="stopdemo">
  3504. <description>Stops demo playback.</description>
  3505. </command>
  3506. <command name="watchingdemo">
  3507. <description>Returns 1 when the current game is being played from a demo, else 0.</description>
  3508. <examples>
  3509. <example>
  3510. <code><![CDATA[echo I am (at [not now] (watchingdemo)) watching a demo. "so, are you?"]]></code>
  3511. </example>
  3512. </examples>
  3513. <return token="B" description="truth value"/>
  3514. </command>
  3515. <command name="suicide">
  3516. <description>Kills your player. You will lose 1 frag point and receive 1 death point when using this command.</description>
  3517. </command>
  3518. <command name="demo">
  3519. <description>Plays a recorded demo.</description>
  3520. <remarks>
  3521. <remark>Playback is interpolated for the player whose perspective you view.</remark>
  3522. </remarks>
  3523. <arguments>
  3524. <argument token="S" description="the demo name"/>
  3525. </arguments>
  3526. <references>
  3527. <identifierReference identifier="setmr"/>
  3528. <identifierReference identifier="rewind"/>
  3529. <identifierReference identifier="curdemofile"/>
  3530. </references>
  3531. </command>
  3532. <command name="setmr">
  3533. <description>Go to a predefined number of minutes before the end of the game while watching a demo.</description>
  3534. <arguments>
  3535. <argument token="M" description="the minutes remaining to skip to"/>
  3536. </arguments>
  3537. <references>
  3538. <identifierReference identifier="demo"/>
  3539. <identifierReference identifier="rewind"/>
  3540. </references>
  3541. </command>
  3542. <command name="rewind">
  3543. <description>Rewind the current demo to S seconds ago.</description>
  3544. <remarks>
  3545. <remark>Note: you can use a negative value to forward.</remark>
  3546. </remarks>
  3547. <arguments>
  3548. <argument token="S" description="the number of seconds to rewind"/>
  3549. </arguments>
  3550. <references>
  3551. <identifierReference identifier="demo"/>
  3552. <identifierReference identifier="setmr"/>
  3553. </references>
  3554. </command>
  3555. <variable name="curdemofile">
  3556. <description>Returns the name of played demo.</description>
  3557. <references>
  3558. <identifierReference identifier="demo"/>
  3559. </references>
  3560. </variable>
  3561. <variable name="minutesremaining">
  3562. <description>Returns the remaining minutes of the currently played game. READ ONLY</description>
  3563. <references>
  3564. <identifierReference identifier="gametimecurrent"/>
  3565. <identifierReference identifier="gametimemaximum"/>
  3566. <identifierReference identifier="lastgametimeupdate"/>
  3567. <identifierReference identifier="millis"/>
  3568. </references>
  3569. </variable>
  3570. <variable name="gametimecurrent">
  3571. <description>Returns the time (in milliseconds) of the currently played game. READ ONLY</description>
  3572. <examples>
  3573. <example>
  3574. <code>
  3575. <![CDATA[showtime = [
  3576. if (> $lastgametimeupdate 0) [
  3577. gmr = (- $gametimemaximum (+ $gametimecurrent (- (millis) $lastgametimeupdate)))
  3578. gsr = (div $gmr 1000)
  3579. gts = (mod $gsr 60)
  3580. if (< $gts 10) [ gts = (concatword 0 $gts) ] [ ]
  3581. gtm = (div $gsr 60)
  3582. if (< $gtm 10) [ gtm = (concatword 0 $gtm) ] [ ]
  3583. echo (concatword $gtm : $gts) remaining
  3584. ] [
  3585. echo gametime not updated yet
  3586. ]
  3587. ]]]>
  3588. </code>
  3589. </example>
  3590. </examples>
  3591. <references>
  3592. <identifierReference identifier="minutesremaining"/>
  3593. <identifierReference identifier="gametimemaximum"/>
  3594. <identifierReference identifier="lastgametimeupdate"/>
  3595. <identifierReference identifier="millis"/>
  3596. </references>
  3597. </variable>
  3598. <variable name="gametimemaximum">
  3599. <description>Returns the maximum time (in milliseconds) of the currently played game. READ ONLY</description>
  3600. <references>
  3601. <identifierReference identifier="minutesremaining"/>
  3602. <identifierReference identifier="gametimecurrent"/>
  3603. <identifierReference identifier="lastgametimeupdate"/>
  3604. <identifierReference identifier="millis"/>
  3605. </references>
  3606. </variable>
  3607. <variable name="gametimestart">
  3608. <description>Returns the time (in milliseconds) when the last map was loaded.</description>
  3609. <references>
  3610. <identifierReference identifier="minutesremaining"/>
  3611. <identifierReference identifier="gametimecurrent"/>
  3612. <identifierReference identifier="lastgametimeupdate"/>
  3613. <identifierReference identifier="millis"/>
  3614. </references>
  3615. </variable>
  3616. <variable name="lastgametimeupdate">
  3617. <description>Returns the last time (in milliseconds) the gametime was updated. READ ONLY</description>
  3618. <references>
  3619. <identifierReference identifier="minutesremaining"/>
  3620. <identifierReference identifier="gametimecurrent"/>
  3621. <identifierReference identifier="gametimemaximum"/>
  3622. <identifierReference identifier="millis"/>
  3623. </references>
  3624. </variable>
  3625. <variable name="paused">
  3626. <description>Determines if the singleplayer game should be paused.</description>
  3627. <value token="B" description="pause game" minValue="0" maxValue="1" defaultValue="0"/>
  3628. <defaultKeys>
  3629. <key alias="PAUSE" name="Pause"/>
  3630. </defaultKeys>
  3631. </variable>
  3632. <command name="pause">
  3633. <description>Vote to pause or resume the match.</description>
  3634. <remarks>
  3635. <remark>This command is only supported on servers that are in 'match' mastermode.</remark>
  3636. <remark>You can use the alias 'togglepause' to switch between pause and resume.</remark>
  3637. </remarks>
  3638. <arguments>
  3639. <argument token="P" description="pause or resume" valueNotes="1 (pause) or 0 (resume)"/>
  3640. </arguments>
  3641. <references>
  3642. <identifierReference identifier="mastermode"/>>
  3643. </references>
  3644. </command>
  3645. <variable name="autoreload">
  3646. <description>Indicates if the weapons should be reloaded automatically.</description>
  3647. <value token="B" description="the autoreload state" minValue="0" maxValue="1" defaultValue="1" valueNotes="0: off, 1: on"/>
  3648. <references>
  3649. <identifierReference identifier="reload"/>
  3650. </references>
  3651. </variable>
  3652. <variable name="scopefov">
  3653. <description>Determines the FOV when scoping.</description>
  3654. <references>
  3655. <identifierReference identifier="fov"/>
  3656. </references>
  3657. <value token="V" description="" minValue="5" maxValue="60" defaultValue="50"/>
  3658. </variable>
  3659. <variable name="gamespeed">
  3660. <description>Sets the gamespeed in percent.</description>
  3661. <remarks>
  3662. <remark>This does not work in multiplayer.</remark>
  3663. </remarks>
  3664. <value token="N" description="the game speed" minValue="10" maxValue="1000" defaultValue="100"/>
  3665. </variable>
  3666. <variable name="flyspeed">
  3667. <description>Determines by how much to multiply the fly speeds by.</description>
  3668. <value token="N" description="the multiplier" minValue="1.0" maxValue="5.0" defaultValue="2.0"/>
  3669. </variable>
  3670. <variable name="akimboendaction">
  3671. <description>Sets the behavior of weapon switching upon akimbo expiration.</description>
  3672. <value token="N" description="akimbo end action" minValue="0" maxValue="3" defaultValue="3"/>
  3673. <arguments>
  3674. <argument token="N" description="switch to knife" valueNotes="0"/>
  3675. <argument token="N" description="stay with pistol" valueNotes="1"/>
  3676. <argument token="N" description="switch to grenades" valueNotes="2"/>
  3677. <argument token="N" description="switch to primary" valueNotes="3"/>
  3678. </arguments>
  3679. <remarks>
  3680. <remark>If no ammunition is detected for the target weapon, it will fallback to the previous weapon until it finds a weapon with ammunition to use.</remark>
  3681. </remarks>
  3682. </variable>
  3683. <command name="drawzone">
  3684. <description>Draws a zone marker with the specified color and dimensions on the minimap/radar.</description>
  3685. <remarks>
  3686. <remark>This is primarily intended for the survival mode.</remark>
  3687. <remark>You can draw a few zones at a time. They will be reset (i.e. removed) once a new game starts.</remark>
  3688. <remark>Note that the coordinates must be specified as integers, not as floating-point values.</remark>
  3689. </remarks>
  3690. <arguments>
  3691. <argument token="X1" description="X-coordinate - top-left corner"/>
  3692. <argument token="X2" description="X-coordinate - bottom-right corner"/>
  3693. <argument token="Y1" description="Y-coordinate - top-left corner"/>
  3694. <argument token="Y2" description="Y-coordinate - bottom-right corner"/>
  3695. <argument token="C" description="a color for the zone, in hexadecimal notation" valueNotes="default: 0x00FF00 (green)"/>
  3696. </arguments>
  3697. <references>
  3698. <identifierReference identifier="resetzones"/>
  3699. <identifierReference identifier="survival"/>
  3700. </references>
  3701. </command>
  3702. <command name="resetzones">
  3703. <description>Reset all drawn zones.</description>
  3704. <references>
  3705. <identifierReference identifier="drawzone"/>
  3706. <identifierReference identifier="survival"/>
  3707. </references>
  3708. </command>
  3709. <scriptalias name="onLastMin">
  3710. <description>If this alias exists, it will be automatically executed on the last minute remaining mark.</description>
  3711. </scriptalias>
  3712. <command name="curplayers">
  3713. <description>Returns the size of the players vector.</description>
  3714. <remarks>
  3715. <remark>
  3716. The return value includes the local player "(you)" and works in both singleplayer and multiplayer scenarios.
  3717. It can be used, for example, in a loop to find all valid clients (players) on server.
  3718. Note: it DOESN'T return current number of players.
  3719. </remark>
  3720. </remarks>
  3721. <references>
  3722. <identifierReference identifier="isclient"/>
  3723. </references>
  3724. </command>
  3725. <command name="isclient">
  3726. <description>Determines if the client number given is a valid client (player).</description>
  3727. <examples>
  3728. <example>
  3729. <code><![CDATA[echo (isclient 0)]]></code>
  3730. <explanation>Example output: 1</explanation>
  3731. </example>
  3732. <example>
  3733. <code><![CDATA[echo (isclient 32)]]></code>
  3734. <explanation>Example output: 0</explanation>
  3735. </example>
  3736. </examples>
  3737. <arguments>
  3738. <argument token="C" description="client number"/>
  3739. </arguments>
  3740. <references>
  3741. <identifierReference identifier="curplayers"/>
  3742. </references>
  3743. </command>
  3744. <command name="findcn">
  3745. <description>Finds client number (cn) of player with given name.</description>
  3746. <arguments>
  3747. <argument token="N" description="player name"/>
  3748. </arguments>
  3749. </command>
  3750. <command name="highestcn">
  3751. <description>Returns the highest valid client number available.</description>
  3752. </command>
  3753. <command name="quicknadethrow">
  3754. <description>Switches to grenades, if available (must be bound to a key).</description>
  3755. <remarks>
  3756. <remark>If grenades are already selected or the key is held, it throws a grenade and switches back to previous weapon.</remark>
  3757. </remarks>
  3758. <defaultKeys>
  3759. <key alias="G" description="for all weapons"/>
  3760. <key alias="MOUSE2" name="right mouse button" description="for all weapons except sniper rifle"/>
  3761. </defaultKeys>
  3762. <references>
  3763. <identifierReference identifier="grenades"/>
  3764. </references>
  3765. </command>
  3766. <command name="forward">
  3767. <description>Moves the player forward.</description>
  3768. <defaultKeys>
  3769. <key alias="W|UP" name="W or Up Arrow"/>
  3770. </defaultKeys>
  3771. </command>
  3772. <command name="backward">
  3773. <description>Moves the player backward.</description>
  3774. <defaultKeys>
  3775. <key alias="S|DOWN" name="S or Down Arrow"/>
  3776. </defaultKeys>
  3777. </command>
  3778. <command name="left">
  3779. <description>Moves the player left.</description>
  3780. <defaultKeys>
  3781. <key alias="A|LEFT" name="A or Left Arrow"/>
  3782. </defaultKeys>
  3783. </command>
  3784. <command name="right">
  3785. <description>Moves the player right.</description>
  3786. <defaultKeys>
  3787. <key alias="D|RIGHT" name="D or Right Arrow"/>
  3788. </defaultKeys>
  3789. </command>
  3790. <command name="attack">
  3791. <description>Fires the current weapon.</description>
  3792. <defaultKeys>
  3793. <key alias="MOUSE1" name="left mouse button"/>
  3794. </defaultKeys>
  3795. </command>
  3796. <command name="whereami">
  3797. <description>Prints the local client's (x,y) coordinates.</description>
  3798. </command>
  3799. <command name="burstshots">
  3800. <description>Sets the firing mode of automatic weapons between full auto mode and burst fire mode.</description>
  3801. <arguments>
  3802. <argument token="N" description="the weapon number or name" valueNotes="4 (subgun), 6 (assault), 8 (akimbo)"/>
  3803. <argument token="S" description="shots per burst" valueNotes="Special values: 0: set weapon to full auto, -1: don't set, instead check and return shots per burst"/>
  3804. </arguments>
  3805. </command>
  3806. <command name="winners">
  3807. <description>Returns the team number with the highest score, or if in a non-team mode, returns the CN of the player with the highest score.</description>
  3808. </command>
  3809. <command name="fragmessage">
  3810. <description>Sets the frag message corresponding to a weapon (appearing on the hud).</description>
  3811. <arguments>
  3812. <argument token="N" description="the weapon number or name" valueNotes="0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)"/>
  3813. <argument token="M" description="the message you want to appear" valueNotes="example: sniped"/>
  3814. </arguments>
  3815. <examples>
  3816. <example>
  3817. <code>fragmessage sniper sniped</code>
  3818. <explanation>It will display "you sniped unarmed" on the hud when you frag unarmed with sniper.</explanation>
  3819. </example>
  3820. </examples>
  3821. <references>
  3822. <identifierReference identifier="gibmessage"/>
  3823. <identifierReference identifier="weapon"/>
  3824. </references>
  3825. </command>
  3826. <command name="gibmessage">
  3827. <description>Sets the gib message corresponding to a weapon (appearing on the hud).</description>
  3828. <arguments>
  3829. <argument token="N" description="the weapon number or name" valueNotes="0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)"/>
  3830. <argument token="M" description="the message you want to appear" valueNotes="example: slashed"/>
  3831. </arguments>
  3832. <remarks>
  3833. <remark>
  3834. This command is identical to fragmessage, please see it.
  3835. </remark>
  3836. </remarks>
  3837. <references>
  3838. <identifierReference identifier="fragmessage"/>
  3839. <identifierReference identifier="weapon"/>
  3840. </references>
  3841. </command>
  3842. <command name="player">
  3843. <description>Retrieve an attribute of a player identified by clientnum.</description>
  3844. <arguments>
  3845. <argument token="C" description="clientnum" valueNotes="1,2,3,.."/>
  3846. <argument token="A" description="attribute" valueNotes="magcontent, ammo, primary, .."/>
  3847. </arguments>
  3848. <remarks>
  3849. <remark>If the clientnum does not match a valid player the result will be empty, just as without an attribute passed.</remark>
  3850. <remark>The following attributes can be retrieved: magcontent, ammo, primary, curweapon, nextprimary, health, armour, attacking, scoping, x, y, z, name, team, ping, pj, state, role, frags, flags, deaths, tks, alive, spect, cn, skin_cla, skin_rvsf, skin, ip</remark>
  3851. </remarks>
  3852. <references>
  3853. <identifierReference identifier="player1"/>
  3854. </references>
  3855. </command>
  3856. <command name="player1">
  3857. <description>Retrieve an attribute of yourself.</description>
  3858. <arguments>
  3859. <argument token="A" description="attribute" valueNotes="magcontent, ammo, primary, .."/>
  3860. </arguments>
  3861. <remarks>
  3862. <remark>See player for all retrievable attributes.</remark>
  3863. </remarks>
  3864. <references>
  3865. <identifierReference identifier="player"/>
  3866. </references>
  3867. </command>
  3868. </identifiers>
  3869. </section>
  3870. <!-- Gameplay Section Ends -->
  3871. <!-- Keyboard and mouse Section Starts -->
  3872. <section name="Keyboard and mouse" sortindex="04">
  3873. <description>This section describes keyboard and mouse related identifiers.</description>
  3874. <identifiers sort="true">
  3875. <command name="bind">
  3876. <description>Binds a key to a command.</description>
  3877. <remarks>
  3878. <remark>
  3879. To find out what key names and their default bindings are, look at config/keymap.cfg,
  3880. then add bind commands to your autoexec.cfg.
  3881. </remark>
  3882. </remarks>
  3883. <arguments>
  3884. <argument token="K" description="the key to bind" valueNotes="string"/>
  3885. <argument token="A" description="the command" valueNotes="string, usually an alias"/>
  3886. </arguments>
  3887. <references>
  3888. <identifierReference identifier="editbind"/>
  3889. <identifierReference identifier="specbind"/>
  3890. <identifierReference identifier="megabind"/>
  3891. <identifierReference identifier="onrelease"/>
  3892. </references>
  3893. </command>
  3894. <command name="editbind">
  3895. <description>Similar to bind, but is only active while editing, where it overrides the regular bind for the specified key.</description>
  3896. <arguments>
  3897. <argument token="K" description="the key to bind" valueNotes="string"/>
  3898. <argument token="A" description="the command" valueNotes="string, usually an alias"/>
  3899. </arguments>
  3900. <references>
  3901. <identifierReference identifier="bind"/>
  3902. <identifierReference identifier="specbind"/>
  3903. </references>
  3904. </command>
  3905. <command name="specbind">
  3906. <description>Similar to bind, but is only active while spectating, where it overrides the regular bind for the specified key.</description>
  3907. <arguments>
  3908. <argument token="K" description="the key to bind" valueNotes="string"/>
  3909. <argument token="A" description="the command" valueNotes="string, usually an alias"/>
  3910. </arguments>
  3911. <references>
  3912. <identifierReference identifier="bind"/>
  3913. <identifierReference identifier="editbind"/>
  3914. </references>
  3915. </command>
  3916. <command name="megabind">
  3917. <description>Binds a key to many different actions depending on the current game state.</description>
  3918. <examples>
  3919. <example>
  3920. <code><![CDATA[megabind F9 [echo Demo!] [echo Editing or coop!] [echo Connected!] [echo Bots!] [echo Other!]]]></code>
  3921. </example>
  3922. </examples>
  3923. <arguments>
  3924. <argument token="K" description="the key to bind" valueNotes="string"/>
  3925. <argument token="D" description="body of code to execute if watching a demo" valueNotes="a body of code"/>
  3926. <argument token="E" description="body of code to execute if editing or in coop-edit mode" valueNotes="a body of code"/>
  3927. <argument token="C" description="body of code to execute if connected to a server" valueNotes="a body of code"/>
  3928. <argument token="B" description="body of code to execute if in a bot mode" valueNotes="a body of code"/>
  3929. <argument token="O" description="body of code to execute if none of the other arguments have been met" valueNotes="a body of code"/>
  3930. </arguments>
  3931. <remarks>
  3932. <remark>This command requires 6 arguments, no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing".</remark>
  3933. </remarks>
  3934. <references>
  3935. <identifierReference identifier="bind"/>
  3936. <identifierReference identifier="onrelease"/>
  3937. </references>
  3938. </command>
  3939. <command name="onrelease">
  3940. <description>Executes a command on the release of a key/button.</description>
  3941. <remarks>
  3942. <remark>This command must be placed in an action in a bind or in an alias in a bind.</remark>
  3943. </remarks>
  3944. <examples>
  3945. <example>
  3946. <code><![CDATA[bind CTRL [ echo "key pressed"; onrelease [ echo "key released" ] ]]]></code>
  3947. </example>
  3948. </examples>
  3949. <references>
  3950. <identifierReference identifier="bind"/>
  3951. <identifierReference identifier="megabind"/>
  3952. </references>
  3953. <arguments>
  3954. <argument token="A" description="the command"/>
  3955. </arguments>
  3956. </command>
  3957. <scriptalias name="add2bind">
  3958. <description>Adds a block of code, if it does not already exist, to a keybind.</description>
  3959. <arguments>
  3960. <argument token="K" description="the key to add to"/>
  3961. <argument token="C" description="the code to add"/>
  3962. </arguments>
  3963. <references>
  3964. <identifierReference identifier="add2alias"/>
  3965. <identifierReference identifier="add2list"/>
  3966. </references>
  3967. </scriptalias>
  3968. <command name="keybind">
  3969. <description>Returns the contents of a keybind, bound with 'bind'.</description>
  3970. <arguments>
  3971. <argument token="K" description="name of key"/>
  3972. </arguments>
  3973. <references>
  3974. <identifierReference identifier="bind"/>
  3975. <identifierReference identifier="findkey"/>
  3976. <identifierReference identifier="findkeycode"/>
  3977. <identifierReference identifier="keyeditbind"/>
  3978. <identifierReference identifier="keyspecbind"/>
  3979. </references>
  3980. </command>
  3981. <command name="keyeditbind">
  3982. <description>Returns the contents of a keybind, bound with 'editbind'.</description>
  3983. <arguments>
  3984. <argument token="K" description="name of key"/>
  3985. </arguments>
  3986. <references>
  3987. <identifierReference identifier="editbind"/>
  3988. <identifierReference identifier="keybind"/>
  3989. <identifierReference identifier="keyspecbind"/>
  3990. </references>
  3991. </command>
  3992. <command name="keyspecbind">
  3993. <description>Returns the contents of a keybind, bound with 'specbind'.</description>
  3994. <arguments>
  3995. <argument token="K" description="name of key"/>
  3996. </arguments>
  3997. <references>
  3998. <identifierReference identifier="keybind"/>
  3999. <identifierReference identifier="keyeditbind"/>
  4000. <identifierReference identifier="specbind"/>
  4001. </references>
  4002. </command>
  4003. <command name="searchbinds">
  4004. <description>Searches keybinds (bound with 'bind'), returns keys with matching contents.</description>
  4005. <arguments>
  4006. <argument token="S" description="search string"/>
  4007. </arguments>
  4008. <examples>
  4009. <example>
  4010. <code><![CDATA[echo (searchbinds "reload")]]></code>
  4011. <explanation>Output: R</explanation>
  4012. </example>
  4013. </examples>
  4014. <remarks>
  4015. <remark>This is the inverse of 'keybind'</remark>
  4016. </remarks>
  4017. <references>
  4018. <identifierReference identifier="bind"/>
  4019. <identifierReference identifier="keybind"/>
  4020. </references>
  4021. </command>
  4022. <command name="searcheditbinds">
  4023. <description>Searches keybinds (bound with 'editbind'), returns keys with matching contents.</description>
  4024. <arguments>
  4025. <argument token="s" description="search string"/>
  4026. </arguments>
  4027. <examples>
  4028. <example>
  4029. <code><![CDATA[echo (searcheditbinds "toggleocull")]]></code>
  4030. <explanation>Output: F5</explanation>
  4031. </example>
  4032. </examples>
  4033. <remarks>
  4034. <remark>This is the inverse of 'keyeditbind'</remark>
  4035. </remarks>
  4036. <references>
  4037. <identifierReference identifier="editbind"/>
  4038. <identifierReference identifier="keyeditbind"/>
  4039. </references>
  4040. </command>
  4041. <command name="searchspecbinds">
  4042. <description>Searches keybinds (bound with 'specbind'), returns keys with matching contents.</description>
  4043. <arguments>
  4044. <argument token="s" description="search string"/>
  4045. </arguments>
  4046. <remarks>
  4047. <remark>This is the inverse of 'keyspecbind'</remark>
  4048. </remarks>
  4049. <references>
  4050. <identifierReference identifier="specbind"/>
  4051. <identifierReference identifier="keyspecbind"/>
  4052. </references>
  4053. </command>
  4054. <command name="findkey">
  4055. <description>Returns the name of a key via a specified code.</description>
  4056. <examples>
  4057. <example>
  4058. <code><![CDATA[echo (findkey 8)]]></code>
  4059. <explanation>Output: BACKSPACE</explanation>
  4060. </example>
  4061. <example>
  4062. <code><![CDATA[echo (findkey 280)]]></code>
  4063. <explanation>Output: PAGEUP</explanation>
  4064. </example>
  4065. </examples>
  4066. <arguments>
  4067. <argument token="I" description="integer"/>
  4068. </arguments>
  4069. <remarks>
  4070. <remark>Returns -255 if the key does not exist.</remark>
  4071. <remark>See /config/keymap.cfg for a full list of valid key codes.</remark>
  4072. </remarks>
  4073. <references>
  4074. <identifierReference identifier="keybind"/>
  4075. <identifierReference identifier="findkeycode"/>
  4076. </references>
  4077. </command>
  4078. <command name="findkeycode">
  4079. <description>Returns the integer code of a key.</description>
  4080. <examples>
  4081. <example>
  4082. <code><![CDATA[echo (findkeycode BACKSPACE)]]></code>
  4083. <explanation>Output: 8</explanation>
  4084. </example>
  4085. <example>
  4086. <code><![CDATA[echo (findkeycode PAGEUP)]]></code>
  4087. <explanation>Output: 280</explanation>
  4088. </example>
  4089. </examples>
  4090. <arguments>
  4091. <argument token="K" description="the name of the key"/>
  4092. </arguments>
  4093. <remarks>
  4094. <remark>Returns -255 if the key does not exist.</remark>
  4095. <remark>See /config/keymap.cfg for a full list of valid key names.</remark>
  4096. </remarks>
  4097. <references>
  4098. <identifierReference identifier="keybind"/>
  4099. <identifierReference identifier="findkey"/>
  4100. </references>
  4101. </command>
  4102. <variable name="resetbinds">
  4103. <description>Resets all binds back to their default values.</description>
  4104. <remarks>
  4105. <remark>
  4106. This command executes the file /config/resetbinds.cfg which will bind all keys to the values specified in that
  4107. file, thus resetting the binds to their default values.
  4108. </remark>
  4109. </remarks>
  4110. <references>
  4111. <identifierReference identifier="resetcfg"/>
  4112. <identifierReference identifier="_resetallbinds"/>
  4113. </references>
  4114. </variable>
  4115. <command name="_resetallbinds">
  4116. <description>Clears all binds for all keys and all modes, including self-assigned ones.</description>
  4117. <remarks>
  4118. <remark>Do not use the command manually.</remark>
  4119. </remarks>
  4120. <references>
  4121. <identifierReference identifier="resetbinds"/>
  4122. <identifierReference identifier="_defaultbinds"/>
  4123. </references>
  4124. </command>
  4125. <variable name="_defaultbinds">
  4126. <description>Whether or not the next call to _resetallbinds will remove any and all binds; cleaning up before setting the default bindings.</description>
  4127. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:yes" defaultValue="0"/>
  4128. <remarks>
  4129. <remark>Internal – used in config/resetbinds.cfg</remark>
  4130. </remarks>
  4131. <references>
  4132. <identifierReference identifier="_resetallbinds"/>
  4133. </references>
  4134. </variable>
  4135. <command name="keymap">
  4136. <description>Sets up the keymap for the specified key.</description>
  4137. <remarks>
  4138. <remark>You should never have to use this command manually, use "bind" instead.</remark>
  4139. </remarks>
  4140. <references>
  4141. <identifierReference identifier="bind"/>
  4142. </references>
  4143. <arguments>
  4144. <argument token="K" description="the key to map"/>
  4145. <argument token="N" description="the name for the key"/>
  4146. <argument token="A" description="the default action"/>
  4147. </arguments>
  4148. </command>
  4149. <scriptalias name="KEYPRESS">
  4150. <description>If defined, this will be executed every time you press a key.</description>
  4151. <arguments>
  4152. <argument token="I" description="integer key code"/>
  4153. </arguments>
  4154. <examples>
  4155. <example>
  4156. <code><![CDATA[checkinit KEYPRESS [echo You pressed key: (findkey $arg1)]]]></code>
  4157. </example>
  4158. </examples>
  4159. <references>
  4160. <identifierReference identifier="KEYRELEASE"/>
  4161. <identifierReference identifier="findkey"/>
  4162. </references>
  4163. </scriptalias>
  4164. <scriptalias name="KEYRELEASE">
  4165. <description>If defined, this will be executed every time you release a key.</description>
  4166. <arguments>
  4167. <argument token="I" description="integer key code"/>
  4168. </arguments>
  4169. <examples>
  4170. <example>
  4171. <code><![CDATA[checkinit KEYRELEASE [echo You released key: (findkey $arg1)]]]></code>
  4172. </example>
  4173. </examples>
  4174. <references>
  4175. <identifierReference identifier="KEYPRESS"/>
  4176. <identifierReference identifier="findkey"/>
  4177. </references>
  4178. </scriptalias>
  4179. <variable name="sensitivity">
  4180. <description>Sets the mouse sensitivity.</description>
  4181. <value token="S" description="the sensitivity" minValue="0.001" maxValue="1000" valueNotes="floating-point" defaultValue="3.0"/>
  4182. <references>
  4183. <identifierReference identifier="sensitivityscale"/>
  4184. <identifierReference identifier="scopesens"/>
  4185. <identifierReference identifier="autoscopesens"/>
  4186. <identifierReference identifier="scopesensscale"/>
  4187. </references>
  4188. </variable>
  4189. <variable name="sensitivityscale">
  4190. <description>Scales all mouse sensitivity values.</description>
  4191. <remarks>
  4192. <remark>Changes all sensitivity values. If unsure, keep this at "1".</remark>
  4193. </remarks>
  4194. <value token="N" description="the sensitivity scale" minValue="0.001" maxValue="1000.0" defaultValue="1.0"/>
  4195. <references>
  4196. <identifierReference identifier="sensitivity"/>
  4197. <identifierReference identifier="scopesens"/>
  4198. <identifierReference identifier="autoscopesens"/>
  4199. <identifierReference identifier="scopesensscale"/>
  4200. </references>
  4201. </variable>
  4202. <variable name="scopesens">
  4203. <description>Mouse sensitivity while scoped.</description>
  4204. <remarks>
  4205. <remark>If zero, autoscopesens determines, how sensitivity is changed during scoping.</remark>
  4206. </remarks>
  4207. <value token="N" description="scoped sensitivity" minValue="0" maxValue="1000" defaultValue="0"/>
  4208. <references>
  4209. <identifierReference identifier="sensitivity"/>
  4210. <identifierReference identifier="sensitivityscale"/>
  4211. <identifierReference identifier="autoscopesens"/>
  4212. <identifierReference identifier="scopesensscale"/>
  4213. </references>
  4214. </variable>
  4215. <variable name="autoscopesens">
  4216. <description>Switches between scopesensscale and autoscopesensscale.</description>
  4217. <remarks>
  4218. <remark>Determines how to calculate scoped sensitivity if scopesens is zero. If enabled, derives scoped sensitivity from scopefov and fov.</remark>
  4219. </remarks>
  4220. <value token="N" description="auto on/off" minValue="0 (scopesensscale)" maxValue="1 (autoscopesens)" defaultValue="0"/>
  4221. <references>
  4222. <identifierReference identifier="sensitivity"/>
  4223. <identifierReference identifier="sensitivityscale"/>
  4224. <identifierReference identifier="scopesens"/>
  4225. <identifierReference identifier="scopesensscale"/>
  4226. </references>
  4227. </variable>
  4228. <variable name="scopesensscale">
  4229. <description>Change sensitivity when scoping.</description>
  4230. <remarks>
  4231. <remark>If used, scoped sens = sensitivity * scopesensscale (roughly). Ignored, if autoscopesens is set.</remark>
  4232. </remarks>
  4233. <value token="N" description="factor to change sensitivity while scoped" minValue="0.001" maxValue="1000.0" defaultValue="0.5"/>
  4234. <references>
  4235. <identifierReference identifier="sensitivity"/>
  4236. <identifierReference identifier="sensitivityscale"/>
  4237. <identifierReference identifier="scopesens"/>
  4238. <identifierReference identifier="autoscopesens"/>
  4239. </references>
  4240. </variable>
  4241. <variable name="invmouse">
  4242. <description>Sets mouse to "flight sim" mode.</description>
  4243. <value token="B" description="sets invmouse" minValue="0" maxValue="1" valueNotes="1:inverted Y-axis" defaultValue="0"/>
  4244. <remarks>
  4245. <remark>Inverts movement on the y-axis.</remark>
  4246. </remarks>
  4247. </variable>
  4248. <variable name="relativemouse">
  4249. <description>The way the mouse movement is handled.</description>
  4250. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="0:warped, 1:relative" defaultValue="1"/>
  4251. <remarks>
  4252. <remark>On Windows this is forced to 1 due to erratic behaviour of SDL_WarpMouseInWindow.</remark>
  4253. <remark>If set to 0 the mouse will be warped to center of the screen if appropriate.</remark>
  4254. </remarks>
  4255. <references>
  4256. <identifierReference identifier="sdl_xgrab_bug"/>
  4257. </references>
  4258. </variable>
  4259. <variable name="sdl_xgrab_bug">
  4260. <description>Enable a workaround for buggy SDL X11 pointer grabbing.</description>
  4261. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:use workaround" defaultValue="0"/>
  4262. <remarks>
  4263. <remark>On Windows this is variable is not available. X11 is a *nix windowing system.</remark>
  4264. <remark>If set to 1 and relativemouse is on too, the workaround using XGrabPointer will be used.</remark>
  4265. </remarks>
  4266. <references>
  4267. <identifierReference identifier="relativemouse"/>
  4268. </references>
  4269. </variable>
  4270. <variable name="mfilter">
  4271. <description>Sets the degree of mouse filtering (0.0 being no filtering).</description>
  4272. <value token="N" description="Amount of mouse filtration" minValue="0.0" maxValue="6.0" defaultValue="0.0"/>
  4273. </variable>
  4274. <variable name="mouseaccel">
  4275. <description>Sets the mouse acceleration.</description>
  4276. <value token="N" description="acceleration factor" minValue="0.0" maxValue="1000.0" defaultValue="0.0"/>
  4277. <references>
  4278. <identifierReference identifier="sensitivity"/>
  4279. </references>
  4280. </variable>
  4281. <command name="togglegrab">
  4282. <description>Toggles grabbing of mouse and keyboard input in a game.</description>
  4283. <remarks>
  4284. <remark>
  4285. Grabbing means that the mouse is confined to the AC, and nearly all keyboard input is passed directly to AC,
  4286. and not interpreted by a window manager, if any. This is only useful when you run AC windowed.
  4287. </remark>
  4288. </remarks>
  4289. </command>
  4290. <variable name="modkeypressed">
  4291. <description>Indicates if a CTRL key is pressed.</description>
  4292. <value description="state of the CTRL key" minValue="0" maxValue="1" defaultValue="0" readOnly="true" valueNotes="0: unpressed, 1: pressed"/>
  4293. </variable>
  4294. <command name="modkeypressed">
  4295. <description>Is the CTRL currently key pressed?</description>
  4296. <remarks>
  4297. <remark>Can be used to change the behaviour of keybinds, like the F12 keybind in spectator mode uses it.</remark>
  4298. </remarks>
  4299. <references>
  4300. <identifierReference identifier="screenshot"/>
  4301. </references>
  4302. </command>
  4303. </identifiers>
  4304. </section>
  4305. <!-- Keyboard and mouse Section Ends -->
  4306. <!-- Editing Section Starts -->
  4307. <section name="Editing" sortindex="11">
  4308. <identifiers sort="true">
  4309. <command name="getentattr">
  4310. <description>Returns the value of the selected attribute of the nearest entity.</description>
  4311. <remarks>
  4312. <remark>
  4313. It returns float values for some attributes.
  4314. If "unscaled" flag is "1", raw integer values (representing the highest resolution) are returned.
  4315. </remark>
  4316. </remarks>
  4317. <arguments>
  4318. <argument token="A" description="attribute index" valueNotes="0..6"/>
  4319. <argument token="U" description="unscaled flag" valueNotes="0 or 1" optional="true"/>
  4320. </arguments>
  4321. <references>
  4322. <identifierReference identifier="entproperty"/>
  4323. <identifierReference identifier="getenttype"/>
  4324. </references>
  4325. </command>
  4326. <command name="getenttype">
  4327. <description>Returns the entity type of the nearest entity.</description>
  4328. <references>
  4329. <identifierReference identifier="entproperty"/>
  4330. <identifierReference identifier="getentattr"/>
  4331. </references>
  4332. </command>
  4333. <command name="edittag">
  4334. <arguments>
  4335. <argument token="T" description="tag" valueNotes="integer value"/>
  4336. </arguments>
  4337. </command>
  4338. <command name="edittagclip">
  4339. <description>Sets tag clip type of all selected cubes.</description>
  4340. <remarks>
  4341. <remark>Type can be numeric or a keyword.</remark>
  4342. </remarks>
  4343. <arguments>
  4344. <argument token="T" description="type" valueNotes="0 (none), 64 (clip), 128 (plclip)"/>
  4345. </arguments>
  4346. <defaultKeys>
  4347. <key alias="KP1" name="1 on the keypad" description="sets a tag clip: none"/>
  4348. <key alias="KP2" name="2 on the keypad" description="sets a tag clip: clip"/>
  4349. <key alias="KP3" name="3 on the keypad" description="sets a tag clip: plclip"/>
  4350. </defaultKeys>
  4351. <references>
  4352. <identifierReference identifier="transformclipentities"/>
  4353. </references>
  4354. </command>
  4355. <command name="transformclipentities">
  4356. <description>Transforms all full height clip entities to tag clips.</description>
  4357. <references>
  4358. <identifierReference identifier="edittagclip"/>
  4359. </references>
  4360. </command>
  4361. <command name="applymapsoundchanges">
  4362. <description>During map editing, drop all mapsounds so they can be re-added.</description>
  4363. </command>
  4364. <command name="edittoggle">
  4365. <description>Switches between map edit mode and normal.</description>
  4366. <remarks>
  4367. <remark>
  4368. In map edit mode you can select bits of the map by clicking or dragging your crosshair on the floor
  4369. or ceiling (using the "attack" identifier, normally MOUSE1), then use the identifiers below to
  4370. modify the selection. While in edit mode, normal physics and collision don't apply (clips), and key repeat is ON.
  4371. Note that if you fly outside the map, cube still renders the world as if you were standing on the floor
  4372. directly below the camera.
  4373. </remark>
  4374. </remarks>
  4375. <defaultKeys>
  4376. <key alias="E"/>
  4377. </defaultKeys>
  4378. <references>
  4379. <identifierReference name="select" identifier="select"/>
  4380. <wikiReference article="Coopedit"/>
  4381. </references>
  4382. </command>
  4383. <command name="edittex">
  4384. <description>Changes the texture on current selection by browsing through a list of textures directly shown on the cubes.</description>
  4385. <remarks>
  4386. <remark>
  4387. Default keys are the six keys above the cursor keys, which each 2 of them cycle one type (and numpad 7/4 for upper-wall).
  4388. </remark>
  4389. <remark>
  4390. The way this works is slightly strange at first, but allows for very fast texture assignment.
  4391. All textures are in 3 individual lists for each type (both wall kinds treated the same),
  4392. and each time a texture is used, it is moved to the top of the list. So after a bit of editing,
  4393. all your most frequently used textures will come first when pressing these keys,
  4394. and the most recently used texture is set immediately when you press the forward key for the type.
  4395. These lists are saved with the map. Make a selection (including wall bits) and press these keys to get a feel for what they do.
  4396. </remark>
  4397. </remarks>
  4398. <arguments>
  4399. <argument token="T" description="an integer denoting the type" valueNotes="0 (floor), 1 (lower or wall), 2 (ceiling), 3 (upper wall)"/>
  4400. <argument token="D" description="the direction you want to cycle the textures in" valueNotes="1 (forwards), -1 (backwards)"/>
  4401. </arguments>
  4402. <defaultKeys>
  4403. <key alias="INSERT" name="Insert" description="browses forward through floor textures"/>
  4404. <key alias="DELETE" name="Delete" description="browses backward through floor textures"/>
  4405. <key alias="HOME" name="Home" description="browses forward through wall textures"/>
  4406. <key alias="END" name="End" description="browses backward through wall textures"/>
  4407. <key alias="PAGEUP" name="Page Up" description="browses forward through ceiling textures"/>
  4408. <key alias="PAGEDOWN" name="Page Down" description="browses backward through ceiling textures"/>
  4409. <key alias="KP4" name="7 on the keypad" description="browses forward through upper-wall textures"/>
  4410. <key alias="KP7" name="4 on the keypad" description="browses backward through upper-wall textures"/>
  4411. <key alias="X+MOUSE4|MOUSE5" name="X + mouse scroll" description="scrolls wall and upper-wall textures"/>
  4412. <key alias="Z+MOUSE4|MOUSE5" name="Z + mouse scroll" description="scrolls floor or ceiling textures"/>
  4413. </defaultKeys>
  4414. <references>
  4415. <identifierReference identifier="hudtexttl"/>
  4416. </references>
  4417. </command>
  4418. <variable name="hudtexttl">
  4419. <description>Show preview of textures during editing.</description>
  4420. <remarks>
  4421. <remark>
  4422. When textures of the map geometry are changed, five textures around the current pick from the "last used" stack are shown.
  4423. </remark>
  4424. <remark>The texture assigned to the "sky" slot is not shown. Instead, a plain blue rectangle is used.</remark>
  4425. </remarks>
  4426. <value token="T" description="time to show texture preview [ms]" minValue="0" maxValue="10000" defaultValue="2500"/>
  4427. <references>
  4428. <identifierReference identifier="edittex"/>
  4429. </references>
  4430. </variable>
  4431. <command name="settex">
  4432. <description>Sets a texture for the current selection.</description>
  4433. <arguments>
  4434. <argument token="T" description="position of the texture to set in map cfg" valueNotes="integer"/>
  4435. <argument token="t" description="the type of the texture" valueNotes="0 (floor), 1 (wall), 2 (ceil), 3 (upper wall)"/>
  4436. </arguments>
  4437. </command>
  4438. <command name="editheight">
  4439. <description>Changes the height of the current selection.</description>
  4440. <arguments>
  4441. <argument token="T" description="an integer denoting the type" valueNotes="0 (floor), 2 (ceiling)"/>
  4442. <argument token="D" description="the delta value to move it in" valueNotes="1 (forwards), -1 (backwards)"/>
  4443. </arguments>
  4444. <defaultKeys>
  4445. <key alias="LEFTBRACKET" name="[" description="moves downwards the selection in the floor"/>
  4446. <key alias="RIGHTBRACKET" name="]" description="moves upwards the selection in the floor"/>
  4447. <key alias="O" description="moves downwards the selection in the ceiling"/>
  4448. <key alias="P" description="moves upwards the selection in the ceiling"/>
  4449. </defaultKeys>
  4450. </command>
  4451. <command name="solid">
  4452. <description>Makes the current selection all solid (i.e. wall) or all non-solid.</description>
  4453. <remarks>
  4454. <remark>
  4455. This operation retains floor/ceiling heights/textures while swapping between the two.
  4456. </remark>
  4457. </remarks>
  4458. <arguments>
  4459. <argument token="B" description="an integer denoting the solid-ness" valueNotes="0 (non-solid), 1..* (solid)"/>
  4460. </arguments>
  4461. <defaultKeys>
  4462. <key alias="F" description="makes the selection a solid"/>
  4463. <key alias="G" description="makes the selection a space/non-heightfield"/>
  4464. </defaultKeys>
  4465. </command>
  4466. <command name="equalize">
  4467. <description>Levels the floor/ceiling of the selection.</description>
  4468. <arguments>
  4469. <argument token="T" description="an integer denoting the type" valueNotes="0 (floor), 2 (ceiling)"/>
  4470. </arguments>
  4471. <defaultKeys>
  4472. <key alias="COMMA" name="," description="equalizes the selection on the floor"/>
  4473. <key alias="PERIOD" name="." description="equalizes the selection on the ceiling"/>
  4474. </defaultKeys>
  4475. </command>
  4476. <command name="heightfield">
  4477. <description>Marks the current selection as a heightfield.</description>
  4478. <remarks>
  4479. <remark>
  4480. It marks the current selection as a heightfield, with T being floor or ceiling, as above.
  4481. A surface marked as heightfield will use the vdelta values (see below) of its 4 corners to create a sloped surface.
  4482. To mark a heightfield as normal again (ignoring vdelta values, set or not) use "solid 0".
  4483. </remark>
  4484. <remark>
  4485. Heightfields should be made the exact size that is needed, not more not less.
  4486. The most important reason for this is that cube automatically generates "caps" (side-faces for heightfields)
  4487. only on the borders of the heightfield. This also means if you have 2 independent heightfields accidentally
  4488. touch each other, you will not get correct caps. Also, a heightfield is slightly slower to render than a
  4489. non-heightfield floor or ceiling. Last but not least, a heightfield should have all the same baseheight
  4490. (i.e. the height determined by a normal editheight operation) to get correct results.
  4491. </remark>
  4492. </remarks>
  4493. <arguments>
  4494. <argument token="T" description="an integer denoting the type" valueNotes="0 (floor), 2 (ceiling)"/>
  4495. </arguments>
  4496. <defaultKeys>
  4497. <key alias="H" description="makes the selection on the floor a heightfield"/>
  4498. <key alias="I" description="makes the selection on the ceiling a heightfield"/>
  4499. </defaultKeys>
  4500. <references>
  4501. <identifierReference identifier="vdelta"/>
  4502. </references>
  4503. </command>
  4504. <command name="vdelta">
  4505. <description>Changes the vdelta value of the current selection.</description>
  4506. <remarks>
  4507. <remark>
  4508. Note that unlike all other editing functions, this function doesn't affect a cube, but its top-left vertex
  4509. (market by the dot in the editing cursor). So to edit a N * M heightfield, you will likely have to edit
  4510. the vdelta of (N+1) * (M+1) cubes, i.e. you have to select 1 row and 1 column more in the opposite direction
  4511. of the red dot to affect all the vertices of a heightfield of a given size (try it, it makes sense :).
  4512. </remark>
  4513. <remark>
  4514. A floor delta offsets vertices to beneath the level set by editheight (and a ceil delta to above).
  4515. Delta offsets have a precision of a quarter of a unit, however you should use non-unitsize vertices only to touch
  4516. other such vertices.
  4517. </remark>
  4518. <remark>This only works if the cube is a heightfield.</remark>
  4519. </remarks>
  4520. <arguments>
  4521. <argument token="N" description="vdelta value"/>
  4522. </arguments>
  4523. <defaultKeys>
  4524. <key alias="8" description="manipulates downwards the corner of the current selection"/>
  4525. <key alias="9" description="manipulates upwards the corner of the current selection"/>
  4526. </defaultKeys>
  4527. <references>
  4528. <identifierReference identifier="heightfield"/>
  4529. </references>
  4530. </command>
  4531. <command name="corner">
  4532. <description>Makes the current selection into a "corner".</description>
  4533. <remarks>
  4534. <remark>
  4535. Currently there is only one type of corner (a 45 degree one), only works on a single unit (cube) at a time.
  4536. It can be positioned either next to 2 solid walls or
  4537. in the middle of 2 higher floorlevels and 2 lower ones forming a diagonal (and similar with ceiling).
  4538. </remark>
  4539. <remark>
  4540. In both cases, the corner will orient itself automatically depending on its neighbours, behaviour with other
  4541. configurations than the 2 above is unspecified. Since the latter configuration generates possibly 2 floor and
  4542. 2 ceiling levels, up to 4 textures are used: for example for the 2 floors the higher one will of the cube
  4543. itself, and the lower one of a neighbouring low cube. You can make bigger corners at once by
  4544. issuing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them.
  4545. </remark>
  4546. </remarks>
  4547. <defaultKeys>
  4548. <key alias="K"/>
  4549. </defaultKeys>
  4550. </command>
  4551. <command name="undo">
  4552. <description>Multi-level undo of any of the changes caused by editing operations.</description>
  4553. <remarks>
  4554. <remark>With editmeta pressed it also restores player position and selects the affected area.</remark>
  4555. </remarks>
  4556. <defaultKeys>
  4557. <key alias="U"/>
  4558. </defaultKeys>
  4559. <references>
  4560. <identifierReference identifier="redo"/>
  4561. <identifierReference identifier="undolevel"/>
  4562. <identifierReference identifier="undomegs"/>
  4563. <identifierReference identifier="editmeta"/>
  4564. </references>
  4565. </command>
  4566. <command name="redo">
  4567. <description>Redoes editing operations undone by 'undo'.</description>
  4568. <remarks>
  4569. <remark>With editmeta pressed it also restores player position and selects the affected area.</remark>
  4570. </remarks>
  4571. <defaultKeys>
  4572. <key alias="R"/>
  4573. </defaultKeys>
  4574. <references>
  4575. <identifierReference identifier="undo"/>
  4576. <identifierReference identifier="editmeta"/>
  4577. </references>
  4578. </command>
  4579. <command name="undolevel">
  4580. <description>Returns the number of undo steps that can be undone.</description>
  4581. <remarks>
  4582. <remark>If argument "level" is given, as many steps are undone, until "level" steps remain.</remark>
  4583. <remark>Unless memory limits delete states, undolevel commands can be undone with "redo".</remark>
  4584. </remarks>
  4585. <examples>
  4586. <example>
  4587. <code><![CDATA[echo (undolevel)]]></code>
  4588. <explanation> - prints number of previous editing steps, for example "55". Do some editing and:</explanation>
  4589. </example>
  4590. <example>
  4591. <code><![CDATA[undolevel 55]]></code>
  4592. <explanation>
  4593. - undoes all changes to restore the previous state (if that state is still in memory)
  4594. </explanation>
  4595. </example>
  4596. </examples>
  4597. <arguments>
  4598. <argument token="L" description="level" valueNotes="integer"/>
  4599. </arguments>
  4600. <references>
  4601. <identifierReference identifier="undo"/>
  4602. <identifierReference identifier="redo"/>
  4603. <identifierReference identifier="undomegs"/>
  4604. </references>
  4605. </command>
  4606. <variable name="undomegs">
  4607. <description>Sets the number of megabytes used for the undo buffer.</description>
  4608. <remarks>
  4609. <remark>
  4610. Undo's work for any size areas, so the amount of undo steps per megabyte is more for small areas
  4611. than for big ones (a megabyte fits 280 undo steps on a 16x16 area, but only 4 steps on a 128x128 area).
  4612. </remark>
  4613. </remarks>
  4614. <value token="N" description="number of megabytes" valueNotes="integer" minValue="0" maxValue="50" defaultValue="5"/>
  4615. <references>
  4616. <identifierReference identifier="undo"/>
  4617. <identifierReference identifier="undolevel"/>
  4618. </references>
  4619. </variable>
  4620. <command name="copy">
  4621. <description>Copies the current selection into a buffer.</description>
  4622. <defaultKeys>
  4623. <key alias="C"/>
  4624. </defaultKeys>
  4625. <references>
  4626. <identifierReference identifier="paste"/>
  4627. <identifierReference identifier="copyent"/>
  4628. </references>
  4629. </command>
  4630. <command name="copyent">
  4631. <description>Copies the current closest entity into a buffer.</description>
  4632. <remarks>
  4633. <remark>It also works with the menu list of copied entities. It works only while in edit mode.</remark>
  4634. </remarks>
  4635. <defaultKeys>
  4636. <key alias="MINUS" name="- (minus)"/>
  4637. </defaultKeys>
  4638. <references>
  4639. <identifierReference identifier="pasteent"/>
  4640. <identifierReference identifier="copy"/>
  4641. </references>
  4642. </command>
  4643. <command name="paste">
  4644. <description>Pastes a previously copied selection.</description>
  4645. <remarks>
  4646. <remark>
  4647. To paste a selection back requires a same size selection at the destination location. If it is not the same
  4648. size the selection will be resized automatically prior to the paste operation (with the red dot as anchor),
  4649. which is easier for large selections.
  4650. </remark>
  4651. </remarks>
  4652. <defaultKeys>
  4653. <key alias="V"/>
  4654. </defaultKeys>
  4655. <references>
  4656. <identifierReference identifier="copy"/>
  4657. </references>
  4658. </command>
  4659. <command name="pasteent">
  4660. <description>Pastes a previously copied entity.</description>
  4661. <remarks>
  4662. <remark>It also works with the menu list of copied entities. It works only while in edit mode.</remark>
  4663. <remark>Pressing "editmeta" while using "pasteent" opens the menu with a list of copied entities.</remark>
  4664. </remarks>
  4665. <references>
  4666. <identifierReference identifier="copyent"/>
  4667. <identifierReference identifier="editmeta"/>
  4668. </references>
  4669. </command>
  4670. <scriptalias name="countwalls">
  4671. <description>Returns the number of solid walls contained into the current selection.</description>
  4672. <arguments>
  4673. <argument token="T" description="the integer of type of the walls you want to count" valueNotes=" 0 (solid), 1 (corner), 2 (floor heightfield), 3 (ceil heightfield), 4 (empty cube), 5 (semi solid)"/>
  4674. </arguments>
  4675. <examples>
  4676. <example>
  4677. <code><![CDATA[echo (concat "The selection contains " (countwalls 0) "solid wall(s)")]]></code>
  4678. <explanation>Output: The selection contains 3 solid wall(s)</explanation>
  4679. </example>
  4680. </examples>
  4681. </scriptalias>
  4682. <command name="replace">
  4683. <description>Repeats the last texture edit throughout the map.</description>
  4684. <remarks>
  4685. <remark>
  4686. The way it works is intuitive: simply edit any texture anywhere, then using "replace" will replace
  4687. all textures throughout the map in the same way (taking into account whether it was a floor/wall/ceil/upper too).
  4688. If the there was more than one "old" texture in your selection, the one nearest to the red dot is used.
  4689. This operation can't be undone.
  4690. </remark>
  4691. </remarks>
  4692. </command>
  4693. <command name="newent">
  4694. <description>Adds a new entity.</description>
  4695. <remarks>
  4696. <remark>
  4697. (x,y) is determined by the current selection (the red dot corner) and z by the camera height, of said type.
  4698. The type of entity may optionally take attributes (depending on the entity).
  4699. </remark>
  4700. </remarks>
  4701. <arguments>
  4702. <argument token="E" description="the entity type or number" valueNotes="light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)"/>
  4703. <argument token="attr1" description="see newent 'type'"/>
  4704. <argument token="attr2" description="see newent 'type'"/>
  4705. <argument token="attr3" description="see newent 'type'"/>
  4706. <argument token="attr4" description="see newent 'type'"/>
  4707. <argument token="attr5" description="see newent 'type'"/>
  4708. <argument token="attr6" description="see newent 'type'"/>
  4709. <argument token="attr7" description="see newent 'type'"/>
  4710. </arguments>
  4711. </command>
  4712. <command name="newent light">
  4713. <description>Adds a new light entity.</description>
  4714. <remarks>
  4715. <remark>if only argument R is specified, it is interpreted as brightness for white light.</remark>
  4716. </remarks>
  4717. <arguments>
  4718. <argument token="radius" description="the light radius" valueNotes="1..32"/>
  4719. <argument token="R" description="red colour component, see remarks below" valueNotes="1..255"/>
  4720. <argument token="G" description="green colour component" valueNotes="1..255"/>
  4721. <argument token="B" description="blue colour component" valueNotes="1..255"/>
  4722. </arguments>
  4723. </command>
  4724. <command name="newent playerstart">
  4725. <description>Adds a new spawn spot.</description>
  4726. <remarks>
  4727. <remark>The yaw is taken from the current camera yaw.</remark>
  4728. </remarks>
  4729. </command>
  4730. <command name="newent ammobox">
  4731. <description>Adds a new ammo box item.</description>
  4732. </command>
  4733. <command name="newent pistol">
  4734. <description>Adds a pistol magazine item.</description>
  4735. </command>
  4736. <command name="newent grenades">
  4737. <description>Adds a new grenades item.</description>
  4738. </command>
  4739. <command name="newent health">
  4740. <description>Adds a new health item.</description>
  4741. </command>
  4742. <command name="newent armour">
  4743. <description>Adds a new armour item.</description>
  4744. </command>
  4745. <command name="newent helmet">
  4746. <description>Adds a new helmet item.</description>
  4747. </command>
  4748. <command name="newent akimbo">
  4749. <description>Adds a new akimbo item.</description>
  4750. </command>
  4751. <command name="newent mapmodel">
  4752. <description>Adds a map model to the map (i.e. a rendered md2/md3 model which you collide against but has no behaviour or movement).</description>
  4753. <remarks>
  4754. <remark>
  4755. The mapmodel identifier is the desired map model which is defined by the 'mapmodel' command. The order in which
  4756. the mapmodel is placed in the map config file defines the mapmodel identifier.
  4757. The map texture refers to a texture which is defined by the 'texture' command, if omitted the
  4758. models default skin will be used. The 'mapmodel' and 'texture' commands are placed in the map config normally.
  4759. Mapmodels are more expensive than normal map geometry, so do not use insane amounts of them to replace normal geometry.
  4760. </remark>
  4761. </remarks>
  4762. <arguments>
  4763. <argument token="N" description="The mapmodel identifier" valueNotes="integer"/>
  4764. <argument token="Z" description="Extra elevation above ground" valueNotes="integer" optional="true"/>
  4765. <argument token="T" description="The map texture to use" valueNotes="integer" optional="true"/>
  4766. </arguments>
  4767. </command>
  4768. <command name="newent ctf-flag">
  4769. <description>Adds a CTF flag entity.</description>
  4770. <remarks>
  4771. <remark>Note that outside of edit mode, this entity is only rendered as flag if the current game mode is CTF.</remark>
  4772. </remarks>
  4773. <arguments>
  4774. <argument token="T" description="denotes the flag's team" valueNotes="0 (CLA), 1 (RVSF)"/>
  4775. </arguments>
  4776. </command>
  4777. <command name="newent ladder">
  4778. <description>Adds a ladder entity.</description>
  4779. <remarks>
  4780. <remark>
  4781. Note that this entity is used for physics only, to create a visual ladder you
  4782. will need to add a mapmodel entity too.
  4783. </remark>
  4784. </remarks>
  4785. <references>
  4786. <identifierReference identifier="newent mapmodel"/>
  4787. </references>
  4788. <arguments>
  4789. <argument token="H" description="the height of the ladder" valueNotes="integer"/>
  4790. </arguments>
  4791. </command>
  4792. <command name="newent sound">
  4793. <description>Adds a sound entity.</description>
  4794. <remarks>
  4795. <remark>
  4796. Will play map-specific sound so long as the player is within the radius.
  4797. However, only up to the maxuses allowed for N (specified in the mapsound command) will play, even if the player is within the radius of more N sounds than the max.
  4798. By default (size 0), the sound is a point source. Its volume is maximal at the entity's location, and tapers off to 0 at the radius. If size is specified,
  4799. the volume is maximal within the specified size, and only starts tapering once outside this distance. Radius is always defined as distance from the entity's location,
  4800. so a size greater than or equal to the radius will just make a sound that is always max volume within the radius, and off outside.
  4801. </remark>
  4802. <remark>
  4803. A sound entity can be either ambient or non-ambient. Ambient sounds have no specific direction, they are 'just there'. Non-ambient sounds however appear to come from a specific direction (stereo panning).
  4804. If S is set to 0, the sound is a single point and will therefore be non-ambient. However if S is greater than 0, the sound will be ambient as it covers a specified area instead of being a single point.
  4805. </remark>
  4806. </remarks>
  4807. <references>
  4808. <identifierReference identifier="mapsound"/>
  4809. </references>
  4810. <arguments>
  4811. <argument token="N" description="the sound to play" valueNotes="integer"/>
  4812. <argument token="R" description="the radius"/>
  4813. <argument token="S" description="the size" optional="true" valueNotes="default 0"/>
  4814. <argument token="V" description="the volume" optional="true" valueNotes="default 255"/>
  4815. </arguments>
  4816. </command>
  4817. <command name="newent clip">
  4818. <description>Adds a clip entity.</description>
  4819. <remarks>
  4820. <remark>Defines a clipping box against which the player will collide.</remark>
  4821. <remark>
  4822. Use this clip type to clip visible obstacles like fences or the gas tank. If you only want to prevent a player from entering an area, use plclip instead.
  4823. </remark>
  4824. </remarks>
  4825. <arguments>
  4826. <argument token="Z" description="elevation above the ground" valueNotes="integer"/>
  4827. <argument token="X" description="X radius around the box center" valueNotes="integer"/>
  4828. <argument token="Y" description="Y radius around the box center" valueNotes="integer"/>
  4829. <argument token="H" description="height of the box" valueNotes="integer"/>
  4830. </arguments>
  4831. </command>
  4832. <command name="newent plclip">
  4833. <description>Adds a player clip entity.</description>
  4834. <remarks>
  4835. <remark>Defines a clipping box against which (only) the player will collide.</remark>
  4836. <remark>
  4837. Use this clip type to define no-go areas for players without visible obstacles, for example to prevent players from walking on a wall.
  4838. </remark>
  4839. <remark>Nades will not be affected by this clip type.</remark>
  4840. </remarks>
  4841. <arguments>
  4842. <argument token="Z" description="elevation above the ground" valueNotes="integer"/>
  4843. <argument token="X" description="X radius around the box center" valueNotes="integer"/>
  4844. <argument token="Y" description="Y radius around the box center" valueNotes="integer"/>
  4845. <argument token="H" description="height of the box" valueNotes="integer"/>
  4846. </arguments>
  4847. </command>
  4848. <command name="delent">
  4849. <description>Deletes the entity closest to the player.</description>
  4850. <defaultKeys>
  4851. <key alias="BACKSPACE"/>
  4852. </defaultKeys>
  4853. <references>
  4854. <identifierReference identifier="undelent"/>
  4855. <identifierReference identifier="deleteentity"/>
  4856. <identifierReference identifier="clearents"/>
  4857. </references>
  4858. </command>
  4859. <command name="entset">
  4860. <description>Edits the closest entity.</description>
  4861. <remarks>
  4862. <remark>Overwrites the closest entity with the specified attributes. Some attributes may be specified as floats.</remark>
  4863. </remarks>
  4864. <arguments>
  4865. <argument token="E" description="the entity type or number" valueNotes="light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)"/>
  4866. <argument token="attr1" description="see newent 'type'"/>
  4867. <argument token="attr2" description="see newent 'type'"/>
  4868. <argument token="attr3" description="see newent 'type'"/>
  4869. <argument token="attr4" description="see newent 'type'"/>
  4870. <argument token="attr5" description="see newent 'type'"/>
  4871. <argument token="attr6" description="see newent 'type'"/>
  4872. <argument token="attr7" description="see newent 'type'"/>
  4873. </arguments>
  4874. <references>
  4875. <identifierReference identifier="editentity"/>
  4876. </references>
  4877. </command>
  4878. <command name="entproperty">
  4879. <description>Changes property (attributes) of the closest entity.</description>
  4880. <remarks>
  4881. <remark>For example 'entproperty 0 2' when executed near a lightsource would increase its radius by 2.</remark>
  4882. <remark>
  4883. Keys 1..7, in combination with the scrollwheel, can be used to alter the new entity attributes (attr1 - attr7).
  4884. Key "M", in combination with the scrollwheel, can be used to move the entity.
  4885. Pressing editmeta speeds up the scrolling. Pressing editmeta2 enables unscaled editing of entity attributes.
  4886. </remark>
  4887. <remark>
  4888. Increment is a float for some attributes. If "unscaled" flag is "1", increment is applied as unscaled integer,
  4889. which means, it will change float attributes at their highest resolution.
  4890. </remark>
  4891. <remark>If 100 is added to the attribute index parameter, the sign of the increment value is changed.</remark>
  4892. </remarks>
  4893. <arguments>
  4894. <argument token="A" description="attribute index" valueNotes="0..6 (atrr1 - attr7), 11..13 (x, y, z)"/>
  4895. <argument token="I" description="attribute increment" valueNotes=""/>
  4896. <argument token="U" description="unscaled flag" valueNotes="0 or 1" optional="true"/>
  4897. </arguments>
  4898. <references>
  4899. <identifierReference identifier="getclosestent"/>
  4900. <identifierReference identifier="getentattr"/>
  4901. <identifierReference identifier="getenttype"/>
  4902. <identifierReference identifier="editmeta"/>
  4903. <identifierReference identifier="editmeta2"/>
  4904. </references>
  4905. </command>
  4906. <command name="clearents">
  4907. <description>Deletes all entities of said type.</description>
  4908. <arguments>
  4909. <argument token="T" description="the entity type, see command 'newent'" valueNotes="string"/>
  4910. </arguments>
  4911. <references>
  4912. <identifierReference identifier="delent"/>
  4913. <identifierReference identifier="deleteentity"/>
  4914. </references>
  4915. </command>
  4916. <variable name="cleanedit">
  4917. <description>Turns on/off clean edit mode.</description>
  4918. <remarks>
  4919. <remark>While editing in clean edit mode, objects/guides not normally visible remain invisible.</remark>
  4920. <remark>i.e. The grid guidelines, selection borders, entity sparkles, clips, playerstart arrows are hidden</remark>
  4921. </remarks>
  4922. <arguments>
  4923. <argument token="V" description="sets cleanedit on/off" valueNotes="0 (off), 1 (on)"/>
  4924. </arguments>
  4925. <references>
  4926. <identifierReference identifier="togglecleanedit"/>
  4927. </references>
  4928. </variable>
  4929. <command name="togglecleanedit">
  4930. <description>Inverses the on/off state of cleanedit</description>
  4931. <references>
  4932. <identifierReference identifier="cleanedit"/>
  4933. </references>
  4934. </command>
  4935. <command name="recalc">
  4936. <description>Recomputes all there is to recompute about a map, currently only lighting.</description>
  4937. </command>
  4938. <command name="savemap">
  4939. <description>Saves the current map.</description>
  4940. <remarks>
  4941. <remark>
  4942. It makes a versioned backup (mapname_N.BAK) if a map by that name already exists.
  4943. If the name argument is omitted, it is saved under the current map name.
  4944. </remark>
  4945. <remark>
  4946. Where you store a map depends on the complexity of what you are creating: if its a single
  4947. map (maybe with its own .cfg) then the "base" package is the best place. If its multiple maps
  4948. or a map with new media (textures etc.) its better to store it in its own package (a directory under "packages"),
  4949. which makes distributing it less messy.
  4950. </remark>
  4951. <remark>
  4952. For "savemap" to save different maps during editing with undo data, the variable "preserveundosonsave" has to be "1".
  4953. It is "0" by default. "savemap" when not editing saves optimised map, with no undo data.
  4954. </remark>
  4955. </remarks>
  4956. <references>
  4957. <identifierReference identifier="map"/>
  4958. <identifierReference identifier="savemapoptimised"/>
  4959. <identifierReference identifier="preserveundosonsave"/>
  4960. </references>
  4961. <arguments>
  4962. <argument token="M" description="file name of the map, see command 'map' for the naming scheme" valueNotes="string"/>
  4963. </arguments>
  4964. </command>
  4965. <command name="savemapoptimised">
  4966. <description>Saves optimised the current map, with no undo data.</description>
  4967. <remarks>
  4968. <remark>
  4969. It makes a versioned backup (mapname_N.BAK) if a map by that name already exists.
  4970. If the name argument is omitted, it is saved under the current map name.
  4971. </remark>
  4972. </remarks>
  4973. <references>
  4974. <identifierReference identifier="map"/>
  4975. <identifierReference identifier="savemap"/>
  4976. </references>
  4977. <arguments>
  4978. <argument token="M" description="file name of the map, see command 'map' for the naming scheme" valueNotes="string"/>
  4979. </arguments>
  4980. </command>
  4981. <variable name="preserveundosonsave">
  4982. <description>Determines if undo data should be preserved on using "savemap" command.</description>
  4983. <remarks>
  4984. <remark>Undo data can be saved only in edit mode.</remark>
  4985. </remarks>
  4986. <value token="N" description="0: don't preserve undos, 1: preserve undos" minValue="0" maxValue="1" defaultValue="0"/>
  4987. <references>
  4988. <identifierReference identifier="savemap"/>
  4989. </references>
  4990. </variable>
  4991. <variable name="mapbackupsonsave">
  4992. <description>Determines if map backups (.bak) should be created when a map is saved.</description>
  4993. <value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
  4994. </variable>
  4995. <command name="savemap9">
  4996. <description>Saves a map in old map format 9 (may lose some map details that are not possible with format 9).</description>
  4997. </command>
  4998. <command name="newmap">
  4999. <description>Creates a new map.</description>
  5000. <remarks>
  5001. <remark>The new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large.</remark>
  5002. </remarks>
  5003. <arguments>
  5004. <argument token="S" description="the size of the new map" valueNotes="6..9"/>
  5005. </arguments>
  5006. <references>
  5007. <identifierReference identifier="mapsize"/>
  5008. <identifierReference identifier="mapenlarge"/>
  5009. <identifierReference identifier="mapshrink"/>
  5010. </references>
  5011. </command>
  5012. <command name="mapsize">
  5013. <description>Outputs the mapsize.</description>
  5014. <references>
  5015. <identifierReference identifier="newmap"/>
  5016. <identifierReference identifier="mapenlarge"/>
  5017. <identifierReference identifier="mapshrink"/>
  5018. </references>
  5019. </command>
  5020. <command name="mapenlarge">
  5021. <description>Enlarges the current map.</description>
  5022. <remarks>
  5023. <remark>
  5024. This command will make the current map 1 power of two bigger.
  5025. So a size 6 map (64x64 units) will become a size 7 map (128x128),
  5026. with the old map in the middle (from 32-96) and the new areas solid.
  5027. </remark>
  5028. </remarks>
  5029. <references>
  5030. <identifierReference identifier="newmap"/>
  5031. <identifierReference identifier="mapsize"/>
  5032. <identifierReference identifier="mapshrink"/>
  5033. </references>
  5034. </command>
  5035. <command name="mapshrink">
  5036. <description>Reduces the world size by 1.</description>
  5037. <remarks>
  5038. <remark>
  5039. This command will make the current map 1 power of two smaller.
  5040. So a size 7 map (128x128) will become a 6 size map (64x64 units), by removing 32 cubes from each side.
  5041. The area to be removed needs to be empty (= all solid).
  5042. </remark>
  5043. </remarks>
  5044. <references>
  5045. <identifierReference identifier="newmap"/>
  5046. <identifierReference identifier="mapsize"/>
  5047. <identifierReference identifier="mapenlarge"/>
  5048. </references>
  5049. </command>
  5050. <variable name="mapmsg">
  5051. <description>Sets the map message, which will be displayed when the map loads.</description>
  5052. <remarks>
  5053. <remark>You will need to use quote marks around the message, otherwise it save the message correctly.</remark>
  5054. <remark>For example: /mapmsg "Map By Author"</remark>
  5055. <remark>You can get the current map message with the $mapmsg variable.</remark>
  5056. </remarks>
  5057. <arguments>
  5058. <argument token="M" description="The map message" valueNotes="string"/>
  5059. </arguments>
  5060. <references>
  5061. <identifierReference identifier="editmapmsg"/>
  5062. </references>
  5063. </variable>
  5064. <command name="editmapmsg">
  5065. <description>Allows to edit the map message.</description>
  5066. <references>
  5067. <identifierReference identifier="mapmsg"/>
  5068. </references>
  5069. </command>
  5070. <variable name="mapinfo_license">
  5071. <description>Sets the map license.</description>
  5072. <remarks>
  5073. <remark>
  5074. The name of license is stored withing the header of a map file. The license string is meant to hold
  5075. an abbreviated name of the license, picked from a list of known map licenses.
  5076. </remark>
  5077. <remark>You can get the type of map license with the $mapinfo_license variable.</remark>
  5078. </remarks>
  5079. <arguments>
  5080. <argument token="L" description="type of license" valueNotes="string"/>
  5081. </arguments>
  5082. <references>
  5083. <identifierReference identifier="mapinfo_comment"/>
  5084. </references>
  5085. </variable>
  5086. <variable name="mapinfo_comment">
  5087. <description>Sets the map comment string.</description>
  5088. <remarks>
  5089. <remark>
  5090. The variable is stored withing the header of a map file.
  5091. The comment string is ignored, as long as no map license string is set.
  5092. </remark>
  5093. <remark>You can get the comment string with the $mapinfo_comment variable.</remark>
  5094. </remarks>
  5095. <arguments>
  5096. <argument token="C" description="comment" valueNotes="string"/>
  5097. </arguments>
  5098. <references>
  5099. <identifierReference identifier="mapinfo_license"/>
  5100. </references>
  5101. </variable>
  5102. <command name="entstats">
  5103. <description>Prints some map entity statistics to the console.</description>
  5104. </command>
  5105. <command name="closestenttype">
  5106. <description>Restricts 'closest entity' display to one entity type.</description>
  5107. <remarks>
  5108. <remark>It returns the current value and not change the value if the argument is "-".</remark>
  5109. </remarks>
  5110. <arguments>
  5111. <argument token="A" description="the entity type or number" valueNotes="light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)"/>
  5112. </arguments>
  5113. </command>
  5114. <command name="nextclosestent">
  5115. <description>Chooses another 'closest ent'.</description>
  5116. <remarks>
  5117. <remark>Use this, when two entities are placed in exactly the same location.</remark>
  5118. </remarks>
  5119. </command>
  5120. <command name="nextplayerstart">
  5121. <description>Visit next player spawn entity.</description>
  5122. <arguments>
  5123. <argument token="N" description="team number" valueNotes="0: CLA, 1: RVSF, 100: FFA"/>
  5124. </arguments>
  5125. <references>
  5126. <identifierReference identifier="gonextplayerstart"/>
  5127. </references>
  5128. </command>
  5129. <command name="gonextplayerstart">
  5130. <description>Visit next or previous player spawn entity.</description>
  5131. <arguments>
  5132. <argument token="N" description="direction" valueNotes="none or 1: next, -1: previous"/>
  5133. </arguments>
  5134. <references>
  5135. <identifierReference identifier="nextplayerstart"/>
  5136. </references>
  5137. </command>
  5138. <command name="convertclips">
  5139. <description>Converts the nearest entity (if its a clip or plclip) to its opposite type.</description>
  5140. <examples>
  5141. <example>
  5142. <code><![CDATA[convertclips]]></code>
  5143. <explanation>Assuming the nearest entity is a clip, it will be converted to a plclip.</explanation>
  5144. </example>
  5145. <example>
  5146. <code><![CDATA[convertclips]]></code>
  5147. <explanation>Assuming the nearest entity is a plclip, it will be converted to a clip.</explanation>
  5148. </example>
  5149. </examples>
  5150. </command>
  5151. <command name="movemap">
  5152. <description>Moves the whole map (including all entities) in the specified direction.</description>
  5153. <arguments>
  5154. <argument token="dX" description="x-offset"/>
  5155. <argument token="dY" description="y-offset"/>
  5156. <argument token="dZ" description="z-offset"/>
  5157. </arguments>
  5158. </command>
  5159. <command name="selectionflip">
  5160. <description>Flips the selected part of the map at an axis.</description>
  5161. <arguments>
  5162. <argument token="AXIS" description="X or Y"/>
  5163. </arguments>
  5164. </command>
  5165. <command name="selectionrotate">
  5166. <description>Rotates the selected part of the map in 90 degree steps.</description>
  5167. <arguments>
  5168. <argument token="D" description="steps"/>
  5169. </arguments>
  5170. <remarks>
  5171. <remark>
  5172. To rotate clockwise, use a positive number of steps. Note, that only quadratic selections can be rotated by 90 degrees.
  5173. </remark>
  5174. </remarks>
  5175. </command>
  5176. <variable name="editaxis">
  5177. <description>Returns a value for the main axis of player orientation.</description>
  5178. <remarks>
  5179. <remark>"100" is added if the player is looking in the negative direction of the axis.</remark>
  5180. </remarks>
  5181. <value description="main axis of player orientation" minValue="0" maxValue="113" defaultValue="0" readOnly="true" valueNotes="11 (X), 12 (Y), 13 (Z), 111 (-X), 112 (-Y), 113 (-Z)"/>
  5182. </variable>
  5183. <variable name="advancemaprevision">
  5184. <description>Selects the increment of the map revision number for the next 'savemap'.</description>
  5185. <value token="N" description="increment" minValue="1" maxValue="100" defaultValue="1"/>
  5186. </variable>
  5187. <variable name="showmodelclipping">
  5188. <description>Show mapmodel clipping during edit mode.</description>
  5189. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="0"/>
  5190. </variable>
  5191. <variable name="showgrid">
  5192. <description>Show editing cursor grid.</description>
  5193. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="1"/>
  5194. </variable>
  5195. <variable name="showclips">
  5196. <description>Show clips/plclips/mapmodel clips in edit mode.</description>
  5197. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="1"/>
  5198. </variable>
  5199. <variable name="showtagclips">
  5200. <description>Show tagclips/tagplclips in edit mode.</description>
  5201. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="1"/>
  5202. <references>
  5203. <identifierReference identifier="showtagclipfocus"/>
  5204. <identifierReference identifier="taglife"/>
  5205. <identifierReference identifier="tagnum"/>
  5206. <identifierReference identifier="tagnumfull"/>
  5207. </references>
  5208. </variable>
  5209. <variable name="tagnum">
  5210. <description>Number of particles in the focused on tagclip volume.</description>
  5211. <value token="C" description="count" minValue="1" maxValue="100" valueNotes="particle count" defaultValue="14"/>
  5212. <remarks>
  5213. <remark>source comments suggest this may become hardwired in the future</remark>
  5214. </remarks>
  5215. <references>
  5216. <identifierReference identifier="showtagclips"/>
  5217. <identifierReference identifier="tagnum"/>
  5218. <identifierReference identifier="tagnumfull"/>
  5219. </references>
  5220. </variable>
  5221. <variable name="tagnumfull">
  5222. <description>Number of particles in any tagclip volume - if showtagclipfocus is not 1.</description>
  5223. <value token="C" description="count" minValue="1" maxValue="100" valueNotes="particle count" defaultValue="0"/>
  5224. <remarks>
  5225. <remark>source comments suggest this may become hardwired in the future</remark>
  5226. </remarks>
  5227. <references>
  5228. <identifierReference identifier="showtagclips"/>
  5229. <identifierReference identifier="showtagclipfocus"/>
  5230. </references>
  5231. </variable>
  5232. <variable name="taglife">
  5233. <description>Fading time of sparklies in focused on tagclip volume</description>
  5234. <value token="T" description="time" minValue="1" maxValue="1000" valueNotes="milliseconds" defaultValue="30"/>
  5235. <remarks>
  5236. <remark>source comments suggest this may become hardwired in the future</remark>
  5237. </remarks>
  5238. <references>
  5239. <identifierReference identifier="showtagclips"/>
  5240. <identifierReference identifier="showtagclipfocus"/>
  5241. <identifierReference identifier="tagnum"/>
  5242. </references>
  5243. </variable>
  5244. <variable name="showladderentities">
  5245. <description>Show ladder entities (as blue wireframes) in edit mode.</description>
  5246. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="0"/>
  5247. </variable>
  5248. <command name="guidetoggle">
  5249. <description>Enables or disables a special set of default textures while editing.</description>
  5250. <remarks>
  5251. <remark>The textures in "packages/textures/map_editor" are used.</remark>
  5252. </remarks>
  5253. </command>
  5254. <variable name="waterlevel">
  5255. <description>Sets the global water level for the map.</description>
  5256. <remarks>
  5257. <remark>
  5258. Every cube that has a lower floor than the water level will be rendered with a nice wavy
  5259. water alpha texture. Water physics will be applied to any entity located below it.
  5260. </remark>
  5261. <remark>
  5262. Performance notes: water is rendered for a whole square encapsulating all visible water areas
  5263. in the map (try flying above the map in edit mode to see how). So the most efficient water is
  5264. a single body of water, or multiple water areas that are mostly not visible from each other.
  5265. Players can influence how accurate the water is rendered using the "watersubdiv" command (map config).
  5266. </remark>
  5267. </remarks>
  5268. <value token="H" description="the water level" valueNotes="float, -10000=&quot;no water&quot;" minValue="-128" maxValue="127" defaultValue="-10000"/>
  5269. <references>
  5270. <identifierReference identifier="watersubdiv"/>
  5271. </references>
  5272. </variable>
  5273. <command name="getwatercolour">
  5274. <description>Returns a string with the four components of the water colour: red, green, blue and alpha.</description>
  5275. <examples>
  5276. <example>
  5277. <code><![CDATA[echo (getwatercolor)]]></code>
  5278. <explanation>Output: 20 25 20 178</explanation>
  5279. </example>
  5280. </examples>
  5281. <references>
  5282. <identifierReference identifier="watercolour"/>
  5283. <identifierReference identifier="setwatercolour"/>
  5284. </references>
  5285. </command>
  5286. <command name="setwatercolour">
  5287. <description>Allows setting the components of the water colour independently.</description>
  5288. <remarks>
  5289. <remark>
  5290. "what" is either a keyword "red|green|blue|alpha" or the index number 0..3 and determines,
  5291. which component is set to value.
  5292. </remark>
  5293. </remarks>
  5294. <examples>
  5295. <example>
  5296. <code><![CDATA[setwatercolour red 200]]></code>
  5297. <explanation>- sets the red component to 200</explanation>
  5298. </example>
  5299. </examples>
  5300. <arguments>
  5301. <argument token="W" description="what" valueNotes="red (0), green (1), blue (2), alpha (3)"/>
  5302. <argument token="V" description="value" valueNotes="(0)1..255"/>
  5303. </arguments>
  5304. <references>
  5305. <identifierReference identifier="watercolour"/>
  5306. <identifierReference identifier="getwatercolour"/>
  5307. </references>
  5308. </command>
  5309. <variable name="ambient">
  5310. <description>Controls the ambient lighting of the map, i.e. how bright areas not affected by any light entities will appear.</description>
  5311. <description>This should be entered in hexadecimal notation, as 0xRRGGBB. If the green and blue are both zero, the input will be interpreted as a grayscale value.</description>
  5312. <value token="N" description="the ambient color" minValue="0x000000" maxValue="0xFFFFFF" defaultValue="0"/>
  5313. </variable>
  5314. <variable name="fullbright">
  5315. <description>Sets all light values to fullbright.</description>
  5316. <value token="B" description="sets fullbright on or off" valueNotes="0 (off), 1 (on)"/>
  5317. <remarks>
  5318. <remark>Will be reset when you issue a 'recalc'. Only works in edit mode.</remark>
  5319. </remarks>
  5320. <defaultKeys>
  5321. <key alias="F7" description="toggles fullbright"/>
  5322. </defaultKeys>
  5323. </variable>
  5324. <variable name="fullbrightlevel">
  5325. <description>Sets the level of brightness to use when using the command "/fullbright 1".</description>
  5326. <value token="V" description="Light intensity level" minValue="0" maxValue="255" defaultValue="176"/>
  5327. </variable>
  5328. <command name="showmip">
  5329. <description>Toggles between showing what parts of the scenery are rendered.</description>
  5330. <remarks>
  5331. <remark>
  5332. Shows what parts of the scenery are rendered using what size cubes and outputs some statistics about it.
  5333. This can give map editors hints as to what architecture to align, textures to change, etc.
  5334. </remark>
  5335. <remark>If "showfocuscubedetails" is enabled, "showmip" stats on the HUD are hidden.</remark>
  5336. </remarks>
  5337. <defaultKeys>
  5338. <key alias="F6"/>
  5339. </defaultKeys>
  5340. <references>
  5341. <identifierReference identifier="calcmipstats"/>
  5342. <identifierReference identifier="showfocuscubedetails"/>
  5343. </references>
  5344. </command>
  5345. <command name="showfocuscubedetails">
  5346. <description>Shows detailed geometry data of the cube inside editing focus.</description>
  5347. <remarks>
  5348. <remark>It shows on the HUD cube type, floor and ceiling heights, vdelta and all textures.</remark>
  5349. </remarks>
  5350. <defaultKeys>
  5351. <key alias="F8"/>
  5352. </defaultKeys>
  5353. <references>
  5354. <identifierReference identifier="showmip"/>
  5355. </references>
  5356. </command>
  5357. <command name="toggleocull">
  5358. <description>Turns occlusion culling on and off.</description>
  5359. <remarks>
  5360. <remark>
  5361. The reason one may want to turn it off is to get an overview of the map from above,
  5362. without having all occluded bits stripped out.
  5363. </remark>
  5364. </remarks>
  5365. <defaultKeys>
  5366. <key alias="F5"/>
  5367. </defaultKeys>
  5368. </command>
  5369. <command name="slope">
  5370. <description>Makes a slope out of the current selection.</description>
  5371. <remarks>
  5372. <remark>
  5373. The selection must be a heightfield before this command can be used.
  5374. The steps specify the slope with the red vertex as left-top,
  5375. i.e. "slope 1 2" will make a slope that increases just 1 step from left to right,
  5376. and is slightly steeper from top to bottom. "slope -6 0" decreases steeply from left to right,
  5377. and does not slope at all from top to bottom. Note that like the vdelta command,
  5378. an increasing vdelta goes further away from the player, regardless of floor or ceiling.
  5379. </remark>
  5380. </remarks>
  5381. <arguments>
  5382. <argument token="X" description="x delta step" valueNotes="integer"/>
  5383. <argument token="Y" description="y delta step" valueNotes="integer"/>
  5384. </arguments>
  5385. <references>
  5386. <identifierReference identifier="enlargearchslopeselections"/>
  5387. </references>
  5388. </command>
  5389. <command name="arch">
  5390. <description>Makes an arch out of the current selection.</description>
  5391. <remarks>
  5392. <remark>
  5393. The selection must be a heightfield before this command can be used.
  5394. Will make the arch in the long direction, i.e when you have 6x2 cubes selected, the arch will span 7 vertices.
  5395. Optionally, sidedelta specifies the delta to add to the outer rows of vertices in the other direction,
  5396. i.e. give the impression of an arch that bends 2 ways (try "arch 2" on an selection of at least 2 thick to see the effect).
  5397. Not all arch sizes are necessarily available, see config/prefabs.cfg.
  5398. </remark>
  5399. </remarks>
  5400. <arguments>
  5401. <argument token="S" description="side delta" optional="true"/>
  5402. </arguments>
  5403. <references>
  5404. <identifierReference identifier="archvertex"/>
  5405. <identifierReference identifier="enlargearchslopeselections"/>
  5406. </references>
  5407. </command>
  5408. <command name="archvertex">
  5409. <description>Defines a vertex delta for a specific arch span prefab, used by the 'arch' command.</description>
  5410. <remarks>
  5411. <remark>It returns the old value of the vertex, and if the vertex argument is omitted, doesn't change it.</remark>
  5412. <remark>See config/prefabs.cfg for an example on usage.</remark>
  5413. </remarks>
  5414. <arguments>
  5415. <argument token="S" description="span value" valueNotes="integer"/>
  5416. <argument token="V" description="vertex value" valueNotes="integer"/>
  5417. <argument token="D" description="delta value" valueNotes="integer"/>
  5418. </arguments>
  5419. </command>
  5420. <variable name="enlargearchslopeselections">
  5421. <description>Automatically enlarge selections after placing arches or slopes.</description>
  5422. <remarks>
  5423. <remark>
  5424. If the variable is set to 1, after placing an arch or a slope, the selection is enlarged, so that the arch
  5425. or slope can be changed by vdelta increments (for example, to raise an arch in 1/4 cube increments).
  5426. </remark>
  5427. <remark>
  5428. If the variable is set to 0 (which is default), the selection remains unchanged. This way, for example,
  5429. the arch can be raised or lowered by regular cube increments.
  5430. </remark>
  5431. </remarks>
  5432. <value token="N" description="0: don't enlarge selection, 1: enlarge selection" minValue="0" maxValue="1" defaultValue="0"/>
  5433. <references>
  5434. <identifierReference identifier="arch"/>
  5435. <identifierReference identifier="slope"/>
  5436. </references>
  5437. </variable>
  5438. <command name="perlin">
  5439. <description>Generates a perlin noise landscape in the current selection.</description>
  5440. <remarks>
  5441. <remark>
  5442. Keep the seed the same to create multiple perlin areas which fit with each other,
  5443. or use different numbers if to create alternative random generations.
  5444. </remark>
  5445. </remarks>
  5446. <arguments>
  5447. <argument token="S" description="the scale, frequency of the features" valueNotes="default is 10"/>
  5448. <argument token="E" description="the random seed" valueNotes="integer"/>
  5449. <argument token="C" description="cube size, how many cubes to generate a surface for at once (unused)"/>
  5450. </arguments>
  5451. </command>
  5452. <command name="select">
  5453. <description>Resets all current selections and selects the given area, as if dragged with the mouse.</description>
  5454. <remarks>
  5455. <remark>
  5456. This command is similar to addselection although "select" resets all selections.
  5457. </remark>
  5458. </remarks>
  5459. <references>
  5460. <identifierReference identifier="addselection"/>
  5461. <identifierReference identifier="selectall"/>
  5462. <identifierReference identifier="resetselections"/>
  5463. <identifierReference identifier="expandselection"/>
  5464. <identifierReference identifier="shrinkselection"/>
  5465. <identifierReference identifier="enlargevdeltaselections"/>
  5466. <identifierReference identifier="selx"/>
  5467. <identifierReference identifier="sely"/>
  5468. <identifierReference identifier="selxs"/>
  5469. <identifierReference identifier="selys"/>
  5470. <identifierReference identifier="selectionwalk"/>
  5471. <identifierReference identifier="pushselections"/>
  5472. </references>
  5473. <arguments>
  5474. <argument token="X" description="the X coordinate"/>
  5475. <argument token="Y" description="the Y coordinate"/>
  5476. <argument token="XS" description="the length along the X axis"/>
  5477. <argument token="XY" description="the length along the Y axis"/>
  5478. </arguments>
  5479. </command>
  5480. <command name="addselection">
  5481. <description>Selects the given area, as if dragged with the mouse holding editmeta.</description>
  5482. <remarks>
  5483. <remark>
  5484. This command is useful for making complex geometry-generating scripts.
  5485. It adds a selection to the current list of selections.
  5486. The dimensions of the current selections can be accessed by the commands selx, sely, selxs and selys.
  5487. These commands return the list of coordinates corresponding to each selection.
  5488. </remark>
  5489. <remark>
  5490. Coordinates are as follows: after a "newmap 6" the top-left corner (the one where the red dot points) are (8,8),
  5491. the opposite corner is (56,56) (or (120,120) on a "newmap 7" etc.).
  5492. </remark>
  5493. </remarks>
  5494. <references>
  5495. <identifierReference identifier="select"/>
  5496. <identifierReference identifier="selectall"/>
  5497. <identifierReference identifier="resetselections"/>
  5498. <identifierReference identifier="expandselection"/>
  5499. <identifierReference identifier="shrinkselection"/>
  5500. <identifierReference identifier="enlargevdeltaselections"/>
  5501. <identifierReference identifier="selx"/>
  5502. <identifierReference identifier="sely"/>
  5503. <identifierReference identifier="selxs"/>
  5504. <identifierReference identifier="selys"/>
  5505. <identifierReference identifier="selectionwalk"/>
  5506. <identifierReference identifier="pushselections"/>
  5507. <identifierReference identifier="editmeta"/>
  5508. </references>
  5509. <arguments>
  5510. <argument token="X" description="the X coordinate"/>
  5511. <argument token="Y" description="the Y coordinate"/>
  5512. <argument token="XS" description="the length along the X axis"/>
  5513. <argument token="XY" description="the length along the Y axis"/>
  5514. </arguments>
  5515. </command>
  5516. <command name="selectall">
  5517. <description>Selects the whole map (minus the two cubes wide border).</description>
  5518. <references>
  5519. <identifierReference identifier="select"/>
  5520. <identifierReference identifier="addselection"/>
  5521. <identifierReference identifier="resetselections"/>
  5522. </references>
  5523. </command>
  5524. <command name="resetselections">
  5525. <description>Resets all current selections.</description>
  5526. <references>
  5527. <identifierReference identifier="select"/>
  5528. <identifierReference identifier="selectall"/>
  5529. <identifierReference identifier="addselection"/>
  5530. </references>
  5531. </command>
  5532. <command name="expandselection">
  5533. <description>Increases the size of the current selection by N cubes on all sides.</description>
  5534. <arguments>
  5535. <argument token="N" description="number of cubes" valueNotes="integer"/>
  5536. </arguments>
  5537. <remarks>
  5538. <remark>Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel.</remark>
  5539. <remark>It works also with multiple selections.</remark>
  5540. </remarks>
  5541. <references>
  5542. <identifierReference identifier="select"/>
  5543. <identifierReference identifier="addselection"/>
  5544. <identifierReference identifier="shrinkselection"/>
  5545. </references>
  5546. </command>
  5547. <command name="shrinkselection">
  5548. <description>Decreases the size of the current selection by N cubes on all sides.</description>
  5549. <arguments>
  5550. <argument token="N" description="number of cubes" valueNotes="integer"/>
  5551. </arguments>
  5552. <remarks>
  5553. <remark>Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel.</remark>
  5554. <remark>It works also with multiple selections.</remark>
  5555. </remarks>
  5556. <references>
  5557. <identifierReference identifier="select"/>
  5558. <identifierReference identifier="addselection"/>
  5559. <identifierReference identifier="expandselection"/>
  5560. </references>
  5561. </command>
  5562. <command name="enlargevdeltaselections">
  5563. <description>Enlarges all selections by one cube in x- and y- direction, to change a selection from the "cube area" to the "vdelta area".</description>
  5564. <remarks>
  5565. <remark>
  5566. If an argument is given, it is used as increment value, so, for example "enlargevdeltaselections -1" undoes
  5567. a previous enlargement.
  5568. </remark>
  5569. </remarks>
  5570. <arguments>
  5571. <argument token="I" description="incremente" optional="true"/>
  5572. </arguments>
  5573. <references>
  5574. <identifierReference identifier="select"/>
  5575. <identifierReference identifier="addselection"/>
  5576. </references>
  5577. </command>
  5578. <command name="selx">
  5579. <description>Returns the x-coordinate of the westernmost (towards negative x) cube(s) in the current selection.</description>
  5580. <references>
  5581. <identifierReference identifier="select"/>
  5582. <identifierReference identifier="sely"/>
  5583. <identifierReference identifier="selxs"/>
  5584. <identifierReference identifier="selys"/>
  5585. </references>
  5586. </command>
  5587. <command name="selxs">
  5588. <description>Returns the x-span (size on the x-axis) of the current selection.</description>
  5589. <references>
  5590. <identifierReference identifier="select"/>
  5591. <identifierReference identifier="selx"/>
  5592. <identifierReference identifier="sely"/>
  5593. <identifierReference identifier="selys"/>
  5594. </references>
  5595. </command>
  5596. <command name="sely">
  5597. <description>Returns the y-coordinate of the northernmost (towards negative y) cube(s) in the current selection.</description>
  5598. <references>
  5599. <identifierReference identifier="select"/>
  5600. <identifierReference identifier="selx"/>
  5601. <identifierReference identifier="selxs"/>
  5602. <identifierReference identifier="selys"/>
  5603. </references>
  5604. </command>
  5605. <command name="selys">
  5606. <description>Returns the y-span (size on the y-axis) of the current selection.</description>
  5607. <references>
  5608. <identifierReference identifier="select"/>
  5609. <identifierReference identifier="selx"/>
  5610. <identifierReference identifier="sely"/>
  5611. <identifierReference identifier="selxs"/>
  5612. </references>
  5613. </command>
  5614. <command name="selectionwalk">
  5615. <description>Iterates over all cubes in all selections and executes "action" for each cube.</description>
  5616. <remarks>
  5617. <remark>
  5618. The cubes of every selection are framed by executions of "beginsel" and "endsel", i.e. for each new selection,
  5619. before executing "action" for the cubes of that selection, "beginsel" is executed, and then, after actions for all
  5620. cubes of that selection, "endsel" is executed. The action script is allowed to make changes to cube attributes,
  5621. and if it does, an undo point is automatically added. "beginsel" and "endsel" are optional.
  5622. </remark>
  5623. <remark>While the scripts are executed, several aliases provide further info:</remark>
  5624. <remark>
  5625. "sw_cursel" - position and size of the current selection. Valid in all three scripts.
  5626. Holds four integer values for x, y, xs, ys. See "select" command for details.
  5627. </remark>
  5628. <remark>
  5629. (all following aliases are only valid during the execution of the action
  5630. script and provide the attributes of one cube of the map)
  5631. </remark>
  5632. <remark>
  5633. "sw_abs_x", "sw_abs_y", "sw_rel_x", "sw_rel_y" - absolute and relative (within the current selection) coordinates
  5634. of the current cube. Read-only values.
  5635. </remark>
  5636. <remark>
  5637. "sw_type" - type of the current cube. Can be 0..4 for SOLID, CORNER, FHF, CHF and SPACE.
  5638. May be changed to other numerical value or keyword.
  5639. </remark>
  5640. <remark>"sw_floor", "sw_ceil" - floor and ceiling heights of the current cube. Range -128..127.</remark>
  5641. <remark>
  5642. "sw_wtex", "sw_ftex", "sw_ctex", "sw_utex" - texture slot indices for wall, floor, ceiling
  5643. and upper wall of the current cube.
  5644. </remark>
  5645. <remark>"sw_vdelta", "sw_tag" - vdelta and tag values of current cube.</remark>
  5646. <remark>
  5647. "sw_r", "sw_g", "sw_b" - current light values of current cube. Can be edited, but only with temporary effect.
  5648. Will be reset with the next light recalc.
  5649. </remark>
  5650. <remark>
  5651. The command is mostly useful for statistics scripts (like counting cubes with certain attributes), but is can also
  5652. be used for scripted editing, as the following (useless) example shows: selectionwalk [ += sw_floor (rnd 2) ]
  5653. </remark>
  5654. </remarks>
  5655. <arguments>
  5656. <argument token="action" description="action"/>
  5657. <argument token="beginsel" description="begin action before cubes action of each selection" optional="true"/>
  5658. <argument token="endsel" description="end action before cubes action of each selection" optional="true"/>
  5659. </arguments>
  5660. <references>
  5661. <identifierReference identifier="select"/>
  5662. <identifierReference identifier="addselection"/>
  5663. </references>
  5664. </command>
  5665. <scriptalias name="pushselections">
  5666. <description>Stores the positions of all current selections.</description>
  5667. <remarks>
  5668. <remark>Can be used repeatedly. To restore the selections, type "popselections".</remark>
  5669. </remarks>
  5670. <references>
  5671. <identifierReference identifier="select"/>
  5672. <identifierReference identifier="addselection"/>
  5673. </references>
  5674. </scriptalias>
  5675. <command name="scalelights">
  5676. <description>Scales all lights in the map.</description>
  5677. <remarks>
  5678. <remark>This command is useful if a map is too dark or bright but you want to keep the light entities where they are.</remark>
  5679. </remarks>
  5680. <arguments>
  5681. <argument token="S" description="size change (percentage)"/>
  5682. <argument token="I" description="intensity change (percentage)"/>
  5683. </arguments>
  5684. </command>
  5685. <variable name="editing">
  5686. <description>A variable indicating if the game is in editmode.</description>
  5687. <value description="editmode in singleplayer" minValue="0" maxValue="1" defaultValue="0" readOnly="true" valueNotes="1 (true), 0 (false)"/>
  5688. <references>
  5689. <identifierReference identifier="editing_sp"/>
  5690. </references>
  5691. </variable>
  5692. <variable name="editing_sp">
  5693. <description>A variable indicating if the game is in singleplayer editmode.</description>
  5694. <value description="editmode" minValue="0" maxValue="1" defaultValue="0" readOnly="true" valueNotes="1 (true), 0 (false)"/>
  5695. <references>
  5696. <identifierReference identifier="editing"/>
  5697. </references>
  5698. </variable>
  5699. <variable name="flrceil">
  5700. <description>A variable indicating if the player looks at the floor or at the ceiling.</description>
  5701. <value description="flrceil" minValue="0" maxValue="2" defaultValue="0" readOnly="true" valueNotes="0 (floor), 2 (ceiling)"/>
  5702. </variable>
  5703. <scriptalias name="onNewMap">
  5704. <description>This alias will automatically be executed when a new map is created via the "newmap" command.</description>
  5705. <remarks>
  5706. <remark>Does not affect the loading of an existing map.</remark>
  5707. </remarks>
  5708. <references>
  5709. <identifierReference identifier="newmap"/>
  5710. <identifierReference identifier="mapstartonce"/>
  5711. <identifierReference identifier="mapstartalways"/>
  5712. </references>
  5713. </scriptalias>
  5714. <variable name="oldselstyle">
  5715. <description>Enables or disables using squares to render the editing grid/current selection instead of triangles.</description>
  5716. <value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
  5717. </variable>
  5718. <command name="gotoposition">
  5719. <description>Only in edit mode: gets and sets camera position.</description>
  5720. <remarks>
  5721. <remark>Returns x, y, z, yaw and pitch. Sets x, y, z, yaw and pitch, if the parameter is not an empty string.</remark>
  5722. </remarks>
  5723. <arguments>
  5724. <argument token="x" description="X coordinate" valueNotes="float"/>
  5725. <argument token="y" description="Y coordinate" valueNotes="float"/>
  5726. <argument token="z" description="Z coordinate" valueNotes="float"/>
  5727. <argument token="yaw" description="yaw" valueNotes="integer"/>
  5728. <argument token="pitch" description="pitch" valueNotes="integer"/>
  5729. </arguments>
  5730. <examples>
  5731. <example>
  5732. <code><![CDATA[echo (gotoposition)]]></code>
  5733. <explanation>Output: 67.7 78.6 5.5 8 0</explanation>
  5734. </example>
  5735. <example>
  5736. <code><![CDATA[gotoposition "" "" "" 180 0]]></code>
  5737. <explanation>Change yaw and pitch to look straight in +y direction.</explanation>
  5738. </example>
  5739. </examples>
  5740. </command>
  5741. <command name="setvantagepoint">
  5742. <description>Sets vantage point in current camera position.</description>
  5743. <remarks>
  5744. <remark>
  5745. The vantage point is supposed to be a distinctive view on a map - like the angle from which the preview picture
  5746. was taken. It is allowed to use when editing offline or spectating offline.
  5747. </remark>
  5748. <remark>A map can only have one vantage point.</remark>
  5749. </remarks>
  5750. <references>
  5751. <identifierReference identifier="gotovantagepoint"/>
  5752. <identifierReference identifier="getvantagepoint"/>
  5753. <identifierReference identifier="clearvantagepoint"/>
  5754. </references>
  5755. </command>
  5756. <command name="getvantagepoint">
  5757. <description>Returns string with coordinates of vantage point or empty string, if none is set.</description>
  5758. <references>
  5759. <identifierReference identifier="setvantagepoint"/>
  5760. <identifierReference identifier="gotovantagepoint"/>
  5761. <identifierReference identifier="clearvantagepoint"/>
  5762. </references>
  5763. </command>
  5764. <command name="gotovantagepoint">
  5765. <description>Sets camera position in vantage point.</description>
  5766. <remarks>
  5767. <remark>It returns 1, if the map actually has a vantage point set.</remark>
  5768. </remarks>
  5769. <references>
  5770. <identifierReference identifier="setvantagepoint"/>
  5771. <identifierReference identifier="getvantagepoint"/>
  5772. <identifierReference identifier="clearvantagepoint"/>
  5773. </references>
  5774. </command>
  5775. <command name="clearvantagepoint">
  5776. <description>Clears a set parameters of vantage point.</description>
  5777. <references>
  5778. <identifierReference identifier="setvantagepoint"/>
  5779. <identifierReference identifier="getvantagepoint"/>
  5780. <identifierReference identifier="gotovantagepoint"/>
  5781. </references>
  5782. </command>
  5783. <command name="showmapstats">
  5784. <description>Prints some map statistics.</description>
  5785. </command>
  5786. <command name="showmapdims">
  5787. <description>Prints map dimensions.</description>
  5788. </command>
  5789. <variable name="unsavededits">
  5790. <description>Holds the number of unsaved edits.</description>
  5791. </variable>
  5792. <command name="mapmodelslotname">
  5793. <description>Returns the map model name (and path) of the mapmodel registered in the given slot number in the map config file.</description>
  5794. <arguments>
  5795. <argument token="N" description="mapmodel slot number"/>
  5796. </arguments>
  5797. <references>
  5798. <identifierReference identifier="mapmodel"/>
  5799. <identifierReference identifier="mapmodelslotbyname"/>
  5800. <identifierReference identifier="mapmodelslotusage"/>
  5801. <identifierReference identifier="editmapmodelslot"/>
  5802. <identifierReference identifier="deletemapmodelslot"/>
  5803. </references>
  5804. </command>
  5805. <command name="mapmodelslotbyname">
  5806. <description>Returns the slot number registered in the map config file of the model with the given name.</description>
  5807. <arguments>
  5808. <argument token="M" description="mapmodel name (with path)"/>
  5809. </arguments>
  5810. <examples>
  5811. <example>
  5812. <code><![CDATA[echo (mapmodelslotbyname "mapmodels/makke/platform_bridge")]]></code>
  5813. <explanation>Output: 5</explanation>
  5814. </example>
  5815. </examples>
  5816. <references>
  5817. <identifierReference identifier="mapmodel"/>
  5818. <identifierReference identifier="mapmodelslotname"/>
  5819. <identifierReference identifier="mapmodelslotusage"/>
  5820. <identifierReference identifier="editmapmodelslot"/>
  5821. <identifierReference identifier="deletemapmodelslot"/>
  5822. </references>
  5823. </command>
  5824. <command name="mapmodelslotusage">
  5825. <description>Returns a list of map entity indices which use a certain mapmodel slot.</description>
  5826. <remarks>
  5827. <remark>If the mapmodel is unused, it returns an empty string.</remark>
  5828. <remark>
  5829. It returns a single space, if the model slot is not used by any map entity,
  5830. but is required by another model (with entities).
  5831. </remark>
  5832. </remarks>
  5833. <arguments>
  5834. <argument token="N" description="mapmodel slot number"/>
  5835. </arguments>
  5836. <references>
  5837. <identifierReference identifier="mapmodel"/>
  5838. <identifierReference identifier="mapmodelslotname"/>
  5839. <identifierReference identifier="mapmodelslotbyname"/>
  5840. <identifierReference identifier="editmapmodelslot"/>
  5841. <identifierReference identifier="deletemapmodelslot"/>
  5842. </references>
  5843. </command>
  5844. <command name="editmapmodelslot">
  5845. <description>Edits the parameters of a mapmodel slot.</description>
  5846. <remarks>
  5847. <remark>Edits the parameters of a mapmodel slot. Only non-empty parameters actually change something.</remark>
  5848. <remark>
  5849. The command returns the resulting data of the mapmodel slot. If only the mapmodel slot number is specified,
  5850. no changes are made, but the current data is returned (also in non-edit mode).
  5851. Therefore the command can be used to get and set parameters.
  5852. </remark>
  5853. <remark>If anything is changed, automapconfig is enabled.</remark>
  5854. </remarks>
  5855. <arguments>
  5856. <argument token="N" description="mapmodel slot number" valueNotes="integer"/>
  5857. <argument token="R" description="radius" valueNotes="integer"/>
  5858. <argument token="H" description="height" valueNotes="integer"/>
  5859. <argument token="Z" description="z-offset" valueNotes="integer"/>
  5860. <argument token="0" description="redundant, leave it at zero so you don't break the command" valueNotes="0"/>
  5861. <argument token="P" description="mapmodel path" valueNotes="string"/>
  5862. </arguments>
  5863. <examples>
  5864. <example>
  5865. <code><![CDATA[editmapmodelslot 33 "" "" -5]]></code>
  5866. <explanation>sets the z-offset of slot #33 to -5 without affecting other parameters</explanation>
  5867. </example>
  5868. <example>
  5869. <code><![CDATA[echo (editmapmodelslot 33)]]></code>
  5870. <explanation>prints the current parameters of mapmodel slot #33 , for example: 0 0 0 0 "makke/lightbulb"</explanation>
  5871. </example>
  5872. </examples>
  5873. <references>
  5874. <identifierReference identifier="mapmodel"/>
  5875. <identifierReference identifier="mapmodelslotname"/>
  5876. <identifierReference identifier="mapmodelslotbyname"/>
  5877. <identifierReference identifier="mapmodelslotusage"/>
  5878. <identifierReference identifier="deletemapmodelslot"/>
  5879. <identifierReference identifier="mapmodelchanged"/>
  5880. </references>
  5881. </command>
  5882. <command name="deletemapmodelslot">
  5883. <description>Deletes an unused mapmodel slot.</description>
  5884. <remarks>
  5885. <remark>
  5886. If "purge" is specified as second argument, it also deletes an used slot
  5887. (including all map entities which use that mapmodel).
  5888. </remark>
  5889. <remark>Also it enables automapconfig.</remark>
  5890. </remarks>
  5891. <arguments>
  5892. <argument token="N" description="mapmodel slot number"/>
  5893. <argument token="P" description="purge"/>
  5894. </arguments>
  5895. <references>
  5896. <identifierReference identifier="mapmodel"/>
  5897. <identifierReference identifier="mapmodelslotname"/>
  5898. <identifierReference identifier="mapmodelslotbyname"/>
  5899. <identifierReference identifier="mapmodelslotusage"/>
  5900. <identifierReference identifier="editmapmodelslot"/>
  5901. <identifierReference identifier="mapmodelchanged"/>
  5902. </references>
  5903. </command>
  5904. <command name="sortmapmodelslots">
  5905. <description>Sorts all mapmoodel slots alphabetically and merges identical slots.</description>
  5906. <remarks>
  5907. <remark>
  5908. By default, the list is sorted and only unused identical (with the same model and parameters) slots are merged.
  5909. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".
  5910. </remark>
  5911. </remarks>
  5912. <examples>
  5913. <example>
  5914. <code><![CDATA[sortmapmodelslots]]></code>
  5915. <explanation>
  5916. - sorts the mapmodel slot list alphabetically and merge unused identical slots. Merging an unused slot is
  5917. pretty much the same as deleting it, so this command sorts the list and removes unneeded double entries
  5918. </explanation>
  5919. </example>
  5920. <example>
  5921. <code><![CDATA[sortmapmodelslots nosort]]></code>
  5922. <explanation>- merges (deletes) unused double entries in the mapmodel slot list</explanation>
  5923. </example>
  5924. <example>
  5925. <code><![CDATA[sortmapmodelslots nosort mergeused]]></code>
  5926. <explanation>
  5927. - merges double entries in the mapmodel slot list. If two identical entries are used in the map,
  5928. all uses are mapped to the new combined slot. This leaves no visual changes on the map.
  5929. Should be avoided, if mapmodel slots have been renamed manually - and the renaming isn't finished yet
  5930. </explanation>
  5931. </example>
  5932. <example>
  5933. <code><![CDATA[sortmapmodelslots mergeused]]></code>
  5934. <explanation>- sorts the mapmodel slot list and merges all double entries</explanation>
  5935. </example>
  5936. </examples>
  5937. <arguments>
  5938. <argument token="nosort" description="do not sort the list alphabetically" optional="true"/>
  5939. <argument token="nomerge" description="do not merge any slots" optional="true"/>
  5940. <argument token="mergeused" description="merge used and unused (identical) slots freely" optional="true"/>
  5941. </arguments>
  5942. <references>
  5943. <identifierReference identifier="mapmodel"/>
  5944. <identifierReference identifier="sorttextureslots"/>
  5945. <identifierReference identifier="sortmapsoundslots"/>
  5946. </references>
  5947. </command>
  5948. <variable name="mapmodelchanged">
  5949. <description>Set to "1" with every command that changes mapmodel slots.</description>
  5950. <value token="N" description="0: not changed, 1: changed" minValue="0" maxValue="1" defaultValue="0"/>
  5951. <remarks>
  5952. <remark>Should be used to trigger a rebuild of mapmodel menus.</remark>
  5953. </remarks>
  5954. <references>
  5955. <identifierReference identifier="mapmodel"/>
  5956. <identifierReference identifier="editmapmodelslot"/>
  5957. <identifierReference identifier="deletemapmodelslot"/>
  5958. </references>
  5959. </variable>
  5960. <command name="mapmodelregister">
  5961. <description>Adds values for all attributes to a specific mapmodel.</description>
  5962. <remarks>
  5963. <remark>
  5964. This is used to restore the cached values from config/mapmodelattributes.cfg during game start.
  5965. It does not actually verify of load the model.
  5966. </remark>
  5967. </remarks>
  5968. <arguments>
  5969. <argument token="P" description="model path" valueNotes=""/>
  5970. <argument token="V" description="list of all attribute values" valueNotes=""/>
  5971. </arguments>
  5972. <references>
  5973. <identifierReference identifier="mapmodel"/>
  5974. <identifierReference identifier="getmapmodelattributes"/>
  5975. <identifierReference identifier="listallmapmodelattributes"/>
  5976. <identifierReference identifier="mdlattribute"/>
  5977. <identifierReference identifier="mapmodelregisterclear"/>
  5978. </references>
  5979. </command>
  5980. <command name="mapmodelregistryclear">
  5981. <description>Deletes all loaded mapmodel attributes.</description>
  5982. <references>
  5983. <identifierReference identifier="mapmodel"/>
  5984. <identifierReference identifier="mapmodelregister"/>
  5985. <identifierReference identifier="getmapmodelattributes"/>
  5986. <identifierReference identifier="listallmapmodelattributes"/>
  5987. <identifierReference identifier="mdlattribute"/>
  5988. <identifierReference identifier="loadallmapmodels"/>
  5989. </references>
  5990. </command>
  5991. <command name="getmapmodelattributes">
  5992. <description>Returns values for all attributes to a specific mapmodel.</description>
  5993. <remarks>
  5994. <remark>
  5995. If modelpath is a number, it is interpreted as index for the list of models in the current map config.
  5996. If no attribute name is specified, all attributes are printed to the console instead.
  5997. </remark>
  5998. </remarks>
  5999. <arguments>
  6000. <argument token="P" description="model path" valueNotes=""/>
  6001. <argument token="N" description="attribute name" optional="true" valueNotes="keywords, desc, defaults, usage, author, license, distribution, version"/>
  6002. </arguments>
  6003. <references>
  6004. <identifierReference identifier="mapmodel"/>
  6005. <identifierReference identifier="listallmapmodelattributes"/>
  6006. <identifierReference identifier="mapmodelregister"/>
  6007. <identifierReference identifier="mdlattribute"/>
  6008. </references>
  6009. </command>
  6010. <command name="listallmapmodelattributes">
  6011. <description>Returns a table of all known mapmodels.</description>
  6012. <remarks>
  6013. <remark>
  6014. Each model is listed with the modelpath and the values for the requested attributes.
  6015. To be used instead of a fixed table in menu_edit.cfg.
  6016. </remark>
  6017. <remark>
  6018. In addition to attribute names, the function also allows the keywords "explodekeywords" and "sortby:" as arguments.
  6019. If "explodekeywords" is given, all mapmodels with more than one keyword are listed multiple times, once for each keyword.
  6020. If an attribute name is preceeded by "sortby:" the list will be sorted by this table column.
  6021. If "sortby:" is used several times, this first sort will have highest priority.
  6022. The list is always sorted by path by default.
  6023. </remark>
  6024. </remarks>
  6025. <arguments>
  6026. <argument token="N" description="list of attribute names" valueNotes="explodekeywords, sortby: keywords, desc, defaults, usage, author, license, distribution, version"/>
  6027. </arguments>
  6028. <examples>
  6029. <example>
  6030. <code><![CDATA[listallmapmodelattributes sortby: author sortby: desc explodekeywords]]></code>
  6031. </example>
  6032. </examples>
  6033. <references>
  6034. <identifierReference identifier="mapmodel"/>
  6035. <identifierReference identifier="getmapmodelattributes"/>
  6036. <identifierReference identifier="mapmodelregister"/>
  6037. <identifierReference identifier="mdlattribute"/>
  6038. </references>
  6039. </command>
  6040. <command name="loadallmapmodels">
  6041. <description>Tries to load mapmodels from all paths below packages/models/mapmodels.</description>
  6042. <remarks>
  6043. <remark>
  6044. It will throw a lot of error messages, because not all directories contain models to load.
  6045. This command can be used to build or rebuild the complete list of all available mapmodels.
  6046. It is only necessary, if models are added manually to the directories, since every mapmodel gets added to the list
  6047. when it is loaded - which takes care of all automatically downloaded models.
  6048. </remark>
  6049. </remarks>
  6050. <references>
  6051. <identifierReference identifier="mapmodel"/>
  6052. <identifierReference identifier="mapmodelregistryclear"/>
  6053. </references>
  6054. </command>
  6055. <scriptalias name="mapmodelzoff">
  6056. <description>Allows negative z-offsets for mapmodels.</description>
  6057. <remarks>
  6058. <remark>
  6059. A mapmodel entity is placed at a z-coordinate that is based on the floor height of map geometry
  6060. and a z-offset. The z-offset is a sum of the entity attribute 3 and the third mapmodel slot parameter.
  6061. The entity z-offset can range from 0 to 255 while the mapmodel slot parameter can be any integer including negative numbers.
  6062. So, to place a mapmodel below floor height, the mapmodel slot parameter has to be negative.
  6063. </remark>
  6064. <remark>
  6065. "mapmodelzoff" script decreases the mapmodel slot parameter by one and increases the z-offset of every mapmodel
  6066. which uses that slot also by one. This means, that all mapmodel are exact in the same place afterwards
  6067. - but the entity z-offset now has room to lower the mapmodel by one more cube.
  6068. </remark>
  6069. <remark>If you need more z-offset available, run the script several times.</remark>
  6070. </remarks>
  6071. <arguments>
  6072. <argument token="N" description="mapmodel slot number"/>
  6073. </arguments>
  6074. </scriptalias>
  6075. <command name="gettexturelist">
  6076. <description>Returns a table of all texture files fitting a certain description.</description>
  6077. <remarks>
  6078. <remark>All files found under packages/textures are examined.</remark>
  6079. <remark>
  6080. By default, the command returns a list with two columns: path and filename.
  6081. If "excludes" is exactly one path prefix to exclude, the table gets a third column with path names without that prefix.
  6082. If "extensions" is exactly one extension which does not start with the character '.',
  6083. the table gets an additional (third or fourth) column containing file names without that extension.
  6084. </remark>
  6085. </remarks>
  6086. <arguments>
  6087. <argument token="includes" description="Optional list of path prefixes to include in the table."/>
  6088. <argument token="excludes" description="Optional list of path prefixes to exclude from the table."/>
  6089. <argument token="extensions" description="Optional list of filename extensions to include in the table."/>
  6090. </arguments>
  6091. <examples>
  6092. <example>
  6093. <code><![CDATA[echo (gettexturelist)]]></code>
  6094. <explanation>Outputs two columns like "noctua/wall" "wall02.jpg"</explanation>
  6095. </example>
  6096. <example>
  6097. <code><![CDATA[echo (gettexturelist "" "map_editor skymaps")]]></code>
  6098. <explanation>Outputs two columns like "noctua/wall" "wall02.jpg", but omits skymaps and special textures for the editor</explanation>
  6099. </example>
  6100. <example>
  6101. <code><![CDATA[echo (gettexturelist makke)]]></code>
  6102. <explanation>Outputs only textures by makke and adds a third column like "makke/rattrap" "rb_box_03.jpg" "/rattrap"</explanation>
  6103. </example>
  6104. <example>
  6105. <code><![CDATA[echo (gettexturelist "skymaps/" "" "_ft.jpg")]]></code>
  6106. <explanation>
  6107. Outputs four columns like "skymaps/egypt" "egypt_ft.jpg" "egypt" "egypt",
  6108. "skymaps/humus" "meadow_ft.jpg" "humus" "meadow"
  6109. </explanation>
  6110. </example>
  6111. </examples>
  6112. <references>
  6113. <identifierReference identifier="texture"/>
  6114. <identifierReference identifier="gettextureorigin"/>
  6115. </references>
  6116. </command>
  6117. <command name="gettextureorigin">
  6118. <description>Returns the location where the texture file actually can be found.</description>
  6119. <remarks>
  6120. <remark>The possibilities are:</remark>
  6121. <remark>"official": texture file was found in the working directory, which indicates an official texture.</remark>
  6122. <remark>"custom": texture file was found in the profile directory, which means, the texture is either manually installed or downloaded.</remark>
  6123. <remark>"package dir #x": texture file was found in a mod directory.</remark>
  6124. <remark>"&lt;file not found&gt;"</remark>
  6125. </remarks>
  6126. <arguments>
  6127. <argument token="N" description="filename or partial path with filename"/>
  6128. </arguments>
  6129. <references>
  6130. <identifierReference identifier="texture"/>
  6131. <identifierReference identifier="gettexturelist"/>
  6132. </references>
  6133. </command>
  6134. <command name="textureslotbyname">
  6135. <description>Returns the list of numbers of all texture slots which use that texture file.</description>
  6136. <arguments>
  6137. <argument token="N" description="texture filename"/>
  6138. </arguments>
  6139. <references>
  6140. <identifierReference identifier="texture"/>
  6141. <identifierReference identifier="textureslotusage"/>
  6142. <identifierReference identifier="textureslotusagelist"/>
  6143. <identifierReference identifier="edittextureslot"/>
  6144. <identifierReference identifier="deletetextureslot"/>
  6145. <identifierReference identifier="edittexturestack"/>
  6146. </references>
  6147. </command>
  6148. <command name="textureslotusage">
  6149. <description>Returns a list of mapmodels who use that texture as skin.</description>
  6150. <remarks>
  6151. <remark>If no mapmodel uses the texture, but world geometry does, a string of whitespace is returned. If the mapmodel is unused, an empty string is returned.</remark>
  6152. </remarks>
  6153. <arguments>
  6154. <argument token="N" description="texture slot number" valueNotes="0..255"/>
  6155. </arguments>
  6156. <references>
  6157. <identifierReference identifier="texture"/>
  6158. <identifierReference identifier="textureslotusagelist"/>
  6159. <identifierReference identifier="textureslotbyname"/>
  6160. <identifierReference identifier="edittextureslot"/>
  6161. <identifierReference identifier="deletetextureslot"/>
  6162. <identifierReference identifier="edittexturestack"/>
  6163. </references>
  6164. </command>
  6165. <command name="textureslotusagelist">
  6166. <description>Returns a list of 256 numbers representing the number of uses for every texture slot.</description>
  6167. <remarks>
  6168. <remark>If "what" is "onlygeometry", the uses as map model skin do not count.</remark>
  6169. <remark>If "what" is "onlymodels", the uses in map geometry do not count.</remark>
  6170. <remark>It returns two values per slot: usage and visibility.</remark>
  6171. <remark>
  6172. If "what" is "onlymostvisible", instead of the regular list, a list of only the most used wall, floor,
  6173. ceiling and upper wall textures (alternating with the keywords) is returned.
  6174. </remark>
  6175. </remarks>
  6176. <examples>
  6177. <example>
  6178. <code><![CDATA[echo (textureslotusagelist onlymostvisible)]]></code>
  6179. <explanation>Output: wall 211 floor 45 ceiling 0 "upper wall" 79</explanation>
  6180. </example>
  6181. </examples>
  6182. <arguments>
  6183. <argument token="W" description="what" valueNotes="onlygeometry, onlymodels, onlymostvisible"/>
  6184. </arguments>
  6185. <references>
  6186. <identifierReference identifier="texture"/>
  6187. <identifierReference identifier="textureslotusage"/>
  6188. <identifierReference identifier="textureslotbyname"/>
  6189. <identifierReference identifier="edittextureslot"/>
  6190. <identifierReference identifier="deletetextureslot"/>
  6191. <identifierReference identifier="edittexturestack"/>
  6192. </references>
  6193. </command>
  6194. <command name="deletetextureslot">
  6195. <description>Deletes an unused texture slot.</description>
  6196. <remarks>
  6197. <remark>
  6198. If "purge" word is put as second argument, it also deletes an used slot.
  6199. All mapmodels that use that texture as skin are changed to default skin.
  6200. All world geometry, which uses the texture, is instead set to use slot #255 or a specified replacement slot.
  6201. Slots below #5 always require "purge", no matter if they are in use (default slots).
  6202. </remark>
  6203. <remark>Also enables automapconfig.</remark>
  6204. </remarks>
  6205. <arguments>
  6206. <argument token="N" description="texture slot number" valueNotes="0..255"/>
  6207. <argument token="P" description="delete used slot?" valueNotes="purge"/>
  6208. <argument token="R" description="replacement slot" valueNotes="0..255"/>
  6209. </arguments>
  6210. <references>
  6211. <identifierReference identifier="texture"/>
  6212. <identifierReference identifier="textureslotusage"/>
  6213. <identifierReference identifier="textureslotusagelist"/>
  6214. <identifierReference identifier="textureslotbyname"/>
  6215. <identifierReference identifier="edittextureslot"/>
  6216. <identifierReference identifier="edittexturestack"/>
  6217. </references>
  6218. </command>
  6219. <command name="edittextureslot">
  6220. <description>Edits the parameters of a texture slot.</description>
  6221. <remarks>
  6222. <remark>
  6223. Only non-empty parameters actually change something. The command returns the resulting data of the texture slot.
  6224. If only the texture slot number is specified, no changes are made, but the current data is returned
  6225. (also in non-edit mode). Therefore the command can be used to get and set parameters.
  6226. </remark>
  6227. <remark>If anything is changed, automapconfig is enabled.</remark>
  6228. </remarks>
  6229. <arguments>
  6230. <argument token="N" description="texture slot number" valueNotes="0..255"/>
  6231. <argument token="S" description="scale" valueNotes=""/>
  6232. <argument token="P" description="path" valueNotes=""/>
  6233. </arguments>
  6234. <examples>
  6235. <example>
  6236. <code><![CDATA[edittextureslot 33 "" "arcitool/rohbaubims.jpg"]]></code>
  6237. <explanation>Sets texture name of slot #33</explanation>
  6238. </example>
  6239. <example>
  6240. <code><![CDATA[echo (edittextureslot 33)]]></code>
  6241. <explanation>Prints the current parameters of texture slot #33, for example: 0 "zastrow/3wood_crate_10.jpg"</explanation>
  6242. </example>
  6243. </examples>
  6244. <references>
  6245. <identifierReference identifier="texture"/>
  6246. <identifierReference identifier="textureslotusage"/>
  6247. <identifierReference identifier="textureslotusagelist"/>
  6248. <identifierReference identifier="textureslotbyname"/>
  6249. <identifierReference identifier="deletetextureslot"/>
  6250. <identifierReference identifier="edittexturestack"/>
  6251. </references>
  6252. </command>
  6253. <command name="edittexturestack">
  6254. <description>Puts a texture slot in a "last used" list up front.</description>
  6255. <remarks>
  6256. <remark>The first parameter picks the list, the second parameter is the texture slot number to be used for the next edit.</remark>
  6257. </remarks>
  6258. <arguments>
  6259. <argument token="S" description="surface" valueNotes="floor, wall or ceiling"/>
  6260. <argument token="N" description="texture slot number" valueNotes="0..255"/>
  6261. </arguments>
  6262. <references>
  6263. <identifierReference identifier="texture"/>
  6264. <identifierReference identifier="textureslotusage"/>
  6265. <identifierReference identifier="textureslotusagelist"/>
  6266. <identifierReference identifier="textureslotbyname"/>
  6267. <identifierReference identifier="deletetextureslot"/>
  6268. <identifierReference identifier="edittextureslot"/>
  6269. </references>
  6270. </command>
  6271. <command name="sorttextureslots">
  6272. <description>Sorts all texture slots alphabetically and merges identical slots.</description>
  6273. <remarks>
  6274. <remark>
  6275. By default, the list is sorted (except the first five) and only unused identical
  6276. (with the same texture and scale factor) slots are merged.
  6277. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".
  6278. </remark>
  6279. <remark>
  6280. It allows to manually sort also the first few slots by adding the slot number to move to the slots #1, #2, #3, #4
  6281. (for example "sorttextureslots 11 12 13 14" will move slot #11 to slot #1, #12 to #2, #13 to #3 and #14 to #4,
  6282. and sort the rest texture slots).
  6283. </remark>
  6284. <remark>See examples in the "sortmapmodelslots" reference.</remark>
  6285. </remarks>
  6286. <arguments>
  6287. <argument token="nosort" description="do not sort the list alphabetically" optional="true"/>
  6288. <argument token="nomerge" description="do not merge any slots" optional="true"/>
  6289. <argument token="mergeused" description="merge used and unused (identical) slots freely" optional="true"/>
  6290. </arguments>
  6291. <references>
  6292. <identifierReference identifier="texture"/>
  6293. <identifierReference identifier="sortmapmodelslots"/>
  6294. <identifierReference identifier="sortmapsoundslots"/>
  6295. </references>
  6296. </command>
  6297. <command name="getmapsoundlist">
  6298. <description>Returns a list of all *.wav and *.ogg files below packages/audio/ambience.</description>
  6299. <references>
  6300. <identifierReference identifier="mapsound"/>
  6301. <identifierReference identifier="getmapsoundorigin"/>
  6302. </references>
  6303. </command>
  6304. <command name="getmapsoundorigin">
  6305. <description>Returns the location where the map sound file actually can be found.</description>
  6306. <remarks>
  6307. <remark>The possibilities are:</remark>
  6308. <remark>"official": mapsound file was found in the working directory, which indicates an official mapsound.</remark>
  6309. <remark>"custom": mapsound file was found in the profile directory, which means, the mapsound is either manually installed or downloaded.</remark>
  6310. <remark>"package dir #x": mapsound file was found in a mod directory.</remark>
  6311. <remark>"&lt;file not found&gt;"</remark>
  6312. </remarks>
  6313. <arguments>
  6314. <argument token="N" description="filename or partial path with filename"/>
  6315. </arguments>
  6316. <references>
  6317. <identifierReference identifier="mapsound"/>
  6318. <identifierReference identifier="getmapsoundlist"/>
  6319. </references>
  6320. </command>
  6321. <command name="mapsoundslotbyname">
  6322. <description>Returns the list of numbers of all mapsound slots which use that sound file.</description>
  6323. <arguments>
  6324. <argument token="N" description="map sound filename"/>
  6325. </arguments>
  6326. <references>
  6327. <identifierReference identifier="mapsound"/>
  6328. <identifierReference identifier="mapsoundslotusage"/>
  6329. <identifierReference identifier="editmapsoundslot"/>
  6330. <identifierReference identifier="deletemapsoundslot"/>
  6331. </references>
  6332. </command>
  6333. <command name="mapsoundslotusage">
  6334. <description>Returns a list of map entity indices which use a certain map sound slot.</description>
  6335. <remarks>
  6336. <remark>If the sound is unused, it returns an empty string.</remark>
  6337. </remarks>
  6338. <arguments>
  6339. <argument token="N" description="map sound slot number"/>
  6340. </arguments>
  6341. <references>
  6342. <identifierReference identifier="mapsound"/>
  6343. <identifierReference identifier="mapsoundslotbyname"/>
  6344. <identifierReference identifier="editmapsoundslot"/>
  6345. <identifierReference identifier="deletemapsoundslot"/>
  6346. </references>
  6347. </command>
  6348. <command name="editmapsoundslot">
  6349. <description>Edits path/name and maxuses parameters of a mapsound slot.</description>
  6350. <remarks>
  6351. <remark>
  6352. Only non-empty parameters actually change something. The command returns the resulting data of the map sound slot.
  6353. If only the map sound slot number is specified, no changes are made, but the current data is returned
  6354. (also in non-edit mode). Therefore the command can be used to get and set parameters.
  6355. </remark>
  6356. <remark>If anything is changed, automapconfig is enabled.</remark>
  6357. </remarks>
  6358. <arguments>
  6359. <argument token="N" description="map sound slot number"/>
  6360. <argument token="P" description="map sound path"/>
  6361. <argument token="M" description="maxuses"/>
  6362. </arguments>
  6363. <references>
  6364. <identifierReference identifier="mapsound"/>
  6365. <identifierReference identifier="mapsoundslotbyname"/>
  6366. <identifierReference identifier="mapsoundslotusage"/>
  6367. <identifierReference identifier="deletemapsoundslot"/>
  6368. <identifierReference identifier="mapsoundchanged"/>
  6369. </references>
  6370. </command>
  6371. <command name="deletemapsoundslot">
  6372. <description>Deletes an unused map sound slot.</description>
  6373. <remarks>
  6374. <remark>
  6375. If "purge" is specified as second argument, it also deletes an used slot
  6376. (including all map entities which use that sound).
  6377. </remark>
  6378. <remark>Also it enables automapconfig.</remark>
  6379. </remarks>
  6380. <arguments>
  6381. <argument token="N" description="map sound slot number"/>
  6382. <argument token="P" description="purge"/>
  6383. </arguments>
  6384. <references>
  6385. <identifierReference identifier="mapsound"/>
  6386. <identifierReference identifier="mapsoundslotbyname"/>
  6387. <identifierReference identifier="mapsoundslotusage"/>
  6388. <identifierReference identifier="editmapsoundslot"/>
  6389. <identifierReference identifier="mapsoundchanged"/>
  6390. </references>
  6391. </command>
  6392. <command name="sortmapsoundslots">
  6393. <description>Sorts all mapsound slots alphabetically and merges identical slots.</description>
  6394. <remarks>
  6395. <remark>
  6396. By default, the list is sorted and only unused identical slots are merged.
  6397. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".
  6398. </remark>
  6399. <remark>See examples in the "sortmapmodelslots" reference.</remark>
  6400. </remarks>
  6401. <arguments>
  6402. <argument token="nosort" description="do not sort the list alphabetically" optional="true"/>
  6403. <argument token="nomerge" description="do not merge any slots" optional="true"/>
  6404. <argument token="mergeused" description="merge used and unused (identical) slots freely" optional="true"/>
  6405. </arguments>
  6406. <references>
  6407. <identifierReference identifier="mapsound"/>
  6408. <identifierReference identifier="sortmapmodelslots"/>
  6409. <identifierReference identifier="sorttextureslots"/>
  6410. </references>
  6411. </command>
  6412. <variable name="mapsoundchanged">
  6413. <description>Set to "1" with every command that changes mapsound slots.</description>
  6414. <value token="N" description="0: not changed, 1: changed" minValue="0" maxValue="1" defaultValue="0"/>
  6415. <remarks>
  6416. <remark>Should be used to trigger a rebuild of mapsound menus.</remark>
  6417. </remarks>
  6418. <references>
  6419. <identifierReference identifier="mapsound"/>
  6420. <identifierReference identifier="editmapsoundslot"/>
  6421. <identifierReference identifier="deletemapsoundslot"/>
  6422. </references>
  6423. </variable>
  6424. <command name="automapconfig">
  6425. <description>Enables the "automatic embedded map config data" feature.</description>
  6426. <remarks>
  6427. <remark>With the next map save the map config file will get renamed and the map config data stored inside the map file.</remark>
  6428. </remarks>
  6429. <references>
  6430. <identifierReference identifier="getautomapconfig"/>
  6431. <identifierReference identifier="embedconfigfile"/>
  6432. <identifierReference identifier="extractconfigfile"/>
  6433. <identifierReference identifier="listheaderextras"/>
  6434. </references>
  6435. </command>
  6436. <command name="getautomapconfig">
  6437. <description>Returns "1" if automapconfig is already enabled, "0" otherwise.</description>
  6438. <references>
  6439. <identifierReference identifier="automapconfig"/>
  6440. </references>
  6441. </command>
  6442. <command name="embedconfigfile">
  6443. <description>Loads the map config file, includes it in the map header and renames the original config file.</description>
  6444. <remarks>
  6445. <remark>Embedded config files take precedence over regular config files.</remark>
  6446. </remarks>
  6447. <references>
  6448. <identifierReference identifier="automapconfig"/>
  6449. <identifierReference identifier="extractconfigfile"/>
  6450. <identifierReference identifier="listheaderextras"/>
  6451. </references>
  6452. </command>
  6453. <command name="extractconfigfile">
  6454. <description>Writes an embedded config file to a separate file and removes it from the map header.</description>
  6455. <references>
  6456. <identifierReference identifier="automapconfig"/>
  6457. <identifierReference identifier="embedconfigfile"/>
  6458. </references>
  6459. </command>
  6460. <command name="listheaderextras">
  6461. <description>Returns a list with additional data ("header extras") from current map header.</description>
  6462. <remarks>
  6463. <remark>
  6464. The header extras can be permanent, like the embedded config file, or can be used only once after map load,
  6465. like the undo/redo data. Additional extra data can be easily added and will not break backward compatibility.
  6466. </remark>
  6467. </remarks>
  6468. <references>
  6469. <identifierReference identifier="automapconfig"/>
  6470. <identifierReference identifier="embedconfigfile"/>
  6471. </references>
  6472. </command>
  6473. <command name="addentity">
  6474. <description>Adds an entity of the specified type at the current camera position.</description>
  6475. <remarks>
  6476. <remark>It also returns the index number of the new entity, so that the other attributes can be set by editentity.</remark>
  6477. </remarks>
  6478. <arguments>
  6479. <argument token="E" description="the entity type or number" valueNotes="light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)"/>
  6480. </arguments>
  6481. <references>
  6482. <identifierReference identifier="enumentities"/>
  6483. <identifierReference identifier="editentity"/>
  6484. <identifierReference identifier="deleteentity"/>
  6485. </references>
  6486. </command>
  6487. <command name="editentity">
  6488. <description>Edits a map entity.</description>
  6489. <remarks>
  6490. <remark>
  6491. It edits only parameters given a non-empty value. Returns the type and the values of all attributes (x, y, z, attr1 - attr7).
  6492. It uses float values for some attributes, return values also may be float.
  6493. </remark>
  6494. </remarks>
  6495. <arguments>
  6496. <argument token="N" description="entity index/number" valueNotes=""/>
  6497. <argument token="A" description="list of attributes" valueNotes="" optional="true"/>
  6498. </arguments>
  6499. <examples>
  6500. <example>
  6501. <code><![CDATA[echo (editentity 33)]]></code>
  6502. <explanation>Prints all attributes of map entity number 33, for example "light 174 172 12 20 255 200 200 0 0 0"</explanation>
  6503. </example>
  6504. <example>
  6505. <code><![CDATA[editentity 33 "" 173]]></code>
  6506. <explanation>Changes the y-position of entity 33 to 173</explanation>
  6507. </example>
  6508. </examples>
  6509. <references>
  6510. <identifierReference identifier="entset"/>
  6511. <identifierReference identifier="enumentities"/>
  6512. <identifierReference identifier="addentity"/>
  6513. <identifierReference identifier="deleteentity"/>
  6514. </references>
  6515. </command>
  6516. <command name="deleteentity">
  6517. <description>Deletes a map entity.</description>
  6518. <remarks>
  6519. <remark>Note: deleting an entity only marks it as unused. It will be completely removed after saving and loading the map.</remark>
  6520. </remarks>
  6521. <arguments>
  6522. <argument token="N" description="entity index/number" valueNotes=""/>
  6523. </arguments>
  6524. <references>
  6525. <identifierReference identifier="delent"/>
  6526. <identifierReference identifier="clearents"/>
  6527. <identifierReference identifier="enumentities"/>
  6528. <identifierReference identifier="addentity"/>
  6529. <identifierReference identifier="editentity"/>
  6530. <identifierReference identifier="undelent"/>
  6531. <identifierReference identifier="getdeletedentities"/>
  6532. <identifierReference identifier="unlistdeletedentity"/>
  6533. </references>
  6534. </command>
  6535. <command name="enumentities">
  6536. <description>Returns a list of the numbers of all entities of that type.</description>
  6537. <remarks>
  6538. <remark>If no such entities exist or the entity type could not be recognised, the list is empty.</remark>
  6539. </remarks>
  6540. <arguments>
  6541. <argument token="type" description="the entity type" valueNotes="light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet"/>
  6542. </arguments>
  6543. <references>
  6544. <identifierReference identifier="gotoentity"/>
  6545. <identifierReference identifier="addentity"/>
  6546. <identifierReference identifier="editentity"/>
  6547. <identifierReference identifier="deleteentity"/>
  6548. </references>
  6549. </command>
  6550. <command name="gotoentity">
  6551. <description>Jump to the location of a map entity.</description>
  6552. <remarks>
  6553. <remark>You can get the entity number with use "enumentities" command.</remark>
  6554. </remarks>
  6555. <arguments>
  6556. <argument token="N" description="the entity number" valueNotes=""/>
  6557. </arguments>
  6558. <references>
  6559. <identifierReference identifier="enumentities"/>
  6560. </references>
  6561. </command>
  6562. <command name="getclosestent">
  6563. <description>Returns the entity index number of the closest entity (or of the pinned entity, if one exists).</description>
  6564. <remarks>
  6565. <remark>Returns -1, if no entities are on the map.</remark>
  6566. <remark>Returns always exactly the entity, that edit commands like delent will use next.</remark>
  6567. </remarks>
  6568. <references>
  6569. <identifierReference identifier="toggleclosestentpin"/>
  6570. <identifierReference identifier="entproperty"/>
  6571. <identifierReference identifier="getentattr"/>
  6572. <identifierReference identifier="getenttype"/>
  6573. </references>
  6574. </command>
  6575. <command name="toggleclosestentpin">
  6576. <description>Toggles the pin on the "closest entity" selector.</description>
  6577. <remarks>
  6578. <remark>
  6579. The HUD will indicate the lock by showing "pinned" instead of "closest" entity.
  6580. All actions, that would otherwise affect the closest entity, will affect the pinned entity instead.
  6581. Deleting the locked entity will unlock it.
  6582. </remark>
  6583. </remarks>
  6584. <defaultKeys>
  6585. <key alias="MOUSE3" name="middle mouse button"/>
  6586. </defaultKeys>
  6587. <references>
  6588. <identifierReference identifier="getclosestent"/>
  6589. </references>
  6590. </command>
  6591. <variable name="pointatent">
  6592. <description>Enables or disables pointing at entity sparklies.</description>
  6593. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="0: nearest, 1: pointed at" defaultValue="0"/>
  6594. <remarks>
  6595. <remark>If an entity is pointed at during disabling, it is pinned.</remark>
  6596. </remarks>
  6597. <references>
  6598. <identifierReference identifier="pointatentmaxangle"/>
  6599. <identifierReference identifier="toggleclosestentpin"/>
  6600. </references>
  6601. </variable>
  6602. <variable name="pointatentmaxangle">
  6603. <description>Specifies the required precision for pointing at entities sparklies.</description>
  6604. <value token="N" description="float" minValue="0.01" maxValue="180.0" defaultValue="2.0"/>
  6605. <references>
  6606. <identifierReference identifier="pointatent"/>
  6607. </references>
  6608. </variable>
  6609. <variable name="edithideentmask">
  6610. <description>Integer variable containing a bitmask of hidden entity types.</description>
  6611. </variable>
  6612. <variable name="entarrowstyle">
  6613. <description>Which way the arrow is drawn for playerstarts and vantage points.</description>
  6614. <value token="S" description="style" minValue="0" maxValue="1" defaultValue="1" valueNotes="0: cone, 1: multihead"/>
  6615. <remarks>
  6616. <remark>The cone style draws 4 triangles approximating the cone of the arrowhead.</remark>
  6617. <remark>The multihead style draws 4 triangles rotated around the shaft, two of which are coloured slightly differently.</remark>
  6618. </remarks>
  6619. </variable>
  6620. <command name="getdeletedentities">
  6621. <description>Returns a list of deleted entities.</description>
  6622. <remarks>
  6623. <remark>Each line contains the entity type, the position and all seven attributes.</remark>
  6624. </remarks>
  6625. <references>
  6626. <identifierReference identifier="undelent"/>
  6627. <identifierReference identifier="unlistdeletedentity"/>
  6628. <identifierReference identifier="deleteentity"/>
  6629. </references>
  6630. </command>
  6631. <command name="undelent">
  6632. <description>Restores deleted entity.</description>
  6633. <remarks>
  6634. <remark>
  6635. If no index is specified, the last deleted entity is restored.
  6636. If an index is given, the specified entity from the list of deleted entities is restored.
  6637. </remark>
  6638. <remark>BACKSPACE in combination with editmeta undeletes the last deleted entity.</remark>
  6639. <remark>BACKSPACE in combination with editmeta2 brings up the menu "deleted entities".</remark>
  6640. </remarks>
  6641. <arguments>
  6642. <argument token="I" description="index"/>
  6643. </arguments>
  6644. <references>
  6645. <identifierReference identifier="getdeletedentities"/>
  6646. <identifierReference identifier="unlistdeletedentity"/>
  6647. <identifierReference identifier="deleteentity"/>
  6648. <identifierReference identifier="editmeta"/>
  6649. <identifierReference identifier="editmeta2"/>
  6650. </references>
  6651. </command>
  6652. <command name="unlistdeletedentity">
  6653. <description>Removes entities from the list of deleted entities.</description>
  6654. <remarks>
  6655. <remark>If &lt;which&gt; is a number, the specified entry from the list of deleted entities gets removed.</remark>
  6656. <remark>If &lt;which&gt; is "all", the whole list of deleted entities gets deleted.</remark>
  6657. <remark>If &lt;which&gt; is "last" the last deleted entity is removed from the list of deleted entities.</remark>
  6658. <remark>Returns the number of entities on the list of deleted entities (even if the parameter &lt;which&gt; was unknown or not specified).</remark>
  6659. </remarks>
  6660. <arguments>
  6661. <argument token="W" description="which" valueNotes="[a number], all or last"/>
  6662. </arguments>
  6663. <references>
  6664. <identifierReference identifier="getdeletedentities"/>
  6665. <identifierReference identifier="undelent"/>
  6666. <identifierReference identifier="deleteentity"/>
  6667. </references>
  6668. </command>
  6669. <command name="xmap_list">
  6670. <description>Lists all xmaps currently in memory.</description>
  6671. <references>
  6672. <identifierReference identifier="xmap_store"/>
  6673. <identifierReference identifier="xmap_restore"/>
  6674. <identifierReference identifier="xmap_delete"/>
  6675. <identifierReference identifier="xmap_delete_backup"/>
  6676. <identifierReference identifier="xmap_keep_backup"/>
  6677. <identifierReference identifier="xmap_rename"/>
  6678. <identifierReference identifier="getxmaplist"/>
  6679. <identifierReference identifier="enumtodoentities"/>
  6680. </references>
  6681. </command>
  6682. <command name="xmap_store">
  6683. <description>Creates a snapshot and stores it under the given nickname.</description>
  6684. <remarks>
  6685. <remark>Nicknames have to qualify as valid filenames.</remark>
  6686. </remarks>
  6687. <arguments>
  6688. <argument token="N" description="nickname"/>
  6689. </arguments>
  6690. <references>
  6691. <identifierReference identifier="xmap_list"/>
  6692. <identifierReference identifier="xmap_restore"/>
  6693. </references>
  6694. </command>
  6695. <command name="xmap_restore">
  6696. <description>Restores the xmap snapshot.</description>
  6697. <remarks>
  6698. <remark>1. If nickname is not given, it restores the last automatic backup snapshot. Automatic snapshots are taken:</remark>
  6699. <remark>a) before a snapshot is restored,</remark>
  6700. <remark>b) before a new map is loaded (if there were unsaved edits on the map) and</remark>
  6701. <remark>c) when the game ends (if there were unsaved edits).</remark>
  6702. <remark>2. If nickname is given, the command restores the named snapshot, it also creates a backup snapshot of the current editing data.</remark>
  6703. </remarks>
  6704. <arguments>
  6705. <argument token="N" description="nickname"/>
  6706. </arguments>
  6707. <references>
  6708. <identifierReference identifier="xmap_list"/>
  6709. <identifierReference identifier="xmap_store"/>
  6710. </references>
  6711. </command>
  6712. <command name="xmap_delete">
  6713. <description>Deletes the named snapshot.</description>
  6714. <arguments>
  6715. <argument token="N" description="nickname"/>
  6716. </arguments>
  6717. <references>
  6718. <identifierReference identifier="xmap_list"/>
  6719. </references>
  6720. </command>
  6721. <command name="xmap_delete_backup">
  6722. <description>Deletes the backup xmap.</description>
  6723. <references>
  6724. <identifierReference identifier="xmap_list"/>
  6725. </references>
  6726. </command>
  6727. <command name="xmap_keep_backup">
  6728. <description>Moves the backup xmap to a regular named spot.</description>
  6729. <arguments>
  6730. <argument token="N" description="nickname"/>
  6731. </arguments>
  6732. <references>
  6733. <identifierReference identifier="xmap_list"/>
  6734. </references>
  6735. </command>
  6736. <command name="xmap_rename">
  6737. <description>Changes the nickname of the xmap.</description>
  6738. <arguments>
  6739. <argument token="O" description="old nickname"/>
  6740. <argument token="N" description="new nickname"/>
  6741. </arguments>
  6742. <references>
  6743. <identifierReference identifier="xmap_list"/>
  6744. </references>
  6745. </command>
  6746. <command name="getxmaplist">
  6747. <description>Returns a list of all regular xmaps in memory, or, if 'what' is "bak", the details of a stored backup xmap.</description>
  6748. <remarks>
  6749. <remark>Each xmap is listed with nickname and description.</remark>
  6750. </remarks>
  6751. <arguments>
  6752. <argument token="w" description="what" valueNotes="bak" optional="true"/>
  6753. </arguments>
  6754. <references>
  6755. <identifierReference identifier="xmap_list"/>
  6756. </references>
  6757. </command>
  6758. <command name="addtodoentity">
  6759. <description>Adds the entity #index to the TODO list.</description>
  6760. <remarks>
  6761. <remark>
  6762. Entity errors during map load are automatically added to the list.
  6763. The list is saved and restored with xmaps.
  6764. </remark>
  6765. </remarks>
  6766. <arguments>
  6767. <argument token="I" description="index"/>
  6768. <argument token="C" description="comment" optional="true"/>
  6769. </arguments>
  6770. <references>
  6771. <identifierReference identifier="cleartodoentities"/>
  6772. <identifierReference identifier="enumtodoentities"/>
  6773. </references>
  6774. </command>
  6775. <command name="cleartodoentities">
  6776. <description>Clears list of TODO entities.</description>
  6777. <remarks>
  6778. <remark>The list is also deleted, when a new map is loaded.</remark>
  6779. <remark>If an entity number is given as an argument, only entries for this entity are cleared.</remark>
  6780. </remarks>
  6781. <arguments>
  6782. <argument token="I" description="index" optional="true"/>
  6783. </arguments>
  6784. <references>
  6785. <identifierReference identifier="addtodoentity"/>
  6786. <identifierReference identifier="enumtodoentities"/>
  6787. </references>
  6788. </command>
  6789. <command name="enumtodoentities">
  6790. <description>Returns a list of TODO entities.</description>
  6791. <remarks>
  6792. <remark>Returns entity index number and comment for every entry.</remark>
  6793. </remarks>
  6794. <references>
  6795. <identifierReference identifier="addtodoentity"/>
  6796. <identifierReference identifier="cleartodoentities"/>
  6797. <identifierReference identifier="xmap_list"/>
  6798. </references>
  6799. </command>
  6800. <variable name="showplayerstarts">
  6801. <description>Show all playerstarts in edit mode.</description>
  6802. <remarks>
  6803. <remark>Set showplayerstarts to "1" to see a playermodel rendered at all playerstart entities.</remark>
  6804. </remarks>
  6805. <value token="N" description="0: hide, 1: show" minValue="0" maxValue="1" defaultValue="0"/>
  6806. </variable>
  6807. <command name="mapmrproper">
  6808. <description>Cleanups hidden map attributes.</description>
  6809. <remarks>
  6810. <remark>
  6811. "mapmrproper" tries to optimize hidden attributes of maps in a way, that the map can be handled in bigger chunks by the renderer.
  6812. </remark>
  6813. <remark>
  6814. The mipmapping routine does not take into account, if certain textures of a cube are visible at all, when it collects otherwise identical cubes to be handled en-bloc.
  6815. "mapmrproper" changes invisible textures in a way, that the cubes are in fact identical - so, that the mipmapper is satisfied.
  6816. The optimizer does not change any map properties that are visible in any way.</remark>
  6817. <remark>
  6818. Before any changes are made, mapmrproper creates a backup, which can be restored by "undo" command.
  6819. Enable mipstats ("showmip" command), to see, what has been done.
  6820. </remark>
  6821. </remarks>
  6822. <references>
  6823. <identifierReference identifier="showmip"/>
  6824. </references>
  6825. </command>
  6826. <command name="calcmipstats">
  6827. <description>Counts all the mips in the current map and prints their numbers as 1x1/2x2/4x4/8x8/16x16/32x32/64x64.</description>
  6828. <references>
  6829. <identifierReference identifier="showmip"/>
  6830. </references>
  6831. </command>
  6832. <command name="editmeta">
  6833. <description>First modifier key for editing mode.</description>
  6834. <remarks>
  6835. <remark>Go to references mentioned below to see the use.</remark>
  6836. </remarks>
  6837. <defaultKeys>
  6838. <key alias="LCTRL" name="left Ctrl"/>
  6839. </defaultKeys>
  6840. <references>
  6841. <identifierReference identifier="addselection"/>
  6842. <identifierReference identifier="entproperty"/>
  6843. <identifierReference identifier="undelent"/>
  6844. <identifierReference identifier="pasteent"/>
  6845. <identifierReference identifier="editmetakeydown"/>
  6846. <identifierReference identifier="editmeta2"/>
  6847. </references>
  6848. </command>
  6849. <command name="editmeta2">
  6850. <description>Second modifier key for editing mode.</description>
  6851. <remarks>
  6852. <remark>Go to references mentioned below to see the use.</remark>
  6853. </remarks>
  6854. <defaultKeys>
  6855. <key alias="LCTRL" name="left Shift"/>
  6856. </defaultKeys>
  6857. <references>
  6858. <identifierReference identifier="entproperty"/>
  6859. <identifierReference identifier="undelent"/>
  6860. <identifierReference identifier="editmeta2down"/>
  6861. <identifierReference identifier="editmeta"/>
  6862. </references>
  6863. </command>
  6864. <variable name="editmetakeydown">
  6865. <description>Indicates if editmeta key is pressed.</description>
  6866. <value description="state of the first editmeta key" minValue="0" maxValue="1" defaultValue="0" readOnly="true" valueNotes="0: unpressed, 1: pressed"/>
  6867. <references>
  6868. <identifierReference identifier="editmeta"/>
  6869. </references>
  6870. </variable>
  6871. <variable name="editmeta2down">
  6872. <description>Indicates if second editmeta key is pressed.</description>
  6873. <value description="state of the second editmeta key" minValue="0" maxValue="1" defaultValue="0" readOnly="true" valueNotes="0: unpressed, 1: pressed"/>
  6874. <references>
  6875. <identifierReference identifier="editmeta2"/>
  6876. </references>
  6877. </variable>
  6878. <variable name="rereadtexturelists">
  6879. <description>Variable, which is set to "1" when a texture is downloaded.</description>
  6880. <remarks>
  6881. <remark>Used to trigger menu rebuilds.</remark>
  6882. </remarks>
  6883. <value token="N" description="is texture downloaded?" minValue="0" maxValue="1" defaultValue="1" valueNotes="0: no, 1: yes"/>
  6884. <references>
  6885. <identifierReference identifier="rereadsoundlists"/>
  6886. </references>
  6887. </variable>
  6888. <variable name="rereadsoundlists">
  6889. <description>Variable, which is set to "1" when a sound is downloaded.</description>
  6890. <remarks>
  6891. <remark>Used to trigger menu rebuilds.</remark>
  6892. </remarks>
  6893. <value token="N" description="is sound downloaded?" minValue="0" maxValue="1" defaultValue="1" valueNotes="0: no, 1: yes"/>
  6894. <references>
  6895. <identifierReference identifier="rereadtexturelists"/>
  6896. </references>
  6897. </variable>
  6898. <command name="mapareacheck">
  6899. <description>Calculates some key values to determine map geometry viability.</description>
  6900. <remarks>
  6901. <remark>It returns different sets of statistics, depending on the keyword "what":</remark>
  6902. <remark>
  6903. "vdelta" - returns table of numbers of cubes within a certain range of vdelta
  6904. differences (steepness). First entry is "0..2 cubes steep", next is "2..4" and so on.
  6905. </remark>
  6906. <remark>"steepest" - returns the coordinates of the steepest heightfield cube.</remark>
  6907. <remark>"total" - returns the number of non-solid cubes on the map.</remark>
  6908. <remark>"pprest" - returns the number of cubes _not_ visible from one of the probe positions.</remark>
  6909. <remark>
  6910. "pp" (default) - returns a table of all (currently 64) probe points of the map. Each probe point is listed with:
  6911. x-coordinate, y-coordinate, floor height, area visible, volume of visible area, average height in visible area.
  6912. </remark>
  6913. </remarks>
  6914. <arguments>
  6915. <argument token="W" description="what" valueNotes="vdelta, steepest, total, pprest, pp (default)"/>
  6916. </arguments>
  6917. </command>
  6918. <command name="getmaptimestamp">
  6919. <description>Returns the "last written" timestamp of the current map in the requested format.</description>
  6920. <remarks>
  6921. <remark>
  6922. If "fmt" starts with "U", the time is given as UTC, otherwise as local time. If "fmt" is empty,
  6923. or not given or just the "U", the format defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer.
  6924. </remark>
  6925. <remark>The same format options as in strftime().</remark>
  6926. </remarks>
  6927. <arguments>
  6928. <argument token="fmt" description="format" valueNotes="strftime format"/>
  6929. </arguments>
  6930. </command>
  6931. <variable name="_ignoreillegalpaths">
  6932. <description>Whether or not texture paths are scrutinized.</description>
  6933. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:yes=>ignore" defaultValue="0"/>
  6934. <remarks>
  6935. <remark>If during mapload textureslots can't be filled and this is not set to 1 a "missing media" error is raised.</remark>
  6936. <remark>It is used in the optional cubescript config/opt/convmap.cfg</remark>
  6937. </remarks>
  6938. <references>
  6939. <identifierReference identifier="loadnotexture"/>
  6940. </references>
  6941. </variable>
  6942. <command name="stairs">
  6943. <description>Places stairs in all selections.</description>
  6944. <remarks>
  6945. <remark>"xs" and "ys" determine the step width in x- and y-direction.</remark>
  6946. </remarks>
  6947. <arguments>
  6948. <argument token="xs" description="step width in x-direction" valueNotes=""/>
  6949. <argument token="ys" description="step width in y-direction" valueNotes=""/>
  6950. </arguments>
  6951. </command>
  6952. <scriptalias name="updateeditinfopanel">
  6953. <description>A cubescript hook to provide additional information about the current edit situation.</description>
  6954. <remarks>
  6955. <remark>For example it provides additional information about the closest entity.</remark>
  6956. <remark>The returned text is rendered on the right side of the screen.</remark>
  6957. <remark>
  6958. Default for "updateeditinfopanel" is "explainclosestentity" script which provides detailed info about
  6959. the closest entity.
  6960. </remark>
  6961. </remarks>
  6962. <references>
  6963. <identifierReference identifier="editinfopanelmillis"/>
  6964. <identifierReference identifier="hideeditinfopanel"/>
  6965. </references>
  6966. </scriptalias>
  6967. <variable name="editinfopanelmillis">
  6968. <description>Update the edit info panel every N milliseconds.</description>
  6969. <value token="N" description="milliseconds" minValue="5" maxValue="2000" defaultValue="80" valueNotes="integer"/>
  6970. <references>
  6971. <identifierReference identifier="updateeditinfopanel"/>
  6972. <identifierReference identifier="hideeditinfopanel"/>
  6973. </references>
  6974. </variable>
  6975. <variable name="hideeditinfopanel">
  6976. <description>Hide the edit info panel.</description>
  6977. <value token="N" description="0: show, 1: hide" minValue="0" maxValue="1" defaultValue="0"/>
  6978. <references>
  6979. <identifierReference identifier="updateeditinfopanel"/>
  6980. <identifierReference identifier="editinfopanelmillis"/>
  6981. </references>
  6982. </variable>
  6983. <variable name="hideeditslotinfo">
  6984. <description>Hide the closest entity filename info.</description>
  6985. <value token="N" description="0: show info always, 1: only show &quot;unassigned slot&quot; if necessary, 2: never show info" minValue="0" maxValue="2" defaultValue="0"/>
  6986. </variable>
  6987. <command name="mapartist">
  6988. <description>Adds artist info to a map.</description>
  6989. <arguments>
  6990. <argument token="N" description="Prints the map artist player ID" valueNotes="print"/>
  6991. <argument description="Sets the map artist player ID to the player currently logged in" valueNotes="set"/>
  6992. <argument description="Returns the current map artist player ID" valueNotes="get"/>
  6993. <argument description="Erases an existing map artist record in the current map" valueNotes="clear"/>
  6994. </arguments>
  6995. <references>
  6996. <identifierReference identifier="modeinfo"/>
  6997. </references>
  6998. </command>
  6999. <command name="modeinfo">
  7000. <description>Adds modeinfo info to a map.</description>
  7001. <remarks>
  7002. <remark>
  7003. See possibilities of mode list and flags (keywords) in config/maprot.cfg file.
  7004. To use flags for all modes you can use "all" value instead of mode list.
  7005. </remark>
  7006. </remarks>
  7007. <arguments>
  7008. <argument token="N" description="Lists current modeinfo entries" valueNotes="list"/>
  7009. <argument description="Returns list of current modeinfo entries" valueNotes="get"/>
  7010. <argument description="Erases current list of modeinfo entries" valueNotes="clear"/>
  7011. <argument description="Specifies flags for a list of modes" valueNotes="&lt;modelist&gt; &lt;modeflags&gt;"/>
  7012. </arguments>
  7013. <references>
  7014. <identifierReference identifier="mapartist"/>
  7015. </references>
  7016. </command>
  7017. <command name="showtagclipfocus">
  7018. <description>Show the volume of a focused clip entity as a cloud of sparklies.</description>
  7019. <arguments>
  7020. <argument token="B" description="on/off" valueNotes="0:off,1:on" defaultValue="0"/>
  7021. </arguments>
  7022. <defaultKeys>
  7023. <key alias="B" name="B" description="while pressed clips are clouds of sparklies"/>
  7024. </defaultKeys>
  7025. <remarks>
  7026. <remark>To see the volume rather than the boundaries of a clip entity you can hold the B key in editing mode while pointing at it.</remark>
  7027. </remarks>
  7028. </command>
  7029. <command name="updatemapmodeldependencies">
  7030. <description>Update map config with any mapmodels required by those in use.</description>
  7031. </command>
  7032. <variable name="editingsettingsvisibletime">
  7033. <description>How long the temporary bits of showeditingsettings are displayed.</description>
  7034. <value token="T" description="time" minValue="750" maxValue="75000" valueNotes="time in milliseconds" defaultValue="7500"/>
  7035. <remarks>
  7036. <remark>Slide in/out the boxes and/or text of the showeditingsettings display.</remark>
  7037. </remarks>
  7038. <references>
  7039. <identifierReference identifier="showeditingsettings"/>
  7040. </references>
  7041. </variable>
  7042. <variable name="showeditingsettings">
  7043. <description>A visual representation of hidden/shown entities. (may be used for more editing ephemerals later)</description>
  7044. <value token="P" description="persistence" minValue="0" maxValue="3" valueNotes="0:off(*),1:short,2:text-short,3:permanent" defaultValue="0"/>
  7045. <remarks>
  7046. <remark>If the value of edithideentmask is not 0 (meaning all entities shown) then even if showeditingsettings is 0 the display will show up on the first toggle into editmode.</remark>
  7047. <remark>The values 1, 2 and 3 will make the display show up for every time you start editing. With 3 it will stay for ever.</remark>
  7048. <remark>For 2 the text will disappear after a time but the boxes will stay for ever. For 1 everything is hidden after the duration of editingsettingsvisibletime.</remark>
  7049. </remarks>
  7050. <references>
  7051. <identifierReference identifier="edithideentmask"/>
  7052. <identifierReference identifier="editingsettingsvisibletime"/>
  7053. </references>
  7054. </variable>
  7055. <variable name="shadowyaw">
  7056. <description>Shadow yaw specifies the angle at which shadow stencils are drawn on a map.</description>
  7057. <value token="D" description="degrees" minValue="0" maxValue="360" valueNotes="The angle in degrees to rotate the stencil shadows" defaultValue="45"/>
  7058. <examples>
  7059. <example>
  7060. <code><![CDATA[shadowyaw 90]]></code>
  7061. </example>
  7062. </examples>
  7063. <remarks>
  7064. <remark>
  7065. When specifying shadowyaw, remember that the default angle is 45 degrees. The example below
  7066. would make the shadows appear at 90 degrees (45 degrees more to the left).
  7067. </remark>
  7068. </remarks>
  7069. </variable>
  7070. <variable name="tagcliplinewidth">
  7071. <description>The width of the tagclip lines.</description>
  7072. <value token="W" description="width" minValue="0.2" maxValue="3" defaultValue="1"/>
  7073. <references>
  7074. <identifierReference identifier="showtagclips"/>
  7075. <identifierReference identifier="showtagclipfocus"/>
  7076. </references>
  7077. </variable>
  7078. <variable name="worldiodebug">
  7079. <description>Whether or not to output debugging information while loading/saving maps.</description>
  7080. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:debug output" defaultValue="0"/>
  7081. </variable>
  7082. <variable name="_nextentityispasted">
  7083. <description>Set to 1 just before calling a newent command where all attributes are meant to be kept.</description>
  7084. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:yes=>keep attribute values" defaultValue="0"/>
  7085. <remarks>
  7086. <remark>It is used in the pasteent scripting.</remark>
  7087. <remark>When creating a new entity of type mapmodel, playerstart or CTF flag the orientation is taken from your current viewing angle. To disable this behaviour for one call only you set the value to of this to 1 and then issue your newentity call with all attributes given.</remark>
  7088. </remarks>
  7089. <references>
  7090. <identifierReference identifier="loadnotexture"/>
  7091. </references>
  7092. </variable>
  7093. </identifiers>
  7094. </section>
  7095. <!-- Editing Section Ends -->
  7096. <!-- Menus Section Starts -->
  7097. <section name="Menus" sortindex="13">
  7098. <description>This section describes identifiers related to the menu gui.</description>
  7099. <identifiers sort="true">
  7100. <command name="menuinit">
  7101. <description>Specifies commands to be executed when a menu opens.</description>
  7102. <references>
  7103. <identifierReference identifier="newmenu"/>
  7104. </references>
  7105. <remarks>
  7106. <remark>This command should be placed after newmenu.</remark>
  7107. </remarks>
  7108. <arguments>
  7109. <argument token="C" description="the code to execute on init"/>
  7110. </arguments>
  7111. </command>
  7112. <command name="newmenu">
  7113. <description>Creates a new menu.</description>
  7114. <references>
  7115. <identifierReference identifier="menuitem"/>
  7116. </references>
  7117. <remarks>
  7118. <remark>
  7119. All menu commands placed after newmenu (i.e. menuitem, menuitemcheckbox, etc.) are added
  7120. into the menu until another "newmenu" command is specified.
  7121. </remark>
  7122. </remarks>
  7123. <arguments>
  7124. <argument token="N" description="the name of the menu"/>
  7125. </arguments>
  7126. </command>
  7127. <command name="menuitem">
  7128. <description>Creates a new menuitem.</description>
  7129. <remarks>
  7130. <remark>
  7131. Upon activating the menuitem, the associated command will be executed (See config/menus.cfg for examples).
  7132. If the command argument is omitted, then it will be set to the same value as the description.
  7133. If -1 is specified instead of the command to execute, then no command is executed when activating the item.
  7134. If the rollover option is used, the menuitem will execute that command when selecting (but not activating) the menuitem.
  7135. </remark>
  7136. <remark>'\n' in menuitem synchronizes further text with slider width (tab-like function).</remark>
  7137. <remark>(Note: to activate the menu item, select it, and either: Click, press SPACE or press ENTER/Return).</remark>
  7138. </remarks>
  7139. <references>
  7140. <identifierReference identifier="newmenu"/>
  7141. <identifierReference identifier="getigraph"/>
  7142. </references>
  7143. <arguments>
  7144. <argument token="T" description="the text content in menu line"/>
  7145. <argument token="A" description="the command to execute on selection of the menuitem" optional="true"/>
  7146. <argument token="H" description="the command to execute upon rolling over the menuitem" optional="true"/>
  7147. <argument token="D" description="the description of menu item, which is displayed on the menu footer" optional="true"/>
  7148. </arguments>
  7149. </command>
  7150. <command name="menuinitselection">
  7151. <description>Defines the initial selection for a menu.</description>
  7152. <arguments>
  7153. <argument token="A" description="line number"/>
  7154. </arguments>
  7155. </command>
  7156. <command name="menuitemaltfont">
  7157. <description>Displays a menu line with a text which may contain chars from an alternate font.</description>
  7158. <remarks>
  7159. <remark>
  7160. Chars from the alternate font have to be marked with "\a".
  7161. Alternate font chars have no width and are just rendered above the following text. Use spaces to counter that.
  7162. </remark>
  7163. </remarks>
  7164. <arguments>
  7165. <argument token="N" description="the name of the alternate font" valueNotes="default, mono, serif, huddigits, serverquality, bargraphs, radaricons"/>
  7166. <argument token="T" description="text content in menu line"/>
  7167. <argument token="A" description="action" optional="true"/>
  7168. <argument token="H" description="hoveraction" optional="true"/>
  7169. <argument token="D" description="description displayed on menu footer" optional="true"/>
  7170. </arguments>
  7171. <references>
  7172. <identifierReference identifier="font"/>
  7173. </references>
  7174. </command>
  7175. <command name="menuselection">
  7176. <description>Selects a line in a menu.</description>
  7177. <arguments>
  7178. <argument token="A" description="menu name"/>
  7179. <argument token="B" description="line number"/>
  7180. </arguments>
  7181. </command>
  7182. <command name="menuselectionpersistent">
  7183. <description>Enables persistent selections for the currently displayed menu.</description>
  7184. <remarks>
  7185. <remark>When enabled, it restores a previously saved selection.</remark>
  7186. <remark>
  7187. Probably most efficient inside "menuinit". The position is restored during execution of this command,
  7188. so the menu entry has to already exist and the alias with the last position has to be read from saved.cfg.
  7189. In automatically created menus it may be necessary to execute the command with a short delay.
  7190. </remark>
  7191. </remarks>
  7192. </command>
  7193. <command name="menuselectionbgcolor">
  7194. <description>Defines the background color for the menu selection bar.</description>
  7195. <arguments>
  7196. <argument token="R" description="red" valueNotes="0..100"/>
  7197. <argument token="G" description="green" valueNotes="0..100"/>
  7198. <argument token="B" description="blue" valueNotes="0..100"/>
  7199. <argument token="A" description="alpha" valueNotes="0..100"/>
  7200. </arguments>
  7201. </command>
  7202. <command name="menuselectiondescbgcolor">
  7203. <description>Defines the background color for the description of selected active menu items (checkbox, slider, text input).</description>
  7204. <arguments>
  7205. <argument token="R" description="red" valueNotes="0..100"/>
  7206. <argument token="G" description="green" valueNotes="0..100"/>
  7207. <argument token="B" description="blue" valueNotes="0..100"/>
  7208. <argument token="A" description="alpha" valueNotes="0..100"/>
  7209. </arguments>
  7210. </command>
  7211. <command name="menuitemcheckbox">
  7212. <description>Creates a checkbox menu item.</description>
  7213. <remarks>
  7214. <remark>
  7215. Optional fourth parameter "position" in the range from 0 o 100, default 0, which moves the position
  7216. of the checkbox over the width of a text input or slider, with 100 being left and 0 being right.
  7217. </remark>
  7218. </remarks>
  7219. <arguments>
  7220. <argument token="T" description="text"/>
  7221. <argument token="V" description="value"/>
  7222. <argument token="A" description="action"/>
  7223. <argument token="P" description="position" valueNotes="0..100" optional="true"/>
  7224. </arguments>
  7225. </command>
  7226. <command name="menuitemimage">
  7227. <arguments>
  7228. <argument token="N" description="image filename"/>
  7229. <argument token="T" description="text"/>
  7230. <argument token="A" description="action"/>
  7231. <argument token="H" description="hoveraction"/>
  7232. </arguments>
  7233. </command>
  7234. <variable name="hidebigmenuimages">
  7235. <description>Hide big images in menus.</description>
  7236. <value token="N" description="0: show, 1: hide" minValue="0" maxValue="1" defaultValue="0"/>
  7237. </variable>
  7238. <command name="menuitemkeyinput">
  7239. <description>Menuitem which displays "text" and all keys, that bind "bindcmd" - in game mode.</description>
  7240. <arguments>
  7241. <argument token="T" description="text"/>
  7242. <argument token="B" description="bind command"/>
  7243. </arguments>
  7244. <references>
  7245. <identifierReference identifier="menuitemeditkeyinput"/>
  7246. <identifierReference identifier="menuitemspectkeyinput"/>
  7247. </references>
  7248. </command>
  7249. <command name="menuitemeditkeyinput">
  7250. <description>Menuitem which displays "text" and all keys, that bind "bindcmd" - in edit mode.</description>
  7251. <arguments>
  7252. <argument token="T" description="text"/>
  7253. <argument token="B" description="bind command"/>
  7254. </arguments>
  7255. <references>
  7256. <identifierReference identifier="menuitemkeyinput"/>
  7257. <identifierReference identifier="menuitemspectkeyinput"/>
  7258. </references>
  7259. </command>
  7260. <command name="menuitemspectkeyinput">
  7261. <description>Menuitem which displays "text" and all keys, that bind "bindcmd" - in spectate mode.</description>
  7262. <arguments>
  7263. <argument token="T" description="text"/>
  7264. <argument token="B" description="bind command"/>
  7265. </arguments>
  7266. <references>
  7267. <identifierReference identifier="menuitemkeyinput"/>
  7268. <identifierReference identifier="menuitemeditkeyinput"/>
  7269. </references>
  7270. </command>
  7271. <command name="menuitemmapload">
  7272. <description>Menuitem that loads a map, displays the title and the preview or a default image.</description>
  7273. <arguments>
  7274. <argument token="M" description="map"/>
  7275. <argument token="A" description="action" optional="true"/>
  7276. <argument token="H" description="hoveraction" optional="true"/>
  7277. <argument token="D" description="description displayed on menu footer" optional="true"/>
  7278. </arguments>
  7279. <references>
  7280. <identifierReference identifier="screenshotpreview"/>
  7281. </references>
  7282. </command>
  7283. <command name="screenshotpreview">
  7284. <description>Creates a screenshot cropped to 4:3 with a given number of lines and jpeg quality 80.</description>
  7285. <remarks>
  7286. <remark>Pressing CTRL+F12 during spectating creates a clean screenshot and saves it as map preview picture.</remark>
  7287. </remarks>
  7288. <defaultKeys>
  7289. <key alias="CTRL+F12" name="Ctrl+F12" description="creates map preview pictures during spectating"/>
  7290. </defaultKeys>
  7291. <arguments>
  7292. <argument token="N" description="number of lines" valueNotes="144..480, default 240 or last given value"/>
  7293. </arguments>
  7294. <references>
  7295. <identifierReference identifier="menuitemmapload"/>
  7296. </references>
  7297. </command>
  7298. <command name="menuitemslider">
  7299. <arguments>
  7300. <argument token="T" description="text" valueNotes="menu item text"/>
  7301. <argument token="L" description="min" valueNotes="min value"/>
  7302. <argument token="U" description="max" valueNotes="max value (or optionally -1 and set by display string length)"/>
  7303. <argument token="V" description="value" valueNotes="initial value"/>
  7304. <argument token="D" description="display" valueNotes="list of value descriptions or value step size"/>
  7305. <argument token="A" description="action" valueNotes="executed on value changes (new value in arg1)"/>
  7306. <argument token="W" description="wrap" valueNotes="if 1, wrap slider around"/>
  7307. </arguments>
  7308. </command>
  7309. <command name="menuitemradio">
  7310. <arguments>
  7311. <argument token="T" description="text" valueNotes="menu item text"/>
  7312. <argument token="L" description="min" valueNotes="min value"/>
  7313. <argument token="U" description="max" valueNotes="max value (or optionally -1 and set by display string length)"/>
  7314. <argument token="V" description="value" valueNotes="initial value"/>
  7315. <argument token="D" description="display" valueNotes="list of value descriptions or value step size"/>
  7316. <argument token="A" description="action" valueNotes="executed on value changes (new value in arg1)"/>
  7317. </arguments>
  7318. </command>
  7319. <command name="menuitemtextinput">
  7320. <description>Creates a new menuitem with text input field.</description>
  7321. <remarks>
  7322. <remark>
  7323. If the last line of a menu is a text input item, pressing enter in that line will not only execute
  7324. the assigned command, but also close the menu.
  7325. </remark>
  7326. </remarks>
  7327. <arguments>
  7328. <argument token="T" description="text"/>
  7329. <argument token="V" description="value"/>
  7330. <argument token="A" description="action"/>
  7331. <argument token="H" description="hoveraction"/>
  7332. <argument token="M" description="maxchars"/>
  7333. </arguments>
  7334. </command>
  7335. <command name="menuitemgreyedout">
  7336. <description>Menu items added after this command are greyed out (1) or not (0).</description>
  7337. <remarks>
  7338. <remark>Greyed out menu items are grey and can't be operated.</remark>
  7339. </remarks>
  7340. <arguments>
  7341. <argument token="V" description="value" valueNotes="0: off 1: on"/>
  7342. </arguments>
  7343. </command>
  7344. <command name="menuheader">
  7345. <description>Adds header and/or footer to the menu.</description>
  7346. <arguments>
  7347. <argument token="H" description="header"/>
  7348. <argument token="F" description="footer"/>
  7349. </arguments>
  7350. </command>
  7351. <variable name="browsefiledesc">
  7352. <description>Toggles getting descriptive text from CGZ or DMO files in menudirlist.</description>
  7353. <value token="B" description="" minValue="0" maxValue="1" defaultValue="1"/>
  7354. <references>
  7355. <identifierReference identifier="menudirlist"/>
  7356. </references>
  7357. </variable>
  7358. <command name="menudirlist">
  7359. <description>Creates a menu listing of files from a path and perform an action on them when clicked.</description>
  7360. <remarks>
  7361. <remark>Use this inside menu definitions, almost always as the only command of that menu.</remark>
  7362. <remark>Compare the usage inside config/menus.cfg</remark>
  7363. </remarks>
  7364. <arguments>
  7365. <argument token="P" description="the directory path from the assaultcube root"/>
  7366. <argument token="E" description="file extension"/>
  7367. <argument token="A" description="action"/>
  7368. <argument token="I" description="show image from a file" valueNotes="0 or 1"/>
  7369. <argument token="S" description="string - search it in map/demo filenames and descriptions and show only matched files (case insensitive)"/>
  7370. </arguments>
  7371. <examples>
  7372. <example>
  7373. <code><![CDATA[menudirlist "packages/maps" "cgz" "map $arg1"]]></code>
  7374. <explanation>will create a list of maps and load them when clicked</explanation>
  7375. </example>
  7376. </examples>
  7377. <references>
  7378. <identifierReference identifier="newmenu"/>
  7379. <identifierReference identifier="menudirlistsub"/>
  7380. <identifierReference identifier="browsefiledesc"/>
  7381. </references>
  7382. </command>
  7383. <command name="menudirlistsub">
  7384. <description>Adds subdirectory entries to a menu with a files list.</description>
  7385. <remarks>
  7386. <remark>It has to come after the menudirlist command.</remark>
  7387. </remarks>
  7388. <arguments>
  7389. <argument token="A" description="action, executed, when the menu entry is chosen"/>
  7390. <argument token="D" description="if it is 1, an entry '..' is added (parent directory)" optional="true"/>
  7391. </arguments>
  7392. <references>
  7393. <identifierReference identifier="menudirlist"/>
  7394. </references>
  7395. </command>
  7396. <command name="menufont">
  7397. <description>Sets the font for a specific menu.</description>
  7398. <remarks>
  7399. <remark>If menu is "", the currently initialised menu is used.</remark>
  7400. </remarks>
  7401. <arguments>
  7402. <argument token="N" description="menu name"/>
  7403. <argument token="F" description="font" valueNotes="default, mono, serif"/>
  7404. </arguments>
  7405. <examples>
  7406. <example>
  7407. <code><![CDATA[menufont score mono]]></code>
  7408. <explanation>sets the font on the scoreboard</explanation>
  7409. </example>
  7410. </examples>
  7411. <references>
  7412. <identifierReference identifier="font"/>
  7413. </references>
  7414. </command>
  7415. <command name="showmenu">
  7416. <description>Displays the specified menu.</description>
  7417. <remarks>
  7418. <remark>
  7419. The menu allows the user to pick an item with the cursor keys.
  7420. Upon pressing return, the associated action will be executed.
  7421. Pressing ESC will cancel the menu.
  7422. </remark>
  7423. </remarks>
  7424. <arguments>
  7425. <argument token="N" description="the name of a previously defined menu"/>
  7426. </arguments>
  7427. <references>
  7428. <identifierReference identifier="newmenu"/>
  7429. <identifierReference identifier="closemenu"/>
  7430. <identifierReference identifier="delmenu"/>
  7431. </references>
  7432. </command>
  7433. <command name="closemenu">
  7434. <description>Closes the specified menu if it is open.</description>
  7435. <remarks>
  7436. <remark>If it is open multiple times in the stack only the topmost instance will be closed!</remark>
  7437. </remarks>
  7438. <arguments>
  7439. <argument token="N" description="the name of a previously defined menu"/>
  7440. </arguments>
  7441. <references>
  7442. <identifierReference identifier="newmenu"/>
  7443. <identifierReference identifier="showmenu"/>
  7444. <identifierReference identifier="delmenu"/>
  7445. <identifierReference identifier="closecurmenu"/>
  7446. </references>
  7447. </command>
  7448. <command name="delmenu">
  7449. <description>Deletes the entire contents (all menu items) of the given menu.</description>
  7450. <arguments>
  7451. <argument token="N" description="the name of a previously defined menu"/>
  7452. </arguments>
  7453. <references>
  7454. <identifierReference identifier="newmenu"/>
  7455. <identifierReference identifier="showmenu"/>
  7456. <identifierReference identifier="closemenu"/>
  7457. </references>
  7458. </command>
  7459. <command name="menumdl">
  7460. <description>Specifies a model to render while displaying the specified menu.</description>
  7461. <remarks>
  7462. <remark>If menu is "", the currently initialised menu is used.</remark>
  7463. <remark>It specifies, which model to render and how. If only menu is specified, no model is rendered.</remark>
  7464. </remarks>
  7465. <arguments>
  7466. <argument token="N" description="the name of the menu"/>
  7467. <argument token="M" description="the model"/>
  7468. <argument token="A" description="the animation to play"/>
  7469. <argument token="R" description="the rotation speed"/>
  7470. <argument token="S" description="the scale"/>
  7471. </arguments>
  7472. </command>
  7473. <command name="chmenutexture">
  7474. <description>Displays a texture on the right side of a menu.</description>
  7475. <remarks>
  7476. <remark>
  7477. By specifying a title string in the third argument to chmenutexture,
  7478. a picture is rendered instead of a texture. The title string is displayed instead of the texture resolution.
  7479. The variable "menupicturesize" holds a size modifier for pictures, similar to "menutexturesize".
  7480. </remark>
  7481. </remarks>
  7482. <arguments>
  7483. <argument token="N" description="the name of the menu"/>
  7484. <argument token="P" description="the path to the texture"/>
  7485. <argument token="T" description="the title of the picture"/>
  7486. </arguments>
  7487. <references>
  7488. <identifierReference identifier="menutexturesize"/>
  7489. <identifierReference identifier="menupicturesize"/>
  7490. </references>
  7491. </command>
  7492. <variable name="menutexturesize">
  7493. <description>Changes the size of textures displayed in menus (mostly for testing purposes).</description>
  7494. <value token="N" description="size factor" minValue="0.1f" maxValue="5.0f" defaultValue="1.0f"/>
  7495. <references>
  7496. <identifierReference identifier="chmenutexture"/>
  7497. <identifierReference identifier="menupicturesize"/>
  7498. </references>
  7499. </variable>
  7500. <variable name="menupicturesize">
  7501. <description>Changes the size of pictures displayed in menus.</description>
  7502. <value token="N" description="size factor" minValue="0.1f" maxValue="5.0f" defaultValue="1.6f"/>
  7503. <references>
  7504. <identifierReference identifier="chmenutexture"/>
  7505. <identifierReference identifier="menutexturesize"/>
  7506. </references>
  7507. </variable>
  7508. <variable name="wrapslider">
  7509. <description>If wrapslider is set the menuitemslider will toggle to the min/max value if at end of the range.</description>
  7510. <value token="N" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="0"/>
  7511. </variable>
  7512. <command name="menucanblink">
  7513. <description>Toggles the ability for menutext to have the blinking bit set.</description>
  7514. <remarks>
  7515. <remark>The global setting of 'allowblinkingtext' overrides this.</remark>
  7516. </remarks>
  7517. <arguments>
  7518. <argument token="T" description="0 = Off, any other integer = On" valueNotes="Any integer is valid, positive or negative"/>
  7519. </arguments>
  7520. <references>
  7521. <identifierReference identifier="allowblinkingtext"/>
  7522. </references>
  7523. </command>
  7524. <command name="curmenu">
  7525. <description>Returns the name of the currently open menu.</description>
  7526. <remarks>
  7527. <remark>If more than one menu is open, only the name of the topmost menu on the stack is returned.</remark>
  7528. </remarks>
  7529. <references>
  7530. <identifierReference identifier="closecurmenu"/>
  7531. <identifierReference identifier="refreshcurmenu"/>
  7532. <identifierReference identifier="refreshcurmenudelayed"/>
  7533. </references>
  7534. </command>
  7535. <command name="closecurmenu">
  7536. <description>Closes the currently open menu.</description>
  7537. <remarks>
  7538. <remark>If more than one menu is open, only closes the topmost menu on the stack.</remark>
  7539. </remarks>
  7540. <references>
  7541. <identifierReference identifier="curmenu"/>
  7542. <identifierReference identifier="refreshcurmenu"/>
  7543. <identifierReference identifier="refreshcurmenudelayed"/>
  7544. </references>
  7545. </command>
  7546. <command name="refreshcurmenu">
  7547. <description>Refreshes (closes and opens again) the current menu.</description>
  7548. <references>
  7549. <identifierReference identifier="curmenu"/>
  7550. <identifierReference identifier="refreshcurmenudelayed"/>
  7551. <identifierReference identifier="closecurmenu"/>
  7552. </references>
  7553. </command>
  7554. <command name="refreshcurmenudelayed">
  7555. <description>Refreshes (closes and opens again, after very short delay) the current menu.</description>
  7556. <references>
  7557. <identifierReference identifier="curmenu"/>
  7558. <identifierReference identifier="refreshcurmenu"/>
  7559. <identifierReference identifier="closecurmenu"/>
  7560. </references>
  7561. </command>
  7562. <command name="menurenderoffset">
  7563. <description>Moves a menu away from the middle of the screen.</description>
  7564. <remarks>
  7565. <remark>Values of "0" represent half the screen width and height.</remark>
  7566. </remarks>
  7567. <arguments>
  7568. <argument token="X" description="x-offset"/>
  7569. <argument token="Y" description="y-offset"/>
  7570. </arguments>
  7571. </command>
  7572. <command name="menusynctabstops">
  7573. <description>Synchronizes tabs in menus.</description>
  7574. <remarks>
  7575. <remark>
  7576. If enabled (1), tab positions in a menu are synchronised.
  7577. It affects menu title, header and items, but not footer or descriptions.
  7578. </remark>
  7579. </remarks>
  7580. <arguments>
  7581. <argument token="V" description="value" valueNotes="0: off (default), 1: on"/>
  7582. </arguments>
  7583. </command>
  7584. <command name="menutitle">
  7585. <description>Make a different title show up than the menu's internal name.</description>
  7586. <arguments>
  7587. <argument token="N" description="name" valueNotes="human friendly title"/>
  7588. </arguments>
  7589. <remarks>
  7590. <remark>Intended to pretty up the menus with more readable titles than the sometimes short but technical values that make the scripting easier!</remark>
  7591. </remarks>
  7592. <references>
  7593. <identifierReference identifier="newmenu"/>
  7594. <identifierReference identifier="curmenu"/>
  7595. </references>
  7596. </command>
  7597. </identifiers>
  7598. </section>
  7599. <!-- Menus Section Ends -->
  7600. <!-- Heads-Up Display Section Starts -->
  7601. <section name="Heads-Up Display" sortindex="06">
  7602. <description>This section describes the identifiers to configure the head-up display (HUD).</description>
  7603. <identifiers>
  7604. <variable name="gametimedisplay">
  7605. <description>Show the game-time clock on the HUD.</description>
  7606. <value token="D" description="off (0), count backward (1), count forward (2)" minValue="0" maxValue="2" defaultValue="1"/>
  7607. <remarks>
  7608. <remark>The clock can count backward (from time limit to 0s) or forward (from 0s to time limit).</remark>
  7609. </remarks>
  7610. <references>
  7611. <identifierReference identifier="wallclockformat"/>
  7612. </references>
  7613. </variable>
  7614. <variable name="wallclockformat">
  7615. <description>Show the wall clock with time (usually local, not game-time) on the HUD.</description>
  7616. <remarks>
  7617. <remark>"wallclockformat" alias should contain string in strftime format to show the clock with proper time.
  7618. If the alias is empty, the wall clock is hidden.</remark>
  7619. </remarks>
  7620. <references>
  7621. <identifierReference identifier="gametimedisplay"/>
  7622. </references>
  7623. </variable>
  7624. <variable name="showmap">
  7625. <description>Determines if the mini-map should be shown on screen.</description>
  7626. <value token="B" description="show mini-map" minValue="0" maxValue="1" defaultValue="0"/>
  7627. <defaultKeys>
  7628. <key alias="LALT" name="left Alt" description="toggles minimap"/>
  7629. </defaultKeys>
  7630. </variable>
  7631. <variable name="showmapbackdrop">
  7632. <description>Determines whether to have a see-through map overview (0), or render it on a black backdrop (1) or a combination of both (2).</description>
  7633. <value token="B" description="backdrop-style" minValue="0" maxValue="2" defaultValue="0"/>
  7634. </variable>
  7635. <variable name="showmapbackdroptransparency">
  7636. <description>Transparency of the black map backdrop (in percent) rendered if showmapbackdrop is set to 2.</description>
  7637. <value token="T" description="transparency" minValue="0" maxValue="100" defaultValue="75"/>
  7638. <references>
  7639. <identifierReference identifier="showmapbackdrop"/>
  7640. </references>
  7641. </variable>
  7642. <command name="clearminimap">
  7643. <description>Recreates the minimap for the current map.</description>
  7644. <references>
  7645. <identifierReference identifier="minimapres"/>
  7646. </references>
  7647. </command>
  7648. <variable name="minimapres">
  7649. <description>Sets the resolution for the minimap.</description>
  7650. <references>
  7651. <identifierReference identifier="clearminimap"/>
  7652. </references>
  7653. <value token="N" description="the resolution" minValue="7" maxValue="10" defaultValue="9"/>
  7654. </variable>
  7655. <variable name="hidecompass">
  7656. <description>Turns on/off the radar compass.</description>
  7657. <value token="V" description="enable/disable radar compass" minValue="0" maxValue="1" defaultValue="0"/>
  7658. </variable>
  7659. <variable name="overviewflags">
  7660. <description>Rendering options for the flags in the overview spectator mode.</description>
  7661. <remarks>
  7662. <remark>
  7663. Viewed from directly above the pole is barely visible and the undulating canvas never comes out of perfect alignment so is invisible.
  7664. To compensate for the realistic rendering there are two variations on rendering flags when in the overview -
  7665. either we rotate the models a bit so they become visible or we use the radar display of bases and flags instead.
  7666. </remark>
  7667. </remarks>
  7668. <value token="V" description="viewing variant" minValue="0" maxValue="2" defaultValue="1"/>
  7669. <arguments>
  7670. <argument description="real" valueNotes="0"/>
  7671. <argument description="askew" valueNotes="1"/>
  7672. <argument description="radar" valueNotes="2"/>
  7673. </arguments>
  7674. </variable>
  7675. <variable name="hidedamageindicator">
  7676. <description>Turns on/off the damage indicator.</description>
  7677. <value token="V" description="enable/disable damage indicator" minValue="0" maxValue="1" defaultValue="0"/>
  7678. </variable>
  7679. <variable name="oldfashionedgunstats">
  7680. <description>Shows ammo statistics like in version 1.0.</description>
  7681. <value token="N" description="0: new, 1: old" minValue="0" maxValue="1" defaultValue="0"/>
  7682. </variable>
  7683. <command name="toggleconsole">
  7684. <description>Toggles the console.</description>
  7685. <defaultKeys>
  7686. <key alias="F11"/>
  7687. </defaultKeys>
  7688. </command>
  7689. <variable name="confade">
  7690. <description>Sets how many seconds before the console text rolls (disappears) up the screen.</description>
  7691. <value token="V" description="time before the text rolls up" minValue="0" maxValue="60" defaultValue="20"/>
  7692. </variable>
  7693. <variable name="consize">
  7694. <description>Sets how many lines of text the console displays.</description>
  7695. <value token="V" description="" minValue="0" maxValue="100" defaultValue="6"/>
  7696. <references>
  7697. <identifierReference identifier="altconsize"/>
  7698. <identifierReference identifier="fullconsize"/>
  7699. </references>
  7700. </variable>
  7701. <variable name="altconsize">
  7702. <description>Sets the percent of screen height for text lines on an alternate F11 history display.</description>
  7703. <value token="V" description="" minValue="0" maxValue="100" defaultValue="0"/>
  7704. <references>
  7705. <identifierReference identifier="consize"/>
  7706. <identifierReference identifier="fullconsize"/>
  7707. </references>
  7708. </variable>
  7709. <variable name="fullconsize">
  7710. <description>Sets the percent of screen height for text lines on the F11 history display.</description>
  7711. <value token="V" description="" minValue="0" maxValue="100" defaultValue="40"/>
  7712. <references>
  7713. <identifierReference identifier="consize"/>
  7714. <identifierReference identifier="altconsize"/>
  7715. </references>
  7716. </variable>
  7717. <variable name="hideconsole">
  7718. <description>Turns on or off the display of console text.</description>
  7719. <value token="V" description="enable/disable console text" minValue="0" maxValue="1" defaultValue="0"/>
  7720. </variable>
  7721. <variable name="hidehudequipment">
  7722. <description>Turns on or off the display of equipment icons.</description>
  7723. <value token="V" description="enable/disable equipment icons" minValue="0" maxValue="1" defaultValue="0"/>
  7724. </variable>
  7725. <variable name="hidehudmsgs">
  7726. <description>Turns on or off the display of messages at the bottom of the screen.</description>
  7727. <value token="V" description="enable/disable messages" minValue="0" maxValue="1" defaultValue="0"/>
  7728. </variable>
  7729. <variable name="hidespecthud">
  7730. <description>Turns on or off the display of spectator status.</description>
  7731. <value token="V" description="enable/disable spectator status" minValue="0" maxValue="1" defaultValue="0"/>
  7732. </variable>
  7733. <variable name="hideteamscorehud">
  7734. <description>Turns on or off the display of team score icons.</description>
  7735. <value token="V" description="enable/disable team score icons" minValue="0" maxValue="1" defaultValue="0"/>
  7736. </variable>
  7737. <variable name="flagscorehudtransparency">
  7738. <description>Options for flag score hud transparency.</description>
  7739. <value token="V" description="flag score hud transparency" minValue="0" maxValue="2" defaultValue="2"
  7740. valueNotes=" 0: no transparency, icon set 'flag gone'; 1: transparency, icon set 'flag gone'; 2: transparency, classic icon set"/>
  7741. </variable>
  7742. <variable name="hidektfindicator">
  7743. <description>Turns on or off the display of ktf flag direction indicator.</description>
  7744. <value token="V" description="enable/disable ktf indicator" minValue="0" maxValue="1" defaultValue="0"/>
  7745. <references>
  7746. <identifierReference identifier="ktfindicatoralpha"/>
  7747. </references>
  7748. </variable>
  7749. <variable name="ktfindicatoralpha">
  7750. <description>Sets the level of transparency of ktf flag direction indicator, 100 = totally solid.</description>
  7751. <value token="V" description="ktf indicator alpha value" minValue="1" maxValue="100" defaultValue="70"/>
  7752. <references>
  7753. <identifierReference identifier="hidektfindicator"/>
  7754. </references>
  7755. </variable>
  7756. <variable name="hideteam">
  7757. <description>Turns on or off the display of local player team icons.</description>
  7758. <value token="V" description="enable/disable team icons" minValue="0" maxValue="1" defaultValue="0"/>
  7759. </variable>
  7760. <variable name="hideradar">
  7761. <description>Turns on or off the display of the on-screen radar.</description>
  7762. <value token="V" description="enable/disable radar" minValue="0" maxValue="1" defaultValue="0"/>
  7763. </variable>
  7764. <variable name="hidevote">
  7765. <description>Turns on or off the display of vote icons.</description>
  7766. <value token="V" description="0=on; 1=on, but hide after own vote; 2=off" minValue="0" maxValue="2" defaultValue="0"/>
  7767. </variable>
  7768. <variable name="hudgun">
  7769. <description>Turns on or off the display of the current selected gun.</description>
  7770. <value token="V" description="show/hide guns 3D models" minValue="0" maxValue="1" defaultValue="1"/>
  7771. </variable>
  7772. <variable name="specthudgun">
  7773. <description>Turns on/off the display of the hudgun while spectating a player in first-person view.</description>
  7774. <remarks>
  7775. <remark>Works in demo mode as well.</remark>
  7776. </remarks>
  7777. <value token="V" description="show/hide hudgun when spectating" minValue="0" maxValue="1" defaultValue="1"/>
  7778. </variable>
  7779. <variable name="showstats">
  7780. <description>Turns on/off display of FPS/rendering statistics on the HUD.</description>
  7781. <value token="N" description="0: Show no stats, 1: Only show FPS stats, 2: Show all stats" minValue="0" maxValue="2" defaultValue="1"/>
  7782. </variable>
  7783. <variable name="dbgpos">
  7784. <description>Displays local player's current x,y,z position in map, showstats 1 must be enabled.</description>
  7785. <value token="V" description="display current position" minValue="0" maxValue="1" defaultValue="0"/>
  7786. <references>
  7787. <identifierReference identifier="showstats"/>
  7788. </references>
  7789. </variable>
  7790. <variable name="crosshairteamsign">
  7791. <description>Turns on/off display of team warning crosshair.</description>
  7792. <value token="V" description="enable/disable warning crosshair" minValue="0" maxValue="1" defaultValue="1"/>
  7793. </variable>
  7794. <variable name="damageindicatoralpha">
  7795. <description>Sets the level of transparency of the damage indicator, 100 = totally solid.</description>
  7796. <value token="V" description="damage indicator alpha value" minValue="1" maxValue="100" defaultValue="50"/>
  7797. </variable>
  7798. <variable name="damageindicatordist">
  7799. <description>Sets the separation of the arrows in the damage indicator.</description>
  7800. <value token="V" description="damage indicator separation size" minValue="0" maxValue="10000" defaultValue="500"/>
  7801. </variable>
  7802. <variable name="damageindicatorsize">
  7803. <description>Sets the size of the damage indicator.</description>
  7804. <value token="V" description="damage indicator icon size" minValue="0" maxValue="10000" defaultValue="200"/>
  7805. </variable>
  7806. <variable name="damageindicatortime">
  7807. <description>Sets how long the damage indicator stays on screen.</description>
  7808. <value token="V" description="damage indicator display time" minValue="1" maxValue="10000" defaultValue="1000"/>
  7809. </variable>
  7810. <variable name="damagescreen">
  7811. <description>Show the blood-spat overlay when receiving damage?</description>
  7812. <value token="N" description="damagescreen" minValue="0" maxValue="1" defaultValue="1" valueNotes="0 (false), 1 (true)"/>
  7813. </variable>
  7814. <variable name="damagescreenalpha">
  7815. <description>If overlay of blood-spat, at what blending (transparency) level?</description>
  7816. <value token="N" description="damagescreen transparency" minValue="1" maxValue="100" defaultValue="45"/>
  7817. </variable>
  7818. <variable name="damagescreenfactor">
  7819. <description>If overlay of blood-spat, use which factor?</description>
  7820. <value token="N" description="damagescreen factor" minValue="1" maxValue="100" defaultValue="7"/>
  7821. </variable>
  7822. <variable name="damagescreenfade">
  7823. <description>If overlay of blood-spat, at what speed does it fade?</description>
  7824. <value token="N" description="damagescreen fade" minValue="0" maxValue="1000" defaultValue="125"/>
  7825. </variable>
  7826. <variable name="crosshairsize">
  7827. <description>Sets the size of your crosshair.</description>
  7828. <remarks>
  7829. <remark>The crosshair is turned off entirely if the size is set to 0.</remark>
  7830. </remarks>
  7831. <value token="N" description="the crosshair size" minValue="0" maxValue="50" defaultValue="15"/>
  7832. </variable>
  7833. <variable name="crosshairfx">
  7834. <description>Turns on or off crosshair effects.</description>
  7835. <remarks>
  7836. <remark>
  7837. When on, the crosshair will go orange when health is 50 or red when is 25.
  7838. Size change of crosshair occurs when player holds assault rifle and has more than 3 shots in a row.
  7839. </remark>
  7840. </remarks>
  7841. <arguments>
  7842. <argument token="V" valueNotes="0" description="turn off all effects"/>
  7843. <argument valueNotes="1 (default)" description="turn on all effects (color and size change)"/>
  7844. <argument valueNotes="2" description="turn on color change/turn off size change"/>
  7845. <argument valueNotes="3" description="turn off color change/turn on size change"/>
  7846. </arguments>
  7847. </variable>
  7848. <variable name="radarentsize">
  7849. <description>Sets the icon size of the players shown in the radar and the minimap.</description>
  7850. <value token="V" description="size of icons inside radar" minValue="4" maxValue="64" defaultValue="12"/>
  7851. </variable>
  7852. <variable name="cncolumncolor">
  7853. <description>Colour of CN column in scoreboard.</description>
  7854. <value token="C" description="color" minValue="0" maxValue="9" defaultValue="5"
  7855. valueNotes="0 (green), 1 (blue), 2 (yellow), 3 (red), 4 (gray), 5 (white), 6 (dark brown), 7 (dark red), 8 (purple), 9 (orange)"/>
  7856. </variable>
  7857. <variable name="radarheight">
  7858. <description>Changes at what height you are floating in the radar-view.</description>
  7859. <value token="H" description="height" minValue="5" maxValue="500" defaultValue="150"/>
  7860. </variable>
  7861. <variable name="showtargetname">
  7862. <description>Enables or disables showing the player name on the HUD when in your crosshair.</description>
  7863. <value token="N" description="0: off, 1: on" minValue="0" maxValue="1" defaultValue="1"/>
  7864. </variable>
  7865. <variable name="showspeed">
  7866. <description>Enables or disables showing the player's horizontal speed (vector).</description>
  7867. <value token="N" description="0: off, 1: on" minValue="0" maxValue="1" defaultValue="0"/>
  7868. </variable>
  7869. <variable name="blankouthud">
  7870. <description>Hides most of elements on the HUD for X frames.</description>
  7871. <value token="X" description="blank out the HUD" minValue="0" maxValue="10000" defaultValue="0"/>
  7872. <remarks>
  7873. <remark>
  7874. Used for "clean" screenshot. The parameter is "frames", so for example 1000 will take 20 seconds at 50 fps
  7875. or second at 1000 fps.
  7876. </remark>
  7877. </remarks>
  7878. <references>
  7879. <identifierReference identifier="cleanshot"/>
  7880. </references>
  7881. </variable>
  7882. <command name="showscores">
  7883. <description>Shows or hides the scores.</description>
  7884. <defaultKeys>
  7885. <key alias="TAB"/>
  7886. </defaultKeys>
  7887. <references>
  7888. <identifierReference identifier="showscoresondeath"/>
  7889. </references>
  7890. </command>
  7891. <variable name="showscoresondeath">
  7892. <description>Determines if scores should be shown on death.</description>
  7893. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  7894. <references>
  7895. <identifierReference identifier="showscores"/>
  7896. </references>
  7897. </variable>
  7898. <variable name="sc_flags">
  7899. <description>Sets the order priority for the column flags on the scoreboard.</description>
  7900. <value token="V" description="low priority: left, high priority: right" minValue="0" maxValue="100" defaultValue="0"/>
  7901. </variable>
  7902. <variable name="sc_frags">
  7903. <description>Sets the order priority for the column frags on the scoreboard.</description>
  7904. <value token="V" description="low priority: left, high priority: right" minValue="0" maxValue="100" defaultValue="1"/>
  7905. </variable>
  7906. <variable name="sc_deaths">
  7907. <description>Sets the order priority for the column deaths or disables it on the scoreboard.</description>
  7908. <value token="V" description="-1: disable, low priority: left, high priority: right" minValue="-1" maxValue="100" defaultValue="2"/>
  7909. </variable>
  7910. <variable name="sc_ratio">
  7911. <description>Sets the order priority for the column ratio or disables it on the scoreboard.</description>
  7912. <value token="V" description="-1: disable, low priority: left, high priority: right" minValue="-1" maxValue="100" defaultValue="-1"/>
  7913. </variable>
  7914. <variable name="sc_score">
  7915. <description>Sets the order priority for the column score or disables it on the scoreboard.</description>
  7916. <value token="V" description="-1: disable, low priority: left, high priority: right" minValue="-1" maxValue="100" defaultValue="4"/>
  7917. </variable>
  7918. <variable name="sc_lag">
  7919. <description>Sets the order priority for the column pj/ping or disables it on the scoreboard.</description>
  7920. <value token="V" description="-1: disable, low priority: left, high priority: right" minValue="-1" maxValue="100" defaultValue="5"/>
  7921. </variable>
  7922. <variable name="sc_clientnum">
  7923. <description>Sets the order priority for the column cn on the scoreboard.</description>
  7924. <value token="V" description="low priority: left, high priority: right" minValue="0" maxValue="100" defaultValue="6"/>
  7925. </variable>
  7926. <variable name="sc_name">
  7927. <description>Sets the order priority for the column name on the scoreboard.</description>
  7928. <value token="V" description="low priority: left, high priority: right" minValue="0" maxValue="100" defaultValue="7"/>
  7929. </variable>
  7930. <variable name="accuracy">
  7931. <description>Sets whether or not to display the accuracy information window.</description>
  7932. <remarks>
  7933. <remark>Accuracy is displayed for current weapon and only then, if scoreboard is turned on.</remark>
  7934. </remarks>
  7935. <value token="N" description="1: on, 0: off" minValue="0" maxValue="1" defaultValue="0"/>
  7936. <references>
  7937. <identifierReference identifier="accuracyinfo"/>
  7938. <identifierReference identifier="accuracyreset"/>
  7939. </references>
  7940. </variable>
  7941. <command name="accuracyreset">
  7942. <description>Resets accuracy counters.</description>
  7943. <references>
  7944. <identifierReference identifier="accuracy"/>
  7945. </references>
  7946. </command>
  7947. <command name="accuracyinfo">
  7948. <description>Shows in the console accuracy of all used weapons.</description>
  7949. <references>
  7950. <identifierReference identifier="accuracy"/>
  7951. </references>
  7952. </command>
  7953. <variable name="conalpha">
  7954. <description>Sets the transparency of the console.</description>
  7955. <value token="N" description="Alpha value" minValue="0" maxValue="255" defaultValue="255"/>
  7956. </variable>
  7957. <variable name="votealpha">
  7958. <description>Sets the transparency of the vote display.</description>
  7959. <value token="N" description="Alpha value" minValue="0" maxValue="255" defaultValue="255"/>
  7960. </variable>
  7961. </identifiers>
  7962. </section>
  7963. <!-- Heads-Up Display Section Ends -->
  7964. <!-- Visuals Section Starts -->
  7965. <section name="Visuals" sortindex="05">
  7966. <description>This section describes identifiers to configure the visuals.</description>
  7967. <identifiers>
  7968. <command name="resetgl">
  7969. <description>Resets the OpenGL rendering settings.</description>
  7970. </command>
  7971. <command name="screenres">
  7972. <description>Changes the screen resolution.</description>
  7973. <arguments>
  7974. <argument token="W" description="width"/>
  7975. <argument token="H" description="height"/>
  7976. </arguments>
  7977. <references>
  7978. <identifierReference identifier="desktopw"/>
  7979. <identifierReference identifier="desktoph"/>
  7980. <identifierReference identifier="getdisplayresolutions"/>
  7981. </references>
  7982. </command>
  7983. <variable name="desktopw">
  7984. <description>Returns a width of the desktop resolution (or zero, if not available).</description>
  7985. <references>
  7986. <identifierReference identifier="desktoph"/>
  7987. <identifierReference identifier="screenres"/>
  7988. </references>
  7989. </variable>
  7990. <variable name="desktoph">
  7991. <description>Returns a height of the desktop resolution (or zero, if not available).</description>
  7992. <references>
  7993. <identifierReference identifier="desktopw"/>
  7994. <identifierReference identifier="screenres"/>
  7995. </references>
  7996. </variable>
  7997. <command name="getdisplayresolutions">
  7998. <description>Returns a list of available screen resolutions.</description>
  7999. <references>
  8000. <identifierReference identifier="screenres"/>
  8001. </references>
  8002. </command>
  8003. <command name="glext">
  8004. <description>Checks for the searchstring in all loaded extensions.</description>
  8005. <arguments>
  8006. <argument token="E" description="extension"/>
  8007. </arguments>
  8008. <examples>
  8009. <example>
  8010. <code><![CDATA[if (glext shadow_funcs) [echo you have shadow functionality] [echo no shadows for you]]]></code>
  8011. </example>
  8012. </examples>
  8013. </command>
  8014. <command name="fpsrange">
  8015. <description>Sets the range of FPS (AC will adjust LOD to achieve it).</description>
  8016. <arguments>
  8017. <argument token="A" description="min" defaultValue="30"/>
  8018. <argument token="B" description="max" defaultValue="40"/>
  8019. </arguments>
  8020. <references>
  8021. <identifierReference identifier="maxfps"/>
  8022. </references>
  8023. </command>
  8024. <variable name="maxfps">
  8025. <description>Limits the FPS (frames per second) of AssaultCube's video output.</description>
  8026. <remarks>
  8027. <remark>Remark: limit to '200' is optimal.</remark>
  8028. </remarks>
  8029. <value token="V" description="maximum FPS" minValue="25 or 0" maxValue="1000" defaultValue="200" valueNotes="0 disables maxfps"/>
  8030. <references>
  8031. <identifierReference identifier="fpsrange"/>
  8032. </references>
  8033. </variable>
  8034. <variable name="skyclip">
  8035. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8036. </variable>
  8037. <variable name="shadowcasters">
  8038. </variable>
  8039. <variable name="shadowclip">
  8040. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8041. </variable>
  8042. <variable name="shadowtile">
  8043. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8044. </variable>
  8045. <variable name="ati_mda_bug">
  8046. <value token="V" description="" minValue="0" maxValue="1" defaultValue="0"/>
  8047. </variable>
  8048. <variable name="stencilbits">
  8049. <value token="V" description="" minValue="0" maxValue="32" defaultValue="0"/>
  8050. </variable>
  8051. <variable name="stencilshadow">
  8052. <description>Sets the transparency/opacity level of stencil shadows.</description>
  8053. <value token="V" description="Alpha level" minValue="0" maxValue="100" defaultValue="40"/>
  8054. </variable>
  8055. <variable name="depthoffset">
  8056. <value token="V" description="" defaultValue="0.005f"/>
  8057. </variable>
  8058. <variable name="polygonoffsetfactor">
  8059. <value token="V" description="" defaultValue="-3.0f"/>
  8060. </variable>
  8061. <variable name="polygonoffsetunits">
  8062. <value token="V" description="" defaultValue="-3.0f"/>
  8063. </variable>
  8064. <variable name="dynshadowdecay">
  8065. <value token="V" description="" minValue="0" maxValue="3000" defaultValue="1000"/>
  8066. </variable>
  8067. <variable name="dynshadowquad">
  8068. <value token="V" description="" minValue="0" maxValue="1" defaultValue="0"/>
  8069. </variable>
  8070. <variable name="tsswap">
  8071. <description>Swaps vertices of model triangles.</description>
  8072. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8073. </variable>
  8074. <command name="font">
  8075. <description>Loads a font texture to use as text within AssaultCube.</description>
  8076. <arguments>
  8077. <argument token="NAME" description="the font name"/>
  8078. <argument token="PATH" description="the path to the font texture"/>
  8079. <argument token="A" description="the default width"/>
  8080. <argument token="B" description="the default height"/>
  8081. <argument token="C" description="offset (co-ordinate X)"/>
  8082. <argument token="D" description="offset (co-ordinate Y)"/>
  8083. <argument token="E" description="offset (width)"/>
  8084. <argument token="F" description="offset (height)"/>
  8085. </arguments>
  8086. <references>
  8087. <identifierReference identifier="fontchar"/>
  8088. <identifierReference identifier="fontskip"/>
  8089. <identifierReference identifier="setfont"/>
  8090. <identifierReference identifier="menufont"/>
  8091. <identifierReference identifier="menuitemaltfont"/>
  8092. </references>
  8093. </command>
  8094. <command name="fontchar">
  8095. <description>Specifies a region of an image to be used as a font character.</description>
  8096. <arguments>
  8097. <argument token="A" description="X co-ordinates (from top-left corner)"/>
  8098. <argument token="B" description="Y co-ordinates (from top-left corner)"/>
  8099. <argument token="C" description="width"/>
  8100. <argument token="D" description="height"/>
  8101. </arguments>
  8102. <references>
  8103. <identifierReference identifier="font"/>
  8104. <identifierReference identifier="fontskip"/>
  8105. </references>
  8106. </command>
  8107. <command name="fontskip">
  8108. <description>Specifies, at what char the font definition proceeds.</description>
  8109. <remarks>
  8110. <remark>
  8111. For example "fontskip 48" means the ascii code of the first char in defined font will be "48", which is '0';
  8112. "fontskip 65" would start at 'A'.</remark>
  8113. </remarks>
  8114. <arguments>
  8115. <argument token="A" description="the ascii code of the first char"/>
  8116. </arguments>
  8117. <references>
  8118. <identifierReference identifier="font"/>
  8119. <identifierReference identifier="fontchar"/>
  8120. </references>
  8121. </command>
  8122. <command name="setfont">
  8123. <description>Changes the current font.</description>
  8124. <arguments>
  8125. <argument token="N" description="font name" valueNotes="default, mono, serif"/>
  8126. </arguments>
  8127. <references>
  8128. <identifierReference identifier="font"/>
  8129. <identifierReference identifier="curfont"/>
  8130. </references>
  8131. </command>
  8132. <command name="curfont">
  8133. <description>Returns a name of the current font.</description>
  8134. <value token="S" description="name of font" valueNotes="&lt;empty&gt;, default, mono, serif" defaultValue=""/>
  8135. <references>
  8136. <identifierReference identifier="font"/>
  8137. <identifierReference identifier="setfont"/>
  8138. </references>
  8139. </command>
  8140. <variable name="fov">
  8141. <description>Sets the field of view (fov).</description>
  8142. <value token="N" description="the FOV value" minValue="75" maxValue="120" defaultValue="90"/>
  8143. <references>
  8144. <identifierReference identifier="scopefov"/>
  8145. <identifierReference identifier="spectfov"/>
  8146. <identifierReference identifier="spectfovremote"/>
  8147. </references>
  8148. </variable>
  8149. <variable name="aboveheadiconsize">
  8150. <description>Sets the size for the icon shown above a player using comunications voices.</description>
  8151. <value token="V" description="Icon size" minValue="0" maxValue="1000" defaultValue="50"/>
  8152. </variable>
  8153. <variable name="aboveheadiconfadetime">
  8154. <description>Time in milliseconds before the abovehead icon dissapears.</description>
  8155. <value token="V" description="abovehead icon display time" minValue="1" maxValue="10000" defaultValue="2000"/>
  8156. </variable>
  8157. <variable name="bloodttl">
  8158. <description>Sets the amount of time in milliseconds that blood is displayed on the ground.</description>
  8159. <value token="V" description="Blood display time" minValue="0" maxValue="30000" defaultValue="10000"/>
  8160. </variable>
  8161. <variable name="blood">
  8162. <description>Turns on and off the display of blood.</description>
  8163. <value token="V" description="Enable/Disable blood" minValue="0" maxValue="1" defaultValue="1"/>
  8164. </variable>
  8165. <variable name="gib">
  8166. <description>Enables or disables the gib animation entirely.</description>
  8167. <value token="B" description="off OR on" minValue="0" maxValue="1" defaultValue="1" valueNotes="0 (false), 1 (true)"/>
  8168. <references>
  8169. <identifierReference identifier="gibnum"/>
  8170. <identifierReference identifier="gibspeed"/>
  8171. <identifierReference identifier="gibsgore"/>
  8172. <identifierReference identifier="gibttl"/>
  8173. <identifierReference identifier="popdeadplayers"/>
  8174. </references>
  8175. </variable>
  8176. <variable name="gibnum">
  8177. <description>Sets the number of gibs to display when performing a "messy" kill (grenade, knife, sniper headshot).</description>
  8178. <remarks>
  8179. <remark>Larger values are more spectacular, but can slow down less powerful machines. Reducing gibttl may help in this case.</remark>
  8180. </remarks>
  8181. <references>
  8182. <identifierReference identifier="gibttl"/>
  8183. <identifierReference identifier="gibspeed"/>
  8184. </references>
  8185. <value token="N" description="number of gibs" minValue="0" maxValue="1000" defaultValue="6"/>
  8186. </variable>
  8187. <variable name="gibttl">
  8188. <description>Sets the time for gibs to live (in milliseconds), after which they will disappear.</description>
  8189. <references>
  8190. <identifierReference identifier="gibnum"/>
  8191. <identifierReference identifier="gibspeed"/>
  8192. </references>
  8193. <value token="N" description="time to live" minValue="0" maxValue="60000" defaultValue="7000"/>
  8194. </variable>
  8195. <variable name="gibspeed">
  8196. <description>Sets the velocity at which gibs will fly from a victim.</description>
  8197. <references>
  8198. <identifierReference identifier="gibnum"/>
  8199. <identifierReference identifier="gibttl"/>
  8200. </references>
  8201. <value token="N" description="velocity" minValue="1" maxValue="100" defaultValue="30"/>
  8202. </variable>
  8203. <variable name="teamdisplaymode">
  8204. <description>Sets the team display mode.</description>
  8205. <remarks>
  8206. <remark>
  8207. In mode 0 team display is disabled
  8208. In mode 1 players will be rendered with a colored vest to make the teams distinguishable.
  8209. In mode 2 almost the whole suit of the players will be colored. These display modes are only
  8210. applied in team gameodes.
  8211. </remark>
  8212. </remarks>
  8213. <value token="N" description="the team display mode" minValue="0" maxValue="2" defaultValue="1" valueNotes="0 (none), 1 (color vests), 2 (color skins)"/>
  8214. </variable>
  8215. <variable name="aadynshadow">
  8216. <description>Sets the size/resolution of the dynamic shadow data.</description>
  8217. <value description="the size" minValue="0" maxValue="3" defaultValue="2"/>
  8218. </variable>
  8219. <variable name="dynshadowsize">
  8220. <description>Sets the display size of the dynamic shadows.</description>
  8221. <value description="the size" minValue="4" maxValue="8" defaultValue="5"/>
  8222. </variable>
  8223. <variable name="saveshadows">
  8224. <description>Sets if dynamic shadows should be saved to disk.</description>
  8225. <value description="auto save" minValue="0" maxValue="1" defaultValue="1"/>
  8226. </variable>
  8227. <variable name="dynshadow">
  8228. <description>Sets the alpha value (transparency) for dynamic shadows.</description>
  8229. <value description="the alpha value" minValue="0" maxValue="100" defaultValue="40"/>
  8230. </variable>
  8231. <variable name="bilinear">
  8232. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8233. </variable>
  8234. <variable name="scorchttl">
  8235. <value token="V" description="" minValue="0" maxValue="30000" defaultValue="10000"/>
  8236. </variable>
  8237. <variable name="scorch">
  8238. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8239. </variable>
  8240. <variable name="mtexplosion">
  8241. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8242. </variable>
  8243. <variable name="mtwater">
  8244. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8245. </variable>
  8246. <variable name="reflectclip">
  8247. <value token="V" description="" minValue="0" maxValue="100" defaultValue="1"/>
  8248. </variable>
  8249. <variable name="reflectsize">
  8250. <value token="V" description="" minValue="6" maxValue="10" defaultValue="8"/>
  8251. </variable>
  8252. <variable name="reflectscissor">
  8253. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8254. </variable>
  8255. <variable name="dynlight">
  8256. <description>Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.</description>
  8257. <value token="R" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
  8258. </variable>
  8259. <variable name="watersubdiv">
  8260. <description>Determines the subdivision of the water surface in maps.</description>
  8261. <remarks>
  8262. <remark>
  8263. Must be a power of 2: 4 is the default, 8 is recommended for people on slow machines,
  8264. 2 is nice for fast machines, and 1 is quite OTT. See "waterlevel" (edit reference)
  8265. on how to add water to your own levels.
  8266. </remark>
  8267. </remarks>
  8268. <value token="N" description="the subdivisioin value" minValue="1" maxValue="64" defaultValue="4"/>
  8269. <references>
  8270. <identifierReference identifier="waterlevel"/>
  8271. </references>
  8272. </variable>
  8273. <variable name="waterreflect">
  8274. <description>Turns on/off the reflections in the water surface.</description>
  8275. <value token="V" description="enable/disable water reflections" minValue="0" maxValue="1" defaultValue="1"/>
  8276. </variable>
  8277. <variable name="waterrefract">
  8278. <description>Turns on/off water refractions.</description>
  8279. <value token="V" description="enable/disable water refractions" minValue="0" maxValue="1" defaultValue="0"/>
  8280. </variable>
  8281. <variable name="waveheight">
  8282. <description>Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).</description>
  8283. <value token="F" description="wave height (floating-point value)" minValue="0" maxValue="1" defaultValue="0.3"/>
  8284. </variable>
  8285. <variable name="shotlinettl">
  8286. <value token="V" description="" minValue="0" maxValue="10000" defaultValue="75"/>
  8287. </variable>
  8288. <variable name="shotline">
  8289. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8290. </variable>
  8291. <variable name="fullscreen">
  8292. <description>Enables or disables fullscreen.</description>
  8293. <value description="fullscreen" minValue="0" maxValue="1" defaultValue="1"/>
  8294. <references>
  8295. <identifierReference identifier="fullscreentoggle"/>
  8296. <identifierReference identifier="fullscreendesktop"/>
  8297. </references>
  8298. </variable>
  8299. <command name="fullscreentoggle">
  8300. <description>Toggles fullscreen on or off.</description>
  8301. <references>
  8302. <identifierReference identifier="fullscreen"/>
  8303. </references>
  8304. </command>
  8305. <variable name="hwmaxaniso">
  8306. <description>Shows the maximum level of anisotropic filtering supported by the graphics hardware.</description>
  8307. <references>
  8308. <identifierReference identifier="aniso"/>
  8309. </references>
  8310. </variable>
  8311. <variable name="aniso">
  8312. <description>Sets the level of anisotropic filtering.</description>
  8313. <value token="V" description="anisotropic filtering" minValue="0" maxValue="16" defaultValue="0"/>
  8314. <references>
  8315. <identifierReference identifier="hwmaxaniso"/>
  8316. </references>
  8317. </variable>
  8318. <variable name="fsaa">
  8319. <description>Sets the level of full-scene antialiasing (FSAA).</description>
  8320. <value token="V" description="full-scene antialiasing" minValue="-1" maxValue="16" defaultValue="0"/>
  8321. <remarks>
  8322. <remark>-1 uses the default settings obtained from the system. 0 disables, 1..16 enables FSAA.</remark>
  8323. </remarks>
  8324. </variable>
  8325. <variable name="scr_w">
  8326. <description>Sets the screen width.</description>
  8327. <value token="W" description="the screen width" minValue="320" maxValue="10000" defaultValue="1024"/>
  8328. </variable>
  8329. <variable name="scr_h">
  8330. <description>Sets the screen height.</description>
  8331. <value token="H" description="the screen height" minValue="200" maxValue="10000" defaultValue="768"/>
  8332. </variable>
  8333. <variable name="screenw">
  8334. <description>Returns the actual width of the screen/window.</description>
  8335. <value token="W" description="the screen/window width" readOnly="true"/>
  8336. </variable>
  8337. <variable name="screenh">
  8338. <description>Returns the actual height of the screen/window.</description>
  8339. <value token="H" description="the screen/window height" readOnly="true"/>
  8340. </variable>
  8341. <variable name="fullscreendesktop">
  8342. <description>Enables using always desktop resolution in fullscreen mode.</description>
  8343. <value token="V" description="Use desktop resolution for fullscreen" minValue="0" maxValue="1" defaultValue="1"/>
  8344. <references>
  8345. <identifierReference identifier="fullscreen"/>
  8346. </references>
  8347. </variable>
  8348. <variable name="depthbits">
  8349. <description>Sets the bits for the depth buffer.</description>
  8350. <value description="depth pixels" minValue="0" maxValue="32" defaultValue="0"/>
  8351. </variable>
  8352. <variable name="vsync">
  8353. <description>Enables or disables vsync.</description>
  8354. <value token="V" description="vsync" minValue="-1" maxValue="1" defaultValue="-1"/>
  8355. <remarks>
  8356. <remark>-1 uses the default settings obtained from the system. 0 disables, 1 enables vsync.</remark>
  8357. </remarks>
  8358. </variable>
  8359. <variable name="gamma">
  8360. <description>Sets the temporary (to next map start) hardware gamma value.</description>
  8361. <remarks>
  8362. <remark>May not work if your card/driver doesn't support it.</remark>
  8363. </remarks>
  8364. <value token="N" description="the gamma value" minValue="30" maxValue="300" defaultValue="100"/>
  8365. </variable>
  8366. <scriptalias name="setgamma">
  8367. <description>Sets a persistent gamma value for a map.</description>
  8368. <arguments>
  8369. <argument token="G" description="the gamma value" valueNotes="30..300, default 100"/>
  8370. </arguments>
  8371. <references>
  8372. <identifierReference identifier="gamma"/>
  8373. </references>
  8374. </scriptalias>
  8375. <variable name="lighterror">
  8376. <description>Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels.</description>
  8377. <remarks>
  8378. <remark>If this variable is changed this during play, a "recalc" is needed to see the effect.</remark>
  8379. </remarks>
  8380. <references>
  8381. <identifierReference identifier="recalc"/>
  8382. </references>
  8383. <value token="E" description="the error value, 1 being the best quality" minValue="1" maxValue="100" defaultValue="4"/>
  8384. </variable>
  8385. <variable name="minlod">
  8386. <description>Minimal level of detail.</description>
  8387. <value token="V" description="" minValue="25" maxValue="250" defaultValue="60"/>
  8388. </variable>
  8389. <variable name="spectfov">
  8390. <description>Specifies the Field Of View when in spectating/ghost mode.</description>
  8391. <value token="V" description="Spectate FOV size" minValue="5" maxValue="120" defaultValue="110"/>
  8392. <references>
  8393. <identifierReference identifier="fov"/>
  8394. <identifierReference identifier="spectfovremote"/>
  8395. </references>
  8396. </variable>
  8397. <variable name="spectfovremote">
  8398. <description>Chooses between local or remote player's FOV when spectating.</description>
  8399. <value token="V" description="0: uses 'spectfov' and the local 'scopefov', 1: uses 'fov' and 'scopefov' of the spectated player" minValue="0" maxValue="1" defaultValue="0"/>
  8400. <references>
  8401. <identifierReference identifier="fov"/>
  8402. <identifierReference identifier="spectfov"/>
  8403. <identifierReference identifier="scopefov"/>
  8404. </references>
  8405. </variable>
  8406. <variable name="hwtexsize">
  8407. <description>Shows the maximum texture size (in pixels) supported by the graphics hardware.</description>
  8408. <references>
  8409. <identifierReference identifier="maxtexsize"/>
  8410. </references>
  8411. </variable>
  8412. <variable name="maxtexsize">
  8413. <description>The maximum texture size that will be used by the engine, larger textures will be scaled down.</description>
  8414. <value token="V" description="maximum texture size" minValue="0" maxValue="4096" defaultValue="0"/>
  8415. <references>
  8416. <identifierReference identifier="hwtexsize"/>
  8417. </references>
  8418. <remarks>
  8419. <remark>If this value is zero, hwtexsize will be used.</remark>
  8420. </remarks>
  8421. </variable>
  8422. <variable name="maxtmus">
  8423. <description>Gets the maximum number of supported textures when performing multitexturing.</description>
  8424. </variable>
  8425. <variable name="trilinear">
  8426. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8427. </variable>
  8428. <variable name="texreduce">
  8429. <description>Reduces the size of all texture by the selected factor:</description>
  8430. <description>-1: 2x2 : 0 : 1: x0.5 : 2: x0.25 : 3: x0.125</description>
  8431. <description>Note: -1 is a special mode which reduces all textures to flat coloured surfaces.</description>
  8432. <value token="S" description="scale selection" minValue="-1" maxValue="3" defaultValue="0"/>
  8433. </variable>
  8434. <variable name="hirestextures">
  8435. <description>Controls whether textures with a scale higher than 1.0 will be scaled down while loading (0) or not (1).</description>
  8436. <value token="S" description="scale down?" minValue="0" maxValue="1" defaultValue="1"/>
  8437. <references>
  8438. <identifierReference identifier="texture"/>
  8439. </references>
  8440. </variable>
  8441. <variable name="bulletholettl">
  8442. <description>Specifies how long (in milliseconds) to display bullet holes.</description>
  8443. <value token="V" description="Bullethole display time" minValue="0" maxValue="30000" defaultValue="10000"/>
  8444. </variable>
  8445. <variable name="bullethole">
  8446. <description>Turns on/off the display of bullet holes.</description>
  8447. <value token="V" description="Enable/Disable bullet holes" minValue="0" maxValue="1" defaultValue="1"/>
  8448. </variable>
  8449. <variable name="particlesize">
  8450. <description>Scales all particles.</description>
  8451. <value token="P" description="the scale percentage" minValue="20" maxValue="500" defaultValue="100"/>
  8452. </variable>
  8453. <variable name="maxtrail">
  8454. <description>Maximum number of smoke particles along shotline of sniper rifle.</description>
  8455. <value token="N" description="maximum number of smoke particles" minValue="1" maxValue="10000" defaultValue="500"/>
  8456. </variable>
  8457. <variable name="animationinterpolationtime">
  8458. <description>Sets the time available for interpolation between model animations.</description>
  8459. <value token="N" description="the amount of milliseconds for the interpolation" minValue="0" maxValue="1000" defaultValue="100"/>
  8460. </variable>
  8461. <variable name="mergestrips">
  8462. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8463. </variable>
  8464. <variable name="gibsgore">
  8465. <value token="N" description="" minValue="0" maxValue="4" defaultValue="1" values=""/>
  8466. <description>Adjusts gib/gibnum/gibspeed/gibttl variables collectively.</description>
  8467. <arguments>
  8468. <argument valueNotes="0 - Off"/>
  8469. <argument valueNotes="1 - Default/Normal values"/>
  8470. <argument valueNotes="2 - Good"/>
  8471. <argument valueNotes="3 - Messy"/>
  8472. <argument valueNotes="4 - Unrealistic"/>
  8473. </arguments>
  8474. </variable>
  8475. <variable name="popdeadplayers">
  8476. <description>Makes dead players instantly pop out of existence, instead of falling over and sinking into the ground.</description>
  8477. <value token="B" description="BOOL" minValue="0" maxValue="1" defaultValue="0"/>
  8478. <references>
  8479. <identifierReference identifier="gib"/>
  8480. </references>
  8481. </variable>
  8482. <variable name="maxroll">
  8483. <description>Sets the maximum value the display will roll on strafing.</description>
  8484. <value token="N" description="the roll value" minValue="0" maxValue="20" defaultValue="0"/>
  8485. <references>
  8486. <identifierReference identifier="maxrolleffect"/>
  8487. <identifierReference identifier="maxrollremote"/>
  8488. </references>
  8489. </variable>
  8490. <variable name="maxrolleffect">
  8491. <description>Sets the maximum value the display will roll when you get damages.</description>
  8492. <value token="N" description="the roll value" minValue="0" maxValue="30" defaultValue="10"/>
  8493. <references>
  8494. <identifierReference identifier="maxrolleffect"/>
  8495. <identifierReference identifier="maxrollremote"/>
  8496. </references>
  8497. </variable>
  8498. <variable name="maxrollremote">
  8499. <description>Limits the maximum value the display will roll on strafing or if player gets damages, when spectating other players.</description>
  8500. <value token="N" description="The roll value" minValue="0" maxValue="50" defaultValue="10"/>
  8501. <references>
  8502. <identifierReference identifier="maxroll"/>
  8503. <identifierReference identifier="maxrolleffect"/>
  8504. </references>
  8505. </variable>
  8506. <variable name="swaymovediv">
  8507. <value token="V" description="" minValue="1" maxValue="1000" defaultValue="200"/>
  8508. </variable>
  8509. <variable name="swayspeeddiv">
  8510. <value token="V" description="" minValue="1" maxValue="1000" defaultValue="105"/>
  8511. </variable>
  8512. <variable name="swayupmovediv">
  8513. <value token="V" description="" minValue="1" maxValue="1000" defaultValue="200"/>
  8514. </variable>
  8515. <variable name="swayupspeeddiv">
  8516. <value token="V" description="" minValue="1" maxValue="1000" defaultValue="105"/>
  8517. </variable>
  8518. <variable name="nosway">
  8519. <value token="V" description="" minValue="0" maxValue="1" defaultValue="0"/>
  8520. </variable>
  8521. <variable name="righthanded">
  8522. <description>Chooses whether the players hand carrying the weapon appears as right or left handed.</description>
  8523. <value token="N" description="0: lefty, 1: righty" minValue="0" maxValue="1" defaultValue="1"/>
  8524. </variable>
  8525. <variable name="allowblinkingtext">
  8526. <description>For toggling on the ability for any text to have the blinking bit set.</description>
  8527. <value token="T" description="0 = Off, 1 = On" minValue="0" maxValue="1" defaultValue="0"/>
  8528. <references>
  8529. <identifierReference identifier="menucanblink"/>
  8530. </references>
  8531. </variable>
  8532. <variable name="mdldlist">
  8533. <value token="N" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8534. </variable>
  8535. <variable name="mdldyncache">
  8536. <value token="V" description="" minValue="1" maxValue="32" defaultValue="2"/>
  8537. </variable>
  8538. <variable name="mdlstatcache">
  8539. <value token="V" description="" minValue="1" maxValue="32" defaultValue="1"/>
  8540. </variable>
  8541. <command name="skin">
  8542. <description>Determines the skin of the current player.</description>
  8543. <remarks>
  8544. <remark>See the player model folder for the according skin-id.</remark>
  8545. </remarks>
  8546. <arguments>
  8547. <argument token="N" description="skin id" valueNotes="value"/>
  8548. </arguments>
  8549. </command>
  8550. <command name="skin_cla">
  8551. <description>Chooses skin when playing for team CLA.</description>
  8552. <arguments>
  8553. <argument token="N" description="skin id"/>
  8554. </arguments>
  8555. </command>
  8556. <command name="skin_rvsf">
  8557. <description>Chooses skin when playing for team RVSF.</description>
  8558. <arguments>
  8559. <argument token="N" description="skin id"/>
  8560. </arguments>
  8561. </command>
  8562. <variable name="hidecustomskins">
  8563. <value token="B" description="" minValue="0" maxValue="1" defaultValue="0"/>
  8564. </variable>
  8565. <variable name="smoothdist">
  8566. <description>Determines the valid distance when extrapolating a players position.</description>
  8567. <value token="V" description="distance" minValue="0" maxValue="16" defaultValue="8"/>
  8568. </variable>
  8569. <variable name="smoothmove">
  8570. <description>Determines the speed when extrapolating a players position.</description>
  8571. <value token="V" description="movement speed" minValue="0" maxValue="100" defaultValue="75"/>
  8572. </variable>
  8573. <command name="getigraph">
  8574. <description>Returns an encoded string to display an inlined image outside the console.</description>
  8575. <remarks>
  8576. <remark>
  8577. Images are stored in packages/misc/igraph/*.png and loaded during game start.
  8578. Filenames consist of the image shorthand (mnemonic) and optional frame times, separated by "_".
  8579. Media file names may only contain letters, digits and "_-.()".
  8580. </remark>
  8581. <remark>
  8582. All texts displayed in the game console are scanned for mnemonics prefixed with ":".
  8583. All found matches are replaced by the image.
  8584. </remark>
  8585. <remark>
  8586. The images are displayed as squares with width and height the same as the regular font height.
  8587. To create animations, put several square images side by side into the file. For example, a 128x32 image is
  8588. interpreted as four frames. Frame duration is encoded in the filename, so, for example the file
  8589. "nop_1000_200_100.png" shows the first frame for 1000 milliseconds, the second frame for 200 msec and the third
  8590. (as the rest) for 100 msec.
  8591. </remark>
  8592. <remark>
  8593. Igraphs "1" to "9" are hardcoded and can be manually encoded in menu texts.
  8594. Use the new escape code "\i" plus the number of the image: "\i\1".."\i\9".
  8595. Other images can be used in menus as well, but the codes have to be fetched by "getigraph".
  8596. </remark>
  8597. <remark>If the mnemonic was not found, then "getigraph" returns an empty string.</remark>
  8598. </remarks>
  8599. <arguments>
  8600. <argument token="M" description="mnemonic"/>
  8601. </arguments>
  8602. <references>
  8603. <identifierReference identifier="updateigraphs"/>
  8604. <identifierReference identifier="igraphsize"/>
  8605. <identifierReference identifier="igraphsizehardcoded"/>
  8606. <identifierReference identifier="igraphanimate"/>
  8607. <identifierReference identifier="igraphdefaultframetime"/>
  8608. <identifierReference identifier="hideigraphs"/>
  8609. </references>
  8610. </command>
  8611. <command name="updateigraphs">
  8612. <description>Checks for new files in packages/misc/igraph/ folder.</description>
  8613. <remarks>
  8614. <remark>Only necessary, if new files are added during the game - for example, by mod package download.</remark>
  8615. </remarks>
  8616. <references>
  8617. <identifierReference identifier="getigraph"/>
  8618. </references>
  8619. </command>
  8620. <variable name="igraphsize">
  8621. <description>Scales inlined images (in percent).</description>
  8622. <value token="N" description="size of images (in percent)" minValue="80" maxValue="300" defaultValue="120"/>
  8623. <references>
  8624. <identifierReference identifier="getigraph"/>
  8625. <identifierReference identifier="igraphsizehardcoded"/>
  8626. </references>
  8627. </variable>
  8628. <variable name="igraphsizehardcoded">
  8629. <description>Scales the hardcoded inlined images: "1".."9" (in percent).</description>
  8630. <value token="N" description="size of images (in percent)" minValue="80" maxValue="160" defaultValue="106"/>
  8631. <references>
  8632. <identifierReference identifier="getigraph"/>
  8633. <identifierReference identifier="igraphsize"/>
  8634. </references>
  8635. </variable>
  8636. <variable name="igraphanimate">
  8637. <description>Enables animation of inlined images with multiple frames.</description>
  8638. <value token="N" description="0: display only first frame, 1: enable animation" minValue="0" maxValue="1" defaultValue="1"/>
  8639. <references>
  8640. <identifierReference identifier="getigraph"/>
  8641. <identifierReference identifier="igraphdefaultframetime"/>
  8642. <identifierReference identifier="igraphsize"/>
  8643. </references>
  8644. </variable>
  8645. <variable name="igraphdefaultframetime">
  8646. <description>Default frame time for inlined images with multiple frames.</description>
  8647. <remarks>
  8648. <remark>Used for images with no frame duration specified in the filename.</remark>
  8649. </remarks>
  8650. <value token="N" description="frame time for images" minValue="5" maxValue="2000" defaultValue="200"/>
  8651. <references>
  8652. <identifierReference identifier="getigraph"/>
  8653. <identifierReference identifier="igraphanimate"/>
  8654. <identifierReference identifier="igraphsize"/>
  8655. </references>
  8656. </variable>
  8657. <variable name="hideigraphs">
  8658. <description>Hides inlined images in the console.</description>
  8659. <value token="N" description="0: show, 1: hide" minValue="0" maxValue="1" defaultValue="0"/>
  8660. <references>
  8661. <identifierReference identifier="getigraph"/>
  8662. </references>
  8663. </variable>
  8664. <variable name="mapoverride_nowaterreflect">
  8665. <description>Per-map override to disable water reflection on the client.</description>
  8666. <value token="B" description="boolean" valueMin="0" valueMax="1" valueNotes="1:ignore" defaultValue="0"/>
  8667. <remarks>
  8668. <remark>Set by the mapper, for his map only. The overrides are stored in the map header.</remark>
  8669. <remark>
  8670. If "1", water reflection is disabled. Useful, when odd water colours are used to emulate other liquids
  8671. that are not supposed to be that reflective.
  8672. </remark>
  8673. </remarks>
  8674. <references>
  8675. <identifierReference identifier="mapoverride_limitwaveheight"/>
  8676. <identifierReference identifier="mapoverride_nostencilshadows"/>
  8677. <identifierReference identifier="ignoreoverride_nowaterreflect"/>
  8678. </references>
  8679. </variable>
  8680. <variable name="mapoverride_limitwaveheight">
  8681. <description>Per-map override to limit waveheight on the client.</description>
  8682. <value token="B" description="boolean" valueMin="0" valueMax="1" valueNotes="1:ignore" defaultValue="0"/>
  8683. <remarks>
  8684. <remark>Set by the mapper, for his map only. The overrides are stored in the map header.</remark>
  8685. <remark>
  8686. If "1", waveheight is capped at 0.1 max. Useful for small water areas (like puddles),
  8687. where higher waves would look weird.
  8688. </remark>
  8689. </remarks>
  8690. <references>
  8691. <identifierReference identifier="mapoverride_nowaterreflect"/>
  8692. <identifierReference identifier="mapoverride_nostencilshadows"/>
  8693. <identifierReference identifier="ignoreoverride_limitwaveheight"/>
  8694. </references>
  8695. </variable>
  8696. <variable name="mapoverride_nostencilshadows">
  8697. <description>Per-map override to disable stencil shadows on the client.</description>
  8698. <value token="B" description="boolean" valueMin="0" valueMax="1" valueNotes="1:ignore" defaultValue="0"/>
  8699. <remarks>
  8700. <remark>Set by the mapper, for his map only. The overrides are stored in the map header.</remark>
  8701. <remark>
  8702. If "1", stencil shadows are disabled. On clients, where stencil shadows are otherwise enabled,
  8703. blob shadows are used instead. If shadows are disabled anyway, they stay disabled.
  8704. Useful for dim maps, where hard shadows make no sense.
  8705. </remark>
  8706. </remarks>
  8707. <references>
  8708. <identifierReference identifier="mapoverride_nowaterreflect"/>
  8709. <identifierReference identifier="mapoverride_limitwaveheight"/>
  8710. <identifierReference identifier="ignoreoverride_nostencilshadows"/>
  8711. </references>
  8712. </variable>
  8713. <variable name="ignoreoverride_nowaterreflect">
  8714. <description>Ignores per-map overrides to disable water reflection on the client.</description>
  8715. <value token="B" description="boolean" valueMin="0" valueMax="1" valueNotes="1:ignore" defaultValue="0"/>
  8716. <remarks>
  8717. <remark>
  8718. Ignores the overrides set by the mappers (for their maps only).
  8719. If "1", mapoverride_nowaterreflect is ignored and regular client settings are used.
  8720. </remark>
  8721. </remarks>
  8722. <references>
  8723. <identifierReference identifier="mapoverride_nowaterreflect"/>
  8724. <identifierReference identifier="ignoreoverride_limitwaveheight"/>
  8725. <identifierReference identifier="ignoreoverride_nostencilshadows"/>
  8726. </references>
  8727. </variable>
  8728. <variable name="ignoreoverride_limitwaveheight">
  8729. <description>Ignores per-map overrides to limit waveheight on the client.</description>
  8730. <value token="B" description="boolean" valueMin="0" valueMax="1" valueNotes="1:ignore" defaultValue="0"/>
  8731. <remarks>
  8732. <remark>
  8733. Ignores the overrides set by the mappers (for their maps only).
  8734. If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is used unchanged.
  8735. </remark>
  8736. </remarks>
  8737. <references>
  8738. <identifierReference identifier="mapoverride_limitwaveheight"/>
  8739. <identifierReference identifier="ignoreoverride_nowaterreflect"/>
  8740. <identifierReference identifier="ignoreoverride_nostencilshadows"/>
  8741. </references>
  8742. </variable>
  8743. <variable name="ignoreoverride_nostencilshadows">
  8744. <description>Ignores per-map overrides to disable stencil shadows on the client.</description>
  8745. <value token="B" description="boolean" valueMin="0" valueMax="1" valueNotes="1:ignore" defaultValue="0"/>
  8746. <remarks>
  8747. <remark>
  8748. Ignores the overrides set by the mappers (for their maps only).
  8749. If "1", mapoverride_nostencilshadows is ignored.
  8750. </remark>
  8751. </remarks>
  8752. <references>
  8753. <identifierReference identifier="mapoverride_nostencilshadows"/>
  8754. <identifierReference identifier="ignoreoverride_nowaterreflect"/>
  8755. <identifierReference identifier="ignoreoverride_limitwaveheight"/>
  8756. </references>
  8757. </variable>
  8758. <variable name="lightscale">
  8759. <description>Scaling factor for all light in the game.</description>
  8760. <value token="D" description="divisor" minValue="1" maxValue="100" valueNotes="values will be divided by this" defaultValue="4"/>
  8761. <remarks>
  8762. <remark>Any change will not take effect until a new world is loaded.</remark>
  8763. </remarks>
  8764. </variable>
  8765. </identifiers>
  8766. </section>
  8767. <!-- Visuals Section Ends -->
  8768. <!-- Sound Section Starts -->
  8769. <section name="Sound" sortindex="07">
  8770. <description>This section describes all identifiers related to music and sound effects.</description>
  8771. <identifiers>
  8772. <variable name="soundscheddistancescore">
  8773. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="5"/>
  8774. </variable>
  8775. <variable name="soundschedoldbonus">
  8776. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="100"/>
  8777. </variable>
  8778. <variable name="soundschedpriorityscore">
  8779. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="100"/>
  8780. </variable>
  8781. <variable name="soundschedreserve">
  8782. <value token="V" description="" minValue="0" maxValue="100" defaultValue="2"/>
  8783. </variable>
  8784. <variable name="al_referencedistance">
  8785. <description>The distance from the source emitting the sound to the listener.</description>
  8786. <value token="V" description="" minValue="0" maxValue="1000000" defaultValue="400"/>
  8787. </variable>
  8788. <variable name="al_rollofffactor">
  8789. <description>This value indicates the relative "strength" of a sound (how far away the sound can be heard).</description>
  8790. <value token="V" description="" minValue="0" maxValue="1000000" defaultValue="100"/>
  8791. </variable>
  8792. <command name="sound">
  8793. <description>Plays the specified sound.</description>
  8794. <remarks>
  8795. <remark>
  8796. See source/src/server.h file or use "enumsounds" command for default sounds, and use "registersound" to register your own.
  8797. For example, 'sound 0' and 'sound (registersound "player/jump")' both play the standard jump sound.
  8798. </remark>
  8799. </remarks>
  8800. <arguments>
  8801. <argument token="N" description="number of the sound to play" valueNotes="integer"/>
  8802. </arguments>
  8803. <references>
  8804. <identifierReference identifier="enumsounds"/>
  8805. <identifierReference identifier="registersound"/>
  8806. </references>
  8807. </command>
  8808. <command name="soundtest">
  8809. <description>Plays all hardcoded sounds in order.</description>
  8810. </command>
  8811. <command name="mutesound">
  8812. <description>Mutes a specific game sound.</description>
  8813. <arguments>
  8814. <argument token="N" description="ID of the sound to mute" valueNotes="see 'enumsounds', starting at ID 0"/>
  8815. <argument token="A" description="audible?" valueNotes="(mute) 0 or 1 (unmute)"/>
  8816. </arguments>
  8817. <references>
  8818. <identifierReference identifier="soundmuted"/>
  8819. <identifierReference identifier="unmuteallsounds"/>
  8820. <identifierReference identifier="enumsounds"/>
  8821. </references>
  8822. </command>
  8823. <command name="soundmuted">
  8824. <description>Returns 1 if sound N is muted, else 0.</description>
  8825. <examples>
  8826. <example>
  8827. <code><![CDATA[mutesound 5; if (soundmuted 5) [echo Sound 5 is muted!] [echo Sound 5 is not muted!]]]></code>
  8828. <explanation>Output: Sound 5 is muted!</explanation>
  8829. </example>
  8830. </examples>
  8831. <arguments>
  8832. <argument token="N" description="sound ID" valueNotes="see 'enumsounds' for valid sound ID"/>
  8833. </arguments>
  8834. <references>
  8835. <identifierReference identifier="mutesound"/>
  8836. <identifierReference identifier="unmuteallsounds"/>
  8837. <identifierReference identifier="enumsounds"/>
  8838. </references>
  8839. </command>
  8840. <command name="unmuteallsounds">
  8841. <description>Unmutes all previously muted sounds.</description>
  8842. <references>
  8843. <identifierReference identifier="mutesound"/>
  8844. </references>
  8845. </command>
  8846. <variable name="mapsoundrefresh">
  8847. <description>Specifies the interval for checking mapsounds.</description>
  8848. <remarks>
  8849. <remark>If set to value 0, the map sounds will be checked in every frame without any interval limitation.</remark>
  8850. </remarks>
  8851. <references>
  8852. <identifierReference identifier="mapsound"/>
  8853. <identifierReference identifier="newent sound"/>
  8854. </references>
  8855. <value token="N" description="interval in milliseconds" minValue="0" maxValue="1000" defaultValue="10"/>
  8856. </variable>
  8857. <variable name="audiodebug">
  8858. <description>Enables verbose output for debugging purposes.</description>
  8859. <value token="B" description="enable audio debug" minValue="0" maxValue="1" defaultValue="0"/>
  8860. </variable>
  8861. <variable name="gainscale">
  8862. <description>Each subsequent played sound's gain-value is scaled by this percentage.</description>
  8863. <remarks>
  8864. <remark>
  8865. This lowers the gain of the sounds before they are mixed, this might be useful in cases when the mixer has problems with too high gain values.
  8866. </remark>
  8867. </remarks>
  8868. <value token="N" description="percentage" minValue="0" maxValue="100" defaultValue="100"/>
  8869. </variable>
  8870. <variable name="musicvol">
  8871. <description>Sets the music volume.</description>
  8872. <references>
  8873. <identifierReference identifier="soundvol"/>
  8874. </references>
  8875. <value token="N" description="the volume" minValue="0" maxValue="255" defaultValue="128"/>
  8876. </variable>
  8877. <command name="music">
  8878. <description>Plays music in the background.</description>
  8879. <arguments>
  8880. <argument token="A" description="music file name"/>
  8881. <argument token="B" description="playtime"/>
  8882. <argument token="C" description="command to be executed, when music is done"/>
  8883. </arguments>
  8884. </command>
  8885. <command name="musicpreload">
  8886. <description>Preloads the sound track.</description>
  8887. <remarks>
  8888. <remark>Can be helpful if you experience a delay, e.g. when picking up a flag.</remark>
  8889. </remarks>
  8890. <arguments>
  8891. <argument token="N" description="soundtrack number" valueNotes="0 (flag grab), 1 (last minute #1), 2 (last minute #2)"/>
  8892. </arguments>
  8893. </command>
  8894. <command name="registermusic">
  8895. <description>Registers a track as music.</description>
  8896. <arguments>
  8897. <argument token="M" description="music file"/>
  8898. </arguments>
  8899. <remarks>
  8900. <remark>The first three tracks have special meaning: Track #1 is for "flag grab" the second and third are used as "last minute" tracks.</remark>
  8901. </remarks>
  8902. </command>
  8903. <command name="registersound">
  8904. <description>Registers a sound.</description>
  8905. <remarks>
  8906. <remark>
  8907. This command returns the sound number, which is assigned from 0 onwards,
  8908. and which can be used with "sound" command. If the sound was already registered,
  8909. its existing index is returned. "registersound" does not actually load the sound, this is done on first play.
  8910. </remark>
  8911. </remarks>
  8912. <examples>
  8913. <example>
  8914. <code><![CDATA[registersound "player/jump" 80]]></code>
  8915. <explanation>It registers packages/audio/player/jump.ogg sound with volume 80</explanation>
  8916. </example>
  8917. </examples>
  8918. <arguments>
  8919. <argument token="N" description="sound name" valueNotes="path below packages/audio/, without file extension"/>
  8920. <argument token="V" description="volume" optional="true" valueNotes="0..255"/>
  8921. <argument token="L" description="loop" optional="true" valueNotes="0 (off), 1 (on)"/>
  8922. <argument token="R" description="audible radius" optional="true" valueNotes=""/>
  8923. </arguments>
  8924. <references>
  8925. <identifierReference identifier="sound"/>
  8926. </references>
  8927. </command>
  8928. <command name="enumsounds">
  8929. <description>Lists sound index numbers and short descriptions for all sounds of one or more categories.</description>
  8930. <remarks>
  8931. <remark>
  8932. All sounds with at least one of the flags will be listed. Flag names prefixed with "!" will exclude all matching
  8933. sound from the list. If no such entities exist or the entity type could not be recognised, the list is empty.
  8934. </remark>
  8935. </remarks>
  8936. <examples>
  8937. <example>
  8938. <code><![CDATA[echo (enumsounds "VOICECOM !PUBLIC")]]></code>
  8939. <explanation>It will list all voicecom sounds that are for teams only</explanation>
  8940. </example>
  8941. <example>
  8942. <code><![CDATA[echo (enumsounds (listoptions soundcategories))]]></code>
  8943. <explanation>It will list all sounds</explanation>
  8944. </example>
  8945. </examples>
  8946. <arguments>
  8947. <argument token="C" description="list of sound categories (flags)" valueNotes="PAIN, OWNPAIN, WEAPON, PICKUP, MOVEMENT, BULLET, OTHER, VOICECOM, TEAM, PUBLIC, FFA, FLAGONLY"/>
  8948. </arguments>
  8949. <references>
  8950. <identifierReference identifier="sound"/>
  8951. <identifierReference identifier="registersound"/>
  8952. </references>
  8953. </command>
  8954. <variable name="audio">
  8955. <description>Enables or disables the audio subsystem in AC.</description>
  8956. <value token="B" description="enable" minValue="0" maxValue="1" defaultValue="1"/>
  8957. </variable>
  8958. <variable name="soundchannels">
  8959. <description>Sets the desired amount of allocated sound channels.</description>
  8960. <remarks>
  8961. <remark>AC will try to allocate that number of channels but it is not guaranteed to succeed.</remark>
  8962. </remarks>
  8963. <value description="number of channels" minValue="4" maxValue="1024" defaultValue="128"/>
  8964. </variable>
  8965. <variable name="footsteps">
  8966. <description>Indicates if the footsteps sound should be played.</description>
  8967. <value token="B" description="enable footsteps" minValue="0" maxValue="1" defaultValue="1" valueNotes="1 (true), 0 (false)"/>
  8968. <references>
  8969. <identifierReference identifier="localfootsteps"/>
  8970. </references>
  8971. </variable>
  8972. <variable name="localfootsteps">
  8973. <description>Indicates if the footsteps sound for the local player should be played.</description>
  8974. <value token="B" description="enable footsteps" minValue="0" maxValue="1" defaultValue="1" valueNotes="1 (true), 0 (false)"/>
  8975. <references>
  8976. <identifierReference identifier="footsteps"/>
  8977. </references>
  8978. </variable>
  8979. <variable name="hitsound">
  8980. <description>Plays a sound upon every successful hit if enabled.</description>
  8981. <remarks>
  8982. <remark>
  8983. If hitsound is set to 2, the sound will be played instantly rather than after server acknowledgment.
  8984. </remark>
  8985. </remarks>
  8986. <value token="B" description="off OR on" minValue="0" maxValue="2" defaultValue="0" valueNotes="0 (disabled), 1 (server), 2 (local)"/>
  8987. </variable>
  8988. <variable name="bulletairsounddestrad">
  8989. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="8"/>
  8990. </variable>
  8991. <variable name="bulletairsoundrad">
  8992. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="15"/>
  8993. </variable>
  8994. <variable name="bulletairsoundsourcerad">
  8995. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="8"/>
  8996. </variable>
  8997. <variable name="bulletairsound">
  8998. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  8999. </variable>
  9000. <variable name="bulletbouncesoundrad">
  9001. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="15"/>
  9002. </variable>
  9003. <variable name="bulletbouncesound">
  9004. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  9005. </variable>
  9006. <variable name="maxsoundsatonce">
  9007. <value token="V" description="" minValue="0" maxValue="100" defaultValue="32"/>
  9008. </variable>
  9009. <variable name="soundvol">
  9010. <description>Sets the sound volume for all sounds.</description>
  9011. <value token="N" description="the volume" minValue="0" maxValue="255" defaultValue="128"/>
  9012. </variable>
  9013. <variable name="heartbeat">
  9014. <description>Defines the health level at or below which a heartbeat sound will be played.</description>
  9015. <remark>A value of 0 (which is the default) disables this feature.</remark>
  9016. <value token="H" description="health value" minValue="0" maxValue="99" defaultValue="0"/>
  9017. </variable>
  9018. </identifiers>
  9019. </section>
  9020. <!-- Sound Section Ends -->
  9021. <!-- Ingame reference Section Starts -->
  9022. <section name="Ingame reference" sortindex="14">
  9023. <description>This section describes all identifiers related to the ingame documentation reference.</description>
  9024. <identifiers>
  9025. <command name="docsection">
  9026. <description>Adds a new section to the ingame documentation.</description>
  9027. <references>
  9028. <identifierReference identifier="docident"/>
  9029. </references>
  9030. <arguments>
  9031. <argument token="S" description="the section name"/>
  9032. </arguments>
  9033. </command>
  9034. <command name="docident">
  9035. <description>Adds a new identifier documentation to the last added section.</description>
  9036. <remarks>
  9037. <remark>An identifier represents a command or variable.</remark>
  9038. <remark>
  9039. The name may contain spaces to create a "multipart" identifier documentation
  9040. that can be used to describe a complex argument as a single pseudo identifier,
  9041. look at the examples.
  9042. </remark>
  9043. </remarks>
  9044. <examples>
  9045. <example>
  9046. <code><![CDATA[docident fov "Sets the field of view."]]></code>
  9047. </example>
  9048. <example>
  9049. <code><![CDATA[docident "newent light" "Adds a new light entity."]]></code>
  9050. </example>
  9051. </examples>
  9052. <references>
  9053. <identifierReference identifier="docsection"/>
  9054. <identifierReference identifier="docargument"/>
  9055. <identifierReference identifier="docremark"/>
  9056. <identifierReference identifier="docref"/>
  9057. <identifierReference identifier="docundone"/>
  9058. <identifierReference identifier="docinvalid"/>
  9059. <identifierReference identifier="docfind"/>
  9060. <identifierReference identifier="docwritebaseref"/>
  9061. <identifierReference identifier="docvisible"/>
  9062. <identifierReference identifier="docidentverbose"/>
  9063. </references>
  9064. <arguments>
  9065. <argument token="N" description="name of the identifier"/>
  9066. <argument token="D" description="the description"/>
  9067. </arguments>
  9068. </command>
  9069. <command name="docargument">
  9070. <description>Adds a new argument documentation to the last added identifier.</description>
  9071. <remarks>
  9072. <remark>An argument represents either a command argument or a variable value.</remark>
  9073. <remark>
  9074. The last argument of an identifier can be flagged as variable-length
  9075. to indicate that it represents an unknown number of arguments.
  9076. </remark>
  9077. </remarks>
  9078. <references>
  9079. <identifierReference identifier="docident"/>
  9080. </references>
  9081. <arguments>
  9082. <argument token="T" description="the token"/>
  9083. <argument token="D" description="the description"/>
  9084. <argument token="V" description="the value notes"/>
  9085. <argument token="I" description="flags this argument as variable-length" valueNotes="1 (true), 0 (false)" optional="true"/>
  9086. </arguments>
  9087. </command>
  9088. <command name="docremark">
  9089. <description>Adds a new documentation remark to the last added identifier.</description>
  9090. <references>
  9091. <identifierReference identifier="docident"/>
  9092. </references>
  9093. <arguments>
  9094. <argument token="S" description="the remark"/>
  9095. </arguments>
  9096. </command>
  9097. <command name="docexample">
  9098. <description>Adds an example to the last added identifier.</description>
  9099. <arguments>
  9100. <argument token="C" description="the example code"/>
  9101. <argument token="E" description="the explanation" optional="true"/>
  9102. </arguments>
  9103. </command>
  9104. <command name="docref">
  9105. <description>Adds a new documentation reference to an identifier.</description>
  9106. <remarks>
  9107. <remark>The new reference is added to the last added identifier documentation.</remark>
  9108. </remarks>
  9109. <references>
  9110. <identifierReference identifier="docident"/>
  9111. </references>
  9112. <arguments>
  9113. <argument token="N" description="the display name"/>
  9114. <argument token="I" description="the identifier to refer to" optional="true"/>
  9115. <argument token="U" description="the URL to refer to" optional="true"/>
  9116. </arguments>
  9117. </command>
  9118. <variable name="docrefvisible">
  9119. <description>Render documentation references (docrefs) of the identifiers.</description>
  9120. <value token="V" description="0: hide, 1: render" minValue="0" maxValue="1" defaultValue="1"/>
  9121. <references>
  9122. <identifierReference identifier="docref"/>
  9123. <identifierReference identifier="docvisible"/>
  9124. <identifierReference identifier="docidentverbose"/>
  9125. </references>
  9126. </variable>
  9127. <command name="docundone">
  9128. <description>Outputs a list of yet undocumented identifiers (commands, variables, etc.).</description>
  9129. <remarks>
  9130. <remark>
  9131. If the one argument is omitted, only the builtin identifiers will be listed. Therefore specify the argument
  9132. other identifiers like aliases should be included too.
  9133. </remark>
  9134. <remark>
  9135. Note that the list also includes identifiers that contain the substrings "TODO" or "UNDONE" in their documentation.
  9136. </remark>
  9137. </remarks>
  9138. <references>
  9139. <identifierReference identifier="docident"/>
  9140. <identifierReference identifier="docinvalid"/>
  9141. <identifierReference identifier="docfind"/>
  9142. </references>
  9143. <arguments>
  9144. <argument token="A" description="output all identifiers" valueNotes="1 (true), 0 (false)" optional="true"/>
  9145. </arguments>
  9146. </command>
  9147. <command name="docinvalid">
  9148. <description>Outputs a list of identifier documentations that do not match any existing identifier.</description>
  9149. <remarks>
  9150. <remark>Multipart identifiers are not included in this list, see 'docident'.</remark>
  9151. </remarks>
  9152. <references>
  9153. <identifierReference identifier="docident"/>
  9154. <identifierReference identifier="docundone"/>
  9155. <identifierReference identifier="docfind"/>
  9156. </references>
  9157. </command>
  9158. <command name="docfind">
  9159. <description>Searches for pattern in all ingame identifier documentations (reference) entries.</description>
  9160. <remarks>
  9161. <remark>If "silent" is zero or omitted, all found references are listed.</remark>
  9162. <remark>
  9163. A table of all found entries is returned as result.
  9164. For each entry, the index of the doc entry string that contains the pattern is listed.
  9165. </remark>
  9166. </remarks>
  9167. <arguments>
  9168. <argument token="P" description="the pattern"/>
  9169. <argument token="S" description="silent?"/>
  9170. </arguments>
  9171. <references>
  9172. <identifierReference identifier="docident"/>
  9173. <identifierReference identifier="docundone"/>
  9174. <identifierReference identifier="docinvalid"/>
  9175. <identifierReference identifier="getdoc"/>
  9176. </references>
  9177. </command>
  9178. <command name="getdoc">
  9179. <description>Returns a string of the specified identifier documentation (reference) entry.</description>
  9180. <remarks>
  9181. <remark>String index numbers match with the result of "docfind".</remark>
  9182. </remarks>
  9183. <arguments>
  9184. <argument token="N" description="name of the identifier"/>
  9185. <argument token="I" description="the string index number of entry" valueNotes="0: name, 1: description, 2: remarks"/>
  9186. </arguments>
  9187. <references>
  9188. <identifierReference identifier="docident"/>
  9189. <identifierReference identifier="docfind"/>
  9190. </references>
  9191. </command>
  9192. <command name="docwritebaseref">
  9193. <description>Writes out a base XML documentation reference containing templates for the builtin identifiers.</description>
  9194. <remarks>
  9195. <remark>
  9196. The generated reference is written to "docs/autogenerated_base_reference.xml" by default.
  9197. The three arguments can be changed later on in the generated XML document.
  9198. </remark>
  9199. </remarks>
  9200. <references>
  9201. <identifierReference identifier="docident"/>
  9202. <identifierReference identifier="docundone"/>
  9203. <identifierReference identifier="docinvalid"/>
  9204. <identifierReference identifier="docfind"/>
  9205. </references>
  9206. <arguments>
  9207. <argument token="R" description="the reference name" optional="true"/>
  9208. <argument token="S" description="the XML schema location string" optional="true"/>
  9209. <argument token="T" description="XML stylesheet to use" optional="true"/>
  9210. </arguments>
  9211. </command>
  9212. <command name="dockey">
  9213. <description>Adds a new default key to an identifier.</description>
  9214. <arguments>
  9215. <argument token="A" description="" valueNotes="value"/>
  9216. </arguments>
  9217. </command>
  9218. <variable name="docskip">
  9219. <description>Allows to scroll through the rendered identifier documentation.</description>
  9220. <value token="V" description="offset (number of lines)" minValue="0" maxValue="1000" defaultValue="0"/>
  9221. </variable>
  9222. <variable name="docvisible">
  9223. <description>Render identifier documentation for the typed command in the console.</description>
  9224. <value token="V" description="0: hide, 1: render" minValue="0" maxValue="1" defaultValue="1"/>
  9225. <references>
  9226. <identifierReference identifier="docident"/>
  9227. <identifierReference identifier="docidentverbose"/>
  9228. <identifierReference identifier="docrefvisible"/>
  9229. </references>
  9230. </variable>
  9231. <variable name="docidentverbose">
  9232. <description>Enables identifier details or statement analyser.</description>
  9233. <value token="V" description="level of displaying the additional informations" minValue="0" maxValue="3" defaultValue="1"/>
  9234. <references>
  9235. <identifierReference identifier="docident"/>
  9236. <identifierReference identifier="docvisible"/>
  9237. <identifierReference identifier="docrefvisible"/>
  9238. </references>
  9239. </variable>
  9240. <command name="docwritetodoref">
  9241. <description>Writes out an XML documentation reference file containing undocumented identifiers or identifiers marked with "TODO".</description>
  9242. <arguments>
  9243. <argument token="I" description="Also include aliases?" valueNotes="0: don't include aliases (default), 1: include aliases" optional="true"/>
  9244. </arguments>
  9245. </command>
  9246. </identifiers>
  9247. </section>
  9248. <!-- Ingame reference Section Ends -->
  9249. <!-- Serverbrowser Section Starts -->
  9250. <section name="Serverbrowser" sortindex="08">
  9251. <description>This section describes all identifiers related to the serverbrowser.</description>
  9252. <identifiers sort="true">
  9253. <command name="addserver">
  9254. <description>Adds a server to the list of server to query in the server list menu.</description>
  9255. <arguments>
  9256. <argument token="S" description="the address of the server (hostname or IP)"/>
  9257. <argument token="P" description="the port"/>
  9258. </arguments>
  9259. </command>
  9260. <command name="clearservers">
  9261. <description>Clears the server list.</description>
  9262. </command>
  9263. <variable name="showallservers">
  9264. <description>Whether servers that have not yet responded to a ping should be shown in the server list.</description>
  9265. <value token="V" description="" minValue="0" maxValue="1" defaultValue="1"/>
  9266. </variable>
  9267. <variable name="searchlan">
  9268. <value token="V" description="" minValue="0" maxValue="2" defaultValue="1"/>
  9269. </variable>
  9270. <variable name="serversort">
  9271. <value token="V" description="" minValue="0" maxValue="NUMSERVSORT-1" defaultValue="0"/>
  9272. </variable>
  9273. <variable name="servpingrate">
  9274. <value token="V" description="" minValue="1000" maxValue="60000" defaultValue="5000"/>
  9275. </variable>
  9276. <command name="updatefrommaster">
  9277. <description>Contacts the masterserver and adds any new servers to the server list.</description>
  9278. <remarks>
  9279. <remark>The servers are written to the config/servers.cfg file. This menu can be reached through the Multiplayer menu.</remark>
  9280. </remarks>
  9281. <arguments>
  9282. <argument token="B" description="force update" valueNotes="0 (delayed), 1 (immediate)"/>
  9283. </arguments>
  9284. <references>
  9285. <identifierReference identifier="mastertype"/>
  9286. <identifierReference identifier="masterupdatefrequency"/>
  9287. </references>
  9288. </command>
  9289. <variable name="mastertype">
  9290. <description>Sets the method which client will use to contact the masterserver.</description>
  9291. <value token="V" description="0: direct TCP connection, 1: HTTP connection (via proxy)" minValue="0" maxValue="1" defaultValue="1"/>
  9292. <references>
  9293. <identifierReference identifier="updatefrommaster"/>
  9294. </references>
  9295. </variable>
  9296. <variable name="masterupdatefrequency">
  9297. <value token="V" description="" minValue="1" maxValue="24*60*60" defaultValue="60*60"/>
  9298. <references>
  9299. <identifierReference identifier="updatefrommaster"/>
  9300. </references>
  9301. </variable>
  9302. <variable name="maxservpings">
  9303. <description>Sets the number of servers to be pinged at once.</description>
  9304. <value token="V" description="" minValue="0" maxValue="1000" defaultValue="10"/>
  9305. </variable>
  9306. <command name="addfavcategory">
  9307. <description>Adds a new category in the serverbrowser favourites.</description>
  9308. <remarks>
  9309. <remark>Add new categories to your autoexec.cfg, check favourites.cfg for examples.</remark>
  9310. </remarks>
  9311. <arguments>
  9312. <argument token="A" description="reference designator (keep short and unique)"/>
  9313. </arguments>
  9314. </command>
  9315. <command name="listfavcats">
  9316. <description>Lists all registered serverbrowser favourites categories.</description>
  9317. </command>
  9318. <variable name="hidefavicons">
  9319. <description>Hides favourites icons in serverbrowser.</description>
  9320. <value token="N" description="0: show, 1: hide" minValue="0" maxValue="1" defaultValue="0"/>
  9321. </variable>
  9322. <variable name="serverbrowserhidefavtag">
  9323. <description>Hides favourites tag column in serverbrowser.</description>
  9324. <value token="N" description="-" minValue="0" maxValue="2" defaultValue="1"/>
  9325. </variable>
  9326. <variable name="serverbrowserhideip">
  9327. <description>Hides server IP and port in serverbrowser.</description>
  9328. <value token="N" description="-" minValue="0" maxValue="2" defaultValue="2"/>
  9329. </variable>
  9330. <variable name="serversortdir">
  9331. <description>Selects ascending of descending sort order in serverbrowser.</description>
  9332. </variable>
  9333. <variable name="serversortpreferofficial">
  9334. <description>Sort official maps over custom maps in serverbrowser.</description>
  9335. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="1"/>
  9336. </variable>
  9337. <variable name="showminremain">
  9338. <description>Show 'minutes remaining' in serverbrowser.</description>
  9339. <value token="N" description="" minValue="0" maxValue="1" defaultValue="1"/>
  9340. </variable>
  9341. <variable name="shownamesinbrowser">
  9342. <description>Show player names in serverbrowser.</description>
  9343. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="0"/>
  9344. </variable>
  9345. <variable name="showonlyfavourites">
  9346. <description>Show only servers of one favourites category in serverbrowser.</description>
  9347. <value token="N" description="category index" minValue="0" maxValue="100" defaultValue="0"/>
  9348. </variable>
  9349. <variable name="showonlygoodservers">
  9350. <description>Show only servers with the correct protocol in serverbrowser.</description>
  9351. <value token="N" description="-" minValue="0" maxValue="1" defaultValue="0"/>
  9352. </variable>
  9353. <variable name="showweights">
  9354. <description>Show 'weights' in serverbrowser.</description>
  9355. <value token="N" description="" minValue="0" maxValue="1" defaultValue="1"/>
  9356. <remarks>
  9357. <remark>
  9358. 'weights' are the sort criteria with the highest priority. Favourites categories can change the weights.
  9359. Use 'showweights' to debug problems with serverbrowser sorting.
  9360. </remark>
  9361. </remarks>
  9362. </variable>
  9363. <variable name="showallplayersnumber">
  9364. <description>Shows on serverbrowser number of all players on the all servers.</description>
  9365. <value token="N" description="" minValue="0" maxValue="1" defaultValue="0"/>
  9366. </variable>
  9367. <command name="searchnickname">
  9368. <description>Search a nickname (or -part) on all servers.</description>
  9369. <arguments>
  9370. <argument token="N" description="nickname to search"/>
  9371. </arguments>
  9372. </command>
  9373. </identifiers>
  9374. </section>
  9375. <!-- Serverbrowser Section Ends -->
  9376. <!-- Server Commands Section Starts -->
  9377. <section name="Server commands" sortindex="09">
  9378. <description>
  9379. This section lists commands used by the client that communicate to the server. Most are used for server administration.
  9380. Also see the "mode" section and the "map" command which also communicate to the server.
  9381. </description>
  9382. <identifiers sort="true">
  9383. <command name="serverdesc">
  9384. <description>Sets user-define server description.</description>
  9385. <arguments>
  9386. <argument token="D" description="description"/>
  9387. </arguments>
  9388. <remarks>
  9389. <remark>
  9390. If the server was run with -n1 and -n2 arguments (prefix and suffix of descriptive title)
  9391. a serveradmin can set a user-defined server description with this command, if it wasn't this command results
  9392. in "invalid vote". This title will only stay until the next map is loaded.
  9393. </remark>
  9394. <remark>
  9395. If, for example, the server was run with -n"Fred's Server" -n1"Fred's " -n2" Server",
  9396. then you could call "/serverdesc [pWn4g3 TOSOK]" and it would show up as "Fred's pWn4g3 TOSOK Server"
  9397. in the serverbrowser.
  9398. </remark>
  9399. </remarks>
  9400. </command>
  9401. <command name="serverextension">
  9402. <description>Sends the extension name and argument string to the server, which can use it for custom action.</description>
  9403. <remarks>
  9404. <remark>See source/src/server.cpp ["case SV_EXTENSION:"].</remark>
  9405. </remarks>
  9406. <arguments>
  9407. <argument token="E" description="extension name"/>
  9408. <argument token="A" description="argument"/>
  9409. </arguments>
  9410. </command>
  9411. <command name="autoteam">
  9412. <description>Sets automated team assignment.</description>
  9413. <references>
  9414. <identifierReference identifier="setadmin"/>
  9415. </references>
  9416. <arguments>
  9417. <argument token="B" description="Enables or disables auto team" valueNotes="1 (On), 0 (Off)"/>
  9418. </arguments>
  9419. </command>
  9420. <command name="ban">
  9421. <description>Temporary ban of the specified player from the server.</description>
  9422. <arguments>
  9423. <argument token="C" description="The player to ban" valueNotes="client number"/>
  9424. <argument token="R" description="The reason" valueNotes="at least 4 characters"/>
  9425. </arguments>
  9426. <remarks>
  9427. <remark>Temporary ban duration is fixed at 20 minutes. </remark>
  9428. </remarks>
  9429. <references>
  9430. <identifierReference identifier="removebans"/>
  9431. <identifierReference identifier="setadmin"/>
  9432. </references>
  9433. </command>
  9434. <command name="callvote">
  9435. <description>Calls a vote on the server.</description>
  9436. <arguments>
  9437. <argument token="T" description="Vote type" valueNotes="value"/>
  9438. <argument token="A" description="First argument" valueNotes=""/>
  9439. <argument token="B" description="Second argument" valueNotes=""/>
  9440. </arguments>
  9441. <remarks>
  9442. <remark>
  9443. This command is wrapped by aliases for better usability and is used to action votes such as ban, kick, etc.
  9444. See config/admin.cfg for actual uses.
  9445. </remark>
  9446. </remarks>
  9447. </command>
  9448. <command name="forceteam">
  9449. <description>Calls a vote to force the specified player to switch to the specified team.</description>
  9450. <references>
  9451. <identifierReference identifier="forceme"/>
  9452. <identifierReference identifier="setadmin"/>
  9453. </references>
  9454. <arguments>
  9455. <argument token="C" description="client number of player" valueNotes="integer"/>
  9456. <argument token="T" description="the team to force to" valueNotes="0-4"/>
  9457. </arguments>
  9458. </command>
  9459. <command name="forceme">
  9460. <description>Calls a vote to forceteam yourself to the specified team.</description>
  9461. <arguments>
  9462. <argument token="T" description="the team to force yourself to" valueNotes="0-4" optional="true"/>
  9463. </arguments>
  9464. <remarks>
  9465. <remark>By default, if you are on team CLA or RVSF, this command will force you to the enemy team, no arguments necessary.</remark>
  9466. </remarks>
  9467. <references>
  9468. <identifierReference identifier="forceteam"/>
  9469. </references>
  9470. </command>
  9471. <command name="shuffleteams">
  9472. <description>Shuffles the teams.</description>
  9473. <remarks>
  9474. <remark>The server will attempt to restore balance, but the result may be less that optimal, and there are certainly better ways to keep teams balanced.</remark>
  9475. </remarks>
  9476. <references>
  9477. <identifierReference identifier="forceteam"/>
  9478. <identifierReference identifier="forceme"/>
  9479. </references>
  9480. </command>
  9481. <command name="giveadmin">
  9482. <description>Gives admin state to the specified player.</description>
  9483. <remarks>
  9484. <remark>Requires admin state. The admin will lose his admin state after successfully issuing this command.</remark>
  9485. </remarks>
  9486. <references>
  9487. <identifierReference identifier="setadmin"/>
  9488. </references>
  9489. <arguments>
  9490. <argument token="C" description="The player to become admin" valueNotes="client number"/>
  9491. </arguments>
  9492. </command>
  9493. <command name="kick">
  9494. <description>Kicks the specified player from the server.</description>
  9495. <arguments>
  9496. <argument token="C" description="The player to kick" valueNotes="client number"/>
  9497. <argument token="R" description="The reason" valueNotes="at least 4 characters"/>
  9498. </arguments>
  9499. <references>
  9500. <identifierReference identifier="setadmin"/>
  9501. </references>
  9502. </command>
  9503. <command name="mastermode">
  9504. <description>Sets the mastermode for the server.</description>
  9505. <remarks>
  9506. <remark>
  9507. If the mastermode is set to 'private', no more clients can join the server.
  9508. Default is 'open' which allows anyone to join the server.
  9509. </remark>
  9510. </remarks>
  9511. <references>
  9512. <identifierReference identifier="setadmin"/>
  9513. </references>
  9514. <arguments>
  9515. <argument token="N" description="The master mode" valueNotes="0 (Open), 1 (Private), 2 (Match)"/>
  9516. </arguments>
  9517. </command>
  9518. <command name="removebans">
  9519. <description>Removes all temporary bans from the server.</description>
  9520. <remarks>
  9521. <remark>Temporary bans are normally automatically removed after 20 minutes.</remark>
  9522. </remarks>
  9523. <references>
  9524. <identifierReference identifier="ban"/>
  9525. <identifierReference identifier="setadmin"/>
  9526. </references>
  9527. </command>
  9528. <command name="cleardemo">
  9529. <description>Clears specific demo currently in memory on the server.</description>
  9530. <arguments>
  9531. <argument token="X" description="number in list" valueNotes="0 (all), 1.."/>
  9532. </arguments>
  9533. <references>
  9534. <identifierReference identifier="listdemos"/>
  9535. <identifierReference identifier="cleardemos"/>
  9536. </references>
  9537. </command>
  9538. <command name="cleardemos">
  9539. <description>Clears all demos currently in memory on the server.</description>
  9540. <references>
  9541. <identifierReference identifier="cleardemo"/>
  9542. </references>
  9543. </command>
  9544. <command name="sendmap">
  9545. <description>Sends a map to the server.</description>
  9546. <remarks>
  9547. <remark>
  9548. During coop edit, the current map gets saved to file and sent to the server.
  9549. Other players can use 'getmap' to download it.
  9550. </remark>
  9551. <remark>
  9552. When not in edit mode, the map will not be saved. The new map will be used, when
  9553. the next game on that map starts on the server.
  9554. </remark>
  9555. </remarks>
  9556. <arguments>
  9557. <argument token="M" description="map to send" optional="true"/>
  9558. </arguments>
  9559. <references>
  9560. <identifierReference identifier="getmap"/>
  9561. <identifierReference identifier="dlmap"/>
  9562. </references>
  9563. </command>
  9564. <command name="deleteservermap">
  9565. <description>Deletes a map from the current server.</description>
  9566. <arguments>
  9567. <argument token="A" description="map name"/>
  9568. </arguments>
  9569. </command>
  9570. <command name="setadmin">
  9571. <description>Claims or drops admin status.</description>
  9572. <remarks>
  9573. <remark>
  9574. Failed logins result in an auto kick.
  9575. The admin is granted the right to kick, ban, remove bans, set autoteam, set shuffleteam, change server
  9576. description (if enabled), change map, change mastermode, force team, change mode, record demos, stop demos
  9577. and clear demo(s) - All without needing votes from other users.
  9578. If the admin votes on any (other players) call, his vote is final.
  9579. In the scoreboard, the admin will be shown as a red colour.
  9580. </remark>
  9581. </remarks>
  9582. <references>
  9583. <identifierReference identifier="kick"/>
  9584. <identifierReference identifier="autoteam"/>
  9585. <identifierReference identifier="mastermode"/>
  9586. <identifierReference identifier="ban"/>
  9587. <identifierReference identifier="removebans"/>
  9588. </references>
  9589. <arguments>
  9590. <argument token="B" description="Status" valueNotes="1 (Claim), 0 (Drop)"/>
  9591. <argument token="PASS" description="Password" valueNotes="case sensitive"/>
  9592. </arguments>
  9593. </command>
  9594. <command name="getvita">
  9595. <description>Get vita for a client.</description>
  9596. <arguments>
  9597. <argument token="C" description="client number"/>
  9598. </arguments>
  9599. <remarks>
  9600. <remark>TODO: elaborate</remark>
  9601. </remarks>
  9602. </command>
  9603. <variable name="serverdebug">
  9604. <description>Whether or not to output debugging information.</description>
  9605. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:debug output" defaultValue="0"/>
  9606. <remarks>
  9607. <remark>Only applies if you're running a client, the standalone server has DEBUGCOND(true) already set.</remark>
  9608. </remarks>
  9609. </variable>
  9610. </identifiers>
  9611. </section>
  9612. <!-- Server Commands Section Ends -->
  9613. <!-- Authentication Section Starts -->
  9614. <section name="Authentication" sortindex="10">
  9615. <description>
  9616. This section describes identifiers related to player authentication.
  9617. </description>
  9618. <identifiers sort="true">
  9619. <command name="authsetup">
  9620. <description>Manages player authentication.</description>
  9621. <remarks>
  9622. <remark>
  9623. "authsetup" contains all the funtionality needed to generate, load and save private and public keys,
  9624. and to lock and unlock the private key with a password.
  9625. </remark>
  9626. <remark>
  9627. Private and public keys are used to authenticate the player to servers, and are loaded from private/authprivate.cfg.
  9628. Private keys can be stored in an "encrypted with password" version - in which case the player has to enter
  9629. the password after game start. To prevent brute-force cracking of the password, the key-derivation function uses
  9630. a constant time to encode (usually several seconds). Because of that, the decoding at game start can be done
  9631. in the background.
  9632. </remark>
  9633. <remark>
  9634. The private key is actually itself a public key generated from the prepriv key.
  9635. The prepriv key should be kept away from the computer, either as hardcopy or on a thumbdrive.
  9636. The prepriv key is not required to play the game. It can be used to prove ownership of the private key,
  9637. in case the private key gets stolen. It can also be used to regenerate private and public keys,
  9638. in case they are lost. The prepriv key can also be encrypted by its own password.
  9639. </remark>
  9640. <remark>----------</remark>
  9641. <remark>Options:</remark>
  9642. <remark>"authsetup" - checks private and public key and returns "1", if they match.</remark>
  9643. <remark>"authsetup pre preprivhex [psalthex pwdcfg]" - loads prepriv key into memory. Optionally supports encrypted keys.</remark>
  9644. <remark>"authsetup priv privhex [salthex pwdcfg]" - loads private key into memory. Optionally supports encrypted keys.</remark>
  9645. <remark>"authsetup pub pubhex" - loads public key into memory.</remark>
  9646. <remark>"authsetup ppass preprivpass" - decrypts prepriv key with password.</remark>
  9647. <remark>"authsetup pass privpass" - decrypts private key with password.</remark>
  9648. <remark>
  9649. "authsetup passd privpass [commandwhendone]" - decrypts private key with password in background.
  9650. Optionally executes cubescript command when done.
  9651. </remark>
  9652. <remark>"authsetup needpass" - returns "1", if the private key needs decryption.</remark>
  9653. <remark>"authsetup genpre [prelen]" - generates new prepriv key.</remark>
  9654. <remark>"authsetup genpriv" - generates private key from prepriv key.</remark>
  9655. <remark>"authsetup genpub" - generates public key from private key.</remark>
  9656. <remark>"authsetup savepre [preprivfilename]" - saves the prepriv key. The default filename is private/authpreprivate.cfg</remark>
  9657. <remark>"authsetup savepre [privatefilename]" - saves the private key. The default filename is private/authprivate.cfg</remark>
  9658. <remark>
  9659. "authsetup newppass preprivpass [preprivfilename]" - encrypts prepriv key with new password and saves the result to file.
  9660. The default filename is private/authpreprivate.cfg and an existing file gets overwritten - but the former file
  9661. content is kept and also written, each line commented out.
  9662. </remark>
  9663. <remark>
  9664. "authsetup newpass privpass [privatefilename]" - encrypts private key with new password and saves the encrypted
  9665. private key and the public key to file. The default filename is private/authprivate.cfg and an existing file
  9666. gets overwritten - but the former file content is kept and also written, each line commented out.
  9667. </remark>
  9668. <remark>"authsetup unarmed" - sets private and public keys to a fixed value. For testing only. Can be used to "log out". Only available in development versions of the game</remark>
  9669. <remark>----------</remark>
  9670. <remark>
  9671. "authmemusage", "authrounds", "authmaxtime" are only used, when new passwords are created (authsetup new[p]pass).
  9672. "authmemusage" is the number of megabytes of RAM that are used for the password hash calculation. If "authrounds"
  9673. is zero (as is default), then the hash algorithm calculates as many rounds as possible in the number of milliseconds
  9674. specified in "authmaxtime". If "authrounds" is a positive number, then that is the number of rounds to be done,
  9675. regardless the required time. Note that, since the password hash algorithm is not endianness-aware, it is
  9676. not possible to move an encrypted password to a machine with different endianness. Moving between 32- and 64-bit
  9677. machines should be no problem.
  9678. </remark>
  9679. </remarks>
  9680. <arguments>
  9681. <argument token="P" description="parameter" valueNotes="[empty], pre preprivhex [psalthex pwdcfg],
  9682. priv privhex [salthex pwdcfg], pub pubhex, ppass preprivpass, pass privpass, passd privpass [commandwhendone],
  9683. needpass, genpre [prelen], genpriv, genpub, newppass preprivpass [preprivfilename],
  9684. newpass privpass [privatefilename], unarmed"/>
  9685. </arguments>
  9686. <references>
  9687. <identifierReference identifier="authmemusage"/>
  9688. <identifierReference identifier="authrounds"/>
  9689. <identifierReference identifier="authmaxtime"/>
  9690. <identifierReference identifier="authkey"/>
  9691. <identifierReference identifier="mypubkey"/>
  9692. <identifierReference identifier="cryptodebug"/>
  9693. </references>
  9694. </command>
  9695. <variable name="authmemusage">
  9696. <description>Sets a number of megabytes of RAM that are used for the password hash calculation (when new passwords are created).</description>
  9697. <value token="N" description="number of RAM [MB]" minValue="2" maxValue="(1&lt;&lt;10)-1" defaultValue="24"/>
  9698. <references>
  9699. <identifierReference identifier="authsetup"/>
  9700. <identifierReference identifier="authrounds"/>
  9701. <identifierReference identifier="authmaxtime"/>
  9702. </references>
  9703. </variable>
  9704. <variable name="authrounds">
  9705. <description>Sets a number of rounds, if greater than 0, then new password hashes are created with this fixed number of rounds.</description>
  9706. <value token="N" description="number of rounds" minValue="0" maxValue="2^31-1" defaultValue="0"/>
  9707. <references>
  9708. <identifierReference identifier="authsetup"/>
  9709. <identifierReference identifier="authmemusage"/>
  9710. <identifierReference identifier="authmaxtime"/>
  9711. </references>
  9712. </variable>
  9713. <variable name="authmaxtime">
  9714. <description>Sets an amount of time (in ms), new password hashes are created with this fixed amount of time.</description>
  9715. <value token="N" description="amount of time [ms]" minValue="1&lt;&lt;9" maxValue="1&lt;&lt;16" defaultValue="1&lt;&lt;12"/>
  9716. <references>
  9717. <identifierReference identifier="authsetup"/>
  9718. <identifierReference identifier="authmemusage"/>
  9719. <identifierReference identifier="authrounds"/>
  9720. </references>
  9721. </variable>
  9722. <command name="authkey">
  9723. <description>Manages a list of keys other than the game key (which is managed by authsetup).</description>
  9724. <remarks>
  9725. <remark>For example, this can be server owner keys or clan boss keys. Options:</remark>
  9726. <remark>"authkey clear" - empties the list and comments out all lines in config/authkeys.cfg.</remark>
  9727. <remark>"authkey list" - lists all authkeys that are currently in memory.</remark>
  9728. <remark>"authkey delete keyname" - deletes the key "keyname" from memory.</remark>
  9729. <remark>
  9730. "authkey new keyname" - generates a new key with the name "keyname". If a key of that name already exists,
  9731. it is deleted. The key is added to the list in memory and also written to the file config/authkeys.cfg.
  9732. </remark>
  9733. <remark>
  9734. "authkey add keyname privkey" - adds a key with the name "keyname" to the list in memory.
  9735. The privkey is a 32-byte hexadecimal string, preferrably generated by authkey new.
  9736. The matching public key is generated automatically from the private key.
  9737. </remark>
  9738. <remark>
  9739. "authkey selfcert keyname [comment]" - generates a self-signed certificate for the key "keyname". Being able to
  9740. create such a cert is proof, that you own the private key of a certain public key.
  9741. </remark>
  9742. </remarks>
  9743. <arguments>
  9744. <argument token="P" description="parameter" valueNotes="clear, list, delete keyname, new keyname,
  9745. add keyname privkey, selfcert keyname [comment]"/>
  9746. </arguments>
  9747. <references>
  9748. <identifierReference identifier="authsetup"/>
  9749. </references>
  9750. </command>
  9751. <command name="mypubkey">
  9752. <description>Returns a public key of game account.</description>
  9753. <remarks>
  9754. <remark>It returns empty string, if no account exists or it is unusable (due to missing password, for example).</remark>
  9755. </remarks>
  9756. <references>
  9757. <identifierReference identifier="authsetup"/>
  9758. </references>
  9759. </command>
  9760. <variable name="cryptodebug">
  9761. <description>Enables some debug messages in crypto.cpp file.</description>
  9762. <value token="N" description="enable debugging" minValue="0" maxValue="1" defaultValue="1"/>
  9763. <references>
  9764. <identifierReference identifier="authsetup"/>
  9765. </references>
  9766. </variable>
  9767. <command name="listcerts">
  9768. <description>List all certificates.</description>
  9769. <remarks>
  9770. <remark>TODO: elaborate</remark>
  9771. </remarks>
  9772. </command>
  9773. <command name="newcert">
  9774. <description>Create and sign certificates from Cubescript.</description>
  9775. <arguments>
  9776. <argument token="X" description="command" valueNotes="clear, start, line, sign"/>
  9777. <argument token="A" description="linename or pubkey" valueNotes="X:line => pubkey or name; X:sign => actual privkey"/>
  9778. <argument token="B" description="value or comment" valueNotes="X:line => actual pubkey, actual privkey or actual name, X:sign => a descriptive comment"/>
  9779. <argument token="C" description="comment" valueNotes="newcert line name KEY => a descriptive comment"/>
  9780. </arguments>
  9781. <remarks>
  9782. <remark>TODO: elaborate</remark>
  9783. </remarks>
  9784. </command>
  9785. </identifiers>
  9786. </section>
  9787. <!-- Authentication Section Ends -->
  9788. <!-- Game Modes Section Starts -->
  9789. <section name="Game modes" sortindex="03">
  9790. <identifiers sort="true">
  9791. <command name="mode">
  9792. <description>Sets the gameplay mode to N for the next map loaded.</description>
  9793. <references>
  9794. <wikiReference article="Gamemodes"/>
  9795. <identifierReference identifier="map"/>
  9796. <identifierReference identifier="gamemode"/>
  9797. <identifierReference identifier="getmode"/>
  9798. <identifierReference identifier="curmodeattr"/>
  9799. <identifierReference identifier="modeacronyms"/>
  9800. <identifierReference identifier="modenum"/>
  9801. <identifierReference identifier="tdm"/>
  9802. <identifierReference identifier="coop"/>
  9803. <identifierReference identifier="dm"/>
  9804. <identifierReference identifier="surv"/>
  9805. <identifierReference identifier="tsurv"/>
  9806. <identifierReference identifier="ctf"/>
  9807. <identifierReference identifier="tpf"/>
  9808. <identifierReference identifier="pf"/>
  9809. <identifierReference identifier="tlss"/>
  9810. <identifierReference identifier="lss"/>
  9811. <identifierReference identifier="osok"/>
  9812. <identifierReference identifier="tosok"/>
  9813. <identifierReference identifier="htf"/>
  9814. <identifierReference identifier="tktf"/>
  9815. <identifierReference identifier="ktf"/>
  9816. <identifierReference identifier="btdm"/>
  9817. <identifierReference identifier="bdm"/>
  9818. <identifierReference identifier="bpf"/>
  9819. <identifierReference identifier="blss"/>
  9820. <identifierReference identifier="btsurv"/>
  9821. <identifierReference identifier="bosok"/>
  9822. <identifierReference identifier="btosok"/>
  9823. </references>
  9824. <arguments>
  9825. <argument token="N" valueNotes="0" description="Team Deathmatch"/>
  9826. <argument valueNotes="1" description="Co-op edit"/>
  9827. <argument valueNotes="2" description="Deathmatch"/>
  9828. <argument valueNotes="3" description="Survivor"/>
  9829. <argument valueNotes="4" description="Team Survivor"/>
  9830. <argument valueNotes="5" description="Capture the Flag"/>
  9831. <argument valueNotes="6" description="Pistol Frenzy"/>
  9832. <argument valueNotes="7" description="Bot Team Deathmatch"/>
  9833. <argument valueNotes="8" description="Bot Deathmatch"/>
  9834. <argument valueNotes="9" description="Last Swiss Standing"/>
  9835. <argument valueNotes="10" description="One Shot, One Kill"/>
  9836. <argument valueNotes="11" description="Team One Shot, One Kill"/>
  9837. <argument valueNotes="12" description="Bot One Shot, One Kill"/>
  9838. <argument valueNotes="13" description="Hunt the Flag"/>
  9839. <argument valueNotes="14" description="Team Keep the Flag"/>
  9840. <argument valueNotes="15" description="Keep the Flag"/>
  9841. <argument valueNotes="16" description="Team Pistol Frenzy"/>
  9842. <argument valueNotes="17" description="Team Last Swiss Standing"/>
  9843. <argument valueNotes="18" description="Bot Pistol Frenzy"/>
  9844. <argument valueNotes="19" description="Bot Last Swiss Standing"/>
  9845. <argument valueNotes="20" description="Bot Team Survivor"/>
  9846. <argument valueNotes="21" description="Bot Team One Shot, One Kill"/>
  9847. </arguments>
  9848. <remarks>
  9849. <remark>You will need to define mode before loading the map or it will stay as the last mode played.</remark>
  9850. <remark>There are many aliases for you to use instead of remembering the numeric mapping.</remark>
  9851. </remarks>
  9852. <examples>
  9853. <example>
  9854. <code><![CDATA[mode 7; map ac_complex; echo "Bot Team Deathmatch on ac_complex"]]></code>
  9855. </example>
  9856. <example>
  9857. <code><![CDATA[mode 8; map ac_mines 4; echo "Bot Deathmatch on ac_mines for 4 minutes"]]></code>
  9858. </example>
  9859. <example>
  9860. <code><![CDATA[mode 5; map ac_shine; echo "CTF @ ac_shine"]]></code>
  9861. </example>
  9862. </examples>
  9863. </command>
  9864. <command name="getmode">
  9865. <description>Returns the name of current game mode.</description>
  9866. <examples>
  9867. <example>
  9868. <code><![CDATA[echo (getmode)]]></code>
  9869. <explanation>Example output: capture the flag</explanation>
  9870. </example>
  9871. <example>
  9872. <code><![CDATA[echo (getmode 1)]]></code>
  9873. <explanation>Example output: CTF</explanation>
  9874. </example>
  9875. </examples>
  9876. <arguments>
  9877. <argument token="N" description="0 = full mode name, 1 = mode acronym" valueNotes="min 0/max 1/default 0"/>
  9878. </arguments>
  9879. <references>
  9880. <identifierReference identifier="mode"/>
  9881. <identifierReference identifier="modeacronyms"/>
  9882. <identifierReference identifier="gamemode"/>
  9883. <identifierReference identifier="curmodeattr"/>
  9884. </references>
  9885. </command>
  9886. <variable name="gamemode">
  9887. <description>Returns the number of current game mode.</description>
  9888. <examples>
  9889. <example>
  9890. <code><![CDATA[echo $gamemode]]></code>
  9891. <explanation>Output: 5</explanation>
  9892. </example>
  9893. </examples>
  9894. <references>
  9895. <identifierReference identifier="mode"/>
  9896. <identifierReference identifier="getmode"/>
  9897. <identifierReference identifier="curmodeattr"/>
  9898. </references>
  9899. </variable>
  9900. <command name="curmodeattr">
  9901. <description>Checks the current game mode for certain attributes.</description>
  9902. <arguments>
  9903. <argument token="A" description="attribute name"/>
  9904. </arguments>
  9905. <remarks>
  9906. <remark>Possible attributes are: team, arena, flag and bot.</remark>
  9907. </remarks>
  9908. <references>
  9909. <identifierReference identifier="mode"/>
  9910. <identifierReference identifier="gamemode"/>
  9911. <identifierReference identifier="getmode"/>
  9912. </references>
  9913. </command>
  9914. <variable name="modeacronyms">
  9915. <description>Toggles use of acronyms instead of full modenames in the serverbrowser, scoreboard, voting info.</description>
  9916. <value token="B" description="" minValue="0" maxValue="1" defaultValue="0"/>
  9917. <references>
  9918. <identifierReference identifier="mode"/>
  9919. <identifierReference identifier="getmode"/>
  9920. <identifierReference identifier="modenum"/>
  9921. </references>
  9922. </variable>
  9923. <command name="modenum">
  9924. <description>Returns the mode number for a specified mode acronym.</description>
  9925. <examples>
  9926. <example>
  9927. <code><![CDATA[echo (modenum ctf)]]></code>
  9928. <explanation>Output: 5</explanation>
  9929. </example>
  9930. <example>
  9931. <code><![CDATA[echo (modenum btosok)]]></code>
  9932. <explanation>Output: 21</explanation>
  9933. </example>
  9934. </examples>
  9935. <arguments>
  9936. <argument token="M" description="the mode acronym"/>
  9937. </arguments>
  9938. <remarks>
  9939. <remark>Returns -1 if not found.</remark>
  9940. </remarks>
  9941. <references>
  9942. <identifierReference identifier="mode"/>
  9943. <identifierReference identifier="modeacronyms"/>
  9944. </references>
  9945. </command>
  9946. <command name="gamemodedesc">
  9947. <arguments>
  9948. <argument token="M" description="mode" valueNotes="integer"/>
  9949. <argument token="D" description="description" valueNotes="string"/>
  9950. </arguments>
  9951. <references>
  9952. <identifierReference identifier="mode"/>
  9953. <identifierReference identifier="showmodedescriptions"/>
  9954. </references>
  9955. </command>
  9956. <variable name="showmodedescriptions">
  9957. <description>Enables or disables the showing of game mode descriptions on the console after map starts.</description>
  9958. <value token="B" description="0 off, 1 on" minValue="0" maxValue="1" defaultValue="1"/>
  9959. <references>
  9960. <identifierReference identifier="mode"/>
  9961. <identifierReference identifier="gamemodedesc"/>
  9962. </references>
  9963. </variable>
  9964. <command name="coop">
  9965. <description>Starts a map with the mode "Co-operative Editing".</description>
  9966. <remarks>
  9967. <remark>
  9968. See the "Co-operative map editing" section on the "Tips, tricks and advice" chapter
  9969. of the map editing guide for more information.
  9970. </remark>
  9971. </remarks>
  9972. <examples>
  9973. <example>
  9974. <code><![CDATA[coop ac_newmap]]></code>
  9975. </example>
  9976. </examples>
  9977. <arguments>
  9978. <argument token="M" description="The name of the map you wish to edit"/>
  9979. </arguments>
  9980. </command>
  9981. <command name="ctf">
  9982. <description>Starts a map with the mode "Capture the Flag".</description>
  9983. <examples>
  9984. <example>
  9985. <code><![CDATA[ctf ac_mines]]></code>
  9986. </example>
  9987. </examples>
  9988. <arguments>
  9989. <argument token="M" description="The name of the map you wish to play"/>
  9990. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  9991. </arguments>
  9992. </command>
  9993. <command name="dm">
  9994. <description>Starts a map with the mode "Deathmatch".</description>
  9995. <examples>
  9996. <example>
  9997. <code><![CDATA[dm ac_complex]]></code>
  9998. </example>
  9999. </examples>
  10000. <arguments>
  10001. <argument token="M" description="The name of the map you wish to play"/>
  10002. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10003. </arguments>
  10004. </command>
  10005. <command name="htf">
  10006. <description>Starts a map with the mode "Hunt the Flag".</description>
  10007. <examples>
  10008. <example>
  10009. <code><![CDATA[htf ac_mines]]></code>
  10010. </example>
  10011. </examples>
  10012. <arguments>
  10013. <argument token="M" description="The name of the map you wish to play"/>
  10014. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10015. </arguments>
  10016. </command>
  10017. <command name="ktf">
  10018. <description>Starts a map with the mode "Keep the Flag".</description>
  10019. <examples>
  10020. <example>
  10021. <code><![CDATA[ktf ac_mines]]></code>
  10022. </example>
  10023. </examples>
  10024. <arguments>
  10025. <argument token="M" description="The name of the map you wish to play"/>
  10026. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10027. </arguments>
  10028. </command>
  10029. <command name="lms">
  10030. <description>Starts a map with the mode "Survivor". Some players prefer the name "Last Man Standing" for this mode.</description>
  10031. <examples>
  10032. <example>
  10033. <code><![CDATA[lms ac_complex]]></code>
  10034. </example>
  10035. </examples>
  10036. <arguments>
  10037. <argument token="M" description="The name of the map you wish to play"/>
  10038. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10039. </arguments>
  10040. </command>
  10041. <command name="lss">
  10042. <description>Starts a map with the mode "Last Swiss Standing".</description>
  10043. <examples>
  10044. <example>
  10045. <code><![CDATA[lss ac_complex]]></code>
  10046. </example>
  10047. </examples>
  10048. <arguments>
  10049. <argument token="M" description="The name of the map you wish to play"/>
  10050. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10051. </arguments>
  10052. </command>
  10053. <command name="osok">
  10054. <description>Starts a map with the mode "One Shot, One Kill".</description>
  10055. <examples>
  10056. <example>
  10057. <code><![CDATA[osok ac_complex]]></code>
  10058. </example>
  10059. </examples>
  10060. <arguments>
  10061. <argument token="M" description="The name of the map you wish to play"/>
  10062. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10063. </arguments>
  10064. </command>
  10065. <command name="pf">
  10066. <description>Starts a map with the mode "Pistol Frenzy".</description>
  10067. <examples>
  10068. <example>
  10069. <code><![CDATA[pf ac_complex]]></code>
  10070. </example>
  10071. </examples>
  10072. <arguments>
  10073. <argument token="M" description="The name of the map you wish to play"/>
  10074. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10075. </arguments>
  10076. </command>
  10077. <command name="tdm">
  10078. <description>Starts a map with the mode "Team Deathmatch".</description>
  10079. <examples>
  10080. <example>
  10081. <code><![CDATA[tdm ac_complex]]></code>
  10082. </example>
  10083. </examples>
  10084. <arguments>
  10085. <argument token="M" description="The name of the map you wish to play"/>
  10086. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10087. </arguments>
  10088. </command>
  10089. <command name="tktf">
  10090. <description>Starts a map with the mode "Team Keep the Flag".</description>
  10091. <examples>
  10092. <example>
  10093. <code><![CDATA[tktf ac_mines]]></code>
  10094. </example>
  10095. </examples>
  10096. <arguments>
  10097. <argument token="M" description="The name of the map you wish to play"/>
  10098. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10099. </arguments>
  10100. </command>
  10101. <command name="tosok">
  10102. <description>Starts a map with the mode "Team One Shot, One Kill".</description>
  10103. <examples>
  10104. <example>
  10105. <code><![CDATA[tosok ac_complex]]></code>
  10106. </example>
  10107. </examples>
  10108. <arguments>
  10109. <argument token="M" description="The name of the map you wish to play"/>
  10110. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10111. </arguments>
  10112. </command>
  10113. <command name="tsurv">
  10114. <description>Starts a map with the mode "Team Survivor".</description>
  10115. <examples>
  10116. <example>
  10117. <code><![CDATA[tsurv ac_complex]]></code>
  10118. </example>
  10119. </examples>
  10120. <arguments>
  10121. <argument token="M" description="The name of the map you wish to play"/>
  10122. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10123. </arguments>
  10124. </command>
  10125. <command name="vip">
  10126. <description>Starts a map with the mode "Hunt the Flag". Some players prefer the name "VIP" for this mode.</description>
  10127. <examples>
  10128. <example>
  10129. <code><![CDATA[vip ac_mines]]></code>
  10130. </example>
  10131. </examples>
  10132. <arguments>
  10133. <argument token="M" description="The name of the map you wish to play"/>
  10134. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10135. </arguments>
  10136. </command>
  10137. <command name="surv">
  10138. <description>Starts a map with the mode "Survivor".</description>
  10139. <examples>
  10140. <example>
  10141. <code><![CDATA[surv ac_complex]]></code>
  10142. </example>
  10143. </examples>
  10144. <arguments>
  10145. <argument token="M" description="The name of the map you wish to play"/>
  10146. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10147. </arguments>
  10148. </command>
  10149. <command name="tpf">
  10150. <description>Starts a map with the mode "Team Pistol Frenzy".</description>
  10151. <examples>
  10152. <example>
  10153. <code><![CDATA[tpf ac_complex]]></code>
  10154. </example>
  10155. </examples>
  10156. <arguments>
  10157. <argument token="M" description="The name of the map you wish to play"/>
  10158. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10159. </arguments>
  10160. </command>
  10161. <command name="tlss">
  10162. <description>Starts a map with the mode "Team Last Swiss Standing".</description>
  10163. <examples>
  10164. <example>
  10165. <code><![CDATA[tlss ac_complex]]></code>
  10166. </example>
  10167. </examples>
  10168. <arguments>
  10169. <argument token="M" description="The name of the map you wish to play"/>
  10170. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10171. </arguments>
  10172. </command>
  10173. <command name="bpf">
  10174. <description>Starts a map with the mode "Bot Pistol Frenzy".</description>
  10175. <examples>
  10176. <example>
  10177. <code><![CDATA[bpf ac_complex]]></code>
  10178. </example>
  10179. </examples>
  10180. <arguments>
  10181. <argument token="M" description="The name of the map you wish to play"/>
  10182. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10183. </arguments>
  10184. </command>
  10185. <command name="blss">
  10186. <description>Starts a map with the mode "Bot Last Swiss Standing".</description>
  10187. <examples>
  10188. <example>
  10189. <code><![CDATA[blss ac_complex]]></code>
  10190. </example>
  10191. </examples>
  10192. <arguments>
  10193. <argument token="M" description="The name of the map you wish to play"/>
  10194. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10195. </arguments>
  10196. </command>
  10197. <command name="btdm">
  10198. <description>Starts a map with the mode "Bot Team Deathmatch".</description>
  10199. <examples>
  10200. <example>
  10201. <code><![CDATA[btdm ac_complex]]></code>
  10202. </example>
  10203. </examples>
  10204. <arguments>
  10205. <argument token="M" description="The name of the map you wish to play"/>
  10206. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10207. </arguments>
  10208. </command>
  10209. <command name="bdm">
  10210. <description>Starts a map with the mode "Bot Deathmatch".</description>
  10211. <examples>
  10212. <example>
  10213. <code><![CDATA[bdm ac_complex]]></code>
  10214. </example>
  10215. </examples>
  10216. <arguments>
  10217. <argument token="M" description="The name of the map you wish to play"/>
  10218. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10219. </arguments>
  10220. </command>
  10221. <command name="btsurv">
  10222. <description>Starts a map with the mode "Bot Team Survivor".</description>
  10223. <examples>
  10224. <example>
  10225. <code><![CDATA[btsurv ac_complex]]></code>
  10226. </example>
  10227. </examples>
  10228. <arguments>
  10229. <argument token="M" description="The name of the map you wish to play"/>
  10230. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10231. </arguments>
  10232. </command>
  10233. <command name="bosok">
  10234. <description>Starts a map with the mode "Bot One Shot, One Kill".</description>
  10235. <examples>
  10236. <example>
  10237. <code><![CDATA[bosok ac_complex]]></code>
  10238. </example>
  10239. </examples>
  10240. <arguments>
  10241. <argument token="M" description="The name of the map you wish to play"/>
  10242. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 10 minutes if T is 0 or not specified)"/>
  10243. </arguments>
  10244. </command>
  10245. <command name="btosok">
  10246. <description>Starts a map with the mode "Bot Team One Shot, One Kill".</description>
  10247. <examples>
  10248. <example>
  10249. <code><![CDATA[btosok ac_complex]]></code>
  10250. </example>
  10251. </examples>
  10252. <arguments>
  10253. <argument token="M" description="The name of the map you wish to play"/>
  10254. <argument token="T" valueNotes="1..60" description="The time limit, in minutes (default 15 minutes if T is 0 or not specified)"/>
  10255. </arguments>
  10256. </command>
  10257. </identifiers>
  10258. </section>
  10259. <!-- Game Modes Section Ends -->
  10260. <!-- Editing Configs Section Starts -->
  10261. <section name="Editing configs" sortindex="12">
  10262. <description>
  10263. All the below commands are used specifically in map configuration files.
  10264. Some of these commands can also be used without the need of a map configuration file.
  10265. </description>
  10266. <identifiers sort="true">
  10267. <command name="md2anim">
  10268. <arguments>
  10269. <argument token="A" description="anim"/>
  10270. <argument token="F" description="frame"/>
  10271. <argument token="R" description="range"/>
  10272. <argument token="S" description="speed"/>
  10273. </arguments>
  10274. </command>
  10275. <command name="md2emit">
  10276. <arguments>
  10277. <argument token="T" description="tag name"/>
  10278. <argument token="Y" description="particle type (integer or name)" valueNotes="SPARK (0), SMOKE (1), ECLOSEST (2),
  10279. BLOOD (3), DEMOTRACK (4), FIREBALL (5), SHOTLINE (6), BULLETHOLE (7), BLOODSTAIN (8), SCORCH (9), HUDMUZZLEFLASH (10),
  10280. MUZZLEFLASH (11), ELIGHT (12), ESPAWN (13), EAMMO (14), EPICKUP (15), EMODEL (16), ECARROT (17), ELADDER (18), EFLAG (19)"/>
  10281. <argument token="A" description="attribute 1"/>
  10282. <argument token="B" description="attribute 2"/>
  10283. </arguments>
  10284. </command>
  10285. <command name="md2tag">
  10286. <arguments>
  10287. <argument token="N" description="name"/>
  10288. <argument token="A" description="vert1"/>
  10289. <argument token="B" description="vert2"/>
  10290. <argument token="C" description="vert3"/>
  10291. <argument token="D" description="vert4"/>
  10292. </arguments>
  10293. </command>
  10294. <command name="md3anim">
  10295. <arguments>
  10296. <argument token="A" description="anim"/>
  10297. <argument token="S" description="startframe"/>
  10298. <argument token="R" description="range"/>
  10299. <argument token="V" description="speed"/>
  10300. </arguments>
  10301. </command>
  10302. <command name="md3emit">
  10303. <arguments>
  10304. <argument token="T" description="tag name"/>
  10305. <argument token="Y" description="particle type (integer or name)" valueNotes="SPARK (0), SMOKE (1), ECLOSEST (2),
  10306. BLOOD (3), DEMOTRACK (4), FIREBALL (5), SHOTLINE (6), BULLETHOLE (7), BLOODSTAIN (8), SCORCH (9), HUDMUZZLEFLASH (10),
  10307. MUZZLEFLASH (11), ELIGHT (12), ESPAWN (13), EAMMO (14), EPICKUP (15), EMODEL (16), ECARROT (17), ELADDER (18), EFLAG (19)"/>
  10308. <argument token="A" description="attribute 1"/>
  10309. <argument token="B" description="attribute 2"/>
  10310. </arguments>
  10311. </command>
  10312. <command name="md3link">
  10313. <arguments>
  10314. <argument token="P" description="parentno"/>
  10315. <argument token="C" description="childno"/>
  10316. <argument token="T" description="tag name"/>
  10317. </arguments>
  10318. </command>
  10319. <command name="md3load">
  10320. <arguments>
  10321. <argument token="M" description="model"/>
  10322. </arguments>
  10323. </command>
  10324. <command name="md3skin">
  10325. <arguments>
  10326. <argument token="N" description="object name"/>
  10327. <argument token="S" description="skin texture"/>
  10328. </arguments>
  10329. </command>
  10330. <command name="mdlalphatest">
  10331. <arguments>
  10332. <argument token="A" description="alphatest"/>
  10333. </arguments>
  10334. </command>
  10335. <command name="mdlalphablend">
  10336. <arguments>
  10337. <argument token="A" description="alphablend"/>
  10338. </arguments>
  10339. </command>
  10340. <command name="mdlcachelimit">
  10341. <arguments>
  10342. <argument token="L" description="cachelimit"/>
  10343. </arguments>
  10344. </command>
  10345. <command name="mdlcullface">
  10346. <arguments>
  10347. <argument token="C" description="cullface" valueNotes="0 or 1"/>
  10348. </arguments>
  10349. </command>
  10350. <command name="mdlscale">
  10351. <arguments>
  10352. <argument token="P" description="percent" valueNotes="0..100..N*100"/>
  10353. </arguments>
  10354. </command>
  10355. <command name="mdlshadowdist">
  10356. <arguments>
  10357. <argument token="D" description="shadow distance"/>
  10358. </arguments>
  10359. </command>
  10360. <command name="mdltrans">
  10361. <description>Translates (= moves) the model.</description>
  10362. <arguments>
  10363. <argument token="X"/>
  10364. <argument token="Y"/>
  10365. <argument token="Z"/>
  10366. </arguments>
  10367. </command>
  10368. <command name="mdltranslucent">
  10369. <arguments>
  10370. <argument token="T" description="translucency" valueNotes="0..100..N*100"/>
  10371. </arguments>
  10372. </command>
  10373. <command name="mdlvertexlight">
  10374. <arguments>
  10375. <argument token="V" description="vertexligh" valueNotes="0 or 1"/>
  10376. </arguments>
  10377. </command>
  10378. <command name="mdlattribute">
  10379. <description>Adds a value for a specified attribute to the model.</description>
  10380. <remarks>
  10381. <remark>
  10382. If used, specifies that the current model depends on parts of another custom model
  10383. (which therefore also has to be downloaded) can only be used once per model config.
  10384. </remark>
  10385. <remark>
  10386. Example: 'mdlattribute' requires 'makke/signs/exit' could be used in 'signs/loading-dock/md2.cfg'
  10387. to reuse 'makke/signs/exit/tris.md2' .
  10388. </remark>
  10389. </remarks>
  10390. <arguments>
  10391. <argument token="A" description="attribute" valueNotes="keywords, desc, defaults, usage, author, license, distribution, version, requires"/>
  10392. <argument token="V" description="value" valueNotes=""/>
  10393. </arguments>
  10394. <references>
  10395. <identifierReference identifier="getmapmodelattributes"/>
  10396. <identifierReference identifier="listallmapmodelattributes"/>
  10397. <identifierReference identifier="mapmodelregister"/>
  10398. </references>
  10399. </command>
  10400. <variable name="fog">
  10401. <description>Sets the fog distance.</description>
  10402. <value token="N" description="The fog distance" minValue="64" maxValue="1024" valueNotes="distance in cubes" defaultValue="180"/>
  10403. <remarks>
  10404. <remark>
  10405. You can do this for tweaking the visual effect of the fog, or if you are on a slow machine,
  10406. setting the fog to a low value can also be a very effective way to increase fps (if you are geometry limited).
  10407. Try out different values on big maps / maps which give you low fps. It is also good for aesthetic features of maps
  10408. especially when combined with "fogcolour".
  10409. </remark>
  10410. </remarks>
  10411. <references>
  10412. <identifierReference identifier="fogcolour"/>
  10413. </references>
  10414. </variable>
  10415. <variable name="fogcolour">
  10416. <description>Sets the fog and clearing colour.</description>
  10417. <value token="C" description="The colour" minValue="0" maxValue="16777215" valueNotes="Hexadecimal colour" defaultValue="0x8099B3"/>
  10418. <references>
  10419. <identifierReference identifier="fog"/>
  10420. </references>
  10421. </variable>
  10422. <command name="loadnotexture">
  10423. <description>Binds a texture to be used if a slot couldn't be loaded with a given textures path.</description>
  10424. <remarks>
  10425. <remark>
  10426. Binds the texture indicated in the filename to the texture slot of any textures that aren't found.
  10427. The path is given exactly as with the texture-command, if it is omitted (or can't be loaded) the default is used.
  10428. The default is located in packages/misc/notexture.jpg (not in packages/textures - where custom ones must reside!)
  10429. </remark>
  10430. </remarks>
  10431. <examples>
  10432. <example>
  10433. <code><![CDATA[loadnotexture // Reset to default]]></code>
  10434. </example>
  10435. <example>
  10436. <code><![CDATA[loadnotexture "makke/black.jpg" // Any missing texture will show up black]]></code>
  10437. </example>
  10438. </examples>
  10439. <references>
  10440. <identifierReference identifier="texture"/>
  10441. <identifierReference identifier="texturereset"/>
  10442. <identifierReference identifier="getnotexture"/>
  10443. </references>
  10444. <arguments>
  10445. <argument token="F" description="file name of the texture to bind" valueNotes="string"/>
  10446. </arguments>
  10447. </command>
  10448. <command name="getnotexture">
  10449. <description>Returns the current "notexture" path (set by loadnotexture).</description>
  10450. <references>
  10451. <identifierReference identifier="loadnotexture"/>
  10452. </references>
  10453. <examples>
  10454. <example>
  10455. <code><![CDATA[echo (getnotexture)]]></code>
  10456. </example>
  10457. </examples>
  10458. </command>
  10459. <variable name="loadsky">
  10460. <description>Loads a skymap for a map.</description>
  10461. <remarks>
  10462. <remark>The available skymaps reside in packages/textures/skymaps/..</remark>
  10463. <remark>
  10464. The skymap name in the argument is required to start with "textures/skymaps/",
  10465. but that part of the path can be omitted, and it should be used only up to the underscore "_" in the filename.
  10466. </remark>
  10467. <remark>You can get the current skymap name with the $loadsky variable.</remark>
  10468. </remarks>
  10469. <examples>
  10470. <example>
  10471. <code><![CDATA[loadsky makke/mountain]]></code>
  10472. </example>
  10473. <example>
  10474. <code><![CDATA[loadsky textures/skymaps/makke/mountain]]></code>
  10475. </example>
  10476. </examples>
  10477. <arguments>
  10478. <argument token="P" description="path to skymap textures" valueNotes="string"/>
  10479. </arguments>
  10480. </variable>
  10481. <command name="mapmodel">
  10482. <description>Registers a mapmodel that can be placed in maps.</description>
  10483. <remarks>
  10484. <remark>
  10485. A mapmodel registered with this command can be placed in a map using the 'newent mapmodel' command.
  10486. The bounding box is an invisible force surrounding the model, allowing players to collide against it, instead
  10487. of walking through the mapmodel. For more information about this command, read mapediting5.xml.
  10488. </remark>
  10489. <remark>Example: mapmodel 4 2 4 0 "modelname"</remark>
  10490. <remark>This mapmodel has a bounding box of 8x8x2 in size (X/Y/Z) and by default hovers 4 units above ground.</remark>
  10491. <remark>It also returns the number of the created slot, example: echo (mapmodel ...)</remark>
  10492. </remarks>
  10493. <references>
  10494. <identifierReference identifier="newent mapmodel"/>
  10495. <identifierReference identifier="mapmodelreset"/>
  10496. <identifierReference identifier="loadallmapmodels"/>
  10497. <identifierReference identifier="mapmodelslotname"/>
  10498. <identifierReference identifier="mapmodelslotbyname"/>
  10499. <identifierReference identifier="mapmodelslotusage"/>
  10500. <identifierReference identifier="editmapmodelslot"/>
  10501. <identifierReference identifier="deletemapmodelslot"/>
  10502. <identifierReference identifier="sortmapmodelslots"/>
  10503. <identifierReference identifier="mapmodelchanged"/>
  10504. <identifierReference identifier="listallmapmodelattributes"/>
  10505. <identifierReference identifier="getmapmodelattributes"/>
  10506. </references>
  10507. <arguments>
  10508. <argument token="R" description="The square radius of the bounding box." valueNotes="integer"/>
  10509. <argument token="H" description="The height of the bounding box." valueNotes="integer"/>
  10510. <argument token="Z" description="The initial height offset from the ground." valueNotes="integer"/>
  10511. <argument token="0" description="This integer is redundant. Leave it at zero so you don't break the command." valueNotes="0"/>
  10512. <argument token="N" description="The name of the map model" valueNotes="string"/>
  10513. <argument token="F" description="If '1', the model is preloaded, even if no entities use it" optional="true" valueNotes="1"/>
  10514. </arguments>
  10515. </command>
  10516. <command name="mapmodelreset">
  10517. <description>Resets the mapmodel slots/indices to 0 for the subsequent "mapmodel" commands.</description>
  10518. <remarks>
  10519. <remark>Each subsequent mapmodel command increases it again. See config/default_map_settings.cfg for an example.</remark>
  10520. </remarks>
  10521. <references>
  10522. <identifierReference identifier="mapmodel"/>
  10523. <identifierReference identifier="newent mapmodel"/>
  10524. </references>
  10525. </command>
  10526. <command name="mapsound">
  10527. <description>Defines a mapsound.</description>
  10528. <remarks>
  10529. <remark>
  10530. Registers the sound as a map-specific sound. These map-specific sounds may currently
  10531. only be used with "sound" entities within a map. The first map sound registered in a map has slot/index number 0
  10532. and increases afterwards.
  10533. </remark>
  10534. <remark>It also returns the number of the created slot, example: echo (mapsound ...)</remark>
  10535. </remarks>
  10536. <references>
  10537. <identifierReference identifier="newent sound"/>
  10538. <identifierReference identifier="mapsoundreset"/>
  10539. <identifierReference identifier="getmapsoundlist"/>
  10540. <identifierReference identifier="getmapsoundorigin"/>
  10541. <identifierReference identifier="mapsoundslotbyname"/>
  10542. <identifierReference identifier="mapsoundslotusage"/>
  10543. <identifierReference identifier="editmapsoundslot"/>
  10544. <identifierReference identifier="deletemapsoundslot"/>
  10545. <identifierReference identifier="sortmapsoundslots"/>
  10546. <identifierReference identifier="mapsoundchanged"/>
  10547. </references>
  10548. <arguments>
  10549. <argument token="P" description="Path to the sound file"/>
  10550. <argument token="M" description="Maximum simultaneous sounds/maxuses" optional="true" valueNotes="default -1 (unlimited)"/>
  10551. </arguments>
  10552. </command>
  10553. <command name="mapsoundreset">
  10554. <description>Resets the mapsound slots/indices to 0 for the subsequent "mapsound" commands.</description>
  10555. <remarks>
  10556. <remark>Each subsequent mapsound command increases it again. See config/default_map_settings.cfg for an example.</remark>
  10557. </remarks>
  10558. <references>
  10559. <identifierReference identifier="newent sound"/>
  10560. <identifierReference identifier="mapsound"/>
  10561. </references>
  10562. </command>
  10563. <command name="texture">
  10564. <description>Binds a texture to the current texture slot.</description>
  10565. <remarks>
  10566. <remark>Binds the texture indicated in the filename to the current texture slot and increments the slot number.</remark>
  10567. <remark>The texture is rendered at the given scale. At scale 1.0 (or if scale is 0), 32x32 texels cover one cube. At scale 2.0, which is the current maximum, it's 64x64.</remark>
  10568. <remark>It also returns the number of the created slot, example: echo (texture ...)</remark>
  10569. </remarks>
  10570. <references>
  10571. <identifierReference identifier="loadnotexture"/>
  10572. <identifierReference identifier="texturereset"/>
  10573. <identifierReference identifier="hirestextures"/>
  10574. <identifierReference identifier="gettexturelist"/>
  10575. <identifierReference identifier="gettextureorigin"/>
  10576. <identifierReference identifier="textureslotusage"/>
  10577. <identifierReference identifier="textureslotusagelist"/>
  10578. <identifierReference identifier="textureslotbyname"/>
  10579. <identifierReference identifier="deletetextureslot"/>
  10580. <identifierReference identifier="edittextureslot"/>
  10581. <identifierReference identifier="edittexturestack"/>
  10582. <identifierReference identifier="sorttextureslots"/>
  10583. </references>
  10584. <arguments>
  10585. <argument token="S" description="Scale of the texture to load (should be a power of two)." valueNotes="Float"/>
  10586. <argument token="F" description="File name of the texture to bind" valueNotes="string"/>
  10587. </arguments>
  10588. </command>
  10589. <command name="texturereset">
  10590. <description>Sets the texture slots/indicies to 0 for the subsequent "texture" commands.</description>
  10591. <remarks>
  10592. <remark>Each subsequent texture command increases it again. See config/default_map_settings.cfg for an example.</remark>
  10593. </remarks>
  10594. <references>
  10595. <identifierReference identifier="texture"/>
  10596. </references>
  10597. </command>
  10598. <command name="watercolour">
  10599. <description>Determines the water colour in a map.</description>
  10600. <remarks>
  10601. <remark>
  10602. You must define at least 3 first values, otherwise this command may not work
  10603. correctly (use "1" as a placeholder if needed).
  10604. </remark>
  10605. </remarks>
  10606. <arguments>
  10607. <argument token="R" description="red colour intensity" valueNotes="1..255"/>
  10608. <argument token="G" description="green colour intensity" valueNotes="1..255"/>
  10609. <argument token="B" description="blue colour intensity" valueNotes="1..255"/>
  10610. <argument token="A" description="alpha value (transparency)" valueNotes="0..255 (default 178)"/>
  10611. </arguments>
  10612. <references>
  10613. <identifierReference identifier="getwatercolour"/>
  10614. <identifierReference identifier="setwatercolour"/>
  10615. <identifierReference identifier="waterlevel"/>
  10616. </references>
  10617. </command>
  10618. <command name="hexbinchunk">
  10619. <description>Part of a map file</description>
  10620. <arguments>
  10621. <argument token="C" description="chunk of mapdata" valueNotes="up to 24 bytes in hex"/>
  10622. </arguments>
  10623. <remarks>
  10624. <remark>Internal – for XMAP – not intended for manual use</remark>
  10625. </remarks>
  10626. <references>
  10627. <identifierReference identifier="restorexmap"/>
  10628. </references>
  10629. </command>
  10630. <command name="restorexmap">
  10631. <description>Declaration of map parts.</description>
  10632. <arguments>
  10633. <argument token="*" description="many combinations" valueNotes="read the source"/>
  10634. </arguments>
  10635. <remarks>
  10636. <remark>Internal – for XMAP – not intended for manual use</remark>
  10637. </remarks>
  10638. <references>
  10639. <identifierReference identifier="hexbinchunk"/>
  10640. </references>
  10641. </command>
  10642. <variable name="persistentxmaps">
  10643. <description>Whether or not to save all xmaps on exist and restore them at game start.</description>
  10644. <value token="B" description="boolean" minValue="0" maxValue="1" valueNotes="1:persistent" defaultValue="1"/>
  10645. <remarks>
  10646. <remark>XMAP allows for visual comparison between maps.</remark>
  10647. <remark>TODO: elaborate</remark>
  10648. </remarks>
  10649. <references>
  10650. <identifierReference identifier="xmap_list"/>
  10651. </references>
  10652. </variable>
  10653. </identifiers>
  10654. </section>
  10655. <!-- Editing Configs Section Ends -->
  10656. <!-- Bot mode Section Starts -->
  10657. <section name="Bot mode" sortindex="15">
  10658. <description>This section describes bot mode related identifiers. See also "docs/cube_bot-readme.txt".</description>
  10659. <identifiers sort="true">
  10660. <command name="idlebots">
  10661. <description>Enables or disables the processing of the bots artificial intelligence.</description>
  10662. <arguments>
  10663. <argument token="T" description="off OR on" valueNotes="0 or 1"/>
  10664. </arguments>
  10665. <examples>
  10666. <example>
  10667. <code><![CDATA[idlebots 1]]></code>
  10668. <explanation>Will make the bots stand still.</explanation>
  10669. </example>
  10670. <example>
  10671. <code><![CDATA[idlebots 0]]></code>
  10672. <explanation>Will enable the bots to move and shoot.</explanation>
  10673. </example>
  10674. </examples>
  10675. </command>
  10676. <command name="kickallbots">
  10677. <description>Kicks all bots out of the current game.</description>
  10678. </command>
  10679. <command name="kickbot">
  10680. <description>Kicks the bot with the given name out of the current game.</description>
  10681. <arguments>
  10682. <argument token="N" description="botname" valueNotes="name of the bot to kick."/>
  10683. </arguments>
  10684. <examples>
  10685. <example>
  10686. <code><![CDATA[kickbot Robbie]]></code>
  10687. <explanation>Will make the bot named "Robbie" dissapear from the current game.</explanation>
  10688. </example>
  10689. </examples>
  10690. </command>
  10691. <command name="addbot">
  10692. <description>Adds a bot for a given team with a given skill calling him a given name.</description>
  10693. <arguments>
  10694. <argument token="T" description="team" valueNotes="RVSF or CLA"/>
  10695. <argument token="S" description="skill" valueNotes="best, good, medium, worse, bad"/>
  10696. <argument token="N" description="name" valueNotes="name for the bot"/>
  10697. </arguments>
  10698. <remarks>
  10699. <remark>This command only works for single player modes.</remark>
  10700. </remarks>
  10701. <examples>
  10702. <example>
  10703. <code><![CDATA[addbot RVSF medium Robbie]]></code>
  10704. <explanation>Will add a bot named Robbie with a medium skill level to the RVSF team.</explanation>
  10705. </example>
  10706. </examples>
  10707. </command>
  10708. <command name="addnbot">
  10709. <description>Adds a given count of bots for the given team with the given skill and select random names for them.</description>
  10710. <arguments>
  10711. <argument token="C" description="count" valueNotes="how many bots to add"/>
  10712. <argument token="T" description="team" valueNotes="RVSF or CLA"/>
  10713. <argument token="S" description="skill" valueNotes="best, good, medium, worse, bad"/>
  10714. </arguments>
  10715. <remarks>
  10716. <remark>This command only works for single player modes.</remark>
  10717. <remark>The name of the bots will be selected randomly.</remark>
  10718. </remarks>
  10719. <examples>
  10720. <example>
  10721. <code><![CDATA[addnbot 2 CLA bad]]></code>
  10722. <explanation>Will add 2 bots with a bad skill level to the CLA team.</explanation>
  10723. </example>
  10724. </examples>
  10725. </command>
  10726. <command name="botskill">
  10727. <description>Changes the skill level for the given bot.</description>
  10728. <arguments>
  10729. <argument token="N" description="botname" valueNotes="the name of the bot"/>
  10730. <argument token="S" description="botskill" valueNotes="best, good, medium, worse, bad"/>
  10731. </arguments>
  10732. <examples>
  10733. <example>
  10734. <code><![CDATA[botskill Robbie best]]></code>
  10735. <explanation>Changes the previous bot skill level of the bot named Robbie to a 'best' skill level.</explanation>
  10736. </example>
  10737. </examples>
  10738. </command>
  10739. <command name="botskillall">
  10740. <description>Changes the skill level for all bots.</description>
  10741. <arguments>
  10742. <argument token="S" description="botskill" valueNotes="best, good, medium, worse, bad"/>
  10743. </arguments>
  10744. <examples>
  10745. <example>
  10746. <code><![CDATA[botskillall worse]]></code>
  10747. <explanation>Changes the previous bot skill level for all bots to a 'worse' skill level.</explanation>
  10748. </example>
  10749. </examples>
  10750. </command>
  10751. <command name="botsshoot">
  10752. <description>Enables or disables the ability of the bots to fire their weapons.</description>
  10753. <arguments>
  10754. <argument token="T" description="shooting bots?" valueNotes="0 or 1"/>
  10755. </arguments>
  10756. <examples>
  10757. <example>
  10758. <code><![CDATA[botsshoot 0]]></code>
  10759. <explanation>Bots won't shoot.</explanation>
  10760. </example>
  10761. </examples>
  10762. </command>
  10763. <variable name="xhairwpsel">
  10764. <description>Determines if bot waypoints should be selected/placed using the crosshair or by the nearest location to your player.</description>
  10765. <value token="V" description="Note: This is turned on by default." minValue="0" maxValue="1" defaultValue="1"/>
  10766. </variable>
  10767. <command name="setjumpwp">
  10768. <references>
  10769. <identifierReference identifier="unsetjumpwp"/>
  10770. </references>
  10771. </command>
  10772. <command name="unsetjumpwp">
  10773. <references>
  10774. <identifierReference identifier="setjumpwp"/>
  10775. </references>
  10776. </command>
  10777. <command name="setwptriggernr">
  10778. <description>Assigns a number to the nearest waypoint.</description>
  10779. <remarks>
  10780. <remark>This is only used for trigger waypoints, so that the bots go to triggers in the right order. If you don't do this bots will search for every trigger, even when they are not reachable yet.</remark>
  10781. </remarks>
  10782. <arguments>
  10783. <argument token="N" description="number"/>
  10784. </arguments>
  10785. </command>
  10786. <command name="wpclear"/>
  10787. <command name="wpflood"/>
  10788. <command name="wpinfo">
  10789. <description>Makes waypoints visible and either turns on or off the waypoint information display.</description>
  10790. <arguments>
  10791. <argument token="Y" description="show info?" valueNotes="0 or 1"/>
  10792. </arguments>
  10793. </command>
  10794. <command name="wpload"/>
  10795. <command name="wpsave"/>
  10796. <command name="wpvisible">
  10797. <arguments>
  10798. <argument token="V" description="visible" valueNotes="0 or 1"/>
  10799. </arguments>
  10800. </command>
  10801. <command name="setwpyaw">
  10802. <description>Takes the current player yaw for the current waypoint.</description>
  10803. </command>
  10804. <command name="togglebotview">
  10805. <description>When used you will see what the bot sees.</description>
  10806. <remarks>
  10807. <remark>Type it again (with or without name) to return to the game (you will respawn).</remark>
  10808. </remarks>
  10809. <arguments>
  10810. <argument token="N" description="botname" valueNotes="the name of the bot"/>
  10811. </arguments>
  10812. </command>
  10813. <command name="addpath1way1"/>
  10814. <command name="addpath1way2"/>
  10815. <command name="addpath2way1"/>
  10816. <command name="addpath2way2"/>
  10817. <command name="addwp">
  10818. <description>Adds a bot waypoint at the current position.</description>
  10819. <arguments>
  10820. <argument token="A" description="connect automatically" valueNotes="0 or 1"/>
  10821. </arguments>
  10822. </command>
  10823. <command name="autowp">
  10824. <description>Automatically places waypoints.</description>
  10825. <argument token="O" description="on" valueNotes="0 or 1"/>
  10826. </command>
  10827. <command name="delpath1way1"/>
  10828. <command name="delpath1way2"/>
  10829. <command name="delpath2way1"/>
  10830. <command name="delpath2way2"/>
  10831. <command name="delwp">
  10832. <description>Deletes the selected waypoint.</description>
  10833. </command>
  10834. </identifiers>
  10835. </section>
  10836. <!-- Bot mode Section Ends -->
  10837. <!-- Optional Section Starts -->
  10838. <section name="Optional" sortindex="16">
  10839. <description>This section describes optional identifiers from the files in config/opt/ folder and commands, which enable them.</description>
  10840. <identifiers sort="true">
  10841. <scriptalias name="load_autosave">
  10842. <description>Loads optional obsolete autosave settings.</description>
  10843. <remarks>
  10844. <remark>To see the obsolete autosave settings, look at config/opt/autosave.cfg file.</remark>
  10845. </remarks>
  10846. </scriptalias>
  10847. <scriptalias name="load_compatibility">
  10848. <description>Loads optional compatibility settings for old scripts.</description>
  10849. <remarks>
  10850. <remark>To see the compatibility settings, look at config/opt/compatibility.cfg file.</remark>
  10851. </remarks>
  10852. </scriptalias>
  10853. <scriptalias name="load_survival">
  10854. <description>Loads optional settings for bot survival mode.</description>
  10855. <remarks>
  10856. <remark>To see the settings for survival, look at config/opt/survival.cfg file.</remark>
  10857. <remark>The settings are loaded, when bot survival mode is started via menu.</remark>
  10858. </remarks>
  10859. </scriptalias>
  10860. <scriptalias name="load_parsestring">
  10861. <description>Loads optional settings for string parsing.</description>
  10862. <remarks>
  10863. <remark>To see the string parsing settings, look at config/opt/parsestring.cfg file.</remark>
  10864. </remarks>
  10865. </scriptalias>
  10866. <scriptalias name="load_faq">
  10867. <description>Loads optional FAQ settings.</description>
  10868. <remarks>
  10869. <remark>To see the FAQ settings, look at config/opt/faq.cfg file.</remark>
  10870. <remark>The settings are loaded, when FAQ is open in menu.</remark>
  10871. </remarks>
  10872. </scriptalias>
  10873. <scriptalias name="load_convmap">
  10874. <description>Loads batch map conversion tools.</description>
  10875. <remarks>
  10876. <remark>To see the map conversion tools, look at config/opt/convmap.cfg file.</remark>
  10877. </remarks>
  10878. </scriptalias>
  10879. <scriptalias name="load_mapeditscripts">
  10880. <description>Loads extra map editing scripts.</description>
  10881. <remarks>
  10882. <remark>To see the map editing scripts, look at config/opt/mapeditscripts.cfg file.</remark>
  10883. </remarks>
  10884. </scriptalias>
  10885. <command name="parsestring">
  10886. <description>Loops through every character in the given string and executes the given block of cubescript on each iteration.</description>
  10887. <examples>
  10888. <example>
  10889. <code><![CDATA[parsestring "Hello world" iter [echo $iter]]]></code>
  10890. <explanation>Uses echo on every character in the string: "Hello world"</explanation>
  10891. </example>
  10892. <example>
  10893. <code><![CDATA[parsestring "Hello world" iter [echo (concatword "Char #" $__iter ": " $iter)]]]></code>
  10894. <explanation>Uses echo on every character in the string: "Hello world" --- Also outputs the position of each character in the string.</explanation>
  10895. </example>
  10896. <example>
  10897. <code><![CDATA[backwardsstring = []; parsestring "This will look interesting backwards." iter [backwardsstring = (concatword $backwardsstring $iter); if (= $__iter 0) [echo $backwardsstring]] 1]]></code>
  10898. <explanation>Outputs: ".sdrawkcab gnitseretni kool lliw sihT"</explanation>
  10899. </example>
  10900. <example>
  10901. <code><![CDATA[parsestring "abcdefghijklmnopqrstuvwxyz" iter [if (> $__iter 4) breakparse [echo $iter]]]]></code>
  10902. <explanation>Example usage of the breakparse command. Uses echo on characters a through e, then breaks out of the parse.</explanation>
  10903. </example>
  10904. </examples>
  10905. <arguments>
  10906. <argument token="S" description="string" valueNotes="string to parse"/>
  10907. <argument token="A" description="string" valueNotes="name of alias to use as iterator"/>
  10908. <argument token="C" description="string" valueNotes="cubescript to execute on each iteration"/>
  10909. <argument token="B" description="integer" valueNotes="non-zero to force backwards parse" optional="true"/>
  10910. </arguments>
  10911. <remarks>
  10912. <remark>Important: A secondary iterator alias (prefixed with a double underscore "__") is automatically created before each iteration that contains the character position data.</remark>
  10913. </remarks>
  10914. <references>
  10915. <identifierReference identifier="load_parsestring"/>
  10916. <identifierReference identifier="breakparse"/>
  10917. <identifierReference identifier="substr"/>
  10918. <identifierReference identifier="trimAllWhitespace"/>
  10919. <identifierReference identifier="trimAllUnnecessaryWhitespace"/>
  10920. </references>
  10921. </command>
  10922. <command name="breakparse">
  10923. <description>Breaks out of a parsestring loop.</description>
  10924. <remarks>
  10925. <remark>Important: this command should only be used within the 3rd argument (the cubescript to execute) of parsestring.</remark>
  10926. </remarks>
  10927. <references>
  10928. <identifierReference identifier="load_parsestring"/>
  10929. <identifierReference identifier="parsestring"/>
  10930. </references>
  10931. </command>
  10932. <command name="trimAllWhitespace">
  10933. <description>Removes all whitespace characters from the given string.</description>
  10934. <examples>
  10935. <example>
  10936. <code><![CDATA[echo (trimAllWhitespace " H e ll o w o r l d ")]]></code>
  10937. <explanation>Outputs: Helloworld</explanation>
  10938. </example>
  10939. </examples>
  10940. <arguments>
  10941. <argument token="S" description="string" valueNotes="string to modify"/>
  10942. </arguments>
  10943. <references>
  10944. <identifierReference identifier="load_parsestring"/>
  10945. <identifierReference identifier="trimAllUnnecessaryWhitespace"/>
  10946. <identifierReference identifier="parsestring"/>
  10947. </references>
  10948. </command>
  10949. <command name="trimAllUnnecessaryWhitespace">
  10950. <description>Removes all unnecessary leading and trailing whitespace characters from the given string.</description>
  10951. <examples>
  10952. <example>
  10953. <code><![CDATA[echo (trimAllUnnecessaryWhitespace " H e ll o w o r l d ")]]></code>
  10954. <explanation>Outputs: "H e ll o w o r l d"</explanation>
  10955. </example>
  10956. </examples>
  10957. <arguments>
  10958. <argument token="S" description="string" valueNotes="string to modify"/>
  10959. </arguments>
  10960. <references>
  10961. <identifierReference identifier="load_parsestring"/>
  10962. <identifierReference identifier="trimAllWhitespace"/>
  10963. <identifierReference identifier="parsestring"/>
  10964. </references>
  10965. </command>
  10966. <command name="survival">
  10967. <description>Prepares a round of bot survival mode on the specified map.</description>
  10968. <remarks>
  10969. <remark>
  10970. All official maps are compatible with survival, if you want to play survival on a custom map,
  10971. prior edits/additions to the script are necessary, such as adding a zone for that specific map.
  10972. </remark>
  10973. </remarks>
  10974. <arguments>
  10975. <argument token="M" description="the map to use"/>
  10976. <argument token="D" description="the difficulty" valueNotes="0 = easy, 1 = intermediate, 2 = hard, 3 = impossible" optional="true"/>
  10977. </arguments>
  10978. <references>
  10979. <identifierReference identifier="load_survival"/>
  10980. </references>
  10981. </command>
  10982. <command name="changegamma">
  10983. <description>Smoothly changes your gamma to the specified value.</description>
  10984. <remarks>
  10985. <remark>Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu.</remark>
  10986. </remarks>
  10987. <arguments>
  10988. <argument token="G" description="the gamma to change to"/>
  10989. <argument token="M" description="milliseconds between gamma changes"/>
  10990. </arguments>
  10991. <examples>
  10992. <example>
  10993. <code><![CDATA[changegamma 300 30]]></code>
  10994. <explanation>Every 30 milliseconds your gamma is changed by 1 until it reaches its goal of gamma 300.</explanation>
  10995. </example>
  10996. </examples>
  10997. <references>
  10998. <identifierReference identifier="load_survival"/>
  10999. <identifierReference identifier="gamma"/>
  11000. <identifierReference identifier="changespeed"/>
  11001. </references>
  11002. </command>
  11003. <command name="changespeed">
  11004. <description>Smoothly changes your gamespeed to the specified value.</description>
  11005. <remarks>
  11006. <remark>Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu.</remark>
  11007. </remarks>
  11008. <arguments>
  11009. <argument token="S" description="the gamespeed to change to"/>
  11010. <argument token="M" description="milliseconds between gamespeed changes"/>
  11011. </arguments>
  11012. <examples>
  11013. <example>
  11014. <code><![CDATA[changespeed 1000 30]]></code>
  11015. <explanation>Every 30 milliseconds your gamespeed is changed by 1 until it reaches its goal of gamespeed 1000.</explanation>
  11016. </example>
  11017. </examples>
  11018. <references>
  11019. <identifierReference identifier="load_survival"/>
  11020. <identifierReference identifier="gamespeed"/>
  11021. <identifierReference identifier="changegamma"/>
  11022. </references>
  11023. </command>
  11024. <command name="alive">
  11025. <description>Returns 1 if the local player is alive.</description>
  11026. <examples>
  11027. <example>
  11028. <code><![CDATA[echo (alive)]]></code>
  11029. <explanation>Output: 1</explanation>
  11030. </example>
  11031. </examples>
  11032. <references>
  11033. <identifierReference identifier="load_compatibility"/>
  11034. </references>
  11035. </command>
  11036. <command name="curmode">
  11037. <description>Returns the mode number for the current game.</description>
  11038. <references>
  11039. <identifierReference identifier="load_compatibility"/>
  11040. <identifierReference identifier="gamemode"/>
  11041. <identifierReference identifier="curmap"/>
  11042. <identifierReference identifier="map"/>
  11043. <identifierReference identifier="mode"/>
  11044. </references>
  11045. </command>
  11046. <command name="currole">
  11047. <description>Returns 1 if the local player has admin privileges, 0 otherwise.</description>
  11048. <references>
  11049. <identifierReference identifier="load_compatibility"/>
  11050. <identifierReference identifier="setadmin"/>
  11051. <identifierReference identifier="connectadmin"/>
  11052. </references>
  11053. </command>
  11054. <command name="curteam">
  11055. <description>Returns an integer indicating what team a client is currently on.</description>
  11056. <arguments>
  11057. <argument token="C" description="client number" valueNotes="returns the specified client's team instead" optional="true"/>
  11058. </arguments>
  11059. <remarks>
  11060. <remark>Returns 0 for CLA, 1 for RVSF.</remark>
  11061. <remark>Returns 2 for CLA-spectator, 3 for RVSF-spectator.</remark>
  11062. <remark>Returns 4 for spectator.</remark>
  11063. <remark>By default this command returns what team *you* (player1) are currently on.</remark>
  11064. </remarks>
  11065. <references>
  11066. <identifierReference identifier="load_compatibility"/>
  11067. <identifierReference identifier="team"/>
  11068. <identifierReference identifier="forceteam"/>
  11069. <identifierReference identifier="skin"/>
  11070. </references>
  11071. </command>
  11072. <command name="findpn">
  11073. <description>Finds player name with this client number.</description>
  11074. <arguments>
  11075. <argument token="CN" description="client number"/>
  11076. </arguments>
  11077. <references>
  11078. <identifierReference identifier="load_compatibility"/>
  11079. </references>
  11080. </command>
  11081. <command name="getclientmode">
  11082. <description>Returns the current game mode number.</description>
  11083. <references>
  11084. <identifierReference identifier="load_compatibility"/>
  11085. </references>
  11086. </command>
  11087. <variable name="orderscorecolumns">
  11088. <description>Show the client number column on the scoreboard first?</description>
  11089. <value token="N" description="CN column order" minValue="0" maxValue="1" defaultValue="0" valueNotes="0 (false), 1 (true)"/>
  11090. <references>
  11091. <identifierReference identifier="load_compatibility"/>
  11092. </references>
  11093. </variable>
  11094. <command name="pstat_score">
  11095. <description>Returns the score statistics for the player with the given client number.</description>
  11096. <arguments>
  11097. <argument token="CN" description="client number" valueNotes="0..N"/>
  11098. </arguments>
  11099. <examples>
  11100. <example>
  11101. <code>
  11102. <![CDATA[
  11103. echo (pstat_score 0)
  11104. ]]>
  11105. </code>
  11106. <explanation>Output: 0 5 3 43 1 1 unarmed</explanation>
  11107. <explanation>The output is a list of FLAGS, FRAGS, DEATHS, POINTS, TEAM, TEAMKILLS, and NAME.</explanation>
  11108. </example>
  11109. </examples>
  11110. <references>
  11111. <identifierReference identifier="load_compatibility"/>
  11112. <identifierReference identifier="start_intermission"/>
  11113. <identifierReference identifier="pstat_weap"/>
  11114. </references>
  11115. </command>
  11116. <command name="showedithide">
  11117. <description>Shows the settings for hidden entities (sparklies).</description>
  11118. <references>
  11119. <identifierReference identifier="setedithide"/>
  11120. <identifierReference identifier="seteditshow"/>
  11121. </references>
  11122. </command>
  11123. <command name="setedithide">
  11124. <description>Hides the list of entity types you set.</description>
  11125. <arguments>
  11126. <argument token="L" description="list of entity types to hide" valueNotes="light, playerstart, pistol, ammobox, grenades, health, helmet, armour, akimbo, mapmodel, ladder, ctf-flag, sound, clip, plclip"/>
  11127. </arguments>
  11128. <remarks>
  11129. <remark>Call "setedithide [lights mapmodels]" to just hide all lights and mapmodels.</remark>
  11130. <remark>Only shown entity types are potential 'closest entity'.</remark>
  11131. <remark>"setedithide" without any arguments restores visibility of all entities.</remark>
  11132. </remarks>
  11133. <references>
  11134. <identifierReference identifier="seteditshow"/>
  11135. <identifierReference identifier="showedithide"/>
  11136. </references>
  11137. </command>
  11138. <command name="seteditshow">
  11139. <description>Hides all but the single entity type you give.</description>
  11140. <arguments>
  11141. <argument token="T" description="the entity type to show exclusively" valueNotes="light, playerstart, pistol, ammobox, grenades, health, helmet, armour, akimbo, mapmodel, ladder, ctf-flag, sound, clip, plclip"/>
  11142. </arguments>
  11143. <remarks>
  11144. <remark>Just run "seteditshow mapmodel" and see just the mapmodel entities.</remark>
  11145. <remark>The other entity types are ignored as closestentity too.</remark>
  11146. <remark>"seteditshow" without any argument hides all entities.</remark>
  11147. </remarks>
  11148. <references>
  11149. <identifierReference identifier="setedithide"/>
  11150. <identifierReference identifier="showedithide"/>
  11151. </references>
  11152. </command>
  11153. <command name="++">
  11154. <description>Increments an alias by 1.</description>
  11155. <arguments>
  11156. <argument token="A" description="the alias name"/>
  11157. </arguments>
  11158. <examples>
  11159. <example>
  11160. <code>i = 0; ++ i; echo $i</code>
  11161. <explanation>Output: 1</explanation>
  11162. </example>
  11163. </examples>
  11164. <references>
  11165. <identifierReference identifier="--"/>
  11166. <identifierReference identifier="++f"/>
  11167. <identifierReference identifier="--f"/>
  11168. </references>
  11169. </command>
  11170. <command name="++f">
  11171. <description>Increments an alias by floating-point 1.</description>
  11172. <arguments>
  11173. <argument token="A" description="the alias name"/>
  11174. </arguments>
  11175. <examples>
  11176. <example>
  11177. <code>i = 2.14; ++f i; echo $i</code>
  11178. <explanation>Output: 3.14</explanation>
  11179. </example>
  11180. </examples>
  11181. <references>
  11182. <identifierReference identifier="--f"/>
  11183. <identifierReference identifier="++"/>
  11184. <identifierReference identifier="--"/>
  11185. </references>
  11186. </command>
  11187. <command name="--">
  11188. <description>Decrements an alias by 1.</description>
  11189. <arguments>
  11190. <argument token="A" description="the alias name"/>
  11191. </arguments>
  11192. <examples>
  11193. <example>
  11194. <code>i = 0; -- i; echo $i</code>
  11195. <explanation>Output: -1</explanation>
  11196. </example>
  11197. </examples>
  11198. <references>
  11199. <identifierReference identifier="++"/>
  11200. <identifierReference identifier="--f"/>
  11201. <identifierReference identifier="++f"/>
  11202. </references>
  11203. </command>
  11204. <command name="--f">
  11205. <description>Decrements an alias by floating-point 1.</description>
  11206. <arguments>
  11207. <argument token="A" description="the alias name"/>
  11208. </arguments>
  11209. <examples>
  11210. <example>
  11211. <code>i = 4.14; --f i; echo $i</code>
  11212. <explanation>Output: 3.14</explanation>
  11213. </example>
  11214. </examples>
  11215. <references>
  11216. <identifierReference identifier="++f"/>
  11217. <identifierReference identifier="--"/>
  11218. <identifierReference identifier="++"/>
  11219. </references>
  11220. </command>
  11221. </identifiers>
  11222. </section>
  11223. <!-- Optional Section Ends -->
  11224. <!-- TODO Section Starts -->
  11225. <section name="TODO" sortindex="99">
  11226. <description>This section describes identifiers that are not documented yet, but you may try to help us there.</description>
  11227. <identifiers sort="true">
  11228. </identifiers>
  11229. </section>
  11230. <!-- "TODO" Section Ends -->
  11231. </sections>
  11232. </cuberef>