Angband Forums Current master post-4.2.1
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

November 25, 2020, 15:52   #141
PowerWyrm
Prophet

Join Date: Apr 2008
Posts: 2,846
Quote:
 Originally Posted by Pete Mack That code isn't even right. It will favor the first objects enormously. You want to count down with probability, with P= 1/N for object 1 and p = 1 for object N. Even better, count the list without the quest artifacts, pick a random number between 1 an N, and count off til you get that object. As written, there are excessive calls to random.
Code works perfectly.

First object: 100% chance to pick (100% obj1)
Second object: 1/2 chance to pick, 1/2 chance to keep old one -> 1/2 chance for first 2
Third object: 1/3 chance to pick, 2/3 chance to keep old one -> 1/3 chance on all first 3 (1/2*2/3)
Fourth object: 1/4 chance to pick, 3/4 chance to keep old one -> 1/4 chance on all first 4 (1/3*3/4)
...
Nth object: 1/n chance to pick, n-1/n chance to keep old one, and all up to (n-1) have equal 1/(n-1) probability -> 1/n-1 * n-1/n = 1/n chance on all n objects
__________________

 November 25, 2020, 17:21 #142 Pete Mack Prophet   Join Date: Apr 2007 Location: Seattle, WA Posts: 6,189 Donated: \$40 Got it. I misread it the first time.
 November 25, 2020, 19:26 #143 Nick Vanilla maintainer     Join Date: Apr 2007 Location: Canberra, Australia Age: 55 Posts: 8,757 Donated: \$60 Thanks. Efficient and clear; I particularly like the way you don't let quest artifacts mess with the counting and probabilities. __________________ One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie.
 December 3, 2020, 21:08 #144 Nick Vanilla maintainer     Join Date: Apr 2007 Location: Canberra, Australia Age: 55 Posts: 8,757 Donated: \$60 As far as I know there are two possibly outstanding bugs - duplicate uniques and duplicate artifacts - and I have been unable to pin them down despite much searching. So I think we're close to releasing 4.2.2. Let me know if there's anything I'm missing. __________________ One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie.
 December 3, 2020, 23:00 #145 Sphara Swordsman     Join Date: Oct 2016 Location: Finland Posts: 424 Awesome. Are there any other ways of reaching Gwarl than waiting him to appear in angband.live chat? I've sent a personal message weeks ago. He finally addressed me in angband.live that he has sent my bug report further regarding to my vanilla save file. He just never removed the save file. He even apologized me for having a long absence. I have specifically stated that a save file of 'SPHARAGAIN' in angband.live is corrupted. But it is still there. I'm forced to play 4.2.1. Not a bad thing as such, but I want to be a part of new development. As far as playtesting goes. So, unless there is not a string of misunderstandings, just remove spharagain vanilla nightly save file. And if there is another person who can do this, please inform me. Loving f'***ing everyone, Sphara
 December 4, 2020, 07:55 #146 Rune Rookie   Join Date: Dec 2020 Posts: 3 I was looking in the source code and it looks like damage for the mage spell "Thrust away" is bugged. Code: ```spell:Thrust Away:40:12:90:40 effect:SHORT_BEAM:FORCE:1:10 dice:\$Dd8 expr:D:PLAYER_LEVEL:+ 0 desc:Fires a short range beam of force.``` Why would the damage be player level '+ 0' d8?
December 4, 2020, 08:02   #147
Nick
Vanilla maintainer

Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,757
Donated: \$60
Quote:
 Originally Posted by Rune I was looking in the source code and it looks like damage for the mage spell "Thrust away" is bugged. Code: ```spell:Thrust Away:40:12:90:40 effect:SHORT_BEAM:FORCE:1:10 dice:\$Dd8 expr:D:PLAYER_LEVEL:+ 0 desc:Fires a short range beam of force.``` Why would the damage be player level '+ 0' d8?
Because the syntax of the expr line requires three fields. We want (player level)d8 as the damage, but we need to add the '+0' for the file to parse correctly.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.

December 4, 2020, 13:22   #148
wobbly
Veteran

Join Date: May 2012
Posts: 2,460
Quote:
 Originally Posted by Sphara Are there any other ways of reaching Gwarl than waiting him to appear in angband.live chat?
You could try the angband.live forum, though whether it'll work I'm not sure. I tried just then and got an error.

 December 5, 2020, 00:14 #149 DavidMedley Knight   Join Date: Oct 2019 Posts: 964 What is the order of classes on the creation screen? a) Warrior b) Mage ... f) Paladin g) Rogue ... etc More precisely: how is the order chosen?
December 5, 2020, 00:56   #150
Nick
Vanilla maintainer

Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,757
Donated: \$60
Quote:
 Originally Posted by DavidMedley What is the order of classes on the creation screen? a) Warrior b) Mage ... f) Paladin g) Rogue ... etc More precisely: how is the order chosen?
By their order in class.txt.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.

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

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Angband     AAR     Vanilla     Development     ToME     Sil     Variants     Competition The real world     Idle chatter     Oook! Obsolete     v4

 Similar Threads Thread Thread Starter Forum Replies Last Post Nick Vanilla 463 June 5, 2020 03:31 Nick Vanilla 505 June 16, 2019 00:26 Thraalbee Vanilla 1 April 13, 2019 18:08 Nick Vanilla 277 June 18, 2017 22:30 Nick Vanilla 588 April 27, 2017 22:54

All times are GMT +1. The time now is 20:03.