


- Creating text blocks in lotro how to#
- Creating text blocks in lotro install#
- Creating text blocks in lotro update#
- Creating text blocks in lotro manual#
For example, this is how you create a window and change where on the screen it will be drawn: window = Turbine.UI.Lotro.Window() īy default, however, there is no function called SetGandalf, so this will cause a runtime error: window:SetGandalf(true). Once your plugin is loaded, however, you might try to use a variable before you declare it, call a function that doesn’t exist, or other errors while the plugin is running. When LOTRO loads your plugin, it only checks that the syntax is correct. nts\The Lord of the Rings Online\Plugins\PluginAlong\HelloWorld\a:1: unexpected symbol near '=' Runtime It will instead send a message to Error channel highlighting the file and line for the first syntax error it found. LOTRO will not load your plugin if there are any syntax errors. If you accidentally write it like this, however, it is not a valid Lua statement: local a = 5 For example, a variable initialization statement normally looks like this: local a = 5 The first is syntactical: writing something that isn’t valid Lua. There are three types of errors to watch out for. If you want to get a head start on many of the topics we’ll cover, jump in and read up! There is a great series of posts on the LOTRO forums titled Writing LoTRO Lua Plugins for Noobs. The Index page of the LOTRO Lua Documentation. Download it, unzip the zip file, and open index.html to start:
Creating text blocks in lotro update#
You can find the Official Update 25 Lua Documentation at. LOTRO defines an interface that Lua scripts can use to do things. This if block is over LOTRO Lua Documentation Write "a ~= b" to the standard chat channel Write "a = b" to the standard chat channel Tell Lua we have a thing called 'b', and it holds the number 10 If you are new to programing, the above code blocks (which both do the same thing) can be read like this: tell Lua we have a thing called 'a', and it holds the number 5 I just recommend you choose a style and stick to it consistently, as it will make it easier to come back later and read what you wrote. You can also write it like this, however: local a = 5Įither way is fine by Lua. For example, in a more structured environment you would expect to see parentheses in expressions and function calls, and statements ending in a semi-colon: local a = 5 If you are coming to Lua from more structured languages, like C#, then this could be unexpected. Any text on a line that follows two hyphens (–) is ignored by Lua: local a = 5 - This sets variable a to the value 5 Lua lets you add comments, bits of non-code text that let you document what you’re doing. However, LOTRO further limits what language features are available for security reasons. This means that we should not expect any Lua language features that were introduced after version 5.1 to be available for our plugins. We get the following output to our standard channel: Lua Version: Lua 5.1 How do we know which version LOTRO uses? The easiest way is to ask it! If we execute this code in a LOTRO plugin: ("Lua Version: ". You can find the reference for the version that LOTRO uses at: Lua 5.1 Reference ManualĪt the time of writing, Lua is on version 5.4. Lua is a programming language that exists outside of games like LOTRO.
Creating text blocks in lotro manual#
To start, here are some links to help with developing your LOTRO plugins: Lua Reference Manual See the accompanying video at Documentation
Creating text blocks in lotro how to#
Today we’re going to look at the basics of how to read and write Lua code, and the building blocks of graphical user interfaces, or GUIs – things like windows, buttons, and labels. We also looked at the bare minimum for making a plugin – the.
Creating text blocks in lotro install#
Things like what are plugins, where can we find plugins, how do we install plugins, and how do we load and unload them. Welcome back to Plugin Along, where we talk about LOTRO Plugins! Last time we covered a lot of the basics of LOTRO Plugins.
