Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old September 12, 2016, 09:35   #1
mrfy
Adept
 
Join Date: Jul 2015
Location: Seattle, WA
Posts: 142
mrfy is on a distinguished road
maximum treasure amount?

I've seen this twice now in my several years of Angband dungeoning: "You have found 32767 gold pieces worth of adamantite."

I'm assuming that 32767 is the maximum amount of treasure you can find at a time? That would make sense if the value is represented by a 16 bit integer.

What are the odds of finding this amount of treasure?
mrfy is offline   Reply With Quote
Old September 12, 2016, 13:30   #2
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,672
PowerWyrm is on a distinguished road
Quote:
Originally Posted by mrfy View Post
I've seen this twice now in my several years of Angband dungeoning: "You have found 32767 gold pieces worth of adamantite."

I'm assuming that 32767 is the maximum amount of treasure you can find at a time? That would make sense if the value is represented by a 16 bit integer.

What are the odds of finding this amount of treasure?
Probably not that low if you find a hydra pit and kill them all in the same corner.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old September 14, 2016, 22:08   #3
hein
Rookie
 
Join Date: Jul 2015
Posts: 14
hein is on a distinguished road
Quote:
Originally Posted by PowerWyrm View Post
Probably not that low if you find a hydra pit and kill them all in the same corner.
Ive seen this two times too - Im pretty sure one of them was a drop from a baby dragon, and the other one just some random treasure on the floor - I think this might be an odd bug(?)
hein is offline   Reply With Quote
Old September 14, 2016, 23:04   #4
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by hein View Post
Ive seen this two times too - Im pretty sure one of them was a drop from a baby dragon, and the other one just some random treasure on the floor - I think this might be an odd bug(?)
It's intentional! In obj-make.c, make_gold():

Code:
    /* Cap gold at max short (or alternatively make pvals s32b) */
    if (value > SHRT_MAX)
        value = SHRT_MAX;
This is because the value stored in the savefile is a 16 bit value and is unchanged probably since Moria... it could safely be changed, I think.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old September 15, 2016, 00:34   #5
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,941
Derakon is on a distinguished road
Quote:
Originally Posted by takkaria View Post
It's intentional!
It's intentional to cap max drop size at 32767, but is it intentional to generate piles that size? Without being in a situation like a hydra pit where multiple piles get combined, that is.

I'm pretty sure gold drops can get "supercharged" potentially without limit, allowing unusually large gold drops from ordinary enemies, but unless the supercharging is really strongly exponential, you'd expect to see drop sizes in the 5k+, 10k+, and 20k+ range. Which you don't, really -- you just see normal-sized gold drops, and the exceptionally rare 32767 drop. I've seen exactly one of those, that I can recall, though I don't remember the context.
Derakon is offline   Reply With Quote
Old September 15, 2016, 13:06   #6
Carnivean
Knight
 
Join Date: Sep 2013
Posts: 526
Carnivean is on a distinguished road
I suspect that the adamantite multiplier boosts it to that level. I've gotten it a few times, and I'd be fairly sure it's adamantite each time.
Carnivean is offline   Reply With Quote
Old September 15, 2016, 13:13   #7
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Derakon View Post
It's intentional to cap max drop size at 32767, but is it intentional to generate piles that size? Without being in a situation like a hydra pit where multiple piles get combined, that is.

I'm pretty sure gold drops can get "supercharged" potentially without limit, allowing unusually large gold drops from ordinary enemies, but unless the supercharging is really strongly exponential, you'd expect to see drop sizes in the 5k+, 10k+, and 20k+ range. Which you don't, really -- you just see normal-sized gold drops, and the exceptionally rare 32767 drop. I've seen exactly one of those, that I can recall, though I don't remember the context.
Hm, yeah, I see your point. The supercharging has a 1% chance of happening (and if it happens, it has another 1% chance of happening etc) and it should limit itself so it never reaches MAX_SHORT. So I have no idea what's going on here.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote
Old September 15, 2016, 13:14   #8
MattB
Veteran
 
Join Date: Mar 2013
Location: Berkshire, UK
Posts: 1,153
MattB is on a distinguished road
I'm pretty sure I've had exactly 32000 quite a few times. How does that work?
(Or am I going stark raving mad??)
MattB is offline   Reply With Quote
Old September 15, 2016, 17:17   #9
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,941
Derakon is on a distinguished road
Quote:
Originally Posted by Carnivean View Post
I suspect that the adamantite multiplier boosts it to that level. I've gotten it a few times, and I'd be fairly sure it's adamantite each time.
If I recall correctly, the quantity of money determines the material used, not the other way around. In other words, the game decides to generate 583 money, then looks up the various ranges and determines that it should use "rubies" as the descriptor, say.
Derakon is offline   Reply With Quote
Old September 15, 2016, 22:51   #10
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,860
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Derakon View Post
If I recall correctly, the quantity of money determines the material used, not the other way around. In other words, the game decides to generate 583 money, then looks up the various ranges and determines that it should use "rubies" as the descriptor, say.
Yeah, that's right. I'll file this as a bug.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amount of real time to win? BlueFish Vanilla 1 February 2, 2013 22:47
Setting a maximum stack value? fruviad Development 12 September 29, 2011 04:28
Birth amount of gold Thraalbee Vanilla 2 September 23, 2011 23:37
3.3.0 Treasure not displayed Dranken Vanilla 4 August 31, 2011 20:24
Max amount of spells? steeg1234321 Vanilla 11 April 4, 2008 15:28


All times are GMT +1. The time now is 15:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.