Go Back   Angband Forums > Angband > Sil

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old February 18, 2013, 21:14   #1
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 491
bron is on a distinguished road
sil 1.1.1: minor bug (?) with chest generation

So I was hacking the source as part of the "no-magic" challenge (to change things so that magic items are not generated), and I ran across something that looks to me like a bug.

In "choose_chest_contents" in file object2.c, a random number between 1 and 13 is generated to decide on the "theme" of the chest. The comments in the routine enumerate what each of the 13 numbers is supposed to mean. However, this value is passed un-changed into the routine make_object, and in that routine, the themes that were numbered 1 - 13 in choose_chest_contents are actually numbered 2 - 14, with the value 1 reserved to mean "not useless" (i.e. anything except skeletons). This means that occasionally chests do have un-themed-but-not-useless stuff (theme == 1), and chests never have the DROP_TYPE_JEWELRY theme (theme == 14).

Now. it is of course possible that this was the intent, but it certainly doesn't look that way from the source. The simple hack-ish thing to do would be to add one to the value generated in choose_chest_contents (and to change the comments in that routine). The simplest thing to do would be to ignore it and declare it a feature.
bron is offline   Reply With Quote

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
sil 1.1: minor bug with thrown weapons bron Sil 1 November 18, 2012 11:24
[3.3] Bug in cavern level generation PowerWyrm Development 10 July 30, 2011 04:19
Haha, chest in a chest Nightmarjoo AAR 5 January 22, 2010 03:49
r1415 bug - Item generation Sirridan Vanilla 3 June 1, 2009 08:23
3.1.0 Very minor bug perost Vanilla 0 January 9, 2009 21:48

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

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