[XR Tools] Command Line - Updated 2014-11-10

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Locked
User avatar
Ketraar
EGOSOFT
EGOSOFT
Posts: 11740
Joined: Fri, 21. May 04, 17:15
x4

[XR Tools] Command Line - Updated 2014-11-10

Post by Ketraar » Sat, 17. May 14, 18:56

Command Line

The Command Line allows you to enter certain commands to trigger debug functionality. This can be particularly helpful for scripters.

Image

Accessing the Command Line

[ external image ]

The Debug Bar is not accessible by default. Just like the DebugLog, you have to assign a hotkey to it first. You can do that in the options menu:
Settings -> Controls -> Space -> Command Line

When a key is mapped, press it while no menu is open. A transparent bar and a blinking cursor will show up. You can enter a command and confirm it with Enter, or cancel the input with Esc.

Image

Command: refreshmd

This reloads all MD files and applies the changes to the currently running game. This is similar to what happens when you save and reload the game, it's just much quicker. However, <patch> elements are ignored, they are only valid when loading a saved game.

For more information on the refresh mechanism, see the MD documentation.

Image

Command: refreshai

(New in v3.0 Beta)

This reloads all AI scripts and applies the changes to the currently running game. For this to work, the AI scripts on disk must be fully compatible with the currently loaded AI scripts. In case of incompatibility issues in any AI script file, the operation is aborted with an error in the debug log. (This also means that decreasing a previously increased version number is not allowed until the end of your game session, even if your script might be compatible with all your savegames.)

<patch> actions for newer script versions will be performed.

For more information on AI script compatibility rules, see X Rebirth Tools.

Image

Command: aicompat check

This checks all currently loaded AI scripts for whether they are compatible with the previously released game version. If there are compatibility issues, error messages will be created. They can be viewed in the DebugLog.

The basic rule for adjusting AI scripts is that newly added blocking actions have to be marked with a sinceversion attribute. Existing blocking actions cannot be removed, and the order of existing blocking actions within a file cannot be changed (otherwise you can run into problems when loading an older savegame).

The compatibility check is done by comparing the AI scripts to libraries/aicompat.xml. If there are no errors then all is well and the scripts are compatible.

Image

Command: aicompat save

This command creates a new aicompat.xml file based on the currently loaded AI scripts. This can be used when releasing new AI script versions, and you intend to make further script changes in future updates. You should check your AI scripts against the latest version of aicompat.xml. The new file is saved in your personal folder.

Image

Command: aicompat pcheck

This performs the same AI script compatibility check, but loads the compatibility file from your personal folder instead of the game folder (for example the one that was saved with "aicompat save").

Image

Command: reloadui

This command reloads the userinterface (including loading UI addons from disk).

Image

Command: lua [luascript]

This executes the given lua command in the detail monitor Lua environment.




Locked

Return to “X Rebirth - Scripts and Modding”