Liquid War 6


Up: (dir)

Liquid War 6, a unique multiplayer wargame.

Introduction

User's manual

Hacker's guide

Reference

C API

Appendices

Table of Contents


Next: , Up: Top

1 Introduction

Read this chapter to discover Liquid War 6.


Next: , Up: Introduction

1.1 In a nutshell

Liquid War 6 is a unique multiplayer wargame. Your army is a blob of liquid and you have to try and eat your opponents. Rules are very simple yet original, they have been invented by Thomas Colcombet. It is possible to play alone against the computer but the game is really designed to be played with friends, on a single computer, on a LAN, or on Internet.

An older version, Liquid War 5, is available, but is not part of the GNU Project. Only Liquid War 6 is part of the GNU Project, it is a complete rewrite.

The official page of Liquid War 6 is http://www.gnu.org/software/liquidwar6/. For more information, you can read the Wikipedia article about Liquid War.


Next: , Previous: In a nutshell, Up: Introduction

1.2 Project status

1.2.1 What works, and what does not (yet)

As of today, the game is in beta state. It can be installed, and you can toy arround with. You can even play with. It is still far from being complete as some key features are still missing.

What works:

In the near future:

In the long run:

You might be interested in checking the following URLs, which give a view on opened tasks and bugs:

1.2.2 What has changed since Liquid War 5.x?

Liquid War 6 is a complete rewrite of Liquid War 5. The rewrite started in 2005. So a good question is “was the rewrite worth it?”...

Here's a list of key improvements:

The most interesting change is still to come, and concerns network games.

Stay tuned.

1.2.3 Revision history

Liquid War 6 releases are “codenamed” after famous, historical, real or mythical characters. Here is a short revision history. For details, see the ChangeLog and NEWS files distributed with the game. Additionnally, there's an ever-increasing “stamp” number which is incremented each time a build is done with a different source.

1.2.4 Road map

The game will probably be labelled “6.0.0” when network mode is up and running. Until then there will probably be other improvements concerning gameplay and appearance (“eye candy”). There's a balance to keep between the major goals such as “make that network thingy work” and the very real fact that “hacking must be fun”.


Previous: Project status, Up: Introduction

1.3 How you can help

1.3.1 Help GNU

Please remember that development of Liquid War 6 is a volunteer effort, and you can also contribute to its development. For information about contributing to the GNU Project, please read How to help GNU.

1.3.2 Todo list

Here's a short list of todo items. It is probably too early to start hacking the core engine itself, for it is still under heavy development, might undergo major rewrites, and it's hard for documentation to keep up with the reality of the code. However, there are still many things to do.

Feel free to join the mailing-lists, this is clearly the best place to start with.

There's also a list of opened tasks on Savannah at http://savannah.gnu.org/task/?group=liquidwar6 which you can browse online. Maybe there's some task for you!

Alternatively, you can contact Christian Mauduit.


Next: , Previous: Introduction, Up: Top

2 User's manual

The Liquid War 6 user's manual hopefully contains any usefull information to install the program and play the game. If you just want to enjoy Liquid War 6 without diving into map creation and programming, this is just for you.


Next: , Up: User's manual

2.1 Mailing lists

2.1.1 General discussion

The main discussion list is <help-liquidwar6@gnu.org>, and is used to discuss all aspects of Liquid War 6, including installation, development, game strategies, and whatever subject players and hackers might want to talk about, provided it is Liquid War 6 related. If you don't know on which list to subscribe, this is the one.

To subscribe to it, please send an empty mail with a Subject: header line of just "subscribe" to the -request list, that is <help-liquidwar6-request@gnu.org>.

You can also subscribe to the list using the Mailman web interface for help-liquidwar6 and consult help-liquidwar6 archives.

2.1.2 Announcements

Announcements about LiquidWar 6 are made on <info-liquidwar6@gnu.org>. Subscribe to it to be informed of major releases, and other significant news.

To subscribe to it, please send an empty mail with a Subject: header line of just "subscribe" to the -request list, that is <info-liquidwar6-request@gnu.org>.

You can also subscribe to the list using the Mailman web interface for info-liquidwar6 and consult info-liquidwar6 archives.

Please also consider reading the latest news on Savannah.

2.1.3 Bugs

There is also a special list used for reporting bugs, <bug-liquidwar6@gnu.org>. Please try and describe the bug as precisely as possible. The more accurate the description, the more chances it will get to be fixed.

While this is the standard GNU way of reporting bugs, modern SPAM standards make it very hard to filter real bug reports from junk on this list. It is more convenient to use a web interface, the URL is: http://savannah.gnu.org/bugs/?func=additem&group=liquidwar6 and you're really encouraged to use it instead of sending emails.

Please take a look at the bug list before submitting new bugs.


Next: , Previous: Mailing lists, Up: User's manual

2.2 Getting the game

2.2.1 Download source

Liquid War 6 can be found on http://download.savannah.gnu.org/releases/liquidwar6/ and http://www.ufoot.org/download/liquidwar/v6/.

Downloading the latest file from this place, and compile it yourself on your computer with a classical ./configure && make && make install is the recommended way to install Liquid War 6.

2.2.2 Download binaries

Some binary packages might be available. Your mileage may vary.

GNU/Linux based systems are supported, through Debian .deb and Red Hat RPM packages. There is also a Microsoft Windows installer.

However these binaries are not necessarly available for every single version of the game.

2.2.3 GIT repository

Latest work in progress versions can be obtained with GIT. Here's the typicall command which will fetch the latest version:

     git clone git://git.sv.gnu.org/liquidwar6.git

If you are behing a firewall and can't use the native GIT protocol, you can rely on the (slower) http protocol:

     git clone http://git.sv.gnu.org/r/liquidwar6.git

You can browse the code online, consult log summary, and in a general manner “follow” the project on http://git.savannah.gnu.org/gitweb/?p=liquidwar6.git and http://git.savannah.gnu.org/cgit/liquidwar6.git.

2.2.4 Daily snapshots

Alternatively, you can download daily snapshots on http://www.ufoot.org/liquidwar/v6/snapshots/ These files should be built every day, but a make distcheck is done before creating them. So if the source code is, for some reason, broken, then they won't be generated. It is a good source if you want the most up-to-date code which is not completely unstable. This is typically the place to go if you want to know a reported bug is correctly fixed. Please do not rely on snapshots generated on the fly by the source content manager, daily snapshots mentionned above are better since a make dist has been run on them. Using a checkout is really for developpers.


Next: , Previous: Getting the game, Up: User's manual

2.3 Installation

This section covers installation from source. Other ways of installing the program are not described here.

2.3.1 Requirements

All these libraries are mandatory to compile the game. Liquid War 6 won't compile, let alone run, without them. Some of them could probably be replaced by equivalent tools, but this would certainly require a programming effort and some changes in Liquid War 6 source code.

2.3.2 Optional libraries

While all these libraries are theorically optional (the game will successfully compile without them), you'll obviously need, for instance, one graphics backend. Otherwise, you'll simply have no display. This is not acceptable. As of today, one can reasonnably consider all SDL-related libraries are required. The rest is truely optional.

2.3.3 Installing requirements using RPM/DEB packages

You might find it convenient not to install all the requirements from source, but use your favorite GNU/Linux distribution packages.

On an RPM based GNU/Linux system, a typical command (tested with Fedora 15 “Lovelock”) could be:

     yum install \
     make gcc glibc glibc-devel binutils \
     libgomp \
     guile guile-devel gmp gmp-devel libgc1c2 libgc-dev \
     libtool libtool-ltdl libtool-ltdl-devel \
     zlib zlib-devel expat expat-devel \
     libpng libpng-devel libjpeg libjpeg-devel \
     sqlite sqlite-devel \
     ncurses ncurses-devel readline readline-devel \
     libGL libGL-devel libGLU libGLU-devel \
     SDL SDL-devel SDL_image SDL_image-devel \
     SDL_mixer SDL_mixer-devel \
     freetype freetype-devel SDL_ttf SDL_ttf-devel \
     libcurl libcurl-devel \
     perl lcov global valgrind graphviz gv texinfo-tex \
     gtk2-devel rpm-build

On a DEB package based GNU/Linux system this command (tested with Debian 6.0 “squeeze”) would be:

     apt-get install \
     make gcc libc6 libc6-dev binutils \
     libgomp1 \
     guile-1.8 guile-1.8-dev guile-1.8-libs libgmp3c2 libgmp3-dev \
     libtool libltdl7 libltdl-dev \
     zlib1g zlib1g-dev libexpat1 libexpat1-dev \
     libpng12-0 libpng12-dev libjpeg8 libjpeg-dev \
     libsqlite3-0 libsqlite3-dev \
     libncurses5 libncurses5-dev libreadline6 libreadline6-dev \
     libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev \
     libsdl1.2debian libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev \
     libsdl-mixer1.2 libsdl-mixer1.2-dev \
     libfreetype6 libfreetype6-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev \
     libcurl4-gnutls-dev \
     perl lcov global valgrind graphviz gv \
     texinfo texlive-base texlive-generic-extra \
     libgtk2.0-dev debhelper

Note that those requirements really depend on the exact distribution you have, package names may vary from one to another.

2.3.4 Compiling

Liquid War 6 uses GNU Automake, Autoconf and GNU Libtool.

Once all the requirements are installed, run:

     ./configure
     make
     make install

Liquid War 6 supports the standard ./configure --prefix=/my/path option (in fact, it supports much more than that) so you can install the game in any directory. You do not need to be root to install Liquid War 6.


Next: , Previous: Installation, Up: User's manual

2.4 Extra maps

2.4.1 The extra maps package

The main package contains some maps so that you can try out the game. Still, an additionnal package, called extra-maps or liquidwar6-extra-maps is available, containing more maps. It really does contain many of them, including most Liquid War 3 and Liquid War 5 legacy maps, plus new Liquid War 6 maps.

2.4.2 Install extra maps on GNU/Linux and POSIX systems

On GNU/Linux systems (and possibly any POSIX unixish system) running:

     ./configure
     make
     make install

will install the extra maps on your system automatically, they will then be available in the extra/ sub-directory when browsing maps.

The ./configure script has a --enable-liquidwar6 switch which will try and find automatically if there's an existing liquidwar6 binary in the path. If there's such a binary, it will run it and ask for its map-path and use this value automatically.

2.4.3 Raw install of extra maps (all-platforms)

Another solution, which works on all platforms including Microsoft Windows and Mac OS X but also works on GNU/Linux, is to simply unpack the extra-maps package (unzip or untar) in your custom map directory, or in the system map directory. There's nothing else to do to install these maps but simply put them on your hard drive in the right directory.

Typically on an Microsoft Windows system, you would unpack the extra maps in C:\Program Files\Liquid War 6\map\ (system directory) and on a Mac OS X system you would unpack the extra maps in Liquid War 6.app/Contents/Resources/map/ (system directory) or $HOME/Library/Application Support/Liquid War 6/map (user directory). On a GNU/Linux or POSIX system you would unpack them in $HOME/.liquidwar6/map/ (user directory).

Next time you run the game, the maps should be browsable.

If you can't see them, run liquidwar6 --audit and check that the place where you unpacked the files is actually searched by the binary.


Next: , Previous: Extra maps, Up: User's manual

2.5 Troubleshooting

2.5.1 Compilation problems

A quick survival guide:

If none of these help, consider reporting a bug, or search the mailing-lists for help.

2.5.2 Check installation

Here's a check-list to ensure that your installation is correct:

2.5.3 Problems running the game

Now, game looks correctly installed, but you have problems running it.


Next: , Previous: Troubleshooting, Up: User's manual

2.6 Quick start

2.6.1 Quick start

Once the game is installed, run it, click on Quick start with the mouse, and control the red 'a' cursor with the mouse, or keyboard, both work. Try and surround the green team, it's a stupid bot, you should win ;)

You army is formed by all the red pixels on the screen, they should try and rejoin the cursor (the blinking 'a' letter) using the shortest path. When red and green meet, they fight. Try it, toy arround.

The Quick start button will always make you play red against a green stupid bot, whatever other options you have set up.

Todo...


Next: , Previous: Quick start, Up: User's manual

2.7 Strategy tips


Next: , Previous: Strategy tips, Up: User's manual

2.8 User interface

2.8.1 A reduced set of keys

Liquid War 6 can be controlled using a reduced set of keys. This is to make the game more portable and allow possible ports to platforms where a full keyboard is not available. Depending on the graphics backend, exact mapping might change, they should hopefully be obvious and intuitive.

Those keys are:

Basically,

2.8.2 Combining mouse, keyboard and joysticks

It's also possible to control the game with the mouse only, or with a joystick. By default the interface will trap all events and respond on any of these possible devices.

Keyboard Mouse Joystick Menu action In-game


up mouse pointer stick previous menu item move cursor up


down mouse pointer stick next menu item move cursor down


left mouse pointer stick change menu item value move cursor left


right mouse pointer stick change menu item value move cursor right


enter left-click button A validate menu validate chat line


esc right-click button B back to previous menu quit game


ctrl right-click or double-click on any button button C N/A fire


alt middle-click or triple-click on any button button D N/A alternate fire


pgup wheel up button E previous menu item zoom in


pgdown wheel down button F next menu item zoom out

A final word about joystick buttons: there's no such thing as standard joystick buttons, some will come with A,B,C,D, others will have A,B,start,select,L,R, there's no way to know. By default, the game will use the buttons with the lowest indexes (returned by your driver) for the most usefull functions. Validate menu entries is the most usefull action, zooming in and out the one you can live without.

2.8.3 Quit with F10

There's also an (almost) hardcoded shortcut which will quit the game immediately, or at least as quickly as possible, without any prompt or warning.

It is the F10 key.

Think of this feature as the procastinator's “whoops, here comes my boss!!!” emergency function.


Next: , Previous: User interface, Up: User's manual

2.9 Solo game

2.9.1 Current state

As of today, Liquid War 6 is essentially a solo game since network is not working. It allows you to toy arround in arcade mode on any map you wish.

A real solo mode with campaign and goals to reach is planned, how it will be implemented is yet to be defined.

2.9.2 Team profiles

By default, teams behave differently, some of them move more rapidly, some are more aggressive but vulnerable, some are more defensive but do not attack as strong as others. This aspect of the game is under active tuning, things might be unfair by now, you can toy arround with the various team-profile-... options, any report is appreciated.

Note that this is very different from Liquid War 5, and can give very different gaming experiences, you can artificially set up arbitrary strong bots, for instance.

Here's a description of the default color settings:

2.9.3 Weapons

Additionnally, when profiles are used, each team has two weapons, a primary weapon and an alternate one. Think of weapons as special (usually nasty) tricks you can play on your opponents.

Here's a description of available weapons:

Note that this is in progress, some of them are NOT IMPLEMENTED YET.


Next: , Previous: Solo game, Up: User's manual

2.10 Network games

2.10.1 Choose your “public url”

Liquid War 6 needs to name your “node” (you can think as your server instance of the game) and have a unique URL (address) to publish and give to other nodes.

If only one network adapter is attached to your computer and your address IP is A.B.C.D then by default the game will pick automatically the address http://A.B.C.D:8056/ and it should work flawlessly.

Problems can arise if you have a peculiar network configuration, if you have multiple non-loopback network interfaces, if you use NAT to protect yourself from intruders and/or if your context forces you to do so. In that case, Liquid War won't be able to guess a correct URL automatically. So you need to set it up manually either by editing the public-url entry in the config file, changing environment variable LW6_PUBLIC_URL or passing the --public-url=http://<host>:<port>/ argument when running the game. Typically, if you are behind a firewall which does NAT, use the firewall address. The right address is the address which, given to remote hosts, will allow them to connect on your game instance.

2.10.2 Starting a node

A node is started automatically when you run the game. Even if you don't start to play, node starts in the background and exchanges data with other nodes, mostly to discover them and maintain its internal map of existing nodes and games.

So even without starting a network game, you should be able to point a web browser on your node and see a web page describing it. Your node address is displayed on stdout (console) when starting the game. If in doubt, try http://localhost:8056/ which should work unless you modified defaults settings.

When you start a network game, the program simply changes your node state from “idle” to “accepting connections”.

2.10.3 Connecting to a node

The interface should show you the list of available nodes, just pick one and try and connect to it.

Note that once you're connected on a remote node, you're still acting as an independant node, and other nodes might connect to your node as well as to the other nodes. In short, there's no real server or client, everyone is a client for someone, and can act as a server.

Nodes connected together form a “community”, which can disband, accept new nodes, and in a general manner has its own immaterial life, the first node which created the game might disappear, game can continue without it.

This is why the main network module is called libp2p, this is a reference to the term “peer to peer”.

2.10.4 Communities

Once a node is connected to another one, they've started a “community”. Formally, a stand-alone node accepting for connection is already a community, even if it has only one member, but the only really interesting communities are those formed with several nodes.

A community can't be reached through a given server, to connect to one you just need to connect on one of its member nodes. All nodes are equivalent, there's no master, no root node, nodes collaborate to share the same real-time information and maintaine an up-to-date game state.

Of course, conflicts can arise, and in that case nodes need to agree on an acceptable solution. Normally, the program takes decisions automatically (for instance, it could decide to “kick” a node out of the community) so the player does not have to care about this, but this is expected to be one of the most tricky (and passionating) part of Liquid War 6 hacking.

2.10.5 Firewall settings

By default, Liquid War 6 will communicate on port 8056, in both TCP and UDP, and in both ways too (in/out). It's possible to play with partial connectivity, in extreme case, you can even play without direct internet access, using only a mere web proxy.

However, things will go faster and be much easier if the program can use its default native protocol.

Here's an example of a typicall iptables configuration which allows you to play the game full-featured. It's assumed that by default all packets are dropped, this configuration will just open the necessary ports.

     # outgoing TCP on port 8056 (liquidwar6)
     iptables -A OUTPUT -p tcp --dport 8056 -m state --state NEW,ESTABLISHED -j ACCEPT
     iptables -A INPUT -p tcp --sport 8056 -m state --state ESTABLISHED -j ACCEPT
     # incoming TCP on port 8056 (liquidwar6)
     iptables -A INPUT -p tcp --dport 8056 -m state --state NEW,ESTABLISHED -j ACCEPT
     iptables -A OUTPUT -p tcp --sport 8056 -m state --state ESTABLISHED -j ACCEPT
     # outgoing UDP on port 8056 (liquidwar6)
     iptables -A OUTPUT -p udp --dport 8056 --sport 1024:65535 -j ACCEPT
     iptables -A INPUT -p udp --sport 8056 --dport 1024:65535 -j ACCEPT
     # incoming UDP on port 8056 (liquidwar6)
     iptables -A INPUT -p udp --dport 8056 --sport 1024:65535 -j ACCEPT
     iptables -A OUTPUT -p udp --sport 8056 --dport 1024:65535 -j ACCEPT

If you can't change firewall settings and only have access to the web through a web proxy, it can still be possible to play (with some restrictions such as your node not being seen by others) if mod-http is available. This in turn depends on wether libcurl support was activated when compiling the game. To use the proxy, you can set the http_proxy environment variable. For detailed informations, please refer to libcurl doccumentation.

2.10.6 Is the game secure?

As stated in the license, the program comes with NO WARRANTY. Period.

However, an important effort has been made so that it can reasonnably be used online, exposed to various “common” attacks.

As far as security is concerned, there are two different issues:

Here's a list of various steps which have been taken to make the program more secure:

This being said, Liquid War 6 does not use any strong encryption library to protect the data it sends. All the checksum machinery might be vulnerable to a brute-force and/or strong cryptographic attack, so in theory it's possible to fool the program.

In practise, if you want real privacy, play over a VPN (Virtual Private Network).


Next: , Previous: Network games, Up: User's manual

2.11 Graphics

2.11.1 Standard, high and low resolution

Liquid War 6 will try and pick up a default resolution when the game is launched the first time. It won't use your maximum screen resolution but will instead list all available fullscreen modes, and pick up one which is usually something like two thirds of the highest mode. This is to allow switching back and forth between fullscreen and windowed mode using the same settings. This automatically picked-up resolution really depends on your hardware and driver. It is called “standard” in the graphics options menu.

Then it is possible to automatically select the minimum and maximum resolution your hardware allows in fullscreen mode. These are called “low” and “high” in the graphics options menu. Just click on the button that display the resolution, it will change and use the next setting. In windowed mode, the game won't accept the highest available mode but will instead use a percentage of it, defined by the --windowed-mode-limit parameter.

You might still be in a case where this is not enough. For instance your maximum resolution is 1600x1200, Liquid War 6 picks a default mode of 1280x960 for you but for some reason you want to play in 800x600, fullscreen. In this case, simply switch to windowed mode, resize the window with the mouse (the resolution button will show you the current resolution) and just choose a resolution near 800x600. It does not even need to be exactly 800x600, 798x603 would probably fit. Then when switching back to fullscreen, you'll be in 800x600, the game will automatically pick up the fullscreen mode which is closest to the current windowed mode resolution.

2.11.2 Display rate

By default the game will try and run at 60 frames per second. Given the nature of Liquid War 6, this is probably enough. Higher values will maybe give a slightly smoother display, but barely noticeable.

You can activate the display of frames per seconds (aka “fps”) through the menu (“options -> system”) or with the command line (“–display-fps”).

On a single processor system, reducing the number of frames per second might allow the rest of the game run faster. So if you notice the game is really slow, in terms of “fighters move slowly” then you might be happy reducing the display rate and therefore giving power back to the other parts of the program. On a dual-core (or more) or on a multi-processor system, this is probably useless since the game is threaded and has a dedicated thread for display purposes. The command line option to reduce the number of frames per second is --target-fps.

Additionnally, the parameter --gfx-cpu-usage allows you to force the display thread to “take a rest” and go idle for some time. This is advanced settings, most users won't touch this.


Next: , Previous: Graphics, Up: User's manual

2.12 Sound & music

2.12.1 Current status

As of today, the game is capable of playing Ogg Vorbis audio files. That's it.

2.12.2 The future

In the long run, what is planned is to support Csound which would allow very cool effects, such as dynamically changing the music while the game is running, typically following the action. If there's a lot of fight, the music could reflect this.

For now this is only vaporware, just a nice idea among others, nothing implmented yet.


Next: , Previous: Sound & music, Up: User's manual

2.13 Config file

The config file is a simple XML file. It uses XML only to benefit standard parsing tools, but it's not a structured XML file, in the sense that the tree is so simple that all items are at the same level. It is just a simple key-value binding.

This file is in $HOME/.liquidwar6/config.xml on GNU/Linux and POSIX systems, in C:\Documents and Settings\<username>\Liquid War 6\config.xml on Microsoft Windows and in /Users/<username>/Library/Application Support/Liquid War 6/config.xml on Mac OS X.

You're free to edit it manually, but all parameters are changeable with command line options. The program will overwrite this file each time it exits, so if you put comments in it, they will disappear. The advantage of this is that if you mispell something, or if for some reason the game does not understand a value, then when rewriting the file, it will show you it just did not get it.

The file embeds the documentation for all its entries, it is therefore rather verbose. The documentation is the same you will find online or by quering the game with the --about option, also the same you would get reading this manual.


Next: , Previous: Config file, Up: User's manual

2.14 Logs

Liquid War 6 uses stdout to output important messages, and stderr to log warnings and errors. It will also use syslog if available.

Additionnally, a verbose log is available in $HOME/.liquidwar6/log.csv on GNU/Linux and POSIX systems, in C:\Documents and Settings\<username>\Liquid War 6\log.csv on Microsoft Windows and in /Users/<username>/Library/Application Support/Liquid War 6/log.csv on Mac OS X.

You can read this using any spreadsheet software capable of reading csv file. It uses the tab (\t) character as a separator. It contains valuable informations including version and most default values for the game, and for each line logged, it says where in the code the log function was called. A must-have for debugging.


Previous: Logs, Up: User's manual

2.15 Report bugs

There are two ways to report bugs:

The latter (Savannah) is much preferred, because the mailing-list is bloated with spam... It also offers a list of bugs which you should read before submitting a new one.


Next: , Previous: User's manual, Up: Top

3 Hacker's guide

This hacker's guide is for anyone who is curious about the game, and wants to know how it works. It covers many aspects from simple map creation to technical program internals. A great effort has been done in Liquid War 6 so that it should be much more hackable than previous versions. Any feedback is welcome.


Next: , Up: Hacker's guide

3.1 Designing levels

3.1.1 Why is level design so important?

As of Liquid War 5, most levels have been contributed by players. While the maintainer of Liquid War 6 has technical knowledge to develop the game, artistic talent and taste might not be his domain of excellence 8-)

Therefore contribution are truely welcomed when they take the form of a new, original, fun and good looking level. It's believed the levels often make the game much more than its engine. This is true for any type of game, and Liquid War is no exception.

So this section is here to help players understand how to hack existing levels, and create new ones, in the hope that 1) they can enjoy their own creations and 2) possibly share their work with others.

Note that this manual might refer to levels and maps: they are just two different names to describe the very same thing. It's an alias.

3.1.2 Format overview

Liquid War 6 stores level information in a plain directory.

There is no such thing as an opaque .dat binary file. The name of the level is the name of the directory itself, and its elements are the files contained in it.

Files must follow a precise naming scheme. For instance Liquid War 6 expects a map.png file to be present in each map directory.

All image files in a level use the Portable Network Graphics or JPEG format. It is possible that in the long term, Liquid War 6 will be able to handle levels as .tar.gz or .zip files. In that case these files will only be a compressed image of the actual level directory.

See the ./map/ directory of the source Liquid War 6 distribution to see example of maps.

3.1.3 Resolution (map size)

Liquid War 6 does enforce a limit on map size. This is not to frustrate map designers and/or players, simply, it would be a lie to pretend the game can handle arbitrary big maps.

They might look great on your computer but will become unplayable soon on an older machine. And most of the time they don't look that great, carefully crafted 1280×720 just looks awesome and can represent a great level complexity.

Here are the technical limits:

Type Max width Max height Max surface


Texture 3 000 2 000 6 000 000


Logical map 1 500 1 000 1 000 000

The texture can be somewhat bigger than the logical map, this allows for pretty levels while limiting the horsepower needed to move the fighters and animate everything. Note that you could technically feed the game with a map.png that is bigger than the logical map limit, only it will be downscaled when being loaded.

The texture limits are generous enough to accept a full-HD 1920x1080 image, or a 4/3 1600x1200 image, while the “one million pixels” logical map limit is enough to store a 16/9 1280x720 map or a 4/3 1024x768.

Keep in mind that the logical map (map.png) will probably be scaled whatsoever, even if it's within the absolute limits (the game adapts the resolution to your computer speed) and your texture will rarely appear in its native resolution, will probably be distorted, and so on.

3.1.4 Metadata

Older versions of Liquid War 6 used to load a plain README file and use this as metadata. Title was take from map directory name. This is still supported, but it now also supports the addition of a metadata.xml file in which you can describe your map.

The following files can be defined:

3.1.5 map.png

This is the only required file in a level.

In fact, the existence of map.png makes a directory a level. When checking wether a directory is a correct level, Liquid War 6 simply tests the existence and validity of map.png.

This image is a simple black & white area, where white zones are the background, the sea, the places where fighters can move, and black zones are the foreground, the walls, the places where fighters can't go.

This informations can be stored in a 2-color indexed file, or in a grayscaled or even truecolor RGB file, but color information won't be used. Internally, Liquid War 6 will read the color of every point. If it is over 127 on a 0 to 255 scale, it will be considered as background, if it is below 127, it will be considered as foreground.

3.1.6 layer2.png ... layer7.png

Liquid War 6 can handle mutiple layer maps. Think of a pile of maps, one being on top of the other. This allows you to create a volume, the game considers every layer has two axis x and y, and the z axis is to travel through layers. First layer corresponds to z=0, second layer to z=1, and so on.

Here are the files you can use to define layers:

A layerX.png file should be designed exactly like map.png. In fact, map.png could simply have been called layer1.png.

Up to 6 extra layers can be defined (from layer2.png to layer7.png). This is a hardcoded limit. It allows you to define 7 different layers, including the top map.png layer. Keep in mind this layer system is not real 3D, it's more a “2D and a half” model. Adding layers can considerably slow down the game, so it's wise to try and use as few layers as possible. Technically, 3 layers will allow you to build bridges and tunnels, which is probably the most usefull construction using layers. Fighters can also have difficulties navigating through layers so piling up layers in narrow “vertical” z-axis based tunnels is probably not a great idea.

The ufoot/concept/pass map of the liquidwar6-extra-maps demonstrates basic layer usage.

3.1.7 texture.png, texture.jpeg and texture-alpha.jpeg

It is possible to define a texture for the map by putting a texture.png or texture.jpeg file. It does not need to have the same dimensions as the map itself. Indeed, textures can be much more precise than the actual logical map.

There's no theorical limit on how big a texture can be, more precisely, it can be much bigger than any hardware/driver maximum texture size. In practice, a too big texture will waste your video card RAM, and slow everything down. Sizes ranging from 640x480 to 1600x1200 are reasonable texture sizes.

If you don't define this, the map.png file will be used as the texture, and also import colors from style.xml if defined.

Note that the shape of the texture defines the shape of the map, that is, the ratio with which it will appear on the screen.

The PNG alpha layer will be used for transparency. But to save disk space, it can be convienient to prefer the JPEG format, use texture.jpeg instead of texture.png and store the alpha layer in a separated file, called texture-alpha.jpeg. This avoids handling heavy PNG files, PNG compression not being performant on most textures.

In texture-alpha.jpeg, black is considered opaque, and white is transparent. Different levels of gray correspond to different levels of opacity. Previous versions of the game used the other way of doing things (black is transparent) because this is technically, the most obvious way to do things. Black is 0 and transparent is 0. But for a human “reader” of the map this does not make sense. One generally expects white to be the equivalent of “undrawn” or “blank”, well, if it's undecided, void, transparent, whatever, it's white. When the Gimp flattens an image, it becomes white, not black.

So white is transparent. Period.

3.1.8 glue.png and boost.png

If there's a glue.png or boost.png file in the map directory (you can use one of them or both) then they will be interpreted as follow:

There can be, at the same place, some gray or black in both boost.png and glue.png. How this will behave exactly is not really clear at this stage, the recommendation is not to do this (it does not really make sense anyway) but if you do it, game won't complain.

It's also wise not to abuse of boost.png for obviously, a map filled with “boosted” zones at a X10 pace will require much more CPU than the same map with no such setting. This might fool the automatic resampling algorithm and lead to maps that are unplayable. The spirit of boost.png is just to make a few spots go faster.

It's also important to note that behaving faster or slower means moving faster or slower but also attacking faster or slower, and, in a general manner doing any action with a different pace.

3.1.9 danger.png and medicine.png

If there's a danger.png or medicine.png file in the map directory (you can use one of them or both) then they will be interpreted as follow:

There can be, at the same place, some gray or black in both medicine.png and danger.png. How this will behave exactly is not really clear at this stage, the recommendation is not to do this (it does not really make sense anyway) but if you do it, game won't complain.

3.1.10 one-way-<direction>.png

The four files:

can be used to force the fighters to go in one given direction, on some parts of the map. If an area is black on one of this meta-layers, then fighters will go in the given direction. For instance, a black zone in one-way-north will make fighters go to the north (AKA “up” direction) regardless of the cursor position. The fact that this is a one-way path is understood by fighters and they will take this in account when choosing the shortest path to go somewhere. You can combine vertical and horizontal one-way informations, making diagonal one-way paths.

3.1.11 cursor.png and cursor-color.png

By default, a simple cursor will be displayed, but you can use a custom per-map cursor. Cursors are defined by two 64x64 bitmaps:

You can define only one of those bitmaps, if doing so, then the other layer will be empty, and won't be filled with the default cursor data. Note that additionnally, a little letter (single character) will be displayed using the team color, so that's yet another way to identify which teams the cursor belongs too. The PNG files really need to be PNG (JPEG won't work) and need to be 64x64, any other size will be ignored.

3.1.12 rules.xml

Whereas style.xml is only about the appearance of the map, rules.xml allows the map designer to change pretty much any parameter.

Ultimately, the player can still ignore these settings and overide them with its own values, but the idea is: most game options are only pertinent in a given context. For instance, on some maps it's interesting to move slowly, on some other it's interesting to move fast. Some maps might be playable packed with fighters everywhere, some other might be much more fun with almost nobody on them.

The approach in Liquid War 5 was to make the options available, but let the player himself find the right settings for the right map. The consequence is that no one ever used all those cryptic options in the advanced options menu, and probably 99% of the players ended up playing with default settings. This is not that bad, but given the fact that changing a few parameters one can totally transform the gameplay, it has decided been that in Liquid War 6, the map designer suggests the right options that matches his map.

This does not prevent the player from toying with options himself, he can still do it.

There's also one important point to note: all these options are technically implemented as integer parameters. We certainly do not want any float here, since, and it is a Liquid War specific behavior, the game must be 100,00% predictable and behave the same on every platform. As there is nothing like exactness when speaking of floats, those are forbidden here. As for strings, we are dealing here with low-level internals, and this section is not about telling a story. They are technical options only. Booleans are implemented with the usual false = 0 and true = 1 convention. Note that other config files in Liquid War 6 might rely on floats, strings, and booleans with conventionnal true and false values, but not this one. rules.xml is special.

This rules.xml file is a direct image of the internal “rules” structure, so it contains technical, sometimes not very user-friendly parameters. While hacking rules.xml directly is a good way to test things, most of the time, the other file hints.xml contains more high-level informations that do the job the right way. A typicall example is speed.

See rules.xml reference.

3.1.13 hints.xml

This parameter is only used by the map loader. The map itself contains none of these parameters, they are only clues (hints, in fact..) on “how to load the map” which are passed to the loader.

Let's take an example : speed. This rules.xml file has a (rather) easy to use “speed” parameter, which will do all the job of finding the right resolution for your map, the right “rounds-per-sec” and “moves-per-round” parameters, in short, it will set many other parameters to fit your needs.

As far as the map designer is concerned, rules.xml and hints.xml could have been merged (but so would have style.xml) but internally they are very different: rules.xml contains the real parameters, the one used by the algorithm whereas hints.xml contains only instructions which are used once when loading the map and then disappear. The core algorithm has no idea of what was in hints.xml, once it's loaded.

See hints.xml reference.

3.1.14 style.xml

This is a simple XML file defining various appearance parameters. It has absolutely no effect on gameplay. These settings can ultimately be overriden by the player, but the idea is that if the map designer thinks this level looks better with this or that option, let him say it in this file.

See style.xml reference.

3.1.15 teams.xml

In this file one can specify per-map team settings. In short, this is where you can say how many bots you want, which color, and so on. This can be on a per-map basis, so that each map has different customized settings, some maps might be fun with only one bot, some other maps might be fun packed with 8 opponents.

Technically, teams.xml will allow you to define up to 4 players and 9 bots. This is an awfull lot considering there are only 10 colors. Basically, it's OK to simply define:

It might also be a clever idea to just set up player2 and bot1 being the same color, in case of a conflict the game will pick up another color, but in practice those two entries often correspond to “the second player, bot or human, coming on the battlefield”.

All in all, this represents 5 entries to set up (main player, other player or first bot which can be the same, then 3 more bots), it's OK to have the rest undefined or set to defaults.

Note that this can also simply be unset, and in that case the game defaults will apply, and the user will be able to change them, whereas if you set these up, the player will somewhat force to used the map settings.

See teams.xml reference.

3.1.16 Resampling

This is a very important point. Liquid War almost *always* resamples maps, unless you ask it not to do it. This is not recommended, it is believed in the general case, letting the internal algorithm make its own decisions is better than trying to figure out oneself “which is the best resolution”.

The reason is, the right resolution (we're talking here of the logical resolution, how many fighters wide is the battlefield) often depends on the speed and general ressources the of the computer the program is running on. The map designer does not have this information. The program does. It runs a bench at startup. So this way it can choose, at runtime, the resolution which fits best.

The recommended way of doing things is not to try to be too picky about rules.xml parameters related to speed and also let the default map size limits in hints.xml to their defaults. Do not use them unless debugging stuff. Then the program will resample the map so that the player can play on it at a reasonnable speed. If map is too big, and it's often the case, then it will downsize it until there are sufficiently few fighters so that the CPU can handle the job. This, of course, is not rocket science. The bench calculation is a somewhat brute-force approach of doing things. Formally, we would have to run the map for good to figure out what is the right speed. Still, this bench gives good approximations.

Previous versions of the game relied heavily on 'fighter-scale' to resample maps, but this is not the case anymore. The 'fighter-scale' is now a minor parameter which is used to upsize maps if they are too small. In 99.9% of the cases, the map is first upsized by 'fighter-scale' for this parameter is by default set low (1.0) then downsized by 'bench-value' for real-life personnal computers can't handle 1600x1200 maps in real-time. Not yet.

There are a bazillion options to control map size, including 'min-map-surface'. They are here because it's important that, ultimately, people can do whatever they want with the game. But for map design, this is another story. Don't use them. Rely on 'bench-value' and just care about game speed. This is achieved by changing the “speed” parameter.

3.1.17 Music

It is possible to store your own custom music file within the map directory. You can call it whatever you want (you can keep its original name, which is something music authors usually appreciate, even if there's no strong “attribution” clause on the license, it can be considered fair use not to fiddle to much with the name) you just have to place it in the same directory than the other files like map.png or texture.jpeg.

The following formats are known to work with the default SDL_mixer based mod_ogg backend:

To be more precise, here's how things work:

3.1.18 Experience (“exp”)

In rules.xml you can set a special parameter which is exp and allows you to tell “a player can't load this map if he doesn't have at least N at his/her exp rating”. Gaining exp (stands for “experience”) isn't hard, you just need to win a level with exp=N to gain exp=N+1.

By default, the player's exp is 0 and levels default to 1, so this means only levels with exp set explicitely to 0 in rules.xml might be used. Then player wins that level and is given access to all maps by default, unless these are explicitely set with exp greater than 1.

In solo game, when a player wins a level, he's automatically redirected to the map which is in the same directory and has exactly the exp he just gain. For instance, if you win a map with exp=5 then you're chained to the first map (in alphabetical order) which has exp=6. By setting up the exp parameter the right way, with a map for each exp level one can transform a simple map directory in a scenario that player will automatically follow.

Last, but not least, the game, at startup, only allows you to play red, green, blue and yellow. Other colors are unlocked as you progress among levels. Same things with weapons, there are “liberated” continuously through the game.

This mechanics allows the following behavior:

As a final word, yes, it's possible to cheat, fool the exp system, but it's believed this is moot and lame.


Next: , Previous: Designing levels, Up: Hacker's guide

3.2 Translating

3.2.1 Using gettext

Liquid War 6 uses GNU gettext for all its messages. There's an online manual about this tool. In practice, what you have to do as a translator is to edit the po/xx.po file with xx being your language / country code. For instance, to translate the game in French, one needs to edit po/fr.po.

3.2.2 Formatted strings

This is very important, you might already be aware of it if you are familiar with gettext, but still it's worth mentionning : when a string contains special characters such as %d or %s (in a general manner, anything with a % it's important that all translations contain exactly the same number of %ds and %ss than the original.

For instance:

     "foo has %d bars (%s)"

can be translated to:

     "ziblug zdonc %d zuc - %s - tac"

The number, order and type of % entries is preserved. To learn more about these formats, use info printf or man 3 printf. In a general manner, get informations about printf.

Additionnally, some strings are used by Scheme (Guile) code and not by C code. Thus, they don't use the standard C/printf convention. In these strings, what you must preserve and be aware of is the tilde character ~. Very often you'll see ~a in a string. As with the printf %, you must preserve the number, order and type of those. There is a complete online reference about this way of formatting strings.

3.2.3 Partial translation

Liquid War 6 has thousands and thousands of messages which could theorically be translated. In practise it's counter-productive to spend time to translate those, as the game is still evolving constantly, and as most of these messages are technical messages which inform about rare bugs and strange conditions. All sort of informations which, while valuable, are not intented for end-users and are more destinated to be reported in bug reports. To select only the interesting messages to translate, the current gettext configuration only uses a reduced set of files.

As a side note, the file src/lib/hlp/hlp-reference.c contains all the entries for the various configuration options, anything that can be queried by liquidwar6 --about=<keyword>. This is several hundred messages. It might be interesting to translate them some day, but it's obviously not a priority today.


Next: , Previous: Translating, Up: Hacker's guide

3.3 Architecture

3.3.1 C + Guile

Technically, Liquid War 6 is a collection of C functions which are exported to Guile. The main binary embeds a Guile interpreter, which will run a Guile script. This script calls the exported C functions, and glues them together.

It should be possible to implement the game without using Guile at all, using C code to make the various modules communicate together. This might seem an easier way to go, not involving several languages. However, using this script level is a good way to achieve several important goals:

Having Guile to implement high-level stuff also decreases, to some extent, the need for object-oriented features of C++. The big picture is : low level code that require speed, optimized data processing, is written in C. Code which is more high level and requires abstraction is written in scheme.

3.3.2 Threading and SMP

Liquid War 6 makes a heavy usage of threads. Early versions of the game did not have this feature but starting with 0.0.7beta, one can really consider the game is heavily threaded.

There's basically:

So globally, if you have an SMP system, the game will be happy with it. It will also run on a single processor, as the program uses POSIX pthreads it's capable to run on any computer which has pthreads implemented for it.

But, and this is a strong limitation, without pthreads, the game won't run. At all. Or at least, not unless it's almost completely rewritten.

3.3.3 Internal libraries

The C code is splitted into several internal libraries. This allow independant testing of various game modules.

The main module, the most important one, is libker, (stands for “kernel”). This is were the core algorithm is. To some extent, the rest of the code is just about how to provide this module with the right data and environment. Logically, if you profle the game, you should find out that a great part of the CPU time is spent here. Code here is about spreading gradients, moving fighters and cursors.

The libmap module is here to handle maps, it contains the code to manipulate maps in memory. But it does not know how to load them from disk. This is the responsability of another module, libldr, which is linked against libraries such as libpng or libjpeg and does the job of transforming those standard formats into a usable in-memory structure. There's still a third moduled involved in map handling, it's libtsk, whose job is to load a level in the background. It has a 2-steps asynchronous loading system which allows the game to load maps while the user interface is still responsive, and give a preview of the map as soon as possible, when loading continues in the background, building optimizing structures which are usefull when playing but not mandatory just to show the map.

At the other end of the algorithm-chain, the libpil module will “pilot” things. It's this module which will translate text readable orders (typically adapted for network usage) into function calls. It has event lists, keeps them in the right order, and will also permanently maintain three different states of the game. A backup state which can be used any time to go back in time and get the game in a stable 100% sure state. A reference state which is correct but ever changing. Basically backup plus all the orders received between backup and reference gives reference. And finally a draft state which is as up to date as possible but might be wrong. This is typically interesting in network game, where we want to show something moving, something fast, even if there's lag on the network and other computers fail to send information in time. In this case we display draft while still keeping reference and updating it when we finally receive valid informations. Backup would be used to send bootstrap information when people are joining a new game, or to check up if things are going right.

A special libbot module is here to handle bot algorithms. A bot is just a simple move function which takes a game state as an input, and returns an x,y position, just the way a mouse handler would. How complex a bot is “under the hood” depends on the type of bot. Current bots are really basic. Additionnally, libsim will run dummy fight simulations to find out wether some team has a real advantage on another one, speaking of team profiles depending on colors.

The libgfx module handles all the graphics stuff. It is itself splitted in several sub-modules, that is, it does not do anything but load a module such as mod-gl which will actually contain the implementation. In an object-oriented language, it would be an abstract class, an inteface. The implementation does not need to be thread-safe. It's better if it is, for theorically it could be possible to fire Liquid War 6 with two display backends running at the same time on the same game instance, but this code has yet to be written, and it's a rare dual headed configuration which probably has no real-life usage. If only one graphics backend is activated at a time, the rest of the implementation garantees there will never be two concurrent calls to a function is this module. It is the libdsp (“display”) which handles this. It fires a thread for rendering purposes, and sends information to this thread, detecting automatically if it's necessary to acquire a mutex and update rendering informations. For the caller, this is transparent, one just has to call an update function from time to time. The module will even perform “dirty-reads” on a game state being calculated, to render things in real time, as soon as possible.

An experimental libvox module is under design/development and might, in the future, provide a real-time voxel renderer. Still pre-alpha stage.

To ease up the implementation of different graphics backends, a libgui module contains code which is meant to be used by any graphics backend. It's just a factorisation module, containing common code and interfaces, related to displaying things. This is where, for instance, one can find a high level menu object.

The libsnd module handles sound. It's also an abstract class, an interface, which uses dynamic backends as implementations.

The libnet module is a wrapper over different network APIs, it handles Winsock and POSIX sockets in a uniform manner. The libcli and libsrv contain network client and server code, implementing the various protocols in dynamically loadable sub-modules. It's the role of libp2p to glue this together, handle the list of available servers, the message queue, verifying nobody is cheating, and so on. All this modules share information about current game state using code & structures defined in libnod,use message utilities (format, parse) defined in libmsg and share code concerning connections in libcnx. Additionnally, libdat provides facilities to store old network messages and sort them.

The libsys module contains most system and convenience functions, it handles logs, type conversions, timer, memory allocation, it's the fundamental module every other module depends on. It has a compation libglb module with all the Gnulib shared code.

The libhlp is used to handle keywords and internal self-documentation (this is what is used by --list and --about), libcfg knows how to read and save config files, libcns handles the console, and libdyn can load .so shared files dynamically.

To glue all this, there are some Guile bindings with helper functions available in libscm which fills two needs, one being an easy way to check if Guile linking is working correctly without requiring all other modules to be available, and also performing automatic checks on some actions such as registering or executing a function.

Finally there are small modules like libimg (to make screenshots of the game) which have been separated because they required special libraries to link with and/or did not really fit in existing modules for dependencies reasons.

So well, this is a lot of modules. The list might move a bit, but the big picture is here. Each module is testable separately.

Below is a Graphviz diagram, which shows the modules dependencies.

Diagram showing modules and libraries dependencies

3.4 Memory structures

The most important memory structures in Liquid War 6 are:

All these structures are defined in the ker/ker.h header.

3.5 100% predictable algorithm

The core Liquid War 6 algorithm is 100% predictable, that is to say, given the same input, it will produce the same results, on any computer. Previous versions of the game also had this property. This is very important for network games, since in a network only informations such as “cursor A is at position x,y” are transmitted. Every node maintains its own internal game state, so it's very important that every node comes with the same output given the same input.

For this reason Liquid War 6 never uses floating point numbers for its core algorithm, it uses fixed point numbers instead. It also never relies on a real “random” function but fakes random behavior by using predictable pseudo-random sources, implementation independant, such as checksums, or modulos.

There are also some optimizations which are not possible because of the predictability requirement, for instance one can not spread a gradient and move the fighters in concurrent threads, or move fighters from different teams in different threads.

If you read the code, you'll find lots of checksums here and there, a global checksum not being enough for you never know where the problem happened. The test suite uses those facilities to garantee that the game will run the same on any platform.

Not being able to rely on a predictable algorithm would require to send whole game states on the network, and this is certainly way too much data to transmit. A moderate 200x200 map has a memory footprint of possibly several megabytes, so serializing this and sending it to multiple computers at a fast-paced rate is very hard, if possible at all, even with a high bandwidth. We're talking about Internet play here.


Next: , Previous: Architecture, Up: Hacker's guide

3.6 About mod-gl

3.6.1 The main renderer

Liquid War 6 has a modular architecture which allows the programmer (and the player) to plug pretty much any rendering/graphics backend, provided this one is... developped.

As of 2009 the only available backend is still mod-gl, it will display the game using 3D acceleration, if available, through the SDL library, using its GL bindings.

Additionnally, versions available for Microsoft Windows and Mac OS X will probably never any other backends available. For technical reasons, those platforms do not have the flexibility of GNU/Linux and do not allow graphical libraries to be loaded dynamically. In practice, both of them require hacks that override the standard main function. Microsoft Windows has its WinMain instead, and Mac OS X is even more pedantic, requiring graphical functions to be executed in the main thread. So mod-gl is just linked statically in those versions, and the modularity of the game is purely theorical on these platforms.

This mod-gl module is really one of the key stones of Liquid War 6, and if you want to change graphical things, it's definitely the place to hack on. The source is in src/lib/gfx/mod-gl.

3.6.2 Hardware requirements

The mod-gl backend requires “moderate” hardware, but it still does require hardware acceleration. Pure software rendering through mesa for instance, won't be enough.

So if you're running Xorg on GNU/Linux and there's a DRI driver for your card, the game should run fine.

On the programmer side, the counterpart is that one should not rely on fancy OpenGL features. Textures have a maximum size of 512x512 for instance. Of course some maps are bigger than this but this means that internally, mod-gl splits them into smaller tiles, and displays those tiles one by one.

3.6.3 The gl-utils toolbox

Inside the mod-gl backend, the src/lib/gfx/mod-gl/gl-utils directory contains lots of common structures, factorized functions which can (and should, if appliable) be used.


Next: , Previous: About mod-gl, Up: Hacker's guide

3.7 Compilation tips

3.7.1 Advanced ./configure options

In addition to all the common Autoconf switches such as --prefix, Liquid War 6 has some custom switches:

3.7.2 Debian packages

Liquid War 6 does have a ./debian in both main and extra maps packages, so it's “debianized”. To build the main .deb package, untar the main source tarball, then:

make dist
cd pkg
cp ../liquidwar6-X.Y.Z.tar.gz . # X.Y.Z is the version
make deb

Note that you have to copy the source tarball to ./pkg and move to this directory before typing make deb. This is, among other things, to simplify the main Makefile.

To build the extra maps .deb package, untar the extra maps tarball, then:

make deb

3.7.3 Red Hat packages

Liquid War 6 does have a .spec files in both main and extra maps packages. To build the main .rpm package, untar the main source tarball, then:

make dist
cd pkg
cp ../liquidwar6-X.Y.Z.tar.gz . # X.Y.Z is the version
make rpm

Note that you have to copy the source tarball to ./pkg and move to this directory before typing make rpm. This is, among other things, to simplify the main Makefile.

To build the extra maps .rpm package, untar the extra maps tarball, then:

make rpm

3.7.4 Microsoft Windows msys/mingw32 port

This section describes how to compile the game from source under Microsoft Windows. Note that players are encouraged to use a free system such as GNU/Linux, which is the platform Liquid War 6 is being hacked on by default. If you encounter problems with this port, you'll probably save time by installing a double-boot with GNU/Linux coexisting with your previous Microsoft Windows install.

Basically, Liquid War 6 requires MinGW. More precisely, it requires MSYS. A standard Cygwin installation won't work, because it is too UNIXish to allow third party libraries like SDL to compile natively. You might argue that SDL is available for Cygwin, but in reality, the Cygwin port of SDL is a MinGW port. Indeed, Cygwin brings all standard POSIX functions including the use of main instead of WinMain and I suspect this is a problem for graphical libraries like SDL which do require some sort of direct access to the OS low-level functions. Therefore, MinGW is more adapted for it does not define all these functions, and allows any library to hook on Microsoft Windows internals directly. Point is then, you also loose the cool effect of Cygwin which is to have a complete glibc available, including network functions like select defined the POSIX way, and not the WinSock way. If you ever ported code from POSIX sockets to WinSock 2, you know what I mean. Using MinGW is also embarassing for some libraries won't compile easily, and for instance programs which heavily rely on a real TTY interface to work are usually hard to port. This includes ncurses and GNU readline. Liquid War 6 tries to have workarrounds for all this, and in some cases the workarround is simply that embarassing code is not compiled on Microsoft Windows. For this reason, some features are not available on this platform. Period.

Now the reason you need MSYS and not only MinGW is that MSYS will allow ./configure scripts to run, and this eases up the porting process a lot. MinGW and MSYS packages are downloadable on the SourceForge MinGW download page. Alternatively, there is a mirror on ufoot.org, but files might be outdated.

To compile Liquid War 6, first download and unzip all the following files in the same directory, for instance C:\MSYS. If you do not have any tool to handle .tar.gz and .tar.bz2 files under Microsoft Windows, which is likely to be the case when MSYS is not installed yet, you can untar these on any GNU/Linux box, then upload the whole directory to the target Windows host.

This file list might contain file which are not absolutely mandatory for Liquid War 6, for instance the Fortran 77 compiler is absolutely useless, but installing it won't harm either. Some packages might unzip things the right way, but some do it in a subfolder. You might need to run commands like:

     cp -r coreutils*/* .
     rm -rf coreutils*

Get rid of useless files:

     rm ._.DS_Store .DS_Store

It's also mandatory to move everything that has been installed in /usr or /usr/local to / since MSYS has some builtin wizardry which maps /usr on /. You need to do this if you don't unzip files from a MinGW shell, which is obviously the case when you first install it. Usefull command can be:

     mv usr/* .
     rmdir usr

Next, libintl is not correctly handled/detected by LW6, and can raise an error like "gcc.exe: C:/msys/local/lib/.libs/libintl.dll.a: No such file or directory" so one needs to copy some libraries in /usr/local/lib/.libs/:

     mkdir local/lib/.libs
     cp local/lib/libintl.* local/lib/.libs/

Another step is to edit /etc/profile and add lines like:

     export CFLAGS="-g -I/usr/local/include"
     export LDFLAGS="-L/usr/local/lib"
     export GUILE_LOAD_PATH="C:\\MSYS\\local\\share\\guile\\1.8\\"

Close and re-launch your msys shell (rxvt) so that these changes take effect. Check that those values are correctly set:

     env | grep FLAGS
     env | grep GUILE

Finally, your MSYS environment is (hopefully...) working.

Now you need to compile the following programs, from source. Files are mirrored on ufoot.org for your convenience, however these might be outdated. Still, there are known to work. Proceed like if you were under a POSIX system. Some packages use the --disable-rpath swith, there are various reasons for which rpath is an issue. In the same manner, --disable-nls when linking against libintl or libiconv was painful.

For your convenience, a zip file containing a complete MSYS "Liquid War 6 ready" environment is available. It is simply the result of all the operations described above. Simply unzip msys-for-liquidwar6-20080819.zip (about 240 megs) in C:\MSYS\. All dependencies compiled in /local have been generated using the command:

     cd /usr/local/src
     ./msys-for-liquidwar6-build.sh > ./msys-for-liquidwar6-build.log 2>&1

Note that this script does't do everything, you'll still need to edit Guile source code and patch it manually.

It might even be possible to use this MSYS environment under Wine. Simply unzip it under $HOME/.wine/drive_c, and run wine "$HOME/.wine/drive_c/windows/system32/cmd.exe" /c "c:\\msys\\msys.bat" and with luck, you'll get a working shell. Note that this might allow you to compile the game, but running it is another story. Consider this MSYS over Wine trick as a hack enabling the use of free software only when compiling for Microsoft proprietary platform. It is not a reasonnable way to run the game. If running under a UNIXish platform, or better, GNU, simply run native code. Use the Windows 32-bit port only if you are jailed on a Microsoft system.

Now, let's come to the real meat, untar the Liquid War 6 source tarball, launch your MSYS shell, and:

     ./configure
     make
     make install

Now the binary is in src/.libs/liquidwar6.exe (beware, src/liquidwar6.exe is only a wrapper). This binary is an MSYS/MinGW binary, so it read paths “à la” Microsoft, that is, it has no knowledge of what /usr is, for instance. It requires paths starting by C:\.

3.7.5 Mac OS X port

This is still experimental. Basically, install MacPorts, and most dependencies with, except for SDL which you compile from source. The idea is to compile SDL using the native OS X bindings (and not some other GL files you could have in /opt/local installed by MacPorts), then compile the game and other SDL dependencies against this SDL.

The SDL_mixer library might need to be told to compile itself without dynamic ogg support. By default it seems that it tries to load libvorbisfile.dylib at runtime, and it can fail. To disable this dynamic loading, use for instance :

/configure --prefix=/opt/extra --enable-music-ogg --disable-music-ogg-shared 

Also, it might seem obvious for Mac OS X users, but there are some important issues related to compiling options and handling dynamic libraries at runtime.

It is very important to have the right SDL flags when linking the Liquid War 6 binaries. For instance it could be:

-I/opt/extra/include -I/opt/local/include -Wl,-framework -Wl,CoreFoundation -I/opt/local/include -D_THREAD_SAFE -Wl,-framework -Wl,Cocoa -Wl,-framework -Wl,OpenGL -Wl,-framework -Wl,Cocoa 

The point is to have Cocoa and OpenGL support. Depending on the way you installed SDL, you might also need to include an SDL framework support, this is mostly if you installed SDL from .dmg binary images, and not from source with the command line. A typical output of sdl-config --libs is:

-L/opt/extra/lib -lSDLmain -lSDL -Wl,-framework,Cocoa

Another important issue is to include SDL.h, which in turn includes SDLmain.h, in all the .c source files defining the standard main function. This is done in liquidwar6 but should you try to link yourself on liquidwar6 libraries and/or hack code, you must do this or you'll get errors when running the game. Such errors look like:

*** _NSAutoreleaseNoPool(): Object 0x420c90 of class NSCFNumber autoreleased with no pool in place - just leaking

The reason is that SDL replaces your main with its own version of it. One strong implication is that all the dynamic loading of SDL, which works on sandard GNU/Linux boxes, won't work under Mac OS X, since SDL hard codes itself by patching main with #define C-preprocessor commands.

A .dmg file (disk image) containing a Liquid War 6.app folder (OS X application) is available for your convenience. It might work or not. In doubt, compile from source. The complicated part about this package (a “bundle” is OS X language) is that it needs to embed various libraries which are typically installed in /opt by MacPorts on a developper's machine. So to build this package a heavy use of the utilility install_name_tool is required, normally all libraries needed ship with the binary, remaining depedencies concern frameworks which should be present on any working Mac OS X install. Still, this is only theory. Needs to be widely tested.

The layout of the bundle follows:

Additionnally, the Mac OS X port uses /Users/<username>/Library/Application Support/Liquid War 6/ to store configuration file, logs, etc. It does not use $HOME/.liquidwar6 like the default UNIX port.

The Mac OS X port also has a special behavior, in order to load some libraries with dlopen (SDL_image does this with libpng and libjpeg) it needs to set DYLD_FALLBACK_LIBARY_PATH to a value that contains these libraries. This is typically in the bundle distributed on the disk image. On a developper's computer this problem does not appear for those libs are often in places like:

So the program sets DYLD_FALLBACK_LIBARY_PATH (but not DYLD_LIBRARY_PATH else it breaks internal OS X stuff which relies, for instance, on libjpeg library that has the same name but different contents) but it needs to do it before it is even run, else the various dyld functions do not acknowledge the change. That is, calling the C function setenv(), even before dlopen(), has no effect. So the program calls exec() to re-run itself with the right environment variable. This is why, on Mac OS X, there are two lines (exactly the same ones) displaying the program description when it is started in a terminal.

3.7.6 GP2X port

This is not working yet, but there are good hopes that some day, Liquid War 6 can run on a GP2X console. This handled gaming device uses a Linux kernel on an ARM processor, does support most GNU packages through cross-compilation, and has basic SDL support.

To compile Liquid War 6 for GP2X, you first need to set up a working “toolchain”. It's suggested you do this on a working GNU/Linux box. There are several solutions, the recommended one being Open2x. Read the online documentation on how to install Open2x.

Basically, the following should work:

mkdir /opt/open2x # check that you can write here
svn co https://open2x.svn.sourceforge.net/svnroot/open2x/trunk/toolchain-new open2x-toolchain 
./open2x-gp2x-apps.sh
cd open2x-toolchain

Then, for your environment to be complete, you need to set up some environment variables. For instance:

export OPEN2X_SYSTEM_PREFIX=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux
export GP2X_USER_PREFIX=$HOME/gp2x

export CC=${OPEN2X_SYSTEM_PREFIX}/bin/arm-open2x-linux-gcc
export CPP=${OPEN2X_SYSTEM_PREFIX}/bin/arm-open2x-linux-cpp
export CXX=${OPEN2X_SYSTEM_PREFIX}/bin/arm-open2x-linux-g++
export AS=${OPEN2X_SYSTEM_PREFIX}/bin/arm-open2x-linux-as

export CFLAGS=''-I${OPEN2X_PREFIX}/include -I${GP2X_USER_PREFIX}/include''
export CPPFLAGS=''-I${OPEN2X_PREFIX}/include -I${GP2X_USER_PREFIX}/include''
export CXXFLAGS=''-I${OPEN2X_PREFIX}/include -I${GP2X_USER_PREFIX}/include''
export LDFLAGS=''-L${OPEN2X_PREFIX}/lib -L${GP2X_USER_PREFIX}/lib''

export PATH=''${GP2X_USER_PREFIX}/bin:${OPEN2X_SYSTEM_PREFIX}/bin:$PATH''

In this setting, there's a user $HOME/gp2x directory which will contain all the Liquid War 6 related libraries while the /opt/open2x remains untouched.

Then you need to install the requirements. All these packages need to be cross-compiled. To make things clear and non-ambiguous, even if you have CC set up in your environment variables, pass --build and --host arguments to the ./configure script of all these packages. A typical command is:

./configure --build=i686-pc-linux-gnu --host=arm-open2x-linux --prefix=${GP2X_USER_PREFIX}

Here's the list of the requirements:

Next, one needs to install a special version of SDL, which targets the GP2X specifically. This is not a generic SDL, and it does have limitations, which are related to the GP2X peculiar hardware. There are installation instructions about how to do this. The following should work:

cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/open2x login # blank password
cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/open2x co libs-gp2x 


Next: , Previous: Compilation tips, Up: Hacker's guide

3.8 Coding guidelines

3.8.1 Project goals reminder

One of the purposes of Liquid War 6 is to make a cleaner implementation of Liquid War than the previous one, namely Liquid War 5. While the latter has achieved the practical goal of providing a playable implementation of the game, it failed at providing an evolutive platform. Network capabilities where finally added to Liquid War 5, but anyone who played on Internet with someone a few hundreds of milliseconds away would agree that it's far from being perfect. The main reason for this is that it is really had to hack on Liquid War 5, especially when you are not the core developper. The core developper himself, even knowing all the various hacks in the game, is very quickly lost when trying to implement major changes.

To put it short, Liquid War 5 is a global variable hell, a pile of hacks on top of a quick and dirty implementation. Still, it works.

With Liquid War 6, the idea is to take the time to make something stable, something nice which will enable developpers to implement the cool features, and have fun along the way. Of course, this is only a dream, and in the (hopefully "very") long run, Liquid War 6 will also end up as a big unmaintainable mess, like any real-life program, until then, it should remain hackable.

3.8.2 Common sense

Here are a few guidelines which I think are common sense advice, but they are still worth mentionning:

3.8.3 Unitary tests

Each of the internal libraries in Liquid War has a “test” program associated with it. For instance liquidwar6sys-test is associated to libliquidwar6sys, and its purpose is to test the features of this library.

While it is fairly easy to test out unitary functions which require no peculiar context, testing high-level functions which requires files, graphical and possibly network contexts to exist is obviously harder to achieve. There's no easy way to draw the line, but the idea is to put in these test executables as many features as possible, to be sure that what is tested in them is rock solid, bullet proof, and that one can safely rely on it and trust that code when running it in a more complex environnement.

These test executables are also very good places to see a library API in action, find code fragments, and make experiments.

3.8.4 Memory allocation

Liquid War 6 provides macros to allocate and free memory. One should use them systematically, except when trying to free something allocated by another library, and in very special cases, mostly concerning low-low level operations which are seldom hacked on.

Usage of macros LW6SYS_MALLOC, LW6SYS_CALLOC and LW6SYS_FREE is straightforward, read any random chunk of code, for instance ./src/lib/sys/sys-test.c to see them in action. They are defined in sys/sys.h.

Once used, these macros will track every single call to malloc and free, and if there's a difference, it will report it. It will also help you by showing what's in the non-freed memory area, at which line of code it has been allocated, and when. This is very usefull to track down memory leaks. Of course a debugger could tell you some of these informations, but experience shows than when you encounter a memory bug, it's very often impossible to reproduce it. So you one wastes time trying to reproduce the bug, whereas with this tool you have the information reported just when the problem happens.

3.8.5 Private and public interfaces

Each library exports a public interface and hides its internal. Since Liquid War 6 uses standard C and no C++, there's no real standard way to handle public/private features. The convention used in Liquid War 6 is to show internal structures as opaque pointers (void *) whenever some function needs to operate on a structure which has possibly private fields. This way the caller function has no way to access the internals, and we are sure that no reference to any internal implementation specific feature will appear.

Here's a code excerpt from src/gfx/setup.c:

     void _lw6gfx_quit(_LW6GFX_CONTEXT *context) {
       /*
        * Implementation here.
        */
     [...]
     }
     
     void lw6gfx_quit(void *context) {
       _lw6gfx_quit((_LW6GFX_CONTEXT *) context);
     }

The function _lw6gfx_quit (note the “_”) is internal, declared in internal.h whereas the function lw6gfx_quit is public, and is therefore exported in gfx.h.

This way, functions in the program using lw6gfx_quit do not know what is in the _LW6GFX_CONTEXT structure, and they need not know it.

This does not mean it is not possible to have public structures, only these structures must reflect some truely public, accessible and safe to access structures.

3.8.6 Audit the code

Liquid War 6 is regularly audited with automated tools. You might need to pass --enable-gcov to --configure if you want to use thes tools yourself. More precisely:

Those tools certainly don't garantee the code is perfect, but they do help improving the quality of the program. If you hack, it's recommended you give them a try.


Next: , Previous: Coding guidelines, Up: Hacker's guide

3.9 Using the console

The console can be activated by passing --display-console when starting the game or by using the system options menu.

When the console is activated, a lw6> prompt should appear in the terminal which launched the program. If you started Liquid War 6 by clicking on an icon, console probably won't work at all since stdout and stdin won't be attached to anything.

The console allows you to type arbitray Scheme/Guile code.

Try, for instance:

     (+ 1 2)
     (display "foo\n")

You can really break things with this console, it gives you a direct access to all the program internals. At least, all the values which are accessible through the script interface, that is, many of them.

You can call any internal C function which has been exported to Guile, here are some examples:

     (c-lw6sys-timestamp)
     (c-lw6bot-get-backends)
     (c-lw6sys-sleep 2.0)
     (lw6-config-get-number "zoom")
     (lw6-config-set-number! "zoom" 0.9)
     (lw6-config-get-number "zoom")

While syntax (and possibly other) errors will be trapped by the interpreter, note that if you break things inside the game by, say, changing some global value, or in a general manner cause an error elsewhere in the code, the game will really raise a fatal error and stop. That's how you can “break things”.

Still, this console is a very powerfull tool, very usefull for debugging but also for tweaking the game without restarting it and/or navigating through the menu interface.


Next: , Previous: Using the console, Up: Hacker's guide

3.10 Advanced tweaking

3.10.1 Hacking ressources

Liquid War 6 tries to have as few hardcoded data as possible. So many constants, and pretty much all the image files, are accessible in the data directory. You can know where it is by launching liquidwar6 --show-data-dir. If you look in this directory you'll find different files, among them XML files.

Let's take an example. Try and find the file gfx/gl/hud/floating/gl-floating-const.xml. Edit the line with the clock-y1 entry. Change the number after "value". Re-run the program. Play a game. What happens? Logically you should see that “something” is not displayed at the same place than before.

You could also modify the textures (JPEG and PNG files). In a general manner it's more cautious to keep them the same size but it depends, sometimes other sizes will work as well.

Many of these parameters are really too technical and obscure to have their place in the main config file (which is already rather big). Use at your own risks, you can really break things touching this, but you can also find out lots of things can be tuned.

3.10.2 Optimize for speed

Todo...


Next: , Previous: Advanced tweaking, Up: Hacker's guide

3.11 Writing modules

Todo...


Next: , Previous: Writing modules, Up: Hacker's guide

3.12 Use as a library

Todo...


Next: , Previous: Use as a library, Up: Hacker's guide

3.13 Network protocol

This section describes how Liquid War 6 handles network messages. Note that for now this is purely theorical, more of a draft, a plan, it might change before being implemented.

3.13.1 No server, no client, only nodes

Liquid War 6 does not really have the notion of server or client, any instance of the program can act as both server and client, therefore we use the term node.

A node listens on a given port, in both TCP and UDP, and can connect to other nodes on the same port. The main identifier of a node is its public url, which is typically of the form http://<ip-address>:<port>/. This url is very important for it is (or at least should be) a unique identifier of the node over the network.

Liquid War has 3 ways to communicate:

On each of these channels, messages can be exchanged in two modes, an “out of band” mode (AKA “oob”), and a regular message oriented, here we speak of “connection”.

3.13.2 Out of band messages

There are only 3 out of band messages:

You can test out of band messages by simply connecting on your server with a command like:

telnet localhost 8056

At the telnet prompt, simply type:

INFO
and press return, and you should have a description of your node.

The complete syntax of OOB messages is:

<COMMAND> [password] [url]

The password and url parameters are optionnal. password can contain either the plain text password or a checksum calculated from the password which is, for security reasons, seeded with the public url of the node we're connecting to, so that this password can't be re-used on another node. url is simply a clue we give to the other node to help find us, the other node will automatically try to detect our IP address and use standard LW6 port 8056, but if for some reason we use a different setting, this is a good way to pass the hint.

As far as OOB is concerned, TCP and UDP work almost the same, HTTP is a bit different, the OOB commands are accessed through the following URLs:

3.13.3 Other raw technical stuff (WIP)

TCP messages:

LW6 [<passwd>] <version> <client-id>
<from-id> <to-id> <serial> <i> <n> <sig> MSG1
<from-id> <to-id> <serial> <i> <n> <sig> MSG2

TCP oobs:

<return> # only works anonymous, same as INFO
INFO [<passwd>] [<public-url>]
LIST [<passwd>] [<public-url>]
PING [<passwd>] [<public-url>]

UDP messages:

LW6 [<passwd>] <version> <client-id> <from-id> <to-id> <serial> <i> <n> <sig> MSG1
LW6 [<passwd>] <version> <client-id> <from-id> <to-id> <serial> <i> <n> <sig> MSG2

UDP oobs:

INFO [<passwd>] [<public-url>]
LIST [<passwd>] [<public-url>]
PING [<passwd>] [<public-url>]

HTTP messages:

client id & password passed in HTTP headers

/lw6/version/<from-id>/<to-id>/<serial>/<i>/<n>/sig/MSG1
/lw6/version/<from-id>/<to-id>/<serial>/<i>/<n>/sig/MSG2

HTTP public URLs:

/ -> index.html
/index.html
/favicon.ico
/screenshot.jpeg
/robots.txt
/gpl.txt
/info.txt
/list.txt
/ping.txt

MSG syntax:

<round> <server-id> <command> <arg1> ... <argN>

COMMAND examples:

2 1234abcd1234abcd REGISTER
3 1234abcd1234abcd ADD 5678 YELLOW
4 1234abcd1234abcd SET 5678 20 5
10 1234abcd1234abcd NOP
400 1234abcd1234abcd REMOVE 5678
1000 1234abcd1234abcd UNREGISTER

Sig is a checksum on string:

<from-id> <to-id> <serial> <i> <n> MSG


Next: , Previous: Network protocol, Up: Hacker's guide

3.14 Technical HOWTOs

3.14.1 Release check-list

Summary off all operations required for a release:

3.14.2 Add a new option

This describes how to add a new option to the game.

Unless this is done, program won't accept the option.

3.14.3 Add a new internal library

This describes how to add a new libxyz internal library:

3.14.4 Add a new module

This describes how to add a new mod-ab module, for instance a new bot, but gfx, snd, cli or srv backends should work pretty much the same:


Next: , Previous: Technical HOWTOs, Up: Hacker's guide

3.15 Using GNU Arch

3.15.1 About GNU Arch

Since March, 4th 2010, Liquid War 6 uses GIT to handle source code, track changes, branches, and the rest. It replaces the GNU Arch repository. This old repository contains all sources up to version 0.0.7beta, following versions, including 0.0.8beta, must be retrieved from GIT.

So the following informations only concern those who are interested in previous versions of the game. Anybody else - probably you - should use GIT instead.

See Using GIT.

Still, this quick Arch survival guide is kept in the documentation.

Read the GNU Arch tutorial to learn how Arch works. Note that there are many other source control managers available, some of which provide functionnalities similar to GNU Arch / tla. GNU Arch has been chosen for Liquid War 6 because:

3.15.2 Getting the latest version from the repository

The repository for Liquid War 6 is accessible on http://arch.savannah.gnu.org/archives/liquidwar6. This is a read-only access, but with the distributed nature of GNU Arch, it still allows you to keep track of your own changes, and submit patches. Accessing it in read/write mode with sftp requires a Savannah account and special rights on the Liquid War 6 project.

Here are typicall commands one can use to get Liquid War 6 source from the GNU Arch repository:

     tla register-archive http://arch.savannah.gnu.org/archives/liquidwar6
     tla get -A liquidwar6@sv.gnu.org liquidwar6--beta

All the patches in the archive are signed with GnuPG, so you can check their authenticity with my public key.

You might need to edit your $HOME/.arch-params/signing/=default.check file and put the following text in it:

     tla-gpg-check gpg_command="gpg --verify-files -"

3.15.3 Setting up your own arch repository

This section is for those who want to hack the game and set up their own repositories. This will enable you to keep track of your patches, package them, and help the core maintainer merging them in the main repository.

You can introduce yourself and create a repository by issuing commands like:

You can introduce yourself and create a repository by issuing commands like:

     tla my-id me@home.net
     tla register-archive me@home.net--2008 /home/me/tla-archives

Then, you can get create your own repository, with a command like:

     tla tag -S liquidwar6@sv.gnu.org/liquidwar6--beta--0.1 me@home.net--2008/liquidwar6--beta--0.4

The idea is that you create, locally, a depot which has a name that matches the name on savannah (this is for convenience, you could technically give it any name...) and indicate that they represent, today, the same thing.

You can get a working copy of your depot with the command:

     tla get me@home.net--2008/liquidwar6--beta--0.4

This will create a complete source tree, which you are free to modify, this is where you should hack.

3.15.4 Synchronizing your repository with upstream releases

To synchronize yourself with upstream developments, go into your copy (the directory created by tla get) and type:

     tla star-merge liquidwar6@sv.gnu.org/liquidwar6--beta--0.1

This will apply locally all the changes that happened since the last synchronization. Of course this is one way to work, you can decide to cherry pick patches and such stuff, but for most dayly uses, a good'ol star-merge is fine.

Not that star-merge will only apply patches on your working copy, not on your repository. The only way to actually commit the modifications on the repository is to use the commit command.

3.15.5 Submitting patches

When using Arch, you can of course still send patches created with diff, or even send updated files directly, the way you would without revision control.

But it can be more convenient to either

Here's an example of an mkpatch command, and which will compute the differences between a previous liquidwar6--beta--0.4--patch-2 snapshot and a not yet commited latest version:

     tla mkpatch {arch}/++pristine-trees/unlocked/liquidwar6/liquidwar6--beta/liquidwar6--beta--0.4/me@home.net--2006/liquidwar6--beta--0.4--patch-2 . my-patch

This will create a my-patch directory, which can be gzipped and sent by mail.

3.15.6 Recover from broken lock

Sometimes, when signing a patch, you might enter the wrong passphrase several times, or you might press CTRL+D inadvertantly. In that case, tla will be in a half-broken state, telling you it can't acquire revision lock... A quick workarround for this is to go to the depot, find the latest patch, and in this repository, create the following folders:

     ++revision-lock/+contents

Both are directories, note the two ++ and the single +. the +contents directory can be empty. Once you've done this, try to re-commit.


Previous: Using GNU Arch, Up: Hacker's guide

3.16 Using GIT

3.16.1 About GIT

There's no CVS or Subversion (AKA “SVN”) source depot for Liquid War 6. Instead, a GIT depot is used. GIT has many advantages over other source control managers (SCM), among them, it's distributed, like GNU Arch.

You can find interesting informations on GIT here:

3.16.2 Getting the latest source

Simply install git and run the following command:

     git clone git://git.sv.gnu.org/liquidwar6.git

If you are behing a firewall and can't have direct TCP/IP access:

     git clone http://git.sv.gnu.org/r/liquidwar6.git

Additionnally, source can be browsed online here: http://git.savannah.gnu.org/cgit/liquidwar6.git

3.16.3 Developper access

You need an ssh access on Savannah and appropriate rights on the project, then you can type:

     git clone login@git.sv.gnu.org:/srv/git/liquidwar6.git

3.16.4 Submitting patches

If you have developper access to the project, then a simply git push will commit your changes.

If not (that is, if you checked out anonymously using git clone git://git.sv.gnu.org/liquidwar6.git for instance, you can still submit patches. Follow these steps:

Note that you can need to run git format-patch -p master (with master instead of origin) it not using a fresh checkout. Also consider adding the --stdout switch, eg git format-patch -p master --stdout > my-changes.patch if you're not using a fresh checkout.


Next: , Previous: Hacker's guide, Up: Top

4 Reference

This chapter is a technical reference. Most of its content is self-generated by the program itself. That is to say, most if its content is already available to you if you have the game installed. Running liquidwar6 --list and liquidwar6 --about=<keyword> is very likely to give you the very same informations, the advantage being that you'll be sure the information is up-to-date and corresponds to the exact version of the program you have. However, publishing this in a reader-friendly way is convenient, plus it enables web search engines to harvest the content.


Next: , Up: Reference

4.1 Basic options

4.1.1 about

— Command-line option: --about=<value>

Type: string

Will allow you to get informations about a given keyword. Let's say that, for instance, you want informations about the keyword 'map-path'. Simply run 'liquidwar6 –about=map-path'. Note that this internal self-documentation system can describe command line switches as well as XML config file parameters or environment variables, and even some Guile script functions. The '–list' command line switch will give you the list of all available keywords.

4.1.2 audit

— Command-line option: --audit

Display all path values, defaults and current settings. This output is very usefull to track down problems such as missing directories, broken installations. If you get an error message that suggests some file is missing, then give this option a try.

4.1.3 copyright

— Command-line option: --copyright

Returns the copyright notice for the program.

4.1.4 debug

— Command-line option: --debug

Enables debug mode. This will turn on maximum log information, and display everything on stderr, even messages which are normally only stored in the log file.

4.1.5 defaults

— Command-line option: --defaults

Clears the config file and run the game with default settings. Use this if you suspect you have broken something by tweaking user settings, or when upgrading the game to a new version.

4.1.6 help

— Command-line option: --help

Returns a short help for the program.

4.1.7 host

— Command-line option: --host

Display all known system host properties, including os and cpu informations.

4.1.8 list

— Command-line option: --list

Returns the list of all keywords which can be queried for information. This includes command-line options, environment variables, and so on. This is the companion option of '–about'. Results obtained with '–list' can be passed to '–about'.

4.1.9 modules

— Command-line option: --modules

Tells which modules have been enabled when the game was compiled. It's still possible to add or remove modules afterwards, but this option allows you to know how things were at first.

4.1.10 pedigree

— Command-line option: --pedigree

Display all build values, these are general constants which can help debugging, tracing what binary you are running, and so on. It's a good idea to take a look at the output of 'pedigree' if you have problems running the game.

4.1.11 test

— Command-line option: --test

Runs a (hopefully) complete test suite which will call most internal Liquid War 6 functions and check out wether they work, in a simple context, without any game interference. Usefull for troubleshooting.

4.1.12 version

— Command-line option: --version

Returns the version of the program, as defined by the GNU Coding Standards.


Next: , Previous: Basic options, Up: Reference

4.2 Doc options

4.2.1 example-hints-xml

— Command-line option: --example-hints-xml

Dumps on stdout an example hints.xml file. Such a file is normally shipped with the game. It is indeed generated using this command.

4.2.2 example-rules-xml

— Command-line option: --example-rules-xml

Dumps on stdout an example options.xml file. Such a file is normally shipped with the game. It is indeed generated using this command.

4.2.3 example-style-xml

— Command-line option: --example-style-xml

Dumps on stdout an example style.xml file. Such a file is normally shipped with the game. It is indeed generated using this command.

4.2.4 example-teams-xml

— Command-line option: --example-teams-xml

Dumps on stdout an example teams.xml file. Such a file is normally shipped with the game. It is indeed generated using this command.

4.2.5 list-advanced

— Command-line option: --list-advanced

List advanced options which can be used for fine-tuning the game.

4.2.6 list-aliases

— Command-line option: --list-aliases

List the keyword aliases. These are here for convenience.

4.2.7 list-doc

— Command-line option: --list-doc

List documentation-related command line options. These commands allow you to list all the keywords related to a given domain.

4.2.8 list-funcs

— Command-line option: --list-funcs

List the C-functions which are exported to Guile, thus usable in scripts.

4.2.9 list-graphics

— Command-line option: --list-graphics

List graphics options (resolution, fullscreen...).

4.2.10 list-hooks

— Command-line option: --list-hooks

List user-modifiable hooks.

4.2.11 list-input

— Command-line option: --list-input

List input (AKA controls) related options. Use these to change keyboard, joystick and mouse settingds.

4.2.12 list-map

— Command-line option: --list-map

List map-related entries, excluding rules.xml, hints.xml and style.xml entries.

4.2.13 list-map-hints

— Command-line option: --list-map-hints

List 'hints.xml' entries. These parameters enable you to modify the behavior of the map loader.

4.2.14 list-map-rules

— Command-line option: --list-map-rules

List 'options.xml' entries. These parameters enable you to modify the gameplay.

4.2.15 list-map-style

— Command-line option: --list-map-style

List 'style.xml' entries. These parameters enable you to modify the aspect of the game.

4.2.16 list-map-teams

— Command-line option: --list-map-teams

List 'teams.xml' entries. These parameters enable you to specify which teams should play on the map.

4.2.17 list-network

— Command-line option: --list-network

List network options.

4.2.18 list-path

— Command-line option: --list-path

List parameters which allow you to override the defaults of the game, and force the game your own file paths and directories.

4.2.19 list-players

— Command-line option: --list-players

List player-related entries, that is to say 'who plays'.

4.2.20 list-quick

— Command-line option: --list-quick

List quick help entries, this includes the GNU standard options and a few troubleshooting tools.

4.2.21 list-show

— Command-line option: --list-show

List command-line options which begin with '–show-...'. These will display on the console many internal parameters. Usefull when debugging.

4.2.22 list-sound

— Command-line option: --list-sound

List sound options (volume...).

4.2.23 list-team-colors

— Command-line option: --list-team-colors

List the team colors, there should be 10 of them

4.2.24 list-weapons

— Command-line option: --list-weapons

List the available weapons.


Next: , Previous: Doc options, Up: Reference

4.3 Show options

4.3.1 show-build-bin-id

— Command-line option: --show-build-bin-id

Shows the internal 'bin-id' value. This value does not mean anything in itself but it's supposed to change each time you compile the game.

4.3.2 show-build-bugs-url

— Command-line option: --show-build-bugs-url

Shows the URL to make bug reports.

4.3.3 show-build-cflags

— Command-line option: --show-build-cflags

Shows what value you should put in 'CFLAGS' (environment variable) if you want to compile programs that use Liquid War 6 as a library, and include 'liquidwar6.h'.

4.3.4 show-build-codename

— Command-line option: --show-build-codename

Shows the codename associated with this version, generally the name of someone famous who is war-related (a general, an emperor...).

4.3.5 show-build-configure-args

— Command-line option: --show-build-configure-args

Shows the arguments that have been passed to the GNU Autoconf './configure' script when building the program. This can be very usefull if you want to know how the program has been built.

4.3.6 show-build-copyright

— Command-line option: --show-build-copyright

Shows a very short copyright notice.

4.3.7 show-build-datadir

— Command-line option: --show-build-datadir

Shows the 'datadir' value as passed to the GNU Autoconf './configure' script when compiling the program. Default is '/usr/local/share'. This is the generic, non Liquid War 6 specific data directory. Liquid War 6 related data is stored elsewhere (usually in a sub-directory) see the 'data-dir' switch for more information. 'datadir' is not 'data-dir'. That's the point.

4.3.8 show-build-date

— Command-line option: --show-build-date

Shows the date when the binary was compiled.

4.3.9 show-build-docdir

— Command-line option: --show-build-docdir

Shows the 'docdir' value as passed to the GNU Autoconf './configure' script when compiling the program. Default is '/usr/local/share/doc/liquidwar6'.

4.3.10 show-build-enable-allinone

— Command-line option: --show-build-enable-allinone

Shows wether the 'allinone' option has been chosen when building the game. This depends on parameters passed to './configure'.

4.3.11 show-build-enable-console

— Command-line option: --show-build-enable-console

Shows wether the console has been enabled when building the game. This depends on parameters passed to './configure' and also on the presence of ncurses and readline.

4.3.12 show-build-enable-fullstatic

— Command-line option: --show-build-enable-fullstatic

Shows wether the 'fullstatic' option has been chosen when building the game. This depends on parameters passed to './configure'.

4.3.13 show-build-enable-gcov

— Command-line option: --show-build-enable-gcov

Shows wether the game was build with suitable informations for gcov. This depends on parameters passed to './configure'.

4.3.14 show-build-enable-gprof

— Command-line option: --show-build-enable-gprof

Shows wether the game was build with suitable informations for gprof. This depends on parameters passed to './configure'.

4.3.15 show-build-enable-gtk

— Command-line option: --show-build-enable-gtk

Shows wether GTK+ support has been enabled when building the game. This depends on parameters passed to './configure' and also on the presence of GTK+ headers and libs. It uses pkg-config to detect it.

4.3.16 show-build-enable-instrument

— Command-line option: --show-build-enable-instrument

Shows wether the game was build with the '-finstrument-functions' GCC switch. This depends on parameters passed to './configure'.

4.3.17 show-build-enable-mod-csound

— Command-line option: --show-build-enable-mod-csound

Shows wether the mod-csound audio backend has been enabled when building the game. This depends on parameters passed to './configure' and also on the presence of the csound library.

4.3.18 show-build-enable-mod-gl

— Command-line option: --show-build-enable-mod-gl

Shows wether the mod-gl graphical backend has been enabled when building the game. This depends on parameters passed to './configure' and also on the presence of SDL and related libraries.

4.3.19 show-build-enable-mod-http

— Command-line option: --show-build-enable-mod-http

Shows wether the mod-http network backend has been enabled when building the game. This depends on parameters passed to './configure' and also on the presence of libCurl.

4.3.20 show-build-enable-mod-ogg

— Command-line option: --show-build-enable-mod-ogg

Shows wether the mod-ogg audio backend has been enabled when building the game. This depends on parameters passed to './configure' and also on the presence of SDL and related libraries.

4.3.21 show-build-enable-openmp

— Command-line option: --show-build-enable-openmp

Shows wether the program was built with OpenMP support. This depends on parameters passed to './configure'.

4.3.22 show-build-enable-optimize

— Command-line option: --show-build-enable-optimize

Shows wether the 'optimize' option has been chosen when building the game. This depends on parameters passed to './configure'.

4.3.23 show-build-enable-paranoid

— Command-line option: --show-build-enable-paranoid

Shows wether the game was build with paranoid memory management. This is for debugging purposes, the default already includes some controls, with turned it's really... paranoid.

4.3.24 show-build-enable-profiler

— Command-line option: --show-build-enable-profiler

Shows wether the game was build with Google Profiler support. This depends on parameters passed to './configure'.

4.3.25 show-build-enable-valgrind

— Command-line option: --show-build-enable-valgrind

Shows wether the game was build with valgrind later use in mind. This depends on parameters passed to './configure'.

4.3.26 show-build-endianness

— Command-line option: --show-build-endianness

Returns the endianness. 'little' corresponds to x86-like systems, 'big' to ppc-like systems.

4.3.27 show-build-gcc-version

— Command-line option: --show-build-gcc-version

Returns the version of the GNU C compiler which was used to compile the program.

4.3.28 show-build-gnu

— Command-line option: --show-build-gnu

Returns 1 (true) if host OS is a GNU system, or at least has been considered as such when compiling, 0 (false) if not.

4.3.29 show-build-gp2x

— Command-line option: --show-build-gp2x

Returns 1 (true) if host is a GP2X, 0 (false) if not.

4.3.30 show-build-home-url

— Command-line option: --show-build-home-url

Shows the URL of the program, its homepage.

4.3.31 show-build-host-cpu

— Command-line option: --show-build-host-cpu

Shows the host CPU, as defined by 'host_cpu' in GNU Autoconf.

4.3.32 show-build-host-os

— Command-line option: --show-build-host-os

Shows the host OS, as defined by 'host_os' in GNU Autoconf.

4.3.33 show-build-hostname

— Command-line option: --show-build-hostname

Shows the name of the host where the binary was compiled.

4.3.34 show-build-includedir

— Command-line option: --show-build-includedir

Shows the 'includedir' value as passed to the GNU Autoconf './configure' script when compiling the program. Default is '/usr/local/include'.

4.3.35 show-build-ldflags

— Command-line option: --show-build-ldflags

Shows what value you should put in 'LDFLAGS' (environment variable) if you want to link programs against libliquidwar6.

4.3.36 show-build-libdir

— Command-line option: --show-build-libdir

Shows the 'libdir' value as passed to the GNU Autoconf './configure' script when compiling the program. Default is '/usr/local/lib'. This is the generic, non Liquid War 6 specific library directory. Dedicated Liquid War 6 modules are stored elsewhere (usually in a sub-directory) see the 'mod-dir' switch for more information.

4.3.37 show-build-license

— Command-line option: --show-build-license

Shows the license of the program (GNU GPL v3 or later).

4.3.38 show-build-localedir

— Command-line option: --show-build-localedir

Shows the 'localedir' value as passed to the GNU Autoconf './configure' script when compiling the program. Default is '/usr/local/share/locale'.

4.3.39 show-build-mac-os-x

— Command-line option: --show-build-mac-os-x

Returns 1 (true) if host OS is Mac OS X, 0 (false) if not.

4.3.40 show-build-md5sum

— Command-line option: --show-build-md5sum

Shows the MD5 checksum, which has been calculated from the C source files. Complementary with 'show-build-stamp'.

4.3.41 show-build-ms-windows

— Command-line option: --show-build-ms-windows

Returns 1 (true) if host OS is Microsoft Windows, 0 (false) if not.

4.3.42 show-build-package-name

— Command-line option: --show-build-package-name

Shows the package name, that is, 'Liquid War 6'.

4.3.43 show-build-package-string

— Command-line option: --show-build-package-string

Shows the package string, that is, 'Liquid War 6 <version>

4.3.44 show-build-package-tarname

— Command-line option: --show-build-package-tarname

Shows the package tarname, that is, liquidwar6.

4.3.45 show-build-pointer-size

— Command-line option: --show-build-pointer-size

Returns the pointer size, in bytes. Should be 4 on 32-bit systems and 8 on 64-bit systems.

4.3.46 show-build-prefix

— Command-line option: --show-build-prefix

Shows the 'prefix' value as passed to the GNU Autoconf './configure' script when compiling the program. Default is '/usr/local'.

4.3.47 show-build-stamp

— Command-line option: --show-build-stamp

Shows the build stamp. A very usefull value, more precise than the version to track down binaries. It is incremented each time the core C code is updated. It won't reflect all the programs for it does not take scripts in account, but if you are running a work-in-progress version, it might be very convenient to use this to know what your are running exactly.

4.3.48 show-build-time

— Command-line option: --show-build-time

Shows the time when the binary was compiled.

4.3.49 show-build-top-srcdir

— Command-line option: --show-build-top-srcdir

Shows the top source directory on the machine where the binary was compiled.

4.3.50 show-build-unix

— Command-line option: --show-build-unix

Returns 1 (true) if host OS is a UNIX system, or at least has been considered as such when compiling, 0 (false) if not.

4.3.51 show-build-version

— Command-line option: --show-build-version

Shows the version. Note that this is different from the standard GNU 'version' command line option which shows a complete message with a short copyright notice. This one will just return the version, without the package tarname or anything else.

4.3.52 show-build-x86

— Command-line option: --show-build-x86

Tells wether the CPU belongs to x86 family.

4.3.53 show-config-file

— Command-line option: --show-config-file

Shows the config file path. Default is '$HOME/.liquidwar6/config.xml'.

4.3.54 show-cwd

— Command-line option: --show-cwd

Shows the current working directory, the value that the pwd command would return.

4.3.55 show-data-dir

— Command-line option: --show-data-dir

Shows the data directory path. This is where the games searches for most of its data,the most important exception being maps, which are stored elsewhere. Default is '/usr/local/share/liquidwar6-<version>/data'.

4.3.56 show-default-config-file

— Command-line option: --show-default-config-file

Shows the default config file path. Default is '$HOME/.liquidwar6/config.xml'.

4.3.57 show-default-data-dir

— Command-line option: --show-default-data-dir

Shows the default data directory path. This is where the games searches for most of its data,the most important exception being maps, which are stored elsewhere. Default is '/usr/local/share/liquidwar6-<version>/data'.

4.3.58 show-default-log-file

— Command-line option: --show-default-log-file

Shows the default log file path. Default is '$HOME/.liquidwar6/log.csv'.

4.3.59 show-default-map-dir

— Command-line option: --show-default-map-dir

Shows the default map directory. This is where builtin maps are stored. Default is '/usr/local/share/liquidwar6-<version>/map'.

4.3.60 show-default-map-path

— Command-line option: --show-default-map-path

Shows the default map search path. This is where the game searches for maps. It's the combination of command-line arguments and builtin paths. Might return more directories than the one specified in a single 'map-path=dir1:dir2' argument.

4.3.61 show-default-mod-dir

— Command-line option: --show-default-mod-dir

Shows the default module directory path. This is where all dynamically loaded modules are stored. Default is '/usr/local/lib/liquidwar6-<version>'.

4.3.62 show-default-music-dir

— Command-line option: --show-default-music-dir

Shows the default music directory. This is where builtin musics are stored. Default is '/usr/local/share/liquidwar6-<version>/music'.

4.3.63 show-default-music-path

— Command-line option: --show-default-music-path

Shows the default music search path. This is where the game searches for musics. It's the combination of command-line arguments and builtin paths. Might return more directories than the one specified in a single 'music-path=dir1:dir2' argument.

4.3.64 show-default-prefix

— Command-line option: --show-default-prefix

Shows the default prefix used. This should logically be the value passed to the GNU Autoconf ./configure script when building the game. Most other path are deduced from this one. Default is '/usr/local'.

4.3.65 show-default-script-file

— Command-line option: --show-default-script-file

Shows the default main script file path. This file is very important, since the program is more or less a hudge scheme interpreter, and this file is the file loaded by Guile. In short, it is the main program. Default is '/usr/local/share/liquidwar6-<version>/script/liquidwar6.scm'.

4.3.66 show-default-user-dir

— Command-line option: --show-default-user-dir

Shows the default user directory path. This is where run-time data, config files, log files, are stored. Default is '$HOME/.liquidwar6/'.

4.3.67 show-log-file

— Command-line option: --show-log-file

Shows the log file path. Default is '$HOME/.liquidwar6/log.csv'.

4.3.68 show-map-dir

— Command-line option: --show-map-dir

Shows the map directory. This is where builtin maps are stored. Default is '/usr/local/share/liquidwar6-<version>/map'.

4.3.69 show-map-path

— Command-line option: --show-map-path

Shows the map search path. This is where the game searches for maps. It's the combination of command-line arguments and builtin paths. Might return more directories than the one specified in a single 'map-path=dir1:dir2' argument.

4.3.70 show-mod-dir

— Command-line option: --show-mod-dir

Shows the module directory path. This is where all dynamically loaded modules are stored. Default is '/usr/local/lib/liquidwar6-<version>'.

4.3.71 show-music-dir

— Command-line option: --show-music-dir

Shows the music directory. This is where builtin maps are stored. Default is '/usr/local/share/liquidwar6-<version>/music'.

4.3.72 show-music-path

— Command-line option: --show-music-path

Shows the music search path. This is where the game searches for musics. It's the combination of command-line arguments and builtin paths. Might return more directories than the one specified in a single 'music-path=dir1:dir2' argument.

4.3.73 show-prefix

— Command-line option: --show-prefix

Shows the prefix used. This should logically be the value passed to the GNU Autoconf ./configure script when building the game. Most other path are deduced from this one. Default is '/usr/local'.

4.3.74 show-run-dir

— Command-line option: --show-run-dir

Shows the run directory, usually the path where the binary is. It depends on how and where the program is launched. It is guessed from the argc/argv values at runtime.

4.3.75 show-script-file

— Command-line option: --show-script-file

Shows the main script file path. This file is very important, since the program is more or less a hudge scheme interpreter, and this file is the file loaded by Guile. In short, it is the main program. Default is '/usr/local/share/liquidwar6-<version>/script/liquidwar6.scm'.

4.3.76 show-user-dir

— Command-line option: --show-user-dir

Shows the user directory path. This is where run-time data, config files, log files, are stored. Default is '$HOME/.liquidwar6/'.


Next: , Previous: Show options, Up: Reference

4.4 Path options

4.4.1 config-file

— Command-line option: --config-file

Type: string

Default value: $HOME/.liquidwar6/config.xml

Set the config file path. This enables you to use whatever config file you like, keeping all other informations in the same place.

4.4.2 data-dir

— Command-line option: --data-dir

Type: string

Default value: /usr/local/share/liquidwar6-<version>/data

Set the data directory. By changing ths value you'll be able to use an alternative data directory.

4.4.3 log-file

— Command-line option: --log-file=<value>
— Environment variable: LW6_LOG_FILE
— XML key: log-file

Type: string

Default value: $HOME/.liquidwar6/log.csv

Set the log file path. This enables you to use whatever log file you like, keeping all other informations in the same place.

4.4.4 map-dir

— Command-line option: --map-dir

Type: string

Default value: /usr/local/share/liquidwar6-<version>/map

Set the map directory path. By changing this value you'll be able to play with your own maps in your own directory. Note that there are other ways to achieve that, but using this option will work. However, a side effect is that you might not see builtin maps anymore.

4.4.5 map-path

— Command-line option: --map-path=<value>
— Environment variable: LW6_MAP_PATH
— XML key: map-path

Type: string

Default value: $HOME/.liquidwar6/map:/usr/local/share/liquidwar6-<version>/map

Set the map search path. By changing this value you'll be able to play with your own maps in your own directory. This is different from 'map-dir', since it includes 'map-dir', plus it adds a number of other search paths. Unlike most other parameters, the values given from the command-line, from the environment variables, or from the config file, are not overwritten, but appended. That is to say if you specify a 'map-path' with the command-line argument 'map-path=path', but also define the 'LW6_MAP_PATH' value and finally edit 'config.xml' to change the 'map-path' entry in it, you'll end up with the game searching for maps in all these directories. Additionnally, 'map-dir' and '<user-dir>/map' will always be in the list. Any given value can itself include several pathes, separated by the path separator. This separator is ':' on GNU/Linux, and ';' on Microsoft Windows. For instance, on a GNU/Linux box, you could use the command-line argument 'map-path=/foo/bar/map:/home/user/map/:/map'.

4.4.6 mod-dir

— Command-line option: --mod-dir

Type: string

Default value: /usr/local/lib/liquidwar6-<version>

Set the module directory path. By changing this you will load dynamic shared libraries (game specific modules such as the graphical backend) from an alternative place. Use this at your own risks, for there can always be a binary incompatibility. You've been warned.

4.4.7 music-dir

— Command-line option: --music-dir=<value>
— Environment variable: LW6_MUSIC_DIR
— XML key: music-dir

Type: string

Default value: /usr/local/share/liquidwar6-<version>/music

Set the music directory path. By changing this value you'll be able to use your own musics in your own directory. Note that there are other ways to achieve that, but using this option will work. The major side effect is that using this option, you really replace the existing builtin musics by your own. If you simply want to add musics you can store them in $HOME/.liquidwar6/music or in the map directory itself.

4.4.8 music-path

— Command-line option: --music-path=<value>
— Environment variable: LW6_MUSIC_PATH
— XML key: music-path

Type: string

Default value: $HOME/.liquidwar6/music:/usr/local/share/liquidwar6-<version>/music

Set the music search path. By changing this value you'll be able to play with your own musics in your own directory. This is different from 'music-dir', since it includes 'music-dir', plus it adds a number of other search paths. Unlike most other parameters, the values given from the command-line, from the environment variables, or from the config file, are not overwritten, but appended. That is to say if you specify a 'music-path' with the command-line argument 'music-path=path', but also define the 'LW6_MUSIC_PATH' value and finally edit 'config.xml' to change the 'music-path' entry in it, you'll end up with the game searching for musics in all these directories. Additionnally, 'music-dir' and '<user-dir>/music' will always be in the list. Any given value can itself include several pathes, separated by the path separator. This separator is ':' on GNU/Linux, and ';' on Microsoft Windows. For instance, on a GNU/Linux box, you could use the command-line argument 'music-path=/foo/bar/music:/home/user/music/:/music'.

4.4.9 prefix

— Command-line option: --prefix

Type: string

Default value: /usr/local

Override the prefix value given to the GNU Autoconf ./configure script when building the game. Not all path will be changed, some of them might remain the same, for instance message translations (localedir). But most game-specific data including maps, graphics, sounds, will be searched according to the new given parameter.

4.4.10 script-file

— Command-line option: --script-file

Type: string

Default value: /usr/local/share/liquidwar6-<version>/script/liquidwar6.scm

Set the main script file path. This file is very important, since the program is more or less a hudge scheme interpreter, and this file is the file loaded by Guile. In short, it is the main program.

4.4.11 user-dir

— Command-line option: --user-dir=<value>
— Environment variable: LW6_USER_DIR
— XML key: user-dir

Type: string

Default value: $HOME/.liquidwar6

Set the user directory path. This is where run-time data, config files, log files, are stored. If you override this value, other parameters such as where the config and log files reside, will change.


Next: , Previous: Path options, Up: Reference

4.5 Players options

4.5.1 player1-control

— Command-line option: --player1-control=<value>
— Environment variable: LW6_PLAYER1_CONTROL
— XML key: player1-control

Type: string

Default value: mouse

Control for the first player, must be mouse, keyboard, joystick1, joystick2 or custom.

4.5.2 player1-name

— Command-line option: --player1-name=<value>
— Environment variable: LW6_PLAYER1_NAME
— XML key: player1-name

Type: string

Default value: <username>

Name of the first player, the player used by default. A default value is provided, you can of course, change it at will.

4.5.3 player1-status

— Command-line option: --player1-status=<value>
— Environment variable: LW6_PLAYER1_STATUS
— XML key: player1-status

Type: boolean

Default value: true

Status of the first player, true if player is activated, false if idle.

4.5.4 player2-control

— Command-line option: --player2-control=<value>
— Environment variable: LW6_PLAYER2_CONTROL
— XML key: player2-control

Type: string

Default value: keyboard

Control for the second player, must be mouse, keyboard, joystick1, joystick2 or custom.

4.5.5 player2-name

— Command-line option: --player2-name=<value>
— Environment variable: LW6_PLAYER2_NAME
— XML key: player2-name

Type: string

Default value: player2-<hostname>

Name of the second player. A default value is provided, you'll certainly want to change it.

4.5.6 player2-status

— Command-line option: --player2-status=<value>
— Environment variable: LW6_PLAYER2_STATUS
— XML key: player2-status

Type: boolean

Default value: true

Status of the second player, true if player is activated, false if idle.

4.5.7 player3-control

— Command-line option: --player3-control=<value>
— Environment variable: LW6_PLAYER3_CONTROL
— XML key: player3-control

Type: string

Default value: joystick1

Control for the third player, must be mouse, keyboard, joystick1, joystick2 or custom.

4.5.8 player3-name

— Command-line option: --player3-name=<value>
— Environment variable: LW6_PLAYER3_NAME
— XML key: player3-name

Type: string

Default value: player3-<hostname>

Name of the third player. A default value is provided, you'll certainly want to change it.

4.5.9 player3-status

— Command-line option: --player3-status=<value>
— Environment variable: LW6_PLAYER3_STATUS
— XML key: player3-status

Type: boolean

Default value: false

Status of the third player, true if player is activated, false if idle.

4.5.10 player4-control

— Command-line option: --player4-control=<value>
— Environment variable: LW6_PLAYER4_CONTROL
— XML key: player4-control

Type: string

Default value: joystick2

Control for the fourth player, must be mouse, keyboard, joystick1, joystick2 or custom.

4.5.11 player4-name

— Command-line option: --player4-name=<value>
— Environment variable: LW6_PLAYER4_NAME
— XML key: player4-name

Type: string

Default value: player4-<hostname>

Name of the fourth player. A default value is provided, you'll certainly want to change it.

4.5.12 player4-status

— Command-line option: --player4-status=<value>
— Environment variable: LW6_PLAYER4_STATUS
— XML key: player4-status

Type: boolean

Default value: false

Status of the fourth player, true if player is activated, false if idle.


Next: , Previous: Players options, Up: Reference

4.6 Input options

4.6.1 click-to-focus

— Command-line option: --click-to-focus=<value>
— Environment variable: LW6_CLICK_TO_FOCUS
— XML key: click-to-focus

Type: boolean

Default value: false

If set to true, you'll need to click with the mouse to select a menuitem or move the cursor in the game. If not, some actions will be taken automatically without the need to click.

4.6.2 cursor-sensitivity

— Command-line option: --cursor-sensitivity=<value>
— Environment variable: LW6_CURSOR_SENSITIVITY
— XML key: cursor-sensitivity

Type: float

Default value: 1.0

Keyboard and joystick sensitivity while moving the cursor. 1.0 is the default, 0.1 is slow, 10 is reponsive. This is used for moving the cursor during the game only, the option has no impact on menu navigation.

4.6.3 custom-alt

— Command-line option: --custom-alt=<value>
— Environment variable: LW6_CUSTOM_ALT
— XML key: custom-alt

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 110) ; SDLK_n

Guile custom code associated to the ALT key equivalent.

4.6.4 custom-ctrl

— Command-line option: --custom-ctrl=<value>
— Environment variable: LW6_CUSTOM_CTRL
— XML key: custom-ctrl

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 98) ; SDLK_b

Guile custom code associated to the CTRL key equivalent.

4.6.5 custom-down

— Command-line option: --custom-down=<value>
— Environment variable: LW6_CUSTOM_DOWN
— XML key: custom-down

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 100) ; SDLK_d

Guile custom code associated to the DOWN key equivalent.

4.6.6 custom-enter

— Command-line option: --custom-enter=<value>
— Environment variable: LW6_CUSTOM_ENTER
— XML key: custom-enter

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 103) ; SDLK_g

Guile custom code associated to the ENTER key equivalent.

4.6.7 custom-esc

— Command-line option: --custom-esc=<value>
— Environment variable: LW6_CUSTOM_ESC
— XML key: custom-esc

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 102) ; SDLK_f

Guile custom code associated to the ESC key equivalent.

4.6.8 custom-left

— Command-line option: --custom-left=<value>
— Environment variable: LW6_CUSTOM_LEFT
— XML key: custom-left

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 99) ; SDLK_c

Guile custom code associated to the LEFT key equivalent.

4.6.9 custom-pgdown

— Command-line option: --custom-pgdown=<value>
— Environment variable: LW6_CUSTOM_PGDOWN
— XML key: custom-pgdown

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 115) ; SDLK_s

Guile custom code associated to the PGDOWN key equivalent.

4.6.10 custom-pgup

— Command-line option: --custom-pgup=<value>
— Environment variable: LW6_CUSTOM_PGUP
— XML key: custom-pgup

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 119) ; SDLK_w

Guile custom code associated to the PGUP key equivalent.

4.6.11 custom-right

— Command-line option: --custom-right=<value>
— Environment variable: LW6_CUSTOM_RIGHT
— XML key: custom-right

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 118) ; SDLK_v

Guile custom code associated to the RIGHT key equivalent.

4.6.12 custom-up

— Command-line option: --custom-up=<value>
— Environment variable: LW6_CUSTOM_UP
— XML key: custom-up

Type: string

Default value: (c-lw6gui-keyboard-is-pressed 101) ; SDLK_e

Custom keycode to be used as the UP key equivalent.

4.6.13 double-click-delay

— Command-line option: --double-click-delay=<value>
— Environment variable: LW6_DOUBLE_CLICK_DELAY
— XML key: double-click-delay

Type: integer

Default value: 333

Time, in milliseconds, determining wether two consecutive clicks make a double-click or not.

4.6.14 max-cursor-speed

— Command-line option: --max-cursor-speed=<value>
— Environment variable: LW6_MAX_CURSOR_SPEED
— XML key: max-cursor-speed

Type: float

Default value: 10.0

Maximum cursor speed when cursor is controlled with keyboard or joystick joystick 1. Consider using cursor-sensitivity too.

4.6.15 mouse-sensitivity

— Command-line option: --mouse-sensitivity=<value>
— Environment variable: LW6_MOUSE_SENSITIVITY
— XML key: mouse-sensitivity

Type: float

Default value: 1.0

Mouse sensitivity, 1.0 is the default, 0.1 is slow, 10 is reponsive. This is used for moving the cursor during the game only, the option has no impact on menu navigation.

4.6.16 repeat-delay

— Command-line option: --repeat-delay=<value>
— Environment variable: LW6_REPEAT_DELAY
— XML key: repeat-delay

Type: integer

Default value: 500

Time, in milliseconds, before key repeat will start, use 0 to disable.

4.6.17 repeat-interval

— Command-line option: --repeat-interval=<value>
— Environment variable: LW6_REPEAT_INTERVAL
— XML key: repeat-interval

Type: integer

Default value: 100

Time, in milliseconds, between two repeats, once repeat has started, use 0 to disable.

4.6.18 use-double-click

— Command-line option: --use-double-click=<value>
— Environment variable: LW6_USE_DOUBLE_CLICK
— XML key: use-double-click

Type: boolean

Default value: false

Wether to use double-click feature, mostly usefull if running on a system that has only one button (such as a tablet-PC or anything with a tactile screen), if your mouse has three buttons, disabling this might avoid some confusion. Basically, if enabled, double-click is equivalent to right-click (fire) and triple-click is equivalent to middle-click (alternate fire).

4.6.19 use-esc-button

— Command-line option: --use-esc-button=<value>
— Environment variable: LW6_USE_ESC_BUTTON
— XML key: use-esc-button

Type: boolean

Default value: true

Decides wether to display an 'esc' (escape) button in the interface. This is usefull for people who control the game with the mouse only, and have a single buttons, or on a touchscreen.

4.6.20 zoom-step

— Command-line option: --zoom-step=<value>
— Environment variable: LW6_ZOOM_STEP
— XML key: zoom-step

Type: float

Default value: 1.1

A value, strictly greater than 1, which will be used when zooming. The greater it is, the more sensible the zoom is.

4.6.21 zoom-stick-delay

— Command-line option: --zoom-stick-delay=<value>
— Environment variable: LW6_ZOOM_STICK_DELAY
— XML key: zoom-stick-delay

Type: float

Default value: 1000

How long, in msec, the zoom will stick to its default value.


Next: , Previous: Input options, Up: Reference

4.7 Graphics options

4.7.1 capture

— Command-line option: --capture=<value>
— Environment variable: LW6_CAPTURE
— XML key: capture

Type: boolean

Default value: false

Enables capture mode, in which a BMP file is dumped on the disk (in your user directory, search for a 'capture' sub-directory).

4.7.2 fullscreen

— Command-line option: --fullscreen=<value>
— Environment variable: LW6_FULLSCREEN
— XML key: fullscreen

Type: boolean

Default value: false

Force the game to fun fullscreen. Note that the graphics backend might ignore this hint.

4.7.3 gfx-backend

— Command-line option: --gfx-backend=<value>
— Environment variable: LW6_GFX_BACKEND
— XML key: gfx-backend

Type: string

Default value: gl

Sets the graphics backend AKA 'gfx' to use. For now the only choice is 'gl' and will use an OpenGL/SDL 3D-accelerated driver.

4.7.4 gfx-quality

— Command-line option: --gfx-quality=<value>
— Environment variable: LW6_GFX_QUALITY
— XML key: gfx-quality

Type: integer

Default value: 1 Min value: 0 Max value: 2

Sets the overall quality of the graphics backend. Depending on the backend, this can mean different things. For instance for the 'gl' backend, this can change texture filtering (nearest, linear, bilinear...). This is not the same as 'pixelize' which is a per-map option and emulates an old school appearance.

4.7.5 height

— Command-line option: --height=<value>
— Environment variable: LW6_HEIGHT
— XML key: height

Type: integer

Default value: -1

Run the game with the given screen height.Note that the graphics backend might ignore this hint. Use with its companion option 'width'. A negative value will force the use of a default value.

4.7.6 width

— Command-line option: --width=<value>
— Environment variable: LW6_WIDTH
— XML key: width

Type: integer

Default value: -1

Run the game with the given screen width. Note that the graphics backend might ignore this hint. Use with its companion option 'height'.A negative value will force the use of a default value.

4.7.7 windowed-mode-limit

— Command-line option: --windowed-mode-limit=<value>
— Environment variable: LW6_WINDOWED_MODE_LIMIT
— XML key: windowed-mode-limit

Type: float

Default value: 0.95

When switching back from fullscreen mode to windowed mode, if we're in maximum resolution, then this coefficient will be applied before resizing the window. The idea is that (obviously) a windowed mode is prefered when a little smaller that totally fullscreen. So set this to a value just below 1.0.


Next: , Previous: Graphics options, Up: Reference

4.8 Sound options

4.8.1 ambiance-exclude

— Command-line option: --ambiance-exclude=<value>
— Environment variable: LW6_AMBIANCE_EXCLUDE
— XML key: ambiance-exclude

Type: string

Default value:

If this string is present in a music file name, this file won't be played during the menus, it will be excluded from the list.

4.8.2 ambiance-file

— Command-line option: --ambiance-file=<value>
— Environment variable: LW6_AMBIANCE_FILE
— XML key: ambiance-file

Type: string

Default value:

A music file which will be used to be played during the menus. If not found, game will fallback on random files.

4.8.3 ambiance-filter

— Command-line option: --ambiance-filter=<value>
— Environment variable: LW6_AMBIANCE_FILTER
— XML key: ambiance-filter

Type: string

Default value: Chadburn

A music filter, used to select the files which are played while navigating in the menus. It works like 'music-filter' except this one is not related to a peculiar map. This is not a complex regex-enabled filter, just a plain string search. Even the '*' wildcard won't work.

4.8.4 fx-volume

— Command-line option: --fx-volume=<value>
— Environment variable: LW6_FX_VOLUME
— XML key: fx-volume

Type: float

Default value: 0.3 Min value: 0 Max value: 1

Set the sound effects volume. This is a floating point value. 0 is mute. Maximum value is 1.

4.8.5 music-volume

— Command-line option: --music-volume=<value>
— Environment variable: LW6_MUSIC_VOLUME
— XML key: music-volume

Type: float

Default value: 0.6 Min value: 0 Max value: 1

Set the music volume.This is a floating point value. 0 is mute. Maximum value is 1.

4.8.6 snd-backend

— Command-line option: --snd-backend=<value>
— Environment variable: LW6_SND_BACKEND
— XML key: snd-backend

Type: string

Default value: ogg

Sets the sound backend AKA 'snd' to use. Can be 'ogg' or 'csound' but only 'ogg' will produce sound in the current release.

4.8.7 water-volume

— Command-line option: --water-volume=<value>
— Environment variable: LW6_WATER_VOLUME
— XML key: water-volume

Type: float

Default value: 0.2 Min value: 0 Max value: 1

Set the volume for water sounds. This is a floating point value. 0 is mute. Maximum value is 1.


Next: , Previous: Sound options, Up: Reference

4.9 Network options

4.9.1 bind-ip

— Command-line option: --bind-ip=<value>
— Environment variable: LW6_BIND_IP
— XML key: bind-ip

Type: string

Default value: 0.0.0.0

The IP address to bind on when listening to network messages. You can use this to specifically use a given network interface, the default will listen on any available interface.

4.9.2 bind-port

— Command-line option: --bind-port=<value>
— Environment variable: LW6_BIND_PORT
— XML key: bind-port

Type: integer

Default value: 8056 Min value: 1 Max value: 65535

The IP port to bind on when listening to network messages. The default should work out of the box, and will ease up the discovery process. That is, if you use your own settings, automatic detection of your server by other servers might not work so well.

4.9.3 broadcast

— Command-line option: --broadcast=<value>
— Environment variable: LW6_BROADCAST
— XML key: broadcast

Type: boolean

Default value: true

Allows the program to send broadcast messages on the network. It can be usefull to disable those if you don't use UDP node discovery and/or if there's a sysadmin arround who does not enjoy permanent broadcasts on his LAN.

4.9.4 cli-backends

— Command-line option: --cli-backends=<value>
— Environment variable: LW6_CLI_BACKENDS
— XML key: cli-backends

Type: string

Default value: tcp,udp,http

The client backends to use. Most of the time the default is fine, change it only if you specifically want to disactivate some protocol, or if you want to activate a custom-made client backend. It's a comma separated list.

4.9.5 known-nodes

— Command-line option: --known-nodes=<value>
— Environment variable: LW6_KNOWN_NODES
— XML key: known-nodes

Type: string

Default value: http://ufoot.org:8056/,http://ufoot.hd.free.fr:8056/

List of known nodes, nodes which the program will try to contact first to get the list of other nodes. This is mostly usefull when program is launched for the first time, after this it should keep an up-to-date list of known servers in its internal database and automatically reconnect to them next time it starts. You might want to change this if you really want to connect to a given server which is not publically listed. The list is comma separated.

4.9.6 node-description

— Command-line option: --node-description=<value>
— Environment variable: LW6_NODE_DESCRIPTION
— XML key: node-description

Type: string

Default value: No description.

The description of your node, that is a text that describes your server. This will typically appear when pointing a web client on the public server URL, it is for general information, so if there's something special about your server, say it here.

4.9.7 node-title

— Command-line option: --node-title=<value>
— Environment variable: LW6_NODE_TITLE
— XML key: node-title

Type: string

Default value:

The title of your node, that is the name which will be displayed when listing servers. This is different from player name, for there can be several players on a single computer. By default this will be set to hostname.

4.9.8 password

— Command-line option: --password=<value>
— Environment variable: LW6_PASSWORD
— XML key: password

Type: string

Default value:

The password to use for network games. Do not use a valuable password, as this is stored as clear text on your hard drive. Still, the game will only send a hash/checksum of the password on the network so eavesdropper won't be able to read it. They can see the hash/checksum and use it if clever, but they can't guess the real password. A blank password means anyone can join your games when you act like a server.

4.9.9 public-url

— Command-line option: --public-url=<value>
— Environment variable: LW6_PUBLIC_URL
— XML key: public-url

Type: string

Default value:

The public URL of your server. By default the game will pick up one for you. In fact, the clients discovering your server should guess the public URL, probably http://<your-ip>:<your-port>/ but you might need to use your own settings if you are using NAT or an Apache reverse-proxy to rewrite HTTP requests.

4.9.10 skip-network

— Command-line option: --skip-network=<value>
— Environment variable: LW6_SKIP_NETWORK
— XML key: skip-network

Type: boolean

Default value: false

If set, then game won't do anything network related. No listen, no connect, no nothing. You are playing locally.

4.9.11 srv-backends

— Command-line option: --srv-backends=<value>
— Environment variable: LW6_SRV_BACKENDS
— XML key: srv-backends

Type: string

Default value: tcpd,udpd,httpd

The server backends to use. Most of the time the default is fine, change it only if you specifically want to disactivate some protocol, or if you want to activate a custom-made server backend. It's a comma separated list.


Next: , Previous: Network options, Up: Reference

4.10 Map parameters

4.10.1 chosen-map

— Command-line option: --chosen-map=<value>
— Environment variable: LW6_CHOSEN_MAP
— XML key: chosen-map

Type: string

Default value: subflower

The last map chosen by the player, locally. This is the map which will be used for a quick-start game, a local game, or a game started as a server.

4.10.2 force

— Command-line option: --force=<value>
— Environment variable: LW6_FORCE
— XML key: force

Type: string

Default value: respawn-team,color-conflict-mode

A comma separated list of options which should be ignored when reading map XML files. For instance, if this contains 'rounds-per-sec,moves-per-round' then whatever values were defined for this in 'rules.xml', then game will ignore them and use the user's values, stored in 'config.xml', running the game at the requested speed. This ultimately allows the player to control everything despite the values set by the map designer.

4.10.3 use-cursor-texture

— Command-line option: --use-cursor-texture=<value>
— Environment variable: LW6_USE_CURSOR_TEXTURE
— XML key: use-cursor-texture

Type: boolean

Default value: true

Defines wether the cursor textures should be used. If unset, then the default builtin cursor texture will be used instead of the map specific one.

4.10.4 use-hints-xml

— Command-line option: --use-hints-xml=<value>
— Environment variable: LW6_USE_HINTS_XML
— XML key: use-hints-xml

Type: boolean

Default value: true

If set, then hints will be picked up from the map defined hints.xml, if it exists. This is the default.

4.10.5 use-music-file

— Command-line option: --use-music-file=<value>
— Environment variable: LW6_USE_MUSIC_FILE
— XML key: use-music-file

Type: boolean

Default value: true

If set, then the program will use the 'music-file' attribute to choose the music to play. If unset, then a random builtin music will be picked up, regardless of what is specified in 'music-file'.

4.10.6 use-rules-xml

— Command-line option: --use-rules-xml=<value>
— Environment variable: LW6_USE_RULES_XML
— XML key: use-rules-xml

Type: boolean

Default value: true

If set, then rules will be picked up from the map defined rules.xml, if it exists. This is the default. Use force-time and force-size to override this and use user-defined values anyway.

4.10.7 use-style-xml

— Command-line option: --use-style-xml=<value>
— Environment variable: LW6_USE_STYLE_XML
— XML key: use-style-xml

Type: boolean

Default value: true

If set, then style will be picked up from the map defined style.xml, if it exists. This is the default. Use force-time and force-background to override this and use user-defined values anyway.

4.10.8 use-teams-xml

— Command-line option: --use-teams-xml=<value>
— Environment variable: LW6_USE_TEAMS_XML
— XML key: use-teams-xml

Type: boolean

Default value: true

If set, then teams will be picked up from the map defined teams.xml, if it exists. This is the default. Use force-time and force-background to override this and use user-defined values anyway.

4.10.9 use-texture

— Command-line option: --use-texture=<value>
— Environment variable: LW6_USE_TEXTURE
— XML key: use-texture

Type: boolean

Default value: true

Defines wether the map texture should be used. Of course if there's no map texture, the texture... won't be used. But if there is one, this parameter will force the game to ignore it and play with solid colors. This probably won't look as nice as the textured map in most cases, but some players might find it more readable and confortable to play when throwing eye candy away.


Next: , Previous: Map parameters, Up: Reference

4.11 Map rules.xml

4.11.1 boost-power

— Command-line option: --boost-power=<value>
— Environment variable: LW6_BOOST_POWER
— XML key: boost-power

Type: integer

Default value: 3 Min value: 1 Max value: 10

Defines how fast and powerfull the boost is. That is, if on 'boost.png' it's pitch black and this parameter is set to 3, then fighters will move and act 3 times than what they would do normally.

4.11.2 color-conflict-mode

— Command-line option: --color-conflict-mode=<value>
— Environment variable: LW6_COLOR_CONFLICT_MODE
— XML key: color-conflict-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

How to handle color conflicts, that is, when a player requests a color, but this color is already used, what should be done? If 0, wether a color already exists won't affect the color of a new cursor. If 1, then two players on the same computer will be allowed to share the same color/team, but if another computer is already playing with a color, any new computer will need to use another team. If 2, then it's impossible for a new cursor to use a pre-existing color, any new cursor will require a new color, if that color is already used, a new color will be picked randomly.

4.11.3 cursor-pot-init

— Command-line option: --cursor-pot-init=<value>
— Environment variable: LW6_CURSOR_POT_INIT
— XML key: cursor-pot-init

Type: integer

Default value: 100000 Min value: 5000 Max value: 500000

Defines the cursor potential at startup. Not really any reason to change it. Theorically, there could be maps where the default value doesn't fit, but none has been seen yet.

4.11.4 danger-power

— Command-line option: --danger-power=<value>
— Environment variable: LW6_DANGER_POWER
— XML key: danger-power

Type: integer

Default value: 200 Min value: 0 Max value: 10000

Defines how dangerous are the black zones defined in 'danger.png'. The value is used to decrease the fighter health at each move, so you should compare its value to something like 'fighter-attack'. Being on a dangerous zone is a bit like being attacked by an invisible and unknown ennemy.

4.11.5 exp

— Command-line option: --exp=<value>
— Environment variable: LW6_EXP
— XML key: exp

Type: integer

Default value: 1 Min value: 0 Max value: 99

Level of experience (AKA exp) required to play the current level. If this level is validated (that is, won) then player will be granted with a level of exp+1 and be able to play all the next levels. An exp of 0 means the level is playable by a pure beginner.

4.11.6 fighter-attack

— Command-line option: --fighter-attack=<value>
— Environment variable: LW6_FIGHTER_ATTACK
— XML key: fighter-attack

Type: integer

Default value: 500 Min value: 1 Max value: 10000

Defines how hard fighters will attack others, that is, in one attack, how many life-points the attacked fighter will loose. Increasing this will cause your opponents to melt faster when you attack them. With a low value, it will take ages to take on your opponents. Different styles of game. Can radically change the gameplay.

4.11.7 fighter-defense

— Command-line option: --fighter-defense=<value>
— Environment variable: LW6_FIGHTER_DEFENSE
— XML key: fighter-defense

Type: integer

Default value: 50 Min value: 0 Max value: 10000

Defines how fast fighters will regenerate after an attack. When this parameter is set low, an attacked fighter, which is very dark and almost dead will take a very long time to regain energy. If the parameter is set high, it can almost instantaneously regain energy.

4.11.8 fighter-new-health

— Command-line option: --fighter-new-health=<value>
— Environment variable: LW6_FIGHTER_NEW_HEALTH
— XML key: fighter-new-health

Type: integer

Default value: 5000 Min value: 1 Max value: 10000

Defines how healthy fighters will be when they appear on the map. This can be either at the beginning of the game of when a fighter changes team. Setting this low will allow battefields to switch from one side to another very fast, for freshly gained fighters will be feeble and very likely to return to their original camp. To calibrate this parameter, keep in mind that the absolute maximum health a fighter can have is always 10000 (ten-thousands).

4.11.9 fighter-regenerate

— Command-line option: --fighter-regenerate=<value>
— Environment variable: LW6_FIGHTER_REGENERATE
— XML key: fighter-regenerate

Type: integer

Default value: 5 Min value: 0 Max value: 10000

Defines at which speed fighters will self-regenerate, without even begin packed together. This will allow lone fighters to regenerate a bit by hiding somewhere in the map. This is typically a low value, might even be 0.

4.11.10 frags-fade-out

— Command-line option: --frags-fade-out=<value>
— Environment variable: LW6_FRAGS_FADE_OUT
— XML key: frags-fade-out

Type: integer

Default value: 100 Min value: 10 Max value: 100

When a player looses (in deathmatch mode) all player points will be multiplicated by this percentage, for instance if it's 90 and player had 50 points, then player will only have 45 points, then points corresponding to the new death will be added/substrated to its total. This is to avoid players with thousands of points in advance, and keep everyone in the race. A low value will minimize the importance of game start. This is only used in modes where frags are distributed in a proportional way.

4.11.11 frags-mode

— Command-line option: --frags-mode=<value>
— Environment variable: LW6_FRAGS_MODE
— XML key: frags-mode

Type: integer

Default value: 2 Min value: 0 Max value: 3

Defines how points are calculated in deathmatch mode, 0 is old school simple mode. 1 is in a mode in which 1 point is attributed to every winner, and looser looses all the corresponding points (total is always 0). 2 isproportional mode, with a total of 0 kept constant, that is, loosers loose as many points as attributed to winners. 3 is a mode in which at each death, winners are attributed a number of points proportional to their fighters, and loosers scores remain untouched.

4.11.12 frags-to-distribute

— Command-line option: --frags-to-distribute=<value>
— Environment variable: LW6_FRAGS_TO_DISTRIBUTE
— XML key: frags-to-distribute

Type: integer

Default value: 100 Min value: 10 Max value: 1000

Defines how many points will be distributed when in deathmatch mode. When a player looses, this amont of points will be substracted to its total, and the same amount of points will be distributed to other live players, proportionnally to how many fighters they have on the battlefield.

4.11.13 glue-power

— Command-line option: --glue-power=<value>
— Environment variable: LW6_GLUE_POWER
— XML key: glue-power

Type: integer

Default value: 20 Min value: 1 Max value: 100

Defines how sticky and powerfull the glue is. That is, if on 'glue.png' it's pitch black and this parameter is set to 3, then fighters will take 3 steps to do what would normally take only one step.

4.11.14 highest-team-color-allowed

— Command-line option: --highest-team-color-allowed=<value>
— Environment variable: LW6_HIGHEST_TEAM_COLOR_ALLOWED
— XML key: highest-team-color-allowed

Type: integer

Default value: 9 Min value: 3 Max value: 9

Id of the greatest/highest color one can use. Normally, you can leave this untouched, the program will automatically fit this according to your exp. Setting an artificially low value will just cause normally available colors to disappear, setting it to a high value does nothing, if you still don't have access to some colors, you still don't, period.

4.11.15 highest-weapon-allowed

— Command-line option: --highest-weapon-allowed=<value>
— Environment variable: LW6_HIGHEST_WEAPON_ALLOWED
— XML key: highest-weapon-allowed

Type: integer

Default value: 19 Min value: 7 Max value: 19

Id of the greatest/highest weapon one can use. Normally, you can leave this untouched, the program will automatically fit this according to your exp. Setting an artificially low value will just cause normally available weapons to disappear, setting it to a high value does nothing, if you still don't have access to some weapons, you still don't, period.

4.11.16 max-cursor-pot

— Command-line option: --max-cursor-pot=<value>
— Environment variable: LW6_MAX_CURSOR_POT
— XML key: max-cursor-pot

Type: integer

Default value: 1000000 Min value: 50000 Max value: 5000000

Defines the maximum cursor potential. Not really any reason to change it. Any high value should produce the same results. Low values might reveal algorithm bugs and inconsistencies.

4.11.17 max-cursor-pot-offset

— Command-line option: --max-cursor-pot-offset=<value>
— Environment variable: LW6_MAX_CURSOR_POT_OFFSET
— XML key: max-cursor-pot-offset

Type: integer

Default value: 100 Min value: 1 Max value: 10000

Defines the maximum cursor potential offset. The idea is that in some cases, the potential of a cursor can increase in burst mode, for instance to make this cursor more important than others, so that fighters rally to it, neglecting other cursors (talking about a multi-cursor controlled team). This parameter is here to limit this burst effect and avoid bugs.

4.11.18 max-nb-cursors

— Command-line option: --max-nb-cursors=<value>
— Environment variable: LW6_MAX_NB_CURSORS
— XML key: max-nb-cursors

Type: integer

Default value: 26 Min value: 2 Max value: 26

Defines the maximum number of cursors who can enter the game. Really makes sense in network games. Default value is 26, the maximum.

4.11.19 max-nb-nodes

— Command-line option: --max-nb-nodes=<value>
— Environment variable: LW6_MAX_NB_NODES
— XML key: max-nb-nodes

Type: integer

Default value: 12 Min value: 2 Max value: 26

Defines the maximum number of servers who can enter the game. Really makes sense in network games. Default value is 10, and should fit in most cases. Can be raised up to 26.

4.11.20 max-nb-teams

— Command-line option: --max-nb-teams=<value>
— Environment variable: LW6_MAX_NB_TEAMS
— XML key: max-nb-teams

Type: integer

Default value: 10 Min value: 2 Max value: 10

Defines the maximum number of teams who can enter the game. Really makes sense in network games. Default value is 10, the maximum.

4.11.21 max-round-delta

— Command-line option: --max-round-delta=<value>
— Environment variable: LW6_MAX_ROUND_DELTA
— XML key: max-round-delta

Type: integer

Default value: 1000 Min value: 1 Max value: 10000

This is the companion value of 'round-delta'. Will put an absolute limit to the delta, which (what did you think?) is of course incremented in some cases by the core algorithm. If in doubt, don't touch.

4.11.22 max-zone-size

— Command-line option: --max-zone-size=<value>
— Environment variable: LW6_MAX_ZONE_SIZE
— XML key: max-zone-size

Type: integer

Default value: 8 Min value: 1 Max value: 64

Defines the maximum zone size, which is an internal and rather technical parameter. The idea is that to optimize things, Liquid War 6 divides the battlefield in squares, where it can, and tries to make these squares as big as possible, the idea being that everywhere in this square, fighters follow the same intructions. Just a technical optimization. The problem is that setting it too high will reveal the optimization and its tradeoffs to the player, who will see the fighter behave strangely, following invisible paths. Plus, it's ugly. Depending on your tastes (speed, look'n'feel) you'll prefer something nice or something fast. Note that anyways passed a certain value, this does not optimize anything anymore. In doubt, don't touch it.

4.11.23 medicine-power

— Command-line option: --medicine-power=<value>
— Environment variable: LW6_MEDICINE_POWER
— XML key: medicine-power

Type: integer

Default value: 100 Min value: 0 Max value: 10000

Defines how fast fighter will automatically regenerate on black zones defined in 'medicine.png'. The value is used to decrease the fighter health at each move, so you should compare its value to something like 'fighter-defense'. Being on a medicined zone is a bit like being defended by an invisible and unknown friend.

4.11.24 moves-per-round

— Command-line option: --moves-per-round=<value>
— Environment variable: LW6_MOVES_PER_ROUND
— XML key: moves-per-round

Type: integer

Default value: 2 Min value: 1 Max value: 50

Defines how many times fighters move per round. Increasing this will just make fighters move faster, but won't change anything for the rest, that is keyboard and mouse responsivity, and network traffic will stay the same. Multiplying the number of moves per round by the number of rounds per second will give the number of moves per second, which is, in fact, how fast fighters move on the screen.

4.11.25 nb-attack-tries

— Command-line option: --nb-attack-tries=<value>
— Environment variable: LW6_NB_ATTACK_TRIES
— XML key: nb-attack-tries

Type: integer

Default value: 3 Min value: 1 Max value: 7

Defines how many tries a fighter will do before giving-up attacking and choosing another behvior (defense). By tries we mean: how many directions it will try. Going North? Going North-West? Setting this to a low value will make fighters somewhat less aggressive. This idea is that they'll prefer to switch to the next option, that is, defense/regeneration, if there's no opponent right in front of them.

4.11.26 nb-defense-tries

— Command-line option: --nb-defense-tries=<value>
— Environment variable: LW6_NB_DEFENSE_TRIES
— XML key: nb-defense-tries

Type: integer

Default value: 1 Min value: 1 Max value: 7

Defines how many tries a fighter will do before giving-up attacking and choosing another behavior (do nothing). By tries we mean: how many directions it will try. Going North? Going North-West? Setting this to a low value, you'll need a very compact pack of fighters for regeneration to operate, else fighters will hang arround unhealthy.

4.11.27 nb-move-tries

— Command-line option: --nb-move-tries=<value>
— Environment variable: LW6_NB_MOVE_TRIES
— XML key: nb-move-tries

Type: integer

Default value: 5 Min value: 3 Max value: 7

Defines how many tries a fighter will do before giving-up moving and choosing another behvior (attack or defense). By tries we mean: how many directions it will try. Going North? Going North-West? Setting this to a low value, your fighters will look very stubborn and always try to move in one direction, neglecting the fact that they could dodge. This can lead to queues of fighters and other strange behaviors. On the other hand, setting it too high will cause fighter to always avoid the enemy, and groups of fighters will just pass each other without any fight. Matter of taste.

4.11.28 respawn-delay

— Command-line option: --respawn-delay=<value>
— Environment variable: LW6_RESPAWN_DELAY
— XML key: respawn-delay

Type: integer

Default value: 3 Min value: 0 Max value: 30

Delay, in seconds, after which teams reappear on the battlefield, when in deathmatch mode. 0 means team right away.

4.11.29 respawn-position-mode

— Command-line option: --respawn-position-mode=<value>
— Environment variable: LW6_RESPAWN_POSITION_MODE
— XML key: respawn-position-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Defines how teams are set up on the map when respawning. 0 means teams respect the pre-defined start positions. 1 means that a random position will be picked, among the existing positions. That is, red could take green's place. 2 means total randomness, teams can appear anywhere.

4.11.30 respawn-team

— Command-line option: --respawn-team=<value>
— Environment variable: LW6_RESPAWN_TEAM
— XML key: respawn-team

Type: integer

Default value: 1 Min value: 0 Max value: 1

Defines what to do when a team dies. If set to 0, team disappears forever, if set to 1, team reappears automatically with fresh fighters. It's a deathmatch mode, where the winner is not the one who stays alive the longest time, since it makes no real sens in this case, but the one who has died less often than others.

4.11.31 round-delta

— Command-line option: --round-delta=<value>
— Environment variable: LW6_ROUND_DELTA
— XML key: round-delta

Type: integer

Default value: 1 Min value: 0 Max value: 100

Conditions by how much the cursor potential will be incremented each time gradient is spreaded. Sounds cryptic? It is. The idea is that at each time you move your cursor of 1 pixel, theorically, you'll need in the worst case to move of 1 more pixel to reach any point on the map. Of course this is not true but this is the default asumption, and gradient spread will fix that. Only in Liquid War 6 this is not even the worst case, for you can control your cursor with the mouse and cross walls. Whenever you cross a wall, you might have done a great distance from the fighters' point of view, if the map is a maze. Thus this parameter, which corrects things, experience shows it does give acceptable results to increase the cursor potential by more than one at each turn. Toy arround with this if you find fighters take wrong paths on some given map. If in doubt, don't touch.

4.11.32 rounds-per-sec

— Command-line option: --rounds-per-sec=<value>
— Environment variable: LW6_ROUNDS_PER_SEC
— XML key: rounds-per-sec

Type: integer

Default value: 50 Min value: 1 Max value: 200

Defines the overall speed of the game. All other settings being equal, raising this value will cause the game to behave faster. Everything will be faster, except probably the display since your computer will calculate more game positions in a given time and spend more CPU time. It will also increase network traffic. Values between 10 and 50 really make sense.

4.11.33 side-attack-factor

— Command-line option: --side-attack-factor=<value>
— Environment variable: LW6_SIDE_ATTACK_FACTOR
— XML key: side-attack-factor

Type: integer

Default value: 20 Min value: 0 Max value: 100

Defines how hard fighters will attack sideways. It's an algorithm trick, fighters attack by default the opponent right in front, but if there's no fighter there, they will still try to attack someone else, maybe sideways. But doing this their attack is not as strong. This parameter enables you to tune this. This is a percentage.

4.11.34 side-defense-factor

— Command-line option: --side-defense-factor=<value>
— Environment variable: LW6_SIDE_DEFENSE_FACTOR
— XML key: side-defense-factor

Type: integer

Default value: 20 Min value: 0 Max value: 100

Defines how fast fighters will regenerate, when being side by side instead of being right in front of the other. This is a percentage.

4.11.35 single-army-size

— Command-line option: --single-army-size=<value>
— Environment variable: LW6_SINGLE_ARMY_SIZE
— XML key: single-army-size

Type: integer

Default value: 30 Min value: 1 Max value: 95

Defines the proportion of the whole available space, which will be occupied by an army at the beginning of the game. You can either imagine playing with almost empty maps, or play very crowded with almost no space left. This is a percentage, but will be multiplied by itself to get the actual surface. That is, 50 means 50%*50%, that is, a square of 1/2 the size of a square map, so it represents 25% (1/4) of the total surface.

4.11.36 spread-mode

— Command-line option: --spread-mode=<value>
— Environment variable: LW6_SPREAD_MODE
— XML key: spread-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

If set to 1, then gradient spread will be slower but gain in terms of homogeneity and consistency. You could consider setting this to 0 on very very big maps to save CPU cycles, else the default should work fine.

4.11.37 spread-thread

— Command-line option: --spread-thread=<value>
— Environment variable: LW6_SPREAD_THREAD
— XML key: spread-thread

Type: integer

Default value: 0 Min value: 0 Max value: 1

If set to 1, the core algorithm with fire a separate thread to spread the gradient. By default this is turned off (set to 0). Consider this as an experimental feature, the program is already rather heavily threaded, turning this on will probably not offer any significant performance gain, even on SMP systems. This might change in the future.

4.11.38 spreads-per-round

— Command-line option: --spreads-per-round=<value>
— Environment variable: LW6_SPREADS_PER_ROUND
— XML key: spreads-per-round

Type: integer

Default value: 5 Min value: 1 Max value: 100

Defines how many times the gradient is spread per round. Gradient spread is a very Liquid War 6 specific feature, just remember that the more often you do it, the more accurately fighters will move. That is, you will be sure they really take the shortest path. Usually this does not have much effect, the default value should fit in most cases, but you might want to decrease it on very simple maps where the gradient is obvious, or increase it on complex maps where you want fighters to be real smart.

4.11.39 start-blue-x

— Command-line option: --start-blue-x=<value>
— Environment variable: LW6_START_BLUE_X
— XML key: start-blue-x

Type: integer

Default value: 90 Min value: 0 Max value: 100

X start position for the blue team. This is a percentage of map width, value between 0 and 100.

4.11.40 start-blue-y

— Command-line option: --start-blue-y=<value>
— Environment variable: LW6_START_BLUE_Y
— XML key: start-blue-y

Type: integer

Default value: 10 Min value: 0 Max value: 100

Y start position for the blue team. This is a percentage of map height, value between 0 and 100.

4.11.41 start-cyan-x

— Command-line option: --start-cyan-x=<value>
— Environment variable: LW6_START_CYAN_X
— XML key: start-cyan-x

Type: integer

Default value: 35 Min value: 0 Max value: 100

X start position for the cyan team. This is a percentage of map width, value between 0 and 100.

4.11.42 start-cyan-y

— Command-line option: --start-cyan-y=<value>
— Environment variable: LW6_START_CYAN_Y
— XML key: start-cyan-y

Type: integer

Default value: 10 Min value: 0 Max value: 100

Y start position for the cyan team. This is a percentage of map height, value between 0 and 100.

4.11.43 start-green-x

— Command-line option: --start-green-x=<value>
— Environment variable: LW6_START_GREEN_X
— XML key: start-green-x

Type: integer

Default value: 90 Min value: 0 Max value: 100

X start position for the green team. This is a percentage of map width, value between 0 and 100.

4.11.44 start-green-y

— Command-line option: --start-green-y=<value>
— Environment variable: LW6_START_GREEN_Y
— XML key: start-green-y

Type: integer

Default value: 90 Min value: 0 Max value: 100

Y start position for the green team. This is a percentage of map height, value between 0 and 100.

4.11.45 start-lightblue-x

— Command-line option: --start-lightblue-x=<value>
— Environment variable: LW6_START_LIGHTBLUE_X
— XML key: start-lightblue-x

Type: integer

Default value: 35 Min value: 0 Max value: 100

X start position for the lightblue team. This is a percentage of map width, value between 0 and 100.

4.11.46 start-lightblue-y

— Command-line option: --start-lightblue-y=<value>
— Environment variable: LW6_START_LIGHTBLUE_Y
— XML key: start-lightblue-y

Type: integer

Default value: 90 Min value: 0 Max value: 100

Y start position for the lightblue team. This is a percentage of map height, value between 0 and 100.

4.11.47 start-magenta-x

— Command-line option: --start-magenta-x=<value>
— Environment variable: LW6_START_MAGENTA_X
— XML key: start-magenta-x

Type: integer

Default value: 65 Min value: 0 Max value: 100

X start position for the magenta team. This is a percentage of map width, value between 0 and 100.

4.11.48 start-magenta-y

— Command-line option: --start-magenta-y=<value>
— Environment variable: LW6_START_MAGENTA_Y
— XML key: start-magenta-y

Type: integer

Default value: 90 Min value: 0 Max value: 100

Y start position for the magenta team. This is a percentage of map height, value between 0 and 100.

4.11.49 start-orange-x

— Command-line option: --start-orange-x=<value>
— Environment variable: LW6_START_ORANGE_X
— XML key: start-orange-x

Type: integer

Default value: 65 Min value: 0 Max value: 100

X start position for the orange team. This is a percentage of map width, value between 0 and 100.

4.11.50 start-orange-y

— Command-line option: --start-orange-y=<value>
— Environment variable: LW6_START_ORANGE_Y
— XML key: start-orange-y

Type: integer

Default value: 10 Min value: 0 Max value: 100

Y start position for the orange team. This is a percentage of map height, value between 0 and 100.

4.11.51 start-pink-x

— Command-line option: --start-pink-x=<value>
— Environment variable: LW6_START_PINK_X
— XML key: start-pink-x

Type: integer

Default value: 10 Min value: 0 Max value: 100

X start position for the pink team. This is a percentage of map width, value between 0 and 100.

4.11.52 start-pink-y

— Command-line option: --start-pink-y=<value>
— Environment variable: LW6_START_PINK_Y
— XML key: start-pink-y

Type: integer

Default value: 50 Min value: 0 Max value: 100

Y start position for the pink team. This is a percentage of map height, value between 0 and 100.

4.11.53 start-position-mode

— Command-line option: --start-position-mode=<value>
— Environment variable: LW6_START_POSITION_MODE
— XML key: start-position-mode

Type: integer

Default value: 0 Min value: 0 Max value: 2

Defines how teams are set up on the map at game startup. 0 means teams respect the pre-defined start positions. 1 means that a random position will be picked, among the existing positions. That is, red could take green's place. 2 means total randomness, teams can appear anywhere.

4.11.54 start-purple-x

— Command-line option: --start-purple-x=<value>
— Environment variable: LW6_START_PURPLE_X
— XML key: start-purple-x

Type: integer

Default value: 90 Min value: 0 Max value: 100

X start position for the purple team. This is a percentage of map width, value between 0 and 100.

4.11.55 start-purple-y

— Command-line option: --start-purple-y=<value>
— Environment variable: LW6_START_PURPLE_Y
— XML key: start-purple-y

Type: integer

Default value: 50 Min value: 0 Max value: 100

Y start position for the purple team. This is a percentage of map height, value between 0 and 100.

4.11.56 start-red-x

— Command-line option: --start-red-x=<value>
— Environment variable: LW6_START_RED_X
— XML key: start-red-x

Type: integer

Default value: 10 Min value: 0 Max value: 100

X start position for the red team. This is a percentage of map width, value between 0 and 100.

4.11.57 start-red-y

— Command-line option: --start-red-y=<value>
— Environment variable: LW6_START_RED_Y
— XML key: start-red-y

Type: integer

Default value: 10 Min value: 0 Max value: 100

Y start position for the red team. This is a percentage of map height, value between 0 and 100.

4.11.58 start-yellow-x

— Command-line option: --start-yellow-x=<value>
— Environment variable: LW6_START_YELLOW_X
— XML key: start-yellow-x

Type: integer

Default value: 10 Min value: 0 Max value: 100

X start position for the yellow team. This is a percentage of map width, value between 0 and 100.

4.11.59 start-yellow-y

— Command-line option: --start-yellow-y=<value>
— Environment variable: LW6_START_YELLOW_Y
— XML key: start-yellow-y

Type: integer

Default value: 90 Min value: 0 Max value: 100

Y start position for the yellow team. This is a percentage of map height, value between 0 and 100.

4.11.60 team-profile-blue-aggressive

— Command-line option: --team-profile-blue-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_AGGRESSIVE
— XML key: team-profile-blue-aggressive

Type: integer

Default value: 150 Min value: 5 Max value: 2000

Defines how aggressive the blue team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.61 team-profile-blue-fast

— Command-line option: --team-profile-blue-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_FAST
— XML key: team-profile-blue-fast

Type: integer

Default value: 50 Min value: 5 Max value: 2000

Changes the speed of the blue team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.62 team-profile-blue-mobile

— Command-line option: --team-profile-blue-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_MOBILE
— XML key: team-profile-blue-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the blue team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.63 team-profile-blue-vulnerable

— Command-line option: --team-profile-blue-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_VULNERABLE
— XML key: team-profile-blue-vulnerable

Type: integer

Default value: 60 Min value: 5 Max value: 2000

Defines how vulnerable the blue team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.64 team-profile-blue-weapon-alternate-id

— Command-line option: --team-profile-blue-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_WEAPON_ALTERNATE_ID
— XML key: team-profile-blue-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_CONTROL Min value: 0 Max value: 19

Id of the default alternate weapon for the blue team, see the documentation about weapons to know what these ids mean.

4.11.65 team-profile-blue-weapon-id

— Command-line option: --team-profile-blue-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_WEAPON_ID
— XML key: team-profile-blue-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_REWIND Min value: 0 Max value: 19

Id of the default weapon for the blue team, see the documentation about weapons to know what these ids mean.

4.11.66 team-profile-blue-weapon-mode

— Command-line option: --team-profile-blue-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_BLUE_WEAPON_MODE
— XML key: team-profile-blue-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for blue team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.67 team-profile-cyan-aggressive

— Command-line option: --team-profile-cyan-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_AGGRESSIVE
— XML key: team-profile-cyan-aggressive

Type: integer

Default value: 44 Min value: 5 Max value: 2000

Defines how aggressive the cyan team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.68 team-profile-cyan-fast

— Command-line option: --team-profile-cyan-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_FAST
— XML key: team-profile-cyan-fast

Type: integer

Default value: 40 Min value: 5 Max value: 2000

Changes the speed of the cyan team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.69 team-profile-cyan-mobile

— Command-line option: --team-profile-cyan-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_MOBILE
— XML key: team-profile-cyan-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the cyan team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.70 team-profile-cyan-vulnerable

— Command-line option: --team-profile-cyan-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_VULNERABLE
— XML key: team-profile-cyan-vulnerable

Type: integer

Default value: 12 Min value: 5 Max value: 2000

Defines how vulnerable the cyan team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.71 team-profile-cyan-weapon-alternate-id

— Command-line option: --team-profile-cyan-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_WEAPON_ALTERNATE_ID
— XML key: team-profile-cyan-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_REVERSE Min value: 0 Max value: 19

Id of the default alternate weapon for the cyan team, see the documentation about weapons to know what these ids mean.

4.11.72 team-profile-cyan-weapon-id

— Command-line option: --team-profile-cyan-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_WEAPON_ID
— XML key: team-profile-cyan-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_TURBO Min value: 0 Max value: 19

Id of the default weapon for the cyan team, see the documentation about weapons to know what these ids mean.

4.11.73 team-profile-cyan-weapon-mode

— Command-line option: --team-profile-cyan-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_CYAN_WEAPON_MODE
— XML key: team-profile-cyan-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for cyan team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.74 team-profile-green-aggressive

— Command-line option: --team-profile-green-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_AGGRESSIVE
— XML key: team-profile-green-aggressive

Type: integer

Default value: 70 Min value: 5 Max value: 2000

Defines how aggressive the green team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.75 team-profile-green-fast

— Command-line option: --team-profile-green-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_FAST
— XML key: team-profile-green-fast

Type: integer

Default value: 70 Min value: 5 Max value: 2000

Changes the speed of the green team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.76 team-profile-green-mobile

— Command-line option: --team-profile-green-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_MOBILE
— XML key: team-profile-green-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the green team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.77 team-profile-green-vulnerable

— Command-line option: --team-profile-green-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_VULNERABLE
— XML key: team-profile-green-vulnerable

Type: integer

Default value: 30 Min value: 5 Max value: 2000

Defines how vulnerable the green team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.78 team-profile-green-weapon-alternate-id

— Command-line option: --team-profile-green-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_WEAPON_ALTERNATE_ID
— XML key: team-profile-green-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_MIX Min value: 0 Max value: 19

Id of the default alternate weapon for the green team, see the documentation about weapons to know what these ids mean.

4.11.79 team-profile-green-weapon-id

— Command-line option: --team-profile-green-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_WEAPON_ID
— XML key: team-profile-green-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_CRAZY Min value: 0 Max value: 19

Id of the default weapon for the green team, see the documentation about weapons to know what these ids mean.

4.11.80 team-profile-green-weapon-mode

— Command-line option: --team-profile-green-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_GREEN_WEAPON_MODE
— XML key: team-profile-green-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for green team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.81 team-profile-lightblue-aggressive

— Command-line option: --team-profile-lightblue-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_AGGRESSIVE
— XML key: team-profile-lightblue-aggressive

Type: integer

Default value: 200 Min value: 5 Max value: 2000

Defines how aggressive the lightblue team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.82 team-profile-lightblue-fast

— Command-line option: --team-profile-lightblue-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_FAST
— XML key: team-profile-lightblue-fast

Type: integer

Default value: 20 Min value: 5 Max value: 2000

Changes the speed of the lightblue team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.83 team-profile-lightblue-mobile

— Command-line option: --team-profile-lightblue-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_MOBILE
— XML key: team-profile-lightblue-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the lightblue team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.84 team-profile-lightblue-vulnerable

— Command-line option: --team-profile-lightblue-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_VULNERABLE
— XML key: team-profile-lightblue-vulnerable

Type: integer

Default value: 8 Min value: 5 Max value: 2000

Defines how vulnerable the lightblue team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.85 team-profile-lightblue-weapon-alternate-id

— Command-line option: --team-profile-lightblue-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_WEAPON_ALTERNATE_ID
— XML key: team-profile-lightblue-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_KAMIKAZE Min value: 0 Max value: 19

Id of the default alternate weapon for the lightblue team, see the documentation about weapons to know what these ids mean.

4.11.86 team-profile-lightblue-weapon-id

— Command-line option: --team-profile-lightblue-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_WEAPON_ID
— XML key: team-profile-lightblue-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_TELEPORT Min value: 0 Max value: 19

Id of the default weapon for the lightblue team, see the documentation about weapons to know what these ids mean.

4.11.87 team-profile-lightblue-weapon-mode

— Command-line option: --team-profile-lightblue-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_LIGHTBLUE_WEAPON_MODE
— XML key: team-profile-lightblue-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for lightblue team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.88 team-profile-magenta-aggressive

— Command-line option: --team-profile-magenta-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_AGGRESSIVE
— XML key: team-profile-magenta-aggressive

Type: integer

Default value: 192 Min value: 5 Max value: 2000

Defines how aggressive the magenta team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.89 team-profile-magenta-fast

— Command-line option: --team-profile-magenta-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_FAST
— XML key: team-profile-magenta-fast

Type: integer

Default value: 320 Min value: 5 Max value: 2000

Changes the speed of the magenta team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.90 team-profile-magenta-mobile

— Command-line option: --team-profile-magenta-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_MOBILE
— XML key: team-profile-magenta-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the magenta team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.91 team-profile-magenta-vulnerable

— Command-line option: --team-profile-magenta-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_VULNERABLE
— XML key: team-profile-magenta-vulnerable

Type: integer

Default value: 1920 Min value: 5 Max value: 2000

Defines how vulnerable the magenta team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.92 team-profile-magenta-weapon-alternate-id

— Command-line option: --team-profile-magenta-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_WEAPON_ALTERNATE_ID
— XML key: team-profile-magenta-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_ATTRACT Min value: 0 Max value: 19

Id of the default alternate weapon for the magenta team, see the documentation about weapons to know what these ids mean.

4.11.93 team-profile-magenta-weapon-id

— Command-line option: --team-profile-magenta-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_WEAPON_ID
— XML key: team-profile-magenta-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_FIX Min value: 0 Max value: 19

Id of the default weapon for the magenta team, see the documentation about weapons to know what these ids mean.

4.11.94 team-profile-magenta-weapon-mode

— Command-line option: --team-profile-magenta-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_MAGENTA_WEAPON_MODE
— XML key: team-profile-magenta-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for magenta team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.95 team-profile-orange-aggressive

— Command-line option: --team-profile-orange-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_AGGRESSIVE
— XML key: team-profile-orange-aggressive

Type: integer

Default value: 48 Min value: 5 Max value: 2000

Defines how aggressive the orange team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.96 team-profile-orange-fast

— Command-line option: --team-profile-orange-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_FAST
— XML key: team-profile-orange-fast

Type: integer

Default value: 160 Min value: 5 Max value: 2000

Changes the speed of the orange team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.97 team-profile-orange-mobile

— Command-line option: --team-profile-orange-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_MOBILE
— XML key: team-profile-orange-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the orange team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.98 team-profile-orange-vulnerable

— Command-line option: --team-profile-orange-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_VULNERABLE
— XML key: team-profile-orange-vulnerable

Type: integer

Default value: 144 Min value: 5 Max value: 2000

Defines how vulnerable the orange team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.99 team-profile-orange-weapon-alternate-id

— Command-line option: --team-profile-orange-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_WEAPON_ALTERNATE_ID
— XML key: team-profile-orange-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_SHRINK Min value: 0 Max value: 19

Id of the default alternate weapon for the orange team, see the documentation about weapons to know what these ids mean.

4.11.100 team-profile-orange-weapon-id

— Command-line option: --team-profile-orange-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_WEAPON_ID
— XML key: team-profile-orange-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_BERZERK Min value: 0 Max value: 19

Id of the default weapon for the orange team, see the documentation about weapons to know what these ids mean.

4.11.101 team-profile-orange-weapon-mode

— Command-line option: --team-profile-orange-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_ORANGE_WEAPON_MODE
— XML key: team-profile-orange-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for orange team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.102 team-profile-pink-aggressive

— Command-line option: --team-profile-pink-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_AGGRESSIVE
— XML key: team-profile-pink-aggressive

Type: integer

Default value: 640 Min value: 5 Max value: 2000

Defines how aggressive the pink team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.103 team-profile-pink-fast

— Command-line option: --team-profile-pink-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_FAST
— XML key: team-profile-pink-fast

Type: integer

Default value: 80 Min value: 5 Max value: 2000

Changes the speed of the pink team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.104 team-profile-pink-mobile

— Command-line option: --team-profile-pink-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_MOBILE
— XML key: team-profile-pink-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the pink team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.105 team-profile-pink-vulnerable

— Command-line option: --team-profile-pink-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_VULNERABLE
— XML key: team-profile-pink-vulnerable

Type: integer

Default value: 640 Min value: 5 Max value: 2000

Defines how vulnerable the pink team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.106 team-profile-pink-weapon-alternate-id

— Command-line option: --team-profile-pink-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_WEAPON_ALTERNATE_ID
— XML key: team-profile-pink-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_PLAGUE Min value: 0 Max value: 19

Id of the default alternate weapon for the pink team, see the documentation about weapons to know what these ids mean.

4.11.107 team-profile-pink-weapon-id

— Command-line option: --team-profile-pink-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_WEAPON_ID
— XML key: team-profile-pink-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_INVINCIBLE Min value: 0 Max value: 19

Id of the default weapon for the pink team, see the documentation about weapons to know what these ids mean.

4.11.108 team-profile-pink-weapon-mode

— Command-line option: --team-profile-pink-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_PINK_WEAPON_MODE
— XML key: team-profile-pink-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for pink team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.109 team-profile-purple-aggressive

— Command-line option: --team-profile-purple-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_AGGRESSIVE
— XML key: team-profile-purple-aggressive

Type: integer

Default value: 32 Min value: 5 Max value: 2000

Defines how aggressive the purple team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.110 team-profile-purple-fast

— Command-line option: --team-profile-purple-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_FAST
— XML key: team-profile-purple-fast

Type: integer

Default value: 80 Min value: 5 Max value: 2000

Changes the speed of the purple team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.111 team-profile-purple-mobile

— Command-line option: --team-profile-purple-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_MOBILE
— XML key: team-profile-purple-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the purple team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.112 team-profile-purple-vulnerable

— Command-line option: --team-profile-purple-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_VULNERABLE
— XML key: team-profile-purple-vulnerable

Type: integer

Default value: 16 Min value: 5 Max value: 2000

Defines how vulnerable the purple team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.113 team-profile-purple-weapon-alternate-id

— Command-line option: --team-profile-purple-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_WEAPON_ALTERNATE_ID
— XML key: team-profile-purple-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_DISAPPEAR Min value: 0 Max value: 19

Id of the default alternate weapon for the purple team, see the documentation about weapons to know what these ids mean.

4.11.114 team-profile-purple-weapon-id

— Command-line option: --team-profile-purple-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_WEAPON_ID
— XML key: team-profile-purple-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_ATOMIC Min value: 0 Max value: 19

Id of the default weapon for the purple team, see the documentation about weapons to know what these ids mean.

4.11.115 team-profile-purple-weapon-mode

— Command-line option: --team-profile-purple-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_PURPLE_WEAPON_MODE
— XML key: team-profile-purple-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for purple team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.116 team-profile-red-aggressive

— Command-line option: --team-profile-red-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_AGGRESSIVE
— XML key: team-profile-red-aggressive

Type: integer

Default value: 220 Min value: 5 Max value: 2000

Defines how aggressive the red team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.117 team-profile-red-fast

— Command-line option: --team-profile-red-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_FAST
— XML key: team-profile-red-fast

Type: integer

Default value: 160 Min value: 5 Max value: 2000

Changes the speed of the red team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.118 team-profile-red-mobile

— Command-line option: --team-profile-red-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_MOBILE
— XML key: team-profile-red-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the red team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.119 team-profile-red-vulnerable

— Command-line option: --team-profile-red-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_VULNERABLE
— XML key: team-profile-red-vulnerable

Type: integer

Default value: 110 Min value: 5 Max value: 2000

Defines how vulnerable the red team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.120 team-profile-red-weapon-alternate-id

— Command-line option: --team-profile-red-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_WEAPON_ALTERNATE_ID
— XML key: team-profile-red-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_ESCAPE Min value: 0 Max value: 19

Id of the default alternate weapon for the red team, see the documentation about weapons to know what these ids mean.

4.11.121 team-profile-red-weapon-id

— Command-line option: --team-profile-red-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_WEAPON_ID
— XML key: team-profile-red-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_STEAL Min value: 0 Max value: 19

Id of the default weapon for the red team, see the documentation about weapons to know what these ids mean.

4.11.122 team-profile-red-weapon-mode

— Command-line option: --team-profile-red-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_RED_WEAPON_MODE
— XML key: team-profile-red-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for red team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.123 team-profile-yellow-aggressive

— Command-line option: --team-profile-yellow-aggressive=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_AGGRESSIVE
— XML key: team-profile-yellow-aggressive

Type: integer

Default value: 200 Min value: 5 Max value: 2000

Defines how aggressive the yellow team is. This is a percentage, if set to 200 then team will attack twice as much as any other team with the default value. Setting this to a high value clearly advantages this team.

4.11.124 team-profile-yellow-fast

— Command-line option: --team-profile-yellow-fast=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_FAST
— XML key: team-profile-yellow-fast

Type: integer

Default value: 70 Min value: 5 Max value: 2000

Changes the speed of the yellow team. This is a percentage, if set to 50, then team will move twice slower than other teams with the default parameter. Setting this high is very likely to advantage the team.

4.11.125 team-profile-yellow-mobile

— Command-line option: --team-profile-yellow-mobile=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_MOBILE
— XML key: team-profile-yellow-mobile

Type: integer

Default value: 0 Min value: -3 Max value: 3

Increases (or decreases if negative) the number of move/attack/defense tries for the yellow team. If set to a high value team will appear more mobile and do more things, but it won't change its cruising speed. It's not obvious to tell wether this is an advantage or not, but it clearly changes the behavior.

4.11.126 team-profile-yellow-vulnerable

— Command-line option: --team-profile-yellow-vulnerable=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_VULNERABLE
— XML key: team-profile-yellow-vulnerable

Type: integer

Default value: 90 Min value: 5 Max value: 2000

Defines how vulnerable the yellow team is. This is a percentage, if set to 200 then team will be attacked twice as much as any other team with the default value. Setting this to a high value clearly disadvantages this team.

4.11.127 team-profile-yellow-weapon-alternate-id

— Command-line option: --team-profile-yellow-weapon-alternate-id=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_WEAPON_ALTERNATE_ID
— XML key: team-profile-yellow-weapon-alternate-id

Type: integer

Default value: LW6MAP_WEAPON_PERMUTATION Min value: 0 Max value: 19

Id of the default alternate weapon for the yellow team, see the documentation about weapons to know what these ids mean.

4.11.128 team-profile-yellow-weapon-id

— Command-line option: --team-profile-yellow-weapon-id=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_WEAPON_ID
— XML key: team-profile-yellow-weapon-id

Type: integer

Default value: LW6MAP_WEAPON_SCATTER Min value: 0 Max value: 19

Id of the default weapon for the yellow team, see the documentation about weapons to know what these ids mean.

4.11.129 team-profile-yellow-weapon-mode

— Command-line option: --team-profile-yellow-weapon-mode=<value>
— Environment variable: LW6_TEAM_PROFILE_YELLOW_WEAPON_MODE
— XML key: team-profile-yellow-weapon-mode

Type: integer

Default value: 1 Min value: 0 Max value: 2

Weapon mode for yellow team. 0 means there's no weapon, 1 means one weapon per team, defined by the weapon-id parameter, 2 means random weapon.

4.11.130 total-armies-size

— Command-line option: --total-armies-size=<value>
— Environment variable: LW6_TOTAL_ARMIES_SIZE
— XML key: total-armies-size

Type: integer

Default value: 60 Min value: 1 Max value: 95

Defines the proportion of the whole available space, which can be occupied by all the armies present together. Setting this low, whenever a new team arrives on the map, fighters might be stolen to other teams, otherwise the ame would get too crowded. This allows you to play with reasonnably enough fighters with 2 players, while still allowing interesting gameplay with many players. This is a percentage, but will be multiplied by itself to get the actual surface. That is, 50 means 50%*50%, that is, a square of 1/2 the size of a square map, so it represents 25% (1/4) of the total surface.

4.11.131 total-time

— Command-line option: --total-time=<value>
— Environment variable: LW6_TOTAL_TIME
— XML key: total-time

Type: integer

Default value: 900 Min value: 10 Max value: 864000

Defines the maximum time of the game, in seconds. Note that in some cases, the game can end much earlier if some player has managed to win before the bell rings. Also, technically, this value will be translated into rounds and moves, and the game engine will wait until enough rounds and moves have been played. So if the computer is too slow and the desired speed is not reached, then the game will last for a longer time.

4.11.132 use-team-profiles

— Command-line option: --use-team-profiles=<value>
— Environment variable: LW6_USE_TEAM_PROFILES
— XML key: use-team-profiles

Type: integer

Default value: 1 Min value: 0 Max value: 1

If set, then all the team-profile-... values will be taken in account. This enables a mode in which teams behave differently according to their colors. If you disable this, then all teams will behave the same, which is more fair, but might not be as fun.

4.11.133 vertical-move

— Command-line option: --vertical-move=<value>
— Environment variable: LW6_VERTICAL_MOVE
— XML key: vertical-move

Type: integer

Default value: 1 Min value: 0 Max value: 7

Defines when to process a vertical move (along the Z 'depth' axis). If set to 0, fighters never spontaneously move along this axis. If set to 1, it will be tried just after the first move failed. If set to 2, it will be tried just after the second move failed. And so on.

4.11.134 weapon-charge-delay

— Command-line option: --weapon-charge-delay=<value>
— Environment variable: LW6_WEAPON_CHARGE_DELAY
— XML key: weapon-charge-delay

Type: integer

Default value: 30 Min value: 1 Max value: 600

How long it will take for weapons to charge and be usable, by default. Unit is seconds.

4.11.135 weapon-charge-max

— Command-line option: --weapon-charge-max=<value>
— Environment variable: LW6_WEAPON_CHARGE_MAX
— XML key: weapon-charge-max

Type: integer

Default value: 200 Min value: 100 Max value: 1000

Maximum (percentage) of charge intensity that one have. For instance, if this is 400, then if you wait four times more than required before firing, then you weapon will have four times its default power, but if you wait five times more it will still be four times more powerfull, it's just the limit after which it's useless to charge.

4.11.136 weapon-duration

— Command-line option: --weapon-duration=<value>
— Environment variable: LW6_WEAPON_DURATION
— XML key: weapon-duration

Type: integer

Default value: 3 Min value: 1 Max value: 60

How long all weapons (for which duration makes sense) will last. Unit is seconds.

4.11.137 weapon-tune-berzerk-power

— Command-line option: --weapon-tune-berzerk-power=<value>
— Environment variable: LW6_WEAPON_TUNE_BERZERK_POWER
— XML key: weapon-tune-berzerk-power

Type: integer

Default value: 3 Min value: 1 Max value: 100

Use to specifiy how strong berzerk mode is, if set to 3, then attacks will be 3 times as efficient in berzerk mode.

4.11.138 weapon-tune-turbo-power

— Command-line option: --weapon-tune-turbo-power=<value>
— Environment variable: LW6_WEAPON_TUNE_TURBO_POWER
— XML key: weapon-tune-turbo-power

Type: integer

Default value: 3 Min value: 1 Max value: 10

Defines how fast fighters move in turbo mode, if set to 3, then fighters move and act 3 times as fast.

4.11.139 x-polarity

— Command-line option: --x-polarity=<value>
— Environment variable: LW6_X_POLARITY
— XML key: x-polarity

Type: integer

Default value: 0 Min value: -1 Max value: 1

Defines how the map will be wrapped on the X (horizontal) axis. If set to 0, nothing is wrapped. If set to 1, the right and left borders are connected, any fighter can disappear on the right border and reappear on the left border, for instance. If set to -1, it will be wrapped but also inversed, that is on a 320x240 map, a fighter disappearing on the left border at position (0,60) will reapper on the right border at position (319,180). You can combine it with 'y-polarity'.

4.11.140 y-polarity

— Command-line option: --y-polarity=<value>
— Environment variable: LW6_Y_POLARITY
— XML key: y-polarity

Type: integer

Default value: 0 Min value: -1 Max value: 1

Defines how the map will be wrapped on the Y (vertical) axis. If set to 0, nothing is wrapped. If set to 1, the top and bottom borders are connected, any fighter can disappear on the top border and reappear on the bottom border, for instance. If set to -1, it will be wrapped but also inversed, that is on a 320x240 map, a fighter disappearing on the bottom border at position (40,239) will reapper on the top border at position (280,0). You can combine it with 'x-polarity'.

4.11.141 z-polarity

— Command-line option: --z-polarity=<value>
— Environment variable: LW6_Z_POLARITY
— XML key: z-polarity

Type: integer

Default value: 0 Min value: 0 Max value: 1

Defines how the map will be wrapped on the Z (deep) axis. If set to 0, nothing is wrapped. If set to 1, when using a 4 layer map, for instance, fighters on layer 1 will be able to go directly to layer 4 even if layers 2 and 3 are filled with walls. A value of -1 is forbidden, this is not like x and y axis, it does not really make sense. Consider this an advanced setting which might save a layer in some tricky cases, the default value of 0 should fit in most cases.


Next: , Previous: Map rules.xml, Up: Reference

4.12 Map hints.xml

4.12.1 background-color-auto

— Command-line option: --background-color-auto=<value>
— Environment variable: LW6_BACKGROUND_COLOR_AUTO
— XML key: background-color-auto

Type: boolean

Default value: true

Defines wether hud colors will be set automatically from base and alternate colors. This is a time saver to keep map designers from requiring to redefined every single color in the game. You only need to set color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg. Then hud_color_frame_bg, hud_color_frame_fg, hud_color_text_bg and hud_color_text_fg will be automatically set.

4.12.2 downsize-using-bench-value

— Command-line option: --downsize-using-bench-value=<value>
— Environment variable: LW6_DOWNSIZE_USING_BENCH_VALUE
— XML key: downsize-using-bench-value

Type: boolean

Default value: true

If set, then the game will automatically downsize a map according to the 'bench-value' parameter. Downsizing means: a 1600x1200 maps becomes 200x150, for instance. Downsizing causes fighters to be bigger because map resolution is lower. This will avoid running the game on a too big map, with your computer not being able to handle it at the required speed.

4.12.3 downsize-using-fighter-scale

— Command-line option: --downsize-using-fighter-scale=<value>
— Environment variable: LW6_DOWNSIZE_USING_FIGHTER_SCALE
— XML key: downsize-using-fighter-scale

Type: boolean

Default value: false

If set, then the game will automatically downsize a map according to the 'fighter-scale' parameter. Downsizing means: a 1600x1200 maps becomes 200x150, for instance. Downsizing causes fighters to be bigger because map resolution is lower. This can be usefull if you don't want fighters to be too small.

4.12.4 fighter-scale

— Command-line option: --fighter-scale=<value>
— Environment variable: LW6_FIGHTER_SCALE
— XML key: fighter-scale

Type: float

Default value: 1.0

Defines how wide (in pixels) fighters must be. This parameter is very important and will largely condition the number of fighters on the map. It is used when loading the map. If it is, for instance, set to 1, there will be exactly a fighter per pixel on the screen. That is, if you play 640x480 on an empty map, the maximum fighters you could have is about 300000. The idea is that by changing the resolution, you also define the density of the map. In pratice, this is done in the hope that someone with a slow computer will pick up a low resolution and therefore play small levels. Conversely, someone with a brand new computer with powerfull CPU & GPU will use great resolutions and be happy with many fighters on the map. Still, changing the resolution after loading the map will not affet the number of fighters. Same for network games, the first player, who loads the map, defines its properties according to its own settings.

4.12.5 guess-colors

— Command-line option: --guess-colors=<value>
— Environment variable: LW6_GUESS_COLORS
— XML key: guess-colors

Type: boolean

Default value: true

Defines wether colors should be set automatically from texture colors. If set to true, then the program will try to pick up colors automatically from the texture, and will override the values of the color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg parameters. How these colors are picked up can't be garanteed, so if the map does not have strong contrast or if there can be any form of ambiguity, it's safe to set this to false and define one's own colors.

4.12.6 guess-moves-per-sec

— Command-line option: --guess-moves-per-sec=<value>
— Environment variable: LW6_GUESS_MOVES_PER_SEC
— XML key: guess-moves-per-sec

Type: boolean

Default value: true

If set, then loader will use 'time-to-cross-level' to guess the game speed parameters.

4.12.7 hud-color-auto

— Command-line option: --hud-color-auto=<value>
— Environment variable: LW6_HUD_COLOR_AUTO
— XML key: hud-color-auto

Type: boolean

Default value: true

Defines wether hud colors will be set automatically from base and alternate colors. This is a time saver to keep map designers from requiring to redefined every single color in the game. You only need to set color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg. Then hud_color_frame_bg, hud_color_frame_fg, hud_color_text_bg and hud_color_text_fg will be automatically set.

4.12.8 max-map-height

— Command-line option: --max-map-height=<value>
— Environment variable: LW6_MAX_MAP_HEIGHT
— XML key: max-map-height

Type: integer

Default value: 1000

Allows you to give a maximum map height. When designing a map you might wonder: this is dumb I'm conceiving this map I know its height, why should I limit it? Now think of the play who plays on a old slowish computer with a tiny screen. He might redefine this himself, and does not necessarly wishes to fire Gimp to rescale the map.

4.12.9 max-map-surface

— Command-line option: --max-map-surface=<value>
— Environment variable: LW6_MAX_MAP_SURFACE
— XML key: max-map-surface

Type: integer

Default value: 1000000

Allows you to give a maximum map surface. Map surface is simply (width * height). This parameter is just here to save you the hassle of defining both 'max-map-width' and 'max-map-height' in a consistent manner.

4.12.10 max-map-width

— Command-line option: --max-map-width=<value>
— Environment variable: LW6_MAX_MAP_WIDTH
— XML key: max-map-width

Type: integer

Default value: 1500

Allows you to give a maximum map width. When designing a map you might wonder: this is dumb I'm conceiving this map I know its width, why should I limit it? Now think of the play who plays on a old slowish computer with a tiny screen. He might redefine this himself, and does not necessarly wishes to fire Gimp to rescale the map.

4.12.11 menu-color-auto

— Command-line option: --menu-color-auto=<value>
— Environment variable: LW6_MENU_COLOR_AUTO
— XML key: menu-color-auto

Type: boolean

Default value: true

Defines wether menu colors will be set automatically from base and alternate colors. This is a time saver to keep map designers from requiring to redefined every single color in the game. You only need to set color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg. Then menu_color_default_bg, menu_color_default_fg, menu_color_selected_bg, menu_color_selected_fg, menu_color_disabled_bg and menu_color_disabled_fg will be automatically set.

4.12.12 min-map-height

— Command-line option: --min-map-height=<value>
— Environment variable: LW6_MIN_MAP_HEIGHT
— XML key: min-map-height

Type: integer

Default value: 30

Allows you to give a minimum map height. When designing a map you might wonder: this is dumb I'm conceiving this map I know its height, why should I limit it? Now think of the player who decided to play with highly-defined maps because he has a super calculator and a hudge screen. He might redefine this himself, and does not necessarly wishes to fire Gimp to rescale the map.

4.12.13 min-map-surface

— Command-line option: --min-map-surface=<value>
— Environment variable: LW6_MIN_MAP_SURFACE
— XML key: min-map-surface

Type: integer

Default value: 3600

Allows you to give a minimum map surface. Map surface is simply (width * height). This parameter is just here to save you the hassle of defining both 'min-map-width' and 'min-map-height' in a consistent manner.

4.12.14 min-map-width

— Command-line option: --min-map-width=<value>
— Environment variable: LW6_MIN_MAP_WIDTH
— XML key: min-map-width

Type: integer

Default value: 40

Allows you to give a minimum map width. When designing a map you might wonder: this is dumb I'm conceiving this map I know its width, why should I limit it? Now think of the player who decided to play with highly-defined maps because he has a super calculator and a hudge screen. He might redefine this himself, and does not necessarly wishes to fire Gimp to rescale the map.

4.12.15 resample

— Command-line option: --resample=<value>
— Environment variable: LW6_RESAMPLE
— XML key: resample

Type: boolean

Default value: true

If set to true, maps will always be resampled to a size which depends on your screen resolution, zoom factor, and the rest. If false, maps will be set at the exact resolution of map.png.

4.12.16 speed

— Command-line option: --speed=<value>
— Environment variable: LW6_SPEED
— XML key: speed

Type: float

Default value: 1.0

This parameter is the main parameter on which game speed depends. The map loader will garantee, by downscaling the map, that to cross the level (by crossing the level we mean, for instance, going from top-left corner to bottom-right corner in a straight line) a fighter will take a constant amount of time. Under the hood, the loader might of course rescale the map but it will also change game speed so that, at the end, fighters take a constant time to cross the level. This is, indeed, the most important thing, players do not care much if internally there are X or Y moves per second, the global game experience depends on how fast fighter movement looks on the screen. The default settings corresponds roughly to one second to cross the level. If you set this to 2.0, it will go twice faster.

4.12.17 system-color-auto

— Command-line option: --system-color-auto=<value>
— Environment variable: LW6_SYSTEM_COLOR_AUTO
— XML key: system-color-auto

Type: boolean

Default value: true

Defines wether system colors will be set automatically from base and alternate colors. This is a time saver to keep map designers from requiring to redefined every single color in the game. You only need to set color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg. Then system_color_bg and system_color_fg will be automatically set.

4.12.18 upsize-using-bench-value

— Command-line option: --upsize-using-bench-value=<value>
— Environment variable: LW6_UPSIZE_USING_BENCH_VALUE
— XML key: upsize-using-bench-value

Type: boolean

Default value: false

If set, then the game will automatically upsize a map according to the 'fighter-scale' parameter. Upsizing means: a 160x120 maps becomes 400x300, for instance. Upsizing causes fighters to be smaller because map resolution is higher. This will avoid useless pixelish 'jumbo fighters' look when your computer is powerfull enough to do better.

4.12.19 upsize-using-fighter-scale

— Command-line option: --upsize-using-fighter-scale=<value>
— Environment variable: LW6_UPSIZE_USING_FIGHTER_SCALE
— XML key: upsize-using-fighter-scale

Type: boolean

Default value: true

If set, then the game will automatically upsize a map according to the 'fighter-scale' parameter. Upsizing means: a 160x120 maps becomes 400x300, for instance. Upsizing causes fighters to be smaller because map resolution is higher. This can be usefull if you don't want fighters to be too big.

4.12.20 view-color-auto

— Command-line option: --view-color-auto=<value>
— Environment variable: LW6_VIEW_COLOR_AUTO
— XML key: view-color-auto

Type: boolean

Default value: true

Defines wether view colors will be set automatically from base and alternate colors. This is a time saver to keep map designers from requiring to redefined every single color in the game. You only need to set color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg. Then view_color_cursor_bg, view_color_cursor_fg, view_color_map_bg and view_color_map_fg will be automatically set.

4.12.21 wall-grease

— Command-line option: --wall-grease=<value>
— Environment variable: LW6_WALL_GREASE
— XML key: wall-grease

Type: integer

Default value: 0 Min value: -5 Max value: 5

This parameter allows you to make walls (AKA map foreground) thicker, or thiner, when map is loaded. Indeed, when map are resampled, and especially when they are downscaled, some walls may disappear, or some passages may be blocked. The loader can't automatically figure out wether it's more important to keep an existing wall or to keep an open passage for fighters. This parameter helps doing so, if you set it to a low value, level will be less greasy, and many passages might open themselves. On the contrary, if grease is at a high level, then a thin line of almost isolated pixels might become a thick wall. There's no real garantee your wall or passage will always be present, but it's a same bet to assume on a 'tunnel-like' level one needs to set grease to a low value, and on a 'wide open' level with few walls one needs to set grease to a high value.


Next: , Previous: Map hints.xml, Up: Reference

4.13 Map style.xml

4.13.1 animation-density

— Command-line option: --animation-density=<value>
— Environment variable: LW6_ANIMATION_DENSITY
— XML key: animation-density

Type: float

Default value: 1.0f Min value: 0 Max value: 10

Density of the background animation, that is, for instance, if the background animation is about displaying bubbles, using a high value will display many bubbles. A value of 1.0 corresponds to the default setting.

4.13.2 animation-speed

— Command-line option: --animation-speed=<value>
— Environment variable: LW6_ANIMATION_SPEED
— XML key: animation-speed

Type: float

Default value: 1.0f Min value: 0 Max value: 10

Speed of the background animation, that is, for instance, if the background animation is about displaying bubbles, using a high value will cause bubbles to move very fast. A value of 1.0 corresponds to the default setting.

4.13.3 background-color-root-bg

— Command-line option: --background-color-root-bg=<value>
— Environment variable: LW6_BACKGROUND_COLOR_ROOT_BG
— XML key: background-color-root-bg

Type: color

Default value: #000

Defines the main background color. This is, for instance, the color which will be used to clear the screen before drawing thing. Will be automatically guessed from the map texture if color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.4 background-color-root-fg

— Command-line option: --background-color-root-fg=<value>
— Environment variable: LW6_BACKGROUND_COLOR_ROOT_FG
— XML key: background-color-root-fg

Type: color

Default value: #ccc

Defines a color which will be used together with color-base-bg to compose the background. It can be wise to have a minimum contrast between this color and color-base-bg, but it is not mandatory, especially if other colors are manually redefined. Will be automatically guessed from the map texture if color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.5 background-color-stuff-bg

— Command-line option: --background-color-stuff-bg=<value>
— Environment variable: LW6_BACKGROUND_COLOR_STUFF_BG
— XML key: background-color-stuff-bg

Type: color

Default value: #333

Defines a color which will be used together with color-alternate-fg to draw things (animations, sprites, text, whatever) in the background. It should be different enough from color-alternate-fg so that one can really distinguish these colors. Will be automatically guessed from the map texture if color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.6 background-color-stuff-fg

— Command-line option: --background-color-stuff-fg=<value>
— Environment variable: LW6_BACKGROUND_COLOR_STUFF_FG
— XML key: background-color-stuff-fg

Type: color

Default value: #fff

Defines a color which will be used to draw things (animations, sprites, text, whatever) in the background. It should be different enough from color-alternate-bg so that one can really distinguish these colors. Think of this as the sprite, the text, the whatever-needs-to-be-seen-uses-this color. Will be automatically guessed from the map texture if color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.7 background-style

— Command-line option: --background-style=<value>
— Environment variable: LW6_BACKGROUND_STYLE
— XML key: background-style

Type: string

Default value: bubbles

The background defines, of course, what is displayed at the background, but it also conditions the colors used for other items, such as the menus for instance. The possible values are 'void' and 'bubbles'.

4.13.8 blink-cursor

— Command-line option: --blink-cursor=<value>
— Environment variable: LW6_BLINK_CURSOR
— XML key: blink-cursor

Type: boolean

Default value: false

If set, then cursor will blink, allowing you to see what's under the cursor. It's just a matter of taste, you might to always have your cursor displayed, or prefer to have it disappear from time to time so that you can see the action below

4.13.9 color-alternate-bg

— Command-line option: --color-alternate-bg=<value>
— Environment variable: LW6_COLOR_ALTERNATE_BG
— XML key: color-alternate-bg

Type: color

Default value: #333

Defines the alternate color, more precisely, its bg (background) part. Colors are always defined by a bg/fg pair. Most colors in the game can be deduced from this one, usually to color a map you only need to define color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg.

4.13.10 color-alternate-fg

— Command-line option: --color-alternate-fg=<value>
— Environment variable: LW6_COLOR_ALTERNATE_FG
— XML key: color-alternate-fg

Type: color

Default value: #fff

Defines the alternate color, more precisely, its fg (foreground) part. Colors are always defined by a bg/fg pair. Most colors in the game can be deduced from this one, usually to color a map you only need to define color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg.

4.13.11 color-base-bg

— Command-line option: --color-base-bg=<value>
— Environment variable: LW6_COLOR_BASE_BG
— XML key: color-base-bg

Type: color

Default value: #000

Defines the base color, more precisely, its bg (background) part. Colors are always defined by a bg/fg pair. Most colors in the game can be deduced from this one, usually to color a map you only need to define color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg.

4.13.12 color-base-fg

— Command-line option: --color-base-fg=<value>
— Environment variable: LW6_COLOR_BASE_FG
— XML key: color-base-fg

Type: color

Default value: #ccc

Defines the base color, more precisely, its fg (foreground) part. Colors are always defined by a bg/fg pair. Most colors in the game can be deduced from this one, usually to color a map you only need to define color-base-bg, color-base-fg, color-alternate-bg and color-alternate-fg.

4.13.13 colorize

— Command-line option: --colorize=<value>
— Environment variable: LW6_COLORIZE
— XML key: colorize

Type: boolean

Default value: true

If set, then all background drawings including textures will use the background colors. This means, for instance, that if background colors are set automatically by color-auto from the map texture, then the background will adopt the same range of colors than the map itself. In short, the background will mimic the map.

4.13.14 colorize-cursor

— Command-line option: --colorize-cursor=<value>
— Environment variable: LW6_COLORIZE_CURSOR
— XML key: colorize-cursor

Type: boolean

Default value: true

If set, then all cursors will use the automatic guessed colors, or the specified colors, but basically they won't be displayed using their native colors. This can be usefull for you can wish to use a generic non-colored texture for your cursor and let it be colorized automatically so that it's accorded to the level.

4.13.15 cursor-size

— Command-line option: --cursor-size=<value>
— Environment variable: LW6_CURSOR_SIZE
— XML key: cursor-size

Type: float

Default value: 1.0f Min value: 0 Max value: 10

Size of the cursors on the map. 1 is the default, setting it to a higher value will make cursors bigger, a lower value will make them smaller.

4.13.16 hidden-layer-alpha

— Command-line option: --hidden-layer-alpha=<value>
— Environment variable: LW6_HIDDEN_LAYER_ALPHA
— XML key: hidden-layer-alpha

Type: float

Default value: 0.1f Min value: 0 Max value: 1

Whenever players are supposed to be hidden behind a wall, for instance if they are in layer 2 and layer 1 is filled with walls, it's still possible to see them, but with a low alpha value (almost transparent). This parameter allows you to trick this value, 0 will make these players absolutely invisible, 1 will make them totally opaque, like if they were on layer 1.

4.13.17 hud-color-frame-bg

— Command-line option: --hud-color-frame-bg=<value>
— Environment variable: LW6_HUD_COLOR_FRAME_BG
— XML key: hud-color-frame-bg

Type: color

Default value: #000

Defines the background color for the hud frame. Ignored if hud-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.18 hud-color-frame-fg

— Command-line option: --hud-color-frame-fg=<value>
— Environment variable: LW6_HUD_COLOR_FRAME_FG
— XML key: hud-color-frame-fg

Type: color

Default value: #ccc

Defines the foreground color for the hud frame. Ignored if hud-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.19 hud-color-text-bg

— Command-line option: --hud-color-text-bg=<value>
— Environment variable: LW6_HUD_COLOR_TEXT_BG
— XML key: hud-color-text-bg

Type: color

Default value: #333

Defines the background color for hud text. Ignored if hud-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.20 hud-color-text-fg

— Command-line option: --hud-color-text-fg=<value>
— Environment variable: LW6_HUD_COLOR_TEXT_FG
— XML key: hud-color-text-fg

Type: color

Default value: #fff

Defines the foreground color for hud text. Ignored if hud-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.21 hud-style

— Command-line option: --hud-style=<value>
— Environment variable: LW6_HUD_STYLE
— XML key: hud-style

Type: string

Default value: floating

The hud is where informations about the game are displayed. This means, who is winning, are other status-like informations. Possible values include 'floating' and 'tactical'.

4.13.22 keep-ratio

— Command-line option: --keep-ratio=<value>
— Environment variable: LW6_KEEP_RATIO
— XML key: keep-ratio

Type: boolean

Default value: true

Defines wether the map should keep its ratio, or if it should be stretched to fill the shape of your screen.

4.13.23 menu-color-default-bg

— Command-line option: --menu-color-default-bg=<value>
— Environment variable: LW6_MENU_COLOR_DEFAULT_BG
— XML key: menu-color-default-bg

Type: color

Default value: #333

Defines the default background color for menus. Ignored if menu-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.24 menu-color-default-fg

— Command-line option: --menu-color-default-fg=<value>
— Environment variable: LW6_MENU_COLOR_DEFAULT_FG
— XML key: menu-color-default-fg

Type: color

Default value: #fff

Defines the default foreground color for menus. In fact, this is the main color for menu text, the color used to draw letters in menus. Ignored if menu-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.25 menu-color-disabled-bg

— Command-line option: --menu-color-disabled-bg=<value>
— Environment variable: LW6_MENU_COLOR_DISABLED_BG
— XML key: menu-color-disabled-bg

Type: color

Default value: #000

Defines the background color for a disabled menu item. Ignored if menu-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.26 menu-color-disabled-fg

— Command-line option: --menu-color-disabled-fg=<value>
— Environment variable: LW6_MENU_COLOR_DISABLED_FG
— XML key: menu-color-disabled-fg

Type: color

Default value: #ccc

Defines the foreground color for a disabled menu item. Ignored if menu-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.27 menu-color-selected-bg

— Command-line option: --menu-color-selected-bg=<value>
— Environment variable: LW6_MENU_COLOR_SELECTED_BG
— XML key: menu-color-selected-bg

Type: color

Default value: #fff

Defines the background color for a selected menu item. Ignored if menu-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.28 menu-color-selected-fg

— Command-line option: --menu-color-selected-fg=<value>
— Environment variable: LW6_MENU_COLOR_SELECTED_FG
— XML key: menu-color-selected-fg

Type: color

Default value: #333

Defines the foreground color for a selected menu item. Ignored if menu-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.29 menu-style

— Command-line option: --menu-style=<value>
— Environment variable: LW6_MENU_STYLE
— XML key: menu-style

Type: string

Default value: cylinder

The menu style is simply the name of the engine used to power the menu system. The only possible value, for now, is 'cylinder'.

4.13.30 music-exclude

— Command-line option: --music-exclude=<value>
— Environment variable: LW6_MUSIC_EXCLUDE
— XML key: music-exclude

Type: string

Default value: Chadburn

If this string is found in a music file name, it will be excluded from the list when playing in random mode.

4.13.31 music-file

— Command-line option: --music-file=<value>
— Environment variable: LW6_MUSIC_FILE
— XML key: music-file

Type: string

Default value:

Allows you to play a custom music file (typically your own ogg music) and override default game music. If file does not exist, game will use its internal music. The file will be searched for in the current 'music-path' but also in the current map directory. No absolute or even relative path are allowed, only a plain filename with no slash or backslash. Avoid special characters at all cost.

4.13.32 music-filter

— Command-line option: --music-filter=<value>
— Environment variable: LW6_MUSIC_FILTER
— XML key: music-filter

Type: string

Default value:

A music filter, used when files are played randomly. This is not a complex regex-enabled filter, just a plain string search. Even the '*' wildcard won't work. If you want precise control on what music file to play, please consider reorganizing your files and/or use the 'music-file' parameter.

4.13.33 pixelize

— Command-line option: --pixelize=<value>
— Environment variable: LW6_PIXELIZE
— XML key: pixelize

Type: boolean

Default value: false

Depending on the renderer capabilities, will try to pixelize some parts of the game. This can be used to emulate the old LW5 appearance.

4.13.34 system-color-bg

— Command-line option: --system-color-bg=<value>
— Environment variable: LW6_SYSTEM_COLOR_BG
— XML key: system-color-bg

Type: color

Default value: #333

Defines the system background color, used when displaying system info, such as the number of frames per second. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.35 system-color-fg

— Command-line option: --system-color-fg=<value>
— Environment variable: LW6_SYSTEM_COLOR_FG
— XML key: system-color-fg

Type: color

Default value: #fff

Defines the system foreground color, used when displaying system info, such as the number of frames per second. This will typically be text color. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.36 team-color-blue

— Command-line option: --team-color-blue=<value>
— Environment variable: LW6_TEAM_COLOR_BLUE
— XML key: team-color-blue

Type: color

Default value: #00f

Defines the color for the blue team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.37 team-color-cyan

— Command-line option: --team-color-cyan=<value>
— Environment variable: LW6_TEAM_COLOR_CYAN
— XML key: team-color-cyan

Type: color

Default value: #0ff

Defines the color for the cyan team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.38 team-color-dead

— Command-line option: --team-color-dead=<value>
— Environment variable: LW6_TEAM_COLOR_DEAD
— XML key: team-color-dead

Type: color

Default value: #000

Defines the color for the teams when they are dead. By default it is black, this means when a team is weak it becomes black. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.39 team-color-green

— Command-line option: --team-color-green=<value>
— Environment variable: LW6_TEAM_COLOR_GREEN
— XML key: team-color-green

Type: color

Default value: #0f0

Defines the color for the green team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.40 team-color-lightblue

— Command-line option: --team-color-lightblue=<value>
— Environment variable: LW6_TEAM_COLOR_LIGHTBLUE
— XML key: team-color-lightblue

Type: color

Default value: #8bf

Defines the color for the light blue team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.41 team-color-magenta

— Command-line option: --team-color-magenta=<value>
— Environment variable: LW6_TEAM_COLOR_MAGENTA
— XML key: team-color-magenta

Type: color

Default value: #f0f

Defines the color for the magenta team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.42 team-color-orange

— Command-line option: --team-color-orange=<value>
— Environment variable: LW6_TEAM_COLOR_ORANGE
— XML key: team-color-orange

Type: color

Default value: #f80

Defines the color for the orange team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.43 team-color-pink

— Command-line option: --team-color-pink=<value>
— Environment variable: LW6_TEAM_COLOR_PINK
— XML key: team-color-pink

Type: color

Default value: #f8b

Defines the color for the pink team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.44 team-color-purple

— Command-line option: --team-color-purple=<value>
— Environment variable: LW6_TEAM_COLOR_PURPLE
— XML key: team-color-purple

Type: color

Default value: #b8f

Defines the color for the purple team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.45 team-color-red

— Command-line option: --team-color-red=<value>
— Environment variable: LW6_TEAM_COLOR_RED
— XML key: team-color-red

Type: color

Default value: #f00

Defines the color for the red team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.46 team-color-yellow

— Command-line option: --team-color-yellow=<value>
— Environment variable: LW6_TEAM_COLOR_YELLOW
— XML key: team-color-yellow

Type: color

Default value: #ff0

Defines the color for the yellow team. Syntax is HTML-like, #RGB or #RRGGBB.

4.13.47 view-color-cursor-bg

— Command-line option: --view-color-cursor-bg=<value>
— Environment variable: LW6_VIEW_COLOR_CURSOR_BG
— XML key: view-color-cursor-bg

Type: color

Default value: #333

Defines the background cursor color. Will typically be used to draw the shape of the cursor. Ignored if view-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.48 view-color-cursor-fg

— Command-line option: --view-color-cursor-fg=<value>
— Environment variable: LW6_VIEW_COLOR_CURSOR_FG
— XML key: view-color-cursor-fg

Type: color

Default value: #fff

Defines the foreground cursor color. Will typically be used to draw text in the cursor. Ignored if view-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.49 view-color-map-bg

— Command-line option: --view-color-map-bg=<value>
— Environment variable: LW6_VIEW_COLOR_MAP_BG
— XML key: view-color-map-bg

Type: color

Default value: #000

Defines the background map color. If there's no map texture defined or if use-texture is false, this is the color of the places where armies will go. Ignored if view-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.50 view-color-map-fg

— Command-line option: --view-color-map-fg=<value>
— Environment variable: LW6_VIEW_COLOR_MAP_FG
— XML key: view-color-map-fg

Type: color

Default value: #ccc

Defines the foreground map color. If there's no map texture defined or if use-texture is false, this is the color of walls, what armies can't go through. Ignored if view-color-auto is set. Can be #RGB, #RGBA, #RRGGBB or #RRGGBBAA.

4.13.51 view-style

— Command-line option: --view-style=<value>
— Environment variable: LW6_VIEW_STYLE
— XML key: view-style

Type: string

Default value: flat

The view style conditions which renderer is used for the map, the area where fighters are displayed. This is not the graphics backend. Indeed, the graphics backend defines which technical tool one uses (which library) one runs, wether this parameter says what kind of rendering one wants.

4.13.52 waves

— Command-line option: --waves=<value>
— Environment variable: LW6_WAVES
— XML key: waves

Type: boolean

Default value: true

Activates the wave effect, that's to say level appears to be under water when playing.

4.13.53 x-wrap

— Command-line option: --x-wrap=<value>
— Environment variable: LW6_X_WRAP
— XML key: x-wrap

Type: boolean

Default value: true

Defines wether the map should be wrapped on the x axis. This is the companion of 'x-polarity', if no polarity is defined, map can't be wrapped, but in some cases, one might wish to have a map with polarity but without wrapping if, for instance, textures do not tile nicely.

4.13.54 y-wrap

— Command-line option: --y-wrap=<value>
— Environment variable: LW6_Y_WRAP
— XML key: y-wrap

Type: boolean

Default value: true

Defines wether the map should be wrapped on the y axis. This is the companion of 'y-polarity', if no polarity is defined, map can't be wrapped, but in some cases, one might wish to have a map with polarity but without wrapping if, for instance, textures do not tile nicely.

4.13.55 zoom

— Command-line option: --zoom=<value>
— Environment variable: LW6_ZOOM
— XML key: zoom

Type: float

Default value: 1.0f

Defines the map zoom. If lower than 1.0, map will occupy only a fraction of the screen, if greater than 1.0, some areas will be outside the screen, and the player will need to scroll through it.

4.13.56 zoom-max

— Command-line option: --zoom-max=<value>
— Environment variable: LW6_ZOOM_MAX
— XML key: zoom-max

Type: float

Default value: 30.0f

Defines the max map zoom. If set to a high value, you'll be able to dynamically view the map with hudge fighters, seeing only a fraction of the level.

4.13.57 zoom-min

— Command-line option: --zoom-min=<value>
— Environment variable: LW6_ZOOM_MIN
— XML key: zoom-min

Type: float

Default value: 0.3f

Defines the min map zoom. If set to a low value, you'll be able to dynamically view a very small, reduced map.


Next: , Previous: Map style.xml, Up: Reference

4.14 Map teams.xml

4.14.1 bot-iq

— Command-line option: --bot-iq=<value>
— Environment variable: LW6_BOT_IQ
— XML key: bot-iq

Type: integer

Default value: 100 Min value: 0 Max value: 200

The IQ (intelligence quotient) of bots. Typically, a value of 100 will make the bot behave normally, performing at its best. A value of 0 will just make it act the worst way it can. Values over 100 probably won't change anything compared to 100, but this truely depends on which bot backend you're running.

4.14.2 bot-speed

— Command-line option: --bot-speed=<value>
— Environment variable: LW6_BOT_SPEED
— XML key: bot-speed

Type: float

Default value: 1.0f

The speed of bots, 1 means normal speed, higher value will speed it up, lower will slow it down. Note that this only has an impact on bot engines, not on the game speed itself.

4.14.3 bot1-ai

— Command-line option: --bot1-ai=<value>
— Environment variable: LW6_BOT1_AI
— XML key: bot1-ai

Type: string

Default value: idiot

AI engine for bot number 1.

4.14.4 bot1-color

— Command-line option: --bot1-color=<value>
— Environment variable: LW6_BOT1_COLOR
— XML key: bot1-color

Type: string

Default value: green

Color for bot number 1.

4.14.5 bot2-ai

— Command-line option: --bot2-ai=<value>
— Environment variable: LW6_BOT2_AI
— XML key: bot2-ai

Type: string

Default value: idiot

AI engine for bot number 2.

4.14.6 bot2-color

— Command-line option: --bot2-color=<value>
— Environment variable: LW6_BOT2_COLOR
— XML key: bot2-color

Type: string

Default value: blue

Color for bot number 2.

4.14.7 bot3-ai

— Command-line option: --bot3-ai=<value>
— Environment variable: LW6_BOT3_AI
— XML key: bot3-ai

Type: string

Default value: random

AI engine for bot number 3.

4.14.8 bot3-color

— Command-line option: --bot3-color=<value>
— Environment variable: LW6_BOT3_COLOR
— XML key: bot3-color

Type: string

Default value: yellow

Color for bot number 3.

4.14.9 bot4-ai

— Command-line option: --bot4-ai=<value>
— Environment variable: LW6_BOT4_AI
— XML key: bot4-ai

Type: string

Default value: follow

AI engine for bot number 4.

4.14.10 bot4-color

— Command-line option: --bot4-color=<value>
— Environment variable: LW6_BOT4_COLOR
— XML key: bot4-color

Type: string

Default value: cyan

Color for bot number 4.

4.14.11 bot5-ai

— Command-line option: --bot5-ai=<value>
— Environment variable: LW6_BOT5_AI
— XML key: bot5-ai

Type: string

Default value: random

AI engine for bot number 5.

4.14.12 bot5-color

— Command-line option: --bot5-color=<value>
— Environment variable: LW6_BOT5_COLOR
— XML key: bot5-color

Type: string

Default value: magenta

Color for bot number 5.

4.14.13 bot6-ai

— Command-line option: --bot6-ai=<value>
— Environment variable: LW6_BOT6_AI
— XML key: bot6-ai

Type: string

Default value: follow

AI engine for bot number 6.

4.14.14 bot6-color

— Command-line option: --bot6-color=<value>
— Environment variable: LW6_BOT6_COLOR
— XML key: bot6-color

Type: string

Default value: orange

Color for bot number 6.

4.14.15 bot7-ai

— Command-line option: --bot7-ai=<value>
— Environment variable: LW6_BOT7_AI
— XML key: bot7-ai

Type: string

Default value: idiot

AI engine for bot number 7.

4.14.16 bot7-color

— Command-line option: --bot7-color=<value>
— Environment variable: LW6_BOT7_COLOR
— XML key: bot7-color

Type: string

Default value: lightblue

Color for bot number 7.

4.14.17 bot8-ai

— Command-line option: --bot8-ai=<value>
— Environment variable: LW6_BOT8_AI
— XML key: bot8-ai

Type: string

Default value: idiot

AI engine for bot number 8.

4.14.18 bot8-color

— Command-line option: --bot8-color=<value>
— Environment variable: LW6_BOT8_COLOR
— XML key: bot8-color

Type: string

Default value: purple

Color for bot number 8.

4.14.19 bot9-ai

— Command-line option: --bot9-ai=<value>
— Environment variable: LW6_BOT9_AI
— XML key: bot9-ai

Type: string

Default value: idiot

AI engine for bot number 9.

4.14.20 bot9-color

— Command-line option: --bot9-color=<value>
— Environment variable: LW6_BOT9_COLOR
— XML key: bot9-color

Type: string

Default value: pink

Color for bot number 9.

4.14.21 nb-bots

— Command-line option: --nb-bots=<value>
— Environment variable: LW6_NB_BOTS
— XML key: nb-bots

Type: integer

Default value: 2 Min value: 0 Max value: 9

Number of bots on the map. 0 means no bots, if set to 1 the the bot1-... settings will be used, if set to 2 then bot1-... and bot2-... will be used, and so on.

4.14.22 player1-color

— Command-line option: --player1-color=<value>
— Environment variable: LW6_PLAYER1_COLOR
— XML key: player1-color

Type: string

Default value: red

Color of the first player, must be red, green, blue, yellow, cyan, magenta, orange, lightblue, purple or pink

4.14.23 player2-color

— Command-line option: --player2-color=<value>
— Environment variable: LW6_PLAYER2_COLOR
— XML key: player2-color

Type: string

Default value: green

Color of the second player, must be red, green, blue, yellow, cyan, magenta, orange, lightblue, purple or pink

4.14.24 player3-color

— Command-line option: --player3-color=<value>
— Environment variable: LW6_PLAYER3_COLOR
— XML key: player3-color

Type: string

Default value: blue

Color of the third player, must be red, green, blue, yellow, cyan, magenta, orange, lightblue, purple or pink

4.14.25 player4-color

— Command-line option: --player4-color=<value>
— Environment variable: LW6_PLAYER4_COLOR
— XML key: player4-color

Type: string

Default value: yellow

Color of the fourth player, must be red, green, blue, yellow, cyan, magenta, orange, lightblue, purple or pink


Next: , Previous: Map teams.xml, Up: Reference

4.15 Advanced settings

4.15.1 base64-decode

— Command-line option: --base64-decode

If specified, program will take stdin and base64 decode it to stdout. This is for testing purpose (for network messages for instance). Will decode in standard base64 encoding using characters + and / but also the url-compliant version using - and /, see RFC 4648 for details.

4.15.2 base64-encode

— Command-line option: --base64-encode

If specified, program will take stdin and base64 encode it to stdout. This is for testing purpose (for network messages for instance). Will *not* use standard base64 encoding using characters + and / but - and _ instead to be url-compliant, see RFC 4648 for details.

4.15.3 bench

— Command-line option: --bench

Runs a benchmarking test which will report an approximative performance estimation of the game on your computer.

4.15.4 bench-value

— Command-line option: --bench-value=<value>
— Environment variable: LW6_BENCH_VALUE
— XML key: bench-value

Type: integer

Default value: 20

Contains the current bench value of the computer running the game. This is used internally to choose the right map settings. You can override this value and use your own but... use at your own risk. Pretending you have a faster computer than what you really have can lead to confusion.

4.15.5 bin-id

— Command-line option: --bin-id=<value>
— Environment variable: LW6_BIN_ID
— XML key: bin-id

Type: integer

Default value: 0

The internal 'bin-id' value. Note that this is not necessarly equal to the value returned by 'show-build-bin-id'. When they are different, it is assumed this is because of a software upgrade.

4.15.6 check

— Command-line option: --check

Running the game with '–check' is almost like running '–test', the difference is that '–check' will not run tests which involve graphics or sound backends, so it's adapted to pure console mode. This can be usefull for automated checks on a build farm, or if you want to check things in a headless (pure console) environment.

4.15.7 commands-per-sec

— Command-line option: --commands-per-sec=<value>
— Environment variable: LW6_COMMANDS_PER_SEC
— XML key: commands-per-sec

Type: integer

Default value: 10

Defines the number of commands per second. When a command is generated, orders are actually sent to the game engine, for instance, 'this cursor moved there'. So this option will affect game responsiveness, setting this to a high value will make the game more responsive but consume bandwidth on network games.

4.15.8 daemon

— Command-line option: --daemon

Start the game in daemon mode, this is typically used with the server mode, if you want the process to be detached from the console and executed in the background.

4.15.9 debug-layer-id

— Command-line option: --debug-layer-id=<value>
— Environment variable: LW6_DEBUG_LAYER_ID
— XML key: debug-layer-id

Type: integer

Default value: 0 Min value: 0 Max value: 6

A team id which will be used for debugging purposes, for instance when displaying gradient.

4.15.10 debug-team-id

— Command-line option: --debug-team-id=<value>
— Environment variable: LW6_DEBUG_TEAM_ID
— XML key: debug-team-id

Type: integer

Default value: 0 Min value: 0 Max value: 9

A team id which will be used for debugging purposes, for instance when displaying gradient.

4.15.11 demo

— Command-line option: --demo

Start the game in demo mode. 2 bots play against each other forever.

4.15.12 dirty-read

— Command-line option: --dirty-read=<value>
— Environment variable: LW6_DIRTY_READ
— XML key: dirty-read

Type: integer

Default value: 2 Min value: 0 Max value: 2

How to handle dirty reads and locks when displaying stuff. If set to 0, there will be no dirty reads at all, a lock (mutex) will be set whenever it's needed. If set to 1, display might be done with inconsistent data, however the data itself won't be modified while displaying. If set to 2, displayed data can (and will) be modified while the rendering thread is running.

4.15.13 display-background

— Command-line option: --display-background=<value>
— Environment variable: LW6_DISPLAY_BACKGROUND
— XML key: display-background

Type: boolean

Default value: true

Decides wether the background animation/image should be displayed at all.

4.15.14 display-console

— Command-line option: --display-console=<value>
— Environment variable: LW6_DISPLAY_CONSOLE
— XML key: display-console

Type: boolean

Default value: false

Defines wether the interactive system console must be displayed. Note that console support must have been enabled at compilation time. It might not be available on your computer, for instance if you are running a system such as Microsoft Windows.

4.15.15 display-cursors

— Command-line option: --display-cursors=<value>
— Environment variable: LW6_DISPLAY_CURSORS
— XML key: display-cursors

Type: boolean

Default value: true

Debugging option which can be set to 'false' to disable the display of cursors when playing.

4.15.16 display-debug-gradient

— Command-line option: --display-debug-gradient=<value>
— Environment variable: LW6_DISPLAY_DEBUG_GRADIENT
— XML key: display-debug-gradient

Type: boolean

Default value: false

Set this to 'true' to display the gradient, this is usefull to debug the core algorithm or understand how it works.

4.15.17 display-debug-zones

— Command-line option: --display-debug-zones=<value>
— Environment variable: LW6_DISPLAY_DEBUG_ZONES
— XML key: display-debug-zones

Type: boolean

Default value: false

Set this to 'true' to display the zones, this is usefull to debug the core algorithm or understand how it works.

4.15.18 display-fighters

— Command-line option: --display-fighters=<value>
— Environment variable: LW6_DISPLAY_FIGHTERS
— XML key: display-fighters

Type: boolean

Default value: true

Debugging option which can be set to 'false' to disable the display of fighters when playing.

4.15.19 display-fps

— Command-line option: --display-fps=<value>
— Environment variable: LW6_DISPLAY_FPS
— XML key: display-fps

Type: boolean

Default value: false

Set this to 'true' to display the number of frames per second. When this gets too low... play a smaller map, buy a new computer or contribute and hack Liquid War 6 so that it runs faster!

4.15.20 display-hud

— Command-line option: --display-hud=<value>
— Environment variable: LW6_DISPLAY_HUD
— XML key: display-hud

Type: boolean

Default value: true

Decides wether the hud (informations while playing) should be displayed.

4.15.21 display-log

— Command-line option: --display-log=<value>
— Environment variable: LW6_DISPLAY_LOG
— XML key: display-log

Type: boolean

Default value: true

Set this to 'false' to disable the display of error messages on the screen. Mote that you can miss valuable informations.

4.15.22 display-map

— Command-line option: --display-map=<value>
— Environment variable: LW6_DISPLAY_MAP
— XML key: display-map

Type: boolean

Default value: true

Debugging option which can be set to 'false' to disable map (level) display when playing.

4.15.23 display-menu

— Command-line option: --display-menu=<value>
— Environment variable: LW6_DISPLAY_MENU
— XML key: display-menu

Type: boolean

Default value: true

Debugging option which can be set to 'false' to disable the display of menus.

4.15.24 display-meta

— Command-line option: --display-meta=<value>
— Environment variable: LW6_DISPLAY_META
— XML key: display-meta

Type: boolean

Default value: true

Set to 'false' to disable the display of meta information, this includes the help, tootips and breadcrumbs in menus.

4.15.25 display-mouse

— Command-line option: --display-mouse=<value>
— Environment variable: LW6_DISPLAY_MOUSE
— XML key: display-mouse

Type: boolean

Default value: true

Set this to 'false' to always hide the mouse pointer.

4.15.26 display-mps

— Command-line option: --display-mps=<value>
— Environment variable: LW6_DISPLAY_MPS
— XML key: display-mps

Type: boolean

Default value: false

Set this to 'true' to display the number of moves per second. In theory the game should maintain this constant but in practise it can get low if your computer is too slow or too busy.

4.15.27 display-preview

— Command-line option: --display-preview=<value>
— Environment variable: LW6_DISPLAY_PREVIEW
— XML key: display-preview

Type: boolean

Default value: true

Decides wether a map preview should be displayed when choosing a level.

4.15.28 display-progress

— Command-line option: --display-progress=<value>
— Environment variable: LW6_DISPLAY_PROGRESS
— XML key: display-progress

Type: boolean

Default value: true

Decides wether a progress bar should be displayed when a long operation is realized as a background task.

4.15.29 display-score

— Command-line option: --display-score=<value>
— Environment variable: LW6_DISPLAY_SCORE
— XML key: display-score

Type: boolean

Default value: true

Decides wether the score screen should be displayed.

4.15.30 display-splash

— Command-line option: --display-splash=<value>
— Environment variable: LW6_DISPLAY_SPLASH
— XML key: display-splash

Type: boolean

Default value: true

Set this to 'false' to disable the display of the splash screen at game startup.

4.15.31 display-url

— Command-line option: --display-url=<value>
— Environment variable: LW6_DISPLAY_URL
— XML key: display-url

Type: boolean

Default value: false

Set this to 'true' to display the URL (homepage) of the game. This is mostly used when doing screenshots, so that generated images contain a link to the homepage.

4.15.32 executed-again

— Command-line option: --executed-again=<value>
— Environment variable: LW6_EXECUTED_AGAIN
— XML key: executed-again

Type: boolean

Default value: false

This environment variable/keyword is used to detect wether the program has been launched by itself with an internal execv call. This is used as a workarround to set some environment variables (DYLD_LIBRARY_PATH on Mac OS X for instance) before the program is run, as sometimes using setenv() inside the program does not work.

4.15.33 gfx-cpu-usage

— Command-line option: --gfx-cpu-usage=<value>
— Environment variable: LW6_GFX_CPU_USAGE
— XML key: gfx-cpu-usage

Type: float

Default value: 0.75 Min value: 0 Max value: 1

Percentage of the CPU which will be used by the display thread. It's wise to leave some time to other threads to execute. The OS does it naturally, but setting this helps the whole process by explicitely pausing (sleep call) the display thread. You could change this to a low value if you have lagging games but smooth display.

4.15.34 gfx-debug

— Command-line option: --gfx-debug=<value>
— Environment variable: LW6_GFX_DEBUG
— XML key: gfx-debug

Type: boolean

Default value: false

Enables dedicated graphics debugging tools. This is different from 'debug' mode which is global, this one is really graphics specific.

4.15.35 io-per-sec

— Command-line option: --io-per-sec=<value>
— Environment variable: LW6_IO_PER_SEC
— XML key: io-per-sec

Type: integer

Default value: 20

Defines the number of calls to input/output functions per second. This can affect speed of menus but also cursors, but won't change the speed of the game itself. It's a cosmectic, comfort option.

4.15.36 loader-sleep

— Command-line option: --loader-sleep=<value>
— Environment variable: LW6_LOADER_SLEEP
— XML key: loader-sleep

Type: float

Default value: 0.5

Defines how long the loader thread should wait between two polls. Default value should fit in most cases.

4.15.37 log-level

— Command-line option: --log-level=<value>
— Environment variable: LW6_LOG_LEVEL
— XML key: log-level

Type: integer

Default value: 3 Min value: 0 Max value: 4

Defines the log level, that is, how verbose the program will be regarding logs and console output. 0 (ERROR) is the minimum, only errors are reported. 1 (WARNING) means errors + warnings. 2 (NOTICE) displays most important messages. 3 (INFO) is the default, the log file will contain all messages but debug stuff. 4 (DEBUG) logs everything, including debug informations.

4.15.38 log-timeout

— Command-line option: --log-timeout=<value>
— Environment variable: LW6_LOG_TIMEOUT
— XML key: log-timeout

Type: integer

Default value: 5000

Delay, in msec, for which a log message will stay displayed on the screen.

4.15.39 magic-number

— Command-line option: --magic-number=<value>
— Environment variable: LW6_MAGIC_NUMBER
— XML key: magic-number

Type: integer

Default value: 14741

This 'magic' number probably requires an explanation. It's used to estimate how big a map can be built. The calculus is very approximative, basically bench_value*magic_number=total_fighters_on_map*rounds_per_sec*moves_per_round with total_fighters_on_map depending on various parameters such as map size but also how many fighters are on the map. The map loader will try and adjust the map size so that it is just big enough not to saturate your CPU while being as high-res as possible. The magic number in itself has no real meaning, the higher it gets, the more optimized it means the game is. Normally you shouldn't change this but if you find the map resizing is too agressively pessimistic, or if for some reason bench returns bogus values, you can modify it.

4.15.40 max-local-bench-value

— Command-line option: --max-local-bench-value=<value>
— Environment variable: LW6_MAX_LOCAL_BENCH_VALUE
— XML key: max-local-bench-value

Type: integer

Default value: 800

Even if your computer is very fast, this parameter will be used to tame the optimism of the test, and do not load maps in very high detail. It's believed at some point, it's best to keep your extra power to deal with unordinary situations rather than waste it on useless details. Game should be fun with that setting, but if you really want to use your shiny CPU at its maximum, raise this.

4.15.41 max-network-bench-value

— Command-line option: --max-network-bench-value=<value>
— Environment variable: LW6_MAX_NETWORK_BENCH_VALUE
— XML key: max-network-bench-value

Type: integer

Default value: 200

On network games, we need to be sure everyone can play in correct conditions, therefore maps won't be loaded with more details than this, by default. You're free to increase this parameter but it can cause your games to be unjoignable by some people.

4.15.42 memory-bazooka-eraser

— Command-line option: --memory-bazooka-eraser=<value>
— Environment variable: LW6_MEMORY_BAZOOKA_ERASER
— XML key: memory-bazooka-eraser

Type: boolean

Default value: true

The memory eraser is a tool which will systematically fill allocated memory with 'M', and overwrite all allocated bytes with 'F' before freeing memory. It will even handle realloc calls. This is usefull to track bugs. Indeed, with this option enabled, freshly allocated memory will never contain zeroes unless one calls calloc, and if you ever free some memory zone before being done with it, it will be filled with junk and therefore not be usable. The memory bazooka must be big enough if you want this feature to actually work.

4.15.43 memory-bazooka-size

— Command-line option: --memory-bazooka-size=<value>
— Environment variable: LW6_MEMORY_BAZOOKA_SIZE
— XML key: memory-bazooka-size

Type: integer

Default value: 99991

The memory bazooka is a brute-force tool, conceived after a full night spent tracking some memory leak. The idea is to keep a track of all allocated pointers, when the data was allocated (timestamp), where in the code (file, line), and even point out what data there is in that place. A memory bazooka report at the end of the game will just show what's left. There should be nothing. This parameter is here to avoid wasting CPU cycles on a feature which is very debug-oriented and does not really make sense for the casual user. Set it to 0 for best performance, something like 100 might just be helpfull, but 1000000 is the right way to seriously debug code.

4.15.44 net-log

— Command-line option: --net-log=<value>
— Environment variable: LW6_NET_LOG
— XML key: net-log

Type: boolean

Default value: false

Activates network log, that is, logs everything sent/received over the network, except data which is sent through a third party library such as libCurl. This is mostly for debugging purpose, it can lead to rather big log files.

4.15.45 network-reliability

— Command-line option: --network-reliability=<value>
— Environment variable: LW6_NETWORK_RELIABILITY
— XML key: network-reliability

Type: integer

Default value: 1000 Min value: 1 Max value: 1000000000

The program assumes network is non-reliable, however the problem with those assumptions is that when you test, network is always reliable, even with non-garanteed protocols like UDP. This option will force the program to actually ignore some calls to send or recv functions, simulating a network disfunction. This is to ensure the internal mecanisms correcting network problems do work for good, on daily regular use. It's not possible to set it to a perfect behavior, never dropping any packet, however using the default settings you probably won't even notice the performance drop induced by having to fix problems. The highest the number is, the most reliable network will look, the algorithm is simply to drop one message out of X.

4.15.46 open-relay

— Command-line option: --open-relay=<value>
— Environment variable: LW6_OPEN_RELAY
— XML key: open-relay

Type: boolean

Default value: false

Enables forwarding of abritrary network messages. If open relay is forbidden, the game will only forward messages when physical sender and logical sender are the same. This is to say if messages come from A for C and is sent by A to B, B will forward it to C. But if message comes from X to C and is sent by A to B, then B won't forward it. In practice, it means without open relay, messages can only be forwarded once.

4.15.47 pilot-lag

— Command-line option: --pilot-lag=<value>
— Environment variable: LW6_PILOT_LAG
— XML key: pilot-lag

Type: integer

Default value: 10

Maximum lag, in rounds, until the game engine is slowed down. This will typically be usefull if your computer is too slow for the map resolution and the game speed you set up.

4.15.48 quick-start

— Command-line option: --quick-start

Start the game just like if the player had requested a quick start, without showing any menu.

4.15.49 reset

— Command-line option: --reset

Clears the config file so that the game will run with defaults next time. The idea is to get rid of traces of previous executions. The difference with '–defaults' is that '–reset' does not run the game, while '–defaults' does.

4.15.50 reset-config-on-upgrade

— Command-line option: --reset-config-on-upgrade=<value>
— Environment variable: LW6_RESET_CONFIG_ON_UPGRADE
— XML key: reset-config-on-upgrade

Type: boolean

Default value: true

If set, then a reset (config file set to defaults) is run every time you upgrade the game.

4.15.51 server

— Command-line option: --server

Start the game in server mode, without requiring any graphics backend. Server mode is usefull if you just want to start a network node without hosting any real game on it. It can be used to list existing nodes and sessions or as a bounce server in case some clients can't contact each other because firewalled. If you only want to start a server game on your computer, don't use this option, just start the game normally and start a game server by clicking on the GUI buttons.

4.15.52 simulate-basic

— Command-line option: --simulate-basic

Simulates some fights using the basic colors red, green, yellow and blue. Will output on the console a percentage based on scores obtained by the teams. This is typically for map designers and/or people who want to fiddle with team profiles, if some team is really stronger than another one, it should appear in these percentages.

4.15.53 simulate-full

— Command-line option: --simulate-full

Simulates some fights using all available colors. This can be very long, it will run approximatively 1000 games consecutively, you can look in the log file to see the progress. Will output on the console a percentage based on scores obtained by the teams. This is typically for map designers and/or people who want to fiddle with team profiles, if some team is really stronger than another one, it should appear in these percentages.

4.15.54 target-fps

— Command-line option: --target-fps=<value>
— Environment variable: LW6_TARGET_FPS
— XML key: target-fps

Type: integer

Default value: 60

Defines how many frames will be displayed per second. Of course this is a maximum value, if your hardware can't keep up with this value, display will just be slow, no matter what value you define here. Note that you might really wish to have something rather low here, to keep network and 'logic' function responsiveness. Passed 60 frames per second, speed is really only for visual comfort, as Liquid War 6 is now so fast-paced that it requires 200 frames/sec to outperform opponents.

4.15.55 trap-errors

— Command-line option: --trap-errors=<value>
— Environment variable: LW6_TRAP_ERRORS
— XML key: trap-errors

Type: boolean

Default value: true

If set to true, will trap segmentation fault and floating point errors, and display messages about those in a custom box instead of the default one

4.15.56 trojan

— Command-line option: --trojan=<value>
— Environment variable: LW6_TROJAN
— XML key: trojan

Type: boolean

Default value: false

Make the program act like a (stupid) trojan horse, trying to fake messages, sending various inconsistent informations. This is to check the normal version of the program is able to detect such a fake and kick it out of the game. It's of no use for regular players, be sure to unset this if you want to play for good.

4.15.57 z-decode

— Command-line option: --z-decode

If specified, program will take stdin and z-decode it to stdout. This is for testing purpose (for network messages for instance). Z-decoding, here means verifying there a Z at the beginning, base64 decode and pass the content through Zlib inflating. I content is not Z-prefixed, will be returned as is.

4.15.58 z-encode

— Command-line option: --z-encode

If specified, program will take stdin and z-encode it to stdout. This is for testing purpose (for network messages for instance). Z-encoding, here means passing the message through Zlib deflating then base64 encoding and prefix it with a Z.


Next: , Previous: Advanced settings, Up: Reference

4.16 C to Guile

4.16.1 c-gettext

— C function exported to Guile: c-gettext

Calls GNU gettext to convert string in current locale. Note that '_' (plain underscode) is exported as well, so that code can be written using '_' as a function.

4.16.2 c-lw6-exit

— C function exported to Guile: c-lw6-exit

Wrapper on lw6_exit.

4.16.3 c-lw6-release

— C function exported to Guile: c-lw6-release

Wrapper on lw6_release.

4.16.4 c-lw6bot-get-backends

— C function exported to Guile: c-lw6bot-get-backends

Wrapper on lw6bot_get_backends.

4.16.5 c-lw6bot-new

— C function exported to Guile: c-lw6bot-new

Wrapper on lw6bot_new.

4.16.6 c-lw6bot-next-move

— C function exported to Guile: c-lw6bot-next-move

Wrapper on lw6bot_next_move.

4.16.7 c-lw6cfg-defaults

— C function exported to Guile: c-lw6cfg-defaults

Wrapper on lw6cfg_defaults.

4.16.8 c-lw6cfg-get-option

— C function exported to Guile: c-lw6cfg-get-option

Wrapper on lw6cfg_get_option.

4.16.9 c-lw6cfg-init

— C function exported to Guile: c-lw6cfg-init

Wrapper on lw6cfg_init.

4.16.10 c-lw6cfg-load

— C function exported to Guile: c-lw6cfg-load

Wrapper on lw6cfg_load.

4.16.11 c-lw6cfg-option-exists

— C function exported to Guile: c-lw6cfg-option-exists

Wrapper on lw6cfg_option_exists.

4.16.12 c-lw6cfg-quit

— C function exported to Guile: c-lw6cfg-quit

Wrapper on lw6cfg_quit.

4.16.13 c-lw6cfg-save

— C function exported to Guile: c-lw6cfg-save

Wrapper on lw6cfg_save.

4.16.14 c-lw6cfg-set-option

— C function exported to Guile: c-lw6cfg-set-option

Wrapper on lw6cfg_set_option.

4.16.15 c-lw6cfg-unified-get-log-file

— C function exported to Guile: c-lw6cfg-unified-get-log-file

Wrapper on lw6cfg_unified_get_log_file.

4.16.16 c-lw6cfg-unified-get-map-path

— C function exported to Guile: c-lw6cfg-unified-get-map-path

Wrapper on lw6cfg_unified_get_map_path.

4.16.17 c-lw6cfg-unified-get-music-path

— C function exported to Guile: c-lw6cfg-unified-get-music-path

Wrapper on lw6cfg_unified_get_music_path.

4.16.18 c-lw6cfg-unified-get-user-dir

— C function exported to Guile: c-lw6cfg-unified-get-user-dir

Wrapper on lw6cfg_unified_get_user_dir.

4.16.19 c-lw6cli-get-backends

— C function exported to Guile: c-lw6cli-get-backends

Wrapper on lw6cli_get_backends.

4.16.20 c-lw6cns-init

— C function exported to Guile: c-lw6cns-init

Wrapper on lw6cns_init.

4.16.21 c-lw6cns-poll

— C function exported to Guile: c-lw6cns-poll

Wrapper on lw6cns_poll.

4.16.22 c-lw6cns-quit

— C function exported to Guile: c-lw6cns-quit

Wrapper on lw6cns_quit.

4.16.23 c-lw6cns-support

— C function exported to Guile: c-lw6cns-support

Wrapper on lw6cns_support.

4.16.24 c-lw6dsp-get-average-fps

— C function exported to Guile: c-lw6dsp-get-average-fps

Wrapper on lw6dsp_get_average_fps.

4.16.25 c-lw6dsp-get-fullscreen-modes

— C function exported to Guile: c-lw6dsp-get-fullscreen-modes

Wrapper on lw6dsp_get_fullscreen_modes.

4.16.26 c-lw6dsp-get-instant-fps

— C function exported to Guile: c-lw6dsp-get-instant-fps

Wrapper on lw6dsp_get_instant_fps.

4.16.27 c-lw6dsp-get-last-frame-rendering-time

— C function exported to Guile: c-lw6dsp-get-last-frame-rendering-time

Wrapper on lw6dsp_get_last_frame_rendering_time.

4.16.28 c-lw6dsp-get-nb-frames

— C function exported to Guile: c-lw6dsp-get-nb-frames

Wrapper on lw6dsp_get_nb_frames.

4.16.29 c-lw6dsp-get-video-mode

— C function exported to Guile: c-lw6dsp-get-video-mode

Wrapper on lw6dsp_get_video_mode.

4.16.30 c-lw6dsp-new

— C function exported to Guile: c-lw6dsp-new

Wrapper on lw6dsp_new.

4.16.31 c-lw6dsp-release

— C function exported to Guile: c-lw6dsp-release

Wrapper on lw6dsp_release.

4.16.32 c-lw6dsp-update

— C function exported to Guile: c-lw6dsp-update

Wrapper on lw6dsp_update.

4.16.33 c-lw6gfx-get-backends

— C function exported to Guile: c-lw6gfx-get-backends

Wrapper on lw6gfx_get_backends.

4.16.34 c-lw6gui-default-look

— C function exported to Guile: c-lw6gui-default-look

Wrapper on lw6gui_default_look.

4.16.35 c-lw6gui-input-reset

— C function exported to Guile: c-lw6gui-input-reset

Wrapper on lw6gui_input_reset.

4.16.36 c-lw6gui-joystick1-get-move-pad

— C function exported to Guile: c-lw6gui-joystick1-get-move-pad

Wrapper on lw6gui_joystick1_get_move_pad.

4.16.37 c-lw6gui-joystick1-pop-button-a

— C function exported to Guile: c-lw6gui-joystick1-pop-button-a

Wrapper on lw6gui_joystick1_pop_button_a.

4.16.38 c-lw6gui-joystick1-pop-button-b

— C function exported to Guile: c-lw6gui-joystick1-pop-button-b

Wrapper on lw6gui_joystick1_pop_button_b.

4.16.39 c-lw6gui-joystick1-pop-button-c

— C function exported to Guile: c-lw6gui-joystick1-pop-button-c

Wrapper on lw6gui_joystick1_pop_button_c.

4.16.40 c-lw6gui-joystick1-pop-button-d

— C function exported to Guile: c-lw6gui-joystick1-pop-button-d

Wrapper on lw6gui_joystick1_pop_button_d.

4.16.41 c-lw6gui-joystick1-pop-button-e

— C function exported to Guile: c-lw6gui-joystick1-pop-button-e

Wrapper on lw6gui_joystick1_pop_button_e.

4.16.42 c-lw6gui-joystick1-pop-button-f

— C function exported to Guile: c-lw6gui-joystick1-pop-button-f

Wrapper on lw6gui_joystick1_pop_button_f.

4.16.43 c-lw6gui-joystick1-pop-pad-down

— C function exported to Guile: c-lw6gui-joystick1-pop-pad-down

Wrapper on lw6gui_joystick1_pop_pad_down.

4.16.44 c-lw6gui-joystick1-pop-pad-left

— C function exported to Guile: c-lw6gui-joystick1-pop-pad-left

Wrapper on lw6gui_joystick1_pop_pad_left.

4.16.45 c-lw6gui-joystick1-pop-pad-right

— C function exported to Guile: c-lw6gui-joystick1-pop-pad-right

Wrapper on lw6gui_joystick1_pop_pad_right.

4.16.46 c-lw6gui-joystick1-pop-pad-up

— C function exported to Guile: c-lw6gui-joystick1-pop-pad-up

Wrapper on lw6gui_joystick1_pop_pad_up.

4.16.47 c-lw6gui-joystick2-get-move-pad

— C function exported to Guile: c-lw6gui-joystick2-get-move-pad

Wrapper on lw6gui_joystick2_get_move_pad.

4.16.48 c-lw6gui-joystick2-pop-button-a

— C function exported to Guile: c-lw6gui-joystick2-pop-button-a

Wrapper on lw6gui_joystick2_pop_button_a.

4.16.49 c-lw6gui-joystick2-pop-button-b

— C function exported to Guile: c-lw6gui-joystick2-pop-button-b

Wrapper on lw6gui_joystick2_pop_button_b.

4.16.50 c-lw6gui-joystick2-pop-button-c

— C function exported to Guile: c-lw6gui-joystick2-pop-button-c

Wrapper on lw6gui_joystick2_pop_button_c.

4.16.51 c-lw6gui-joystick2-pop-button-d

— C function exported to Guile: c-lw6gui-joystick2-pop-button-d

Wrapper on lw6gui_joystick2_pop_button_d.

4.16.52 c-lw6gui-joystick2-pop-button-e

— C function exported to Guile: c-lw6gui-joystick2-pop-button-e

Wrapper on lw6gui_joystick2_pop_button_e.

4.16.53 c-lw6gui-joystick2-pop-button-f

— C function exported to Guile: c-lw6gui-joystick2-pop-button-f

Wrapper on lw6gui_joystick2_pop_button_f.

4.16.54 c-lw6gui-joystick2-pop-pad-down

— C function exported to Guile: c-lw6gui-joystick2-pop-pad-down

Wrapper on lw6gui_joystick2_pop_pad_down.

4.16.55 c-lw6gui-joystick2-pop-pad-left

— C function exported to Guile: c-lw6gui-joystick2-pop-pad-left

Wrapper on lw6gui_joystick2_pop_pad_left.

4.16.56 c-lw6gui-joystick2-pop-pad-right

— C function exported to Guile: c-lw6gui-joystick2-pop-pad-right

Wrapper on lw6gui_joystick2_pop_pad_right.

4.16.57 c-lw6gui-joystick2-pop-pad-up

— C function exported to Guile: c-lw6gui-joystick2-pop-pad-up

Wrapper on lw6gui_joystick2_pop_pad_up.

4.16.58 c-lw6gui-keyboard-get-move-pad

— C function exported to Guile: c-lw6gui-keyboard-get-move-pad

Wrapper on lw6gui_keyboard_get_move_pad.

4.16.59 c-lw6gui-keyboard-is-pressed

— C function exported to Guile: c-lw6gui-keyboard-is-pressed

Wrapper on lw6gui_keyboard_is_pressed.

4.16.60 c-lw6gui-keyboard-pop-arrow-down

— C function exported to Guile: c-lw6gui-keyboard-pop-arrow-down

Wrapper on lw6gui_keyboard_pop_arrow_down.

4.16.61 c-lw6gui-keyboard-pop-arrow-left

— C function exported to Guile: c-lw6gui-keyboard-pop-arrow-left

Wrapper on lw6gui_keyboard_pop_arrow_left.

4.16.62 c-lw6gui-keyboard-pop-arrow-right

— C function exported to Guile: c-lw6gui-keyboard-pop-arrow-right

Wrapper on lw6gui_keyboard_pop_arrow_right.

4.16.63 c-lw6gui-keyboard-pop-arrow-up

— C function exported to Guile: c-lw6gui-keyboard-pop-arrow-up

Wrapper on lw6gui_keyboard_pop_arrow_up.

4.16.64 c-lw6gui-keyboard-pop-key-alt

— C function exported to Guile: c-lw6gui-keyboard-pop-key-alt

Wrapper on lw6gui_keyboard_pop_key_alt.

4.16.65 c-lw6gui-keyboard-pop-key-ctrl

— C function exported to Guile: c-lw6gui-keyboard-pop-key-ctrl

Wrapper on lw6gui_keyboard_pop_key_ctrl.

4.16.66 c-lw6gui-keyboard-pop-key-enter

— C function exported to Guile: c-lw6gui-keyboard-pop-key-enter

Wrapper on lw6gui_keyboard_pop_key_enter.

4.16.67 c-lw6gui-keyboard-pop-key-esc

— C function exported to Guile: c-lw6gui-keyboard-pop-key-esc

Wrapper on lw6gui_keyboard_pop_key_esc.

4.16.68 c-lw6gui-keyboard-pop-key-pgdown

— C function exported to Guile: c-lw6gui-keyboard-pop-key-pgdown

Wrapper on lw6gui_keyboard_pop_key_pgdown.

4.16.69 c-lw6gui-keyboard-pop-key-pgup

— C function exported to Guile: c-lw6gui-keyboard-pop-key-pgup

Wrapper on lw6gui_keyboard_pop_key_pgup.

4.16.70 c-lw6gui-look-get

— C function exported to Guile: c-lw6gui-look-get

Wrapper on lw6gui_look_get.

4.16.71 c-lw6gui-look-set

— C function exported to Guile: c-lw6gui-look-set

Wrapper on lw6gui_look_set.

4.16.72 c-lw6gui-look-zoom-in

— C function exported to Guile: c-lw6gui-look-zoom-in

Wrapper on lw6gui_look_zoom_in.

4.16.73 c-lw6gui-look-zoom-out

— C function exported to Guile: c-lw6gui-look-zoom-out

Wrapper on lw6gui_look_zoom_out.

4.16.74 c-lw6gui-menu-append

— C function exported to Guile: c-lw6gui-menu-append

Wrapper on lw6gui_menu_append.

4.16.75 c-lw6gui-menu-close-popup

— C function exported to Guile: c-lw6gui-menu-close-popup

Wrapper on lw6gui_menu_close_popup.

4.16.76 c-lw6gui-menu-enable-esc

— C function exported to Guile: c-lw6gui-menu-enable-esc

Wrapper on lw6gui_menu_enable_esc.

4.16.77 c-lw6gui-menu-has-popup

— C function exported to Guile: c-lw6gui-menu-has-popup

Wrapper on lw6gui_menu_has_popup.

4.16.78 c-lw6gui-menu-new

— C function exported to Guile: c-lw6gui-menu-new

Wrapper on lw6gui_menu_new.

4.16.79 c-lw6gui-menu-scroll-down

— C function exported to Guile: c-lw6gui-menu-scroll-down

Wrapper on lw6gui_menu_scroll_down.

4.16.80 c-lw6gui-menu-scroll-up

— C function exported to Guile: c-lw6gui-menu-scroll-up

Wrapper on lw6gui_menu_scroll_up.

4.16.81 c-lw6gui-menu-select

— C function exported to Guile: c-lw6gui-menu-select

Wrapper on lw6gui_menu_select.

4.16.82 c-lw6gui-menu-select-esc

— C function exported to Guile: c-lw6gui-menu-select-esc

Wrapper on lw6gui_menu_select_esc.

4.16.83 c-lw6gui-menu-set-breadcrumbs

— C function exported to Guile: c-lw6gui-menu-set-breadcrumbs

Wrapper on lw6gui_menu_set_breadcrumbs.

4.16.84 c-lw6gui-menu-sync

— C function exported to Guile: c-lw6gui-menu-sync

Wrapper on lw6gui_menu_sync.

4.16.85 c-lw6gui-mouse-get-state

— C function exported to Guile: c-lw6gui-mouse-get-state

Wrapper on lw6gui_mouse_get_state.

4.16.86 c-lw6gui-mouse-poll-move

— C function exported to Guile: c-lw6gui-mouse-poll-move

Wrapper on lw6gui_mouse_poll_move.

4.16.87 c-lw6gui-mouse-pop-button-left

— C function exported to Guile: c-lw6gui-mouse-pop-button-left

Wrapper on lw6gui_mouse_pop_button_left.

4.16.88 c-lw6gui-mouse-pop-button-middle

— C function exported to Guile: c-lw6gui-mouse-pop-button-middle

Wrapper on lw6gui_mouse_pop_button_middle.

4.16.89 c-lw6gui-mouse-pop-button-right

— C function exported to Guile: c-lw6gui-mouse-pop-button-right

Wrapper on lw6gui_mouse_pop_button_right.

4.16.90 c-lw6gui-mouse-pop-double-click

— C function exported to Guile: c-lw6gui-mouse-pop-double-click

Wrapper on lw6gui_mouse_pop_double_click.

4.16.91 c-lw6gui-mouse-pop-simple-click

— C function exported to Guile: c-lw6gui-mouse-pop-simple-click

Wrapper on lw6gui_mouse_pop_simple_click.

4.16.92 c-lw6gui-mouse-pop-triple-click

— C function exported to Guile: c-lw6gui-mouse-pop-triple-click

Wrapper on lw6gui_mouse_pop_triple_click.

4.16.93 c-lw6gui-mouse-pop-wheel-down

— C function exported to Guile: c-lw6gui-mouse-pop-wheel-down

Wrapper on lw6gui_mouse_pop_wheel_down.

4.16.94 c-lw6gui-mouse-pop-wheel-up

— C function exported to Guile: c-lw6gui-mouse-pop-wheel-up

Wrapper on lw6gui_mouse_pop_wheel_up.

4.16.95 c-lw6hlp-about

— C function exported to Guile: c-lw6hlp-about

Wrapper on lw6hlp_about.

4.16.96 c-lw6hlp-get-default-value

— C function exported to Guile: c-lw6hlp-get-default-value

Wrapper on lw6hlp_get_default_value.

4.16.97 c-lw6hlp-list

— C function exported to Guile: c-lw6hlp-list

Wrapper on lw6hlp_list.

4.16.98 c-lw6hlp-list-advanced

— C function exported to Guile: c-lw6hlp-list-advanced

Wrapper on lw6hlp_list_advanced.

4.16.99 c-lw6hlp-list-aliases

— C function exported to Guile: c-lw6hlp-list-aliases

Wrapper on lw6hlp_list_aliases.

4.16.100 c-lw6hlp-list-doc

— C function exported to Guile: c-lw6hlp-list-doc

Wrapper on lw6hlp_list_doc.

4.16.101 c-lw6hlp-list-funcs

— C function exported to Guile: c-lw6hlp-list-funcs

Wrapper on lw6hlp_list_funcs.

4.16.102 c-lw6hlp-list-graphics

— C function exported to Guile: c-lw6hlp-list-graphics

Wrapper on lw6hlp_list_graphics.

4.16.103 c-lw6hlp-list-hooks

— C function exported to Guile: c-lw6hlp-list-hooks

Wrapper on lw6hlp_list_hooks.

4.16.104 c-lw6hlp-list-input

— C function exported to Guile: c-lw6hlp-list-input

Wrapper on lw6hlp_list_input.

4.16.105 c-lw6hlp-list-map

— C function exported to Guile: c-lw6hlp-list-map

Wrapper on lw6hlp_list_map.

4.16.106 c-lw6hlp-list-map-hints

— C function exported to Guile: c-lw6hlp-list-map-hints

Wrapper on lw6hlp_list_map_hints.

4.16.107 c-lw6hlp-list-map-rules

— C function exported to Guile: c-lw6hlp-list-map-rules

Wrapper on lw6hlp_list_map_rules.

4.16.108 c-lw6hlp-list-map-style

— C function exported to Guile: c-lw6hlp-list-map-style

Wrapper on lw6hlp_list_map_style.

4.16.109 c-lw6hlp-list-map-teams

— C function exported to Guile: c-lw6hlp-list-map-teams

Wrapper on lw6hlp_list_map_teams.

4.16.110 c-lw6hlp-list-network

— C function exported to Guile: c-lw6hlp-list-network

Wrapper on lw6hlp_list_network.

4.16.111 c-lw6hlp-list-path

— C function exported to Guile: c-lw6hlp-list-path

Wrapper on lw6hlp_list_path.

4.16.112 c-lw6hlp-list-players

— C function exported to Guile: c-lw6hlp-list-players

Wrapper on lw6hlp_list_players.

4.16.113 c-lw6hlp-list-quick

— C function exported to Guile: c-lw6hlp-list-quick

Wrapper on lw6hlp_list_quick.

4.16.114 c-lw6hlp-list-show

— C function exported to Guile: c-lw6hlp-list-show

Wrapper on lw6hlp_list_show.

4.16.115 c-lw6hlp-list-sound

— C function exported to Guile: c-lw6hlp-list-sound

Wrapper on lw6hlp_list_sound.

4.16.116 c-lw6hlp-list-team-colors

— C function exported to Guile: c-lw6hlp-list-team-colors

Wrapper on lw6hlp_list_team_colors.

4.16.117 c-lw6hlp-list-weapons

— C function exported to Guile: c-lw6hlp-list-weapons

Wrapper on lw6hlp_list_weapons.

4.16.118 c-lw6ker-add-cursor

— C function exported to Guile: c-lw6ker-add-cursor

Wrapper on lw6ker_add_cursor.

4.16.119 c-lw6ker-build-game-state

— C function exported to Guile: c-lw6ker-build-game-state

Wrapper on lw6ker_build_game_state.

4.16.120 c-lw6ker-build-game-struct

— C function exported to Guile: c-lw6ker-build-game-struct

Wrapper on lw6ker_build_game_struct.

4.16.121 c-lw6ker-cursor-exists

— C function exported to Guile: c-lw6ker-cursor-exists

Wrapper on lw6ker_cursor_exists.

4.16.122 c-lw6ker-did-cursor-win

— C function exported to Guile: c-lw6ker-did-cursor-win

Wrapper on lw6ker_did_cursor_win.

4.16.123 c-lw6ker-do-round

— C function exported to Guile: c-lw6ker-do-round

Wrapper on lw6ker_do_round.

4.16.124 c-lw6ker-dup-game-state

— C function exported to Guile: c-lw6ker-dup-game-state

Wrapper on lw6ker_dup_game_state.

4.16.125 c-lw6ker-game-state-checksum

— C function exported to Guile: c-lw6ker-game-state-checksum

Wrapper on lw6ker_game_state_checksum.

4.16.126 c-lw6ker-game-struct-checksum

— C function exported to Guile: c-lw6ker-game-struct-checksum

Wrapper on lw6ker_game_struct_checksum.

4.16.127 c-lw6ker-get-cursor

— C function exported to Guile: c-lw6ker-get-cursor

Wrapper on lw6ker_get_cursor.

4.16.128 c-lw6ker-get-moves

— C function exported to Guile: c-lw6ker-get-moves

Wrapper on lw6ker_get_moves.

4.16.129 c-lw6ker-get-rounds

— C function exported to Guile: c-lw6ker-get-rounds

Wrapper on lw6ker_get_rounds.

4.16.130 c-lw6ker-get-spreads

— C function exported to Guile: c-lw6ker-get-spreads

Wrapper on lw6ker_get_spreads.

4.16.131 c-lw6ker-is-over

— C function exported to Guile: c-lw6ker-is-over

Wrapper on lw6ker_is_over.

4.16.132 c-lw6ker-node-exists

— C function exported to Guile: c-lw6ker-node-exists

Wrapper on lw6ker_node_exists.

4.16.133 c-lw6ker-register-node

— C function exported to Guile: c-lw6ker-register-node

Wrapper on lw6ker_register_node.

4.16.134 c-lw6ker-remove-cursor

— C function exported to Guile: c-lw6ker-remove-cursor

Wrapper on lw6ker_remove_cursor.

4.16.135 c-lw6ker-set-cursor

— C function exported to Guile: c-lw6ker-set-cursor

Wrapper on lw6ker_set_cursor.

4.16.136 c-lw6ker-sync-game-state

— C function exported to Guile: c-lw6ker-sync-game-state

Wrapper on lw6ker_sync_game_state.

4.16.137 c-lw6ker-unregister-node

— C function exported to Guile: c-lw6ker-unregister-node

Wrapper on lw6ker_unregister_node.

4.16.138 c-lw6ldr-chain-entry

— C function exported to Guile: c-lw6ldr-chain-entry

Wrapper on lw6ldr_chain_entry.

4.16.139 c-lw6ldr-exp-validate

— C function exported to Guile: c-lw6ldr-exp-validate

Wrapper on lw6ldr_exp_validate.

4.16.140 c-lw6ldr-get-entries

— C function exported to Guile: c-lw6ldr-get-entries

Wrapper on lw6ldr_get_entries.

4.16.141 c-lw6ldr-hints-get-default

— C function exported to Guile: c-lw6ldr-hints-get-default

Wrapper on lw6ldr_hints_get_default.

4.16.142 c-lw6ldr-print-examples

— C function exported to Guile: c-lw6ldr-print-examples

Wrapper on lw6ldr_print_examples.

4.16.143 c-lw6ldr-read

— C function exported to Guile: c-lw6ldr-read

Wrapper on lw6ldr_read.

4.16.144 c-lw6ldr-read-relative

— C function exported to Guile: c-lw6ldr-read-relative

Wrapper on lw6ldr_read_relative.

4.16.145 c-lw6map-exp-get-unlocked-team-color

— C function exported to Guile: c-lw6map-exp-get-unlocked-team-color

Wrapper on lw6map_exp_get_unlocked_team_color.

4.16.146 c-lw6map-exp-get-unlocked-weapon

— C function exported to Guile: c-lw6map-exp-get-unlocked-weapon

Wrapper on lw6map_exp_get_unlocked_weapon.

4.16.147 c-lw6map-exp-is-team-color-allowed

— C function exported to Guile: c-lw6map-exp-is-team-color-allowed

Wrapper on lw6map_exp_is_team_color_allowed.

4.16.148 c-lw6map-exp-is-weapon-allowed

— C function exported to Guile: c-lw6map-exp-is-weapon-allowed

Wrapper on lw6map_exp_is_weapon_allowed.

4.16.149 c-lw6map-get-look

— C function exported to Guile: c-lw6map-get-look

Wrapper on lw6map_get_look.

4.16.150 c-lw6map-get-music-dir

— C function exported to Guile: c-lw6map-get-music-dir

Wrapper on lw6map_get_music_dir.

4.16.151 c-lw6map-param-get

— C function exported to Guile: c-lw6map-param-get

Wrapper on lw6map_param_get.

4.16.152 c-lw6map-rules-get-default

— C function exported to Guile: c-lw6map-rules-get-default

Wrapper on lw6map_rules_get_default.

4.16.153 c-lw6map-rules-get-int

— C function exported to Guile: c-lw6map-rules-get-int

Wrapper on lw6map_rules_get_int.

4.16.154 c-lw6map-rules-get-max

— C function exported to Guile: c-lw6map-rules-get-max

Wrapper on lw6map_rules_get_max.

4.16.155 c-lw6map-rules-get-min

— C function exported to Guile: c-lw6map-rules-get-min

Wrapper on lw6map_rules_get_min.

4.16.156 c-lw6map-style-get-default

— C function exported to Guile: c-lw6map-style-get-default

Wrapper on lw6map_style_get_default.

4.16.157 c-lw6map-team-color-index-to-key

— C function exported to Guile: c-lw6map-team-color-index-to-key

Wrapper on lw6map_team_color_index_to_key.

4.16.158 c-lw6map-team-color-index-to-label

— C function exported to Guile: c-lw6map-team-color-index-to-label

Wrapper on lw6map_team_color_index_to_label.

4.16.159 c-lw6map-team-color-key-to-index

— C function exported to Guile: c-lw6map-team-color-key-to-index

Wrapper on lw6map_team_color_key_to_index.

4.16.160 c-lw6map-team-color-list

— C function exported to Guile: c-lw6map-team-color-list

Wrapper on lw6map_team_color_list.

4.16.161 c-lw6map-teams-get-default

— C function exported to Guile: c-lw6map-teams-get-default

Wrapper on lw6map_teams_get_default.

4.16.162 c-lw6map-weapon-index-to-key

— C function exported to Guile: c-lw6map-weapon-index-to-key

Wrapper on lw6map_weapon_index_to_key.

4.16.163 c-lw6map-weapon-index-to-label

— C function exported to Guile: c-lw6map-weapon-index-to-label

Wrapper on lw6map_weapon_index_to_label.

4.16.164 c-lw6map-weapon-key-to-index

— C function exported to Guile: c-lw6map-weapon-key-to-index

Wrapper on lw6map_weapon_key_to_index.

4.16.165 c-lw6map-weapon-list

— C function exported to Guile: c-lw6map-weapon-list

Wrapper on lw6map_weapon_list.

4.16.166 c-lw6net-init

— C function exported to Guile: c-lw6net-init

Wrapper on lw6net_init.

4.16.167 c-lw6net-quit

— C function exported to Guile: c-lw6net-quit

Wrapper on lw6net_quit.

4.16.168 c-lw6p2p-db-default-name

— C function exported to Guile: c-lw6p2p-db-default-name

Wrapper on lw6p2p_db_default_name.

4.16.169 c-lw6p2p-db-new

— C function exported to Guile: c-lw6p2p-db-new

Wrapper on lw6p2p_db_new.

4.16.170 c-lw6p2p-db-reset

— C function exported to Guile: c-lw6p2p-db-reset

Wrapper on lw6p2p_db_reset.

4.16.171 c-lw6p2p-node-close

— C function exported to Guile: c-lw6p2p-node-close

Wrapper on lw6p2p_node_close.

4.16.172 c-lw6p2p-node-get-entries

— C function exported to Guile: c-lw6p2p-node-get-entries

Wrapper on lw6p2p_node_get_entries.

4.16.173 c-lw6p2p-node-get-id

— C function exported to Guile: c-lw6p2p-node-get-id

Wrapper on lw6p2p_node_get_id.

4.16.174 c-lw6p2p-node-new

— C function exported to Guile: c-lw6p2p-node-new

Wrapper on lw6p2p_node_new.

4.16.175 c-lw6p2p-node-poll

— C function exported to Guile: c-lw6p2p-node-poll

Wrapper on lw6p2p_node_poll.

4.16.176 c-lw6pil-bench

— C function exported to Guile: c-lw6pil-bench

Wrapper on lw6pil_bench.

4.16.177 c-lw6pil-build-pilot

— C function exported to Guile: c-lw6pil-build-pilot

Wrapper on lw6pil_build_pilot.

4.16.178 c-lw6pil-calibrate

— C function exported to Guile: c-lw6pil-calibrate

Wrapper on lw6pil_calibrate.

4.16.179 c-lw6pil-commit

— C function exported to Guile: c-lw6pil-commit

Wrapper on lw6pil_commit.

4.16.180 c-lw6pil-did-cursor-win

— C function exported to Guile: c-lw6pil-did-cursor-win

Wrapper on lw6pil_did_cursor_win.

4.16.181 c-lw6pil-execute-command

— C function exported to Guile: c-lw6pil-execute-command

Wrapper on lw6pil_execute_command.

4.16.182 c-lw6pil-fix-coords

— C function exported to Guile: c-lw6pil-fix-coords

Wrapper on lw6pil_coords_fix.

4.16.183 c-lw6pil-fix-coords-x10

— C function exported to Guile: c-lw6pil-fix-coords-x10

Wrapper on lw6pil_coords_fix_x10.

4.16.184 c-lw6pil-get-last-commit-seq

— C function exported to Guile: c-lw6pil-get-last-commit-seq

Wrapper on lw6pil_get_last_commit_seq.

4.16.185 c-lw6pil-get-looser

— C function exported to Guile: c-lw6pil-get-looser

Wrapper on lw6pil_get_looser.

4.16.186 c-lw6pil-get-max-seq

— C function exported to Guile: c-lw6pil-get-max-seq

Wrapper on lw6pil_get_max_seq.

4.16.187 c-lw6pil-get-next-seq

— C function exported to Guile: c-lw6pil-get-next-seq

Wrapper on lw6pil_get_next_seq.

4.16.188 c-lw6pil-get-reference-current-seq

— C function exported to Guile: c-lw6pil-get-reference-current-seq

Wrapper on lw6pil_get_reference_current_seq.

4.16.189 c-lw6pil-get-reference-target-seq

— C function exported to Guile: c-lw6pil-get-reference-target-seq

Wrapper on lw6pil_get_reference_target_seq.

4.16.190 c-lw6pil-get-winner

— C function exported to Guile: c-lw6pil-get-winner

Wrapper on lw6pil_get_winner.

4.16.191 c-lw6pil-is-over

— C function exported to Guile: c-lw6pil-is-over

Wrapper on lw6pil_is_over.

4.16.192 c-lw6pil-local-command

— C function exported to Guile: c-lw6pil-local-command

Wrapper on lw6pil_local_command.

4.16.193 c-lw6pil-local-cursors-set-main

— C function exported to Guile: c-lw6pil-local-cursors-set-main

Wrapper on lw6pil_local_cursors_set_main.

4.16.194 c-lw6pil-local-cursors-set-mouse-controlled

— C function exported to Guile: c-lw6pil-local-cursors-set-mouse-controlled

Wrapper on lw6pil_local_cursors_set_mouse_controlled.

4.16.195 c-lw6pil-make-backup

— C function exported to Guile: c-lw6pil-make-backup

Wrapper on lw6pil_make_backup.

4.16.196 c-lw6pil-send-command

— C function exported to Guile: c-lw6pil-send-command

Wrapper on lw6pil_send_command.

4.16.197 c-lw6pil-seq-random-0

— C function exported to Guile: c-lw6pil-seq-random-0

Wrapper on lw6pil_seq_random_0.

4.16.198 c-lw6pil-slow-down

— C function exported to Guile: c-lw6pil-slow-down

Wrapper on lw6pil_slow_down.

4.16.199 c-lw6pil-speed-up

— C function exported to Guile: c-lw6pil-speed-up

Wrapper on lw6pil_speed_up.

4.16.200 c-lw6pil-sync-from-backup

— C function exported to Guile: c-lw6pil-sync-from-backup

Wrapper on lw6pil_sync_from_backup.

4.16.201 c-lw6pil-sync-from-draft

— C function exported to Guile: c-lw6pil-sync-from-draft

Wrapper on lw6pil_sync_from_draft.

4.16.202 c-lw6pil-sync-from-reference

— C function exported to Guile: c-lw6pil-sync-from-reference

Wrapper on lw6pil_sync_from_reference.

4.16.203 c-lw6snd-get-backends

— C function exported to Guile: c-lw6snd-get-backends

Wrapper on lw6snd_get_backends.

4.16.204 c-lw6snd-is-music-file

— C function exported to Guile: c-lw6snd-is-music-file

Wrapper on lw6snd_is_music_file.

4.16.205 c-lw6snd-new

— C function exported to Guile: c-lw6snd-new

Wrapper on lw6snd_new.

4.16.206 c-lw6snd-play-fx

— C function exported to Guile: c-lw6snd-play-fx

Wrapper on lw6snd_play_fx.

4.16.207 c-lw6snd-play-music-file

— C function exported to Guile: c-lw6snd-play-music-file

Wrapper on lw6snd_play_music_file.

4.16.208 c-lw6snd-play-music-random

— C function exported to Guile: c-lw6snd-play-music-random

Wrapper on lw6snd_play_music_random.

4.16.209 c-lw6snd-poll

— C function exported to Guile: c-lw6snd-poll

Wrapper on lw6snd_poll.

4.16.210 c-lw6snd-release

— C function exported to Guile: c-lw6snd-release

Wrapper on lw6snd_release.

4.16.211 c-lw6snd-set-fx-volume

— C function exported to Guile: c-lw6snd-set-fx-volume

Wrapper on lw6snd_set_fx_volume.

4.16.212 c-lw6snd-set-music-volume

— C function exported to Guile: c-lw6snd-set-music-volume

Wrapper on lw6snd_set_music_volume.

4.16.213 c-lw6snd-set-water-volume

— C function exported to Guile: c-lw6snd-set-water-volume

Wrapper on lw6snd_set_water_volume.

4.16.214 c-lw6snd-stop-music

— C function exported to Guile: c-lw6snd-stop-music

Wrapper on lw6snd_stop_music.

4.16.215 c-lw6srv-get-backends

— C function exported to Guile: c-lw6srv-get-backends

Wrapper on lw6srv_get_backends.

4.16.216 c-lw6sys-build-get-bin-id

— C function exported to Guile: c-lw6sys-build-get-bin-id

Wrapper on lw6sys_build_get_bin_id.

4.16.217 c-lw6sys-build-get-bugs-url

— C function exported to Guile: c-lw6sys-build-get-bugs-url

Wrapper on lw6sys_build_get_bugs_url.

4.16.218 c-lw6sys-build-get-cflags

— C function exported to Guile: c-lw6sys-build-get-cflags

Wrapper on lw6sys_build_get_cflags.

4.16.219 c-lw6sys-build-get-codename

— C function exported to Guile: c-lw6sys-build-get-codename

Wrapper on lw6sys_build_get_codename.

4.16.220 c-lw6sys-build-get-configure-args

— C function exported to Guile: c-lw6sys-build-get-configure-args

Wrapper on lw6sys_build_get_configure_args.

4.16.221 c-lw6sys-build-get-copyright

— C function exported to Guile: c-lw6sys-build-get-copyright

Wrapper on lw6sys_build_get_copyright.

4.16.222 c-lw6sys-build-get-datadir

— C function exported to Guile: c-lw6sys-build-get-datadir

Wrapper on lw6sys_build_get_datadir.

4.16.223 c-lw6sys-build-get-date

— C function exported to Guile: c-lw6sys-build-get-date

Wrapper on lw6sys_build_get_date.

4.16.224 c-lw6sys-build-get-enable-allinone

— C function exported to Guile: c-lw6sys-build-get-enable-allinone

Wrapper on lw6sys_build_get_enable_allinone.

4.16.225 c-lw6sys-build-get-enable-console

— C function exported to Guile: c-lw6sys-build-get-enable-console

Wrapper on lw6sys_build_get_enable_console.

4.16.226 c-lw6sys-build-get-enable-fullstatic

— C function exported to Guile: c-lw6sys-build-get-enable-fullstatic

Wrapper on lw6sys_build_get_enable_fullstatic.

4.16.227 c-lw6sys-build-get-enable-gcov

— C function exported to Guile: c-lw6sys-build-get-enable-gcov

Wrapper on lw6sys_build_get_enable_gcov.

4.16.228 c-lw6sys-build-get-enable-gprof

— C function exported to Guile: c-lw6sys-build-get-enable-gprof

Wrapper on lw6sys_build_get_enable_gprof.

4.16.229 c-lw6sys-build-get-enable-gtk

— C function exported to Guile: c-lw6sys-build-get-enable-gtk

Wrapper on lw6sys_build_get_enable_gtk.

4.16.230 c-lw6sys-build-get-enable-instrument

— C function exported to Guile: c-lw6sys-build-get-enable-instrument

Wrapper on lw6sys_build_get_enable_instrument.

4.16.231 c-lw6sys-build-get-enable-mod-csound

— C function exported to Guile: c-lw6sys-build-get-enable-mod-csound

Wrapper on lw6sys_build_get_enable_mod_csound.

4.16.232 c-lw6sys-build-get-enable-mod-gl

— C function exported to Guile: c-lw6sys-build-get-enable-mod-gl

Wrapper on lw6sys_build_get_enable_mod_gl.

4.16.233 c-lw6sys-build-get-enable-mod-http

— C function exported to Guile: c-lw6sys-build-get-enable-mod-http

Wrapper on lw6sys_build_get_enable_mod_http.

4.16.234 c-lw6sys-build-get-enable-mod-ogg

— C function exported to Guile: c-lw6sys-build-get-enable-mod-ogg

Wrapper on lw6sys_build_get_enable_mod_ogg.

4.16.235 c-lw6sys-build-get-enable-openmp

— C function exported to Guile: c-lw6sys-build-get-enable-openmp

Wrapper on lw6sys_build_get_enable_openmp.

4.16.236 c-lw6sys-build-get-enable-optimize

— C function exported to Guile: c-lw6sys-build-get-enable-optimize

Wrapper on lw6sys_build_get_enable_optimize.

4.16.237 c-lw6sys-build-get-enable-paranoid

— C function exported to Guile: c-lw6sys-build-get-enable-paranoid

Wrapper on lw6sys_build_get_enable_paranoid.

4.16.238 c-lw6sys-build-get-enable-profiler

— C function exported to Guile: c-lw6sys-build-get-enable-profiler

Wrapper on lw6sys_build_get_enable_profiler.

4.16.239 c-lw6sys-build-get-enable-valgrind

— C function exported to Guile: c-lw6sys-build-get-enable-valgrind

Wrapper on lw6sys_build_get_enable_valgrind.

4.16.240 c-lw6sys-build-get-endianness

— C function exported to Guile: c-lw6sys-build-get-endianness

Wrapper on lw6sys_build_get_endianness.

4.16.241 c-lw6sys-build-get-gcc-version

— C function exported to Guile: c-lw6sys-build-get-gcc-version

Wrapper on lw6sys_build_get_gcc_version.

4.16.242 c-lw6sys-build-get-home-url

— C function exported to Guile: c-lw6sys-build-get-home-url

Wrapper on lw6sys_build_get_home_url.

4.16.243 c-lw6sys-build-get-host-cpu

— C function exported to Guile: c-lw6sys-build-get-host-cpu

Wrapper on lw6sys_build_get_host_cpu.

4.16.244 c-lw6sys-build-get-host-os

— C function exported to Guile: c-lw6sys-build-get-host-os

Wrapper on lw6sys_build_get_host_os.

4.16.245 c-lw6sys-build-get-hostname

— C function exported to Guile: c-lw6sys-build-get-hostname

Wrapper on lw6sys_build_get_hostname.

4.16.246 c-lw6sys-build-get-includedir

— C function exported to Guile: c-lw6sys-build-get-includedir

Wrapper on lw6sys_build_get_includedir.

4.16.247 c-lw6sys-build-get-ldflags

— C function exported to Guile: c-lw6sys-build-get-ldflags

Wrapper on lw6sys_build_get_ldflags.

4.16.248 c-lw6sys-build-get-libdir

— C function exported to Guile: c-lw6sys-build-get-libdir

Wrapper on lw6sys_build_get_libdir.

4.16.249 c-lw6sys-build-get-license

— C function exported to Guile: c-lw6sys-build-get-license

Wrapper on lw6sys_build_get_license.

4.16.250 c-lw6sys-build-get-localedir

— C function exported to Guile: c-lw6sys-build-get-localedir

Wrapper on lw6sys_build_get_localedir.

4.16.251 c-lw6sys-build-get-md5sum

— C function exported to Guile: c-lw6sys-build-get-md5sum

Wrapper on lw6sys_build_get_md5sum.

4.16.252 c-lw6sys-build-get-package-name

— C function exported to Guile: c-lw6sys-build-get-package-name

Wrapper on lw6sys_build_get_package_name.

4.16.253 c-lw6sys-build-get-package-string

— C function exported to Guile: c-lw6sys-build-get-package-string

Wrapper on lw6sys_build_get_package_string.

4.16.254 c-lw6sys-build-get-package-tarname

— C function exported to Guile: c-lw6sys-build-get-package-tarname

Wrapper on lw6sys_build_get_package_tarname.

4.16.255 c-lw6sys-build-get-pointer-size

— C function exported to Guile: c-lw6sys-build-get-pointer-size

Wrapper on lw6sys_build_get_pointer_size.

4.16.256 c-lw6sys-build-get-prefix

— C function exported to Guile: c-lw6sys-build-get-prefix

Wrapper on lw6sys_build_get_prefix.

4.16.257 c-lw6sys-build-get-stamp

— C function exported to Guile: c-lw6sys-build-get-stamp

Wrapper on lw6sys_build_get_stamp.

4.16.258 c-lw6sys-build-get-time

— C function exported to Guile: c-lw6sys-build-get-time

Wrapper on lw6sys_build_get_time.

4.16.259 c-lw6sys-build-get-top-srcdir

— C function exported to Guile: c-lw6sys-build-get-top-srcdir

Wrapper on lw6sys_build_get_top_srcdir.

4.16.260 c-lw6sys-build-get-version

— C function exported to Guile: c-lw6sys-build-get-version

Wrapper on lw6sys_build_get_version.

4.16.261 c-lw6sys-build-is-gnu

— C function exported to Guile: c-lw6sys-build-is-gnu

Wrapper on lw6sys_build_is_gnu.

4.16.262 c-lw6sys-build-is-gp2x

— C function exported to Guile: c-lw6sys-build-is-gp2x

Wrapper on lw6sys_build_is_gp2x.

4.16.263 c-lw6sys-build-is-mac-os-x

— C function exported to Guile: c-lw6sys-build-is-mac-os-x

Wrapper on lw6sys_build_is_mac_os_x.

4.16.264 c-lw6sys-build-is-ms-windows

— C function exported to Guile: c-lw6sys-build-is-ms-windows

Wrapper on lw6sys_build_is_ms_windows.

4.16.265 c-lw6sys-build-is-unix

— C function exported to Guile: c-lw6sys-build-is-unix

Wrapper on lw6sys_build_is_unix.

4.16.266 c-lw6sys-build-is-x86

— C function exported to Guile: c-lw6sys-build-is-x86

Wrapper on lw6sys_build_is_x86.

4.16.267 c-lw6sys-debug-get

— C function exported to Guile: c-lw6sys-debug-get

Wrapper on lw6sys_debug_get.

4.16.268 c-lw6sys-debug-set

— C function exported to Guile: c-lw6sys-debug-set

Wrapper on lw6sys_debug_set.

4.16.269 c-lw6sys-delay

— C function exported to Guile: c-lw6sys-delay

Wrapper on lw6sys_delay.

4.16.270 c-lw6sys-dump

— C function exported to Guile: c-lw6sys-dump

Wrapper on lw6sys_dump.

4.16.271 c-lw6sys-dump-clear

— C function exported to Guile: c-lw6sys-dump-clear

Wrapper on lw6sys_dump_clear.

4.16.272 c-lw6sys-generate-id-16

— C function exported to Guile: c-lw6sys-generate-id-16

Wrapper on lw6sys_generate_id_16.

4.16.273 c-lw6sys-generate-id-32

— C function exported to Guile: c-lw6sys-generate-id-32

Wrapper on lw6sys_generate_id_32.

4.16.274 c-lw6sys-generate-id-64

— C function exported to Guile: c-lw6sys-generate-id-64

Wrapper on lw6sys_generate_id_64.

4.16.275 c-lw6sys-get-config-file

— C function exported to Guile: c-lw6sys-get-config-file

Wrapper on lw6sys_get_config_file.

4.16.276 c-lw6sys-get-cwd

— C function exported to Guile: c-lw6sys-get-cwd

Wrapper on lw6sys_get_cwd.

4.16.277 c-lw6sys-get-cycle

— C function exported to Guile: c-lw6sys-get-cycle

Wrapper on lw6sys_get_cycle.

4.16.278 c-lw6sys-get-data-dir

— C function exported to Guile: c-lw6sys-get-data-dir

Wrapper on lw6sys_get_data_dir.

4.16.279 c-lw6sys-get-default-config-file

— C function exported to Guile: c-lw6sys-get-default-config-file

Wrapper on lw6sys_get_default_config_file.

4.16.280 c-lw6sys-get-default-data-dir

— C function exported to Guile: c-lw6sys-get-default-data-dir

Wrapper on lw6sys_get_default_data_dir.

4.16.281 c-lw6sys-get-default-log-file

— C function exported to Guile: c-lw6sys-get-default-log-file

Wrapper on lw6sys_get_default_log_file.

4.16.282 c-lw6sys-get-default-map-dir

— C function exported to Guile: c-lw6sys-get-default-map-dir

Wrapper on lw6sys_get_default_map_dir.

4.16.283 c-lw6sys-get-default-map-path

— C function exported to Guile: c-lw6sys-get-default-map-path

Wrapper on lw6sys_get_default_map_path.

4.16.284 c-lw6sys-get-default-mod-dir

— C function exported to Guile: c-lw6sys-get-default-mod-dir

Wrapper on lw6sys_get_default_mod_dir.

4.16.285 c-lw6sys-get-default-music-dir

— C function exported to Guile: c-lw6sys-get-default-music-dir

Wrapper on lw6sys_get_default_music_dir.

4.16.286 c-lw6sys-get-default-music-path

— C function exported to Guile: c-lw6sys-get-default-music-path

Wrapper on lw6sys_get_default_music_path.

4.16.287 c-lw6sys-get-default-prefix

— C function exported to Guile: c-lw6sys-get-default-prefix

Wrapper on lw6sys_get_default_prefix.

4.16.288 c-lw6sys-get-default-script-file

— C function exported to Guile: c-lw6sys-get-default-script-file

Wrapper on lw6sys_get_default_script_file.

4.16.289 c-lw6sys-get-default-user-dir

— C function exported to Guile: c-lw6sys-get-default-user-dir

Wrapper on lw6sys_get_default_user_dir.

4.16.290 c-lw6sys-get-hostname

— C function exported to Guile: c-lw6sys-get-hostname

Wrapper on lw6sys_get_hostname.

4.16.291 c-lw6sys-get-log-file

— C function exported to Guile: c-lw6sys-get-log-file

Wrapper on lw6sys_get_log_file.

4.16.292 c-lw6sys-get-map-dir

— C function exported to Guile: c-lw6sys-get-map-dir

Wrapper on lw6sys_get_map_dir.

4.16.293 c-lw6sys-get-map-path

— C function exported to Guile: c-lw6sys-get-map-path

Wrapper on lw6sys_get_map_path.

4.16.294 c-lw6sys-get-mod-dir

— C function exported to Guile: c-lw6sys-get-mod-dir

Wrapper on lw6sys_get_mod_dir.

4.16.295 c-lw6sys-get-music-dir

— C function exported to Guile: c-lw6sys-get-music-dir

Wrapper on lw6sys_get_music_dir.

4.16.296 c-lw6sys-get-music-path

— C function exported to Guile: c-lw6sys-get-music-path

Wrapper on lw6sys_get_music_path.

4.16.297 c-lw6sys-get-prefix

— C function exported to Guile: c-lw6sys-get-prefix

Wrapper on lw6sys_get_prefix.

4.16.298 c-lw6sys-get-run-dir

— C function exported to Guile: c-lw6sys-get-run-dir

Wrapper on lw6sys_get_run_dir.

4.16.299 c-lw6sys-get-script-file

— C function exported to Guile: c-lw6sys-get-script-file

Wrapper on lw6sys_get_script_file.

4.16.300 c-lw6sys-get-timestamp

— C function exported to Guile: c-lw6sys-get-timestamp

Wrapper on lw6sys_get_timestamp.

4.16.301 c-lw6sys-get-uptime

— C function exported to Guile: c-lw6sys-get-uptime

Wrapper on lw6sys_get_uptime.

4.16.302 c-lw6sys-get-user-dir

— C function exported to Guile: c-lw6sys-get-user-dir

Wrapper on lw6sys_get_user_dir.

4.16.303 c-lw6sys-get-username

— C function exported to Guile: c-lw6sys-get-username

Wrapper on lw6sys_get_username.

4.16.304 c-lw6sys-getenv

— C function exported to Guile: c-lw6sys-getenv

Wrapper on lw6sys_getenv.

4.16.305 c-lw6sys-getenv-prefixed

— C function exported to Guile: c-lw6sys-getenv-prefixed

Wrapper on lw6sys_getenv_prefixed.

4.16.306 c-lw6sys-idle

— C function exported to Guile: c-lw6sys-idle

Wrapper on lw6sys_idle.

4.16.307 c-lw6sys-log

— C function exported to Guile: c-lw6sys-log

Wrapper on lw6sys_log.

4.16.308 c-lw6sys-log-get-level

— C function exported to Guile: c-lw6sys-log-get-level

Wrapper on lw6sys_log_get_level.

4.16.309 c-lw6sys-log-set-level

— C function exported to Guile: c-lw6sys-log-set-level

Wrapper on lw6sys_log_set_level.

4.16.310 c-lw6sys-megabytes-available

— C function exported to Guile: c-lw6sys-megabytes-available

Wrapper on lw6sys_megabytes_available.

4.16.311 c-lw6sys-openmp-get-num-procs

— C function exported to Guile: c-lw6sys-openmp-get-num-procs

Wrapper on lw6sys_openmp_get_num_procs.

4.16.312 c-lw6sys-path-concat

— C function exported to Guile: c-lw6sys-path-concat

Wrapper on lw6sys_path_concat.

4.16.313 c-lw6sys-path-file-only

— C function exported to Guile: c-lw6sys-path-file-only

Wrapper on lw6sys_path_file_only.

4.16.314 c-lw6sys-path-parent

— C function exported to Guile: c-lw6sys-path-parent

Wrapper on lw6sys_path_parent.

4.16.315 c-lw6sys-path-split

— C function exported to Guile: c-lw6sys-path-split

Wrapper on lw6sys_path_split.

4.16.316 c-lw6sys-set-memory-bazooka-eraser

— C function exported to Guile: c-lw6sys-set-memory-bazooka-eraser

Wrapper on lw6sys_set_memory_bazooka_eraser.

4.16.317 c-lw6sys-set-memory-bazooka-size

— C function exported to Guile: c-lw6sys-set-memory-bazooka-size

Wrapper on lw6sys_set_memory_bazooka_size.

4.16.318 c-lw6sys-signal-custom

— C function exported to Guile: c-lw6sys-signal-custom

Wrapper on lw6sys_signal_custom.

4.16.319 c-lw6sys-signal-default

— C function exported to Guile: c-lw6sys-signal-default

Wrapper on lw6sys_signal_default.

4.16.320 c-lw6sys-signal-poll-quit

— C function exported to Guile: c-lw6sys-signal-poll-quit

Wrapper on lw6sys_signal_poll_quit.

4.16.321 c-lw6sys-signal-send-quit

— C function exported to Guile: c-lw6sys-signal-send-quit

Wrapper on lw6sys_signal_send_quit.

4.16.322 c-lw6sys-sleep

— C function exported to Guile: c-lw6sys-sleep

Wrapper on lw6sys_sleep.

4.16.323 c-lw6sys-snooze

— C function exported to Guile: c-lw6sys-snooze

Wrapper on lw6sys_snooze.

4.16.324 c-lw6sys-url-canonize

— C function exported to Guile: c-lw6sys-url-canonize

Wrapper on lw6sys_url_canonize.

4.16.325 c-lw6tsk-loader-get-stage

— C function exported to Guile: c-lw6tsk-loader-get-stage

Wrapper on lw6tsk_loader_get_stage.

4.16.326 c-lw6tsk-loader-new

— C function exported to Guile: c-lw6tsk-loader-new

Wrapper on lw6tsk_loader_new.

4.16.327 c-lw6tsk-loader-pop

— C function exported to Guile: c-lw6tsk-loader-pop

Wrapper on lw6tsk_loader_pop.

4.16.328 c-lw6tsk-loader-push

— C function exported to Guile: c-lw6tsk-loader-push

Wrapper on lw6tsk_loader_push.


Previous: C to Guile, Up: Reference

4.17 Script hooks


Previous: Reference, Up: Top

5 C API

This chapter contains a description of all modules and a list of all documented C functions in the program. It contains many references and is self-generated from C comments using gdoc by Simon Josefsson.

In order to reduce the number of pages of printed output, this complete reference is, by default, disabled in printable versions of the documentation (PostScript, PDF). This is both to make the manual more readable and to avoid wasting paper. Think about the environment.

It is however available in the HTML version of the documentation, which you can read online on http://www.gnu.org/software/liquidwar6/manual/html_node/.

Additionnally, the following adresses contain various view on the source code, giving informations on all the internal and public C interfaces:


Next: , Up: C API

5.1 libliquidwar6

5.1.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/index.html.

5.1.2 API

— Function: void lw6_resize_callback (lw6gui_video_mode_t * video_mode)

video_mode: the new video mode

This callback is here because gfx needs to update the config when the screen is resized. But... we did not want to make gfx depend on cfg "directly". It's cleaner to pass parameters with Scheme, in the long run, it should make things easier. So this callback is the solution. Another side effect is that this way there's a tangible obvious trace of this updating of config status by the gfx module. Seeing it sticking out like a thumb isn't a bad thing.

Return value: none

— Function: void lw6_release ()

Functions which will call quit(), free(), destroy() on whatever smob object that has threads and/or requires hardware ressources. This is to be called before the Guile interpreter ends. This is because when it garbage collects objects at the end of the program, it has no idea of what order to use when freeing objects. So if an object which uses another one in a thread is freed after the other is freed, you get a (rather unexplainabled if not warned) segfault.

Return value: none

— Function: void lw6_exit ()

Sends a quit message and displays a newline.

Return value: none

— Function: int lw6_fix_env (int argc, char * [] argv)

argc: number of args as passed to main argv: array of strings as passed to main

Fixes environment variables (path related) so that program can find its requirements. This must be called early in the program flow (else other calls might fail).

Return value: 1 if success, 0 if failure

— Function: int lw6_register_funcs ()

Register all the functions, make them callable from Guile. This is a very simple yet long and very usefull function, without it Guile has no knowledge of what LW6 is.

Return value: 1 on success, 0 if failed.

— Function: extern void lw6_cns_handler (char * c_line)

c_line: the line typed by the user

This function will be called every time a message is typed on the console. It runs the given line in the current Guile environment.

Return value: none

— Function: int lw6_init_global (int argc, char * [] argv)

argc: number of args as passed to main argv: array of strings as passed to main

Initializes global values to their defaults.

Return value: 1 on success, 0 if failed

— Function: void lw6_quit_global ()

argc: number of args as passed to main argv: array of strings as passed to main

Frees global values. Will also garbage collect objects in case Guile failed to do it perfectly (or we failed to tell Guile how to do it).

Return value: none.

— Function: int lw6_main (int argc, char * [] argv)

argc: the argc parameter of the main() function, that is, the number of command-line args.

argv: the argv parameter of the main() function, that is, an array containing pointers on command-line args.

This function is directly called by main(). This means by linking against libliquidwar6 and calling it, you would have a program that is almost exactly the "official" upstream liquidwar6 binary, except you can tweak it and have all the power to call whatever other functions you like, embed it. In short, everything the binary does, you can do it in your own binarn, by linking against the library and calling this function.

Return value: 1 if success, zero if failure. Note that this is the "standard" C / liquidwar6 way to proceed, but your main() function should return 0 if success, else an error code. Typical use is "return !lw6_main(argc, argv);".

— Function: int lw6_process_non_run_options (int argc, char * [] argv, int * run_game)

argc: the number of command-line args, as passed to main()

argv: an array of strings containing command-line args, as passed to main()

run_game: a pointer to a boolean which will contain true (1) if the game must be launched, or false (0) if the option is such that game must be skipped. Example: –copyright, –help, ...

Return value: non-zero if success, 0 if error. The error can be, for instance, the test suite returning "no, tests were not OK".

— Function: void lw6_print_help ()

Displays a short help message.

Return value: none

— Function: void lw6_print_version ()

Displays the version of the game.

Return value: none

— Function: void lw6_print_short_copyright ()

Displays the copyright of the game (short version).

Return value: none

— Function: void lw6_print_long_copyright ()

Displays the copyright of the game (long version).

Return value: none

— Function: void lw6_print_bench (float bench_result)

Displays the program bench value.

Return value: none

— Function: void lw6_print_pedigree ()

Displays the program pedigree, think of this as version on steroids.

Return value: none

— Function: void lw6_print_host ()

Displays the host on which the program was compiled.

Return value: none

— Function: void lw6_print_audit (int argc, char * [] argv)

Displays various paths used by the game.

Return value: none

— Function: void lw6_print_modules ()

Displays the list of modules compiled with the game.

Return value: none

— Function: void lw6_print_list_quick ()

Displays the list of 'quick' options.

Return value: none

— Function: void lw6_print_list_doc ()

Displays the list of 'doc' options.

Return value: none

— Function: void lw6_print_list_show ()

Displays the list of 'show' options.

Return value: none

— Function: void lw6_print_list_path ()

Displays the list of 'path' options.

Return value: none

— Function: void lw6_print_list_players ()

Displays the list of 'players' options.

Return value: none

— Function: void lw6_print_list_input ()

Displays the list of 'input' options.

Return value: none

— Function: void lw6_print_list_graphics ()

Displays the list of 'graphics' options.

Return value: none

— Function: void lw6_print_list_sound ()

Displays the list of 'sound' options.

Return value: none

— Function: void lw6_print_list_network ()

Displays the list of 'network' options.

Return value: none

— Function: void lw6_print_list_map ()

Displays the list of 'map' options.

Return value: none

— Function: void lw6_print_list_map_rules ()

Displays the list of 'map rules' options.

Return value: none

— Function: void lw6_print_list_map_hints ()

Displays the list of 'map hints' options.

Return value: none

— Function: void lw6_print_list_map_style ()

Displays the list of 'map style' options.

Return value: none

— Function: void lw6_print_list_map_teams ()

Displays the list of 'map teams' options.

Return value: none

— Function: void lw6_print_list_funcs ()

Displays the list of 'funcs'.

Return value: none

— Function: void lw6_print_list_hooks ()

Displays the list of 'hooks'.

Return value: none

— Function: void lw6_print_list_advanced ()

Displays the list of 'advanced' options.

Return value: none

— Function: void lw6_print_list_aliases ()

Displays the list of options aliases.

Return value: none

— Function: void lw6_print_list_team_colors ()

Displays the list of team colors.

Return value: none

— Function: void lw6_print_list_weapons ()

Displays the list of weapons.

Return value: none

— Function: void lw6_print_list ()

Displays the list of all known options.

Return value: none

— Function: void lw6_print_about (char * keyword)

Displays the about message for a keyword.

Return value: none

— Function: void lw6_print_hello (int argc, char * [] argv)

Displays 'hello' at the beginning of the program.

Return value: none

— Function: void lw6_print_goodbye ()

Displays 'goodbye', typically use at end of program to know it's over and everything went fine.

Return value: none

— Function: SCM lw6_make_scm_dsp (lw6dsp_backend_t * c_dsp)

c_dsp: the display object

Creates an SCM 'dsp' object from C data.

Return value: the SCM object

— Function: lw6dsp_backend_t * lw6_scm_to_dsp (SCM dsp)

dsp: the dsp to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'dsp' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_dsp_smob (lw6_dsp_smob_t * dsp_smob)

dsp_smob: the smob to free

Frees a dsp smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_snd (lw6snd_backend_t * c_snd)

c_snd: the sound object

Creates an SCM 'snd' object from C data.

Return value: the SCM object

— Function: lw6snd_backend_t * lw6_scm_to_snd (SCM snd)

snd: the snd to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'snd' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_snd_smob (lw6_snd_smob_t * snd_smob)

snd_smob: the smob to free

Frees a snd smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_map (lw6map_level_t * c_map)

c_map: the map object

Creates an SCM 'map' object from C data.

Return value: the SCM object

— Function: lw6map_level_t * lw6_scm_to_map (SCM map)

map: the map to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'map' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_map_smob (lw6_map_smob_t * map_smob)

map_smob: the smob to free

Frees a map smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_menu (lw6gui_menu_t * c_menu)

c_menu: the menu object

Creates an SCM 'menu' object from C data.

Return value: the SCM object

— Function: lw6gui_menu_t * lw6_scm_to_menu (SCM menu)

menu: the menu to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'menu' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_menu_smob (lw6_menu_smob_t * menu_smob)

menu_smob: the smob to free

Frees a menu smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_game_struct (lw6ker_game_struct_t * c_game_struct, SCM map)

c_game_struct: the game struct object

map: the map (SCM object) referenced

Creates an SCM 'game-struct' object from C data. Passing the map object enables the garbage collector not to free the map until the game struct is freed.

Return value: the SCM object

— Function: lw6ker_game_struct_t * lw6_scm_to_game_struct (SCM game_struct)

game_struct: the game_struct to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'game_struct' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_game_struct_smob (lw6_game_struct_smob_t * game_struct_smob)

game_struct_smob: the smob to free

Frees a game_struct smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_game_state (lw6ker_game_state_t * c_game_state, SCM game_struct)

c_game_state: the game state object

game_struct: the game struct (SCM object) referenced

Creates an SCM 'game_state' object from C data. Passing game_struct enables the garbage collector not to free the game_struct until the game_state is freed.

Return value: the SCM object

— Function: lw6ker_game_state_t * lw6_scm_to_game_state (SCM game_state)

game_state: the game_state to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'game_state' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_game_state_smob (lw6_game_state_smob_t * game_state_smob)

game_state_smob: the smob to free

Frees a game_state smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_pilot (lw6pil_pilot_t * c_pilot)

c_pilot: the pilot object

Creates an SCM 'pilot' object from C data.

Return value: the SCM object

— Function: lw6pil_pilot_t * lw6_scm_to_pilot (SCM pilot)

pilot: the pilot to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'pilot' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_pilot_smob (lw6_pilot_smob_t * pilot_smob)

pilot_smob: the smob to free

Frees a pilot smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_bot (lw6bot_backend_t * c_bot, SCM game_state, SCM pilot)

c_bot: the bot object

game_state: the game state

pilot: the pilot

Creates an SCM 'bot' object from C data. Passing game_state and pilot enables the garbage collector not the free them until bot is freed.

Return value: the SCM object

— Function: lw6bot_backend_t * lw6_scm_to_bot (SCM bot)

bot: the bot to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'bot' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_bot_smob (lw6_bot_smob_t * bot_smob)

bot_smob: the smob to free

Frees a bot smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_look (lw6gui_look_t * c_look)

c_look: the look object

Creates an SCM 'look' object from C data.

Return value: the SCM object

— Function: lw6gui_look_t * lw6_scm_to_look (SCM look)

look: the look to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'look' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_look_smob (lw6_look_smob_t * look_smob)

look_smob: the smob to free

Frees a look smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_loader (lw6tsk_loader_t * c_loader)

c_loader: the loader object

Creates an SCM 'loader' object from C data.

Return value: the SCM object

— Function: lw6tsk_loader_t * lw6_scm_to_loader (SCM loader)

loader: the loader to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'loader' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_loader_smob (lw6_loader_smob_t * loader_smob)

loader_smob: the smob to free

Frees a loader smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_db (lw6p2p_db_t * c_db)

c_db: the database object

Creates an SCM 'db' object from C data.

Return value: the SCM object

— Function: lw6p2p_db_t * lw6_scm_to_db (SCM db)

db: the db to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'db' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_db_smob (lw6_db_smob_t * db_smob)

db_smob: the smob to free

Frees a db smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: SCM lw6_make_scm_node (lw6p2p_node_t * c_node, SCM db)

c_node: the node object

db: the db (SCM object) referenced

Creates an SCM 'node' object from C data. Passing db enables the garbage collector not to free db until node is freed.

Return value: the SCM object

— Function: lw6p2p_node_t * lw6_scm_to_node (SCM node)

node: the node to convert (SCM object)

Gets the internal C pointer corresponding to the scheme 'node' object.

Return value: a pointer, *not* a copy, must not be freed

— Function: void lw6_free_node_smob (lw6_node_smob_t * node_smob)

node_smob: the smob to free

Frees a node smob, we need a special function to do that as structures like assoc hold pointers to these objects and therefore need a proper callback when being destroyed.

Return value: none

— Function: int lw6_register_smobs ()

Register all smobs to Guile.

Return value: 1 on success, 0 if failed.

— Function: int lw6_test (int mode)

mode: 0 for check only, 1 for full test

Runs the liquidwar6 core module test suite, this will mostly test how Guile script integration works, loading a sample script and running it. It does not launch all the other sub modules tests.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libliquidwar6, Up: C API

5.2 libbot

5.2.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/bot/index.html.

5.2.2 API

— Function: int lw6bot_init (lw6bot_backend_t * backend, lw6bot_seed_t * seed)

backend: backend to use

seed: parameters required to build bot (game state, among other things)

Initializes a bot object. Must be performed before any other call. The seed is absolutely required, for a bot really needs to know what map/context it's working on, including at creation time

Return value: 1 on success, 0 on failure.

— Function: void lw6bot_quit (lw6bot_backend_t * backend)

backend: unitialize a bot backend

Closes a bot, but does not free all ressources.

— Function: int lw6bot_next_move (lw6bot_backend_t * backend, int * x, int * y)

backend: bot to work on

x: next x position (out param)

y: next y position (out param)

Queries the bot for its next move, this is actually the one interesting function in the whole bot API.

Return value: 1 on success, 0 on failure.

— Function: char * lw6bot_repr (lw6bot_backend_t * backend)

backend: bot to represent

Gives a human readable representation of bot

Return value: dynamically allocated string.

— Function: lw6sys_assoc_t * lw6bot_get_backends (int argc, char * [] argv)

argc: argc, as passed to main

argv: argv, as passed to main

List available bot backends. The hash contains pairs with id and name for each backend. The id is the technical key you can use to load the backend, the name is something more readable you can display in an interface. The backend objects themselves are not instanciated by this (in fact, they are, but released on the fly) you need to load and initialize them afterwards.

Return value: hash containing id/name pairs.

— Function: lw6bot_backend_t * lw6bot_create_backend (int argc, char * [] argv, char * name)

argc: argc, as passed to main

argv: argv, as passed to main

name: string containing bot key, typically got from lw6bot_get_backends

Creates a bot backend, this is just about loading the dynamic library if needed, and/or check bot engine is available, and connect to it. It does not perform initialization.

Return value: bot backend.

— Function: void lw6bot_destroy_backend (lw6bot_backend_t * backend)

backend: bot backend to destroy

Frees the ressources associated to a bot, which must have been properly uninitialized before.

Return value: none.

— Function: int lw6bot_test (int mode)

mode: 0 for check only, 1 for full test

Runs the bot module test suite. Will try several engines and query basic moves.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libbot, Up: C API

5.3 mod-brute

5.3.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/bot/mod-brute/index.html.

5.3.2 API

— Function: void mod_brute_is_GPL_compatible ()

Defined to tell mod_brute is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_brute_get_pedigree ()

Returns the pedigree for mod-brute, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6bot_backend_t * mod_brute_create_backend ()

Creates a mod-brute backend.

Return value: backend pointer.


Next: , Previous: mod-brute, Up: C API

5.4 mod-follow

5.4.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/bot/mod-follow/index.html.

5.4.2 API

— Function: void mod_follow_is_GPL_compatible ()

Defined to tell mod_follow is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_follow_get_pedigree ()

Returns the pedigree for mod-follow, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6bot_backend_t * mod_follow_create_backend ()

Creates a mod-follow backend.

Return value: backend pointer.


Next: , Previous: mod-follow, Up: C API

5.5 mod-idiot

5.5.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/bot/mod-idiot/index.html.

5.5.2 API

— Function: void mod_idiot_is_GPL_compatible ()

Defined to tell mod_idiot is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_idiot_get_pedigree ()

Returns the pedigree for mod-idiot, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6bot_backend_t * mod_idiot_create_backend ()

Creates a mod-idiot backend.

Return value: backend pointer.


Next: , Previous: mod-idiot, Up: C API

5.6 mod-random

5.6.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/bot/mod-random/index.html.

5.6.2 API

— Function: void mod_random_is_GPL_compatible ()

Defined to tell mod_random is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_random_get_pedigree ()

Returns the pedigree for mod-random, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6bot_backend_t * mod_random_create_backend ()

Creates a mod-random backend.

Return value: backend pointer.


Next: , Previous: mod-random, Up: C API

5.7 libcfg

5.7.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cfg/index.html.

5.7.2 API

— Function: int lw6cfg_parse_command_line (void * context)

context: opaque pointer on a context

Overwrites any existing option with command line args

Return value: 1 if success, 0 if error

— Function: int lw6cfg_defaults (void * context)

context: opaque pointer on a context

Sets all values to their defaults.

Return value: 1 if success, 0 if error

— Function: int lw6cfg_merge_env (void * cfg_context)

cfg_context: a context returned by lw6cfg_init

Overwrites any existing vale in the config with environment variables prefixed by LW6_.

Return value: 1 if successfull, 0 if error.

— Function: int lw6cfg_load_exp (char * user_dir, int * exp)

user_dir: the user directory

exp: the exp (out param)

Gets exp from file.

Return value: 1 on success, 0 on failure

— Function: int lw6cfg_save_exp (char * user_dir, int exp)

user_dir: the user directory

exp: the exp

Saves exp to file.

Return value: 1 on success, 0 on failure

— Function: char * lw6cfg_format (char * key, char * value, lw6hlp_type_t type)

key: the key of the value to format

value: the value to format

type: the type of the value to format

Formats, converts, a given value to its cannonical representation. Booleans will be converted to true/false, strings containing integers will be stripped from junk, and so on. This is a performance killer but will ensure everything is correct.

Return value: a newly allocated string, containing the same as the input, but reformatted the pedantic way.

— Function: char * lw6cfg_format_guess_type (char * key, char * value)

key: the key of the value to format

value: the value to format

Formats, converts, a given value to its cannonical representation. Booleans will be converted to true/false, strings containing integers will be stripped from junk, and so on. This is a performance killer but will ensure everything is correct. This function will automatically guess the type of the value from its description in the help system.

Return value: a newly allocated string, containing the same as the input, but reformatted the pedantic way.

— Function: int lw6cfg_load (void * cfg_context, char * filename)

cfg_context: a context returned by lw6cfg_init

filename: a file path, absolute or relative

Loads the given config file, and stores its values into the current context. Parameters which are both in the config file and given as command line parameters, will be taken from the command-line.

Return value: 1 if successfull, 0 if error.

— Function: int lw6cfg_option_exists (void * context, char * key)

context: context to query

key: key to search

Returns wether a key exists within context or not.

Return value: 1 if exists, 0 if not

— Function: char * lw6cfg_get_option (void * context, char * key)

context: context to query

key: key to search

Returns the current value for a given query, the returned value is always a string, typically the string one would pass on the command line or set in a config file

Return value: pointer to string, must not be freed.

— Function: void lw6cfg_set_option (void * context, char * key, char * value)

context: context to modify

key: key to search and change

value: new value

Sets a given key to the specified value, this is a string only function, pass the value you would pass on the command line or set in a config file.

Return value: none

— Function: int lw6cfg_get_option_int (void * context, char * key)

context: context to query

key: key to search

Returns an option as an integer. Note that this function does not know wether the parameter should really be an integer or not, so you can call it even on non-integer values, but of course results will have no real meaning.

Return value: option value converted to int

— Function: void lw6cfg_set_option_int (void * context, char * key, int value)

context: context to modify

key: key to search and change

value: new value

Set a config option to an integer value. Note that this function does not know wether the parameter should really be an integer or not, so you can call it even on non-integer values, at your own risk.

Return value: none.

— Function: int lw6cfg_get_option_bool (void * context, char * key)

context: context to query

key: key to search

Returns an option as a boolean. Note that this function does not know wether the parameter should really be a boolean or not, so you can call it even on non-boolean values, but of course results will have no real meaning.

Return value: option value converted to boolean

— Function: void lw6cfg_set_option_bool (void * context, char * key, int value)

context: context to modify

key: key to search and change

value: new value

Set a config option to a boolean value. Note that this function does not know wether the parameter should really be a boolean or not, so you can call it even on non-boolean values, at your own risk.

Return value: none.

— Function: int lw6cfg_must_be_saved (char * key)

key: key to test

Tells wether a key should be saved in the config file. Typically, some options you don't want to savem such as the location of the config file itself. Most of those non-savable parameters are path-related. This does not mean no paths are saved in the config file.

Return value: 1 if must be saved, 0 if not

— Function: int lw6cfg_save (void * cfg_context, char * filename)

cfg_context: a context returned by lw6cfg_init

filename: a file path, absolute or relative

Save current options into the given config file. Before saving the file, all command line arguments will be read and will override current values. This means the saved file will contain values given as command line arguments.

Return value: 1 if successfull, 0 if error.

— Function: void * lw6cfg_init (int argc, char * [] argv)

argc: number of command line arguments, as given to main

argv: a list of command line arguments, as given to main

Initializes a config context object. This object is hidden behind an opaque void * pointer to avoid direct access to its elements.

Return value: an opaque pointer, must be freed with lw6cfg_quit.

— Function: void lw6cfg_quit (void * cfg_context)

cfg_context: a context returned by lw6cfg_init

Frees a config cfg_context object. You must call this once you're done with the context.

Return value: none.

— Function: void lw6cfg_reset (int argc, char * [] argv)

argc: number of command line arguments, as given to main

argv: a list of command line arguments, as given to main

Overwrites the config file with defaults. Use this to get rid of old configurations.

— Function: int lw6cfg_test (int mode)

mode: 0 for check only, 1 for full test

Runs the cfg module test suite.

Return value: 1 if test is successfull, 0 on error.

— Function: char * lw6cfg_unified_get_value (int argc, char * [] argv, char * key)

argc: number of command-line args, as passed to main

argv: arry of command-line args, as passed to main

key: the key to query

Unified "value" getter, which gets informations from environment variables, command line, and config file. The rules is that the command-line argument always has the last word. It will override any other value. Follows environment variables, which will be used if no command-line argument is supplied. Note that these are "LW6_" prefixed and uppercased environment variables as opposed to lowercased and "dash-separated" keys. Finally, if there's no environment variable, nor any config-file corresponding entry, the value will be searched in the config file. If there's no information in the config file, NULL is returned.

Return value: a string with the value. Can be NULL. Must be freed.

— Function: char * lw6cfg_unified_get_user_dir (int argc, char * [] argv)

argc: number of command-line args, as passed to main

argv: arry of command-line args, as passed to main

Gets the user dir, taking all parameters in account, that's to say the "LW6_USER_DIR" env value, the "–user-dir" command-line paramater and the LW6DEF_USER_DIR config file entry.

Return value: the directory path, might be NULL, must be freed.

— Function: char * lw6cfg_unified_get_log_file (int argc, char * [] argv)

argc: number of command-line args, as passed to main

argv: arry of command-line args, as passed to main

Gets the log file, taking all parameters in account, that's to say the "LW6_LOG_FILE" env value, the "–log-file" command-line paramater and the LW6DEF_LOG_FILE config file entry.

Return value: the directory path, might be NULL, must be freed.

— Function: char * lw6cfg_unified_get_music_path (int argc, char * [] argv)

argc: number of command-line args, as passed to main

argv: arry of command-line args, as passed to main

Gets the user dir, taking all parameters in account, that's to say the "LW6_MUSIC_PATH" env value, the "–music-path" command-line paramater and the LW6DEF_MUSIC_PATH config file entry.

Return value: the directory path, might be NULL, must be freed.

— Function: char * lw6cfg_unified_get_map_path (int argc, char * [] argv)

argc: number of command-line args, as passed to main

argv: arry of command-line args, as passed to main

Gets the user dir, taking all parameters in account, that's to say the "LW6_MAP_PATH" env value, the "–map-path" command-line paramater and the LW6DEF_MAP_PATH config file entry.

Return value: the directory path, might be NULL, must be freed.

— Function: char * lw6cfg_xml_element (lw6hlp_type_t type)

type: type as an enum

Returns the string corresponding to a given type, suitable for use in XML files. For instance if you pass LW6HLP_TYPE_INT then you will obtain the string int (string of 3 chars containing i, n and t.

Return value: string, must not be freed.

— Function: void lw6cfg_read_xml_int (char * xml_key, char * xml_value, char * target_key, int * value)

xml_key: key found in XML file

xml_value: value found in XML file

target_key: key we're searching for

value: the value if found (out param)

Tries to find a value in a key/value pair. If xml_key and target_key match, then will put the corresponding value (converted to int) in the value param. Typically, you would call this in a loop on every single entry found in an XML file, in an expat callback.

Return value: none.

— Function: void lw6cfg_read_xml_bool (char * xml_key, char * xml_value, char * target_key, int * value)

xml_key: key found in XML file

xml_value: value found in XML file

target_key: key we're searching for

value: the value if found (out param)

Tries to find a value in a key/value pair. If xml_key and target_key match, then will put the corresponding value (converted to boolean) in the value param. Typically, you would call this in a loop on every single entry found in an XML file, in an expat callback.

Return value: none.

— Function: void lw6cfg_read_xml_float (char * xml_key, char * xml_value, char * target_key, float * value)

xml_key: key found in XML file

xml_value: value found in XML file

target_key: key we're searching for

value: the value if found (out param)

Tries to find a value in a key/value pair. If xml_key and target_key match, then will put the corresponding value (converted to float) in the value param. Typically, you would call this in a loop on every single entry found in an XML file, in an expat callback.

Return value: none.

— Function: void lw6cfg_read_xml_string (char * xml_key, char * xml_value, char * target_key, char ** value)

xml_key: key found in XML file

xml_value: value found in XML file

target_key: key we're searching for

value: the value if found (out param)

Tries to find a value in a key/value pair. If xml_key and target_key match, then will put the corresponding value (as a string) in the value param. Typically, you would call this in a loop on every single entry found in an XML file, in an expat callback.

Return value: none.

— Function: void lw6cfg_read_xml_color (char * xml_key, char * xml_value, char * target_key, lw6sys_color_8_t * value)

xml_key: key found in XML file

xml_value: value found in XML file

target_key: key we're searching for

value: the value if found (out param)

Tries to find a value in a key/value pair. If xml_key and target_key match, then will put the corresponding value (converted to a color) in the value param. Typically, you would call this in a loop on every single entry found in an XML file, in an expat callback.

Return value: none.

— Function: int lw6cfg_read_key_value_xml_file (char * filename, lw6cfg_read_xml_callback_func_t callback_func, void * callback_data)

filename: full path of file to read

callback_func: callback function to be called on each element

callback_data: additionnal pointer passed to callback function

Will parse a file and call the given callback on each element. This is an over-simplified way to read XML file, in fact we just explain plain non-nested simple elements but this is exactly what LW config files are made of.

Return value: 1 on success, 0 on failure.

— Function: void lw6cfg_write_xml_int (FILE * f, char * key, int value)

f: file to write data to (append mode)

key: key to write

value: value to write

Writes an int entry into an opened XML file.

Return value: none.

— Function: void lw6cfg_write_xml_bool (FILE * f, char * key, int value)

f: file to write data to (append mode)

key: key to write

value: value to write

Writes a boolean entry into an opened XML file.

Return value: none.

— Function: void lw6cfg_write_xml_float (FILE * f, char * key, float value)

f: file to write data to (append mode)

key: key to write

value: value to write

Writes a float entry into an opened XML file.

Return value: none.

— Function: void lw6cfg_write_xml_string (FILE * f, char * key, char * value)

f: file to write data to (append mode)

key: key to write

value: value to write

Writes a string entry into an opened XML file.

Return value: none.

— Function: void lw6cfg_write_xml_color (FILE * f, char * key, lw6sys_color_8_t value)

f: file to write data to (append mode)

key: key to write

value: value to write

Writes a color entry into an opened XML file.

Return value: none.

— Function: void lw6cfg_write_xml_guess_type (FILE * f, char * key, char * value)

f: file to write data to (append mode)

key: key to write

value: value to write

Writes an entry into an opened XML file, will try and guess type from the internal help system, typically, if this is a standard config file entry (the one documented by the about command line function) it will pick up the right type. The reason not to use this all the times is that sometimes, one might to to store non-standard options, and additionnally, guessing the type does consume some CPU.

Return value: none.


Next: , Previous: libcfg, Up: C API

5.8 libcli

5.8.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cli/index.html.

5.8.2 API

— Function: int lw6cli_init (lw6cli_backend_t * backend)

backend: backend to use

Initializes a client backend. Must be performed before any other call.

Return value: 1 on success, 0 on failure

— Function: void lw6cli_quit (lw6cli_backend_t * backend)

backend: unitialize a cli backend

Closes a cli, but does not free all ressources.

— Function: int lw6cli_process_oob (lw6cli_backend_t * backend, lw6nod_info_t * node_info, lw6cli_oob_data_t * oob_data)

backend: backend to use

node_info: information on the current node

oob_data: data of the out-of-band request

Processes the required out-of-band tasks, this typically, for a client, includes broadcasting. Depending on parameters passed in oob_data, might actually do a broadcast or simply call a given host and see what's the answer. A typicall exchange is PING then INFO and finally LIST. It's the responsability of the client to take the OOB initiative and contact the server.

Return value: 1 on success, 0 on failure.

— Function: lw6cnx_connection_t * lw6cli_open (lw6cli_backend_t * backend, char * local_url, char * remote_url, char * remote_ip, int remote_port, char * password, u_int64_t local_id, u_int64_t remote_id, int dns_ok, int network_reliability, lw6cnx_recv_callback_t recv_callback_func, void * recv_callback_data)

backend: backend to use

local_url: our local public url

remote_url: the remote url we want to connect to

remote_ip: remote IP address

remote_port: remote IP port

password: password to use (if needed)

local_id: our local id

remote_id: the remote id

dns_ok: wether the remote announced URL matches DNS information

network_reliability: network reliability (the highest, the better)

recv_callback_func: callback func to be called when data is received

recv_callback_data: pointer on additionnal data to pass to callback func

Opens a connection with a remote host. Be carefull with the implementation of recv_callback_func, it should be at least reentrant, and when it accesses shared data, use locks.

Return value: new object.

— Function: void lw6cli_close (lw6cli_backend_t * backend, lw6cnx_connection_t * connection)

backend: backend to use

connection: connection to use

Closes a connection, this will free the connection object.

Return value: none.

— Function: int lw6cli_send (lw6cli_backend_t * backend, lw6cnx_connection_t * connection, u_int32_t physical_ticket_sig, u_int32_t logical_ticket_sig, u_int64_t logical_from_id, u_int64_t logical_to_id, char * message)

backend: backend to use

connection: connection to use

physical_ticket_sig: signature of physical sender

logical_ticket_sig: signature of logical sender

logical_from_id: id of logical sender

logical_to_id: id of logicial target

message: text of message to send

Sends a message to a peer over a given connection.

Return value: 1 on success, 0 on failure.

— Function: void lw6cli_poll (lw6cli_backend_t * backend, lw6cnx_connection_t * connection)

backend: backend to use

connection: connection to use

Performs required duty on connection, depending on the backend, this can include sending messages and/or receiving them. Must be called on a regular basis.

Return value: none.

— Function: char * lw6cli_repr (lw6cli_backend_t * backend, lw6cnx_connection_t * connection)

backend: backend to use

connection: connection to represent

Gives a human readable representation of the connection.

Return value: dynamically allocated string.

— Function: lw6cli_oob_t * lw6cli_oob_new (char * public_url, lw6cli_verify_callback_func_t verify_callback_func, void * verify_callback_data)

public_url: the address of the distant server to test

verify_callback_func: a function which will be called when a node has been verified

verify_callback_data: additionnal data passed to the callback func

Create a new OOB structure, copying required objects. We need to make copies for this is for usage in a separate thread. The thread member is not set here since the right way to do things is first to set up data then to fire the thread.

Return value: new object

— Function: void lw6cli_oob_free (lw6cli_oob_t * oob)

oob: the object to free

Frees an OOB structure.

Return value: none

— Function: char * lw6cli_default_backends ()

Returns the list of the default cli backends.

Return value: comma separated string, must not be freed.

— Function: lw6sys_assoc_t * lw6cli_get_backends (int argc, char * [] argv)

argc: argc, as passed to main

argv: argv, as passed to main

List available cli backends. The hash contains pairs with id and name for each backend. The id is the technical key you can use to load the backend, the name is something more readable you can display in an interface. The backend objects themselves are not instanciated by this (in fact, they are, but released on the fly) you need to load and initialize them afterwards.

Return value: hash containing id/name pairs.

— Function: lw6cli_backend_t * lw6cli_create_backend (int argc, char * [] argv, char * name)

argc: argc, as passed to main

argv: argv, as passed to main

name: string containing cli key, typically got from lw6cli_get_backends

Creates a cli backend, this is just about loading the dynamic library if needed, and/or check cli engine is available, and connect to it. It does not perform initialization.

Return value: cli backend.

— Function: void lw6cli_destroy_backend (lw6cli_backend_t * backend)

backend: backend to destroy

Destroys a cli backend.

Return value: none.

— Function: int lw6cli_test (int mode)

mode: 0 for check only, 1 for full test

Runs the cli module test suite.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libcli, Up: C API

5.9 mod-http

5.9.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cli/mod-http/index.html.

5.9.2 API

— Function: void mod_http_is_GPL_compatible ()

Defined to tell mod_http is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_http_get_pedigree ()

Returns the pedigree for mod-http, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6cli_backend_t * mod_http_create_backend ()

Creates a mod-http backend.

Return value: backend pointer.


Next: , Previous: mod-http, Up: C API

5.10 mod-tcp

5.10.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cli/mod-tcp/index.html.

5.10.2 API

— Function: void mod_tcp_is_GPL_compatible ()

Defined to tell mod_tcp is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_tcp_get_pedigree ()

Returns the pedigree for mod-tcp, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6cli_backend_t * mod_tcp_create_backend ()

Creates a mod-tcp backend.

Return value: backend pointer.


Next: , Previous: mod-tcp, Up: C API

5.11 mod-udp

5.11.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cli/mod-udp/index.html.

5.11.2 API

— Function: void mod_udp_is_GPL_compatible ()

Defined to tell mod_udp is compatible with GNU General Public License. Of course it is. This function does nothing, but the fact it's declared makes its GPL compatibility obvious. Having this declared is required.

Return value: none

— Function: lw6sys_module_pedigree_t * mod_udp_get_pedigree ()

Returns the pedigree for mod-udp, giving details about the module, including name, description, licence, date/time of compilation.

Return value: dynamically allocated object.

— Function: lw6cli_backend_t * mod_udp_create_backend ()

Creates a mod-udp backend.

Return value: backend pointer.


Next: , Previous: mod-udp, Up: C API

5.12 libcns

5.12.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cns/index.html.

5.12.2 API

— Function: void lw6cns_handler_install (lw6cns_callback_func_t callback)

callback: handler function.

Installs a console handler.

Return value: none.

— Function: void lw6cns_handler_poll ()

Polling function for console, must be called on a regular basis.

Return value: none.

— Function: void lw6cns_handler_remove ()

Remove console handler.

Return value: none.

— Function: void lw6cns_history_add_if_needed (char * line)

line: line to add

Adds a line to the console history, won't add it if it's NULL or empty.

Return value: none.

— Function: int lw6cns_support ()

Tells wether console is supported.

Return value: 1 if console can be enabled, 0 if not

— Function: int lw6cns_test (int mode)

mode: 0 for check only, 1 for full test

Runs the cns module test suite.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libcns, Up: C API

5.13 libcnx

5.13.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/cnx/index.html.

5.13.2 API

— Function: lw6cnx_connection_t * lw6cnx_connection_new (char * local_url, char * remote_url, char * remote_ip, int remote_port, char * password, u_int64_t local_id, u_int64_t remote_id, int dns_ok, int network_reliability, lw6cnx_recv_callback_t recv_callback_func, void * recv_callback_data)

local_url: the local public URL

remote_url: the remote public URL

remote_ip: the remote IP address

remote_port: the remote port

password: the password to use

local_id: the local ID

remote_id: the remote ID

dns_ok: 1 if no DNS mismatch, 0 if IP does not match public URL

network_reliability: drop 1 out of X packets

recv_callback_func: a callback to call when data is received

recv_callback_data: additionnal data to pass to the callback

Create a connection object. This object in itself does nothing, it's just to share common structures among modules, more precisely, between cli and srv code. It's the responsability off the caller/backend to handle the backend_specific_data field which is NULL after this call.

Return value: newly allocated object.

— Function: void lw6cnx_connection_free (lw6cnx_connection_t * connection)

connection: object to free

Frees a connection object. It's the responsibility of the caller/backend to handle the backend_specific_data field.

Return value: none.

— Function: int lw6cnx_connection_should_send_foo (lw6cnx_connection_t * connection, int64_t now)

connection: the connection concerned

now: the current timestamp

Tells wether a new foo message must be issued.

Return value: 1 if true, 0 if false.

— Function: void lw6cnx_connection_init_foo_bar_key (lw6cnx_connection_t * connection, int64_t now, int next_foo_delay)

connection: the connection concerned

now: the current timestamp

next_foo_delay: the delay (msec) before next foo message is sent

Generates a new foo_bar_key, and schedules the next foo message send timestamp.

Return value: none.

— Function: int lw6cnx_connection_lock_send (lw6cnx_connection_t * connection)

connection: the connexion to lock

Acquires a "send" lock on the connexion, the idea is to avoid too threads sending data using the same socket at the same time. Note that each backend must call this when accessing the socket, there's no top-level lock for the sake of performance.

Return value: 1 on success, 0 if not.

— Function: void lw6cnx_connection_unlock_send (lw6cnx_connection_t * connection)

connection: the connexion to lock

Releases a "send" lock on the connexion, the idea is to avoid too threads sending data using the same socket at the same time. Note that each backend must call this when accessing the socket, there's no top-level lock for the sake of performance.

Return value: none.

— Function: int lw6cnx_connection_reliability_filter (lw6cnx_connection_t * connection)

connection: the connexion concerned

Will filter and return true only in "rare" cases when packets must be artificially dropped for testing purpose.

Return value: 1 if message must be sent/received, 0 if not

— Function: char * lw6cnx_password_checksum (char * seed, char * password)

seed: a seed to blur the password, can be NULL

password: the password, can be NULL

Calculates the checksum of a password, and returns it as a string, ready to be sent on the network. If password is empty or NULL, then an empty (but not NULL unless internal error) string will be returned. All LW6 protocols should send these checksums instead of real passwords, then on server side value can be checked against both real password and its checksum. The seed is here so that eavesdropper can't reuse the checksum to connect on random sessions. Seed can typically be the node 'public_url' value.

Return value: a dynamically allocated string

— Function: int lw6cnx_password_verify (char * seed, char * password_here, char * password_received)

seed: a seed to blur the password, can be NULL

password_here: the local password, can be NULL

password_received: the password received from network, can be NULL

Tells wether a password received over the network is valid. The password_here argument (the local password) will be checksumed so that password_received is checked against both clear and checksumed values, so it can be in any form.

Return value: 1 if OK, passwords are the same, 0 if not.

— Function: int lw6cnx_test (int mode)

mode: 0 for check only, 1 for full test

Runs the cnx module test suite.

Return value: 1 if test is successfull, 0 on error.

— Function: void lw6cnx_ticket_table_zero (lw6cnx_ticket_table_t * ticket_table)

ticket_table: the ticket table to fill with zero

Fills the ticket table struct with 0s.

Return value: none.

— Function: int lw6cnx_ticket_table_init (lw6cnx_ticket_table_t * ticket_table, int hash_size)

ticket_table: the ticket table to init

hash_size: the hash size for both recv/send hashs

Initialize a ticket table, that is, set it up with two empty hashs. Recv hash is filled automatically as it's queried for tickets, send hash must be filled explicitely with info from the network.

Return value: none.

— Function: void lw6cnx_ticket_table_clear (lw6cnx_ticket_table_t * ticket_table)

ticket_table: the ticket table to clear

Clears the object (frees memory).

Return value: none.

— Function: u_int64_t lw6cnx_ticket_table_get_recv (lw6cnx_ticket_table_t * ticket_table, char * peer_id)

ticket_table: the ticket table to query

peer_id: the id of remote node

Gets the ticket used to communicate with peer, to check its incoming (recv) messages. If ticket does not exist yet, it's automatically generated so tunction will always return a non-zero value.

Return value: the ticket used to check incoming messages.

— Function: void lw6cnx_ticket_table_ack_recv (lw6cnx_ticket_table_t * ticket_table, char * peer_id)

ticket_table: the ticket table to query

peer_id: the id of remote node

Acknowledges the ticket used to communicate with peer, to check its incoming (recv) messages has been received. This is to avoid sending it again when it has been received, as it's kept "forever" by peer, we never need to send it again.

Return value: none.

— Function: int lw6cnx_ticket_table_was_recv_exchanged (lw6cnx_ticket_table_t * ticket_table, char * peer_id)

ticket_table: the ticket table to query

peer_id: the id of remote node

Acknowledges the ticket used to communicate with peer, to check its incoming (recv) messages has been received. This is to avoid sending it again when it has been received, as it's kept "forever" by peer, we never need to send it again.

Return value: the ticket used to check incoming messages.

— Function: u_int64_t lw6cnx_ticket_table_get_send (lw6cnx_ticket_table_t * ticket_table, char * peer_id)

ticket_table: the ticket table to query

peer_id: the id of remote node

Gets the ticket used to communicate with peer, to stamp the outgoing messages. If ticket does not exist yet, 0 is returned, indeed this value must be initialized with the value the peer gives us.

Return value: the ticket used to stamp outgoing messages.

— Function: void lw6cnx_ticket_table_set_send (lw6cnx_ticket_table_t * ticket_table, char * peer_id, u_int64_t send_ticket)

ticket_table: the ticket table to query

peer_id: the id of remote node

send_ticket: the ticket to use to stamp outgoing messages

Sets the ticket used to communicate with peer, to stamp the outgoing (send) messages. This value should be received from the network. Note that once it's set, it's impossible to change it, it will remain the same for the whole duration of the node existence.

Return value: NULL


Next: , Previous: libcnx, Up: C API

5.14 libdat

5.14.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/dat/index.html.

5.14.2 API

— Function: int lw6dat_test (int mode)

mode: 0 for check only, 1 for full test

Runs the dat module test suite.

Return value: 1 if test is successfull, 0 on error.

— Function: lw6dat_warehouse_t * lw6dat_warehouse_new (u_int64_t local_node_id)

Creates a new warehouse object.

Return value: new object, allocated dynamically

— Function: void lw6dat_warehouse_free (lw6dat_warehouse_t * warehouse)

warehouse: the object to free

Frees a warehouse object.

Return value: new object, allocated dynamically

— Function: void lw6dat_warehouse_purge (lw6dat_warehouse_t * warehouse)

warehouse: the object to purge

Purges a warehouse object.

Return value: new object, allocated dynamically

— Function: int lw6dat_warehouse_get_nb_nodes (lw6dat_warehouse_t * warehouse)

warehouse: the warehouse object to query.

Tells how many nodes are registered in the object.

Return value: integer, number of nodes

— Function: u_int64_t lw6dat_warehouse_get_local_id (lw6dat_warehouse_t * warehouse)

warehouse: the warehouse object to query.

Returns the local id.

Return value: 64-bit id.

— Function: int lw6dat_warehouse_get_local_serial (lw6dat_warehouse_t * warehouse)

warehouse: the warehouse object to query.

Returns the latest (highest) serial number given for local node.

Return value: integer, latest serial number

— Function: int lw6dat_warehouse_put_atom_str (lw6dat_warehouse_t * warehouse, u_int64_t logical_from, char * full_str)

warehouse: warehouse object to use

logical_from: from who the message came from originally

full_str: message of the form serial i n seq from cmd

Puts an atomic string in the object, this kind of string is typically received on the network.

Return value: 1 on success, 0 on error

— Function: int lw6dat_warehouse_calc_serial_draft_and_reference (lw6dat_warehouse_t * warehouse)

warehouse: object to work on

The various get_seq functions can perform slowly if we don't pre-calculate the serial number of draft and reference atoms. So this calculation is not within the functions themselves but can be cached by using this function. Just call it and after you might query the object for reference and draft info.

Return value: 1 on success, 0 on failure.

— Function: int lw6dat_warehouse_put_local_msg (lw6dat_warehouse_t * warehouse, char * msg)

warehouse: warehouse object to use

msg: message

Puts a message in the object. The message will be splitted into several atoms if needed, it can be arbitrary long.

Return value: 1 on success, 0 on error

— Function: int lw6dat_warehouse_get_seq_min (lw6dat_warehouse_t * warehouse)

warehouse: object to query

Tells the lowest seq referenced in the warehouse. Does not mean this is the lowest ever received, only we really have no chances of going below that point, nothing is stored, either complete or partial, below that.

Return value: integer.

— Function: int lw6dat_warehouse_get_seq_max (lw6dat_warehouse_t * warehouse)

warehouse: object to query

Tells the highest seq referenced in the warehouse. Does not mean an actual message can be built from it, only we've got some traces of such a high seq.

Return value: integer.

— Function: int lw6dat_warehouse_get_seq_draft (lw6dat_warehouse_t * warehouse)

warehouse: object to query

Tells the highest seq that can be considered as a valid draft. This is not exactly the maximimum seq encountered, for here we want at least one complete message and not just one chunk of data (an atom) referring to a high seq, we want the complete stuff. However there can be missing messages in between.

Return value: integer.

— Function: int lw6dat_warehouse_get_seq_reference (lw6dat_warehouse_t * warehouse)

warehouse: object to query

Tells the highest seq that can be considered as a reference. Being considered as a reference means we received all messages for this seq *and* at least one message from the following seq, and this for every node involved. This being said, we're sure to have the right information, nothing is missing.

Return value: integer.

— Function: lw6sys_list_t * lw6dat_warehouse_get_msg_list_by_seq (lw6dat_warehouse_t * warehouse, int seq_min, int seq_max)

warehouse: object to query

seq_min: lowest sequence number (round or chat index)

seq_max: highest sequence number (round or chat index)

Gets the list of messages for a given sequence (round or chat index), polling all the nodes. The from and to boundaries are included.

Return value: a list of strings.

— Function: lw6sys_list_t * lw6dat_warehouse_get_atom_str_list_not_sent (lw6dat_warehouse_t * warehouse, u_int64_t logical_to)

warehouse: object to query

logical_to: the id of the node that we want to send data to

Returns all the messages that were not sent for the given warehouse.

Return value: a list of strings, containing atoms.


Next: , Previous: libdat, Up: C API

5.15 libdef

5.15.1 Overview

5.15.2 API

There are no functions in libdef, only a header file with constants.


Next: , Previous: libdef, Up: C API

5.16 libdsp

5.16.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/dsp/index.html.

5.16.2 API

— Function: lw6dsp_backend_t * lw6dsp_create_backend (int argc, char * [] argv, char * gfx_backend_name)

argc: argc as passed to main

argv: argv as passed to main

gfx_backend_name: the id/name of the gfx backend to use

Creates a dsp_backend object. The created object won't be displaying things until lw6dsp_init is called. No thread is created, but the graphics backend is loaded into memory. If video mode is not available, it will appear later, when trying to start displaying things, this function only allocates memory and checks code is available in case of a dynamically loaded gfx backend.

Return value: a newly allocated object.

— Function: void lw6dsp_destroy_backend (lw6dsp_backend_t * dsp_backend)

dsp_backend: the dsp_backend object to free

Frees all ressources used by a dsp_backend object. Note that you must call this on a inactive 'stopped' dsp_backend object.

Return value: none.

— Function: char * lw6dsp_repr (lw6dsp_backend_t * dsp_backend)

dsp_backend: the object to represent

Gives a short human-readable description of the object.

Return value: a newly allocated string, must be freed.

— Function: int lw6dsp_init (lw6dsp_backend_t * dsp_backend, lw6dsp_param_t * param, lw6gui_resize_callback_func_t resize_callback)

dsp_backend: the dsp_backend to start

param: parameters to pass to the display funcs

resize_callback: a function which will be called when there's a resize event

Starts a dsp_backend object, that is, fire a separate thread and start rendering. This will set up a video mode, so it's very likely to fail if for some reason the video context isn't right, for instance if you try to set up graphical stuff but only have console access.

Return value: 1 if success, 0 if error.

— Function: void lw6dsp_quit (lw6dsp_backend_t * dsp_backend)

dsp_backend: the dsp_backend to stop

Stops a dsp_backend, that is, cancel rendering and unset the video mode, hardware shouldn't be used any more after this call.

Return value: none.

— Function: int lw6dsp_update (lw6dsp_backend_t * dsp_backend, lw6dsp_param_t * param)

dsp_backend: the dsp_backend to update

param: parameters to pass to the dsp_backend funcs

Passes a new set of parameters to the display function. This is in fact the only way to pass informations to the dsp_backend object once it's been started. This function will acquire a mutex, copy parameters, then give control back to the main thread while display keeps on going with new parameters in the background. It will get input informations. You really must call it often otherwise the screen won't get updated, or, at least, it will always display the same informations. It should be reasonnable to call this 10 or 20 times per second, the display itself can be faster, run at 60 or 100 fps to show smooth animation (eye candy).

Return value: 1 if success, 0 if error.

— Function: int lw6dsp_get_nb_frames (lw6dsp_backend_t * dsp_backend)

dsp_backend: the dsp_backend to query

Returns the number of frames displayed since the display was started.

Return value: the number of frames displayed.

— Function: int lw6dsp_get_last_frame_rendering_time (lw6dsp_backend_t * dsp_backend)

dsp_backend: the dsp_backend to query

Returns the rendering time of the last frame. Gives clues about performance.

Return value: the number of milliseconds it took to draw screen

— Function: int lw6dsp_get_instant_fps (lw6dsp_backend_t * dsp_backend)

dsp_backend: the dsp_backend to query

Returns the current frames per sec display rate. This is the instant value, it changes very often even if display seems smooth.

Return value: the current instant display rate.

— Function: int lw6dsp_get_average_fps (lw6dsp_backend_t * dsp_backend)

dsp_backend: the dsp_backend to query

Returns the current frames per sec display rate. This is not absolutely accurate but fits for displaying info to the player, it's an average.

Return value: the current averaged display rate.

— Function: int lw6dsp_get_video_mode (lw6dsp_backend_t * dsp_backend, lw6gui_video_mode_t * video_mode)

dsp_backend: the dsp_backend to query

video_mode: a structure which will contain the results

Returns the current video mode, the one obtained by the driver. This function is also a way to know wether display is running correcly or not, by testing its return value.

Return value: 1 if ok, 0 if failure (mode not set)

— Function: int lw6dsp_get_fullscreen_modes (lw6dsp_backend_t * dsp_backend, lw6gui_fullscreen_modes_t * fullscreen_modes)

dsp_backend: the dsp_backend to query

fullscreen_modes: a structure which will contain the results

Returns the current available fullscreen modes. Note that this one will only work if display is started, unlike lw6gfx_get_fullscreen_modes which is used internally. The reason is that in this dsp module context, we need the thread to be launched, and the thread does start/stop display on its own.

Return value: 1 if ok, 0 if failure (mode not set)

— Function: void lw6dsp_param_zero (lw6dsp_param_t * param)

param: the structure to initialize

Fills a display param struct with zeros, this is mandatory before any use. Think of it as a raw memset.

Return value: none.

— Function: int lw6dsp_test (int mode)

mode: 0 for check only, 1 for full test

Runs the test suite for the dsp module. In check (0) mode, won't test much to avoid failure because of missing graphical environment.

Return value: 1 if OK, 0 if error.


Next: , Previous: libdsp, Up: C API

5.17 libdyn

5.17.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/dyn/index.html.

5.17.2 API

— Function: lw6dyn_dl_handle_t * lw6dyn_dlopen_backend_so (char * so_file)

Opens a .so file directly, using a valid (full) path name.

Return value: a handle to the module, once it's opened. You might still need to call a module specific init() function, but it's another story.

— Function: lw6dyn_dl_handle_t * lw6dyn_dlopen_backend (int argc, char * [] argv, char * top_level_lib, char * backend_name)

argc: the number of command-line arguments as passed to main

top_level_lib: the top-level library concerned, this means is it "cli", "gfx", "snd" or "srv". This will tell the function to search for the .so file in the correct subdirectory. Think of this as a category.

Opens a .so file corresponding to the given backend, it is capable to search for system libraries installed after "make install" but if not found, it will also search in the current build directory, finding the .so files in hidden .libs subdirectories.

Return value: a handle to the module, once it's opened. You might still need to call a module specific init() function, but it's another story.

— Function: int lw6dyn_dlclose_backend (lw6dyn_dl_handle_t * handle)

handle: the backend to close.

Closes an opened backend. Note that you must call any backend specific clear, destroy, deinit, exit, function before.

Return value: 1 if success, 0 on error.

— Function: void * lw6dyn_dlsym (lw6dyn_dl_handle_t * handle, char * func_name)

handle: the backend concerned

func_name: the function name, as a NULL terminated string

Finds a C function in the given backend.

Return value: a pointer to the function, NULL if not found.

— Function: lw6sys_assoc_t * lw6dyn_list_backends (int argc, char * [] argv, char * top_level_lib)

argc: the number of command line args, as passed to main

argv: the commind line args, as passed to main

top_level_lib: the library category to query (gfx, snd, cli, srv ...)

Returns an assoc which lists all the available modules. The key of the assoc entries in the module internal name such as 'gl' and the value associated is a NULL terminated string describing the module, for instance 'OpenGL'.

Return value: an assoc object containing key/label pairs.

— Function: char * lw6dyn_path_find_backend (int argc, char * [] argv, char * top_level_lib, char * backend_name)

argc: the number of command-line arguments as passed to main

top_level_lib: the top-level library concerned, this means is it "cli", "gfx", "snd" or "srv". This will tell the function to search for the .so file in the correct subdirectory. Think of this as a category.

backend_name: the actual name of the backend, this is the name of the .so file, between "libmod_" and ".so". For instance, to find "libmod_gl.so", the right argument is "gl".

Get the full path to a .so file corresponding to the given backend, it is capable to search for system libraries installed after "make install" but if not found, it will also search in the current build directory, finding the .so files in hidden .libs subdirectories.

Return value: the full path of the .so file, needs to be freed.

— Function: int lw6dyn_test (int mode)

mode: 0 for check only, 1 for full test

Runs the dyn module test suite, testing most (if not all...) functions. Will try to load libraries and query them for standard LW6-expected functions.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libdyn, Up: C API

5.18 libgfx

5.18.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/gfx/index.html.

5.18.2 API

— Function: int lw6gfx_init (lw6gfx_backend_t * backend, lw6gui_video_mode_t * video_mode, lw6gui_resize_callback_func_t resize_callback)

backend: the graphical backend to use

video_mode: the video mode to use at start up

resize_callback: a callback function which will be called at each resize event

Sets up the graphical backend for good, initializing a video mode and allocating ressources. This call can typically fail if there's no device available, if the user doesn't have enough rights to access the hardware, and so on.

Return value: 1 on success, 0 if not

— Function: void lw6gfx_quit (lw6gfx_backend_t * backend)

backend: the backend to quit

Uninitializes the backend, that is, exits the graphical mode. All threads that use graphics must be closed when this is called.

Return value: none.

— Function: char * lw6gfx_repr (lw6gfx_backend_t * backend)

backend: the backend to represent

Returns a readable version of the backend object.

Return value: a newly allocated pointer.

— Function: int lw6gfx_set_video_mode (lw6gfx_backend_t * backend, lw6gui_video_mode_t * video_mode)

backend: the backend to use

video_mode: the new video mode

This function changes the video mode. Note that the first time you set up the graphical environment you must call lw6gfx_init but to change the current mode, use this function. It should reload backend data automatically if needed (textures for instance). Note that before giving up and failing this function will try alternate video modes, and you're not garanteed to have the right mode after the call, even if it returns true. To check this, use lw6gfx_get_video_mode.

Return value: 1 on success, 0 on failure;

— Function: int lw6gfx_get_video_mode (lw6gfx_backend_t * backend, lw6gui_video_mode_t * video_mode)

backend: the backend to use

video_mode: the current video mode (will be overwritten, out parameter)

This function returns the current video mode.

Return value: 1 on success, 0 on failure;

— Function: int lw6gfx_get_fullscreen_modes (lw6gfx_backend_t * backend, lw6gui_fullscreen_modes_t * fullscreen_modes)

backend: the backend to use

fullscreen_modes: the available fullscreen modes (will be overwritten, out parameter)

This function returns the current video mode.

Return value: 1 on success, 0 on failure;

— Function: lw6gui_input_t * lw6gfx_pump_events (lw6gfx_backend_t * backend)

backend: the backend to use

This function "pumps" events, that is gets pending events, puts them in queues, maintains internal states up to date. You really must call this very often or no input will be processed at all.

Return value: a pointer on the internal input state, musn't be freed.

— Function: int lw6gfx_display (lw6gfx_backend_t * backend, int mask, lw6gui_look_t * look, lw6map_level_t * level, lw6ker_game_struct_t * game_struct, lw6ker_game_state_t * game_state, lw6pil_local_cursors_t * local_cursors, lw6gui_menu_t * menu, float progress, float fps, float mps, char ** log_list, int capture, int gfx_debug, int debug_team_id, int debug_layer_id)

backend: the graphical backend to use

mask: display flag, tells what to display

look: the look, the skin, contains display options

level: the level to display

game_struct: the game_struct associated with the level

game_state: the game_state associated with the level

local_cursors: the cursor to center the focus on

menu: the menu to display

progress: the value of the progress indicator

fps: the number of frames per second to display

mps: the number of moves per second to display

log_list: log messages to display

capture: wether to enable capture mode or not

gfx_debug: wether to enable gfx debugging tools

debug_team_id: for debug display, team to display informations about

debug_layer_id: for debug display, layer to display

This is the major drawing function, the one that encapsulates all others. As the program uses a separate thread to display things, we just pass this function many parameters, and let it do its job alone. So many parameters might sometimes be useless. It also allows the graphics backend decide wether menus and hud and background should interact. Or not.

Return value: 1 on success, 0 on failure.

— Function: lw6sys_assoc_t * lw6gfx_get_backends (int argc, char * [] argv)

argc: argc, as passed to main

argv: argv, as passed to main

List available gfx backends. The hash contains pairs with id and name for each backend. The id is the technical key you can use to load the backend, the name is something more readable you can display in an interface. The backend objects themselves are not instanciated by this (in fact, they are, but released on the fly) you need to load and initialize them afterwards.

Return value: hash containing id/name pairs.

— Function: lw6gfx_backend_t * lw6gfx_create_backend (int argc, char * [] argv, char * name)

argc: argc, as passed to main

argv: argv, as passed to main

name: string containing gfx key, typically got from lw6gfx_get_backends

Creates a gfx backend, this is just about loading the dynamic library if needed, and/or check gfx engine is available, and connect to it. It does not perform initialization.

Return value: gfx backend.

— Function: void lw6gfx_destroy_backend (lw6gfx_backend_t * backend)

backend: gfx backend to destroy

Frees the ressources associated to a gfx, which must have been properly uninitialized before.

Return value: none.

— Function: int lw6gfx_test (int mode)

mode: 0 for check only, 1 for full test

Runs the gfx module test suite. In check-only mode, this function won't test many things, for it requires a graphical mode to be available to perform the complete test.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libgfx, Up: C API

5.19 mod-gl

5.19.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/gfx/mod-gl/gl-utils/index.html (as there are many sub-directories in this module, please refer to the test coverage directory index for complete information).

5.19.2 API


Next: , Previous: mod-gl, Up: C API

5.20 libglb

5.20.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/glb/index.html.

5.20.2 API

— Function: char * lw6glb_base64_encode_bin (char * buf, int size)

buf: the data to encode

size: the size of data to encode

Encodes data into base64. Memory allocation is done automatically.

Return value: newly allocated string.

— Function: char * lw6glb_base64_decode_bin (int * size, char * base64_str)

size: the size of the decoded data

base64_str: the string to decode

Decodes data from base64. Memory allocation is done automatically. Note that this function only works for strings, other data might not be handled correctly.

Return value: newly allocated pointer, NULL on error.

— Function: char * lw6glb_base64_encode_str (char * str)

str: the string to encode

Encodes a string into base64.

Return value: newly allocated string.

— Function: char * lw6glb_base64_decode_str (char * str)

str: the string to decode

Decodes a string from base64.

Return value: newly allocated string, NULL on error.

— Function: char * lw6glb_base64_encode_bin_prefix (char * buf, int size, char * prefix)

buf: the data to encode

size: the size of data to encode

prefix: a prefix string

Encodes data into base64. Memory allocation is done automatically. The encoded string will be prefixed with prefix.

Return value: newly allocated string.

— Function: char * lw6glb_base64_decode_bin_prefix (int * size, char * base64_str, char * prefix)

size: the size of the decoded data

base64_str: the string to decode

prefix: a prefix string

Decodes data from base64. Memory allocation is done automatically. Note that this function only works for strings, other data might not be handled correctly. The encoded is expected to start with prefix prefix and then contain base64 data.

Return value: newly allocated pointer, NULL on error.

— Function: char * lw6glb_base64_encode_str_prefix (char * str, char * prefix)

str: the string to encode

prefix: a prefix string

Encodes a string into base64. The encoded string will be prefixed with prefix.

Return value: newly allocated string.

— Function: char * lw6glb_base64_decode_str_prefix (char * str, char * prefix)

str: the string to decode

prefix: a prefix string

Decodes a string from base64. The encoded is expected to start with prefix prefix and then contain base64 data.

Return value: newly allocated string, NULL on error.

— Function: char * lw6glb_sha1_hmac_80_bin (char * key, int key_size, char * buf, int buf_size)

key: the key buffer key_size

buf: the data to analyse

buf_size: the size of data to analyse

Calculates an SHA-1 sum of buffer, using key to seed calc.

Return value: newly allocated string, containing 20 chars checksum.

— Function: char * lw6glb_sha1_hmac_80_str (char * key, char * str)

key: a key (string)

str: the string to calculate the checksum for

Calculates an SHA-1 sum of a string, using key to seed calc.

Return value: newly allocated string, containing 20 chars checksum.

— Function: u_int32_t lw6glb_sha1_hmac_32_bin (char * key, int key_size, char * buf, int buf_size)

key: the key buffer key_size

buf: the data to analyse

buf_size: the size of data to analyse

Calculates an SHA-1 sum of buffer, using key to seed calc.

Return value: a 32-bit unsigned integer

— Function: u_int32_t lw6glb_sha1_hmac_32_str (char * key, char * str)

key: a key (string)

str: the string to calculate the checksum for

Calculates an SHA-1 sum of a string, using key to seed calc.

Return value: a 32-bit unsigned integer

— Function: int lw6glb_test (int mode)

mode: 0 for check only, 1 for full test

Runs the glb module test suite.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libglb, Up: C API

5.21 libgui

5.21.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/gui/index.html.

5.21.2 API

— Function: void lw6gui_button_register_down (lw6gui_button_t * button, int64_t timestamp)

button: the button to update

timestamp: the current ticks (milliseconds)

Registers a "down" (press) event on a button.

Return value: none.

— Function: void lw6gui_button_register_up (lw6gui_button_t * button)

button: the button to update

Registers a "up" (release) event on a button.

Return value: none.

— Function: int lw6gui_button_is_pressed (lw6gui_button_t * button)

button: the button to query

Tells wether a button is pressed or not.

Return value: 1 if pressed, 0 if not.

— Function: int lw6gui_button_pop_press (lw6gui_button_t * button)

button: the button to query

Tells how many times the button has been pressed. Typical usage: the button is pressed, released, pressed, released several times. Then, after all this, you want to know how many times it has been pressed. Querying its state with lw6gui_button_is_pressed won't tell you much but this pop_press function will return 1 for each press there's been.

Return value: 1 if there's a press event in the queue, 0 if empty.

— Function: int lw6gui_button_pop_simple_click (lw6gui_button_t * button)

button: the button to query

Tells how many times the button has been simpleclicked. This is different from a simple press, in fact, there's a delay, we must wait until the double-click delay is elapsed to make sure this is a simple click... Designed for use with mouse to differentiate fire and alternate fire.

Return value: 1 if there's a simpleclick event in the queue, 0 if empty.

— Function: int lw6gui_button_pop_double_click (lw6gui_button_t * button)

button: the button to query

Tells how many times the button has been doubleclicked. Typical usage: the button is doubleclicked, released, doubleclicked, released several times. Then, after all this, you want to know how many times it has been doubleclicked.

Return value: 1 if there's a doubleclick event in the queue, 0 if empty.

— Function: int lw6gui_button_pop_triple_click (lw6gui_button_t * button)

button: the button to query

Tells how many times the button has been tripleclicked. Typical usage: the button is tripleclicked, released, tripleclicked, released several times. Then, after all this, you want to know how many times it has been tripleclicked.

Return value: 1 if there's a tripleclick event in the queue, 0 if empty.

— Function: void lw6gui_button_update_repeat (lw6gui_button_t * button, lw6gui_repeat_settings_t * repeat_settings, int64_t timestamp)

button: the button to update

repeat_settings: the repeat settings

timestamp: the current ticks (milliseconds)

Updates the repeat informations for a button, must be called regularly, as often as possible.

Return value: none.

— Function: int lw6gui_button_sync (lw6gui_button_t * dst, lw6gui_button_t * src)

dst: the target button object

src: the source button object

Synchronizes two button objects. This is typically used to pass data from one thread to another. This is not a simple copy, it will handle data such as "when was it pressed last" it an intelligent manner, popping src data to put it in dst, and clearing src.

Return value: 1 if success, O if failure.

— Function: int lw6gui_coord_calc_xy (float * dst_x, float * dst_y, float dst_x0, float dst_y0, float dst_w, float dst_h, float src_x, float src_y, float src_x0, float src_y0, float src_w, float src_h)

dst_x: the x coord to return

dst_y: the y coord to return

dst_x0: the x coord of point 0 in destination coord system

dst_y0: the y coord of point 0 in destination coord system

dst_w: the width of the area in destination coord system

dst_h: the width of the area in destination coord system

src_x: the x coord in source coord system

src_y: the y coord in source coord system

src_x0: the x coord of point 0 in source coord system

src_y0: the y coord of point 0 in source coord system

src_w: the width of the area in source coord system

src_h: the width of the area in source coord system

Registers a "down" (press) event on a button.

Return value: 1 if OK, 0 if error (unable to calculate).

— Function: void lw6gui_coords_fix_xy_float (float * x, float * y, int * x_flip, int * y_flip, float w, float h, int x_polarity, int y_polarity)

x: x coord (in/out param)

y: y coord (in/out param)

x_flip: flip on x (out param, -1 or +1)

y_flip: flip on y (out param, -1 or +1)

w: width

h: height

x_polarity: x polarity (-1, 0 or 1)

y_polarity: y polarity (-1, 0 or 1)

Same as lw6map_fix_coords except it operates on floats. Usefull for cursor and other rendering operations. Additionnally, will keep track of inversions, that is to say if map is flip in one or another way. Be carefull, the flip values are -1 or 1 so that it's easy to multiply an offset by it, for instance, but this means testing if flip is not 0 will always return true, you must test if flip is stritly positive or negative.

Return value: none

— Function: int lw6gui_input_init (lw6gui_input_t * input)

input: the input struct to initialise

Initialises an input structure, don't use twice, it won't free a previous init.

Return value: a pointer to the newly allocated object.

— Function: void lw6gui_input_quit (lw6gui_input_t * input)

input: the input struct to uninitialise

Unitialises an input structure, need to call it to free event queue.

Return value: a pointer to the newly allocated object.

— Function: lw6gui_input_t * lw6gui_input_new ()

Creates an input structure, which can be used to handle input state & buffer.

Return value: a pointer to the newly allocated object.

— Function: void lw6gui_input_free (lw6gui_input_t * input)

input: the input object to free.

Deletes an input structure.

Return value: none.

— Function: int lw6gui_input_reset (lw6gui_input_t * input)

input: the input struct to reset

Resets an input structure. Must have been initialized before. It will empty all queues and mark everything as unpressed.

Return value: 1 on success, 0 if failure.

— Function: void lw6gui_input_update_repeat (lw6gui_input_t * input, lw6gui_repeat_settings_t * repeat_settings, int64_t timestamp)

input: the input to update

repeat_settings: the repeat settings (delay + interval)

timestamp: the current ticks (milliseconds)

Updates the repeat informations for an input, must be called regularly, as often as possible.

Return value: none.

— Function: void lw6gui_input_register_change (lw6gui_input_t * input)

input: the input to update

Tells an input object that one of its descendants has been modified. This will affect the return value of lw6gui_input_need_sync

Return value: none.

— Function: int lw6gui_input_need_sync (lw6gui_input_t * input)

input: the input to test

Tests wether an input object contains was modified and needs synchronisation.

Return value: 1 if sync is need, 0 if not.

— Function: int lw6gui_input_sync (lw6gui_input_t * dst, lw6gui_input_t * src)

dst: the target input object

src: the source input object

Synchronizes two input objects. This is typically used to pass data from one thread to another. This is not a copy, it will brute-force copy the static data such as mouse position, but anything like a queue will be treated in a "empty source and fill target with data" scheme. So source will be affected by this, the key buffer will be emptied, and so on. And if there are key in the target buffer, they won't be overwritten but kept in front of the FIFO list.

Return value: 1 if success, O if failure.

— Function: int lw6gui_joystick_check_index (int i)

i: index to check

Checks wether the index is correct. Does not mean the joystick exists, it's just to avoid out of bounds errors.

Return value: 1 if within range, 0 if not.

— Function: void lw6gui_joystick_update_axis_x (lw6gui_joystick_t * joystick, int x, int limit, int64_t timestamp)

joystick: joystick to update

x: x-axis position, as returned by the driver

limit: the limit, under this, buttons are considered unpressed.

timestamp: current ticks (timestamp in ms)

Updates the x axis of a joystick, this will convert an information of analog type such as "joystick is here" to a pad-like information such as "pressed in that direction".

Return value: 1 if within range, 0 if not.

— Function: void lw6gui_joystick_update_axis_y (lw6gui_joystick_t * joystick, int y, int limit, int64_t timestamp)

joystick: joystick to update

limit: the limit, under this, buttons are considered unpressed.

timestamp: current ticks (timestamp in ms)

Updates the y axis of a joystick, this will convert an information of analog type such as "joystick is here" to a pad-like information such as "pressed in that direction".

Return value: 1 if within range, 0 if not.

— Function: void lw6gui_joystick_update_repeat (lw6gui_joystick_t * joystick, lw6gui_repeat_settings_t * repeat_settings, int64_t timestamp)

joystick: the joystick to update

repeat_settings: the repeat settings (delay + interval)

timestamp: the current ticks (milliseconds)

Updates the repeat informations for a joystick, must be called regularly, as often as possible.

Return value: none.

— Function: int lw6gui_joystick_sync (lw6gui_joystick_t * dst, lw6gui_joystick_t * src)

dst: the target joystick object

src: the source joystick object

Synchronizes two joystick objects. This is typically used to pass data from one thread to another.

Return value: 1 if success, O if failure.

— Function: void lw6gui_joystick_get_move_pad (lw6gui_joystick_t * joystick, lw6gui_move_pad_t * move_pad)

joystick: the joystick to query

move_pad: the structure which will contain the results

Returns the state of the joystick in a uniform, non-device specific structure containing only the up/down/left/right information.

Return value: none, the value are stored in move_pad.

— Function: int lw6gui_keyboard_check_keysym (int keysym)

keysym: the keysym to check

Tells wether the keysym is valid or not.

Return value: 1 if valid, 0 if not

— Function: lw6gui_keypress_t * lw6gui_keyboard_pop_keypress (lw6gui_keyboard_t * keyboard)

keyboard: the keyboard structure which stores keyboard state

Pops (in FIFO mode) a keypress stored in the keyboard buffer. You must free the obtained keypress object after you're done with it.

Return value: a newly allocated pointer, or NULL if no keypress pending.

— Function: int lw6gui_keyboard_is_pressed (lw6gui_keyboard_t * keyboard, int keysym)

keyboard: the keyboard structure which stores keyboard state

Tells wether a key is pressed or not. The function will test out of bound values.

Return value: 1 if pressed, 0 if not.

— Function: int lw6gui_keyboard_register_key_down (lw6gui_keyboard_t * keyboard, int keysym, int unicode, char * label, int64_t timestamp)

keyboard: the keyboard structure which will store the keypress

keysym: the keysym for the keypress

unicode: the ASCII/unicode code for the keypress

label: the label for the keypress

timestamp: the current ticks (timestamp in ms)

Registers a keypress event, that is, puts it in the event queue. This function does not take an lw6gui_keypress_t structure but separated args, this is because it will construct the object internally. You may free label after calling this, an internal copy will be done. This function will also maintain the array of key states up to date.

Return value: 1 if success, O if failure.

— Function: int lw6gui_keyboard_register_key_up (lw6gui_keyboard_t * keyboard, int keysym)

keyboard: the keyboard structure which will store the keypress

keysym: the keysym for the keypress

Registers a key release event.

Return value: 1 if success, O if failure.

— Function: void lw6gui_keyboard_update_repeat (lw6gui_keyboard_t * keyboard, lw6gui_repeat_settings_t * repeat_settings, int64_t timestamp)

keyboard: the keyboard to update

repeat_settings: the repeat settings (delay + interval)

timestamp: the current ticks (milliseconds)

Updates the repeat informations for a keyboard, must be called regularly, as often as possible.

Return value: none.

— Function: int lw6gui_keyboard_sync (lw6gui_keyboard_t * dst, lw6gui_keyboard_t * src)

dst: the target keyboard object

src: the source keyboard object

Synchronizes two keyboard objects. This is typically used to pass data from one thread to another. Will pop the src queue to fill the dst queue.

Return value: 1 if success, O if failure.

— Function: void lw6gui_keyboard_get_move_pad (lw6gui_keyboard_t * keyboard, lw6gui_move_pad_t * move_pad)

keyboard: the keyboard to query

move_pad: the structure which will contain the results

Returns the state of the keyboard in a uniform, non-device specific structure containing only the up/down/left/right information.

Return value: none, the value are stored in move_pad.

— Function: lw6gui_keypress_t * lw6gui_keypress_new (int keysym, int unicode, char * label)

keysym: the keysym to use

unicode: the unicode value for this keysym

label: the label (optional, might be NULL)

Creates a keypress structure, the only reason for needing a contructor is that the label field needs be duplicated.

Return value: a pointer to the newly allocated object.

— Function: void lw6gui_keypress_free (lw6gui_keypress_t * keypress)

keypress: the keypress object to free.

Deletes a keypress structure.

Return value: none.

— Function: char * lw6gui_keypress_repr (lw6gui_keypress_t * keypress)

keypress: the keypress to work on

Returns a human-readable representation of the keypress.

Return value: a newly allocated string

— Function: lw6gui_menu_t * lw6gui_menu_new (char * title, char * help, char * popup, char * esc, int enable_esc)

title: the string to be displayed, what the user sees. Can be freed after the call is done, function will make a copy internally.

help: a string introducing the menu, describing what it does, giving hints on how to use it.

popup: a string to be displayed in popup mode when menu is displayed for the first time.

esc: the label to be displayed in the ESC button

enable_esc: wether to enable the escape button.

Constructs a new menu object. Note that you can always call other functions to modify it afterwards.

Return value: a pointer to the newly allocated object.

— Function: void lw6gui_menu_free (lw6gui_menu_t * menu)

menu: a pointer to the menu.

Frees the menu, checking if things are OK before doing so.

Return value: none.

— Function: int lw6gui_menu_memory_footprint (lw6gui_menu_t * menu)

menu: a pointer to the menu.

Gets the memory occupied by the menu. Could be usefull to help a garbage collector taking decisions or reporting erros, for instance.

Return value: the number of bytes used.

— Function: char * lw6gui_menu_repr (lw6gui_menu_t * menu)

menu: a pointer to the menu.

Constructs a readable description of the object. Usefull for debugging, or to introspect things using scripts, at run-time. Does not necessarly describe all the informations about the object, but helps knowing what it is.

Return value: a string describing the object, must be freed.

— Function: void lw6gui_menu_set_title (lw6gui_menu_t * menu, char * title)

menu: a pointer to the menu.

title: the new title, you can free it after calling the function, an internal copy will be made.

Change the title of the menu. Use this function to change the title, don't try to access the struct directly. The idea is to have safe memory management.

Return value: none

— Function: void lw6gui_menu_set_help (lw6gui_menu_t * menu, char * help)

menu: a pointer to the menu.

help: the new help, you can free it after calling the function, an internal copy will be made.

Change the help of the menu. Use this function to change the help, don't try to access the struct directly. The idea is to have safe memory management.

Return value: none

— Function: void lw6gui_menu_set_popup (lw6gui_menu_t * menu, char * popup)

menu: a pointer to the menu.

popup: the new popup, you can free it after calling the function, an internal copy will be made.

Change the popup of the menu. That is to say, its popup. Use this function to change the popup, don't try to access the struct directly. The idea is to have safe memory management.

Return value: none

— Function: void lw6gui_menu_close_popup (lw6gui_menu_t * menu)

menu: a pointer to the menu.

Closes the popup, in practice, this is equivalent to setting the popup string to "" or NULL.

Return value: none

— Function: int lw6gui_menu_has_popup (lw6gui_menu_t * menu)

menu: a pointer to the menu.

Tells wether a popup is defined. Behavior is simplistic, at creation (when a non-NULL non-empty popup string has been set) then the popup is displayed. In this state, popup is considered to be defined. Then it can be close, and after this action the popup ain't here anymore, program continues the way it started.

Return value: 1 if has popup, 0 if does not

— Function: lw6gui_menuitem_t * lw6gui_menu_get_item (lw6gui_menu_t * menu, int position)

menu: the menu we want to query

position: the order of the item we want

Gets the menu item at the given position. First item is 0, last is N-1. Returns a pointer on the real object, not a copy.

Return value: a pointer to a menu item, NULL if out of range.

— Function: int lw6gui_menu_select (lw6gui_menu_t * menu, int position, int allow_scroll, int64_t now)

menu: the menu we want to modify

position: the position of the item we want to select

allow_scroll: wether scrolling should be allowed when displaying it

now: the current time, as a timestamp.

Selects the item at the given position. Use this function to be sure that only one item is selected, and all other states are consistent. Timestamp is needed for the sake of eye-candy.

Return value: 1 if success, 0 if failure (out of range).

— Function: void lw6gui_menu_select_esc (lw6gui_menu_t * menu, int state, int64_t now)

menu: the menu we want to modify

state: 1 to select, 0 to unselect

now: the current time, as a timestamp.

Selects the escape item, this does not affect other items, it's mostly. to handle eye candy.

Return value: none.

— Function: void lw6gui_menu_enable_esc (lw6gui_menu_t * menu, int state, int64_t now)

menu: the menu we want to modify

state: 1 to enable, 0 to disable

now: the current time, as a timestamp.

Enables the escape item, this does not affect other items, it's mostly. to handle eye candy.

Return value: none.

— Function: int lw6gui_menu_scroll_up (lw6gui_menu_t * menu)

menu: the menu to scroll

Scrolls a menu up, used as a callback for mouse wheel up for instance. The idea is just to decrement the first displayed item index.

Return value: 1 if OK, 0 if failed (out of range).

— Function: int lw6gui_menu_scroll_down (lw6gui_menu_t * menu)

menu: the menu to scroll

Scrolls a menu down, used as a callback for mouse wheel down for instance. The idea is just to increment the first displayed item index.

Return value: 1 if OK, 0 if failed (out of range).

— Function: int lw6gui_menu_set_breadcrumbs (lw6gui_menu_t * menu, lw6sys_list_t * breadcrumbs)

menu: the menu to scroll

breadcrumbs: list of strings containing breadcrumbs

Set the breadcrumbs, that's to say the readable, logical path to get to a given menu. This is just eye candy, not linked to any logic at this level.

Return value: 1 if OK, 0 if failed.

— Function: void lw6gui_menu_center (lw6gui_menu_t * menu, int position, int max_displayed_items)

menu: the menu to center

position: the position of the menuitem to be put in the center

max_displayed_items: the maximum number of items displayed

Centers the menu on a given menuitem. Typically used when pushing a menu with a menuitem selected 'anywhere' in the list.

Return value: none.

— Function: int lw6gui_menu_insert (lw6gui_menu_t * menu, lw6gui_menuitem_t * menuitem, int position, int64_t now)

menu: the menu we want to modify

menuitem: the item to insert

position: the position the new item will occupy ("insert before" mode)

now: the current time, as a timestamp.

Inserts the given item in the menu. All items starting at the insert position will be "pushed" (that is, their position incremented by 1). Once the menuitem is inserted, the menu object will take care of memory management and automatically free it when needed.

Return value: 1 if success, 0 if failure (memory problem, out of range).

— Function: int lw6gui_menu_append (lw6gui_menu_t * menu, lw6gui_menuitem_t * menuitem, int64_t now)

menu: the menu we want to modify

menuitem: the item to insert

now: the current time, as a timestamp.

Appends the given item to the menu. Once the menuitem is appended, the menu object will take care of memory management and automatically free it when needed.

Return value: 1 if success, 0 if failure (memory problem).

— Function: int lw6gui_menu_remove (lw6gui_menu_t * menu, int position, int64_t now)

menu: the menu we want to modify

position: the item to insert

now: the current time, as a timestamp.

Removes an item from the menu. It will automatically be freed.

Return value: 1 if success, 0 if failure (out of range).

— Function: void lw6gui_menu_update_display_range (lw6gui_menu_t * menu, int max_displayed_items)

menu: the menu concerned

max_displayed_items: the maximum number of items to display at once

Updates the display range. The reason for having this is that the first item, that is, how far we scroll in a very long menu, depends on the previous position. Plus you have to handle limit cases (begin/end). Thus, this function, which will automatically pick-up a suitable position. Of course, first_item_displayed is not necessarly equal to selected_item.

Return value: none.

— Function: int lw6gui_menu_insert_for_id_use (lw6gui_menu_t * menu, char * label, char * tooltip, int value, int enabled, int selected, int colored, int position, int64_t now)

menu: the menu to work on

label: the label of the menuitem to append

tooltip: the tooltip of the menuitem to append

value: the value of the menuitem to append

enabled: wether the inserted menuitem should be enabled

selected: wether the inserted menuitem should be selected

colored: wether the inserted menuitem should use value as its color

now: current time (timestamp)

Inserts a menu item at the given position. The idea is that the menu item object is automatically constructed on the fly, and an id is returned, which can be passed to '_using_id' menu-related functions. This is typically for using in scripts. The idea is that the script just keeps a copy of the id returned, and can this way operate directly on the menuitem without keeping a pointer, a smob or anything internally. From the C point of view, having a real C structure enables persistent data from one display to the other, and this is nice and conveninent. I acknowledge the prototype is scary.

Return value: 0 if error, or else an id which will later be used with '_using_id' functions.

— Function: int lw6gui_menu_append_for_id_use (lw6gui_menu_t * menu, char * label, char * tooltip, int value, int enabled, int selected, int colored, int64_t now)

menu: the menu to work on

label: the label of the menuitem to append

tooltip: the tooltip of the menuitem to append

value: the value of the menuitem to append

enabled: wether the appended menuitem should be enabled

selected: wether the appended menuitem should be selected

colored: wether the appended menuitem should use value as its color

now: current time (timestamp)

Appends a menuitem using the same logic as lw6gui_menu_insert_for_id_use that is to say a parameter is returned which can later be used to directly operate on a given menuitem, without having its pointer, and even if its position changes.

Return value: 0 if error, or else an id which will later be used with '_using_id' functions.

— Function: int lw6gui_menu_remove_using_id (lw6gui_menu_t * menu, int menuitem_id, int64_t now)

menu: the menu to work on

menuitem_id: the id of the menuitem to remove

now: current time (timestamp)

Deletes the menuitem with the given id. Very important: the id is not the position. Id are arbitrary numbers that stick to menuitems, but they are not directly linked with the position. This function is practical to use if, for some reason, you don't have the pointer on the menuitem.

Return value: 1 if success, 0 if failure (out of range).

— Function: void lw6gui_menu_sync_using_id (lw6gui_menu_t * menu, int menuitem_id, char * label, char * tooltip, int value, int enabled, int selected, int colored, int64_t now)

menu: the menu to work on

menuitem_id: the id of the menuitem to synchronize

label: menu label

tooltip: menu tooltip

value: value

enabled: wether it's usable or not

selected: 1 if the menuite is current item

colored: wether to use color

now: current time (timestamp)

Updates the menuitem with the given id. Very important: the id is not the position. Id are arbitrary numbers that stick to menuitems, but they are not directly linked with the position. This function is practical to use if, for some reason, you don't have the pointer on the menuitem. In practice, it's heavily used in the game to transmit informations from the scripts to the core C engine. Additionnaly, this function will automatically synchronize the selected_item field of the menu struct.

Return value: 1 if success, 0 if failure (out of range).

— Function: int lw6gui_menu_is_same (lw6gui_menu_t * menu_a, lw6gui_menu_t * menu_b)

menu_a: first item to compare

menu_b: second item to compare

Compares two menus.

Return value: 1 if they are the same, 0 if not

— Function: lw6gui_menu_t * lw6gui_menu_dup (lw6gui_menu_t * menu)

menu: the menu to duplicate

Duplicates a menu structure.

Return value: a pointer to the new menu.

— Function: int lw6gui_menu_sync (lw6gui_menu_t * dst, lw6gui_menu_t * src)

dst: the target menu

src: the source menu

Synchronizes two menus, this supposes that they represent the same menu, but simply in a different state. This function does not really copy src to dst, it has a special behavior, indeed everything is copied from src to dst, except the first_item_displayed and nb_items_displayed which are taken from dst and copied to src. This is because in practise, those values are updated in the display loop/thread, which is the one which uses the target. This is not very orthodox, but should work.

Return value: 1 if success, 0 if failure

— Function: lw6gui_menuitem_t * lw6gui_menuitem_new (char * label, char * tooltip, int value, int enabled, int selected, int colored)

label: the string to be displayed, what the user sees. Can be freed after the call is done, function will make a copy internally.

tooltip: the string to be displayed as a tooltip, describing the menu item in detail. Can be NULL if you don't want to use this feature.

value: the value. No GUI function uses this, this is the "real" value associated to the item.

enabled: wether the menu item can be selected, used, and so on

selected: wether the menu item is the item selected among all menu items.

colored: wetherr the menu item must, when drawn, be colored according to its value.

Constructs a new menuitem object. Note that you can always call other functions to modify these values afterwards, this might change rendering since lw6gui_menuitem_set_value or lw6gui_menuitem_set_label will, for instance, modify the "when was that item last modified" information.

Return value: a pointer to the newly allocated object.

— Function: void lw6gui_menuitem_free (lw6gui_menuitem_t * menuitem)

menuitem: a pointer to the menuitem.

Frees the menuitem, checking if things are OK before doing so.

Return value: none.

— Function: int lw6gui_menuitem_memory_footprint (lw6gui_menuitem_t * menuitem)

menuitem: a pointer to the menuitem.

Gets the memory occupied by the menuitem. Could be usefull to help a garbage collector taking decisions or reporting erros, for instance.

Return value: the number of bytes used.

— Function: char * lw6gui_menuitem_repr (lw6gui_menuitem_t * menuitem)

menuitem: a pointer to the menuitem.

Constructs a readable description of the object. Usefull for debugging, or to introspect things using scripts, at run-time. Does not necessarly describe all the informations about the object, but helps knowing what it is.

Return value: a string describing the object, must be freed.

— Function: void lw6gui_menuitem_set_label (lw6gui_menuitem_t * menuitem, char * label, int64_t now)

menuitem: a pointer to the menuitem.

label: the new label, you can free it after calling the function, an internal copy will be made.

now: the current time, as a timestamp.

Change the label of the menu item. That is to say, what the user sees. Use this function to change the menuitem value, don't try to access the struct directly. The idea is 1) to have safe memory management and 2) to keep the last_change member up to date. It can be later used for eye-candy effects.

Return value: none

— Function: void lw6gui_menuitem_set_tooltip (lw6gui_menuitem_t * menuitem, char * tooltip, int64_t now)

menuitem: a pointer to the menuitem.

tooltip: the new tooltip, you can free it after calling the function, an internal copy will be made.

now: the current time, as a timestamp.

Change the tooltip of the menu item (the explanation of what the item is about) Use this function to change the menuitem value, don't try to access the struct directly. The idea is 1) to have safe memory management and 2) to keep the last_change member up to date. It can be later used for eye-candy effects.

Return value: none

— Function: void lw6gui_menuitem_set_value (lw6gui_menuitem_t * menuitem, int value, int64_t now)

menuitem: a pointer to the menuitem.

value: the new value.

now: the current time, as a timestamp.

Changes the value of a menuitem. This is the internal value, not what the user sees. Use this function to change the menuitem value, don't try to access the struct directly. The idea is to keep the last_change member up to date. It can be later used for eye-candy effects.

Return value: none

— Function: void lw6gui_menuitem_select (lw6gui_menuitem_t * menuitem, int state, int64_t now)

menuitem: a pointer to the menuitem.

state: 1 to select, 0 to unselect

now: the current time, as a timestamp.

Switches the menuitem to (un)selected state. Use this function, don't try to modify the struct members directly. The idea is to have the last_select parameter up to date. It can be later used for eye-candy effects.

Return value: none

— Function: void lw6gui_menuitem_enable (lw6gui_menuitem_t * menuitem, int state, int64_t now)

menuitem: a pointer to the menuitem.

state: 1 to enable, 0 to disable

now: the current time, as a timestamp.

Switches the menuitem to enabled/disabled state. Use this function, don't try to modify the struct members directly. The idea is to have the last_select parameter up to date. It can be later used for eye-candy effects.

Return value: none

— Function: u_int32_t lw6gui_menuitem_checksum (lw6gui_menuitem_t * menuitem, lw6gui_look_t * look)

menuitem: the menuitem we want to identify

Returns a checksum which can be used to know, for instance, wether the menuitem has changed or not, and if we should redraw it.

Return value: a checksum.

— Function: int lw6gui_menuitem_is_same (lw6gui_menuitem_t * menuitem_a, lw6gui_menuitem_t * menuitem_b)

menuitem_a: first item to compare

menuitem_b: second item to compare

Compares two menuitems.

Return value: 1 if they are the same, 0 if not

— Function: lw6gui_menuitem_t * lw6gui_menuitem_dup (lw6gui_menuitem_t * menuitem)

menuitem: the menuitem to duplicate

The menuitem to duplicate.

Return value: a pointer to the duplicted menuitem.

— Function: int lw6gui_menuitem_sync (lw6gui_menuitem_t * dst, lw6gui_menuitem_t * src)

dst: the target menuitem

src: the source menuitem

Synchronizes two menuitems, this supposes that they represent the same item, but simply in a different state.

Return value: 1 if success, 0 if failure

— Function: void lw6gui_mouse_register_move (lw6gui_mouse_t * mouse, int screen_pos_x, int screen_pos_y, int64_t timestamp)

mouse: the mouse object to work on

screen_pos_x: the x position on screen

screen_pos_y: the y position on screen

timestamp: current timestamp

Registers a mouse move event.

Return value: note.

— Function: int lw6gui_mouse_poll_move (lw6gui_mouse_t * mouse, int * screen_pos_x, int * screen_pos_y)

mouse: the mouse object to poll

screen_pos_x: pointer to the x position (can be NULL), will be updated even if no move

screen_pos_y: pointer to the y position (can be NULL), will be updated even if no move

Asks wether the mouse has moved or not.

Return value: 1 if mouse was moved since last call, 0 if not.

— Function: void lw6gui_mouse_update_repeat (lw6gui_mouse_t * mouse, lw6gui_repeat_settings_t * repeat_settings, int64_t timestamp)

mouse: the mouse to update

repeat_settings: the repeat settings (delay + interval)

timestamp: the current ticks (milliseconds)

Updates the repeat informations for a mouse, must be called regularly, as often as possible.

Return value: none.

— Function: int lw6gui_mouse_sync (lw6gui_mouse_t * dst, lw6gui_mouse_t * src)

dst: the target mouse object

src: the source mouse object

Synchronizes two mouse objects. This is typically used to pass data from one thread to another. Will handle "mouse move" attribute and clear it in src if needed while setting it in dst.

Return value: 1 if success, O if failure.

— Function: void lw6gui_mouse_drag_begin (lw6gui_mouse_t * mouse)

mouse: mouse struct to update

To be called when one wants to start recording a drag session, typically when left button is pressed.

Return value: none.

— Function: void lw6gui_mouse_drag_end (lw6gui_mouse_t * mouse)

mouse: mouse struct to update

To be called when one wants to stop recording a drag session, typically when left button is released.

Return value: none.

— Function: int lw6gui_mouse_drag_pop (lw6gui_mouse_t * mouse, int * delta_x, int * delta_y, int * pos_x, int * pos_y, int * speed_x, int * speed_y)

mouse: mouse struct to query

delta_x: x movement (on screen, out param can be NULL)

delta_y: y movement (on screen, out param can be NULL)

pos_x: x pos (on screen, out param can be NULL)

pos_y: y pos (on screen, out param can be NULL)

speed_x: x speed (on screen, out param can be NULL)

speed_y: y speed (on screen, out param can be NULL)

To be called when one wants to stop recording a drag session, typically when left button is released.

Return value: none.

— Function: int lw6gui_point_is_inside_rect (lw6gui_point_t point, lw6gui_rect_t * rect)

point: point to test

rect: rectangle in which point is supposed to be

Tests wether a point is inside a rectangle, this is typically used to know if a point is inside the right texture or if we're outside.

Return value: 1 if OK, 0 if outside

— Function: int lw6gui_quad_is_inside_rect (lw6gui_quad_t * quad, lw6gui_rect_t * rect)

quad: quad to test

rect: rectangle in which quad is supposed to be

Tests wether a quad is inside a rectangle, this is typically used to know if a quad is inside the right texture or if we're outside.

Return value: 1 if OK, 0 if outside

— Function: void lw6gui_rect_init_x1y1x2y2 (lw6gui_rect_t * rect, int x1, int y1, int x2, int y2)

rect: the structure to initialize

x1: x for top left corner

y1: y for top left corner

x2: x for bottom right corner

y2: y for bottom right corner

Initializes a rect structure, will calculate w & h.

Return value: none.

— Function: void lw6gui_rect_init_xywh (lw6gui_rect_t * rect, int x, int y, int w, int h)

rect: the structure to initialize

x: x for top left corner

y: y for top left corner

w: width

h: height

Initializes a rect structure, will calculate x2 & y2.

Return value: none.

— Function: void lw6gui_rect_clip (lw6gui_rect_t * dst, lw6gui_rect_t * src, lw6gui_rect_t * clip)

dst: the structure which will contain the result

src: the source rect

clip: the clipping rect (boundaries)

Clips a rect (think of rectangle clips).

Return value: none.

— Function: int lw6gui_segment_is_inside_rect (lw6gui_segment_t * segment, lw6gui_rect_t * rect)

segment: segment to test

rect: rectangle in which segment is supposed to be

Tests wether a segment is inside a rectangle, this is typically used to know if a segment is inside the right texture or if we're outside.

Return value: 1 if OK, 0 if outside

— Function: void lw6gui_smoother_init (lw6gui_smoother_t * smoother, float value, int duration)

smoother: the structure to initialize

value: the value to use for now

duration: the duration of a standard move, in ticks (msec)

Initializes a smoother object, with a default value. The important point is the duration which will condition all the behavior of the object.

Return value: none.

— Function: void lw6gui_smoother_immediate_force (lw6gui_smoother_t * smoother, float value)

smoother: the structure to use

value: the target value

Forces a smoother object to immediately point on a value.

Return value: none.

— Function: void lw6gui_smoother_set_target (lw6gui_smoother_t * smoother, float value, int64_t now)

smoother: the structure to use

value: the target value

now: the current timestamp

Sets a new target, will automatically calculate current speed to smooth the next returned values.

Return value: none.

— Function: float lw6gui_smoother_get_value (lw6gui_smoother_t * smoother, int64_t now)

smoother: the structure to use

now: the current timestamp

Returns the current value of the smoother.

Return value: a float.

— Function: void lw6gui_smoother_fix_overflow (lw6gui_smoother_t * smoother, int step)

smoother: object to modify

step: step size, typically twice the map size

Companion function of lw6pil_coords_fix_x10, this one will fix a smoother target to avoid crazy scrolls when cursor is on a map edge.

Return value: none.

— Function: int lw6gui_test (int mode)

mode: 0 for check only, 1 for full test

Run tests in the gui module.

Return value: 1 if successfull, 0 if failed.

— Function: int lw6gui_triangle_is_inside_rect (lw6gui_triangle_t * triangle, lw6gui_rect_t * rect)

triangle: triangle to test

rect: rectangle in which triangle is supposed to be

Tests wether a triangle is inside a rectangle, this is typically used to know if a triangle is inside the right texture or if we're outside.

Return value: 1 if OK, 0 if outside

— Function: int lw6gui_video_mode_find_closest (lw6gui_video_mode_t * closest, lw6gui_video_mode_t * wished, lw6sys_list_t * available)

closest: the closest video_mode found

wished: the wished video_mode

available: a list of available video_modes (list of lw6gui_video_mode_t *)

Finds the closest video_mode available, this is just a small utility to cope with different screen shapes and avoid requesting 640x480 when it's just not available but there's a 640x400 instead.

Return value: 1 if the wished video_mode exists in available list and was found, else 0 if the wished video_mode doesn't exist and an approximative match was picked.

— Function: int lw6gui_video_mode_is_same (lw6gui_video_mode_t * mode_a, lw6gui_video_mode_t * mode_b)

mode_a: first mode to compare

mode_b: second mode to compare

Compares two video modes, to know if they're the same.

Return value: 1 if equal, 0 if not.

— Function: int lw6gui_video_mode_sync_ratio (lw6gui_video_mode_t * dst, lw6gui_video_mode_t * src)

dst: the target video mode

src: the source video mode

Applies the ratio of src to dst, for instance if src is 16/9, then dst will be made 16/9 too, trying to keep the same surface.

Return value: 1 on success, 0 on failure

— Function: int lw6gui_viewport_init (lw6gui_viewport_t * viewport, int screen_w, int screen_h, float drawable_x1, float drawable_y1, float drawable_x2, float drawable_y2, float center_x, float center_y, int map_w, int map_h, int x_polarity, int y_polarity, int x_wrap, int y_wrap, int keep_ratio, float global_zoom, float scroll_limit, int use_old_center)

viewport: the viewport to initalize

screen_w: screen width

screen_h: screen height

drawable_x1: viewport min x

drawable_y1: viewport min y

drawable_x2: viewport max x

drawable_y2: viewport max y

center_x: center of display (in map coordinates)

center_y: center of display (in map coordinates)

map_w: map width (shape)

map_h: map height (shape)

x_polarity: x polarity

y_polarity: y polarity

x_wrap: wether to wrap horizontally

y_wrap: wether to wrap vertically

keep_ratio: wether to adapt to viewport shape or keep original

global_zoom: global zoom is style_zoom * dynamic_zoom

scroll_limit: inside this zone, don't scroll

use_old_center: wether to take previous center in account

Initializes all the (jumbo?) viewport structure which will contain valuable informations for a simple "flat" display. Special renderers might not find usefull some fields and handle wrapping and zooming their own way, but this offers a basic skeleton.

Return value: 1 if ok, 0 on failure

— Function: void lw6gui_viewport_map_to_screen (lw6gui_viewport_t * viewport, float * screen_x, float * screen_y, float map_x, float map_y, int clip)

viewport: the viewport to use

screen_x: the x coord on the screen

screen_y: the y coord on the screen

map_x: the x coord in map coordinates

map_y: the y coord in map coordinates

clip: wether to clip returned values

Translates from map coords to screen coords. Returned values might be outside screen boundaries if clip is 0. If screen coords are outside drawable area anc clip is 1, then they will be clipped.

Return value: NULL

— Function: void lw6gui_viewport_screen_to_map (lw6gui_viewport_t * viewport, float * map_x, float * map_y, float screen_x, float screen_y, int wrap)

viewport: the viewport to use

map_x: the x coord in map coordinates

map_y: the y coord in map coordinates

screen_x: the x coord on the screen

screen_y: the y coord on the screen

wrap: wether to use polarity informations to wrap coords.

Translates from screen coords to map coords. If wrap is set, it will interpret coords the way lw6map_coords_fix_xy would, only it can still be formally outside map boundaries for it can return a value exactly equal to w,h while in interger mode it would be w-1,h-1.

Return value: NULL

— Function: void lw6gui_viewport_calc_drag (lw6gui_viewport_t * viewport, float * map_dst_x, float * map_dst_y, float map_src_x, float map_src_y, int screen_dx, int screen_dy)

viewport: viewport to work on

map_dst_x: map det x coord (out param)

map_dst_y: map dst y coord (out param)

map_src_x: map src x coord

map_src_y: map src y coord

screen_dx: drag x (on screen)

screen_dy: drag y (on screen)

Used to calculate the new "center" when in drag mode.

Return value: none.

— Function: void lw6gui_zone_init_x1y1x2y2 (lw6gui_zone_t * zone, float x1, float y1, float x2, float y2)

zone: the structure to initialize

x1: x for top left corner

y1: y for top left corner

x2: x for bottom right corner

y2: y for bottom right corner

Initializes a zone structure, will calculate w & h.

Return value: none.

— Function: void lw6gui_zone_init_xywh (lw6gui_zone_t * zone, float x, float y, float w, float h)

zone: the structure to initialize

x: x for top left corner

y: y for top left corner

w: width

h: height

Initializes a zone structure, will calculate x2 & y2.

Return value: none.

— Function: void lw6gui_zone_clip (lw6gui_zone_t * dst, lw6gui_zone_t * src, lw6gui_zone_t * clip)

dst: the structure which will contain the result

src: the source zone

clip: the clipping zone (boundaries)

Clips a zone (think of rectangle clips).

Return value: none.


Next: , Previous: libgui, Up: C API

5.22 libhlp

5.22.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/hlp/index.html.

5.22.2 API

— Function: int lw6hlp_is_documented (char * keyword)

keyword: the keyword we want to check out

Checks wether a given keyword is documented or not.

Return value: 1 if documented, 0 if not.

— Function: char * lw6hlp_about (lw6hlp_type_t * type, char ** default_value, int * min_value, int * max_value, char * keyword)

type: the type of the data associated to the keyword, will be written

default_value: the default value for the keyword, will be written

min_value: the min value for the keyword, will be written

max_value: the max value for the keyword, will be written

keyword: the keyword we want help about

Returns the documentation string associated to a keyword. The keyword might be a command-line option, a Guile function, an XML file entry. Raises a warning if the keyword is undocumented, but never returns NULL, you can use the returned value without checking it. String is localized if a translation is available. It's safe to call this function with type or other parameters being NULL.

Return value: a help string, never NULL, must not be freed. Additionnally, type will be updated.

— Function: lw6hlp_type_t lw6hlp_get_type (char * keyword)

keyword: the keyword we want the type of

Returns the type of a keyword. Calls lw6hlp_about internally.

Return value: the type, might be LW6HLP_TYPE_VOID.

— Function: char * lw6hlp_get_default_value (char * keyword)

keyword: the keyword we want the default for

Returns the default value for a keyword. Note that it can be NULL! The returned value is always a string, it's suitable to store in the config file, it's the value a user would pass on a command line, the one he wants documented.

Return value: a pointer, which can be NULL, must not be freed.

— Function: int lw6hlp_get_min_value (char * keyword)

keyword: the keyword we want the min for

Returns the min value for a keyword. Wether this is relevant for a given keyword does not affect the fact that you can call this function. A min and max of zero means min and max make no sense.

Return value: the value (integer)

— Function: int lw6hlp_get_max_value (char * keyword)

keyword: the keyword we want the max for

Returns the max value for a keyword. Wether this is relevant for a given keyword does not affect the fact that you can call this function. A min and max of zero means min and max make no sense.

Return value: the value (integer)

— Function: char * lw6hlp_get_credits (int id)

id: the id of the credits line to return

Returns a "credit line", that is a short sentence, about 30 to 50 chars, saying who developped the game, created graphics, giving important URLs, and so on. One can pass an arbitraty high id, no risk.

Return value: the string, must be freed.

— Function: int lw6hlp_match (char * keyword1, char * keyword2)

keyword1: the 1st keyword

keyword2: the 2nd keyword

Checks wether a keyword matches another. Not only a string comparison, will also try and guess if the error is only about dash "-" replaced by underscode "_", for instance.

Return value: 1 if matches, 0 if different.

— Function: lw6sys_list_t * lw6hlp_list_quick ()

Returns the list of keywords concerning quick options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_doc ()

Returns the list of keywords concerning self-documentation system.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_show ()

Returns the list of keywords concerning the show options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_path ()

Returns the list of keywords concerning the path options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_players ()

Returns the list of keywords concerning the players options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_input ()

Returns the list of keywords concerning the input options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_graphics ()

Returns the list of keywords concerning the graphics options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_sound ()

Returns the list of keywords concerning the sound options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_network ()

Returns the list of keywords concerning the network options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_map ()

Returns the list of keywords concerning the map options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_map_rules ()

Returns the list of keywords concerning the rules options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_map_hints ()

Returns the list of keywords concerning the hints options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_map_style ()

Returns the list of keywords concerning the style options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_map_teams ()

Returns the list of keywords concerning the teams options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_funcs ()

Returns the list of C-function exported to Guile.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_hooks ()

Returns the list of hooks.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_advanced ()

Returns the list of keywords concerning advanced options.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_aliases ()

Returns the list of command-line aliases.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_team_colors ()

Returns the list of team_colors.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list_weapons ()

Returns the list of weapons.

Return value: list of static strings (can't modify them)

— Function: lw6sys_list_t * lw6hlp_list ()

Returns the list of all available keywords.

Return value: list of static strings (can't modify them)

— Function: void lw6hlp_print_keyword (lw6sys_list_t ** list, FILE * f)

list: a pointer to a list of keywords

f: the file to print the content to

Prints all the keywords from the list. One keyword per line.

Return value: none.

— Function: void lw6hlp_print_content (lw6sys_list_t ** list, FILE * f)

list: a pointer to a list of keywords

f: the file to print the content to

Prints all the keywords from the list, with the associated keyword help, to the given file. Output is formatted to fit on the standard terminal/console.

Return value: none.

— Function: void lw6hlp_print_about (char * keyword, FILE * f)

keyword: the keyword to print help about

f: the file to print the content to

Displays the help about a keyword, to a file, directly. It's formatted for the purpose of the –about=<value> option.

Return value: none

— Function: int lw6hlp_reference_init ()

Initializes the help reference, this must be called before any call to lw6hlp_about or such help related functions.

Return value: 1 on success, 0 if failed

— Function: void lw6hlp_reference_quit ()

un-initializes the help reference, this must be called at the end of the program.

Return value: 1 on success, 0 if failed

— Function: int lw6hlp_test (int mode)

mode: 0 for check only, 1 for full test

Runs the hlp module test suite.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libhlp, Up: C API

5.23 libimg

5.23.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/img/index.html.

5.23.2 API

— Function: int lw6img_test (int mode)

mode: 0 for check only, 1 for full test

Runs the img module test suite.

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libimg, Up: C API

5.24 libker

5.24.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/ker/index.html.

5.24.2 API

— Function: char * lw6ker_capture_str (lw6ker_game_state_t * game_state)

game_state: game state to represent

Gives a string representation, an ASCII capture of the game. This representation is suitable for debugging, typically print it to a VT100 console.

Return value: dynamically allocated string.

— Function: void lw6ker_cursor_reset (lw6ker_cursor_t * cursor)

cursor: the cursor to reset

Sets a cursor to defaults (disabled). This function will not touch the node_id and cursor_id fields, so you can call it on an already used cursor, it will stay usable.

Return value: none

— Function: lw6ker_game_state_t * lw6ker_game_state_new (lw6ker_game_struct_t * game_struct, lw6sys_progress_t * progress)

game_struct: game_struct use to construct the object

progress: progress indicator

Creates a game state from a game struct. The game struct must be kept (never freed) while game_state is in use.

Return value: newly created object.

— Function: void lw6ker_game_state_free (lw6ker_game_state_t * game_state)

game_state: the object to free

Frees a game_state object, releases all required objects. At this stage the map_struct must still be available.

Return value: none

— Function: void lw6ker_game_state_point_to (lw6ker_game_state_t * game_state, lw6ker_game_struct_t * game_struct)

game_state: the game_state to modify

game_struct: the game_struct to point to

This can be used when one makes a copy (dup) of a game struct and for some reason want the game_state to point on this new copy. Of course you should make the game_state point to a game_struct that is identical to the one that was used to construct the object in the first place. Use at your own risk.

Return value: none

— Function: int lw6ker_game_state_memory_footprint (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the approximative amount of memory taken by the object.

Return value: number of bytes (approximation)

— Function: char * lw6ker_game_state_repr (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Gives a readable representation of the object.

Return value: newly allocated string, must be freed

— Function: int lw6ker_game_state_can_sync (lw6ker_game_state_t * dst, lw6ker_game_state_t * src)

dst: the destination game_state

src: the source game_state

Tells wether src and dst can be synced. This is not a fool proof function but in most cases it will raise the error, use it to avoid blunders. It just compares dst and src and tries to guess if they correspond to the same logical objects.

Return value: 1 if they are syncable, 0 if not.

— Function: int lw6ker_game_state_sync (lw6ker_game_state_t * dst, lw6ker_game_state_t * src)

dst: the destination game_state

src: the source game_state

Fundamental function, used to carbon copy a game state to another, this is intensively used to keep too tracks of the game state, one most-up-to-date but probably wrong, the one we use to display on the screen, and one slightly outdated (or very outdated if network is slow) but that we're sure of, something 100% bullet proof we can rely on.

Return value: 1 on success, 0 on error

— Function: lw6ker_game_state_t * lw6ker_game_state_dup (lw6ker_game_state_t * game_state, lw6sys_progress_t * progress)

game_state: the game_state to copy

progress: progress indicator

Dups (copy) a game_state object. The newly created object points to the same game_struct but is an independant copy, you can play a whole different game on it. In practice this is often used to create the game_state objects for anticipation in network games.

Return value: newly created object

— Function: u_int32_t lw6ker_game_state_checksum (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Calculates the checksum of a game_state, this can be very usefull to make sure two states are identicall (prevent network errors and/or cheating).

Return value: 32-bit checksum

— Function: void lw6ker_game_state_get_shape (lw6ker_game_state_t * game_state, lw6sys_whd_t * shape)

game_state: the game_state to query

shape: the shape (out param)

Retrieves the shape (w*h*d)of the game_state.

Return value: none.

— Function: int lw6ker_game_state_get_w (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Retrieves the width (shape.w) of the game_state.

Return value: the width.

— Function: int lw6ker_game_state_get_h (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Retrieves the height (shape.h) of the game_state.

Return value: the height.

— Function: int lw6ker_game_state_get_d (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Retrieves the depth (shape.d, AKA number of layers) of the game_state.

Return value: the depth.

— Function: int lw6ker_game_state_register_node (lw6ker_game_state_t * game_state, u_int64_t node_id)

game_state: the game_state to act on

node_id: the id of the node to register

Registers a node in the game, this must be done, else no action will be allowed (such as adding a cursor or moving it). There's a limited number of nodes allowed, and ids must be unique.

Return value: 1 on success, 0 on failure.

— Function: int lw6ker_game_state_unregister_node (lw6ker_game_state_t * game_state, u_int64_t node_id)

game_state: the game_state to act on

node_id: the id of the node to register

Unregisters a node in the game, this must be done when a node leaves the game, it will free ressources and allow others to connect.

Return value: 1 on success, 0 on failure.

— Function: int lw6ker_game_state_node_exists (lw6ker_game_state_t * game_state, u_int64_t node_id)

game_state: the game_state to query

node_id: the node to test

Tells wether a node is present in a game.

Return value: 1 if node is in game, 0 if not

— Function: int lw6ker_game_state_get_node_info (lw6ker_game_state_t * game_state, u_int16_t node_id, u_int32_t * last_command_round)

game_state: game_state to query

node_id: the node to get info about

last_command_round: the last round for which a command was issued (out parameter)

Queries information about a given node, mostly, what was the last round we got a command.

Return value: 1 on success, 0 on error.

— Function: int lw6ker_game_state_add_cursor (lw6ker_game_state_t * game_state, u_int64_t node_id, u_int16_t cursor_id, int team_color)

game_state: the game_state to act upon

node_id: the node issuing the command

cursor_id: the id of the cursor to add

team_color: the color we wish

Adds a cursor in a game. Note that if there's already a cursor with that id, it will fail, and the color is only the color we wish, we might indeed be attributed another color on a successfull call.

Return value: 1 on success, 0 on error.

— Function: int lw6ker_game_state_remove_cursor (lw6ker_game_state_t * game_state, u_int64_t node_id, u_int16_t cursor_id)

game_state: the game_state to act upon

node_id: the node issuing the command

cursor_id: the id of the cursor to remove

Removes a cursor from the game, corresponding teams will be removed if needed.

Return value: 1 on success, 0 on failure.

— Function: int lw6ker_game_state_cursor_exists (lw6ker_game_state_t * game_state, u_int16_t cursor_id)

game_state: the game_state to query

cursor_id: the cursor to test

Tells wether a cursor is present in the game.

Return value: 1 if cursor exists, 0 if not.

— Function: int lw6ker_game_state_get_cursor (lw6ker_game_state_t * game_state, lw6ker_cursor_t * cursor, u_int16_t cursor_id)

game_state: the game_state to query

cursor: the cursor data (out param)

cursor_id: the cursor to query

Return value: 1 on success, 0 on failure.

— Function: void lw6ker_game_state_get_cursor_by_index (lw6ker_game_state_t * game_state, lw6ker_cursor_t * cursor, int i)

game_state: the game state to query

cursor: the cursor (out param)

i: the index

Gets the cursor information, using its index. This is usefull to walk the whole cursor without knowing their ids.

Return value: none.

— Function: int lw6ker_game_state_set_cursor (lw6ker_game_state_t * game_state, lw6ker_cursor_t * cursor)

game_state: the game_state to act upon

cursor: the cursor

Sets a cursor, that is, changes its position, this is pretty much anything we can do about a cursor except adding or removing it, just because of Liquid War very simple rules. The passed pointer may be freed after the call, only the cursor_id, node_id, x, y and fire fields are used, others are ignored. More precisely, the enabled will be ignored, it's not a valid way to add/remove teams.

Return value: 1 on success, 0 on failure

— Function: int lw6ker_game_state_team_exists (lw6ker_game_state_t * game_state, int team_color)

game_state: the game_state to query

team_color: the team color to test

Tells wether a team color is present in the game. Note that this is different from cursor ids.

Return value: 1 if team exists, 0 if not.

— Function: int lw6ker_game_state_get_team_info (lw6ker_game_state_t * game_state, int team_color, int32_t * nb_cursors, int32_t * nb_fighters)

game_state: the game_state to query

team_color: the color to get informations about

nb_cursors: number of cursors with this color (out param)

nb_fighters: number of fighters with this color (out param)

Gets informations about a given color. Indeed, a color can have several cursors, and knowing how many fighters there are with a given color is probably the most important things about a color.

Return value: 1 on success, 0 on failure.

— Function: int lw6ker_game_state_get_nb_teams (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Tells how many teams there are in a game. This is different from the cursors number, there can be more cursors than teams, because a team can have several cursors.

Return value: the number of teams.

— Function: void lw6ker_game_state_do_spread (lw6ker_game_state_t * game_state, u_int32_t team_mask)

game_state: the game_state to act upon

team_mask: a binary mask of which gradients (teams) must be spreaded

Spreads the gradient, that is, calculates the potential of each point on the map, ie the distance to the closest cursor. The binary mask allows gradient to be spread for only some teams, this is usefull in a multithreaded context, as gradients can be calculated separately.

Return value: none

— Function: void lw6ker_game_state_do_move (lw6ker_game_state_t * game_state, u_int32_t team_mask)

game_state: the game_state to act upon

team_mask: a binary mask of which teams must be moved

Moves the fighters, note that you must calculate the gradient from time to time else they go to the wrong places. The team_mask allows the moving of only some given teams, but moving (for instance) even teams then odd teams isn't the same as moving odd teams then even teams. Whereas as far as gradient calculation is concerned, this could have been true, you could have multithreaded that.

Return value: none.

— Function: void lw6ker_game_state_finish_round (lw6ker_game_state_t * game_state)

game_state: the game_state to act upon

Finishes a round, that is, vaccums various stuff, checks if some team has lost, and so on. This is complementary to the spread and move steps, it should be called at each round.

Return value: none.

— Function: void lw6ker_game_state_do_round (lw6ker_game_state_t * game_state)

game_state: the game_state to act upon

This is a fundamental function, it's called at each round, it fires all the complex calculations in the game, the real core algorithm. Every time this function is called, the round is "over" and the game state is ready for the next... round. It's equivalent to calling the spread, move and finish functions.

Return value: none.

— Function: u_int32_t lw6ker_game_state_get_moves (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the number of moves done on this game.

Return value: number of moves.

— Function: u_int32_t lw6ker_game_state_get_spreads (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the number of spreads done on this game.

Return value: number of spreads.

— Function: u_int32_t lw6ker_game_state_get_rounds (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the number of rounds done on this game.

Return value: number of rounds.

— Function: u_int32_t lw6ker_game_state_get_total_rounds (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the number of playable rounds in the game, that is the number of rounds to be played if game goes up to the time limit. This is a fixed number, if game slows down then time is stretched, but the the exact maximum number of rounds is known at game start, and it is the number returned by this function.

Return value: number of rounds in the game

— Function: int lw6ker_game_state_is_over (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Tells wether the game is over or not. The answer depends on time limit, game rules, and of course what happened on the battlefield.

Return value: 1 if over, 0 if not.

— Function: int lw6ker_game_state_did_cursor_win (lw6ker_game_state_t * game_state, u_int16_t cursor_id)

game_state: game_state to query

cursor_id: the cursor to test

Tells wether a cursor was the winner after a game is over.

Return value: 1 if cursor is in winning team, 0 if not.

— Function: int lw6ker_game_state_get_winner (lw6ker_game_state_t * game_state, int excluded_team)

game_state: the game_state to query

excluded_team: a team to exclude

Returns the winner, if you set excluded_team to something else than a valid team number (for instance -1, but 0 is a valid team) then this team will be excluded from search. This is usefull if you want to find out who's the best positionned player while excluding yourself, for instance if you're a bot.

Return value: the winner team number, note that it can be invalid (-1) if there's no winner (for example, there are no teams on the map).

— Function: int lw6ker_game_state_get_looser (lw6ker_game_state_t * game_state, int excluded_team)

game_state: the game_state to query

excluded_team: a team to exclude

Returns the looser, if you set excluded_team to something else than a valid team number (for instance -1, but 0 is a valid team) then this team will be excluded from search. This is usefull if you want to find out who's the worst positionned player while excluding yourself, for instance if you're a bot.

Return value: the looser team number, note that it can be invalid (-1) if there's no looser (for example, there are no teams on the map).

— Function: int32_t lw6ker_game_state_get_nb_active_fighters (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Gets the number of active fighters, this is relatively constant within the game, it does not change when someone looses, but it can vary when a new team arrives or disappears.

Return value: number of fighters.

— Function: int32_t lw6ker_game_state_get_time_elapsed (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the time elapsed, this is not the real time you'd time with an atomic clock, rather the time that would have elapsed if game had been run at its nominal speed. There can be a difference if your computer is too slow, among other things.

Return value: time elapsed, in seconds.

— Function: int32_t lw6ker_game_state_get_time_left (lw6ker_game_state_t * game_state)

game_state: the game_state to query

Returns the time left, this is not the real time you'd time with an atomic clock, rather the time that would theorically be left is game was to be run at its nominal speed. There can be a difference if your computer is too slow, among other things. You shouldn't rely on this to know wether a game is over or not, there's another dedicated function for that.

Return value: time left, in seconds.

— Function: int32_t lw6ker_game_state_get_global_history (lw6ker_game_state_t * game_state, int i, int team_id)

game_state: the game_state to query

i: the index of the history point

team_id: the team to query

Returns the number of fighters at some point in the past (the lower i, the oldest). The history scrolls automatically and erases itself at some point, it's of constant length. This is the global, long term history, reflects the whole game and could be used for an end-game score screen.

Return value: number of fighters at that time.

— Function: int32_t lw6ker_game_state_get_latest_history (lw6ker_game_state_t * game_state, int i, int team_id)

game_state: the game_state to query

i: the index of the history point

team_id: the team to query

Returns the number of fighters at some point in the past (the lower i, the oldest). The history scrolls automatically and erases itself at some point, it's of constant length. This is the latest, short term history, reflects the recent game evolutions and could be used to display an in-game monitor.

Return value: number of fighters at that time.

— Function: int32_t lw6ker_game_state_get_global_history_max (lw6ker_game_state_t * game_state)

game_state: game_state to query

Returns the maximum value, that is, the maximum number of fighters, all teams combined, for this history. This can be used to scale charts. This function for the global long term history.

Return value: max number of fighters.

— Function: int32_t lw6ker_game_state_get_latest_history_max (lw6ker_game_state_t * game_state)

game_state: game_state to query

Returns the maximum value, that is, the maximum number of fighters, all teams combined, for this history. This can be used to scale charts. This function for the latest short term history.

Return value: max number of fighters.

— Function: int32_t lw6ker_game_state_get_fighter_id (lw6ker_game_state_t * game_state, int32_t x, int32_t y, int32_t z)

game_state: game_state to query

x: x position

y: y position

z: z position

Gets the id of a fighter in a given position. Previous versions of the game used to have this declared inline static for speed, but the price to pay in terms of maintainability was too high: too much stuff from the ker module had to be kept public. This functions is very likely to be called often when one wants to know what's happening on the battlefield, to draw it, for instance. If there's no fighter, the id is negative, any id equal or greater than 0 (returned by this function) is valid.

Return value: the id of the fighter at that position.

— Function: lw6ker_fighter_t * lw6ker_game_state_get_fighter_by_id (lw6ker_game_state_t * game_state, int32_t fighter_id)

game_state: game_state to query

fighter_id: the id of the fighter

Gets a fighter by its id. Internally, all fighters are stored in an array so it could be "safe" to get fighter with id 0 then walk the array. Previous versions of the game used to have this public (the array), it has been hidden since.

Return value: pointer to the fighter with the given id.

— Function: lw6ker_fighter_t * lw6ker_game_state_get_fighter_safe (lw6ker_game_state_t * game_state, int32_t x, int32_t y, int32_t z)

game_state: game_state to query

x: x position

y: y position

z: z position

Gets a fighter by its position. This function will check for boundaries, if there's no fighter in this place, it will return NULL, but nothing worse can happen. More precisely, if the place is in a wall, it won't bug, unlike the non-bullet-proof equivalent of this function.

Return value: pointer to the fighter at this position, or NULL if none.

— Function: lw6ker_fighter_t * lw6ker_game_state_get_fighter_unsafe (lw6ker_game_state_t * game_state, int32_t x, int32_t y, int32_t z)

game_state: game_state to query

x: x position

y: y position

z: z position

Gets a fighter by its position. This function will not check for boundaries, if there's no fighter in this place, not only will it probably not return a valid value, but it will also even segfault before that, trying to access non-existing structures in menory. So only call this if you're sure there's a fighter here.

Return value: pointer to the fighter at this position, or NULL if none.

— Function: int lw6ker_game_state_get_zone_potential (lw6ker_game_state_t * game_state, int i, int team_id)

game_state: the game_state to query

team_id: the team id (color)

Gets the potential of a zone. In practice this is not needed to make the game function, you need not call this to know how to move fighters, however the information can be interesting for debugging.

Return value: the potential

— Function: int lw6ker_game_state_get_charge_per1000 (lw6ker_game_state_t * game_state, int team_color)

game_state: game_state to query

team_color: the team color to query

Returns the charge ratio for a given team/color. A value of 100 means fire is enabled, more than 1000 means super-charge, under 100 means you have to wait.

Return value: integer value.

— Function: int lw6ker_game_state_get_weapon_per1000_left (lw6ker_game_state_t * game_state, int team_color)

game_state: game_state to query

team_color: the team color to query

Returns how much of the weapon is yet to be consumed for a given team. More than 1000 means extra time, 1000 is standard time to be elapsed, 0 means it's over.

Return value: integer value.

— Function: int lw6ker_game_state_get_latest_weapon (lw6ker_game_state_t * game_state, int * team_color, int * weapon_id, int * per1000_left)

game_state: game_state to query

team_color: the team color corresponding to last weapon (out param)

weapon_id: the corresponding weapon_id (out param)

per1000_left: how much of the weapon is yet to be spent (out param)

Returns informations about the latest weapon, this is typically for drawing purposes, just query this and you know if you need to paint everything in red, green, whatever, as far as the default backend is concerned. In case there's no weapon, well, parameters are untouched. Pointers can be passed as NULL.

Return value: 1 if found, 0 if not.

— Function: lw6ker_game_struct_t * lw6ker_game_struct_new (lw6map_level_t * level, lw6sys_progress_t * progress)

level: the level on which the game_struct is based

progress: progress indicator

Creates a new game_struct from a level. The game_struct is different from the level in the sense that the game_struct does contain algorithmic specific optimizations, it's a ready-to-use struct desgined for execution speed, while the plain level just stores information.

Return value: newly allocated object

— Function: void lw6ker_game_struct_free (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to free

Frees a game_struct object, releasing all required stuff. The source level must still be available when freeing this.

Return value: none

— Function: void lw6ker_game_struct_point_to (lw6ker_game_struct_t * game_struct, lw6map_level_t * level)

game_struct: the game_struct to modify

level: the level to point to

This can be used when one makes a copy (dup) of a level and for some reason want the game_struct to point on this new copy. Of course you should make the game_struct point to a level that is identical to the one that was used to construct the object in the first place. Use at your own risk.

Return value: none

— Function: int lw6ker_game_struct_memory_footprint (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to query

Returns the approximative amount of memory taken by the object.

Return value: number of bytes (approximation)

— Function: char * lw6ker_game_struct_repr (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to query

Gives a readable representation of the object.

Return value: newly allocated string, must be freed

— Function: lw6ker_game_struct_t * lw6ker_game_struct_dup (lw6ker_game_struct_t * game_struct, lw6sys_progress_t * progress)

game_struct: the game_struct to copy

progress: progress indicator

Dups (copy) a game_struct object. The newly created object points to the same game_struct but is an independant copy, you can play a whole different game on it. In practice this is often used to create the game_struct objects for anticipation in network games.

Return value: newly created object

— Function: u_int32_t lw6ker_game_struct_checksum (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to query

Calculates the checksum of a game_struct, this can be very usefull to make sure two structs are identicall (prevent network errors and/or cheating).

Return value: 32-bit checksum

— Function: void lw6ker_game_struct_get_shape (lw6ker_game_struct_t * game_struct, lw6sys_whd_t * shape)

game_struct: the game_struct to query

shape: the shape (out param)

Retrieves the shape (w*h*d)of the game_struct.

Return value: none.

— Function: int lw6ker_game_struct_get_w (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to query

Retrieves the width (shape.w) of the game_struct.

Return value: the width.

— Function: int lw6ker_game_struct_get_h (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to query

Retrieves the height (shape.h) of the game_struct.

Return value: the height.

— Function: int lw6ker_game_struct_get_d (lw6ker_game_struct_t * game_struct)

game_struct: the game_struct to query

Retrieves the depth (shape.d, AKA number of layers) of the game_struct.

Return value: the depth.

— Function: int lw6ker_game_struct_is_fg (lw6ker_game_struct_t * game_struct, int32_t x, int32_t y, int32_t z)

game_struct: the game_struct to query

x: x position

y: y position

z: z position

Tests wether a given position is foreground, that is, occupied by a wall.

Return value: 1 if foreground (wall, fighters can't move), 0 if not

— Function: int lw6ker_game_struct_is_bg (lw6ker_game_struct_t * game_struct, int32_t x, int32_t y, int32_t z)

game_struct: the game_struct to query

x: x position

y: y position

z: z position

Tests wether a given position is background, that is, there's no wall.

Return value: 1 if background (wall, fighters can move), 0 if not

— Function: void lw6ker_game_struct_get_zones_info (lw6ker_game_struct_t * game_struct, int * nb_zones, int * max_zone_size)

game_struct: game_struct to query

nb_zones: the maximum zone size (out param, can be NULL)

max_zone_size: the maximum zone size (out param, can be NULL)

This function gets information about the internal zoning system, can be used for debugging.

Return value: none.

— Function: void lw6ker_game_struct_get_zone_info (lw6ker_game_struct_t * game_struct, int i, lw6sys_xyz_t * zone_pos, int * zone_size)

game_struct: game_struct to query

i: index of the zone to query

zone_pos: coord of the zone, top-left corner (out param, can be NULL)

zone_size: size of the zone (out param, can be NULL)

This function gets information about the internal zoning system, can be used for debugging.

Return value: none

— Function: int32_t lw6ker_game_struct_get_zone_id (lw6ker_game_struct_t * game_struct, int32_t x, int32_t y, int32_t z)

game_struct: the game_struct to query

x: x pos

y: y pos

z: z pos

Gets the zone id for a given position. The id returned can then be used to query for a potential, for instance.

Return value: the zone id

— Function: void lw6ker_game_struct_find_free_slot_near (lw6ker_game_struct_t * game_struct, lw6sys_xyz_t * there, lw6sys_xyz_t here)

game_struct: the game_struct to query

there: the closest free slot (out param)

here: where we'd like to be

Tries to find the closest free slot (there) near a given position (here). This is typically used internally to find out where to apply the cursor when it's flying over walls.

Return value: none

— Function: int lw6ker_move_get_best_next_pos (lw6ker_game_state_t * game_state, lw6sys_xyz_t * next_pos, lw6sys_xyz_t * current_pos, int team_color)

game_state: the game_state to work on

next_pos: the next position (out param)

current_pos: the current position

team_color: the team color

Tries to find the best move given a position and a team. Note that this function does not check for the presence of another fighter, it will only check walls and can even (sometimes) fail when there's a path. The reason is that it uses the game_state at a given round and does not recalculate gradient while a real fighter has an ever-changing gradient. Whatsoever, this can be used to move cursors like they were fighters, it's not perfect but gives a good illusion.

Return value: 1 if best place found, 0 if not.

— Function: int lw6ker_score_array_update (lw6ker_score_array_t * score_array, lw6ker_game_state_t * game_state)

score_array: the score array to modify

game_state: the game_state to get the information from

Updates a score array, that is, calculates all scores, so that they can be displayed, for instance.

Return value: 1 on success, 0 on failure.

— Function: void lw6ker_team_mask_get (u_int32_t * even, u_int32_t * odd, int32_t round)

even: even team mask (out param)

odd: odd team mask (out param)

round: round concerned

Returns a default team mask for a given round, even and odd will contain ready to use masks (for spread and move functions for instance).

Return value: none.

— Function: void lw6ker_team_mask_best (u_int32_t * even, u_int32_t * odd, lw6ker_game_state_t * game_state)

even: even team mask (out param)

odd: odd team mask (out param)

game_state: the game_state concerned

Returns an optimal team mask for a given round, even and odd will contain ready to use masks (for spread and move functions for instance). The difference with the default team mask is that this one will test for which teams are present and try and manage to find an equilibrated set of odd/even teams.

Return value: none.

— Function: int lw6ker_team_mask_is_concerned (int team_color, u_int32_t team_mask)

team_color: color index

team_mask: team mask

Tells wether a given team is concerned by a team mask.

Return value: 1 if concerned, 0 if not.

— Function: int lw6ker_team_mask_color2mask (int team_color)

team_color: color index

Gives the mask corresponding to a given color.

Return value: bitwise mask.

— Function: int lw6ker_test (int mode)

mode: 0 for check only, 1 for full test

Runs the ker module test suite. Will perform deep checksums and *really* check many things. If this passes, the algorithm is fine. What could make it fail is a serious bug and/or some weird combination of endianess, byte alignment...

Return value: 1 if test is successfull, 0 on error.


Next: , Previous: libker, Up: C API

5.25 libldr

5.25.1 Overview

View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/ldr/index.html.

5.25.2 API

— Function: int lw6ldr_body_read (lw6map_body_t * body, char * dirname, lw6map_param_t * param, lw6ldr_hints_t * hints, int display_w, int display_h, float ratio, int bench_value, int magic_number, lw6sys_progress_t * progress)

body: the body to read, must point to allocated memory

dirname: the directory of the map

param: map parameters

hints: map hints

display_w: the display width

display_h: the display height

ratio: wished map ratio

bench_value: the bench value (depends on computer capacity)

magic_number: arbitrary constant

progress: structure to transmit loading progress

Reads the map body, that is, all the layers.

Return value: 1 if OK, 0 if failed.

— Function: void lw6ldr_auto_colors (lw6map_style_t * style, lw6ldr_hints_t * hints)

style: the style structure to process.

hints: additionnal hints to know what to set automatically

Deduces all colors from background color, if needed. The function will check color_auto parameters and replace all other colors by base and alternate colors if needed. Note that the background color itself is not changed by this function. Background can only be guessed from texture.

Return value: none.

— Function: int lw6ldr_cursor_texture_read (lw6map_cursor_texture_t * cursor_texture, char * dirname)

cursor_texture: the cursor texture (out param)

dirname: the directory we load the data form (map dir)

Reads the cursor texture information, if not available, will use defaults

Return value: 1 on success, 0 on failure.

— Function: void lw6ldr_free_entry (lw6ldr_entry_t * entry)