Red "2" on items on the ground

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Post Reply
Message
Author
greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Red "2" on items on the ground

#1 Post by greycat »

What does the red "2" mean on items that I find on the ground? At first I thought it was a quantity indicator, as in "this is really 2 gems", but upon walking over to the item and picking it up, it was just 1 gem. I get the "2" on items dropped by monsters, and occasionally on items generated on the level, but not on items that I drop, even if they're still unidentified... so apparently it doesn't mean "unidentified" either.

Edit: oh, there are "3"s too!

Image

As it turns out, this was a stack of TWO items (a gem and a scroll). Maybe this is intended to be a "number of items in the pile" indicator, and it has an off-by-one bug?

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

Re: Red "2" on items on the ground

#2 Post by darkgod »

Ther eprobably was gold inside which got autopickedup
[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 ;)

escargot
Thalore
Posts: 128
Joined: Thu Oct 14, 2010 2:55 pm

Re: Red "2" on items on the ground

#3 Post by escargot »

Yeh, I noticed too and it was actually gold, if you check the log you'll see the autopicking.
I like the method to show a stack, but I also loved from T2 how after killing a boss or a dragon you'd get tons of items dropped in a 2 tiles radius. Looked magnificent :D

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: Red "2" on items on the ground

#4 Post by Shoob »

That probably wouldnt be that hard to incorporate in t4, it may need the check free grid modified, but only slightly.
Oliphant am I, and I never lie.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Red "2" on items on the ground

#5 Post by yufra »

If you want to give this a try, open tome/class/Actor.lua and scroll down to the "_M:die" function. Find this line (around line 750 in my copy)...

Code: Select all

						game.level.map:addObject(self.x, self.y, o)
... and replace it with these lines:

Code: Select all

						local drop_x, drop_y = util.findFreeGrid(self.x, self.y, 5, false, {[engine.Map.OBJECT]=true})
						game.level.map:addObject(drop_x, drop_y, o)
<DarkGod> lets say it's intended

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: Red "2" on items on the ground

#6 Post by Shoob »

the main problem is that some objects may not be placed with that code, especially with bosses. which is why it would need to be tweaked some.
Oliphant am I, and I never lie.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Red "2" on items on the ground

#7 Post by yufra »

Shoob, the resolvers.drops that bosses use just adds the items to the inventory so the above code will correctly drop those items as well (haven't tested it, but the code definitely suggests that).
<DarkGod> lets say it's intended

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

Re: Red "2" on items on the ground

#8 Post by darkgod »

Not if there are too many objects around :)
[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 ;)

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Red "2" on items on the ground

#9 Post by yufra »

Mmm, good point.

How about:

Code: Select all

                  local drop_x, drop_y = util.findFreeGrid(self.x, self.y, 5, false, {[engine.Map.OBJECT]=true})
                  drop_x = drop_x or self.x
                  drop_y = drop_y or self.y
                  game.level.map:addObject(drop_x, drop_y, o)
<DarkGod> lets say it's intended

Post Reply