Page 1 of 1

No elementals in Derth - SVN 1888

Posted: Sat Nov 13, 2010 3:11 am
by Rakshasa
When I come to Derth after leveling in Old Forest I got the "Storming the City" quest, but no elementals could be found. Looks like I'll not get my rod of recall...

Re: No elementals in Derth - SVN 1888

Posted: Sat Nov 13, 2010 2:02 pm
by Rakshasa
Today, svn 1893, when I came to Derth the first time with a new char, the elementals were there, but I leave the town without killing them all and when came back they were gone. My quest window still shows that quest as active, but I have no means to complete it now.

Re: No elementals in Derth - SVN 1888

Posted: Sun Nov 14, 2010 12:44 am
by Shoob
Would this fix it? (put it in bree's zone.lua)?

Code: Select all

post_process = function(level)
	for uid, e in pairs(level.entities) do
		if e.name == "gwelgoroth" then e.unique=true end
	end
end,
or would it be better to change this (in lightning-overload):

Code: Select all

reenter_bree = function(self)
	if (self:isCompleted() or self:isEnded()) and not self:isCompleted("restored-bree") then
		game.level.map:setShown(1, 1, 1, 1)
		game.level.map:setObscure(1*0.6, 1*0.6, 1*0.6, 1)
		game.level.data.background = nil

		game.player:setQuestStatus(self.id, engine.Quest.COMPLETED, "restored-bree")
		require("engine.ui.Dialog"):simpleLongPopup("Clear sky", "It seems the mages have kept their word.\nBree is free of the storm could.", 400)
	else
		-- Populate with nice air elementals
		self.max_count = 0
		for i = 1, 12 do
			local m = game.zone:makeEntity(game.level, "actor", {special_rarity="bree_rarity"}, nil, true)
			if m then
				local x, y = rng.range(10, game.level.map.w - 11), rng.range(10, game.level.map.h - 11)
				local tries = 0
				while not m:canMove(x, y) and tries < 100 do
					x, y = rng.range(10, game.level.map.w - 11), rng.range(10, game.level.map.h - 11)
					tries = tries + 1
				end
				if tries < 100 then
					m.on_die = function(self)
						game.player:hasQuest("lightning-overload"):kill_one()
					end
					game.zone:addEntity(game.level, m, "actor", x, y)
					self.max_count = self.max_count + 1
				end
			end
		end
		self.kill_count = 0
	end
end
the first way means they do not get replenished, the second way means that they will always rejuvenate when you enter (making it harder?). Or you could do both. :)

Re: No elementals in Derth - SVN 1888

Posted: Sun Nov 14, 2010 9:38 am
by Rakshasa
I lost my last char to the Great Mummy, so I'll try the first proposed solution.

Re: No elementals in Derth - SVN 1888

Posted: Sun Nov 14, 2010 12:24 pm
by Rakshasa
The fist solution didn't work.

I got the quest killed some elementals, got out of the town, walked around to wast some time and came back. Now the town is just filled with halflings and humans as usual.

I don't know if I implemented correctly, putting that code inside the return block, before the on_enter function.