Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old July 14, 2018, 13:01   #11
Sky
Veteran
 
Join Date: Oct 2016
Location: somewhere on the south coast
Age: 45
Posts: 1,120
Sky is on a distinguished road
Didnt it once exist an option to "always generate interesting levels" ??

Not sure exactly what that did though, because in those days i would just die every five minutes.
__________________
"i can take this dracolich"
Sky is offline   Reply With Quote
Old July 14, 2018, 15:21   #12
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,447
Derakon is on a distinguished road
Quote:
Originally Posted by Sky View Post
Didnt it once exist an option to "always generate interesting levels" ??

Not sure exactly what that did though, because in those days i would just die every five minutes.
Some ZAngband-derived variants have an "always generate unusual rooms" option that causes all rooms to be vaults, moated rooms, or other templated rooms. Mostly vaults.

Way back in the day Vanilla (and many variants) had an autoscummer that would regenerate levels until the level feeling was high enough -- note that this level feeling incorporated both item quality and monster power.
Derakon is offline   Reply With Quote
Old July 15, 2018, 03:03   #13
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 1,570
wobbly is on a distinguished road
Quote:
Originally Posted by t4nk View Post
Well it can still generate 99% size (95 - 5 + 9). And even 70% is not all that different from full sized level...
I guess the issue is a 70% sized level is not much smaller but 10/7x the monster density is a fair amount. I haven't looked at monster placement yet to see how much of an issue there is. There's actually a whole bunch of stuff that behaves a little oddly if I shrink those numbers too far. I'll see how much I can get away with without major fiddling.

Quote:
Originally Posted by t4nk View Post
A cleaner solution would be to introduce new profiles for small and medium levels. How's your C already? Generating dungeons is a good excercise, IMO
Yeah I'll make it a separate profile. I'd like to do some playing here anyway, there's a bunch of stuff it can do that isn't used much. For instance you can add gens that will only crop up 1 in 200, so you can have profiles that you're unlikely to see in a single play through for instance. My C is non-existent, but a little less non-existent then a week ago. It's enough to be able to play around a bit there & compile.

Last edited by wobbly; July 15, 2018 at 03:16.
wobbly is offline   Reply With Quote
Old July 15, 2018, 07:43   #14
t4nk
Swordsman
 
Join Date: May 2016
Posts: 289
t4nk is on a distinguished road
Quote:
Originally Posted by wobbly View Post
I guess the issue is a 70% sized level is not much smaller but 10/7x the monster density is a fair amount. I haven't looked at monster placement yet to see how much of an issue there is. There's actually a whole bunch of stuff that behaves a little oddly if I shrink those numbers too far. I'll see how much I can get away with without major fiddling.
Hmm, that's a good point. It also occured to me that 70% size horizontally AND vertically will produce 1/2 sized level overall ((0.7 * x) * (0.7 * y) == (0.7 * 0.7) * (x * y) == 0.49 * x * y).

Quote:
Yeah I'll make it a separate profile. I'd like to do some playing here anyway, there's a bunch of stuff it can do that isn't used much. For instance you can add gens that will only crop up 1 in 200, so you can have profiles that you're unlikely to see in a single play through for instance. My C is non-existent, but a little less non-existent then a week ago. It's enough to be able to play around a bit there & compile.
Looking at how dungeon generation works, it seems you need to do these things to add a new profile:
1) Add the profile to lib/gamedata/dungeon_profile.txt. Just copy and paste an old profile and rename it to something else (let's say, "small").
2) Add the profile to list-dun-profiles.h. For example, DUN("small", small).
3) Add the profile building function to gen-cave.c. Again, just copy, say, modified_gen() and rename to small_gen().
4) Maybe also change something in choose_profile() (generate.c)
5) Tinker with this stuff, until it does what you want...
t4nk is offline   Reply With Quote
Old July 15, 2018, 10:46   #15
fph
Knight
 
Join Date: Apr 2009
Location: Berlin / Italy
Posts: 608
fph is on a distinguished road
In the labyrinth generation, there is a line of code that scales the number of monsters by the level size:

Code:
    /* Scale number of monsters items by labyrinth size */
    k = (3 * k * (h * w)) / (z_info->dungeon_hgt * z_info->dungeon_wid);
It seems like this line ensures that a labyrinth has 3x the "monster density" of a normal level (correctly scaled with its area as t4nk and wobbly observed).

Maybe it can simply be copied also in the other profiles, without the 3?
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.

Last edited by fph; July 15, 2018 at 11:10.
fph is offline   Reply With Quote
Old July 15, 2018, 12:56   #16
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 1,570
wobbly is on a distinguished road
Thanks will give that a whirl. Also starting to think what I want might be more like:
Code:
y_size = z_info->dungeon_hgt * (size_percent - 20 + p->depth / 4 + randint0(10)) / 100;
x_size = z_info->dungeon_wid * (size_percent - 20 + p->depth / 4 + randint0(10)) / 100;
That gives a range of 31%-82% on dlvl 1, the old sizes at dlvl 60, & around 20% bigger at dlvl 98 (the questor levels are set to 100%). The range is probably too big at dlvl 1 there so maybe I still have to split it off into another profile to get it right but I'll try this & see what happens
wobbly is offline   Reply With Quote
Old July 15, 2018, 15:20   #17
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 1,570
wobbly is on a distinguished road
Code:
y_size = z_info->dungeon_hgt * (size_percent - 20 + p->depth / 4 + randint0(10)) / 100;
x_size = z_info->dungeon_wid * (size_percent - 20 + p->depth / 4 + randint0(10)) / 100;
Ok dived through 20 levels & it pretty consistantly gave me around the max. size that'll fit on the screen. Sometimes smaller, sometimes a little bigger. Didn't manage to split it off into another profile, I got this on trying to compile:
Code:
DUN("small', small)
             ^
generate.c:65:25: nite: in definition of macro 'DUN'
  #define DUN(a, b) {a, b##_gen},
                        ^
make: *** [generate.o] Error 1
so I'm obviously doing something wrong there.

Quote:
Originally Posted by fph View Post
In the labyrinth generation, there is a line of code that scales the number of monsters by the level size:

Code:
    /* Scale number of monsters items by labyrinth size */
    k = (3 * k * (h * w)) / (z_info->dungeon_hgt * z_info->dungeon_wid);
It seems like this line ensures that a labyrinth has 3x the "monster density" of a normal level (correctly scaled with its area as t4nk and wobbly observed).

Maybe it can simply be copied also in the other profiles, without the 3?
Not unmodified (h and w are undefined in modified gen) but I'll see if I can work out the equivalent.
wobbly is offline   Reply With Quote
Old July 15, 2018, 16:42   #18
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 1,570
wobbly is on a distinguished road
Ok it's this bit
Code:
/* General amount of rubble, traps and monsters */
    k = MAX(MIN(c->depth / 3, 10), 2);
Code:
/* Pick a base number of monsters */
    i = z_info->level_monster_min + randint1(8) + k;
I'll work something out there
wobbly is offline   Reply With Quote
Old July 16, 2018, 08:37   #19
t4nk
Swordsman
 
Join Date: May 2016
Posts: 289
t4nk is on a distinguished road
Quote:
Originally Posted by wobbly View Post
Ok dived through 20 levels & it pretty consistantly gave me around the max. size that'll fit on the screen. Sometimes smaller, sometimes a little bigger. Didn't manage to split it off into another profile, I got this on trying to compile:
Code:
DUN("small', small)
             ^
Looks like you have different kinds of quotes there? (double and single)
t4nk is offline   Reply With Quote
Old July 16, 2018, 12:19   #20
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,861
Donated: $40
Pete Mack is on a distinguished road
Yep. You want double quotes for a string (array of char) for that. Single quote for a single character.
Pete Mack 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
how do bows work?? Sky Vanilla 5 May 15, 2018 11:51
How do Quivers work Freddo Vanilla 1 March 13, 2015 14:32
how does squelch work? Tibarius Vanilla 6 January 10, 2015 18:35
[3.30] good work Tibarius Vanilla 14 August 5, 2011 15:20
Level completion (for level clearers) fizzix Vanilla 19 July 19, 2011 21:44


All times are GMT +1. The time now is 07:57.


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