PLEASE SEND BUG REPORTS ASAP!
Changes since beta-1.2.14:
- default party can be customized (create a save game, rename it as default_party.dat and copy it to mod_assets folder)
- added support for custom spells (see below)
- added new scripting functions: ProjectileSpell:setAttackPower(), BurstSpell:setAttackPower(), Item:setFuel() and Item:getFuel()
- new global function shootProjectile() for shooting projectile items
- added onRangedAttack hook for monsters which can be used to implement custom ranged attacks
- when a script function is triggered it receives the sender of the message as first argument, e.g.
when a button triggers function 'foo' in a script entity, the function receives the button object as its first argument
Example usage of new features:
Code: Select all
-- Create Food spell
defineSpell{
name = "create_food",
uiName = "Create Food",
skill = "spellcraft",
level = 2,
runes = "B",
manaCost = 10,
onCast = function(caster, x, y, direction, skill)
hudPrint("Abracadabra!")
spawn("rat_shank", party.level, x, y, direction)
end,
}
-- A wand that uses the Create Food spell
cloneObject{
name = "wand_food",
uiName = "Wand of Create Food",
baseObject = "lightning_rod",
spell = "create_food",
}
-- A Wyvern that shoots daggers!
cloneObject{
name = "dagger_wyvern",
baseObject = "wyvern",
onRangedAttack = function(self)
hudPrint("BRRAAGH!")
local speed = 10
local gravity = 2
local velocityUp = 0
local offsetX,offsetY,offsetZ = 0,0,0
local attackPower = 20
shootProjectile("throwing_knife", self.level, self.x, self.y, self.facing, speed, gravity, velocityUp, offsetX, offsetY, offsetZ, attackPower, self, false)
-- cancel default ranged attack by returning false
return false
end,
}
-- Create two buttons and connect them to the same function
spawn("wall_button", 1, 0, 0, "button1"):addConnector("toggle", "script1", "buttonPress")
spawn("wall_button", 1, 1, 0, "button2"):addConnector("toggle", "script1", "buttonPress")
-- This function is called when one of the buttons is pressed
function buttonPress(sender)
if sender.id == "button1" then
print("The first button was pressed.")
elseif sender.id == "button2" then
print("The second button was pressed.")
else
print(sender.id.." was pressed.")
end
end
- clicking "resume" from the pause menu throws away the item on the mouse cursor
- if you give setMouseItem() an item that's placed already somewhere on the level, and then player tries to place that item on the ground, the game crashes "item is already placed".
- cloned Orb of Radiance does not glow
- cloned Uggardian does not have the flame effect
- cloned cube crashes the editor
- setMouseItem(spawn("dagger")) and variants do not work from console (scripts work ok)
- tables can't be used as table keys in scripts (causes save game serialization error)
- objects that are not anchored to level or party are garbage collected (to workaround this, the spawned item should be added to a level, mouse item or inventory slot)
The update also fixes the following issues in the main game (the original Legend of Grimrock dungeon):
- added check for unnamed prisoners in character generation
- bug fix: mouse look does not work when standing in front of a wall tapestry
- bug fix: when importing a custom portrait, the original portrait becomes "locked" and can't be chosen for other characters
- bug fix: on screen exp indicator displays an incorrect amount of exp when killing an advanced monster with level greater than 1
- bug fix: no exp is gained if a monster is killed by Dismantler's lightning effect or Icefall Hammer's frost burst effect
- bug fix: when the cube crushes a monster, monster's death effect is played multiple times if the cube moves back and forth
- bug fix: game refuses to start if the documents folder is mapped to a network location
- bug fix: "Level up!" text above attack frames does not scale with resolution
- bug fix: tooltips are buggy in 2560x1600 resolution
- bug fix: exp is awarded to wrong characters if party marching order is changed before damage is dealt (e.g. cast fireball, reorder champions before fireball kills a monster)