Macro: Difference between revisions

From Vintage Story Wiki
No edit summary
(Marked this version for translation)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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.
<languages /><br><translate>


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.
<!--T:1-->
In Vintage Story, '''macros''' are used to quickly execute some commands with a keyboard shortcut without the need to type them in the chat window.


== Creation ==
</translate>
[[File:Macro Editor.png|alt=Example of a Macro Editor|thumb]]
__TOC__
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.
<translate>


Or type the follow command:
== Creation == <!--T:2-->


=== /macro ===
<!--T:3-->
[[File:Macro Editor.png|363x363px|thumb|The Macro Editor window.]]


* <code>/macro [addcmd|setcmd|syntax|desc|priv|save|delete|show|list]</code>Create a server side macro that can execute one or more commands
<!--T:4-->
** <code>/macro addcmd [command]</code>Add a command to a temporary macro.
*Press {{Keypress|Ctrl}} + {{Keypress|M}} to open the Macro Editor window.
** <code>/macro setcmd [command]</code>Override a command to a temporary macro.
*Select an icon for your macro.
** <code>/macro [syntax]</code>Sets the syntax help info displayed when using <code>/help [name]</code>.
*Give a name to your Macro.
** <code>/macro [desc]</code>Sets the description text displayed when using <code>/help [name]</code>
*Write a keyboard shortcut combination for the execution of your macro.
** <code>/macro [priv]</code>Sets the privilege required to execute this command, e.g. '''controlserver''' if only for admins or, '''build''' for any player with build rights.
*Write one or several commands. It can be any {{ll|List_of_server_commands|server command}} or any {{ll|List_of_client_commands|client command}}.
** <code>/macro show</code>Shows the contents of the temporary macro currently being defined by above commands.
** <code>/macro save [name]</code>Saves the temporary macro defined by above command to given command name.
** <code>/macro list</code>Shows a list of all saved macros.
** <code>/macro show [name]</code>Shows the contents of a saved macro.
** <code>/macro delete [name]</code>Deletes a previously saved macro.
** <code>/macro discard [name]</code>Discards the temporary macro.


== Recommendations ==
== Recommendations == <!--T:5-->


=== Name ===
=== Name === <!--T:6-->
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.
<!--T:7-->
*Name all your macros with a unique name.


=== Hotkeys ===
=== Hotkeys === <!--T:8-->
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
<!--T:9-->
*Insert multiple hotkeys [Ctrl, Alt, Shift, etc.] + [Anything] because the game already has a lot of hotkeys that serve a purpose.
*If you modify the hotkey of an already existing macro, it will not work unless you restart the game.


=== Command ===
</translate>
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.
{{Game navbox}}

Latest revision as of 18:06, 20 August 2023

Other languages:


In Vintage Story, macros are used to quickly execute some commands with a keyboard shortcut without the need to type them in the chat window.

Creation

The Macro Editor window.
  • Press Ctrl + M to open the Macro Editor window.
  • Select an icon for your macro.
  • Give a name to your Macro.
  • Write a keyboard shortcut combination for the execution of your macro.
  • Write one or several commands. It can be any server command or any client command .

Recommendations

Name

  • Name all your macros with a unique name.

Hotkeys

  • Insert multiple hotkeys [Ctrl, Alt, Shift, etc.] + [Anything] because the game already has a lot of hotkeys that serve a purpose.
  • If you modify the hotkey of an already existing macro, it will not work unless you restart the game.


Wiki Navigation
Vintage Story Guides[[::Category:Guides| ]]Frequently Asked Questions Soundtrack Versions Controls
Game systems Crafting Knapping Clay forming Smithing Cooking Temperature Hunger Mining Temporal stability Mechanical power Trading Farming Animal husbandry
World World generation Biomes Weather Temporal storms
Items Tools Weapons Armor Clothing Bags Materials Food
Blocks Terrain Plants Decorative Lighting Functional Ore
Entities Hostile entities Animals NPCs Players
Miscellaneous List of client commands List of server commands Creative Starter Guide Bot System WorldEdit Cinematic Camera Adjustable FPS Video Recording ServerBlockTicking