Modifying chance of portal generation?


Questions, Explanations, Howtos

Dungeon Dilettante

Posts: 2

Joined: Tuesday, 29th April 2014, 15:17

Post Friday, 2nd May 2014, 14:25

Modifying chance of portal generation?

Despite my many games of crawl playing, I have actually only been inside of a Wizlab twice - and it was the same Wizlab both times. I understand that this is because Wizlabs generate later in the game than the other portals do, generally, so I don't reach them as often, but considering there are so many kinds of Wizlabs I'd really like to see them more often. I poked around the individual portal files (like wizlab.des) and the only thing that looks like it might be relevant is the e.chance("500") line, but I suspect that may not have anything to do with the chance of portal generation, especially considering that same line is found in all the portal files.

I also noticed this line in the lab.des file.

  Code:
# (Jan 2010) With the reduction in placement of Labyrinths to 10-20 (roughly
# across 24 levels) and changing to game-unique, chance of NOT having a
# Labyrinth was (1-285/10^4)^24 = ~49%. Increasing chance to 5% gives you
# (1-500/10^4)^24 = ~29% chance of NOT placing a Labyrinth, ~71% chance
# of getting a Labyrinth every game, skewed towards earlier depths.


My pefect solution would be to modify Wizlabs so that there was always a 100% chance of receiving one, assuming I explored every level they could spawn on. This line about labyrinths makes it seem like that is possible to code, but I'm not sure where to find the appropriate lines to modify. Any guidance?

Thanks!
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Friday, 2nd May 2014, 14:53

Re: Modifying chance of portal generation?

Just go look at all the map files and you'll be able to look at all the possible lab portal layouts.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Friday, 2nd May 2014, 18:14

Re: Modifying chance of portal generation?

XuaXua wrote:Just go look at all the map files and you'll be able to look at all the possible lab portal layouts.
You might find it a worthwhile exercise to read the post you are replying to.

e.chance("500") means give the vault a 5% chance of generating on every level within its range. Change that to 10000 and it will always generate on the first level within its range (unless there's a bug). I am not aware of an easy way to change the chance and preserve the current distribution across the levels by .des editing alone (if you really want you could do it by making copies of each vault for each single level in the range, and give each one a different chance to match the current relative distribution).
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Friday, 2nd May 2014, 18:36

Re: Modifying chance of portal generation?

duvessa wrote:
XuaXua wrote:Just go look at all the map files and you'll be able to look at all the possible lab portal layouts.
You might find it a worthwhile exercise to read the post you are replying to.

e.chance("500") means give the vault a 5% chance of generating on every level within its range. Change that to 10000 and it will always generate on the first level within its range (unless there's a bug). I am not aware of an easy way to change the chance and preserve the current distribution across the levels by .des editing alone (if you really want you could do it by making copies of each vault for each single level in the range, and give each one a different chance to match the current relative distribution).


Pastrami on rye.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Return to Coding

Who is online

Users browsing this forum: No registered users and 14 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.