Skip to content

Change Graphics

Change Graphics

Modifies the display settings of the game, including fullscreen mode, internal resolution, and viewport resolution.

Properties

System

Name Explanation Type
Fullscreen Enabled Whether the fullscreen setting is applied by this command. Toggle
Height The height of the internal rendering resolution in pixels. Variable or Value
Is Fullscreen Whether the game should run in fullscreen mode. Switch or Value
Resolution Enabled Whether the internal resolution setting is applied by this command. Toggle
Use Viewport Resolution Whether to use a custom viewport resolution instead of the default window size. Switch or Value
Viewport Height The height of the viewport or window in pixels. Variable or Value
Viewport Resolution Enabled Whether the viewport resolution setting is applied by this command. Toggle
Viewport Width The width of the viewport or window in pixels. Variable or Value
Width The width of the internal rendering resolution in pixels. Variable or Value

Examples

Enable Fullscreen Mode

Switches the game display to fullscreen mode.

change_graphics(fullscreen: true);
{"Data":{"IsFullscreen":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0,"Metadata":null},"IsFullscreenEnabled":true,"IsResolutionEnabled":false,"IsViewportResolutionEnabled":false,"ResolutionHeight":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"480","VariableIndex":0,"Metadata":null},"ResolutionWidth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"640","VariableIndex":0,"Metadata":null},"UseViewportResolution":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0,"Metadata":null},"ViewportHeight":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"480","VariableIndex":0,"Metadata":null},"ViewportWidth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"640","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.System.ChangeGraphicsCommand"}

Change Internal Resolution

Sets the internal rendering resolution to 1280 by 720 pixels.

change_graphics(width: 1280, height: 720);
{"Data":{"IsFullscreen":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":false,"SwitchIndex":0,"Metadata":null},"IsFullscreenEnabled":false,"IsResolutionEnabled":true,"IsViewportResolutionEnabled":false,"ResolutionHeight":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"720","VariableIndex":0,"Metadata":null},"ResolutionWidth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1280","VariableIndex":0,"Metadata":null},"UseViewportResolution":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0,"Metadata":null},"ViewportHeight":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"480","VariableIndex":0,"Metadata":null},"ViewportWidth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"640","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.System.ChangeGraphicsCommand"}

Enable Viewport Resolution with Custom Size

Enables a custom viewport resolution of 1920 by 1080 pixels.

change_graphics(viewport: true, viewport_width: 1920, viewport_height: 1080);
{"Data":{"IsFullscreen":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":false,"SwitchIndex":0,"Metadata":null},"IsFullscreenEnabled":false,"IsResolutionEnabled":false,"IsViewportResolutionEnabled":true,"ResolutionHeight":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"480","VariableIndex":0,"Metadata":null},"ResolutionWidth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"640","VariableIndex":0,"Metadata":null},"UseViewportResolution":{"IsGlobalSwitch":false,"IsLocalSwitch":false,"IsValue":true,"Value":true,"SwitchIndex":0,"Metadata":null},"ViewportHeight":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1080","VariableIndex":0,"Metadata":null},"ViewportWidth":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1920","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.System.ChangeGraphicsCommand"}