Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Object and Monster generation question (http://angband.oook.cz/forum/showthread.php?t=3073)

Zikke April 13, 2010 19:26

Object and Monster generation question
 
How does the game determine whether or not to spawn an out of depth monster (excluding vaults)? How many levels OOD is possible?

Regarding items, I heard at a certain dlvl, any GOOD or better items are increased by 10 levels when it comes to rolling for drops. When does this start?


I am trying to make a spreadsheet for myself to document when certain key resists, monsters, or items appear at which dlvl so that I can know when to "not dive further until" or "dive to this level to find ___"


Thanks!

edit: Also, why do all armor items in the ego_items.txt edit file have a zero depth value?


Example: Boots of Speed

Code:

N:59:of Speed
X:25:0
W:0:24:0:100000
C:0:0:0:d10
T:30:0:99
F:SPEED | HIDE_TYPE


Sirridan April 13, 2010 21:45

Quote:

Originally Posted by Zikke (Post 32288)
How does the game determine whether or not to spawn an out of depth monster (excluding vaults)? How many levels OOD is possible?

Regarding items, I heard at a certain dlvl, any GOOD or better items are increased by 10 levels when it comes to rolling for drops. When does this start?


I am trying to make a spreadsheet for myself to document when certain key resists, monsters, or items appear at which dlvl so that I can know when to "not dive further until" or "dive to this level to find ___"


Thanks!

edit: Also, why do all armor items in the ego_items.txt edit file have a zero depth value?


Example: Boots of Speed

Code:

N:59:of Speed
X:25:0
W:0:24:0:100000
C:0:0:0:d10
T:30:0:99
F:SPEED | HIDE_TYPE


1. happens in monster2.c

Code:

406        s16b get_mon_num(int level)
407        {
408                int i, j, p;
409       
410                int r_idx;
411       
412                long value, total;
413       
414                monster_race *r_ptr;
415       
416                alloc_entry *table = alloc_race_table;
417       
418                /* Occasionally produce a nastier monster in the dungeon */
419                if (level > 0 && one_in_(NASTY_MON))
420                        level += MIN(level / 4 + 2, MON_OOD_MAX);

and in defines.h...
Code:

259        #define NASTY_MON    25        /* 1/chance of inflated monster level */
260        #define MON_OOD_MAX  10        /* maximum out-of-depth amount */

Which means there is a 1/25 chance of getting an OOD monster, and the increased level of that OOD is (level/4 + 2) or 10, whichever is smaller.

Example, at level 15 the highest out of depth possible is 6.

2. Not sure, I think at 30, when only magic stuff drops, but I'm too lazy to look through the code some more.

3. Elvenkind have a depth of 60 I think, but the rest can drop any time but may be quite rare. I'm sure it's just so people can have nice things early on too that aren't artifacts, when later on in the game artifacts often surpass most egos. (most, not all, mind you)

Zikke April 13, 2010 21:48

So in theory, a pair of boots on dlvl 1 has the same chance of being "of Speed" as a pair of boots on dlvl 100?


And thank you for the code on generating OOD monsters. :)

Sirridan April 13, 2010 22:44

Quote:

Originally Posted by Zikke (Post 32291)
So in theory, a pair of boots on dlvl 1 has the same chance of being "of Speed" as a pair of boots on dlvl 100?


And thank you for the code on generating OOD monsters. :)

No prob, but no, deeper you get the more likely you'll get ego items, and therefore speed boots.

But things in town that drop items (Farmer Maggot, Mean Looking Mercs, Veterans) can drop boots of speed. There was a screenshot or a post on that not too long ago IIRC.

buzzkill April 14, 2010 04:21

Quote:

Originally Posted by Sirridan (Post 32290)
Which means there is a 1/25 chance of getting an OOD monster, and the increased level of that OOD is (level/4 + 2) or 10, whichever is smaller.

Example, at level 15 the highest out of depth possible is 6.

This seems weak. A 1 in 25 chance of getting a monster that's sightly OoD (at dl32 or higher only 10 levels OoD). Does anyone else think that there is not enough variation here? Good old predictable Vanilla, I guess.

Derakon April 14, 2010 04:27

I'd be all for more variation in monster and item placement. Back in the way-old days generation depths were a lot more variable, and you could find nicer gear much more often (for example, PDSM was more of a "once every few winners" deal rather than a "three times in one player's life" deal). Polymorph could generate any non-unique monster (so polymorphing townspeople was a fun way to check out powerful enemies in a somewhat-safe manner, by standing on the staircase). And so on.

d_m April 14, 2010 04:38

Quote:

Originally Posted by buzzkill (Post 32296)
This seems weak. A 1 in 25 chance of getting a monster that's sightly OoD (at dl32 or higher only 10 levels OoD). Does anyone else think that there is not enough variation here? Good old predictable Vanilla, I guess.

Maybe. It's actually a lot more likely to generate tougher monsters than the old code which it replaced (which was a lot more complicated and a lot less likely to generate a monster 10 levels out-of-depth). There was a discussion about the change on the mailing list and on IRC if you're interested.

There has been talk about moving to a function that could produce *any* depth of monster or item (obviously with a correspondingly small probability) but tuning the function so it "felt" right would be tricky and no one's done it yet.

Patches welcome ;)

buzzkill April 14, 2010 05:13

Quote:

Originally Posted by d_m (Post 32299)
There was a discussion about the change on the mailing list and on IRC if you're interested.

There has been talk about moving to a function that could produce *any* depth of monster or item (obviously with a correspondingly small probability) but tuning the function so it "felt" right would be tricky and no one's done it yet.

Mailing list? IRC, what's that? I didn't know of such things.

The OoD object generation seems to have a *lot* more variability and seems about right. It would be nice if the monsters were also. I guess I'll just sit around and wait.

EDIT: A quick fix, if anybody notices this, would be to change
Code:

259        #define NASTY_MON    25        /* 1/chance of inflated monster level */
to this
259        #define NASTY_MON    5       /* 1/chance of inflated monster level */


Derakon April 14, 2010 06:31

It seems like a simple bell curve would work fine. You could start with a curve where monsters are generated more than the current max OOD-ness less than .1% of the time (basically similar to current behavior), and gradually increase that until it feels right.

d_m April 14, 2010 15:26

Quote:

Originally Posted by buzzkill (Post 32301)
Mailing list? IRC, what's that? I didn't know of such things.

The mailing list isn't very active right now but sometimes there is discussion on it. I found the email detailing the changes to OOD monsters:

http://angband.oook.cz/pipermail/ang...er/000881.html

The IRC channel is #angband-dev on freenode. It too is pretty inactive right now.


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

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