Ingrediences

Any discussions regarding the spoilers present in ToME 4.x.x should be restricted to this forum

Moderator: Moderator

Message
Author
Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: Ingrediences

#16 Post by Grey »

You'd have to scum a lot to get the right monster eventually. It's a poor solution to the problem.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Nyx
Wayist
Posts: 15
Joined: Sat Feb 12, 2011 7:54 pm

Re: Ingrediences

#17 Post by Nyx »

Wyrms should probably be less frequent inclusions on the list given how decently rare they are in the game. You dont' find wyrms very often, yet it seems like at least 1-3 of your starting 4 quests will need a wyrm part. And one of mine needs a multi-hued wyrm part... i think i've only seen one of those *once* in all my TOME play.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Ingrediences

#18 Post by darkgod »

And be glad you did ! :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Miruko
Halfling
Posts: 92
Joined: Sun May 15, 2011 11:58 am

Re: Ingrediences

#19 Post by Miruko »

i wonder if is possible to make the monsters drop always the ingredients, no matter if you have the quest or not...

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Ingrediences

#20 Post by darkgod »

It would be such a huge flood of items :/
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Miruko
Halfling
Posts: 92
Joined: Sun May 15, 2011 11:58 am

Re: Ingrediences

#21 Post by Miruko »

well, now if i found an ingredient it will stop appearing, so one per monster is enough, they spawn just once...

Dervis
Wyrmic
Posts: 263
Joined: Thu Oct 14, 2010 9:58 am

Re: Ingrediences

#22 Post by Dervis »

Couldn't we just make sure the specific monster we're hunting would be there...
The idea is adding a little bit of code to make sure to create a monster on an acessible area.

Using some of the code of the backup guardians.

class/Game.lua 528

Code: Select all

 -- Check if we need to add an alchemist quest monster
	self.state:zoneCheckAlchemistMonster()
class/Gamestate.lua

Code: Select all

	self.allow_alchemist_monsters = {}

Code: Select all

--- Setup an alchemist monster for the given zone
function _M:activateAlchemistMonster(monster, on_level)
	print("Setting up Alchemist monster", monster)
	self.allow_alchemist_monsters[game.zone.short_name] =
	{
		name = game.zone.name,
		monster = monster,
		on_level = on_level,
	}
end

Code: Select all

--- Activate a monster for Alchemist quest
function _M:zoneCheckAlchemistMonster()
	-- Spawn the new monster
	if self.allow_alchemist_monsters[game.zone.short_name] and self.allow_alchemist_monsters[game.zone.short_name].on_level == game.level.level then
		local data = self.allow_alchemist_monsters[game.zone.short_name]

		-- Place the monster, we do not check for connectivity, vault or whatever, the player is supposed to be strong enough to get there
		local m = game.zone:makeEntityByName(game.level, "actor", data.monster)
		if m then
			local x, y = rng.range(0, game.level.map.w - 1), rng.range(0, game.level.map.h - 1)
			local tries = 0
			while not m:canMove(x, y) and tries < 100 do
				x, y = rng.range(0, game.level.map.w - 1), rng.range(0, game.level.map.h - 1)
				tries = tries + 1
			end
			if tries < 100 then
				game.zone:addEntity(game.level, m, "actor", x, y)
				print("monster allocated: ", data.monster, m.uid, m.name)
			end
		else
			print("WARNING: Monster not found: ", data.monster)
		end

		if data.action then data.action(true) end
		self.allow_alchemist_monsters[game.zone.short_name] = nil
	end
end
Still missing the quest code.... trying to figure it out.
And I think this one will a zone descriptor too, I'll get on it later.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Ingrediences

#23 Post by darkgod »

Hum yes it's indeed possible.

I just commited something else though, the adventurer's parties that wander the map now have a chance to drop an ingredient you need, which makes sense since they have been around killing stuff too
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply