Free Hero Mesh

Update of "SQL functions"
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview

Artifact ID: 9af6e2de679ae015b11794a289ef8532078f130b
Page Name:SQL functions
Date: 2018-04-28 04:42:25
Original User: zzo38
Parent: deea8cdfe17bc0d3f0309ed539f1a728fbbcabb7 (diff)
Next 7d04819a48b4d3e3fdac399695fbb9517bb1bd24
Content

This document is a list of the available SQL functions that you can use in the customization of Free Hero Mesh. In addition to the ones listed here, you can also use the core functions, date/time functions, and aggregate functions, of SQLite. See also: SQL tables.

(Note: This is only a draft and is likely to change in future.)

Asterisks in the headings indicate aggregate functions.

BASENAME()

Returns the base name, which is a copy of the first command-line argument (other than switches).

KEYSTATE(key)

Given a string with a key name (the same key names used in keybindings), return 1 if the key is pushed or 0 if it is not pushed.

LEVEL()

Returns the one-based order number of the current level.

LEVEL_ID()

Returns the ID number of the current level.

MODSTATE()

Get the current keyboard modifiers state. It is the sum of the following:

MOVENUMBER()

Tells you how many moves have been played so far since it has been reset.

SIGN_EXTEND(num)

Sign-extend a 32-bit integer to 64-bits. The 32-bit user variables in Free Hero Mesh might or might not be signed, so when accessing them in SQL (which uses 64-bit numbers) you must use this if you want to treat it as a signed number.

SOLUTION_REPLAY()

Returns 1 if replaying the solution or 0 for the normal game.