EN UO Topic gameplay settings Part 3 - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Execution state and gameplay settings — 3
Home · A–Z · Execution state and gameplay settings
- UO.AutoloadFile — startup-file selection.
- UO.KeepGumpOpen — keeping a game window open.
- UO.CommandPrefix — chat-command prefix.
UO.AutoloadFile
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
string UO.AutoloadFile();
void UO.AutoloadFile(string path);
Purpose
Read without arguments; change with one argument — startup-file selection.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
path |
string |
The name of an existing supported file in this session’s Autoload directory; validation and persistence use the existing manager selector. Selection does not execute or restart anything. |
No parameters. → getter.
Return value
string — The current value; reading does not start an action. The setter returns void.
Default: "autoload.csx".
Ownership
This is a shared host setting for the current character/session. It is an explicit exception to execution-local settings; the script setter and chat command update the same validated host configuration.
See execution state and gameplay settings.
Actual behavior
Existing .csx, .cs, .csproj, .cse, .dll and .exe files in the manager’s Autoload namespace are supported. Selection persists startup configuration and never restarts current runs. A missing file raises an error.
YokoInjectionManager.SelectAutoloadFileName → SetSelectedAutoloadFile.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
string selected = UO.AutoloadFile();
UO.Print(string.IsNullOrEmpty(selected) ? "No available startup file is selected." : selected);
string existing = UO.AutoloadFile();
if (!string.IsNullOrEmpty(existing))
{
UO.AutoloadFile(existing);
UO.Print("Selection saved without running: " + UO.AutoloadFile());
}
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,AutoloadFile
,AutoloadFile "Autoload.csx"
Related commands
Execution state and gameplay settings · UO.AutoloadFile
UO.KeepGumpOpen
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
void UO.KeepGumpOpen();
void UO.KeepGumpOpen(object selector);
void UO.KeepGumpOpen(object selector, bool enabled);
Purpose
keeping a game window open.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
selector |
object |
"last" selects the last server gump, or the last logical container if no server gump exists; "all" covers matching windows; a nonzero number selects a gump ID or container serial. An unknown window raises an error. |
enabled |
bool |
true suppresses only client distance auto-close; false restores it. Omitting this argument uses true. |
KeepGumpOpen() = KeepGumpOpen("last", true).
Return value
void.
Ownership
The policy belongs to the game session and concrete server windows, not the graphical Profile. It survives script completion and UI detachment; the matching command, window closure or world reset removes it.
See execution state and gameplay settings.
Actual behavior
The logical session-window policy controls the real client distance-close checks. all also covers later matching windows; false for one window can act as an exception to all.
GumpRetentionPolicy → PlayerMobile.CloseRangedGumps / SessionContainers / SessionServerGumps.
Server closes, object deletion and explicit user closure remain authoritative. A retained window does not grant server actions or fresh contents beyond the server’s rules.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
UO.KeepGumpOpen("last", true);
UO.Print("The last server window is protected from local distance auto-close.");
UO.KeepGumpOpen("all", true);
UO.Wait(2000);
UO.KeepGumpOpen("all", false);
UO.Print("Normal local distance auto-close is restored.");
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,KeepGumpOpen last true
,KeepGumpOpen all false
,KeepGumpOpen 0x40001234 true
Related commands
Execution state and gameplay settings
UO.CommandPrefix
Українська · English · Русский · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
C# signatures
string UO.CommandPrefix();
void UO.CommandPrefix(string value);
Purpose
Read without arguments; change with one argument — chat-command prefix.
Parameters
| Parameter | Type | Meaning |
|---|---|---|
value |
string |
1–8 characters, not blank, without CR/LF/TAB. The new prefix applies to the next chat input. |
No parameters. → getter.
Return value
string — The current value; reading does not start an action. The setter returns void.
Default: ",".
Ownership
This is a shared host setting for the current character/session. It is an explicit exception to execution-local settings; the script setter and chat command update the same validated host configuration.
See execution state and gameplay settings.
Actual behavior
The prefix selects the existing chat-command parser. Changing it sends no speech to the game server and does not turn ordinary text into C# code.
Profile.CommandPrefix → YokoInjectionManager.TryGetPrefixedCommand / ParseChatCommand.
Standalone examples
Replace demonstration serials or names with your own before running. Each block is a complete, separate .csx without a hidden wrapper.
string prefix = UO.CommandPrefix();
UO.Print("Current chat prefix: " + prefix);
string previous = UO.CommandPrefix();
try
{
UO.CommandPrefix("!");
UO.Print("Temporary host prefix: " + UO.CommandPrefix());
}
finally
{
UO.CommandPrefix(previous);
}
Through chat
Use the current chat prefix (initially ,). Separate arguments with spaces. A getter prints the current value; a setter returns no output. Bool values accept true/false or 1/0. Quote strings containing spaces and quote the complete JSON argument. C# and chat use the same native registry.
,CommandPrefix
,CommandPrefix "!"