?> This setting is meaningful only when the text extracted from the game is a **multi-byte string with an unspecified encoding within the HOOK engine**. When the HOOK engine has already specified a code page, or the text is a **wide character string** or **UTF32** string, this setting has no meaning.
This setting generally does not need to be modified. It is only necessary when some old engines (e.g., Yuris) may have GBK/BIG5/UTF8 in their official Chinese versions. If you cannot find the correct text, please send an [issue](https://lunatranslator.org/Resource/game_support) directly to me; modifying this setting is usually futile.
For **1 and 2**, because the game text is displayed too slowly, and the refresh delay is too low, each time one or two characters or a line of text is extracted, it immediately refreshes. In this case, you need to **increase the refresh delay** or increase the game's text display speed.
Sometimes, text will refresh repeatedly without stopping. If the refresh delay is high and cannot be reduced, it will continue to receive text until the buffer is filled or the text stops refreshing to meet the refresh delay (usually when the game loses focus, so it generally waits until the buffer is filled).
To solve this problem, you can appropriately reduce the buffer length, but be careful not to make the buffer length too short to be less than the actual text length.
Received historical text is cached. When viewing the content of a text item in the text selection window, the historical cached text is queried. If there are too many text items or the text refreshes repeatedly, it will cause too much cached text, making it more sluggish to view text (sometimes even when not viewing). In fact, most of the cached text here is useless; useful historical text can be viewed in historical translations. You can arbitrarily lower this value (default is 1000000, but it can be lowered to 1000).
The garbled text filtering in text processing only filters out garbled characters, while this filter, upon receiving text, will discard the entire line of text if any garbled characters are detected. When the game refreshes a large number of sentences containing garbled text, you can appropriately use this option to filter out invalid sentences and improve performance.
However, when this proxy process runs, it may be intercepted by antivirus software for a while, causing stuttering or failure to run and needing to run again. In this case, you can use YAPI to directly use the main process of Luna for DLL injection.
In YAPI, if the game process and the Luna process have the same bitness, it will inject normally; if the bitness is different, it will use a special shellcode to achieve injection. This is also one reason why LunaHost32.dll is more likely to be detected by antivirus software.
When Luna runs with low privileges and the game runs with administrator privileges, this option will be ineffective, and it will fall back to the original mode and request permissions for injection.
1. #### Win32 Text Drawing Function Hook & Win32 String Function Hook
When activated, it will manually allow the injection of common function hooks for Win32 into the game.
Injecting too many hooks can slow down the game, so these hooks are not injected by default.
When the correct text cannot be extracted, you can try enabling these two options.
1. #### Special Codes
This special code will only be recorded when **a special code is inserted** and **the text of the special code is selected**. The next time the game starts, this special code will be automatically inserted. This setting records all previously recorded special codes, from which you can add or delete special codes.
Sometimes, the position in the game that needs to be hooked is on a dll, which will only load after the game has run for a short while. We also need to wait until the dll loads before we can proceed with the injection.
The settings made in the settings interface -> HOOK settings are default settings. When no dedicated HOOK settings have been specified for the game, the default settings will be used.
To set up dedicated HOOK settings for a game, you need to go to the **Game Management**, open the **Game Settings** interface, and switch to the HOOK sub-tab in the game settings selection card. After unchecking **Follow Default**, you can then set up dedicated HOOK settings for the game.