Page 1 of 5

Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 8:58 am
by petri
Release candidate 1 (version 1.3.0) out! This will be the final released version unless critical bugs are found.

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
Known Issues (these won't be fixed by release):
- 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)

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 9:18 am
by Blichew
one MEGA_YAY for new scripting functions and custom spells :)

one question about shootProjectile("throwing_knife", self.level, self.x, self.y, self.facing, speed, gravity, velocityUp, offsetX, offsetY, offsetZ, attackPower, self, false):

does it mean projectile will be shot from monster's position starting from a (offsetX, offsetY, offsetZ) coordinates (i.e. from their legs, w/e) and might go up or down by velocityUp (positive = up / negative = down ? what's the range for that ?) - or am I reading it wrong ?

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 9:28 am
by petri
I just added shootProjectile() to scripting reference..

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 9:40 am
by Blichew
petri wrote:I just added shootProjectile() to scripting reference..
Thank you ! Now it's completely clear :)

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 9:55 am
by Isaac
It would seem that object IDs can be renamed blank, and it shows up in the 'multi-item' context menu as blank; ie. nothing.
It would also appear that items with "blank" IDs don't always appear in the menu after they are renamed.
Image

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 10:08 am
by Trap
I can't seem to cast magic at all in the main Grimrock dungeon or in custom dungeons. Default Characters / New Saves / Old Saves. Every spell Fizzles..

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 10:09 am
by petri
Trap wrote:I can't seem to cast magic at all in the main Grimrock dungeon or in custom dungeons.
What do you mean exactly? Any error message?

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 10:10 am
by Trap
Fizzle every time ;p

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 10:12 am
by petri
Trap wrote:Fizzle every time ;p
That's strange. Does this happen if you start a new game with default chars and cast Fireburst with Sancsaron?

Re: Release Candidate 1 (version 1.3.0) is out!

Posted: Wed Oct 03, 2012 10:14 am
by Trap
Yeah it fizzles too, just checked that.