![]() |
#1 | ||||
Swordsman
Join Date: May 2009
Posts: 294
![]() |
Bug in item probabilities [angband-v4-v4-1107-g15f2bcb]
In object.h/line~379, the artifact allocation probability is a byte.
A large number of artifacts have probabilities over 255, which are then stuffed into that byte in parse_a_a @ init2.c/779 This is going to be causing wackiness with the allocations. Quote:
Quote:
If the artifact.alloc_prob got tweaked, we would then still have issues with alloc_entry.prob3 @ types.h/l156 Quote:
Quote:
|
||||
![]() |
![]() |
#2 |
Swordsman
Join Date: May 2009
Posts: 294
![]() |
OK, bad form replying to myself, but I've been doing some digging and want to keep it separate from the bug report itself.
It looks like there is nothing in the allocation tables that forces you to have the the allocations non-overlapping. So you could represent an allocation of say A:1000:40 to 100 as A:250:40 to 100 A:250:40 to 100 A:250:40 to 100 A:250:40 to 100 or maybe make things a bit more interesting 8-) A:250:35 to 100 A:250:40 to 100 A:250:45 to 100 A:250:50 to 100 It would also be possible to tweak parse_a_a to automatically break the input into as many byte size chunks as needed. edit: whoops, limited to 3 entries at the moment Last edited by kaypy; September 14, 2012 at 16:10. |
![]() |
![]() |
#3 |
Prophet
Join Date: Dec 2009
Posts: 9,024
![]() |
It sounds like the effects of stuffing things into bytes is that items that we tried to make very common (allocation probability well over 255) would have effectively random (prob % 255) probabilities instead. Is that accurate? Though the books' current allocations of 1000 give them an effective allocation probability of 235, which isn't much less than the actual maximum.
Still, we really ought to stop using bytes everywhere. |
![]() |
![]() |
#4 | |
Veteran
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,393
![]() |
Quote:
![]() |
|
![]() |
![]() |
#5 | ||
Swordsman
Join Date: May 2009
Posts: 294
![]() |
Quote:
Quote:
|
||
![]() |
![]() |
#6 | |
Angband Devteam member
|
Quote:
Thanks very much for the report.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila |
|
![]() |
![]() |
#7 | |
Prophet
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,025
![]() |
Quote:
I just thought we were hitting a hard limiting factor. |
|
![]() |
![]() |
#8 |
Swordsman
Join Date: May 2009
Posts: 294
![]() |
Heres a quick-fix artifact.txt
I've refrained from doing anything too wacky- just split the A lines into bytes, trying for numbers that retain some semblance of readability. The spellbooks are at the 3x255 limit. artifact.zip |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
BUG: Using non-existent item by number causes crash | Max Stats | Vanilla | 10 | February 28, 2011 00:37 |
Scroll of restore item - possible ID by use bug | Taha | Development | 3 | February 16, 2011 21:26 |
r1612 bug : auto ID average weapons on pickup with same item in inventory | bebo | Vanilla | 4 | August 5, 2009 17:09 |
r1415 bug - Item generation | Sirridan | Vanilla | 3 | June 1, 2009 08:23 |
unique exceptional drops + possible item bug 3.1.1 | bebo | Vanilla | 6 | February 10, 2009 19:11 |