Resolve "Toggle Free Look with Hotkey"
[ryzomcore.git] / ryzom / client / src / client_cfg.h
blobcd34f2b707a1cc171817d7ca7e7cb1d5614923b9
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, 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 string ScreenShotDirectory;
310 uint ScreenShotWidth; // If 0 : normal screen shot, else custom screen shot without interface
311 uint ScreenShotHeight;
312 bool ScreenShotFullDetail; // If set to true, then load balancing will be disabled for the duration of the screenshot
313 bool ScreenShotZBuffer; // If set to true, save also the ZBuffer in a file
315 /////////////////////////
316 // NEW PATCHING SYSTEM //
317 bool PatchWanted;
318 std::string PatchUrl;
319 std::string PatchletUrl;
320 std::string PatchVersion;
322 std::string RingReleaseNotePath;
323 std::string ReleaseNotePath;
325 std::string WebIgMainDomain;
326 std::vector<string> WebIgTrustedDomains;
327 uint WebIgNotifInterval; // value in minutes for notification thread
329 sint32 CurlMaxConnections;
330 string CurlCABundle;
332 ///////////////
333 // ANIMATION //
334 // With a bigger angle, rotation is animated.
335 double AnimatedAngleThreshold;
336 uint BlendFrameNumber;
340 /// Shout color.
341 CRGBA ColorShout;
342 /// Talk color.
343 CRGBA ColorTalk;
345 /// Sound or not?
346 bool SoundOn;
348 /// Sound Driver
349 TDriverSound DriverSound;
351 /// SoundForceSoftwareBuffer
352 bool SoundForceSoftwareBuffer;
354 /// Music files
355 string StartMusic;
356 string EmptySlotMusic;
357 string LoadingMusic;
358 string KamiTeleportMusic;
359 string KaravanTeleportMusic;
360 string TeleportLoadingMusic;
361 string DeathMusic;
363 /// The Sound SFX Volume (0-1) (ie all but music)
364 float SoundSFXVolume;
365 /// This is volume for "InGame" music. Does not affect the MP3 player volume
366 float SoundGameMusicVolume;
368 /// Time in ms of sound to be faded in/out when the user is teleported
369 sint32 SoundTPFade;
371 /// For Dev only
372 bool EnableBackgroundMusicTimeConstraint;
374 /// Directory where to generate the sound packed sheets
375 string SoundPackedSheetPath;
376 /// the directory where the sample banks are stored (.wav)
377 string SampleBankDir;
378 /// The audio gain for user entity sound
379 float UserEntitySoundLevel;
380 /// A flag that indicated if we use EAX
381 bool UseEax;
382 /// A flag the indicate we whant ADPCM sample (reduce memory by 1/4, but lower quality)
383 bool UseADPCM;
384 /// The max number of track we want to use.
385 uint MaxTrack;
387 // MP3 Player
388 string MediaPlayerDirectory;
389 bool MediaPlayerAutoPlay;
391 /// Pre Data Path.
392 std::vector<string> PreDataPath;
393 /// Data Path.
394 std::vector<string> DataPath;
395 /// Data Path no recurse.
396 std::vector<string> DataPathNoRecurse;
397 /// Pre-load path
398 std::string PreLoadPath;
399 /// Streamed package path
400 std::string StreamedPackagePath;
401 /// Streamed package hosts
402 std::vector<string> StreamedPackageHosts; // TODO: From 'domain' SQL table
403 /// Update packed sheet Path.
404 std::vector<string> UpdatePackedSheetPath;
405 /// True if we want the packed sheet to be updated if needed
406 bool UpdatePackedSheet;
407 /// TIme before exiting the application (in sec).
408 float EndScreenTimeOut;
409 /// Texture file name for the loading Background.
410 string Loading_BG;
411 string LoadingFreeTrial_BG;
412 /// Texture file name for the launch Background.
413 string Launch_BG;
414 /// Texture file name
415 string TeleportKami_BG;
416 string TeleportKaravan_BG;
417 /// Texture file name
418 string Elevator_BG;
419 /// Texture file name
420 string ResurectKami_BG;
421 string ResurectKaravan_BG;
422 /// Texture file name for the last Background.
423 string End_BG;
424 string IntroNevrax_BG;
425 string IntroNVidia_BG;
426 /// Message screen position
427 float TipsY;
428 float TeleportInfoY;
429 /// Name of the scene to play.
430 string SceneName;
431 /// Path for the Id file.
432 string IdFilePath;
433 // directories where pacs primitive can be found
434 std::vector<string> PacsPrimDir;
436 /// Vector with some entities to spawn at the beginning.
437 std::vector<string> StartCommands;
439 /// Display or not the shadows.
440 bool Shadows;
441 /// Shadows are disabled after this distance.
442 float ShadowsClipFar;
443 /// Shadows draw with just 1 part after this distance.
444 float ShadowsLodDist;
445 /// ShadowMap Z Direction Clamping when player is on landscape/interior
446 float ShadowZDirClampLandscape;
447 float ShadowZDirClampInterior;
448 float ShadowZDirClampSmoothSpeed;
449 /// ShadowMap Max Depth when player is on landscape/interior
450 float ShadowMaxDepthLandscape;
451 float ShadowMaxDepthInterior;
452 float ShadowMaxDepthSmoothSpeed;
455 /// Prim file to load
456 std::vector<string> PrimFiles;
458 /// Display or not the Names.
459 bool Names;
460 /// To force the client to sleep a bit (in ms).
461 sint Sleep;
462 /// Force process priority
463 sint ProcessPriority;
464 /// CPU Mask
465 sint CPUMask;
466 // To show/hide the entities path
467 bool ShowPath;
468 /// Draw the Boxes used for the selection.
469 bool DrawBoxes;
471 /// The Sheet used by the user.
472 std::string UserSheet;
473 /// (only use in local mode) User Sex.
474 GSGENDER::EGender Sex;
476 /// height added to character primitive
477 float PrimitiveHeightAddition;
479 /// Distance between 2 attackers.
480 float AttackDist;
483 /// Day at the beginning (in local mode only)
484 uint32 RyzomDay;
485 /// Time at the beginning (in local mode only)
486 float RyzomTime;
489 /// Temp for test : manual setup of the weather function
490 bool ManualWeatherSetup;
492 float ChaseReactionTime;
494 /// Time allowed to adjust the camera from 1st to 3rd person view (in ms).
495 double TimeToAdjustCamera;
496 /// Change the direction once this angle is reached.
497 double ChangeDirAngle;
498 /// Guild Symbol Size
499 float GuildSymbolSize;
500 /// Distance Maximum to be able to select an entity.
501 float SelectionDist;
502 /// For fair selection of entity, relative to center of bbox.
503 float SelectionOutBBoxWeight;
504 /// Distance Maximum to be able to loot/harvest a corpse.
505 float LootDist;
506 /// Space Selection: Max distance for space selection.
507 float SpaceSelectionDist;
508 /// Space Selection: max number of entities to cycle through
509 uint32 SpaceSelectionMaxCycle;
512 ////////////
513 // TUNING //
514 /// Water Offset
515 float WaterOffset;
517 /// Water Offset
518 float FyrosWaterOffset;
519 float MatisWaterOffset;
520 float TrykerWaterOffset;
521 float ZoraiWaterOffset;
523 /// Water Offset for creature (mektoubs)
524 float WaterOffsetCreature;
525 /// Time before removing entities collisions from entities with the user in MS.
526 uint32 TimeToRemoveCol;
527 /// Time before stoping running to 0.5m to an entity for executing an action
528 uint32 MoveToTimeToStopStall;
529 /// Third Person View Min Pitch.
530 float TPVMinPitch;
531 /// Third Person View Max Pitch.
532 float TPVMaxPitch;
533 /// Max Head Targeting distance
534 float MaxHeadTargetDist;
535 /// Name of the FX played when dead
536 std::string DeadFXName;
537 /// Name of the FX played for each impact.
538 std::string ImpactFXName;
539 /// Name of the FX played when Skill Up.
540 std::string SkillUpFXName;
541 /// Factor of the walk animation distance after which the entity will start moving.
542 double MinDistFactor;
544 /// Scale used to display names.
545 float NameScale;
546 /// Distance between the name and the extended name (this value is multiply with the name scale).
547 float NamePos;
548 /// Name Font Size (above entities).
549 uint32 NameFontSize;
550 /// Names will be hidden after this Value.
551 float MaxNameDist;
552 /// Before this Value, the name size is constant.
553 float ConstNameSizeDist;
554 /// If true names won't move all the time over entities
555 bool StaticNameHeight;
556 /// Bars Height / 2
557 float BarsHeight;
558 /// Bars Width / 2
559 float BarsWidth;
560 /// Fight Area Size
561 double FightAreaSize;
562 /// Destination Threshold
563 double DestThreshold;
564 /// Radius of the Position Limiter (Useful to avoid some Noise on Positions).
565 double PositionLimiterRadius;
566 /// Significant Distance
567 double SignificantDist;
568 /// ZBias for InScene bubble
569 float BubbleZBias;
570 /// ZBias for InScene Forage Interface
571 float ForageInterfaceZBias;
573 /// visual scale
574 float FyrosScale;
575 float MatisScale;
576 float TrykerScale;
577 float ZoraiScale;
579 /// Racial Animation
580 bool EnableRacialAnimation;
582 /////////////
583 // OPTIONS //
584 /// Right click select too.
585 bool SelectWithRClick;
586 /// Walk/Run at the beginning
587 bool RunAtTheBeginning;
588 /// Rotation Velocity
589 float RotKeySpeedMax;
590 float RotKeySpeedMin;
591 /// Rotation Acceleration
592 float RotAccel;
593 /// Put Back Items after use
594 bool PutBackItems;
595 /// Display the name of the entity under the cursor.
596 bool ShowNameUnderCursor;
597 /// Display the name of the entity selected.
598 bool ShowNameSelected;
599 /// Force display of names under this distance
600 float ShowNameBelowDistanceSqr;
601 /// Force the FPV when the user is indoor.
602 bool ForceIndoorFPV;
603 /// Follow on Attack
604 bool FollowOnAtk;
605 /// Attack on Select
606 bool AtkOnSelect;
607 /// Makes entities transparent if they are under cursor
608 bool TransparentUnderCursor;
610 /// Allow item group to move from / to guild room
611 bool ItemGroupAllowGuild;
614 /////////////////
615 // PREFERENCES //
616 /// First Person View or Not.
617 bool FPV;
618 /// Distance of the camera from the user.
619 float CameraHeight;
620 float CameraDistance;
621 float CameraDistStep;
622 float CameraDistMin; // Last distance before FirstPersonView
623 float CameraDistMax; // distance max of the camera for ryzom player and ring tester player
624 float DmCameraDistMax; // distance max of the camera for ring/dm
625 float CameraAccel;
626 float CameraSpeedMin;
627 float CameraSpeedMax;
628 float CameraResetSpeed;
630 // Default values for CGroupMap
631 float MaxMapScale;
632 float R2EDMaxMapScale;
634 // If successfull /tar command should set compass or not
635 bool TargetChangeCompass;
637 //////////////
638 // VERBOSES //
639 bool VerboseVP;
640 bool VerboseAnimUser;
641 bool VerboseAnimSelection;
642 bool VerboseAllTraffic;
645 //////////
646 // LIGO //
647 std::string LigoPrimitiveClass;
649 ///////////
650 // DEBUG //
651 // Display names of missing animation files
652 bool DisplayMissingAnimFile;
653 // Default creature spawned when the entity do not exist
654 std::string DefaultEntity;
655 // Restrain the predicted interval
656 bool RestrainPI;
657 // Dump Visual Slot IDs.
658 bool DumpVSIndex;
659 // Font size for Help infos.
660 uint32 HelpFontSize;
661 // Color for the Help Font.
662 CRGBA HelpFontColor;
663 // Line step for Help infos.
664 float HelpLineStep;
665 // Font size for debug infos.
666 uint32 DebugFontSize;
667 // Color for the Debug Font.
668 CRGBA DebugFontColor;
669 // Line step for debug infos.
670 float DebugLineStep;
672 CVector HeadOffset;
673 // Enable/disable Floating Point Exceptions
674 bool FPExceptions;
675 // Use to launch exceptions when there is something wrong
676 bool Check;
677 // Use PACS collision for all (Work In Progress).
678 bool UsePACSForAll;
680 bool DisplayWeapons;
681 bool NeedComputeVS;
682 bool BlendForward;
684 bool ForceLanguage;
685 std::string LanguageCode;
686 bool DebugStringManager;
687 bool PreCacheShapes;
688 bool ResetShapeBankOnRetCharSelect;
690 std::string LastLogin;
692 uint32 SimulatePacketLossRatio;
694 // Parameters for colors of messages in system info
695 // Mode is the display settings :
696 // Normal : just display in the system info window
697 // Over : must be displayed at bottom of the screen and in system info window
698 // OverOnly : must be displayed at bottom of the screen
699 // Center ; must be displayed at the center of the screen and in system info window
700 // Around ; must be displayed in the around chat window
701 // CenterAround ; must be displayed at the center of the screen and in around chat window
702 struct SSysInfoParam
704 CRGBA Color;
705 std::string SysInfoFxName;
706 enum TMode { Normal, Over, OverOnly, Center, Around, CenterAround };
707 TMode Mode;
708 SSysInfoParam()
710 Color= CRGBA::Black;
711 Mode= Normal;
714 std::map<std::string, SSysInfoParam> SystemInfoParams;
717 // printf commands to display localized strings in loading screen
718 struct SPrintfCommand
720 uint X;
721 uint Y;
722 CRGBA Color;
723 uint FontSize;
724 std::string Text;
726 std::vector<SPrintfCommand> loadingTexts;
728 // funny loading messages count
729 uint16 LoadingStringCount;
732 // DEBUG MEMORY
733 int CheckMemoryEveryNFrame; // -1 no check (default) else number frame to skip before a memory checking
734 bool LogMemoryAllocation; // false no log (default) else log each memory allocation in the file "alloc.memlog"
735 int LogMemoryAllocationSize; // Size of the block to log (default : 8)
737 // ground FXs
738 float GroundFXMaxDist; // max dist for ground fxs
739 uint GroundFXMaxNB; // max number of ground fxs
740 uint GroundFXCacheSize; // max number of cached ground fxs
742 //////////
743 // TEMP //
744 // Array with the name of all offensive impact FXs.
745 std::vector<string> OffImpactFX;
747 // Pacs prim used for ZC
748 std::string ZCPacsPrim;
750 // Reload config files, teleport list and sheet_id.bin
751 bool AutoReloadFiles;
753 // Use new version of the blend shapes (if true) new version with min,max in race_stats
754 bool BlendShapePatched;
756 // Not secure boolean to disable some commands on client side
757 bool ExtendedCommands;
759 // Timed FXs
760 sint MaxNumberOfTimedFXInstances;
762 // Selection FXs
763 std::string SelectionFX;
764 std::string MouseOverFX;
765 float SelectionFXSize;
767 // Time to update water envmap
768 float WaterEnvMapUpdateTime;
770 // number of frames to profile (0 for start/stop scheme)
771 uint NumFrameForProfile;
773 // KlientChatPort
774 std::string KlientChatPort;
776 // SimulateServerTick
777 bool SimulateServerTick;
779 // usage of LCT in _Stages of CCharacterCL
780 TStageLCTUsage StageLCTUsage;
782 // TMP : for integration of damage shield
783 bool DamageShieldEnabled;
784 //////////
785 // R2ED //
786 //////////
787 /// Activate R2 login behavior
788 bool R2Mode;
789 /// Force direct R2 editor jumpstart
790 bool R2EDEnabled;
791 bool R2EDVerboseParseTime;
792 bool R2EDDontReparseUnchangedUIFiles;
793 std::vector<string> R2EDReloadFiles;
794 bool R2EDExtendedDebug;
795 bool R2EDLightPalette;
796 uint32 R2EDAutoSaveWait; // wait between 2 autosave in second
797 uint32 R2EDAutoSaveSlot; // number of autosave file
798 uint32 R2EDLoadDynamicFeatures;
799 bool R2EDMustVerifyRingAccessWhileLoadingAnimation;
800 bool R2EDUseVerboseRingAccess;
802 float R2EDClippedEntityBlendTime;
804 //0: direct send packet to DSS <=> for not breaking thing
805 //1: cut packet send to DSS <=> for local or SBS less shard (dev)
806 //2: cut packet, simulate SBS <=> debug
807 //3: cut packet, send to SBS <=> will be the final value
810 uint32 R2EDDssNetwork;
812 /////////
813 // LUA //
814 /////////
816 /// Allow Lua commands (commands beginning with Lua)
817 bool AllowDebugLua;
819 bool LuaDebugInfoGotoButtonEnabled;
820 std::string LuaDebugInfoGotoButtonTemplate;
821 std::string LuaDebugInfoGotoButtonCaption;
822 std::string LuaDebugInfoGotoButtonFunction;
825 /// Display additional Lua DebugInfo
826 bool DisplayLuaDebugInfo;
828 bool BeepWhenLaunched; // beep when the client is launched
830 // R2 Gw
831 std::string R2ClientGw;
833 float FogDistAndDepthLookupBias;
835 // name of the files for hardware cursors
836 std::set<std::string> HardwareCursors;
838 bool CheckR2ScenarioMD5;
840 // vector of languages avoidable in Ring scenari
841 std::vector<string> ScenarioLanguages;
843 // vector of types avoidable in Ring scenari
844 std::vector<string> ScenarioTypes;
846 // build name
847 std::string BuildName;
850 bool DisplayTPReason;
853 //uint32 TPCancelButtonX;
854 //uint32 TPCancelButtonY;
855 //uint32 TPQuitButtonX;
856 //uint32 TPQuitButtonY;
857 uint32 TPButtonW;
858 uint32 TPButtonH;
860 std::string ScenarioSavePath;
863 // tmp for background downloader integration
864 bool BackgroundDownloader;
866 public:
867 /// Constructor.
868 CClientConfig();
869 virtual ~CClientConfig() {}
871 static void setValues (); // Set the values of the ClientCfg instance
872 static void setValuesOnFileChange (); // called when cfg modified
874 /// Serialize CFG.
875 virtual void serial(NLMISC::IStream &f);
877 /// End process
878 void release ();
880 bool readBool (const std::string &varName);
881 void writeBool (const std::string &varName, bool val, bool bForce = false);
882 sint32 readInt (const std::string &varName);
883 void writeInt (const std::string &varName, sint32 val, bool bForce = false);
884 double readDouble (const std::string &varName);
885 void writeDouble (const std::string &varName, double val, bool bForce = false);
886 void writeString (const std::string &varName, const std::string &bVal, bool bForce = false);
888 // return 0 / false if not succeed
889 bool readBoolNoWarning (const std::string &varName);
890 sint32 readIntNoWarning (const std::string &varName);
891 double readDoubleNoWarning (const std::string &varName);
892 std::string readString (const std::string &varName);
895 // NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible in client.cfg
896 float getActualLandscapeThreshold() const;
898 // Return LanguageCode but if "wk", then return "en"
899 std::string getHtmlLanguageCode() const;
901 // return a random loading tip or, if there are not, return the string in argument
902 std::string buildLoadingString(const std::string &ucstr) const;
904 /// get the path to client_default.cfg including the filename itself.
905 bool getDefaultConfigLocation(std::string& fileLocation) const;
907 };// CClientConfig //
910 ////////////
911 // GLOBAL //
912 ////////////
913 extern CClientConfig LastClientCfg;
914 extern CClientConfig ClientCfg;
915 extern const std::string ConfigFileName;
917 #endif // CL_CLIENT_CFG_H
919 /* End of client_cfg.h */