Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Variants

Reply
 
Thread Tools Display Modes
Old June 7, 2012, 00:04   #61
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,994
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by Derakon View Post
This will get trickier if we decide to start making monster powers more exotic. For example, how do you consider the power of a monster whose melee attacks have a 10% chance of setting off a radius-2 fireball?
That's actually an easy example because it equates to 10% of the fireball's damage ... but the real issue is, is there a better metric than converting things to damage-equivalent values. You're right that we'll need to equate a lot of wonderful but not directly damaging effects.
Quote:
More generally, there's nothing that says that the minimum rarity must be 1. Pyrel supports floating-point, so we could have values ranging from e.g. .001 to 1000 and still have that "common thing is a million times more common than rare thing" range. If ints are needed code-side then the code can simply apply a constant scaling factor based on the smallest value used in the data file.
Well yes, but the original context was an allocation table - your random number line. The minimum number of entries on such a line is one, so something a million times more common must have a million entries.

But yes, there's no reason your number line can't use intervals of 0.00001 or whatever.
__________________
"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
Magnate is offline   Reply With Quote
Old June 7, 2012, 20:20   #62
emulord
Adept
 
Join Date: Oct 2009
Posts: 144
emulord is on a distinguished road
You dont need a million entries, just have the entries be like
[ (1, The One Ring's ID number),
(100000, Lembas wafer's ID) ...]

And when you generate the random item number you subtract the allocation value of the first entry, then move on to the next until allocation value > random number. Then you found your item. To speed it up put larger numbers up front.
emulord is offline   Reply With Quote
Old June 7, 2012, 22:02   #63
ekolis
Knight
 
ekolis's Avatar
 
Join Date: Apr 2007
Location: Cincinnati, OH, USA
Age: 31
Posts: 906
ekolis is on a distinguished road
Send a message via AIM to ekolis Send a message via MSN to ekolis Send a message via Yahoo to ekolis Send a message via Skype™ to ekolis
ID numbers? Eww, how about strings?
__________________
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
ekolis is offline   Reply With Quote
Old June 7, 2012, 22:34   #64
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 5,957
Derakon is on a distinguished road
That would be purely on the code side of things, so more likely it would be a reference to the ItemFactory instance that generates that particular item. Rarity specification from the user's perspective would be a part of the item record; it wouldn't be gathered together in any one place.
Derakon is offline   Reply With Quote
Old June 8, 2012, 10:58   #65
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,994
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by emulord View Post
You dont need a million entries, just have the entries be like
[ (1, The One Ring's ID number),
(100000, Lembas wafer's ID) ...]

And when you generate the random item number you subtract the allocation value of the first entry, then move on to the next until allocation value > random number. Then you found your item. To speed it up put larger numbers up front.
We are violently agreeing with each other. I didn't mean you need a million items in a python dict, I meant that the conceptual number line / allocation table has one entry for The One Ring and a million entries for a Ration of Food (or whatever).

P.S. Derakon: we've reached the point where this thread no longer displays nicely in the Oook software (it says "More replies below current depth" and requires extra clicks and scrolling) - so please could you start a new thread? Thanks.
__________________
"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
Magnate 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
Angband 3.5-dev Magnate Vanilla 70 July 2, 2012 16:47
JBand progress log. PaulBlay Development 38 June 27, 2009 09:19
Hackers triumph over pricing.log beast-file ... Magnate Vanilla 3 April 22, 2009 23:00
Angband/65 development log PaulBlay Development 0 April 16, 2009 18:55
Export entire message log to text file PaulBlay Vanilla 2 February 28, 2009 19:24


All times are GMT +1. The time now is 14:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.