Search results

  • ...ys and tags or might contain some deprecated syntax. If you find that this reference doesn't give you the answer to how to implement some feature in WML, the mo *** [[LuaWML]] how to code actions with the Lua language (BfW 1.14 and earlier)
    7 KB (1,041 words) - 14:19, 27 April 2024
  • ...[[#location_set.of_wml_var]]. They are provided by the ''lua/location_set.lua'' file. All the other functions are methods from the class and they are ava local location_set = wesnoth.require "lua/location_set.lua"
    7 KB (1,100 words) - 13:34, 12 February 2021
  • ...accessed by using the usual variable syntax: <syntaxhighlight inline lang='lua'>unit.variables["a.b.c[6].d"]</syntaxhighlight> ...owever, can be modified by the user, the engine, WML, independently of the Lua code. In particular, if a unit is killed, any further use of the proxy unit
    26 KB (3,965 words) - 20:53, 5 June 2021
  • ** '''Note''': unlike most other Wesnoth Lua functions, ignore_units defaults to true. [[Category: Lua Reference]]
    9 KB (1,522 words) - 13:32, 12 February 2021
  • [[Category: Lua Reference]]
    3 KB (395 words) - 21:05, 17 June 2021
  • ...e your knowledge outside Wesnoth. You've probably heard about c++, python, lua or any other programming language. Just like them, WML has some common feat *[https://www.wesnoth.org/macro-reference.html Macro reference]
    12 KB (1,589 words) - 08:10, 24 August 2021
  • Usually the number of sides in a scenario is fixed. However, the Lua function [[LuaAPI/wesnoth/sides#wesnoth.sides.create|wesnoth.sides.create]] ...lways the player name (mp server nick) it impossible to change it with wml/lua. {{DevFeature1.13|5}} You can use ''side_name'' instead to specify the name
    13 KB (2,170 words) - 05:23, 27 February 2024
  • <syntaxhighlight lang=lua> <syntaxhighlight lang=lua>
    6 KB (947 words) - 18:05, 18 April 2024
  • ...irely to achieve the same effect (on previous versions this will crash the Lua engine). ...aigns that you can make use of. You can find [http://www.wesnoth.org/macro-reference.xhtml#file:items.cfg a list of them] if you look into the items.cfg file in
    46 KB (7,208 words) - 23:30, 16 April 2024
  • ...tions for [[LuaAI#Dynamic_Lua_Aspects|setting up aspects dynamically using Lua]]. ...on of the more complex (and arguably more useful) application of a dynamic Lua ''advancements'' aspect, as described [[LuaAI#The_advancements_Aspect|here]
    35 KB (5,668 words) - 01:32, 25 February 2024
  • ..._id''': This key sets a string as a way to mark the hex or hexes for later reference. It is very similar to the leader starting position, and can also be set t ...to a time_area. Optional, unless you want to remove the time_area later or reference it from a location filter elsewhere. Can be a comma-separated list when rem
    61 KB (9,881 words) - 03:40, 22 February 2024
  • ...erators, '''default''', '''cave''' (cave is removed in wesnoth 1.13.6), '''lua''' {{DevFeature1.13|0}} ===The lua generator===
    17 KB (2,666 words) - 18:04, 26 July 2022
  • ...ortcut for simple variable creation and the [https://www.wesnoth.org/macro-reference.html#VARIABLE_OP VARIABLE_OP] macro is a quick syntactic shortcut for perfo ...one container at an array index. The macro [https://www.wesnoth.org/macro-reference.html#CLEAR_VARIABLE CLEAR_VARIABLE] is a shortcut for this tag.
    37 KB (5,920 words) - 05:49, 27 February 2024
  • ..."my_filter_functions.goto" will correctly use the function which in actual Lua code would need to be referenced as <code>my_filter_functions["goto"]</code [[Category: WML Reference]]
    13 KB (1,965 words) - 15:41, 26 April 2024
  • ...used either as a set or a map). It can be loaded via <syntaxhighlight lang=lua inline>local location_set = wesnoth.require "location_set"</syntaxhighlight Converts a table of pairs (as <syntaxhighlight lang=lua inline>{ {1,2}, {7,8} }</syntaxhighlight>) into a location set. The first f
    11 KB (1,650 words) - 17:56, 18 April 2024
  • ...lored unit sprites without needing to launch the game with specific WML or Lua edits. [[Category: WML Reference]]
    13 KB (1,973 words) - 08:08, 19 April 2024
  • ...|WML events]] or from [[LuaAPI/wesnoth/units#wesnoth.units.create_animator|Lua]], allowing custom animations. ...''value_second='', and ''hits='' values are all set from the WML event or Lua animation call.
    41 KB (6,114 words) - 01:16, 19 April 2024
  • ** '''code''' the lua code that is executed. ...mmand]'''}}: {{DevFeature1.13|12}} Executes a custom command registered by Lua code
    4 KB (700 words) - 05:41, 27 February 2024
  • * Get a nice reference in my CV. * Lua (used in combination with WML to create scenarios) ''yes''
    14 KB (2,376 words) - 12:53, 6 July 2014
  • ..."my_filter_functions.goto" will correctly use the function which in actual Lua code would need to be referenced as <code>my_filter_functions["goto"]</code ...tterns which will be processed in order. As soon as a pattern matching the reference terrain is found, the result of the filter will be determined.
    13 KB (2,092 words) - 14:57, 26 February 2024
  • ...one of <tt>images</tt>, <tt>sounds</tt>, <tt>music</tt>, or <tt>maps</tt>. Lua can define additional types as well. [[Category: WML Reference]]
    3 KB (584 words) - 14:35, 23 July 2023
  • Items marked with the text {{DevFeature1.15|0}} are WML or Lua features only available in a development version of the game. This WML reference contains the current WML syntax and Lua API for the stable branch. However, the development version of the game is
    2 KB (252 words) - 04:55, 2 August 2019
  • ...ontrol logic'' (such as event handling, done using C++ or Lua). The C++ or Lua code is also reponsible for actually loading the WML and showing the widget ...iple widgets inside (''containers'', see below). ([[GUIWidgetDefinitionWML|Reference]])
    8 KB (1,233 words) - 13:38, 3 May 2024
  • [[Category:Lua Reference]]
    6 KB (860 words) - 18:05, 18 April 2024
  • ...Location Filter]] that produced them, and a [[#Dynamic_Lua_Aspects|dynamic Lua aspect]] will return the result of calling the function, not the function i *:<syntaxhighlight lang=lua>
    12 KB (1,806 words) - 00:39, 11 February 2024
  • ...y [set_variable]rand=. This function has the same interface as [http://www.lua.org/manual/5.2/manual.html#pdf-math.random math.random] so it can take 0, 1 ...ase it will be split on commas and consider integer ranges; or it can be a Lua array, in which case the elements can be either simple values or a table of
    4 KB (529 words) - 18:04, 18 April 2024
  • ...lso be read as '''[1]''' and '''[2]'''. If you assign the coordinates, the reference will instantly point to a new hex. [[Category:Lua Reference]]
    4 KB (562 words) - 22:26, 17 December 2023
  • During the beta/RC/stable stages, no API changes (e.g., Lua/WML interfaces or semantics) should be made , nor large-scale or destabiliz # Upload to files.wesnoth.org (path for reference purposes only,
    16 KB (2,534 words) - 18:08, 14 February 2020
  • ...and/or customized using both [[AiWML|WML]] or [[LuaAI#Dynamic_Lua_Aspects|Lua]]. ...know that the components can be written in three different languages, C++, Lua and Formula AI (FAI). Information on how to do this is provided in the lin
    39 KB (6,494 words) - 23:25, 9 April 2024
  • ai_development, ai, artificial_intelligence, lua, multiplayer, game_development, c++, game_engine, game, games, graphics, se ...now wants to take responsibility for a student. He is one of our resident lua experts and also handles several tasks reaching over into automated testing
    23 KB (3,846 words) - 19:14, 20 February 2015
  • This page contains a summary of the major Lua API changes between 1.12 and 1.15, to help make updating older code simpler **<syntaxhighlight lang=lua>
    24 KB (3,412 words) - 14:00, 23 November 2022
  • ...anything is shown on the screen at all. Can be used to set up the [[LuaWML|Lua]] environment: loading libraries, defining helper functions, etc. * Units placed by the wesnoth.put_unit() Lua function
    44 KB (6,986 words) - 17:13, 24 March 2024
  • ...g/macro-reference.xhtml#FOREACH FOREACH] and [http://www.wesnoth.org/macro-reference.xhtml#NEXT NEXT] macros. Note: This macro is deprecated; you should just us ...pecified number of times. To use it, use the [http://www.wesnoth.org/macro-reference.xhtml#REPEAT REPEAT] macro.
    20 KB (3,075 words) - 03:38, 22 February 2024
  • == The '''[lua]''' tag == ...alWML]] It makes it possible to write actions with the [http://www.lua.org Lua 5.4] language.
    22 KB (3,191 words) - 02:14, 25 April 2024
  • [lua] [/lua]
    3 KB (570 words) - 15:12, 30 November 2017
  • ...Links are provided to detailed documentation on each of the topics. For reference, we also provide a brief timeline describing some of the main development m ...l components which can be customized and modified in both WML and [[LuaWML|Lua]]. Documentation on the available AI tools can be found at:
    8 KB (1,228 words) - 18:21, 19 July 2020
  • <syntaxhighlight lang=lua> [[Category:Lua Reference]]
    6 KB (899 words) - 12:28, 23 November 2023
  • ** A table of the form <syntaxhighlight lang=lua inline>{filter_type = filter_contents}</syntaxhighlight>. The possible filt <syntaxhighlight lang=lua>
    16 KB (2,629 words) - 14:14, 20 April 2024
  • ...ary of the available documentation. This page is a reference guide to the Lua AI functions, variables and component syntax. == Lua AI Functions ==
    22 KB (3,533 words) - 23:27, 9 April 2024
  • ...d in file 'data/core/macros/ai.cfg', see the [http://www.wesnoth.org/macro-reference.xhtml#file:ai.cfg list] of available macros or the [https://github.com/wesn Adding a [[Creating_Custom_AIs#Creating_Custom_Candidate_Actions|custom Lua candidate action]] is done as follows
    17 KB (2,693 words) - 15:59, 13 July 2023
  • ...The format of the table is described in [[LuaWML#Encoding WML objects into Lua tables]]. <syntaxhighlight lang=lua>
    5 KB (795 words) - 13:26, 12 February 2021
  • <syntaxhighlight lang=lua> <syntaxhighlight lang=lua>
    14 KB (2,207 words) - 13:26, 12 February 2021
  • <syntaxhighlight lang=lua> items = wesnoth.require "lua/wml/items.lua"
    10 KB (1,465 words) - 20:50, 18 February 2021
  • [[Category: Lua Reference]]
    8 KB (1,082 words) - 13:31, 12 February 2021
  • ...hat window and dumps it to the lua/info log domain (''--log-info=scripting/lua'' on the command-line). The chat line header is "<Lua>" by default, but it can be changed by passing a string before the message.
    32 KB (4,945 words) - 16:24, 29 April 2024
  • This page describes the [[LuaWML]] functions for handling Lua files. Replaces [http://www.lua.org/manual/5.1/manual.html#5.1 basic.dofile] for loading files. Loads the g
    3 KB (496 words) - 13:33, 12 February 2021
  • local helper = wesnoth.require("lua/helper.lua") ...table with another table as the value of a string attribute. Unlike other lua functions, wesnoth.synchronize_choice will NOT throw an error if the table
    21 KB (3,124 words) - 10:01, 7 May 2021
  • * Lua (used in combination with WML to create scenarios) ...() method of the [http://www.boost.org/doc/libs/1_37_0/doc/html/boost_asio/reference/io_service.html asio::io_service] object.
    36 KB (6,071 words) - 04:17, 3 May 2023
  • ...l the locations matching the given filter. Locations are stored as a ''hex reference'' which has x and y keys along with a variety of other functions. See [[Sta ...ghlight lang=lua inline>loc[1]</syntaxhighlight> and <syntaxhighlight lang=lua inline>loc[2]</syntaxhighlight>) is still supported.
    15 KB (2,275 words) - 17:53, 18 April 2024
  • <syntaxhighlight lang=lua> [[Category:Lua Reference]]
    3 KB (386 words) - 18:04, 18 April 2024
  • * [lua] ([[LuaWML]]) which contains Lua code to be executed, and * all tags created from lua in [[LuaWML:Events#wesnoth.wml_actions|wesnoth.wml_actions]] (if they don't
    2 KB (305 words) - 09:22, 5 December 2022
  • <h4>Michael Babich - Improving Lua's User Interface Capabilities</h4> ...to improve the ability for add-ons to customize the user interface through Lua. I will focus on providing simple, but powerful syntax for a set of functio
    35 KB (5,933 words) - 02:38, 24 April 2023
  • ====Jody Northup - Improve and extend Lua AI scripting facilities==== This is the [[SoC_Ideas_LuaAI_2011|Lua AI improvement]] idea.<br/>
    30 KB (4,934 words) - 00:55, 4 May 2023
  • <syntaxhighlight lang=lua> <syntaxhighlight lang=lua>
    4 KB (599 words) - 17:41, 29 April 2024
  • ...a reference to Wesnoth unit on the map, on the recall list, or private to Lua. [[Category:Lua Reference]]
    6 KB (826 words) - 08:32, 17 April 2024
  • [[Category:Lua Reference]]
    5 KB (757 words) - 06:03, 24 December 2022
  • This page therefore only describes one method of creating custom AIs, custom Lua candidate actions. Links to legacy documentation of some of the old method ...thod (now the ''old'' method) of setting up Lua CAs. However, as external Lua CAs are now the standard for creating custom AIs, we drop the 'external' in
    32 KB (5,391 words) - 19:39, 15 July 2020
  • A WML table is a specially-formatted Lua table representing WML tags and values. For more detail on the format of WM <syntaxhighlight lang=lua>
    16 KB (2,332 words) - 17:56, 18 April 2024
  • This page provides information on the Google Code-in Wesnoth Lua AI tasks. If you need additional help, the preferred way of contacting us ...') and with the '''Lua''' programming language. If you do not know WML or Lua yet, but are familiar with coding in other languages, you can probably acqu
    23 KB (3,948 words) - 03:24, 16 November 2022
  • ...But the information contained in the WML reference section is just that: a reference. Not a tutorial. This page aims to introduce complete beginners to WML with ...content without being required to learn a much more complex language like Lua or C++. Now I'm going to say this here and now: don't think you can learn W
    3 KB (432 words) - 18:55, 29 January 2023
  • ...ing the files are the same as for WML files, except that they require a ''.lua'' extension instead of ''.cfg.'' Any extra parameters to '''dofile''' are f ...ulting modules is returned, with the keys being the filenames minus the ''.lua'' extension.
    40 KB (6,092 words) - 18:12, 17 April 2024
  • ...ere, we shall try to explain how to use them with more details than in the reference :'''lua_function:''' lua function
    40 KB (6,054 words) - 14:13, 21 October 2022
  • [lua] [/lua]
    19 KB (2,598 words) - 14:04, 18 August 2020
  • ...d for during the initial application. Listing it here so that we can still reference it later on. * Lua (used in combination with WML to create scenarios)
    8 KB (1,386 words) - 04:32, 14 March 2014
  • Most of the RCA AI CAs have a single fixed scores, with a few of the Lua CAs have two distinct (but otherwise also fixed) scores, as indicated below *{{DevFeature1.15|3}} '''Retreat injured''' CA (scores 192,000 and 95,000; Lua CA): retreat injured units that are threatened by enemies to healing locati
    15 KB (2,475 words) - 00:47, 28 November 2022
  • ...a.org/manual/5.4/manual.html Lua 5.4] which is documented in detail on the Lua website. ...ting Lua for Wesnoth. For information on how to tell the engine about your Lua code, see [[LuaWML]].
    12 KB (1,780 words) - 13:24, 29 April 2024
  • ...cify the size of the map. Pathfinding in the mapgen kernel is done without reference to a map, so this is needed to prevent paths from going off the map. <syntaxhighlight lang=lua>
    9 KB (1,438 words) - 17:53, 18 April 2024
  • <syntaxhighlight lang=lua> ...table with another table as the value of a string attribute. Unlike other lua functions, '''wesnoth.sync.evaluate_single''' will ''not'' throw an error i
    5 KB (833 words) - 17:53, 18 April 2024
  • <syntaxhighlight lang=lua> <syntaxhighlight lang=lua>
    4 KB (585 words) - 22:19, 17 December 2023
  • * {{LuaGameOnly}} '''wesnoth.schedule.get_time_of_day'''(''reference'', [''for turn'']) &rarr; ''time of day info'' Returns the schedule information. The ''reference'' can be any of the following:
    3 KB (457 words) - 17:52, 18 April 2024
  • ...L table describing a sound source. Sound sources can be compared using the Lua equality operators. Each sound source contains the following fields: ...urrent music playlist. It can be accessed as a normal array, including the Lua length operator. If you assign a music config to an entry, the track is rep
    7 KB (1,075 words) - 17:53, 18 April 2024
  • ...the api available for lua map generators that is differnt from the ingame lua api. Behaves slightly differntly than in the ingame lua api with the same name in particular it no longer accepts unit arguments an
    4 KB (598 words) - 16:26, 29 August 2021
  • ...ort of submenu in a <tt>[set_menu_item]</tt>. The items are specified as a Lua array of tables, each of which supports the following keys: The second argument is a list of options as a Lua array. Each option is either a (possibly-translatable) string or a config w
    11 KB (1,793 words) - 14:59, 27 April 2024
  • <syntaxhighlight lang=lua> <syntaxhighlight lang=lua>
    22 KB (3,378 words) - 17:42, 18 April 2024
  • <syntaxhighlight lang='lua'> <syntaxhighlight lang='lua'>
    16 KB (2,308 words) - 17:52, 18 April 2024
  • ...to the Lua engine. A unit proxy may also be invalid, that is, it does not reference any unit. * <syntaxhighlight lang=lua inline>"map"</syntaxhighlight> - The unit is on the map. Its x and y values
    8 KB (1,284 words) - 06:52, 24 January 2023
  • <syntaxhighlight lang=lua> <syntaxhighlight lang=lua>
    9 KB (1,334 words) - 17:53, 18 April 2024
  • ...a inline>str[n]</syntaxhighlight> is a shorthand for <syntaxhighlight lang=lua inline>str:sub(n,n)</syntaxhighlight>. This means negative indices count fr ...currently must be a single character and defaults to <syntaxhighlight lang=lua inline>','</syntaxhighlight>. The optional ''options'' table controls how t
    9 KB (1,200 words) - 18:04, 18 April 2024
  • ...e [[Wesnoth Formula Language]]. It can be loaded via <syntaxhighlight lang=lua inline>local functional = wesnoth.require "functional"</syntaxhighlight>. <syntaxhighlight lang=lua>
    5 KB (742 words) - 18:04, 18 April 2024
  • .... Examples of their use in mainline are the <tt>host.lua</tt> and <tt>join.lua</tt> scripts which are used during CI to test hosting and joining a game th <syntaxhighlight lang=lua>
    10 KB (1,387 words) - 05:50, 30 September 2022
  • Some helper functions are provided by the '''lua/helper.lua''' library. They are stored inside a table that is returned when loading th <syntaxhighlight lang='lua'>
    16 KB (2,152 words) - 18:12, 1 July 2023
  • This guide is designed to help you get a simple Wesnoth GUI, implemented in lua, up and running while describing the basic building blocks along the way. ...ng lua here. If you find WML easier to follow, you can always convert the lua tables that define the GUIs to WML using [[LuaAPI/wml#wml.tostring|wml.tost
    83 KB (8,010 words) - 20:22, 29 April 2024