Advertisement
dcomicboy

some console stuff

Mar 5th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.08 KB | None | 0 0
  1. Content Guide
  2.  
  3. Appendix C: Console Variables
  4. Console variables set a wide variety of parameters in a Jupiter game. A large number of these are very useful for debugging purposes. Others are used for communications settings and other engine-related behavior.
  5.  
  6. Console variable values are checked by Jupiter at various times depending on the specific console variable. Some are checked only at game initialization, and therefore changing them during the game will not have any effect on that game session. It may, however, effect future game sessions as the value is saved to the autoexec.cfg file. Others are checked every frame.
  7.  
  8. This appendix provides a list of the must useful console variables. Valid values listed in angle brackets. Default values are listed in parentheses. Use 1 for TRUE and 0 for FALSE.
  9.  
  10. Autoexec.cfg
  11. The autoexec.cfg file is the repository for console variable values used in your game. This file must be located in the same folder as the LithTech.exe file.
  12.  
  13. You can set console variable values in this file in three ways:
  14.  
  15. Manually pre-set the values in a text editor and save it prior to game start up.
  16. Use the Console to reset values while the game is running.
  17. Programmatically change the values in your game code.
  18. Jupiter overwrites the new values over existing values in the autoexec.cfg file when the game shuts down. Console variables that did not exist in the autoexec.cfg file prior to game startup will not be added to the file even if they are set in the console or programmatically.
  19.  
  20. To pre-set the values for any console command in the .CFG file, use the following syntax:
  21.  
  22. command value
  23.  
  24. The command argument is the console command and the value argument is the value to which it is set.
  25.  
  26. The Console
  27. For debugging purposes, console variables can be manually set during a running game using the Console. The Console is a text-based entry window in which you can assign console variable values. To access the console, press the TILDE (~) key in a running Jupiter application. In the Console you can directly access the client and server portions of Jupiter to give commands and to use debugging options.
  28.  
  29. Programmatic Console Variable Access and Modification
  30. Console variables can be programmatically accessed and modified using a variety of functions. HCONSOLEVAR, defined in the iltserver.h header file, is a handle to a console variable.
  31.  
  32. The following functions are defined in the iltclient.h header file:
  33.  
  34. HCONSOLEVAR ILTClient::GetConsoleVar(char *pName);
  35. LTRESULT ILTClient::GetSConValueFloat(char *pName, float &val);
  36. LTRESULT ILTClient::GetSConValueString(char *pName, char *valBuf, uint32 bufLen);
  37. The following functions are defined in the iltcsbase.h header file:
  38.  
  39. float GetVarValueFloat(HCONSOLEVAR hVar);
  40. char* ILTCSBase::GetVarValueString(HCONSOLEVAR hVar);
  41. The following functions are defined in the iltserver.h header file:
  42.  
  43. void (*SetGameConVar)(char *pName, char *pVal);
  44. HCONVAR (*GetGameConVar)(char *pName);
  45. void (*RunGameConString)(char *pString);
  46. Input
  47. AddAction—Sets a game action name to an integer. A game action is a name that defines a specific input action for a game. For instance, FirePistol could be a game action bound to a mouse click event.
  48.  
  49. EnableDevice—Enables an input device for recognition by Jupiter.
  50.  
  51. RangeBind—Binds specific inputs to specific commands.
  52.  
  53. Miscellaneous
  54. ListCommands—Lists in the console all available commands.
  55.  
  56. LockPVS(0)—When set, locks the PVS (Potentially Visible Set). Useful for finding what is in your PVS at any given point in a level.
  57.  
  58. OptimizeSurfaces(0)—Enable/disable the creation of the tiles for optimized surfaces.
  59.  
  60. Quit—Exit the Jupiter game.
  61.  
  62. Serv—Prefix a console variable or command to run it on the server.
  63.  
  64. Worlds—Use this console command to start a new world. Specify the path to the world in the .rez file (or directory) but do not specify an extension.
  65.  
  66. Object Rendering Options
  67. DrawCanvases(1)— Enable/disable the drawing of canvases.
  68.  
  69. DrawLineSystems(1)—Enable/disable the drawing of line systems.
  70.  
  71. DrawParticles(1)—Enable/disable the drawing of particles.
  72.  
  73. DrawPolygrids(1)—Enable/disable the drawing of poly grids.
  74.  
  75. DrawSky(1)—Enable/disable the drawing of the sky.
  76.  
  77. DrawSprites(1)—Enable/disable the drawing of sprites.
  78.  
  79. DrawWorldModels(1)— Enable/disable the drawing of world models.
  80.  
  81. Performance
  82. ShowFrameRate—Prints the frame rate to the console.
  83.  
  84. ShowMemStats—Prints information about memory usage to the console.
  85.  
  86. ShowPolyCounts—Prints information about polygon drawing to the console.
  87.  
  88. ShowTickCounts<0-9>—Prints information about where time is being spent in the engine each frame.
  89.  
  90. Rendering Options
  91. 32bitTextures(0)—Enables selection of 32-bit Texture Format.
  92.  
  93. BitDepth—<16, 24, 32> (16) Screen Pixel Bit Depth. You must RestartRender for the new BitDepth to take effect. BitDepth will fall back to a lower value if necessary.
  94.  
  95. RestartRender—This is a console command that will recreate the renderer and all data associated with it. This must be run after any changes to the other Rendering Options to make them take effect.
  96.  
  97. ScreenHeight(480)—Screen Height. You must RestartRender for the new ScreenHeight to take effect.
  98.  
  99. ScreenWidth(640)—Screen Width. You must RestartRender for the new ScreenWidth to take effect.
  100.  
  101. World Rendering Options
  102. WireFrame(0)—When true, draws the world and objects in WireFrame mode.
  103.  
  104. ShowSplits(0)—Shows the polygon splits on polygons in the world as a different color when DrawFlat is on.
  105.  
  106. DrawCurrentLeaf(0)—Highlights the polygons that form the current leaf of the BSP. As the player moves around the world, the highlighting reveals how the world’s hulls are organized.
  107.  
  108. DrawFlat(0)—Draws all of the polygons in the world as a flat color.
  109.  
  110. Saturate(0)—Use Saturate blend for World Geometry.
  111.  
  112. LightMapsOnly(0)—Draws only the LightMaps and not the color texture on the world.
  113.  
  114.  
  115.  
  116. Top
  117.  
  118.  
  119. --------------------------------------------------------------------------------
  120.  
  121.  
  122. Touchdown Entertainment, Inc.
  123. Send feedback regarding this page.
  124. 2006, All Rights Reserved.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement