You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WoLua is a plugin that allows users (like you!) to write custom, context-aware chat commands in [lua](https://www.lua.org/). These commands can read information from the game through WoLua's API, and are able to do things like printing messages to your local chatlog, send chat (commands _and_ plain text) to the server, and more.
15
15
16
16
## Installation
17
-
Type `/xlplugins` in-game to access the plugin installer and updater. Note that you will need to add [my custom plugin repository](https://github.com/PrincessRTFM/MyDalamudPlugins) (full instructions included at that link) in order to find this plugin.
17
+
Type `/xlplugins` in-game to access the plugin installer and updater. Note that you will need to add [my custom plugin repository](https://github.com/VariableVixen/MyDalamudPlugins) (full instructions included at that link) in order to find this plugin.
18
18
19
19
## In-game usage
20
20
- Type `/wolua` to pull up a GUI with basic instructions and the configuration options.
@@ -23,4 +23,4 @@ Type `/xlplugins` in-game to access the plugin installer and updater. Note that
23
23
- Type `/wolua call <script> [<optional arguments...>]` to actually run a command script. Any additional text will be passed to the script for its own use.
24
24
25
25
## Writing scripts
26
-
Since WoLua exposes a significant amount of game information (not to mention the interface for _doing_ things) to scripts, the documentation is too extensive for the basic readme page. You can find details on the [dedicated API docs](https://github.com/PrincessRTFM/WoLua/tree/master/docs) instead.
26
+
Since WoLua exposes a significant amount of game information (not to mention the interface for _doing_ things) to scripts, the documentation is too extensive for the basic readme page. You can find details on the [dedicated API docs](https://github.com/VariableVixen/WoLua/tree/master/docs) instead.
Textline($"However, if you're writing your own scripts, you can use \"{Plugin.Command} api\" to generate an API definition file in {LuadocGenerator.ApiDefinitionFilePath}"
Copy file name to clipboardExpand all lines: examples/01-absolute-minimum/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
3
3
The _absolute barest minimum_ that a WoLua script needs is to register a callback function. It doesn't actually even need to _do_ anything, but if you fail to register a function, then your script is considered broken, and attempting to call it will print an error in your chatlog. Additionally, when the script is first loaded, an error will be printed about it not registering a function.
4
4
5
-
This is accomplished by [calling the global `Script` object as a function and passing it a single function argument](https://github.com/PrincessRTFM/WoLua/blob/master/docs/README.md#script-callback-functions), as demonstrated in [`command.lua`](command.lua) here. Note that since this is an _empty_ function, nothing will happen when you call the script command.
5
+
This is accomplished by [calling the global `Script` object as a function and passing it a single function argument](https://github.com/VariableVixen/WoLua/blob/master/docs/README.md#script-callback-functions), as demonstrated in [`command.lua`](command.lua) here. Note that since this is an _empty_ function, nothing will happen when you call the script command.
Copy file name to clipboardExpand all lines: examples/02-debugging/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Debugging Your Script
2
2
3
-
Nobody gets it right the first time. That means you're gonna need to debug your scripts somehow. For that, the [`Debug` API](https://github.com/PrincessRTFM/WoLua/blob/master/docs/debug.md) will be invaluable. Step one, of course, is to turn debugging output on with `Script.Debug.Enabled = true`, probably at the very top of your script.
3
+
Nobody gets it right the first time. That means you're gonna need to debug your scripts somehow. For that, the [`Debug` API](https://github.com/VariableVixen/WoLua/blob/master/docs/debug.md) will be invaluable. Step one, of course, is to turn debugging output on with `Script.Debug.Enabled = true`, probably at the very top of your script.
4
4
5
5
**Debug output is only enabled for debug calls made while `Script.Debug.Enabled` is `true`.**
Copy file name to clipboardExpand all lines: examples/03-local-chat-messages/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
3
3
So now you know how to create a basic script, and how to print debugging output. But what about actually _doing_ things? Well, step one is being able to print messages for the user of your script. This is important for offering help messages, and also printing errors if the user uses your script wrong - for instance, if your script needs some user input and they don't provide any.
4
4
5
-
There are two functions for this, both under the global [`Game` API](https://github.com/PrincessRTFM/WoLua/blob/master/docs/game.md): `PrintMessage(...)` and `PrintError(...)`. Both of these will join all provided arguments with a single space, and will attempt to turn non-string values into something more reasonable, just like `Script.Debug.Print(...)` does, as you learned in 02 (debugging). If debug output is enabled, they will also print a debug message to the log. In both cases, the message printed will be prefixed with `[WoLua][<script>]` for the sake of clarity to the player. The only actual difference is that `PrintMessage()` uses a light green colour for the message, while `PrintError()` uses an orange colour instead.
5
+
There are two functions for this, both under the global [`Game` API](https://github.com/VariableVixen/WoLua/blob/master/docs/game.md): `PrintMessage(...)` and `PrintError(...)`. Both of these will join all provided arguments with a single space, and will attempt to turn non-string values into something more reasonable, just like `Script.Debug.Print(...)` does, as you learned in 02 (debugging). If debug output is enabled, they will also print a debug message to the log. In both cases, the message printed will be prefixed with `[WoLua][<script>]` for the sake of clarity to the player. The only actual difference is that `PrintMessage()` uses a light green colour for the message, while `PrintError()` uses an orange colour instead.
6
6
7
7
**Neither of these functions will send any data to the game server.**
Copy file name to clipboardExpand all lines: examples/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
3
3
These scripts are, technically, usable directly. You can drop the folders into your script repository and they'll work fine. They are _not_ actually intended for use, but an example isn't much good if it doesn't _work_.
4
4
5
-
Please note that while these scripts _are_ documented via comments, the [actual documentation](https://github.com/PrincessRTFM/WoLua/blob/master/docs/README.md) is almost certainly much more useful, since it documents _everything_ as opposed to the pieces that the examples use.
5
+
Please note that while these scripts _are_ documented via comments, the [actual documentation](https://github.com/VariableVixen/WoLua/blob/master/docs/README.md) is almost certainly much more useful, since it documents _everything_ as opposed to the pieces that the examples use.
0 commit comments