Difference between revisions of "Template:Lua Functions"

From The Battle for Wesnoth Wiki
Line 1: Line 1:
 
{|class="reference-sidebar"
 
{|class="reference-sidebar"
 
|-
 
|-
|
+
|''wesnoth''
[[LuaAPI/wesnoth#wesnoth.dofile|wesnoth.dofile]]<br>
+
[[LuaAPI/wesnoth#dofile|dofile]]<br>
[[LuaAPI/wesnoth#wesnoth.require|wesnoth.require]]<br>
+
[[LuaAPI/wesnoth#require|require]]<br>
[[LuaAPI/wesnoth#wesnoth.textdomain|wesnoth.textdomain]]<br>
+
[[LuaAPI/wesnoth#textdomain|textdomain]]<br>
[[LuaAPI/wesnoth#wesnoth.log|wesnoth.log]]<br>
+
[[LuaAPI/wesnoth#log|log]]<br>
[[LuaAPI/wesnoth#wesnoth.as_text|wesnoth.as_text]]<br>
+
[[LuaAPI/wesnoth#as_text|as_text]]<br>
[[LuaAPI/wesnoth#wesnoth.simulate_combat|wesnoth.simulate_combat]]<br>
+
[[LuaAPI/wesnoth#simulate_combat|simulate_combat]]<br>
[[LuaAPI/wesnoth#wesnoth.name_generator|wesnoth.name_generator]]<br>
+
[[LuaAPI/wesnoth#name_generator|name_generator]]<br>
[[LuaAPI/wesnoth#wesnoth.compile_formula|wesnoth.compile_formula]]<br>
+
[[LuaAPI/wesnoth#compile_formula|compile_formula]]<br>
[[LuaAPI/wesnoth#wesnoth.eval_formula|wesnoth.eval_formula]]<br>
+
[[LuaAPI/wesnoth#eval_formula|eval_formula]]<br>
[[LuaAPI/wesnoth#wesnoth.version|wesnoth.version]]<br>
+
[[LuaAPI/wesnoth#version|version]]<br>
[[LuaAPI/wesnoth#wesnoth.current_version|wesnoth.current_version]]<br>
+
[[LuaAPI/wesnoth#current_version|current_version]]<br>
[[LuaAPI/wesnoth#wesnoth.ms_since_init|wesnoth.ms_since_init]]<br>
+
[[LuaAPI/wesnoth#ms_since_init|ms_since_init]]<br>
[[LuaAPI/wesnoth#wesnoth.deprecated_message|wesnoth.deprecated_message]]<br>
+
[[LuaAPI/wesnoth#deprecated_message|deprecated_message]]<br>
[[LuaAPI/wesnoth#wesnoth.deprecate_api|wesnoth.deprecate_api]]<br>
+
[[LuaAPI/wesnoth#deprecate_api|deprecate_api]]<br>
[[LuaAPI/wesnoth#wesnoth.type|wesnoth.type]]<br>
+
[[LuaAPI/wesnoth#type|type]]<br>
[[LuaAPI/wesnoth#wesnoth.named_tuple|wesnoth.named_tuple]]<br>
+
[[LuaAPI/wesnoth#named_tuple|named_tuple]]<br>
[[LuaAPI/wesnoth#wesnoth.get_language|wesnoth.get_language]]<br>
+
[[LuaAPI/wesnoth#get_language|get_language]]<br>
[[LuaAPI/wesnoth#wesnoth.print_attributes|wesnoth.print_attributes]]<br>
+
[[LuaAPI/wesnoth#print_attributes|print_attributes]]<br>
[[LuaAPI/wesnoth#wesnoth.persistent_tags|
+
[[LuaAPI/wesnoth#persistent_tags|persistent_tags]]<br>
 +
[[LuaAPI/wesnoth#wml_actions|wml_actions]]<br>
 +
[[LuaAPI/wesnoth#wml_conditionals|wml_conditionals]]<br>
 +
[[LuaAPI/wesnoth#effects|effects]]<br>
 +
[[LuaAPI/wesnoth#micro_ais|micro_ais]]<br>
 +
[[LuaAPI/wesnoth#custom_synced_commands|custom_synced_commands]]<br>
 +
[[LuaAPI/wesnoth#colors|colors]]<br>
 +
[[LuaAPI
 
|}
 
|}

Revision as of 14:45, 19 April 2024

wesnoth

dofile
require
textdomain
log
as_text
simulate_combat
name_generator
compile_formula
eval_formula
version
current_version
ms_since_init
deprecated_message
deprecate_api
type
named_tuple
get_language
print_attributes
persistent_tags
wml_actions
wml_conditionals
effects
micro_ais
custom_synced_commands
colors
current
game_config
races
scenario
terrain_types
unit_types

wesnoth.units

advance
clone
erase
extract
matches
find_attack
to_map
to_recall
transform
select
scroll_to
ability
chance_to_be_hit
defense_on
resistance_against
jamming_on
movement_on
vision_on
add_modification
remove_modifications
create_animator
create
find_on_map
find_on_recall
find
get
get_hovered

wesnoth.schedule

get_time_of_day
get_illumination
replace

wesnoth.sides

is_enemy
matches
set_id
place_fog
remove_fog
is_fogged
place_shroud
override_shroud
remove_shroud
is_shrouded
switch_ai
append_ai
add_ai_component
change_ai_component
delete_ai_component
get
find
iter
create
debug_ai

wesnoth.sync

evaluate_single
evaluate_multiple
run_unsynced
invoke_command

wesnoth.map

find
get
matches
on_board
on_border
iter
read_location
split_terrain_code
make_bitmap
parse_bitmap
terrain_mask
add_label
remove_label
get_label
place_area
remove_area
get_area
set_owner
get_owner
create
generate
generate_height_map
get_direction
get_relative_dir
rotate_right_around_center
get_adjacent_hexes
get_hexes_in_radius
are_hexes_adjacent
distance_between

wesnoth.audio

play
volume
sources
music_list
current
previous
volume
all
add
remove
clear
next
play

wesnoth.paths

find_path
find_vacant_hex
find_reach
find_vision_range
find_cost_map

wesnoth.game_events

add
add_repeating
add_menu
add_wml
remove
fire
fire_by_id
on_event
on_load
on_save
on_mouse_action
on_mouse_button
on_mouse_move

wesnoth.achievements

set
set_sub_achievement
has
has_sub_achievement
get
progress

gui

show_menu
show_narration
get_user_choice
show_popup
show_prompt
show_story
show_dialog
add_widget_definition
widget
show_help
show_inspector
show_lua_console

wml

attribute_count
child_array
child_count
child_range
find_child
get_child
get_nth_child
remove_child
remove_children
tag
clone
equal
valid
matches_filter
load
parse
merge
diff
patch
interpolate
tostring
tovconfig
literal
parsed
shallow_literal
shallow_parsed
all_variables
variables
variables_proxy
get
get_proxy
set
array_variables
eval_conditional
fire
error

location_set

create
of_raw
of_pairs
of_triples
of_map
of_wml_var
of_shroud_data
to_pairs
to_stable_pairs
to_triples
to_map
to_wml_var
to_shroud_data
clone
get
insert
remove
clear
size
empty
iter
stable_iter
filter
union
union_merge
inter
inter_merge
diff
symm
invert
random

functional

filter
filter_map
find
find_map
choose
choose_map
map
map_array
reduce
take_while
zip

stringx

split
escaped_split
quoted_split
anim_split
parenthetical_split
map_split
join
join_map
vformat
format_conjunct_list
format_disjunct_list
trim
parse_range
iter_range
iter_ranges

mathx

clamp
lerp
random
random_choice
round
shuffle

filesystem

read_file
have_file
canonical_path
image_size
have_asset
resolve_asset

ai

read_only
side
aspects
get_attacks
get_targets
suitable_keep
attack
check_attack
move
move_full
check_move
recall
check_recall
recruit
check_recruit
stopunit_attacks
stopunit_moves
stopunit_all
check_stopunit
fallback_human

wml-utils

check_key
vwriter
get_sides
optional_side_filter
handle_event_commands
set_exiting
scoped_var

unit_test

fail
succeed
finish
log
tostring
fire_wml_menu_item
assert
assert_equal
assert_not_equal
assert_approx_equal
assert_greater
assert_greater_equal
assert_less
assert_less_equal
assert_in_range
assert_contains
assert_nothrow
assert_throws
assert_throws_with

wesnoth.interface

delay
deselect_hex
highlight_hex
select_unit
float_label
get_displayed_unit
get_hovered_hex
get_selected_hex
get_viewing_side
lock
is_locked
scroll_to_hex
scroll
zoom
skip_messages
is_skipping_messages
add_chat_message
clear_chat_messages
add_item_image
add_item_halo
remove_item
get_items
add_hex_overlay
remove_hex_overlay
end_turn
allow_end_turn
color_adjust
add_overlay_text
handle_user_interact