Lua API/System
Материал из CryWiki Russia
(Различия между версиями)
Alex626 (Обсуждение | вклад) (Отмена правки 1893 участника Alex626 (обсуждение)) |
Alex626 (Обсуждение | вклад) (Отмена правки 1892 участника Alex626 (обсуждение)) |
||
Строка 1: | Строка 1: | ||
- | === | + | === Overview === |
- | + | These Lua functions are in the '''System''' table. For example, the '''Log''' function would be invoked like this: | |
- | System.Log(" | + | System.Log("logging this message"); |
- | + | <br /> | |
- | <br> | + | <h3>Configuration</h3> |
- | + | * [[Lua_API/System/IsEditor|IsEditor]] | |
- | + | * [[Lua_API/System/IsMultiplayer|IsMultiplayer]] | |
- | + | * [[Lua_API/System/IsDevModeEnable|IsDevModeEnable]] | |
- | *[[ | + | * GetCPUQuality |
- | *[[ | + | * GetGPUQuality |
- | *[[ | + | * IsPS20Supported |
- | *GetCPUQuality | + | * LoadLocalizationXml |
- | *GetGPUQuality | + | * SaveConfiguration |
- | *IsPS20Supported | + | * [[Lua_API/System/Quit|Quit]] |
- | *LoadLocalizationXml | + | * [[Lua_API/System/QuitInNSeconds|QuitInNSeconds]] |
- | *SaveConfiguration | + | * SetBudget |
- | *[[ | + | * [[Lua_API/System/ViewDistanceGet|ViewDistanceGet]] |
- | *[[ | + | * [[Lua_API/System/ViewDistanceSet|ViewDistanceSet]] |
- | *SetBudget | + | * ApplyForceToEnvironment |
- | *[[ | + | * GetOutdoorAmbientColor |
- | *[[ | + | * ActivatePortal |
- | *ApplyForceToEnvironment | + | * IsPointIndoors |
- | *GetOutdoorAmbientColor | + | * CheckHeapValid |
- | *ActivatePortal | + | * GetConfigSpec |
- | *IsPointIndoors | + | * SetScissor |
- | *CheckHeapValid | + | * LoadFont |
- | *GetConfigSpec | + | <h3>File</h3> |
- | *SetScissor | + | * [[Lua_API/System/ScanDirectory|ScanDirectory]] |
- | *LoadFont | + | <h3>Surface</h3> |
- | + | * [[Lua_API/System/GetSurfaceTypeIdByName|GetSurfaceTypeIdByName]] | |
- | + | * [[Lua_API/System/GetSurfaceTypeNameById|GetSurfaceTypeNameById]] | |
- | + | <h3>Renderer</h3> | |
- | *[[ | + | <h4>Screen</h4> |
- | + | * ProjectToScreen | |
- | + | * EnumDisplayFormats | |
- | + | * EnumAAFormats | |
- | *[[ | + | * [[Lua_API/System/SetGammaDelta|SetGammaDelta]] |
- | *[[ | + | * [[Lua_API/System/SetSystemShaderRenderFlags|SetSystemShaderRenderFlags]] |
- | + | * GetFrameID | |
- | + | <h4>HDR</h4> | |
- | + | * GetHDRDynamicMultiplier | |
- | + | * [[Lua_API/System/SetHDRDynamicMultiplier|SetHDRDynamicMultiplier]] | |
- | + | * [[Lua_API/System/IsHDRSupported|IsHDRSupported]] | |
- | *ProjectToScreen | + | <h4>2D Drawing</h4> |
- | *EnumDisplayFormats | + | * DrawLabelImage |
- | *EnumAAFormats | + | * DrawLabel |
- | *[[ | + | * ScreenToTexture |
- | *[[ | + | * DrawLine |
- | *GetFrameID | + | * Draw2DLine |
- | + | * DrawText | |
- | + | * DrawImage | |
- | + | * DrawImageColor | |
- | *GetHDRDynamicMultiplier | + | * DrawImageColorCoords |
- | *[[ | + | * DrawImageCoords |
- | *[[ | + | * DrawRectShader |
- | + | * DrawTriStrip | |
- | + | <h4>Screen Effects</h4> | |
- | + | * [[Lua_API/System/SetPostProcessFXParam|SetPostProcessFXParam]] | |
- | *DrawLabelImage | + | * GetPostProcessFXParam |
- | *DrawLabel | + | * SetScreenFx |
- | *ScreenToTexture | + | * GetScreenFx |
- | *DrawLine | + | <h3>Time</h3> |
- | *Draw2DLine | + | * GetCurrTime |
- | *DrawText | + | * GetCurrAsyncTime |
- | *DrawImage | + | * GetFrameTime |
- | *DrawImageColor | + | * GetOSTime |
- | *DrawImageColorCoords | + | * GetLocalOSTime |
- | *DrawImageCoords | + | <h3>Debugging</h3> |
- | *DrawRectShader | + | * [[Lua_API/System/ShowDebugger|ShowDebugger]] |
- | *DrawTriStrip | + | * [[Lua_API/System/Break|Break]] |
- | + | <h3>Console</h3> | |
- | + | * [[Lua_API/System/SetCVar|SetCVar]] | |
- | + | * [[Lua_API/System/GetCVar|GetCVar]] | |
- | *[[ | + | * [[Lua_API/System/AddCCommand|AddCCommand]] |
- | *GetPostProcessFXParam | + | * [[Lua_API/System/ExecuteCommand|ExecuteCommand]] |
- | *SetScreenFx | + | * [[Lua_API/System/ShowConsole|ShowConsole]] |
- | *GetScreenFx | + | * [[Lua_API/System/SetConsoleImage|SetConsoleImage]] |
- | + | <h3>Log</h3> | |
- | + | These logging functions are subject to the log verbosity level. | |
- | + | <br /> | |
- | *GetCurrTime | + | * [[Lua_API/System/LogToConsole|LogToConsole]] |
- | *GetCurrAsyncTime | + | * [[Lua_API/System/LogAlways|LogAlways]] |
- | *GetFrameTime | + | * [[Lua_API/System/Log|Log]] |
- | *GetOSTime | + | * [[Lua_API/System/Warning|Warning]] |
- | *GetLocalOSTime | + | * Error |
- | + | * [[Lua_API/System/ClearConsole|ClearConsole]] | |
- | + | <h3>Statistics</h3> | |
- | + | * DumpMemoryCoverage | |
- | *[[ | + | * DumpMemStats |
- | *[[ | + | * DumpMMStats |
- | + | * DumpWinHeaps | |
- | + | * DebugStats | |
- | + | * GetSystemMem | |
- | *[[ | + | * GetVideoMem |
- | *[[ | + | <h3>View</h3> |
- | *[[ | + | * [[Lua_API/System/SetViewCameraFov|SetViewCameraFov]] |
- | *[[ | + | * [[Lua_API/System/GetViewCameraFov|GetViewCameraFov]] |
- | *[[ | + | * [[Lua_API/System/GetViewCameraPos|GetViewCameraPos]] |
- | *[[ | + | * [[Lua_API/System/GetViewCameraDir|GetViewCameraDir]] |
- | + | * [[Lua_API/System/GetViewCameraAngles|GetViewCameraAngles]] | |
- | + | * [[Lua_API/System/IsPointVisible|IsPointVisible]] | |
- | + | <h3>Entity</h3> | |
- | These logging functions are subject to the log verbosity level. <br> | + | * [[Lua_API/System/GetEntity|GetEntity]] |
- | + | * [[Lua_API/System/GetEntityClass|GetEntityClass]] | |
- | *[[ | + | * [[Lua_API/System/GetEntities|GetEntities]] |
- | *[[ | + | * [[Lua_API/System/GetEntitiesInSphere|GetEntitiesInSphere]] |
- | *[[ | + | * [[Lua_API/System/GetEntitiesInSphereByClass|GetEntitiesInSphereByClass]] |
- | *[[ | + | * GetPhysicalEntitiesInBox |
- | *Error | + | * GetPhysicalEntitiesInBoxByClass |
- | *[[ | + | * [[Lua_API/System/GetEntitiesByClass|GetEntitiesByClass]] |
- | + | * [[Lua_API/System/GetNearestEntityByClass|GetNearestEntityByClass]] | |
- | + | * [[Lua_API/System/GetEntityByName|GetEntityByName]] | |
- | + | * [[Lua_API/System/GetEntityIdByName|GetEntityIdByName]] | |
- | *DumpMemoryCoverage | + | * [[Lua_API/System/RemoveEntity|RemoveEntity]] |
- | *DumpMemStats | + | * [[Lua_API/System/SpawnEntity|SpawnEntity]] |
- | *DumpMMStats | + | <h3>Environment</h3> |
- | *DumpWinHeaps | + | <h4>Terrain</h4> |
- | *DebugStats | + | * [[Lua_API/System/GetTerrainElevation|GetTerrainElevation]] |
- | *GetSystemMem | + | * [[Lua_API/System/IsValidMapPos|IsValidMapPos]] |
- | *GetVideoMem | + | <h4>Sky</h4> |
- | + | * [[Lua_API/System/SetSunColor|SetSunColor]] | |
- | + | * [[Lua_API/System/GetSunColor|GetSunColor]] | |
- | + | * [[Lua_API/System/SetSkyColor|SetSkyColor]] | |
- | *[[ | + | * GetSkyColor |
- | *[[ | + | * [[Lua_API/System/SetSkyHighlight|SetSkyHighlight]] |
- | *[[ | + | * [[Lua_API/System/GetSkyHighlight|GetSkyHighlight]] |
- | *[[ | + | <h4>Fog</h4> |
- | *[[ | + | * [[Lua_API/System/SetVolumetricFogModifiers|SetVolumetricFogModifiers]] |
- | *[[ | + | <h4>Wind</h4> |
- | + | * [[Lua_API/System/SetWind|SetWind]] | |
- | + | * [[Lua_API/System/GetWind|GetWind]] | |
- | + | <h4>Water</h4> | |
- | *[[ | + | * EnableOceanRendering |
- | *[[ | + | <h3>Input</h3> |
- | *[[ | + | * [[Lua_API/System/ClearKeyState|ClearKeyState]] |
- | *[[ | + | |
- | *[[ | + | |
- | *GetPhysicalEntitiesInBox | + | |
- | *GetPhysicalEntitiesInBoxByClass | + | |
- | *[[ | + | |
- | *[[ | + | |
- | *[[ | + | |
- | *[[ | + | |
- | *[[ | + | |
- | *[[ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | *[[ | + | |
- | *[[ | + | |
- | + | ||
- | + | ||
- | + | ||
- | *[[ | + | |
- | *[[ | + | |
- | *[[ | + | |
- | *GetSkyColor | + | |
- | *[[ | + | |
- | *[[ | + | |
- | + | ||
- | + | ||
- | + | ||
- | *[[ | + | |
- | + | ||
- | + | ||
- | + | ||
- | *[[ | + | |
- | *[[ | + | |
- | + | ||
- | + | ||
- | + | ||
- | *EnableOceanRendering | + | |
- | + | ||
- | + | ||
- | + | ||
- | *[[ | + |
Версия 16:14, 12 мая 2011
Содержание |
Overview
These Lua functions are in the System table. For example, the Log function would be invoked like this:
System.Log("logging this message");
Configuration
- IsEditor
- IsMultiplayer
- IsDevModeEnable
- GetCPUQuality
- GetGPUQuality
- IsPS20Supported
- LoadLocalizationXml
- SaveConfiguration
- Quit
- QuitInNSeconds
- SetBudget
- ViewDistanceGet
- ViewDistanceSet
- ApplyForceToEnvironment
- GetOutdoorAmbientColor
- ActivatePortal
- IsPointIndoors
- CheckHeapValid
- GetConfigSpec
- SetScissor
- LoadFont
File
Surface
Renderer
Screen
- ProjectToScreen
- EnumDisplayFormats
- EnumAAFormats
- SetGammaDelta
- SetSystemShaderRenderFlags
- GetFrameID
HDR
- GetHDRDynamicMultiplier
- SetHDRDynamicMultiplier
- IsHDRSupported
2D Drawing
- DrawLabelImage
- DrawLabel
- ScreenToTexture
- DrawLine
- Draw2DLine
- DrawText
- DrawImage
- DrawImageColor
- DrawImageColorCoords
- DrawImageCoords
- DrawRectShader
- DrawTriStrip
Screen Effects
- SetPostProcessFXParam
- GetPostProcessFXParam
- SetScreenFx
- GetScreenFx
Time
- GetCurrTime
- GetCurrAsyncTime
- GetFrameTime
- GetOSTime
- GetLocalOSTime
Debugging
Console
Log
These logging functions are subject to the log verbosity level.
Statistics
- DumpMemoryCoverage
- DumpMemStats
- DumpMMStats
- DumpWinHeaps
- DebugStats
- GetSystemMem
- GetVideoMem
View
- SetViewCameraFov
- GetViewCameraFov
- GetViewCameraPos
- GetViewCameraDir
- GetViewCameraAngles
- IsPointVisible
Entity
- GetEntity
- GetEntityClass
- GetEntities
- GetEntitiesInSphere
- GetEntitiesInSphereByClass
- GetPhysicalEntitiesInBox
- GetPhysicalEntitiesInBoxByClass
- GetEntitiesByClass
- GetNearestEntityByClass
- GetEntityByName
- GetEntityIdByName
- RemoveEntity
- SpawnEntity
Environment
Terrain
Sky
- SetSunColor
- GetSunColor
- SetSkyColor
- GetSkyColor
- SetSkyHighlight
- GetSkyHighlight
Fog
Wind
Water
- EnableOceanRendering