![]() ![]() Note that this method is not valid for console variable references. This allows the DLL to load and unload properly without even missing the variable state. If a new variable is registered as the same name as the old variable stored, the help prompt and flag for the new variable are copied. In fact, this variable is still reserved (with a deregisteration flag) to prevent a crash when a pointer accesses the data. At least from the user's point of view, this is what happens. Method allows you to remove the console variable. This feature is prohibited for console variables because we do not want to specify another line of help information, and we should not shorten the multi-line help document. The current auto-fill feature also outputs one line of help for certain commands. Help documentation is handy, but to reduce the size of executable files or make them more difficult for cheaters, we consider adding a definition to prevent help text from entering executables. For the time being, we recommend using the int type, or strings as needed. We want to add an enumeration type and a Boolean type, but this can cause a lot of problems. We're going to add a command (sort, group) to output all console commands and their help text. Other systems have a specific purpose-specific initials or string prefixes (such as ! s_MusicBufferSize). We should consider grouping variables together. ![]() ![]() In order to get good help text output in all solutions, we'll check the length of the longest line and make sure we always use a fixed-width font.Ĭontrol variables can only be created with C, but this situation may change. We also consider executing console commands (unified interface, using function calls or agents, auto-complementing, and help). The current system is very simple and easy to use. More details can be found in the file itself: Once the engine starts, the state of the console variable can be loaded from the Engine/Config/ConsoleVariables. EnableMotionBlur 、 ! MotionBlurDisable 、 MBlur 、 ! HideMotionBlur)。 Using case differentiation makes names more readable and convenient (e.g.! MotionBlur)。įor indentation, you can assume a fixed-width font output (disproportionate). When describing variable names, be as brief as possible to avoid negative meanings (such as these bad names!). Most console variables are for development purposes only, so it's a good idea to specify the flag early. Otherwise, the user may wonder if he has misspelled the variable because it does not have the state he specified or because the state of some other variable prevents him from modifying the console variable.Īlways provide good help information about the purpose of variables and what values are meaningful to set. Variable state should not be changed through code. example:Įxpected console variable behavior and styleĬonsole variables should reflect user input and not necessarily reflect the state of the system (e.g., ! MotionBlur 0/1, which may not be supported by some platforms). To get a pointer to a variable, you can store the return arguments of the registered function or call the function before you need the variable. State can be obtained more easily by using any of the following get functions, but at a slightly slower pace (virtual function calls may result in cache loss): ! GetInt(), ! GetFloat(), ! GetString() For best performance, you should use the same type as the variables you register. You can efficiently get the state of the console variable you created by using the registered variable. the help document that is displayed.Īnother optional parameter allows you to specify flags, such as ECVF_Cheat. The next parameter defines when the user uses the "?" after the console variable. It also allows you to register an existing floating point or int type and let console variables use it directly to store variable state. The second argument is the default, and depending on the constant type, different console variable types are created: int, float or string (!). The first argument is the name of the console variable (unicode). There you can register a console variable or find an existing console variable. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |