Freeciv change name9/21/2023 The edit module was added in 2.4 previously, most of these functions were available with unqualified names (e.g., player_victory()). Request player's client to play certain track. Return the value of a server setting as a string. Send a message to all players who have an embassy with someone sharing research with player, that is to everyone who sees someone gaining a tech when player gains it.Īs with the /save command, if filename is empty, the server chooses an appropriate filename.Īdded in 2.3 as (Player).civilization_score() Send a message to all players who have an embassy with player. Setting it to false can be useful if you want to send different message to one actually getting the tech for the team. selfmsg is a boolean telling if player should be included to the receivers, or excluded. Send all players sharing research with specific player a message with an arbitrary type. Send a specific player or all players ( player nil) a message with an arbitrary type, optionally drawing attention to a particular tile. Send a specific player a message with type E.SCRIPT. Send all players a message with type E.SCRIPT. These correspond to the categories that the client can filter on, and are defined in common/events.c.īasic function for events. This lua module is meant for lua implementations that want to parse contents of that datafile.Įvent is an event type from the E module, for example E.SCRIPT. Ruleset can supply single section file format datafile, with freely selectable content. Return next clockwise direction in current topology.ĭatafile support is added in freeciv-3.1. Return next counterclockwise direction in current topology. Turns a string like "north", "southwest", etc into a Direction object. (unit, opposing_player, effect_type_name) Effect names are the same as in rulesets, e.g., "Upkeep_Free". Warning: An action's id may change after saving and reloading the game.ĭirection by rule name ("Northwest" to "Southeast")Ĭan be used to iterate over all defined signals (until nil is returned).Ĭan be used to iterate over all callbacks currently associated with a given signal.Ĭalculate the current value of a ruleset effect. Intended to be used with create_unit_full.Īction by id. Return an existing unit that can transport unit_type at tile. If player is nil, returns first unit for that role.įrom 2.6.0, role_name can be a unit type flag name, as well as a role name. If player is not nil, role_unit_type returns the best suitable unit this player can build. If player is specified, restricts search to units of that player and returns nil if the unit exists but belongs to someone else. Functions are overloaded so that a given object can be identified in several ways. If the ruleset saves research progress to each specific techįunctions in this module are used to acquire objects for further manipulation, given various kinds of identifying information. Textual representation of current calendar time In freeciv-3.0 and later first turn is turn 1. This gives current turn as if game started from turn 0. This module is used for game related information.ĭeprecated in 3.0. Notify scripting engine that deprecated lua function, or other construct, has been used Log message at appropriate level with printf-like formatting (Lua's string.format). As of Freeciv 3.0 or older log.fatal() or assert() do not abort the game.ĭo not call this function directly but use the functions below for the different log levels. Messages emitted with these functions will be sent to an appropriate place, which will differ depending on the context. This is the preferred way to emit textual output from Freeciv Lua scripts. This Lua constants implementation is included as const. Module functions are accessed as members of the module: Internal may disappear without notice do not use. Text formatting indicates the current status of each definition: For instance, methods to read game state can be used in most contexts, but methods to directly change it can only be used in a script running on the server. Not everything documented here can be used in every context. There are several contexts where scripting is used in Freeciv. Important: Anything documented about unreleased versions can change at any time before the final release.Īn argument with a question mark '?' is allowed to be empty. Every event or action should have information about which versions of Freeciv support it.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |