Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / client / src / client_cfg.h
blobb08843b3b069a538556f769581008b13d21b477a
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010-2020 Winch Gate Property Limited
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de>
6 // Copyright (C) 2010-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
7 // Copyright (C) 2011-2012 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com>
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU Affero General Public License as
11 // published by the Free Software Foundation, either version 3 of the
12 // License, or (at your option) any later version.
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU Affero General Public License for more details.
19 // You should have received a copy of the GNU Affero General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef CL_CLIENT_CFG_H
25 #define CL_CLIENT_CFG_H
28 //////////////
29 // Includes //
30 //////////////
31 // Misc.
32 #include "nel/misc/types_nl.h"
33 #include "nel/misc/vector.h"
34 #include "nel/misc/rgba.h"
35 #include "nel/misc/config_file.h"
37 #include "nel/sound/sound_anim_manager.h"
39 // std.
40 #include <string>
42 // Game Share
43 #include "game_share/gender.h"
44 #include "game_share/character_title.h"
47 ///////////
48 // Using //
49 ///////////
50 using NLMISC::CVector;
51 using NLMISC::CRGBA;
52 using std::string;
54 //---------------------------------------------------
55 // CClientConfig :
56 // Struct to manage a config file for the client.
57 //---------------------------------------------------
58 struct CClientConfig
60 enum TDriver3D { DrvAuto = 0, OpenGL, Direct3D, OpenGLES };
61 enum TDriverSound { SoundDrvAuto = 0, SoundDrvFMod, SoundDrvOpenAL, SoundDrvDirectSound, SoundDrvXAudio2 };
62 enum TStageLCTUsage { StageUseNoLCT = 0, StageUseAllLCT, StageUsePosOnlyLCT };
64 // the config file must be always be available
65 NLMISC::CConfigFile ConfigFile;
67 void init (const string &configFileName);
68 bool IsInvalidated;
69 /// Save the cfg file when exit the client ?
70 bool SaveConfig;
72 /// Window position in windowed mode
73 sint32 PositionX;
74 sint32 PositionY;
76 /// Window frequency
77 uint Frequency;
79 /// Skip introdution to ryzom (before the outgame select character
80 bool SkipIntro;
81 /// Select character automatically (dont go to create perso) (-1 if no auto select)
82 sint SelectCharacter;
83 /// Selected slot in select char interface
84 uint8 SelectedSlot;
86 /// Textures for interface login
87 std::vector<string> TexturesLoginInterface;
88 std::vector<string> TexturesLoginInterfaceDXTC;
90 /// Textures for interface outgame
91 std::vector<string> TexturesOutGameInterface;
92 std::vector<string> TexturesOutGameInterfaceDXTC;
94 /// Textures for ingame interface and r2 interface
95 std::vector<string> TexturesInterface;
96 std::vector<string> TexturesInterfaceDXTC;
98 /// vector of XML file names that describe the interfaces config for login
99 std::vector<string> XMLLoginInterfaceFiles;
101 /// vector of XML file names that describe the interfaces config for outgame menus
102 std::vector<string> XMLOutGameInterfaceFiles;
104 /// vector of XML file names that describe the interfaces config
105 std::vector<string> XMLInterfaceFiles;
107 /// vector of XML file names that describe R2 editor
108 std::vector<string> XMLR2EDInterfaceFiles;
110 /// logo that are displayed
111 std::vector<string> Logos;
113 /// vector of XML file names that describe input config
114 std::string XMLInputFile;
116 /// Application start and just start the outgame web browser
117 bool TestBrowser;
118 /// Start URL for testing the browser
119 std::string TestBrowserUrl;
120 /// Application start with only the interfaces
121 bool Light;
122 /// Is the landscape enabled ?
123 bool LandscapeEnabled;
124 /// Is the microlife enabled
125 bool MicroLifeEnabled;
126 /// are villages enabled
127 bool VillagesEnabled;
128 // is EAM enabled
129 bool EAMEnabled;
130 /// is level design mode enabled
131 bool LevelDesignEnabled;
132 // Cache result of interface parsing
133 bool CacheUIParsing;
134 /// Skip display of EULA (for test purposes)
135 bool SkipEULA;
136 /// Direct 3d
137 TDriver3D Driver3D;
138 /// Application start in a window or in fullscreen.
139 bool Windowed;
140 /// Monitor to use for fullscreen
141 std::string MonitorName;
142 /// Width for the Application.
143 uint16 Width;
144 /// Height for the Application.
145 uint16 Height;
146 /// Bit Per Pixel (only used in Fullscreen mode).
147 uint16 Depth;
148 /// Monitor Constrast [-1 ~ 1], default 0
149 float Contrast;
150 /// Monitor Luminosity [-1 ~ 1], default 0
151 float Luminosity;
152 /// Monitor Gamma [-1 ~ 1], default 0
153 float Gamma;
155 // UI scaling
156 float InterfaceScale;
157 float InterfaceScale_min;
158 float InterfaceScale_max;
159 float InterfaceScale_step;
160 bool BilinearUI;
162 // Window snap
163 bool WindowSnapInvert;
164 uint32 WindowSnapDistance;
166 // VR
167 bool VREnable;
168 std::string VRDisplayDevice;
169 std::string VRDisplayDeviceId;
171 /// Client in Local mode or not.
172 bool Local;
173 /// Host.
174 string FSHost;
175 /// Login.
176 bool DisplayAccountButtons;
177 string CreateAccountURL;
178 string EditAccountURL;
179 string ConditionsTermsURL;
180 string NamingPolicyURL;
181 string BetaAccountURL;
182 string ForgetPwdURL;
183 string FreeTrialURL;
184 string LoginSupportURL;
186 /// User entity Position (in local mode only).
187 CVector Position;
188 /// User entity Heading (in local mode only).
189 CVector Heading;
190 /// Height for the eyes.
191 float EyesHeight;
192 /// Velocity for the Walk.
193 float Walk;
194 /// Velocity for the Run.
195 float Run;
196 /// Velocity for the Walk in DM ing or editing.
197 float DmWalk;
198 /// Velocity for the Run in DM ing or editing.
199 float DmRun;
200 /// Velocity for the Fly.
201 float Fly;
202 /// Acceleration for the Fly.
203 float FlyAccel;
205 /// Allow debug commands
206 bool AllowDebugCommands;
208 /// \name Inputs
210 /// Use a hardware cursor
211 bool HardwareCursor;
212 float HardwareCursorScale; // scale for hardware cursor bitmap (in ]0, 1])
213 float CursorSpeed;
214 uint CursorAcceleration;
215 float FreeLookSpeed;
216 uint FreeLookAcceleration;
217 float FreeLookSmoothingPeriod;
218 bool FreeLookInverted;
219 bool FreeLookTablet;
220 // true if camera is centered when user casts a spell
221 bool AutomaticCamera;
222 bool DblClickMode;
223 bool AutoEquipTool;
225 /// Time inputs
226 uint ForceDeltaTime; // 0 to use real delta time
228 /// Background Color
229 CRGBA BGColor;
230 /// Landscape Tile Near.
231 float LandscapeTileNear;
232 /** Landscape Threshold. NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible in client.cfg
233 * MUST USE getActualLandscapeThreshold() to get the real value
235 float LandscapeThreshold;
236 /// Vision.
237 float Vision;
238 float Vision_min;
239 float Vision_max;
240 /// Number poly max for LOD Balancing. Fx and Skin
241 uint FxNbMaxPoly;
242 // Is cloud displayed
243 bool Cloud;
244 float CloudQuality;
245 uint CloudUpdate;
246 uint SkinNbMaxPoly;
247 uint NbMaxSkeletonNotCLod;
248 float CharacterFarClip;
249 /// ScreenAspectRatio
250 float ScreenAspectRatio;
251 /// Field of View (FoV)
252 float FoV;
253 /// Force the DXTC Compression.
254 bool ForceDXTC;
255 /// Set the anisotropic filter
256 sint AnisotropicFilter;
257 /// Divide texture size by 2
258 bool DivideTextureSizeBy2;
259 /// Disable Hardware Vertex Program.
260 bool DisableVtxProgram;
261 /// Disable Hardware Vertex AGP.
262 bool DisableVtxAGP;
263 /// Disable Hardware Texture Shader.
264 bool DisableTextureShdr;
265 /// Enable/Disable MicroVeget.
266 bool MicroVeget;
267 /// Density of microvegetation in %
268 float MicroVegetDensity;
269 /// Enable/Disable High Def Entity Texture quality. By default its false
270 bool HDEntityTexture;
271 /// True if the client has HD Texture installed 512*512)
272 bool HDTextureInstalled;
273 /// Enable/Disable Fog
274 bool Fog;
275 /// Enable/Disable VSync
276 bool WaitVBL;
277 /// Force or auto-detect video memory (in MiB)
278 sint VideoMemory;
280 /// Timer mode. 0 : QueryPerformanceCounter, 1 : timeGetTime.
281 uint TimerMode;
283 /// Global Wind Setup
284 float GlobalWindPower;
285 CVector GlobalWindDirection;
287 // FXAA
288 bool FXAA;
290 // Is bloom effect activated
291 bool Bloom;
292 bool SquareBloom;
293 float DensityBloom;
295 /// Movie Shooter
296 uint MovieShooterMemory;
297 string MovieShooterPath;
298 string MovieShooterPrefix;
299 float MovieShooterFramePeriod;
300 bool MovieShooterBlend;
301 uint MovieShooterFrameSkip;
303 // Camera recorder
304 string CameraRecorderPath;
305 string CameraRecorderPrefix;
306 bool CameraRecorderBlend;
308 /// Screen shot
309 uint ScreenShotWidth; // If 0 : normal screen shot, else custom screen shot without interface
310 uint ScreenShotHeight;
311 bool ScreenShotFullDetail; // If set to true, then load balancing will be disabled for the duration of the screenshot
312 bool ScreenShotZBuffer; // If set to true, save also the ZBuffer in a file
314 /////////////////////////
315 // NEW PATCHING SYSTEM //
316 bool PatchWanted;
317 std::string PatchUrl;
318 std::string PatchletUrl;
319 std::string PatchVersion;
321 std::string RingReleaseNotePath;
322 std::string ReleaseNotePath;
324 std::string WebIgMainDomain;
325 std::vector<string> WebIgTrustedDomains;
326 uint WebIgNotifInterval; // value in minutes for notification thread
328 sint32 CurlMaxConnections;
329 string CurlCABundle;
331 ///////////////
332 // ANIMATION //
333 // With a bigger angle, rotation is animated.
334 double AnimatedAngleThreshold;
335 uint BlendFrameNumber;
339 /// Shout color.
340 CRGBA ColorShout;
341 /// Talk color.
342 CRGBA ColorTalk;
344 /// Sound or not?
345 bool SoundOn;
347 /// Sound Driver
348 TDriverSound DriverSound;
350 /// SoundForceSoftwareBuffer
351 bool SoundForceSoftwareBuffer;
353 /// Music files
354 string StartMusic;
355 string EmptySlotMusic;
356 string LoadingMusic;
357 string KamiTeleportMusic;
358 string KaravanTeleportMusic;
359 string TeleportLoadingMusic;
360 string DeathMusic;
362 /// The Sound SFX Volume (0-1) (ie all but music)
363 float SoundSFXVolume;
364 /// This is volume for "InGame" music. Does not affect the MP3 player volume
365 float SoundGameMusicVolume;
367 /// Time in ms of sound to be faded in/out when the user is teleported
368 sint32 SoundTPFade;
370 /// For Dev only
371 bool EnableBackgroundMusicTimeConstraint;
373 /// Directory where to generate the sound packed sheets
374 string SoundPackedSheetPath;
375 /// the directory where the sample banks are stored (.wav)
376 string SampleBankDir;
377 /// The audio gain for user entity sound
378 float UserEntitySoundLevel;
379 /// A flag that indicated if we use EAX
380 bool UseEax;
381 /// A flag the indicate we whant ADPCM sample (reduce memory by 1/4, but lower quality)
382 bool UseADPCM;
383 /// The max number of track we want to use.
384 uint MaxTrack;
386 // MP3 Player
387 string MediaPlayerDirectory;
388 bool MediaPlayerAutoPlay;
390 /// Pre Data Path.
391 std::vector<string> PreDataPath;
392 /// Data Path.
393 std::vector<string> DataPath;
394 /// Data Path no recurse.
395 std::vector<string> DataPathNoRecurse;
396 /// Pre-load path
397 std::string PreLoadPath;
398 /// Streamed package path
399 std::string StreamedPackagePath;
400 /// Streamed package hosts
401 std::vector<string> StreamedPackageHosts; // TODO: From 'domain' SQL table
402 /// Update packed sheet Path.
403 std::vector<string> UpdatePackedSheetPath;
404 /// True if we want the packed sheet to be updated if needed
405 bool UpdatePackedSheet;
406 /// TIme before exiting the application (in sec).
407 float EndScreenTimeOut;
408 /// Texture file name for the loading Background.
409 string Loading_BG;
410 string LoadingFreeTrial_BG;
411 /// Texture file name for the launch Background.
412 string Launch_BG;
413 /// Texture file name
414 string TeleportKami_BG;
415 string TeleportKaravan_BG;
416 /// Texture file name
417 string Elevator_BG;
418 /// Texture file name
419 string ResurectKami_BG;
420 string ResurectKaravan_BG;
421 /// Texture file name for the last Background.
422 string End_BG;
423 string IntroNevrax_BG;
424 string IntroNVidia_BG;
425 /// Message screen position
426 float TipsY;
427 float TeleportInfoY;
428 /// Name of the scene to play.
429 string SceneName;
430 /// Path for the Id file.
431 string IdFilePath;
432 // directories where pacs primitive can be found
433 std::vector<string> PacsPrimDir;
435 /// Vector with some entities to spawn at the beginning.
436 std::vector<string> StartCommands;
438 /// Display or not the shadows.
439 bool Shadows;
440 /// Shadows are disabled after this distance.
441 float ShadowsClipFar;
442 /// Shadows draw with just 1 part after this distance.
443 float ShadowsLodDist;
444 /// ShadowMap Z Direction Clamping when player is on landscape/interior
445 float ShadowZDirClampLandscape;
446 float ShadowZDirClampInterior;
447 float ShadowZDirClampSmoothSpeed;
448 /// ShadowMap Max Depth when player is on landscape/interior
449 float ShadowMaxDepthLandscape;
450 float ShadowMaxDepthInterior;
451 float ShadowMaxDepthSmoothSpeed;
454 /// Prim file to load
455 std::vector<string> PrimFiles;
457 /// Display or not the Names.
458 bool Names;
459 /// To force the client to sleep a bit (in ms).
460 sint Sleep;
461 /// Force process priority
462 sint ProcessPriority;
463 /// CPU Mask
464 sint CPUMask;
465 // To show/hide the entities path
466 bool ShowPath;
467 /// Draw the Boxes used for the selection.
468 bool DrawBoxes;
470 /// The Sheet used by the user.
471 std::string UserSheet;
472 /// (only use in local mode) User Sex.
473 GSGENDER::EGender Sex;
475 /// height added to character primitive
476 float PrimitiveHeightAddition;
478 /// Distance between 2 attackers.
479 float AttackDist;
482 /// Day at the beginning (in local mode only)
483 uint32 RyzomDay;
484 /// Time at the beginning (in local mode only)
485 float RyzomTime;
488 /// Temp for test : manual setup of the weather function
489 bool ManualWeatherSetup;
491 float ChaseReactionTime;
493 /// Time allowed to adjust the camera from 1st to 3rd person view (in ms).
494 double TimeToAdjustCamera;
495 /// Change the direction once this angle is reached.
496 double ChangeDirAngle;
497 /// Guild Symbol Size
498 float GuildSymbolSize;
499 /// Distance Maximum to be able to select an entity.
500 float SelectionDist;
501 /// For fair selection of entity, relative to center of bbox.
502 float SelectionOutBBoxWeight;
503 /// Distance Maximum to be able to loot/harvest a corpse.
504 float LootDist;
505 /// Space Selection: Max distance for space selection.
506 float SpaceSelectionDist;
507 /// Space Selection: max number of entities to cycle through
508 uint32 SpaceSelectionMaxCycle;
511 ////////////
512 // TUNING //
513 /// Water Offset
514 float WaterOffset;
516 /// Water Offset
517 float FyrosWaterOffset;
518 float MatisWaterOffset;
519 float TrykerWaterOffset;
520 float ZoraiWaterOffset;
522 /// Water Offset for creature (mektoubs)
523 float WaterOffsetCreature;
524 /// Time before removing entities collisions from entities with the user in MS.
525 uint32 TimeToRemoveCol;
526 /// Time before stoping running to 0.5m to an entity for executing an action
527 uint32 MoveToTimeToStopStall;
528 /// Third Person View Min Pitch.
529 float TPVMinPitch;
530 /// Third Person View Max Pitch.
531 float TPVMaxPitch;
532 /// Max Head Targeting distance
533 float MaxHeadTargetDist;
534 /// Name of the FX played when dead
535 std::string DeadFXName;
536 /// Name of the FX played for each impact.
537 std::string ImpactFXName;
538 /// Name of the FX played when Skill Up.
539 std::string SkillUpFXName;
540 /// Factor of the walk animation distance after which the entity will start moving.
541 double MinDistFactor;
543 /// Scale used to display names.
544 float NameScale;
545 /// Distance between the name and the extended name (this value is multiply with the name scale).
546 float NamePos;
547 /// Name Font Size (above entities).
548 uint32 NameFontSize;
549 /// Names will be hidden after this Value.
550 float MaxNameDist;
551 /// Before this Value, the name size is constant.
552 float ConstNameSizeDist;
553 /// If true names won't move all the time over entities
554 bool StaticNameHeight;
555 /// Bars Height / 2
556 float BarsHeight;
557 /// Bars Width / 2
558 float BarsWidth;
559 /// Fight Area Size
560 double FightAreaSize;
561 /// Destination Threshold
562 double DestThreshold;
563 /// Radius of the Position Limiter (Useful to avoid some Noise on Positions).
564 double PositionLimiterRadius;
565 /// Significant Distance
566 double SignificantDist;
567 /// ZBias for InScene bubble
568 float BubbleZBias;
569 /// ZBias for InScene Forage Interface
570 float ForageInterfaceZBias;
572 /// visual scale
573 float FyrosScale;
574 float MatisScale;
575 float TrykerScale;
576 float ZoraiScale;
578 /// Racial Animation
579 bool EnableRacialAnimation;
581 /////////////
582 // OPTIONS //
583 /// Right click select too.
584 bool SelectWithRClick;
585 /// Walk/Run at the beginning
586 bool RunAtTheBeginning;
587 /// Rotation Velocity
588 float RotKeySpeedMax;
589 float RotKeySpeedMin;
590 /// Rotation Acceleration
591 float RotAccel;
592 /// Put Back Items after use
593 bool PutBackItems;
594 /// Display the name of the entity under the cursor.
595 bool ShowNameUnderCursor;
596 /// Display the name of the entity selected.
597 bool ShowNameSelected;
598 /// Force display of names under this distance
599 float ShowNameBelowDistanceSqr;
600 /// Force the FPV when the user is indoor.
601 bool ForceIndoorFPV;
602 /// Follow on Attack
603 bool FollowOnAtk;
604 /// Attack on Select
605 bool AtkOnSelect;
606 /// Makes entities transparent if they are under cursor
607 bool TransparentUnderCursor;
609 /// Allow item group to move from / to guild room
610 bool ItemGroupAllowGuild;
613 /////////////////
614 // PREFERENCES //
615 /// First Person View or Not.
616 bool FPV;
617 /// Distance of the camera from the user.
618 float CameraHeight;
619 float CameraDistance;
620 float CameraDistStep;
621 float CameraDistMin; // Last distance before FirstPersonView
622 float CameraDistMax; // distance max of the camera for ryzom player and ring tester player
623 float DmCameraDistMax; // distance max of the camera for ring/dm
624 float CameraAccel;
625 float CameraSpeedMin;
626 float CameraSpeedMax;
627 float CameraResetSpeed;
629 // Default values for CGroupMap
630 float MaxMapScale;
631 float R2EDMaxMapScale;
633 // If successfull /tar command should set compass or not
634 bool TargetChangeCompass;
636 //////////////
637 // VERBOSES //
638 bool VerboseVP;
639 bool VerboseAnimUser;
640 bool VerboseAnimSelection;
641 bool VerboseAllTraffic;
644 //////////
645 // LIGO //
646 std::string LigoPrimitiveClass;
648 ///////////
649 // DEBUG //
650 // Display names of missing animation files
651 bool DisplayMissingAnimFile;
652 // Default creature spawned when the entity do not exist
653 std::string DefaultEntity;
654 // Restrain the predicted interval
655 bool RestrainPI;
656 // Dump Visual Slot IDs.
657 bool DumpVSIndex;
658 // Font size for Help infos.
659 uint32 HelpFontSize;
660 // Color for the Help Font.
661 CRGBA HelpFontColor;
662 // Line step for Help infos.
663 float HelpLineStep;
664 // Font size for debug infos.
665 uint32 DebugFontSize;
666 // Color for the Debug Font.
667 CRGBA DebugFontColor;
668 // Line step for debug infos.
669 float DebugLineStep;
671 CVector HeadOffset;
672 // Enable/disable Floating Point Exceptions
673 bool FPExceptions;
674 // Use to launch exceptions when there is something wrong
675 bool Check;
676 // Use PACS collision for all (Work In Progress).
677 bool UsePACSForAll;
679 bool DisplayWeapons;
680 bool NeedComputeVS;
681 bool BlendForward;
683 bool ForceLanguage;
684 std::string LanguageCode;
685 bool DebugStringManager;
686 bool PreCacheShapes;
687 bool ResetShapeBankOnRetCharSelect;
689 std::string LastLogin;
691 uint32 SimulatePacketLossRatio;
693 // Parameters for colors of messages in system info
694 // Mode is the display settings :
695 // Normal : just display in the system info window
696 // Over : must be displayed at bottom of the screen and in system info window
697 // OverOnly : must be displayed at bottom of the screen
698 // Center ; must be displayed at the center of the screen and in system info window
699 // Around ; must be displayed in the around chat window
700 // CenterAround ; must be displayed at the center of the screen and in around chat window
701 struct SSysInfoParam
703 CRGBA Color;
704 std::string SysInfoFxName;
705 enum TMode { Normal, Over, OverOnly, Center, Around, CenterAround };
706 TMode Mode;
707 SSysInfoParam()
709 Color= CRGBA::Black;
710 Mode= Normal;
713 std::map<std::string, SSysInfoParam> SystemInfoParams;
716 // printf commands to display localized strings in loading screen
717 struct SPrintfCommand
719 uint X;
720 uint Y;
721 CRGBA Color;
722 uint FontSize;
723 std::string Text;
725 std::vector<SPrintfCommand> PrintfCommands;
727 std::vector<SPrintfCommand> PrintfCommandsFreeTrial;
729 // funny loading messages count
730 uint16 LoadingStringCount;
733 // DEBUG MEMORY
734 int CheckMemoryEveryNFrame; // -1 no check (default) else number frame to skip before a memory checking
735 bool LogMemoryAllocation; // false no log (default) else log each memory allocation in the file "alloc.memlog"
736 int LogMemoryAllocationSize; // Size of the block to log (default : 8)
738 // ground FXs
739 float GroundFXMaxDist; // max dist for ground fxs
740 uint GroundFXMaxNB; // max number of ground fxs
741 uint GroundFXCacheSize; // max number of cached ground fxs
743 //////////
744 // TEMP //
745 // Array with the name of all offensive impact FXs.
746 std::vector<string> OffImpactFX;
748 // Pacs prim used for ZC
749 std::string ZCPacsPrim;
751 // Reload config files, teleport list and sheet_id.bin
752 bool AutoReloadFiles;
754 // Use new version of the blend shapes (if true) new version with min,max in race_stats
755 bool BlendShapePatched;
757 // Not secure boolean to disable some commands on client side
758 bool ExtendedCommands;
760 // Timed FXs
761 sint MaxNumberOfTimedFXInstances;
763 // Selection FXs
764 std::string SelectionFX;
765 std::string MouseOverFX;
766 float SelectionFXSize;
768 // Time to update water envmap
769 float WaterEnvMapUpdateTime;
771 // number of frames to profile (0 for start/stop scheme)
772 uint NumFrameForProfile;
774 // KlientChatPort
775 std::string KlientChatPort;
777 // SimulateServerTick
778 bool SimulateServerTick;
780 // usage of LCT in _Stages of CCharacterCL
781 TStageLCTUsage StageLCTUsage;
783 // TMP : for integration of damage shield
784 bool DamageShieldEnabled;
785 //////////
786 // R2ED //
787 //////////
788 /// Activate R2 login behavior
789 bool R2Mode;
790 /// Force direct R2 editor jumpstart
791 bool R2EDEnabled;
792 bool R2EDVerboseParseTime;
793 bool R2EDDontReparseUnchangedUIFiles;
794 std::vector<string> R2EDReloadFiles;
795 bool R2EDExtendedDebug;
796 bool R2EDLightPalette;
797 uint32 R2EDAutoSaveWait; // wait between 2 autosave in second
798 uint32 R2EDAutoSaveSlot; // number of autosave file
799 uint32 R2EDLoadDynamicFeatures;
800 bool R2EDMustVerifyRingAccessWhileLoadingAnimation;
801 bool R2EDUseVerboseRingAccess;
803 float R2EDClippedEntityBlendTime;
805 //0: direct send packet to DSS <=> for not breaking thing
806 //1: cut packet send to DSS <=> for local or SBS less shard (dev)
807 //2: cut packet, simulate SBS <=> debug
808 //3: cut packet, send to SBS <=> will be the final value
811 uint32 R2EDDssNetwork;
813 /////////
814 // LUA //
815 /////////
817 /// Allow Lua commands (commands beginning with Lua)
818 bool AllowDebugLua;
820 bool LuaDebugInfoGotoButtonEnabled;
821 std::string LuaDebugInfoGotoButtonTemplate;
822 std::string LuaDebugInfoGotoButtonCaption;
823 std::string LuaDebugInfoGotoButtonFunction;
826 /// Display additional Lua DebugInfo
827 bool DisplayLuaDebugInfo;
829 bool BeepWhenLaunched; // beep when the client is launched
831 // R2 Gw
832 std::string R2ClientGw;
834 float FogDistAndDepthLookupBias;
836 // name of the files for hardware cursors
837 std::set<std::string> HardwareCursors;
839 bool CheckR2ScenarioMD5;
841 // vector of languages avoidable in Ring scenari
842 std::vector<string> ScenarioLanguages;
844 // vector of types avoidable in Ring scenari
845 std::vector<string> ScenarioTypes;
847 // build name
848 std::string BuildName;
851 bool DisplayTPReason;
854 //uint32 TPCancelButtonX;
855 //uint32 TPCancelButtonY;
856 //uint32 TPQuitButtonX;
857 //uint32 TPQuitButtonY;
858 uint32 TPButtonW;
859 uint32 TPButtonH;
861 std::string ScenarioSavePath;
864 // tmp for background downloader integration
865 bool BackgroundDownloader;
867 public:
868 /// Constructor.
869 CClientConfig();
870 virtual ~CClientConfig() {}
872 static void setValues (); // Set the values of the ClientCfg instance
873 static void setValuesOnFileChange (); // called when cfg modified
875 /// Serialize CFG.
876 virtual void serial(NLMISC::IStream &f);
878 /// End process
879 void release ();
881 bool readBool (const std::string &varName);
882 void writeBool (const std::string &varName, bool val, bool bForce = false);
883 sint32 readInt (const std::string &varName);
884 void writeInt (const std::string &varName, sint32 val, bool bForce = false);
885 double readDouble (const std::string &varName);
886 void writeDouble (const std::string &varName, double val, bool bForce = false);
887 void writeString (const std::string &varName, const std::string &bVal, bool bForce = false);
889 // return 0 / false if not succeed
890 bool readBoolNoWarning (const std::string &varName);
891 sint32 readIntNoWarning (const std::string &varName);
892 double readDoubleNoWarning (const std::string &varName);
893 std::string readString (const std::string &varName);
896 // NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible in client.cfg
897 float getActualLandscapeThreshold() const;
899 // Return LanguageCode but if "wk", then return "en"
900 std::string getHtmlLanguageCode() const;
902 // return a random loading tip or, if there are not, return the string in argument
903 std::string buildLoadingString(const std::string &ucstr) const;
905 /// get the path to client_default.cfg including the filename itself.
906 bool getDefaultConfigLocation(std::string& fileLocation) const;
908 };// CClientConfig //
911 ////////////
912 // GLOBAL //
913 ////////////
914 extern CClientConfig LastClientCfg;
915 extern CClientConfig ClientCfg;
916 extern const std::string ConfigFileName;
918 #endif // CL_CLIENT_CFG_H
920 /* End of client_cfg.h */