Fix build when using ValyriaTear/luabind (on Ubuntu)
[ryzomcore.git] / ryzom / client / src / client_cfg.h
blob22fe46f61e7df00b9ab16c85b1d24896ea21bbba
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 /// Width for the Application.
141 uint16 Width;
142 /// Height for the Application.
143 uint16 Height;
144 /// Bit Per Pixel (only used in Fullscreen mode).
145 uint16 Depth;
146 /// Monitor Constrast [-1 ~ 1], default 0
147 float Contrast;
148 /// Monitor Luminosity [-1 ~ 1], default 0
149 float Luminosity;
150 /// Monitor Gamma [-1 ~ 1], default 0
151 float Gamma;
153 // UI scaling
154 float InterfaceScale;
155 float InterfaceScale_min;
156 float InterfaceScale_max;
157 float InterfaceScale_step;
158 bool BilinearUI;
160 // Window snap
161 bool WindowSnapInvert;
162 uint32 WindowSnapDistance;
164 // VR
165 bool VREnable;
166 std::string VRDisplayDevice;
167 std::string VRDisplayDeviceId;
169 /// Client in Local mode or not.
170 bool Local;
171 /// Host.
172 string FSHost;
173 /// Login.
174 bool DisplayAccountButtons;
175 string CreateAccountURL;
176 string EditAccountURL;
177 string ConditionsTermsURL;
178 string NamingPolicyURL;
179 string BetaAccountURL;
180 string ForgetPwdURL;
181 string FreeTrialURL;
182 string LoginSupportURL;
184 /// User entity Position (in local mode only).
185 CVector Position;
186 /// User entity Heading (in local mode only).
187 CVector Heading;
188 /// Height for the eyes.
189 float EyesHeight;
190 /// Velocity for the Walk.
191 float Walk;
192 /// Velocity for the Run.
193 float Run;
194 /// Velocity for the Walk in DM ing or editing.
195 float DmWalk;
196 /// Velocity for the Run in DM ing or editing.
197 float DmRun;
198 /// Velocity for the Fly.
199 float Fly;
200 /// Acceleration for the Fly.
201 float FlyAccel;
203 /// Allow debug commands
204 bool AllowDebugCommands;
206 /// \name Inputs
208 /// Use a hardware cursor
209 bool HardwareCursor;
210 float HardwareCursorScale; // scale for hardware cursor bitmap (in ]0, 1])
211 float CursorSpeed;
212 uint CursorAcceleration;
213 float FreeLookSpeed;
214 uint FreeLookAcceleration;
215 float FreeLookSmoothingPeriod;
216 bool FreeLookInverted;
217 bool FreeLookTablet;
218 // true if camera is centered when user casts a spell
219 bool AutomaticCamera;
220 bool DblClickMode;
221 bool AutoEquipTool;
223 /// Time inputs
224 uint ForceDeltaTime; // 0 to use real delta time
226 /// Background Color
227 CRGBA BGColor;
228 /// Landscape Tile Near.
229 float LandscapeTileNear;
230 /** Landscape Threshold. NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible in client.cfg
231 * MUST USE getActualLandscapeThreshold() to get the real value
233 float LandscapeThreshold;
234 /// Vision.
235 float Vision;
236 float Vision_min;
237 float Vision_max;
238 /// Number poly max for LOD Balancing. Fx and Skin
239 uint FxNbMaxPoly;
240 // Is cloud displayed
241 bool Cloud;
242 float CloudQuality;
243 uint CloudUpdate;
244 uint SkinNbMaxPoly;
245 uint NbMaxSkeletonNotCLod;
246 float CharacterFarClip;
247 /// ScreenAspectRatio
248 float ScreenAspectRatio;
249 /// Field of View (FoV)
250 float FoV;
251 /// Force the DXTC Compression.
252 bool ForceDXTC;
253 /// Set the anisotropic filter
254 sint AnisotropicFilter;
255 /// Divide texture size by 2
256 bool DivideTextureSizeBy2;
257 /// Disable Hardware Vertex Program.
258 bool DisableVtxProgram;
259 /// Disable Hardware Vertex AGP.
260 bool DisableVtxAGP;
261 /// Disable Hardware Texture Shader.
262 bool DisableTextureShdr;
263 /// Enable/Disable MicroVeget.
264 bool MicroVeget;
265 /// Density of microvegetation in %
266 float MicroVegetDensity;
267 /// Enable/Disable High Def Entity Texture quality. By default its false
268 bool HDEntityTexture;
269 /// True if the client has HD Texture installed 512*512)
270 bool HDTextureInstalled;
271 /// Enable/Disable Fog
272 bool Fog;
273 /// Enable/Disable VSync
274 bool WaitVBL;
275 /// Force or auto-detect video memory (in MiB)
276 sint VideoMemory;
278 /// Timer mode. 0 : QueryPerformanceCounter, 1 : timeGetTime.
279 uint TimerMode;
281 /// Global Wind Setup
282 float GlobalWindPower;
283 CVector GlobalWindDirection;
285 // FXAA
286 bool FXAA;
288 // Is bloom effect activated
289 bool Bloom;
290 bool SquareBloom;
291 float DensityBloom;
293 /// Movie Shooter
294 uint MovieShooterMemory;
295 string MovieShooterPath;
296 string MovieShooterPrefix;
297 float MovieShooterFramePeriod;
298 bool MovieShooterBlend;
299 uint MovieShooterFrameSkip;
301 // Camera recorder
302 string CameraRecorderPath;
303 string CameraRecorderPrefix;
304 bool CameraRecorderBlend;
306 /// Screen shot
307 uint ScreenShotWidth; // If 0 : normal screen shot, else custom screen shot without interface
308 uint ScreenShotHeight;
309 bool ScreenShotFullDetail; // If set to true, then load balancing will be disabled for the duration of the screenshot
310 bool ScreenShotZBuffer; // If set to true, save also the ZBuffer in a file
312 /////////////////////////
313 // NEW PATCHING SYSTEM //
314 bool PatchWanted;
315 std::string PatchUrl;
316 std::string PatchletUrl;
317 std::string PatchVersion;
319 std::string RingReleaseNotePath;
320 std::string ReleaseNotePath;
322 std::string WebIgMainDomain;
323 std::vector<string> WebIgTrustedDomains;
324 uint WebIgNotifInterval; // value in minutes for notification thread
326 sint32 CurlMaxConnections;
327 string CurlCABundle;
329 ///////////////
330 // ANIMATION //
331 // With a bigger angle, rotation is animated.
332 double AnimatedAngleThreshold;
333 uint BlendFrameNumber;
337 /// Shout color.
338 CRGBA ColorShout;
339 /// Talk color.
340 CRGBA ColorTalk;
342 /// Sound or not?
343 bool SoundOn;
345 /// Sound Driver
346 TDriverSound DriverSound;
348 /// SoundForceSoftwareBuffer
349 bool SoundForceSoftwareBuffer;
351 /// Music files
352 string StartMusic;
353 string EmptySlotMusic;
354 string LoadingMusic;
355 string KamiTeleportMusic;
356 string KaravanTeleportMusic;
357 string TeleportLoadingMusic;
358 string DeathMusic;
360 /// The Sound SFX Volume (0-1) (ie all but music)
361 float SoundSFXVolume;
362 /// This is volume for "InGame" music. Does not affect the MP3 player volume
363 float SoundGameMusicVolume;
365 /// Time in ms of sound to be faded in/out when the user is teleported
366 sint32 SoundTPFade;
368 /// For Dev only
369 bool EnableBackgroundMusicTimeConstraint;
371 /// Directory where to generate the sound packed sheets
372 string SoundPackedSheetPath;
373 /// the directory where the sample banks are stored (.wav)
374 string SampleBankDir;
375 /// The audio gain for user entity sound
376 float UserEntitySoundLevel;
377 /// A flag that indicated if we use EAX
378 bool UseEax;
379 /// A flag the indicate we whant ADPCM sample (reduce memory by 1/4, but lower quality)
380 bool UseADPCM;
381 /// The max number of track we want to use.
382 uint MaxTrack;
384 // MP3 Player
385 string MediaPlayerDirectory;
386 bool MediaPlayerAutoPlay;
388 /// Pre Data Path.
389 std::vector<string> PreDataPath;
390 /// Data Path.
391 std::vector<string> DataPath;
392 /// Data Path no recurse.
393 std::vector<string> DataPathNoRecurse;
394 /// Pre-load path
395 std::string PreLoadPath;
396 /// Streamed package path
397 std::string StreamedPackagePath;
398 /// Streamed package hosts
399 std::vector<string> StreamedPackageHosts; // TODO: From 'domain' SQL table
400 /// Update packed sheet Path.
401 std::vector<string> UpdatePackedSheetPath;
402 /// True if we want the packed sheet to be updated if needed
403 bool UpdatePackedSheet;
404 /// TIme before exiting the application (in sec).
405 float EndScreenTimeOut;
406 /// Texture file name for the loading Background.
407 string Loading_BG;
408 string LoadingFreeTrial_BG;
409 /// Texture file name for the launch Background.
410 string Launch_BG;
411 /// Texture file name
412 string TeleportKami_BG;
413 string TeleportKaravan_BG;
414 /// Texture file name
415 string Elevator_BG;
416 /// Texture file name
417 string ResurectKami_BG;
418 string ResurectKaravan_BG;
419 /// Texture file name for the last Background.
420 string End_BG;
421 string IntroNevrax_BG;
422 string IntroNVidia_BG;
423 /// Message screen position
424 float TipsY;
425 float TeleportInfoY;
426 /// Name of the scene to play.
427 string SceneName;
428 /// Path for the Id file.
429 string IdFilePath;
430 // directories where pacs primitive can be found
431 std::vector<string> PacsPrimDir;
433 /// Vector with some entities to spawn at the beginning.
434 std::vector<string> StartCommands;
436 /// Display or not the shadows.
437 bool Shadows;
438 /// Shadows are disabled after this distance.
439 float ShadowsClipFar;
440 /// Shadows draw with just 1 part after this distance.
441 float ShadowsLodDist;
442 /// ShadowMap Z Direction Clamping when player is on landscape/interior
443 float ShadowZDirClampLandscape;
444 float ShadowZDirClampInterior;
445 float ShadowZDirClampSmoothSpeed;
446 /// ShadowMap Max Depth when player is on landscape/interior
447 float ShadowMaxDepthLandscape;
448 float ShadowMaxDepthInterior;
449 float ShadowMaxDepthSmoothSpeed;
452 /// Prim file to load
453 std::vector<string> PrimFiles;
455 /// Display or not the Names.
456 bool Names;
457 /// To force the client to sleep a bit (in ms).
458 sint Sleep;
459 /// Force process priority
460 sint ProcessPriority;
461 /// CPU Mask
462 sint CPUMask;
463 // To show/hide the entities path
464 bool ShowPath;
465 /// Draw the Boxes used for the selection.
466 bool DrawBoxes;
468 /// The Sheet used by the user.
469 std::string UserSheet;
470 /// (only use in local mode) User Sex.
471 GSGENDER::EGender Sex;
473 /// height added to character primitive
474 float PrimitiveHeightAddition;
476 /// Distance between 2 attackers.
477 float AttackDist;
480 /// Day at the beginning (in local mode only)
481 uint32 RyzomDay;
482 /// Time at the beginning (in local mode only)
483 float RyzomTime;
486 /// Temp for test : manual setup of the weather function
487 bool ManualWeatherSetup;
489 float ChaseReactionTime;
491 /// Time allowed to adjust the camera from 1st to 3rd person view (in ms).
492 double TimeToAdjustCamera;
493 /// Change the direction once this angle is reached.
494 double ChangeDirAngle;
495 /// Guild Symbol Size
496 float GuildSymbolSize;
497 /// Distance Maximum to be able to select an entity.
498 float SelectionDist;
499 /// For fair selection of entity, relative to center of bbox.
500 float SelectionOutBBoxWeight;
501 /// Distance Maximum to be able to loot/harvest a corpse.
502 float LootDist;
503 /// Space Selection: Max distance for space selection.
504 float SpaceSelectionDist;
505 /// Space Selection: max number of entities to cycle through
506 uint32 SpaceSelectionMaxCycle;
509 ////////////
510 // TUNING //
511 /// Water Offset
512 float WaterOffset;
514 /// Water Offset
515 float FyrosWaterOffset;
516 float MatisWaterOffset;
517 float TrykerWaterOffset;
518 float ZoraiWaterOffset;
520 /// Water Offset for creature (mektoubs)
521 float WaterOffsetCreature;
522 /// Time before removing entities collisions from entities with the user in MS.
523 uint32 TimeToRemoveCol;
524 /// Time before stoping running to 0.5m to an entity for executing an action
525 uint32 MoveToTimeToStopStall;
526 /// Third Person View Min Pitch.
527 float TPVMinPitch;
528 /// Third Person View Max Pitch.
529 float TPVMaxPitch;
530 /// Max Head Targeting distance
531 float MaxHeadTargetDist;
532 /// Name of the FX played when dead
533 std::string DeadFXName;
534 /// Name of the FX played for each impact.
535 std::string ImpactFXName;
536 /// Name of the FX played when Skill Up.
537 std::string SkillUpFXName;
538 /// Factor of the walk animation distance after which the entity will start moving.
539 double MinDistFactor;
541 /// Scale used to display names.
542 float NameScale;
543 /// Distance between the name and the extended name (this value is multiply with the name scale).
544 float NamePos;
545 /// Name Font Size (above entities).
546 uint32 NameFontSize;
547 /// Names will be hidden after this Value.
548 float MaxNameDist;
549 /// Before this Value, the name size is constant.
550 float ConstNameSizeDist;
551 /// If true names won't move all the time over entities
552 bool StaticNameHeight;
553 /// Bars Height / 2
554 float BarsHeight;
555 /// Bars Width / 2
556 float BarsWidth;
557 /// Fight Area Size
558 double FightAreaSize;
559 /// Destination Threshold
560 double DestThreshold;
561 /// Radius of the Position Limiter (Useful to avoid some Noise on Positions).
562 double PositionLimiterRadius;
563 /// Significant Distance
564 double SignificantDist;
565 /// ZBias for InScene bubble
566 float BubbleZBias;
567 /// ZBias for InScene Forage Interface
568 float ForageInterfaceZBias;
570 /// visual scale
571 float FyrosScale;
572 float MatisScale;
573 float TrykerScale;
574 float ZoraiScale;
576 /// Racial Animation
577 bool EnableRacialAnimation;
579 /////////////
580 // OPTIONS //
581 /// Right click select too.
582 bool SelectWithRClick;
583 /// Walk/Run at the beginning
584 bool RunAtTheBeginning;
585 /// Rotation Velocity
586 float RotKeySpeedMax;
587 float RotKeySpeedMin;
588 /// Rotation Acceleration
589 float RotAccel;
590 /// Put Back Items after use
591 bool PutBackItems;
592 /// Display the name of the entity under the cursor.
593 bool ShowNameUnderCursor;
594 /// Display the name of the entity selected.
595 bool ShowNameSelected;
596 /// Force display of names under this distance
597 float ShowNameBelowDistanceSqr;
598 /// Force the FPV when the user is indoor.
599 bool ForceIndoorFPV;
600 /// Follow on Attack
601 bool FollowOnAtk;
602 /// Attack on Select
603 bool AtkOnSelect;
604 /// Makes entities transparent if they are under cursor
605 bool TransparentUnderCursor;
607 /// Allow item group to move from / to guild room
608 bool ItemGroupAllowGuild;
611 /////////////////
612 // PREFERENCES //
613 /// First Person View or Not.
614 bool FPV;
615 /// Distance of the camera from the user.
616 float CameraHeight;
617 float CameraDistance;
618 float CameraDistStep;
619 float CameraDistMin; // Last distance before FirstPersonView
620 float CameraDistMax; // distance max of the camera for ryzom player and ring tester player
621 float DmCameraDistMax; // distance max of the camera for ring/dm
622 float CameraAccel;
623 float CameraSpeedMin;
624 float CameraSpeedMax;
625 float CameraResetSpeed;
627 // Default values for CGroupMap
628 float MaxMapScale;
629 float R2EDMaxMapScale;
631 // If successfull /tar command should set compass or not
632 bool TargetChangeCompass;
634 //////////////
635 // VERBOSES //
636 bool VerboseVP;
637 bool VerboseAnimUser;
638 bool VerboseAnimSelection;
639 bool VerboseAllTraffic;
642 //////////
643 // LIGO //
644 std::string LigoPrimitiveClass;
646 ///////////
647 // DEBUG //
648 // Display names of missing animation files
649 bool DisplayMissingAnimFile;
650 // Default creature spawned when the entity do not exist
651 std::string DefaultEntity;
652 // Restrain the predicted interval
653 bool RestrainPI;
654 // Dump Visual Slot IDs.
655 bool DumpVSIndex;
656 // Font size for Help infos.
657 uint32 HelpFontSize;
658 // Color for the Help Font.
659 CRGBA HelpFontColor;
660 // Line step for Help infos.
661 float HelpLineStep;
662 // Font size for debug infos.
663 uint32 DebugFontSize;
664 // Color for the Debug Font.
665 CRGBA DebugFontColor;
666 // Line step for debug infos.
667 float DebugLineStep;
669 CVector HeadOffset;
670 // Enable/disable Floating Point Exceptions
671 bool FPExceptions;
672 // Use to launch exceptions when there is something wrong
673 bool Check;
674 // Use PACS collision for all (Work In Progress).
675 bool UsePACSForAll;
677 bool DisplayWeapons;
678 bool NeedComputeVS;
679 bool BlendForward;
681 bool ForceLanguage;
682 std::string LanguageCode;
683 bool DebugStringManager;
684 bool PreCacheShapes;
685 bool ResetShapeBankOnRetCharSelect;
687 std::string LastLogin;
689 uint32 SimulatePacketLossRatio;
691 // Parameters for colors of messages in system info
692 // Mode is the display settings :
693 // Normal : just display in the system info window
694 // Over : must be displayed at bottom of the screen and in system info window
695 // OverOnly : must be displayed at bottom of the screen
696 // Center ; must be displayed at the center of the screen and in system info window
697 // Around ; must be displayed in the around chat window
698 // CenterAround ; must be displayed at the center of the screen and in around chat window
699 struct SSysInfoParam
701 CRGBA Color;
702 std::string SysInfoFxName;
703 enum TMode { Normal, Over, OverOnly, Center, Around, CenterAround };
704 TMode Mode;
705 SSysInfoParam()
707 Color= CRGBA::Black;
708 Mode= Normal;
711 std::map<std::string, SSysInfoParam> SystemInfoParams;
714 // printf commands to display localized strings in loading screen
715 struct SPrintfCommand
717 uint X;
718 uint Y;
719 CRGBA Color;
720 uint FontSize;
721 std::string Text;
723 std::vector<SPrintfCommand> PrintfCommands;
725 std::vector<SPrintfCommand> PrintfCommandsFreeTrial;
727 // funny loading messages count
728 uint16 LoadingStringCount;
731 // DEBUG MEMORY
732 int CheckMemoryEveryNFrame; // -1 no check (default) else number frame to skip before a memory checking
733 bool LogMemoryAllocation; // false no log (default) else log each memory allocation in the file "alloc.memlog"
734 int LogMemoryAllocationSize; // Size of the block to log (default : 8)
736 // ground FXs
737 float GroundFXMaxDist; // max dist for ground fxs
738 uint GroundFXMaxNB; // max number of ground fxs
739 uint GroundFXCacheSize; // max number of cached ground fxs
741 //////////
742 // TEMP //
743 // Array with the name of all offensive impact FXs.
744 std::vector<string> OffImpactFX;
746 // Pacs prim used for ZC
747 std::string ZCPacsPrim;
749 // Reload config files, teleport list and sheet_id.bin
750 bool AutoReloadFiles;
752 // Use new version of the blend shapes (if true) new version with min,max in race_stats
753 bool BlendShapePatched;
755 // Not secure boolean to disable some commands on client side
756 bool ExtendedCommands;
758 // Timed FXs
759 sint MaxNumberOfTimedFXInstances;
761 // Selection FXs
762 std::string SelectionFX;
763 std::string MouseOverFX;
764 float SelectionFXSize;
766 // Time to update water envmap
767 float WaterEnvMapUpdateTime;
769 // number of frames to profile (0 for start/stop scheme)
770 uint NumFrameForProfile;
772 // KlientChatPort
773 std::string KlientChatPort;
775 // SimulateServerTick
776 bool SimulateServerTick;
778 // usage of LCT in _Stages of CCharacterCL
779 TStageLCTUsage StageLCTUsage;
781 // TMP : for integration of damage shield
782 bool DamageShieldEnabled;
783 //////////
784 // R2ED //
785 //////////
786 /// Activate R2 login behavior
787 bool R2Mode;
788 /// Force direct R2 editor jumpstart
789 bool R2EDEnabled;
790 bool R2EDVerboseParseTime;
791 bool R2EDDontReparseUnchangedUIFiles;
792 std::vector<string> R2EDReloadFiles;
793 bool R2EDExtendedDebug;
794 bool R2EDLightPalette;
795 uint32 R2EDAutoSaveWait; // wait between 2 autosave in second
796 uint32 R2EDAutoSaveSlot; // number of autosave file
797 uint32 R2EDLoadDynamicFeatures;
798 bool R2EDMustVerifyRingAccessWhileLoadingAnimation;
799 bool R2EDUseVerboseRingAccess;
801 float R2EDClippedEntityBlendTime;
803 //0: direct send packet to DSS <=> for not breaking thing
804 //1: cut packet send to DSS <=> for local or SBS less shard (dev)
805 //2: cut packet, simulate SBS <=> debug
806 //3: cut packet, send to SBS <=> will be the final value
809 uint32 R2EDDssNetwork;
811 /////////
812 // LUA //
813 /////////
815 /// Allow Lua commands (commands beginning with Lua)
816 bool AllowDebugLua;
818 bool LuaDebugInfoGotoButtonEnabled;
819 std::string LuaDebugInfoGotoButtonTemplate;
820 std::string LuaDebugInfoGotoButtonCaption;
821 std::string LuaDebugInfoGotoButtonFunction;
824 /// Display additional Lua DebugInfo
825 bool DisplayLuaDebugInfo;
827 bool BeepWhenLaunched; // beep when the client is launched
829 // R2 Gw
830 std::string R2ClientGw;
832 float FogDistAndDepthLookupBias;
834 // name of the files for hardware cursors
835 std::set<std::string> HardwareCursors;
837 bool CheckR2ScenarioMD5;
839 // vector of languages avoidable in Ring scenari
840 std::vector<string> ScenarioLanguages;
842 // vector of types avoidable in Ring scenari
843 std::vector<string> ScenarioTypes;
845 // build name
846 std::string BuildName;
849 bool DisplayTPReason;
852 //uint32 TPCancelButtonX;
853 //uint32 TPCancelButtonY;
854 //uint32 TPQuitButtonX;
855 //uint32 TPQuitButtonY;
856 uint32 TPButtonW;
857 uint32 TPButtonH;
859 std::string ScenarioSavePath;
862 // tmp for background downloader integration
863 bool BackgroundDownloader;
865 public:
866 /// Constructor.
867 CClientConfig();
868 virtual ~CClientConfig() {}
870 static void setValues (); // Set the values of the ClientCfg instance
871 static void setValuesOnFileChange (); // called when cfg modified
873 /// Serialize CFG.
874 virtual void serial(NLMISC::IStream &f);
876 /// End process
877 void release ();
879 bool readBool (const std::string &varName);
880 void writeBool (const std::string &varName, bool val, bool bForce = false);
881 sint32 readInt (const std::string &varName);
882 void writeInt (const std::string &varName, sint32 val, bool bForce = false);
883 double readDouble (const std::string &varName);
884 void writeDouble (const std::string &varName, double val, bool bForce = false);
885 void writeString (const std::string &varName, const std::string &bVal, bool bForce = false);
887 // return 0 / false if not succeed
888 bool readBoolNoWarning (const std::string &varName);
889 sint32 readIntNoWarning (const std::string &varName);
890 double readDoubleNoWarning (const std::string &varName);
891 std::string readString (const std::string &varName);
894 // NB: threshold is inverted ULandscape::setThreshold(), to be more intelligible in client.cfg
895 float getActualLandscapeThreshold() const;
897 // Return LanguageCode but if "wk", then return "en"
898 std::string getHtmlLanguageCode() const;
900 // return a random loading tip or, if there are not, return the string in argument
901 std::string buildLoadingString(const std::string &ucstr) const;
903 /// get the path to client_default.cfg including the filename itself.
904 bool getDefaultConfigLocation(std::string& fileLocation) const;
906 };// CClientConfig //
909 ////////////
910 // GLOBAL //
911 ////////////
912 extern CClientConfig LastClientCfg;
913 extern CClientConfig ClientCfg;
914 extern const std::string ConfigFileName;
916 #endif // CL_CLIENT_CFG_H
918 /* End of client_cfg.h */