Add infos into target window
[ryzomcore.git] / ryzom / client / src / client_cfg.h
blobb17e82e8ae028024ae54e3369592e38255bc9489
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 InterfaceScaleAuto;
161 bool BilinearUI;
163 // Window snap
164 bool WindowSnapInvert;
165 uint32 WindowSnapDistance;
167 // VR
168 bool VREnable;
169 std::string VRDisplayDevice;
170 std::string VRDisplayDeviceId;
172 /// Client in Local mode or not.
173 bool Local;
174 /// Host.
175 string FSHost;
176 /// Login.
177 bool DisplayAccountButtons;
178 string CreateAccountURL;
179 string EditAccountURL;
180 string ConditionsTermsURL;
181 string NamingPolicyURL;
182 string BetaAccountURL;
183 string ForgetPwdURL;
184 string FreeTrialURL;
185 string LoginSupportURL;
187 /// User entity Position (in local mode only).
188 CVector Position;
189 /// User entity Heading (in local mode only).
190 CVector Heading;
191 /// Height for the eyes.
192 float EyesHeight;
193 /// Velocity for the Walk.
194 float Walk;
195 /// Velocity for the Run.
196 float Run;
197 /// Velocity for the Walk in DM ing or editing.
198 float DmWalk;
199 /// Velocity for the Run in DM ing or editing.
200 float DmRun;
201 /// Velocity for the Fly.
202 float Fly;
203 /// Acceleration for the Fly.
204 float FlyAccel;
206 /// Allow debug commands
207 bool AllowDebugCommands;
209 /// \name Inputs
211 /// Use a hardware cursor
212 bool HardwareCursor;
213 float HardwareCursorScale; // scale for hardware cursor bitmap (in ]0, 1])
214 float CursorSpeed;
215 uint CursorAcceleration;
216 float FreeLookSpeed;
217 uint FreeLookAcceleration;
218 float FreeLookSmoothingPeriod;
219 bool FreeLookInverted;
220 bool FreeLookTablet;
221 // true if camera is centered when user casts a spell
222 bool AutomaticCamera;
223 bool DblClickMode;
224 bool AutoEquipTool;
226 /// Time inputs
227 uint ForceDeltaTime; // 0 to use real delta time
229 /// Background Color
230 CRGBA BGColor;
231 /// Landscape Tile Near.
232 float LandscapeTileNear;
233 /** Landscape Threshold. NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible in client.cfg
234 * MUST USE getActualLandscapeThreshold() to get the real value
236 float LandscapeThreshold;
237 /// Vision.
238 float Vision;
239 float Vision_min;
240 float Vision_max;
241 /// Number poly max for LOD Balancing. Fx and Skin
242 uint FxNbMaxPoly;
243 // Is cloud displayed
244 bool Cloud;
245 float CloudQuality;
246 uint CloudUpdate;
247 uint SkinNbMaxPoly;
248 uint NbMaxSkeletonNotCLod;
249 float CharacterFarClip;
250 /// ScreenAspectRatio
251 float ScreenAspectRatio;
252 /// Field of View (FoV)
253 float FoV;
254 /// Force the DXTC Compression.
255 bool ForceDXTC;
256 /// Set the anisotropic filter
257 sint AnisotropicFilter;
258 /// Divide texture size by 2
259 bool DivideTextureSizeBy2;
260 /// Disable Hardware Vertex Program.
261 bool DisableVtxProgram;
262 /// Disable Hardware Vertex AGP.
263 bool DisableVtxAGP;
264 /// Disable Hardware Texture Shader.
265 bool DisableTextureShdr;
266 /// Enable/Disable MicroVeget.
267 bool MicroVeget;
268 /// Density of microvegetation in %
269 float MicroVegetDensity;
270 /// Enable/Disable High Def Entity Texture quality. By default its false
271 bool HDEntityTexture;
272 /// True if the client has HD Texture installed 512*512)
273 bool HDTextureInstalled;
274 /// Enable/Disable Fog
275 bool Fog;
276 /// Enable/Disable VSync
277 bool WaitVBL;
278 /// Force or auto-detect video memory (in MiB)
279 sint VideoMemory;
281 /// Timer mode. 0 : QueryPerformanceCounter, 1 : timeGetTime.
282 uint TimerMode;
284 /// Global Wind Setup
285 float GlobalWindPower;
286 CVector GlobalWindDirection;
288 // FXAA
289 bool FXAA;
291 // Is bloom effect activated
292 bool Bloom;
293 bool SquareBloom;
294 float DensityBloom;
296 /// Movie Shooter
297 uint MovieShooterMemory;
298 string MovieShooterPath;
299 string MovieShooterPrefix;
300 float MovieShooterFramePeriod;
301 bool MovieShooterBlend;
302 uint MovieShooterFrameSkip;
304 // Camera recorder
305 string CameraRecorderPath;
306 string CameraRecorderPrefix;
307 bool CameraRecorderBlend;
309 /// Screen shot
310 string ScreenShotDirectory;
311 uint ScreenShotWidth; // If 0 : normal screen shot, else custom screen shot without interface
312 uint ScreenShotHeight;
313 bool ScreenShotFullDetail; // If set to true, then load balancing will be disabled for the duration of the screenshot
314 bool ScreenShotZBuffer; // If set to true, save also the ZBuffer in a file
316 /////////////////////////
317 // NEW PATCHING SYSTEM //
318 bool PatchWanted;
319 std::string PatchUrl;
320 std::string PatchletUrl;
321 std::string PatchVersion;
323 std::string RingReleaseNotePath;
324 std::string ReleaseNotePath;
326 std::string WebIgMainDomain;
327 std::vector<string> WebIgTrustedDomains;
328 uint WebIgNotifInterval; // value in minutes for notification thread
330 sint32 CurlMaxConnections;
331 string CurlCABundle;
333 ///////////////
334 // ANIMATION //
335 // With a bigger angle, rotation is animated.
336 double AnimatedAngleThreshold;
337 uint BlendFrameNumber;
341 /// Shout color.
342 CRGBA ColorShout;
343 /// Talk color.
344 CRGBA ColorTalk;
346 /// Sound or not?
347 bool SoundOn;
349 /// Sound Driver
350 TDriverSound DriverSound;
352 /// SoundForceSoftwareBuffer
353 bool SoundForceSoftwareBuffer;
355 /// Music files
356 string StartMusic;
357 string EmptySlotMusic;
358 string LoadingMusic;
359 string KamiTeleportMusic;
360 string KaravanTeleportMusic;
361 string TeleportLoadingMusic;
362 string DeathMusic;
364 /// The Sound SFX Volume (0-1) (ie all but music)
365 float SoundSFXVolume;
366 /// This is volume for "InGame" music. Does not affect the MP3 player volume
367 float SoundGameMusicVolume;
369 /// Time in ms of sound to be faded in/out when the user is teleported
370 sint32 SoundTPFade;
372 /// For Dev only
373 bool EnableBackgroundMusicTimeConstraint;
375 /// Directory where to generate the sound packed sheets
376 string SoundPackedSheetPath;
377 /// the directory where the sample banks are stored (.wav)
378 string SampleBankDir;
379 /// The audio gain for user entity sound
380 float UserEntitySoundLevel;
381 /// A flag that indicated if we use EAX
382 bool UseEax;
383 /// A flag the indicate we whant ADPCM sample (reduce memory by 1/4, but lower quality)
384 bool UseADPCM;
385 /// The max number of track we want to use.
386 uint MaxTrack;
388 // MP3 Player
389 string MediaPlayerDirectory;
390 bool MediaPlayerAutoPlay;
392 /// Pre Data Path.
393 std::vector<string> PreDataPath;
394 /// Data Path.
395 std::vector<string> DataPath;
396 /// Data Path no recurse.
397 std::vector<string> DataPathNoRecurse;
398 /// Pre-load path
399 std::string PreLoadPath;
400 /// Streamed package path
401 std::string StreamedPackagePath;
402 /// Streamed package hosts
403 std::vector<string> StreamedPackageHosts; // TODO: From 'domain' SQL table
404 /// Update packed sheet Path.
405 std::vector<string> UpdatePackedSheetPath;
406 /// True if we want the packed sheet to be updated if needed
407 bool UpdatePackedSheet;
408 /// TIme before exiting the application (in sec).
409 float EndScreenTimeOut;
410 /// Texture file name for the loading Background.
411 string Loading_BG;
412 string LoadingFreeTrial_BG;
413 /// Texture file name for the launch Background.
414 string Launch_BG;
415 /// Texture file name
416 string TeleportKami_BG;
417 string TeleportKaravan_BG;
418 /// Texture file name
419 string Elevator_BG;
420 /// Texture file name
421 string ResurectKami_BG;
422 string ResurectKaravan_BG;
423 /// Texture file name for the last Background.
424 string End_BG;
425 string IntroNevrax_BG;
426 string IntroNVidia_BG;
427 /// Message screen position
428 float TipsY;
429 float TeleportInfoY;
430 /// Name of the scene to play.
431 string SceneName;
432 /// Path for the Id file.
433 string IdFilePath;
434 // directories where pacs primitive can be found
435 std::vector<string> PacsPrimDir;
437 /// Vector with some entities to spawn at the beginning.
438 std::vector<string> StartCommands;
440 /// Display or not the shadows.
441 bool Shadows;
442 /// Shadows are disabled after this distance.
443 float ShadowsClipFar;
444 /// Shadows draw with just 1 part after this distance.
445 float ShadowsLodDist;
446 /// ShadowMap Z Direction Clamping when player is on landscape/interior
447 float ShadowZDirClampLandscape;
448 float ShadowZDirClampInterior;
449 float ShadowZDirClampSmoothSpeed;
450 /// ShadowMap Max Depth when player is on landscape/interior
451 float ShadowMaxDepthLandscape;
452 float ShadowMaxDepthInterior;
453 float ShadowMaxDepthSmoothSpeed;
456 /// Prim file to load
457 std::vector<string> PrimFiles;
459 /// Display or not the Names.
460 bool Names;
461 /// To force the client to sleep a bit (in ms).
462 sint Sleep;
463 /// Force process priority
464 sint ProcessPriority;
465 /// CPU Mask
466 sint CPUMask;
467 // To show/hide the entities path
468 bool ShowPath;
469 /// Draw the Boxes used for the selection.
470 bool DrawBoxes;
472 /// The Sheet used by the user.
473 std::string UserSheet;
474 /// (only use in local mode) User Sex.
475 GSGENDER::EGender Sex;
477 /// height added to character primitive
478 float PrimitiveHeightAddition;
480 /// Distance between 2 attackers.
481 float AttackDist;
484 /// Day at the beginning (in local mode only)
485 uint32 RyzomDay;
486 /// Time at the beginning (in local mode only)
487 float RyzomTime;
490 /// Temp for test : manual setup of the weather function
491 bool ManualWeatherSetup;
493 float ChaseReactionTime;
495 /// Time allowed to adjust the camera from 1st to 3rd person view (in ms).
496 double TimeToAdjustCamera;
497 /// Change the direction once this angle is reached.
498 double ChangeDirAngle;
499 /// Guild Symbol Size
500 float GuildSymbolSize;
501 /// Distance Maximum to be able to select an entity.
502 float SelectionDist;
503 /// For fair selection of entity, relative to center of bbox.
504 float SelectionOutBBoxWeight;
505 /// Distance Maximum to be able to loot/harvest a corpse.
506 float LootDist;
507 /// Space Selection: Max distance for space selection.
508 float SpaceSelectionDist;
509 /// Space Selection: max number of entities to cycle through
510 uint32 SpaceSelectionMaxCycle;
513 ////////////
514 // TUNING //
515 /// Water Offset
516 float WaterOffset;
518 /// Water Offset
519 float FyrosWaterOffset;
520 float MatisWaterOffset;
521 float TrykerWaterOffset;
522 float ZoraiWaterOffset;
524 /// Water Offset for creature (mektoubs)
525 float WaterOffsetCreature;
526 /// Time before removing entities collisions from entities with the user in MS.
527 uint32 TimeToRemoveCol;
528 /// Time before stoping running to 0.5m to an entity for executing an action
529 uint32 MoveToTimeToStopStall;
530 /// Third Person View Min Pitch.
531 float TPVMinPitch;
532 /// Third Person View Max Pitch.
533 float TPVMaxPitch;
534 /// Max Head Targeting distance
535 float MaxHeadTargetDist;
536 /// Name of the FX played when dead
537 std::string DeadFXName;
538 /// Name of the FX played for each impact.
539 std::string ImpactFXName;
540 /// Name of the FX played when Skill Up.
541 std::string SkillUpFXName;
542 /// Factor of the walk animation distance after which the entity will start moving.
543 double MinDistFactor;
545 /// Scale used to display names.
546 float NameScale;
547 /// Distance between the name and the extended name (this value is multiply with the name scale).
548 float NamePos;
549 /// Name Font Size (above entities).
550 uint32 NameFontSize;
551 /// Names will be hidden after this Value.
552 float MaxNameDist;
553 /// Before this Value, the name size is constant.
554 float ConstNameSizeDist;
555 /// If true names won't move all the time over entities
556 bool StaticNameHeight;
557 /// Bars Height / 2
558 float BarsHeight;
559 /// Bars Width / 2
560 float BarsWidth;
561 /// Fight Area Size
562 double FightAreaSize;
563 /// Destination Threshold
564 double DestThreshold;
565 /// Radius of the Position Limiter (Useful to avoid some Noise on Positions).
566 double PositionLimiterRadius;
567 /// Significant Distance
568 double SignificantDist;
569 /// ZBias for InScene bubble
570 float BubbleZBias;
571 /// ZBias for InScene Forage Interface
572 float ForageInterfaceZBias;
574 /// visual scale
575 float FyrosScale;
576 float MatisScale;
577 float TrykerScale;
578 float ZoraiScale;
580 /// Racial Animation
581 bool EnableRacialAnimation;
583 /////////////
584 // OPTIONS //
585 /// Right click select too.
586 bool SelectWithRClick;
587 /// Walk/Run at the beginning
588 bool RunAtTheBeginning;
589 /// Rotation Velocity
590 float RotKeySpeedMax;
591 float RotKeySpeedMin;
592 /// Rotation Acceleration
593 float RotAccel;
594 /// Put Back Items after use
595 bool PutBackItems;
596 /// Display the name of the entity under the cursor.
597 bool ShowNameUnderCursor;
598 /// Display the name of the entity selected.
599 bool ShowNameSelected;
600 /// Force display of names under this distance
601 float ShowNameBelowDistanceSqr;
602 /// Force the FPV when the user is indoor.
603 bool ForceIndoorFPV;
604 /// Follow on Attack
605 bool FollowOnAtk;
606 /// Attack on Select
607 bool AtkOnSelect;
608 /// Makes entities transparent if they are under cursor
609 bool TransparentUnderCursor;
611 /// Allow item group to move from / to guild room
612 bool ItemGroupAllowGuild;
615 /////////////////
616 // PREFERENCES //
617 /// First Person View or Not.
618 bool FPV;
619 /// Distance of the camera from the user.
620 float CameraHeight;
621 float CameraDistance;
622 float CameraDistStep;
623 float CameraDistMin; // Last distance before FirstPersonView
624 float CameraDistMax; // distance max of the camera for ryzom player and ring tester player
625 float DmCameraDistMax; // distance max of the camera for ring/dm
626 float CameraAccel;
627 float CameraSpeedMin;
628 float CameraSpeedMax;
629 float CameraResetSpeed;
631 // Default values for CGroupMap
632 float MaxMapScale;
633 float R2EDMaxMapScale;
635 // If successfull /tar command should set compass or not
636 bool TargetChangeCompass;
638 //////////////
639 // VERBOSES //
640 bool VerboseVP;
641 bool VerboseAnimUser;
642 bool VerboseAnimSelection;
643 bool VerboseAllTraffic;
646 //////////
647 // LIGO //
648 std::string LigoPrimitiveClass;
650 ///////////
651 // DEBUG //
652 // Display names of missing animation files
653 bool DisplayMissingAnimFile;
654 // Default creature spawned when the entity do not exist
655 std::string DefaultEntity;
656 // Restrain the predicted interval
657 bool RestrainPI;
658 // Dump Visual Slot IDs.
659 bool DumpVSIndex;
660 // Font size for Help infos.
661 uint32 HelpFontSize;
662 // Color for the Help Font.
663 CRGBA HelpFontColor;
664 // Line step for Help infos.
665 float HelpLineStep;
666 // Font size for debug infos.
667 uint32 DebugFontSize;
668 // Color for the Debug Font.
669 CRGBA DebugFontColor;
670 // Line step for debug infos.
671 float DebugLineStep;
673 CVector HeadOffset;
674 // Enable/disable Floating Point Exceptions
675 bool FPExceptions;
676 // Use to launch exceptions when there is something wrong
677 bool Check;
678 // Use PACS collision for all (Work In Progress).
679 bool UsePACSForAll;
681 bool DisplayWeapons;
682 bool NeedComputeVS;
683 bool BlendForward;
685 bool ForceLanguage;
686 std::string LanguageCode;
687 bool DebugStringManager;
688 bool PreCacheShapes;
689 bool ResetShapeBankOnRetCharSelect;
691 std::string LastLogin;
693 uint32 SimulatePacketLossRatio;
695 // Parameters for colors of messages in system info
696 // Mode is the display settings :
697 // Normal : just display in the system info window
698 // Over : must be displayed at bottom of the screen and in system info window
699 // OverOnly : must be displayed at bottom of the screen
700 // Center ; must be displayed at the center of the screen and in system info window
701 // Around ; must be displayed in the around chat window
702 // CenterAround ; must be displayed at the center of the screen and in around chat window
703 struct SSysInfoParam
705 CRGBA Color;
706 std::string SysInfoFxName;
707 enum TMode { Normal, Over, OverOnly, Center, Around, CenterAround };
708 TMode Mode;
709 SSysInfoParam()
711 Color= CRGBA::Black;
712 Mode= Normal;
715 std::map<std::string, SSysInfoParam> SystemInfoParams;
718 // printf commands to display localized strings in loading screen
719 struct SPrintfCommand
721 uint X;
722 uint Y;
723 CRGBA Color;
724 uint FontSize;
725 std::string Text;
727 std::vector<SPrintfCommand> loadingTexts;
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 */