Page 1 of 1

[1.7.6] No water purification in Valley of the Moon

Posted: Wed Jul 19, 2023 11:41 pm
by Zizzo
[sound F/X: source diving] Aha! I knew I wasn't imagining it. The first time I completed the Valley of the Moon quest (lo these many years ago…), I remember that all the poisoned water in the Valley was purified as soon as Limmir finished his ritual. Nowadays, though, that doesn't happen. It looks like the code is still trying to do so (cf. ritual_end() in the Lost Knowledge quest):

Code: Select all

	-- Update water
	local water = game.zone:makeEntityByName(game.level, "terrain", "DEEP_WATER")
	for x = 0, game.level.map.w - 1 do for y = 0, game.level.map.h - 1 do
		local g = game.level.map(x, y, engine.Map.TERRAIN)
		if g and g.define_as == "POISON_DEEP_WATER" then
			game.level.map(x, y, engine.Map.TERRAIN, water)
		end
	end end
No idea offhand why it isn't working.

Re: [1.7.6] No water purification in Valley of the Moon

Posted: Sat Feb 24, 2024 3:38 pm
by Zizzo
Zizzo wrote: Wed Jul 19, 2023 11:41 pm No idea offhand why it isn't working.
[sound F/X: testing] Found it: turns out the poison water tiles we need to change aren't internally named POISON_DEEP_WATER, as the above code is expecting, but POISON_DEEP_WATER1 thru POISON_DEEP_WATER6 — apparently a side effect of the game's fancy tile handling. For now, I've whipped up an addon that papers over the bug.