Macro

From Vintage Story Wiki
Revision as of 21:37, 2 November 2022 by Ruyeex (talk | contribs)

Macro is a a rule or pattern which specifies how a certain input string (like a combination of keys) must be mapped to an output string replacement (also often a string) according to a defined procedure.

In Vintage Story, Macros are used to use certain commands quick without need to type the command on the chat which saves some time when you need it.

Creation

Example of a Macro Editor

In order to access all your Macros, press Ctrl + M, then you need to name your Macro and tell which inputs on the keyboard needs to trigger a command by typing the right hotkeys (single or combo) it works both for server and client commands.

Example to make a macro:

  1. Name a macro like Creative
  2. Write the right command for the macro like /gamemode creative
  3. Put a hotkey to access that macro
  4. Save your macro
  5. Test it and you created yourself a macro, good job.


Or type the follow command:

/macro

  • /macro [addcmd|setcmd|syntax|desc|priv|save|delete|show|list]Create a server side macro that can execute one or more commands
    • /macro addcmd [command]Add a command to a temporary macro.
    • /macro setcmd [command]Override a command to a temporary macro.
    • /macro [syntax]Sets the syntax help info displayed when using /help [name].
    • /macro [desc]Sets the description text displayed when using /help [name]
    • /macro [priv]Sets the privilege required to execute this command, e.g. controlserver if only for admins or, build for any player with build rights.
    • /macro showShows the contents of the temporary macro currently being defined by above commands.
    • /macro save [name]Saves the temporary macro defined by above command to given command name.
    • /macro listShows a list of all saved macros.
    • /macro show [name]Shows the contents of a saved macro.
    • /macro delete [name]Deletes a previously saved macro.
    • /macro discard [name]Discards the temporary macro.

Recommendations

Name

Name all the Macros with unique names to work.

If it displays error, check if there's a macro that says that but when you modify your macro with a different name, your macro will only save the modified command but the hotkey remains the same.

Hotkeys

Insert multiple hotkeys [Ctrl, Alt, Shift, etc.] + [Anything] because that the game already has a lot of hotkeys that serve a purpose.

If you modify the hotkey of a already existing macro, it will not work unless you restart the game

Command

If you need to change the command of a already existing macro, reset the macro to fit with the command you want bcs it will not be saved when you close the game.