I finished the game yesterday and decided to take a look at the next big adventure: the level editor.

Seeing how scripting is my best skill (my graphics skill is abysmal...), I looked for a list of Lua functions. The one in the modding guide is quite incomplete, so I searched the forum and the example moods and came up with the list below. Now, there are a lot of unclear spots in there: parameters with unclear meaning, or optional parameters I haven't seen, as well as unknown enumeration values. I hope someone (Alec?) can fill those in over time.
Note: The format is for an API file for SciTE, my favorite text editor.
animationKey(me, key)
avatar_fallOffWall()
avatar_isBursting()
avatar_isOnWall()
avatar_isRolling()
avatar_isShieldActive()
avatar_setBlockSinging(bool)
bone_alpha(bone, alpha) Set bone alpha level (opacity).
bone_getWorldPosition(bone)
bone_scale(eye, x?, y?, time?)
bone_setColor(shell, r, g, b, t)
bone_setSegs(bone, ...?)
cam_toEntity(ent) Make the camera follow ent.
castSong(index) Callback in songs.lua.
chance(?)
changeForm(form) Form can be FORM_NORMAL, ...
clearControlHint()
clearShots()
createEntity(name, str?, x, y) Returns entity ID.
createShot(name, ent, entTarget, x, y) Returns shot ID.
damage(me, attacker, bone, dmgType, dmgAmount)
debugLog(text) Output text to the console. Press ~ (tilde) to open the console.
dofile(filename) Filename is relative to the application/mod root directory.
emote(type) Type can be EMOTE_NAIJASIGH, EMOTE_NAIJAUGH, EMOTE_NAIJAWOW, ...
enterState(me, state) called after a state is entered
entity_alpha(ent, alpha) Set entities alpha level (opacity).
entity_animate(me, strAnimName, loops)
entity_addTargetPoint(ent, x, y)
entity_addVel(ent, vx, vy)
entity_clearTargetPoints(ent)
entity_clearVel(ent)
entity_color(ent, r, g, b[, time, loops, pingpong, ease])
entity_damage(ent, entAttacker, dmgAmount)
entity_disableMotionBlur(ent) See also entity_disableMotionBlut().
entity_doCollisionAvoidance(me, range)
entity_doGlint(ent, glintName, blend) glintName can be "glint". blend can be BLEND_ADD.
entity_doEntityAvoidance(me, range)
entity_doSpellAvoidance(me, range)
entity_enableMotionBlur(ent)
entity_generateCollisionMask(ent)
entity_getAnimationName(ent)
entity_getBoneByName(ent, boneName)
entity_getHealth(ent)
entity_getPosition(ent) Return two values, the x any y coordinates of entity.
entity_getRotation(ent)
entity_getScale(ent)
entity_getState(ent)
entity_getVectorToEntity(ent, entOthe)
entity_handleShotCollisions(ent)
entity_handleShotCollisionsSkeletal(ent)
entity_idle(ent)
entity_findTarget(me, range)
entity_flipToSame(ent, entToMimic)
entity_hasTarget(ent)
entity_heal(ent, amount)
entity_initSkeletal(ent, strFile)
entity_isEntityInRange(ent, entOther, range)
entity_isTargetInRange(ent, range)
entity_isState(ent, state)
entity_moveTowardsTarget(me, range)
entity_offset(ent, x, y[, time?, loop, ?])
entity_push(ent, x, y, ?)
entity_rotate(ent, angle, time, loop)
entity_rotateToVec(ent, vx, vy, time, angle_offset)
entity_rotateToVel(ent, time, angle_offset)
entity_scale(ent, x, y[, time, loops, pingpong, ease])
entity_setBounceType(ent, type) Type can be BOUNCE_REAL, ...
entity_setDamageTarget(ent, type, bool) Type can be DT_AVATAR_SHOCK, ...
entity_setDeathParticleEffect(ent, particleEffectName)
entity_setDeathScene(ent, bool)
entity_setDropChance(ent, ?, ?)
entity_setEntityType(ent, type) Type can be ET_ENEMY, ET_NEUTRAL, ...
entity_setInvincible(ent, bool)
entity_setMaxSpeed(ent, speed)
entity_setPosition(ent, x, y[, time, loops, pingpong, ease])
entity_setSegs(me, 2, 8, 0.3, 0.1, -0.018, 0, 6, 0)
entity_setState(ent, state[, delay?])
entity_setStateTime(ent, time)
entity_setTarget(ent, entTarget)
entity_setTargetPriority(ent, ?)
entity_setTargetRange(ent, range)
entity_sound(ent, soundName, frequency, fadeOut)
entity_stopInterpolating(ent)
entity_swimToNode(ent, node)
entity_touchAvatarDamage(ent, collideRradius, dmgAmount, speed, pustime, collideX, collideY)
entity_updateMovement(ent, dt) Updates the position/velocity based on movement of the entity. If this function is not called, the entity will not move (unless it is being told to move along a surface).
entity_updateCurrents(ent, dt) Takes into account currents. If this function is not called, the entity will ignore the currents.
entity_watchForPath(ent)
entity_x(ent)
entity_y(ent)
exitState(me, state) called before a state is left
fade(out, time[, r, g, b])
fadeOut(time)
fadeOutMusic(time)
getFirstEntity() Starts entity enumeration. See also getNextEntity().
getForm() Get Naija's current form.
getLastCollidePosition()
getNaija()
getNextEntity() Continues entity enmeration.
getNodeByName(name)
getStringFlag(name) See also setStringGFlag().
getWallNormal(px, py)
hitSurface(me) called when entity bumps into a wall
init(me) called when the entity is first being created
isLeftMouse()
isRightMouse()
learnSong(song)
loadMap(name)
loadSound(name)
msg(me, string, number) receives a message from another source (see entity_msg()). sometimes used by entities as a way to communicate.
musicVolume(volume, time)
node_getName(node)
node_getNearestEntity(node, name)
node_getNumEntitiesIn(node, name)
node_isEntityIn(node, ent)
node_setCursorActivation(node, bool)
node_x(node)
node_y(node)
overrideZoom(zoom[, time]) Set zoom to 0 to remove the override.
pickupGem(name)
playMusic(soundName, frequency)
playSfx(soundName, frequency)
postInit(me) called after all the entities have been created (including Naija)
savePoint(ent) Opens save game dialog.
setControlHint(text, leftButton, rightButton, middleButton, time)
setStringFlag(name, value) See also getStringGFlag().
setupEntity(me) call this in init()
setupBasicEntity(ent, texture, health, manaBallAmount, exp, money, collideRadius, initState, spriteWidth, spriteHeight, particleExplosionType, flagHitOtherEntities, updateCull)
shakeCamera(strength?, time?)
shiftWorlds(ent, old, new) Callback.
shot_setAimVector(shot, vx, vy)
spawnIngredient(name, x, y)
spawnManaBall(x, y, manaAmount)
spawnParticleEffect(name, n, y)
song(me, song)
songNote(me, note)
songNoteDone(me, note, time)
update(me, dt) main update function
updateMusic()
vector_setLength(x, y, length) Returns x and y of scaled vector.
wait(time)
wakeUp(ent) Callback.
watch(time)
By the way, the guert_mod is partially broken: learning the songs does not work.