S-22 Posted 2004年9月19日 16:40 Posted 2004年9月19日 16:40 The following is just some quick notes about lots of features in Mohaa that you may not be aware of. They include, how to debug your scripts, finding out the list of commands and variables available from console, cfg files and keybindings, hidden menus, useful cfg files for developers, turning off the startup adverts. It's a bit long winded, and typed in about 5 mins so don't be too critical ... it will be worth your time reading it though, and if you want any better explanations just ask Inside mohaa there is EDITSCRIPT and NOTEPAD the difference being that they are the same app, but Editscript autoloads up the main map script. Now you have to be careful !!! If you use EDITSCRIPT and then save your changes, it saves the file into the local directory. For instance if you were editing obj_team1, it would save the file into mohaa\main\obj\obj_team1 no say you came back to play that map several days/weeks l8r, mohaa will load all the pk3s up, and then it will use that local file as the map script, not the one thats in the pk3 !!! So basically be careful when using editscript, remember to either delete the file after you've played with it, or move it to where your map/bsp is stored, so you add it to your pk3. Although Editscript and Notepad are useful, i find it much easier to use Wordpad. Start mohaa, then use ALT-ENTER to send into windowed mode, then you can use Wordpad (better than notepad) to edit your scripts. And yes after you edit a script you need to save it, bring up console, and type RESTART. This reloads the scripts and you can see the changes. If your wanting to debug your maps, it's best to start mohaa in developer mode, in console, type "developer 1". Some maps also look for the debug variable so type "debug 1" And finally start up the logfile by typing "logfile 2" When u exit mohaa, and look in the main folder you will find a file called, qconsole.log. Edit this file with Wordpad (or similar) and you will have a copy of the errors/messages that appeared in console as you were running the game. To help debug your own maps, use the ' println "text" ' commands in your scripts the println command sends a string to the console, and this is captured by the logfile. by placing them at the start and end of each thread, and other places inside your loops etc, you can soon see how your map script is being processed. You can also output variables with lines like: println "this is some text" println "Self = " self println "My doors opening sound is " $mydoor.sound_open_start println "THREAD mythread: Self = " self " and local.counter = " local.counter by using these commands in your scripts, and turning on developer, debug and logfile, you can rapidly speed up development of your map and also track down errors very quickly. There are many many hidden menus in mohaa, most are cheat protected. To see a list either look in the pk3 files for the "*.URC" files, or bring down console and type "listmenus" to show a menu type: pushmenu pushmenu controls to hide a menu type: popmenu popmenu controls Also in the pk3's are lots of CFG files, which set up many key bindings, several of these are for debugging commands, to speed up development. Just search the pk3's for all the CFG files, and then from console type exec exec decapitator great fun can be had with these ( i recommend u edit the cfg with wordpad and print it out, so you know which keys are assigned to which functions) if you want to experiment with all the commands and variables available do this: bring down console type: logfile 2 cmdlist cvarlist "cmdlist" gives the list of commands "cvarlist" gives the list of cvars this wil capture the output to the qconsole.log file, so you can edit them at your leasure after leaving mohaa, lookin the mohaa\main folder for the file. it's worth doing this from the mainmenu, inside a SP game and inside a MP game, because some commands are only available at certain times. You'll see lots of postings from peeps like MPowell etc about making strange fishbowl effect views, and showing triangles in the render window ... well if you play with the hidden menus and check out the cmdlist and cvarlist you'll soon discover how to it yourself. And here is a little treat for you. These are the commands i have in my startup.cfg file (which i autoload when i start mohaa), they turn on all the debug info for me automatically, but also let me toggle debug mode on/off by using just F11 // my debug stuff //Output console messages to a log file bind F11 vstr dbg set dbg vstr debug_0 set developer 1 set debug 1 set logfile 2 set debug_1 "set dbg vstr debug_0;echo DEBUGMODE ON;developer 1;debug 1;logfile 2" set debug_0 "set dbg vstr debug_1;echo DEBUGMODE OFF;developer 0;debug 0;logfile 0" If you copy your mohaa shortcut on your desktop and rename it as Mohaa Developer Mode and then call up the properties for the shortcut, and use this shortcut line: C:\GAMES\MOHAA\MOHAA.exe +set thereisnomonkey 1 +set developer 1 + set cheats 1 +set ui_console 1 +set cl_playintro 0 +set ui_skip_eamovie 1 +set ui_skip_titlescreen 1 +set ui_skip_legalscreen 1 +exec startup.cfg *note you might have to change the path this will autoload your STARTUP.CFG file, turns off all the intro adverts, displays the console for you, turns on cheats for the hidden menus (try SP mode for them). Well that's enough from me for the moment, hope at least some of the above will be useful to you, and enlighten you that what some people are making out to be BLACK-MAGIC, is actually just normal commands/functionality thats built into mohaa as standard. Have fun ...
S-22 Posted 2004年9月19日 16:41 Author Posted 2004年9月19日 16:41 List of CFG Files: inside pak0.pk3 -------------------- autoexec av decaptitator default development earl fffx high jason low maplist_ffa maplist_obj maplist_team medium menu nate safemode
S-22 Posted 2004年9月19日 16:41 Author Posted 2004年9月19日 16:41 Menus: use pushmenu to display and pushmenu to hide beachobjmenu hud_fraglimit hud_score hud_timelimit project connecting DM_Round_Scoreboard DM_Scoreboard errormessage joininternetgame joinlangame joinnetgame Obj_Scoreboard serverdisconnected servertimeout wrongversion advancedoptions animate2 audio_options badserveraddy briefing1a briefing1b briefing1c briefing1c2 briefing1d briefing1e briefing1f briefing1f2 briefing1g briefing2a briefing2b briefing2b2 briefing2b3 briefing2b4 briefing2b5 briefing2b6 briefing2c briefing2d briefing2e briefing2f briefing3a briefing3b briefing3b2 briefing3c briefing3c2 briefing3c3 briefing3c4 briefing3d briefing3e briefing3f briefing3g briefing3h briefing3i briefing4a briefing4b briefing4b2 briefing4c briefing4d briefing4e briefing4f briefing5a briefing5a2 briefing5a3 briefing5b briefing5c briefing5d briefing5e briefing6a briefing6b briefing6b2 briefing6c briefing6c2 briefing6d briefing6d2 briefing6e briefingroom CinemaQuickmenu camera credits1 crosshair dday1 dday2 decals demohelp disconnected SelectFFAModel dm_main SelectPrimaryWeapon SelectTeam eascreen emitter greytest hud_ammo_BAR hud_ammo_Bazooka hud_ammo_ hud_ammo_M1 Garand hud_ammo_Mauser KAR 98K hud_ammo_KAR98 - Sniper hud_ammo_Frag Grenade hud_ammo_MP40 hud_ammo_StG 44 hud_ammo_Walther P38 hud_ammo_Panzerschreck hud_ammo_Shotgun hud_ammo_Hi-Standard Silenced hud_ammo_Springfield '03 Sniper hud_ammo_Stielhandgranate hud_ammo_Thompson hud_compass hud_health hud_items hud_stopwatch hud_weapons joingame LevelDesign loading_default m1l1 m1l2a m1l2b m1l3a m2l1 m2l2a m2l3 m3l1a m3l2 m3l3 m4l1 m4l2 m4l3 m5l1a m5l2a m5l3 m6l1a m6l1c m6l2a m6l2b m6l3a dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm4 dm/mohdm5 dm/mohdm6 dm/mohdm7 obj/obj_team1 obj/obj_team2 obj/obj_team3 obj/obj_team4 obj/obj_team5 loadsave loadsave_mp LODTool main medals mission1difficulty mission1_briefing mission2difficulty mission2_briefing mission3difficulty mission3_briefing mission4difficulty mission4_briefing mission5difficulty mission5_briefing mission6difficulty mission6_briefing multiplayer multiplayerstart multiplayerstart_ffa multiplayerstart_obj multiplayerstart_round multiplayerstart_team ObjSelectTeam options_main serverfull smoke StatsScreen_Failed StatsScreen_Success video_options war_records zound controls hud_ammo_Colt 45 mpoptions
S-22 Posted 2004年9月19日 16:42 Author Posted 2004年9月19日 16:42 Variables (cvarslist) From the main menu: (no map running) g_lastsave "" A com_autodialdata "" snd_maxdelay "12" snd_mindelay "2" snd_chance "1" snd_volume "1" snd_mindist "160" snd_reverblevel "0.5" snd_reverbtype "0" snd_yaw "0" snd_height "16" snd_length "16" snd_width "16" cg_te_alpha "1" cg_te_color_g "1" cg_te_color_r "1" cg_te_color_b "1" cg_te_filename "dump/testemitter.txt" cam_angles_yaw "0" cam_angles_pitch "0" cam_angles_roll "0" viewmodelactionweight "0" viewmodelnormaltime "0" viewmodelanimnum2 "0" viewmodelblend "0" viewmodelanimslot "0" viewmodelsyncrate "0" subteam3 "0" subtitle3 "" subteam2 "0" subtitle2 "" subteam1 "0" subtitle1 "" subteam0 "0" subtitle0 "" cg_hud "1" dlg_badsave "This save game is invalid" A ui_startmap "" cl_movieaudio "1" A cl_greenfps "0" ui_returnmenu "0" ui_failed "0" ui_success "0" ui_gotmedal "0" ui_gmboxspam "1" ui_NumShotsFired "0" ui_NumHits "0" ui_NumComplete "0" ui_NumObjectives "0" ui_Accuracy "0" ui_PreferredWeapon "none" ui_NumHitsTaken "0" ui_NumObjectsDestroyed "0" ui_NumEnemysKilled "0" ui_HeadShots "0" ui_TorsoShots "0" ui_LeftLegShots "0" ui_RightLegShots "0" ui_LeftArmShots "0" ui_RightArmShots "0" ui_GroinShots "0" ui_GunneryEvaluation "0" ui_health_end "0" ui_health_start "0" ui_drawcoords "0" ui_inventoryfile "global/inventory.txt" ui_newvidmode "4" ui_compass "1" ui_debugload "0" soundoverlay "0" A ui_itemsbar "0" A ui_weaponsbartime "2500" A ui_weaponsbar "1" A ui_consoleposition "" A ui_gmbox "1" A ui_minicon "0" A s_obstruction_cal_time "500" s_show_sounds "0" s_show_num_active_sounds "0" s_show_cpu "0" s_initsound "1" A s_dialogscale "1" C s_testsound "0" C s_show "0" A s_mixPreStep "0.05" AL s_loadas8bit "0" A s_separation "0.5" A s_ambientvolume "1.00" A s_musicvolume "0.9" A s_volume "0.9" L net_port "12203" L net_ip "192.168.123.171" AL net_socksPassword "" AL net_socksUsername "" AL net_socksPort "1080" AL net_socksServer "" AL net_socksEnabled "0" AL net_noipx "1" AL net_noudp "0" C graphshift "0" C graphscale "1" C graphheight "32" C debuggraph "0" C timegraph "0" A ff_disabled "" ff_developer "0" ff_ensureShake "1" A ff_defaultTension "1" A use_ff "1" dcl_texturescale "32" dcl_maxoffset "10" dcl_minsegment "24" dcl_maxsegment "512" dcl_pathmode "0" dcl_dostring "apply to all" dcl_dobmodels "1" dcl_doterrain "1" dcl_doworld "1" dcl_dolighting "1" dcl_alpha "1" dcl_b "1" dcl_g "1" dcl_r "1" dcl_rotation "0" dcl_widthscale "1" dcl_heightscale "1" dcl_radius "16" dcl_shader "blastmark" dcl_shiftstep "4" dcl_autogetinfo "1" dcl_showcurrent "1" L dcl_editmode "0" r_gfxinfo " GL_VENDOR: ATI Technologies Inc. GL_RENDERER: Radeon VE DDR x86/SSE GL_VERSION: 1.2.2333 WinXP Release GL_EXTENSIONS: GL_ARB_multitexture GL_EXTENSIONS: GL_ARB_texture_border_clamp GL_EXTENSIONS: GL_ARB_texture_compression GL_EXTENSIONS: GL_ARB_texture_cube_map GL_EXTENSIONS: GL_ARB_texture_env_add GL_EXTENSIONS: GL_ARB_texture_env_combine GL_EXTENSIONS: GL_ARB_texture_env_crossbar GL_EXTENSIONS: GL_ARB_texture_env_dot3 GL_EXTENSIONS: GL_ARB_transpose_matrix GL_EXTENSIONS: GL_ARB_vertex_blend GL_EXTENSIONS: GL_S3_s3tc GL_EXTENSIONS: GL_ATIX_envmap_bumpmap GL_EXTENSIONS: GL_ATIX_pn_triangles GL_EXTENSIONS: GL_ATIX_texture_env_combine3 GL_EXTENSIONS: GL_ATIX_texture_env_route GL_EXTENSIONS: GL_ATI_texture_mirror_once GL_EXTENSIONS: GL_ATI_vertex_streams GL_EXTENSIONS: GL_ATI_vertex_shader GL_EXTENSIONS: GL_ATIX_vertex_shader_output_point_size GL_EXTENSIONS: GL_EXT_abgr GL_EXTENSIONS: GL_EXT_bgra GL_EXTENSIONS: GL_EXT_clip_volume_hint GL_EXTENSIONS: GL_EXT_compiled_vertex_array GL_EXTENSIONS: GL_EXT_draw_range_elements GL_EXTENSIONS: GL_EXT_fog_coord GL_EXTENSIONS: GL_EXT_packed_pixels GL_EXTENSIONS: GL_EXT_point_parameters GL_EXTENSIONS: GL_EXT_rescale_normal GL_EXTENSIONS: GL_EXT_secondary_color GL_EXTENSIONS: GL_EXT_separate_specular_color GL_EXTENSIONS: GL_EXT_stencil_wrap GL_EXTENSIONS: GL_EXT_texgen_reflection GL_EXTENSIONS: GL_EXT_texture3D GL_EXTENSIONS: GL_EXT_texture_compression_s3tc GL_EXTENSIONS: GL_EXT_texture_cube_map GL_EXTENSIONS: GL_EXT_texture_edge_clamp GL_EXTENSIONS: GL_EXT_texture_env_add GL_EXTENSIONS: GL_EXT_texture_env_combine GL_EXTENSIONS: GL_EXT_texture_env_dot3 GL_EXTENSIONS: GL_EXT_texture_filter_anisotropic GL_EXTENSIONS: GL_EXT_texture_object GL_EXTENSIONS: GL_EXT_vertex_array GL_EXTENSIONS: GL_KTX_buffer_region GL_EXTENSIONS: GL_ARB_window_pos GL_EXTENSIONS: GL_NV_texgen_reflection GL_EXTENSIONS: GL_NV_blend_square GL_EXTENSIONS: GL_SGI_texture_edge_clamp GL_EXTENSIONS: GL_SGIS_texture_border_clamp GL_EXTENSIONS: GL_SGIS_texture_lod GL_EXTENSIONS: GL_SGIS_multitexture GL_EXTENSIONS: GL_WIN_swap_hint GL_EXTENSIONS: WGL_EXT_extensions_string GL_EXTENSIONS: WGL_EXT_swap_control GL_MAX_TEXTURE_SIZE: 2048 GL_MAX_ACTIVE_TEXTURES_ARB: 3 PIXELFORMAT: color(32-bits) Z(24-bit) stencil(8-bits) MODE: 4, 800 x 600 windowed hz:60 GAMMA: hardware w/ 0 overbright bits CPU: Intel Pentium III rendering primitives: single glDrawElements texturemode: GL_LINEAR_MIPMAP_NEAREST picmip: 1 texture bits: 32 multitexture: enabled compiled vertex arrays: enabled texenv add: enabled compressed textures: disabled " L r_maskMinidriver "0" L r_allowSoftwareGL "0" L r_loadftx "0" L r_loadjpg "1" A ter_fastMarks "1" A ter_minMarkRadius "8" r_precacheimages "0" r_static_shadermultiplier3 "1" r_static_shadermultiplier2 "1" r_static_shadermultiplier1 "1" r_static_shadermultiplier0 "1" r_static_shaderdata3 "0" r_static_shaderdata2 "0" r_static_shaderdata1 "0" r_static_shaderdata0 "0" A r_sse "0" r_showportal "0" A vss_smoothsmokelight "1" A r_debuglines_depthmask "0" R r_useglfog "1" A r_lightcoronasize ".1" C r_farplane_nofog "0" C r_farplane_nocull "0" C r_farplane_color ".5 .5 .5" C r_farplane "0" r_skyportal_origin "0 0 0" r_skyportal "0" C r_light_showgrid "0" A r_light_nolight "0" A r_light_int_scale "0.05" C r_light_sun_line "0" C r_light_lines "0" A r_stipplelines "1" r_maxtermarks "1024" r_maxpolyverts "16384" r_maxpolys "4096" A r_entlight_maxcalc "2" A r_entlight_cubefraction "0.5" A r_entlight_cubelevel "0" A r_entlight_errbound "6" C r_entlight_scale "1.3" C r_entlightmap "0" C r_noportals "0" C r_lockpvs "0" C r_drawBuffer "GL_BACK" C r_offsetunits "-2" C r_offsetfactor "-1" C r_clear "0" C r_showstaticbboxes "0" C r_showhbox "0" C r_shownormals "0" C r_showsky "0" C r_showtris "0" C r_nobind "0" C r_debugSurface "0" C r_logFile "0" C r_verbose "0" C r_speeds "0" C r_showcluster "0" C r_novis "0" C r_showcull "0" C r_nocull "0" C r_ignore "1" C r_staticlod "1" C r_drawspherelights "1" C r_drawsprites "1" C r_drawterrain "1" C r_drawbrushmodels "1" C r_drawbrushes "1" C r_drawstaticmodelpoly "1" C r_drawstaticmodels "1" C r_drawentitypoly "1" C r_drawentities "1" C r_norefresh "0" C r_measureOverdraw "0" C r_skipBackEnd "0" C r_showSmp "0" C r_flareFade "7" C r_flareSize "40" C r_portalOnly "0" C r_lightmap "0" C r_drawworld "1" C r_nocurves "0" r_printShaders "0" C r_debugSort "0" lod_tool "0" lod_position "0 0 0" lod_save "0" lod_tris "" lod_metric "0.0" lod_tikiname "" lod_meshname "" lod_mesh "0" lod_zee_val "0" lod_pitch_val "0" lod_curve_4_slider "0" lod_curve_3_slider "0" lod_curve_2_slider "0" lod_curve_1_slider "0" lod_curve_0_slider "0" lod_curve_4_val "0" lod_curve_3_val "0" lod_curve_2_val "0" lod_curve_1_val "0" lod_curve_0_val "0" lod_edit_4 "0" lod_edit_3 "0" lod_edit_2 "0" lod_edit_1 "0" lod_edit_0 "0" lod_LOD_slider "0.5" lod_maxLOD "0.3" lod_minLOD "1.0" lod_LOD "0" r_uselod "1" r_showstaticlod "0" r_showlod "0" r_showImages "0" C r_directedScale "1" C r_ambientScale "0.5" A r_primitives "0" A r_facePlaneCull "1" A r_gamma "1" A r_swapInterval "0" A r_textureMode "GL_LINEAR_MIPMAP_NEAREST" A r_finish "0" A r_dlightBacks "1" A r_drawSun "0" r_fastsky "0" A r_ignoreGLErrors "1" C r_znear "3" A r_flares "0" A C r_lodCurveError "225" r_lerpmodels "1" LC r_singleShader "0" L g_numdebuglines "4096" L r_intensity "1" L r_mapOverBrightBits "1" LC r_fullbright "0" L r_displayRefresh "0" AL r_ignoreFastPath "0" AL r_smp "0" AL r_vertexLight "0" AL r_customaspect "1" AL r_customheight "1024" AL r_customwidth "1600" AL r_ignorehwgamma "0" AL r_overBrightBits "0" AL r_depthbits "0" AL r_stencilbits "0" AL r_stereo "0" AL r_textureDetails "1" L r_colorMipLevels "0" AL r_roundImagesDown "1" A r_reset_tc_array "1" A r_geForce3WorkAround "1" AL r_ext_aniso_filter "0" AL r_ext_texture_env_combine "0" AL r_ext_texture_env_add "1" AL r_ext_compiled_vertex_array "1" R r_ext_multitexture "1" AL r_ext_gamma_control "1" AL r_allowExtensions "1" AL r_glDriver "opengl32" A s_speaker_type "0" AL s_reverb "0" U A dm_playergermanmodel "german_wehrmacht_soldier" U A dm_playermodel "american_army" U password "" U A snaps "20" m_invert_pitch "0" A cg_forceModel "0" A cl_maxPing "800" A cg_autoswitch "1" cg_gametype "0" cl_langamerefreshstatus "Ready" R cl_motdString "" A m_filter "0" A m_side "0.25" A m_up "0" A m_forward "0.25" A m_yaw "0.022" A m_pitch "0.022" A cl_allowDownload "1" cl_showmouserate "0" A cl_mouseAccel "0" A sensitivity "5" A freelook "1" A cl_run "1" A cl_packetdup "1" A cl_maxpackets "30" cl_anglespeedkey "1.5" A cl_pitchspeed "70" A cl_yawspeed "140" rconAddress "" cl_forceavidemo "0" cl_avidemo "0" activeAction "" cl_freezeDemo "0" cl_showTimeDelta "0" cl_showSend "0" cl_shownet "0" cl_timeNudge "0" cl_connect_timeout "15" cl_timeout "60" A cl_cdkey "123456789" cl_motd "0" cl_eventstats "0" cl_timeevents "0" cl_eventlimit "500" cl_showevents "0" cl_debugMove "0" cl_nodelta "0" sv_deeptracedebug "0" sv_drawentities "1" R sv_mapChecksum "" sv_killserver "0" sv_padPackets "0" sv_showloss "0" sv_reconnectlimit "3" A sv_master5 ":-)" A sv_master4 "duncan_paterson_weir@hotmail.com" A sv_master3 "www.the4thregiment.tk" A sv_master2 "(Duncan Weir)" sv_master1 "Scorpios Server" nextmap "" sv_zombietime "2" sv_timeout "120" S sv_fps "20" sv_privatePassword "4threserved" rconPassword "opmhp" R sv_paks "" sv_pure "0" R sv_serverid "0" S L g_gametype "0" S A sv_floodProtect "1" S A sv_minPing "0" S L sv_maxclients "1" S sv_privateClients "0" S R mapname "nomap" S R protocol "8" S sv_keywords "" S timelimit "0" S fraglimit "0" S dmflags "0" skill "1" g_maxplayerhealth "750" net_multiLANpackets "2" I net_qport "22491" showdrop "0" showpackets "0" A in_disablealttab "0" A joy_threshold "0.15" in_debugjoystick "0" A in_joyBallScale "0.02" A in_joystick "0" AL in_mouse "1" A in_mididevice "0" A in_midichannel "1" A in_midi "0" username "Duncan" sys_cpuid "35" sys_cpustring "Intel Pentium III" R win_wndproc "4754704" R win_hinstance "4194304" arch "win2000" arch_minor_version "1" arch_major_version "5" R shortversion "1.11" S R version "Medal of Honor Allied Assault 1.11 win-x86 Mar 5 2002" com_buildScript "0" R cl_running "1" R sv_running "0" L dedicated "0" C timedemo "0" com_speeds "0" C viewlog "0" C com_dropsim "0" C com_showtrace "0" C fixedtime "0" C timescale "1" A fps "0" A autopaused "1" R paused "0" deathmatch "0" A com_maxfps "85" convertAnim "0" showLoad "0" low_anim_memory "0" dumploadedanims "0" pagememory "0" ui_legalscreen_stay "3" ui_legalscreen_fadeout ".5" ui_legalscreen_fadein ".5" ui_titlescreen_stay "3" ui_titlescreen_fadeout ".5" ui_titlescreen_fadein ".5" g_voiceChat "0" S A sv_maplist "obj\tank" A r_lastValidRenderer "Radeon VE DDR x86/SSE" AL r_fullscreen "0" AL r_forceClampToEdge "1" AL s_milesdriver "Miles Fast 2D Positional Audio" U A name "=4th= [1st] 2nd Lt. Scorpio" S A sv_allowDownload "0" S AL g_gametypestring "Objective-Match" S A sv_hostname "Scorpios ..." S A sv_maxPing "500" S A sv_maxRate "9000" U A rate "20000" A vid_xpos "40" A vid_ypos "44" config "unnamedsoldier.cfg" AL r_ext_compressed_textures "0" A r_drawstaticdecals "1" A g_ddayshingleguys "2" A g_ddayfog "0" A g_ddayfodderguys "2" AL r_texturebits "32" AL r_colorbits "32" AL r_picmip "1" AL r_mode "4" A cg_marks_add "1" AL s_khz "22" A cg_shadows "1" A cg_rain "1" A ter_maxtris "16384" A ter_maxlod "4" A ter_error "9" A vss_maxcount "20" A cg_effectdetail "0.7" A r_lodviewmodelcap "0.45" A r_lodcap "0.35" A r_lodscale "0.45" AL r_subdivisions "4" A r_fastentlight "1" AL r_fastdlights "1" A cg_drawviewmodel "2" A g_m6l3 "0" A g_m6l2 "0" A g_m6l1 "0" A g_m5l3 "0" A g_m5l2 "0" A g_m5l1 "0" A g_m4l3 "0" A g_m4l2 "0" A g_m4l1 "1" A g_m3l3 "0" A g_m3l2 "0" A g_m3l1 "0" A g_m2l3 "0" A g_m2l2 "0" A g_m2l1 "0" A g_m1l3 "0" A g_m1l2 "0" A g_m1l1 "1" A g_eogmedal2 "0" A g_eogmedal1 "0" A g_eogmedal0 "0" A g_medal5 "1" A g_medal4 "0" A g_medal3 "0" A g_medal2 "0" A g_medal1 "0" A g_medal0 "0" ui_medalsign "" ui_signshader "" A g_subtitle "0" A g_skill "1" A detail "1" A ui_hostname "Scorpio's Monastery Assault 3.3" A ui_maplist_obj "obj/obj_team1" A ui_maplist_round "dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm4 dm/mohdm5 dm/mohdm6 dm/mohdm7" A ui_maplist_team "dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm4 dm/mohdm5 dm/mohdm6 dm/mohdm7" A ui_maplist_ffa "dm/mohdm1 dm/mohdm2 dm/mohdm3 dm/mohdm4 dm/mohdm5 dm/mohdm6 dm/mohdm7" A ui_inactivekick "999" A ui_inactivespectate "999" A ui_connectip "68.43.41.63" A ui_teamdamage "1" A ui_timelimit "0" A ui_fraglimit "0" A ui_gamespy "1" A ui_maxclients "10" ui_gametypestring "" ui_gametype "" ui_dmmap "" A ui_voodoo "0" A cl_ctrlbindings "0" A cl_altbindings "0" A ui_crosshair "1" A viewsize "100" I journal "0" fs_filedir "C:\games\mohaa\main\\maps\" mapdir "" logfile "2" I fs_restrict "" S I fs_game "" I fs_basepath "C:\games\mohaa" I fs_cdpath "" I fs_copyfiles "0" fs_debug "0" A ui_skip_legalscreen "1" A ui_skip_titlescreen "1" A ui_skip_eamovie "1" A cl_playintro "0" A ui_console "1" A developer "1" A thereisnomonkey "1" AL cheats "1" 607 total cvars 607 cvar indexes
S-22 Posted 2004年9月19日 16:43 Author Posted 2004年9月19日 16:43 Commands (cmdlist) From main menu: (no map running) cmdlist -back -leanright -moveright cvarlist -leanleft -moveleft listmenus -use set bind unbind alias seta exec devcon gotoreturnmenu setreturnmenu -statistics +statistics ui_getplayermodel ui_applyplayermodel playermodel finishloadingscreen startserver ui_removehud ui_addhud locationprint centerprint ui_checkrestart ui_resetcvars ui_hud clear ui_testlist ui_loadconsolepos ui_saveconsolepos ui_hidemouse ui_showmouse inv_restart editspecificshader editshader editscript notepad soundpicker lod_spawnlist viewspawnlist ui_startdmmap dmmapselect maplist loadmenu togglemenu globalwidgetcommand widgetcommand hidemenu showmenu popmenu forcemenu pushmenu_dm pushmenu_sp pushmenu tmstop tmstartloop tmstart pitch playsong loadsoundtrack stopmp3 playmp3 sounddump soundinfo soundlist play ff_disable r_infoworldtris r_infostaticmodels farplane_info gfxinfo screenshot modelist modellist shaderlist imagelist cl_dumpallclasses cl_dumpclassevents cl_classevents cl_classtree cl_classlist cl_pendingevents cl_dumpevents cl_eventhelp cl_eventlist gogetpatch launchgamespy fastconnect aliasdump dialog saveshot vidmode tiki animlist tikilist tikianimlist ping setenv rcon localservers reconnect menuconnect connect stoprecord cinematic disconnect vid_restart snd_restart clientinfo configstrings cmd -cameralook +cameralook +togglemouse -mlook +mlook -button14 +button14 -button13 +button13 -button12 +button12 -button11 +button11 -button10 +button10 -button9 +button9 -button8 +button8 -button7 +button7 -button6 +button6 -button5 +button5 -button4 +button4 -button3 +button3 -button2 +button2 -button1 +button1 -button0 +button0 -speed +speed +leanright +leanleft +use -attacksecondary +attacksecondary -attackprimary +attackprimary -attack +attack +moveright +moveleft -strafe +strafe -lookdown +lookdown -lookup +lookup +back -forward +forward -right +right -left +left -movedown +movedown -moveup +moveup centerview difficultyHard difficultyMedium difficultyEasy loadlastgame loadgame autosavegame savegame killserver gamemap devmap map spdevmap spmap sectorlist restart dumpuser systeminfo serverinfo status clientkick kick heartbeat midiinfo net_restart in_restart pause writeconfig changeVectors quit unbindall touchFile cd fdir dir path ctrlbindlist altbindlist bindlist unctrlbind ctrlbind unaltbind altbind append scale subtract add cvar_savegame_restart cvar_restart reset setu sets toggle wait echo vstr meminfo 239 commands
S-22 Posted 2004年9月19日 16:43 Author Posted 2004年9月19日 16:43 3 useful threads to add to your map script files for debugging. They give nice formatted output in console, and are great when the logfile is turned on: To use them, put these 2 lines immediately after "main:" level.debug = 1 level.debugtime = 1 These 2 lines, activate the debuging lines to console, and also activate a TIME message. The time messages are most useful for benchmarking, to see which threads are taking far too long to process. Then at the start of a thread add a line like: thread debugtextstart ("currentthreadname: self = " + self) at he end of a thread add a line like: thread debugtextend ("currentthreadname: self = " + self) inside your threads either in a loop or after an important command, put a line like: thread debugtext ("myvalue = " + local.myvalue) // the 3 threads follow, stick these into your map script file, preferably right at the bottom. debugtext local.text: if (level.debug == NIL || level.debug != 1) end if (level.debugtime == 1) local.text = (" Time: " + level.time + "> " + local.text) else local.text = (" " + local.text) println local.text end debugtextstart local.text: if (level.debug == NIL || level.debug != 1) end println " " println "[-" println "////////////////////////// START OF THREAD //////////////////////" local.text = ("// THREAD = " + local.text) if (level.debugtime == 1) local.text = (local.text + "\n// Time: " + level.time + "\n") local.text = (local.text + "\n----------------") println local.text end debugtextend local.text: if (level.debug == NIL || level.debug != 1) end local.text = ("\\ THREAD = " + local.text) local.text = ("----------------\n" + local.text) if (level.debugtime == 1) local.text = ("\\ Time: " + level.time + "\n" + local.text) println local.text println "\\\\\\\\\\\\\\\\\\\\\\\\\\ END OF THREAD \\\\\\\\\\\\\\\\\\\\\\\\" println "-]" println " " end
S-22 Posted 2004年9月19日 16:44 Author Posted 2004年9月19日 16:44 Ok let me just clear up a few things ... Yes i see people post stuff about hidden menus, weird views with the hud, edit script etc etc I've been using all the above for many months now, it's very easy to find out about if know where to look, and even easier if your familiar with things like the quake games and fakk2 / sin So i just thought i'd post a big thread (this one) with a lot of the information that i've had at my disposal. That way everyone will know how to do these things, and no longer feel that these things are some sort of Black Magic only know to a select few. I'd should have done this earlier yes, but well i lead a very busy life and i've only just got around to it ... better late than never. If you study the above info and the links to the 2 html documents you'll have a very good understanding of the mohaa engine and how to use it. I've still got masses more info that i need to post, but i've not tidied it all up yet ... but as soon as i have it'll be on TMT 1st As for DEBUG ... that's just a programming process you do when your fixing bugs in the program/script. The threads i've posted above allow you to output messages to the console (and the logfile if turned on) that greatly help in tracking down where a bug lies in your script. Basically you use 2 types of message, one is just so you know when you've entered/left a thread, or at which part of a thread the script is processing. The other sort of message you use to ouput the contents of a variable, so you can check it's been set correctly. Outputting messages is a very very basic way of debugging, and most languages have far more advanced methods, but your limited with the mohaa scripting language ... so if you have problems in your scripts, stick in some messages and track those bugs down. You can always delete all the debug code once your scripts are running smoothly ... indeed if you examine some of the mohaa scripts in global you'll see that there are still messages in them that were never taken out ... exploder.scr has several 'println "z " messages. just type developer 1 in console and see how many messages start to appear as you play the standard mohaa maps. one of them even uses 3d debug messages, that shows the entitiy numbers as your playing ... i think it's SP map where your a sniper and have to escort the tank crew through the map.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new account登录
Already have an account? Sign in here.
现在登录