Snake Sneak
Posts: 91
Joined: Monday, 7th March 2016, 19:10
DCSS Challenge Generator Thing
Hi, folks.
Some time ago, I designed a random character generator for DCSS. You'd query my IRC robot and it'd give you a name, race, background, deity, and some optional challenges. The ideas were to play all manner of characters, learn what made a character good, and most importantly, learn to be resourceful. I kept a diary of my random characters' exploits, finally winning after perhaps 140 attempts, using a Felid Chaos Knight of Xom who spammed Shatter a lot. At that time I realized that the DCSS community might find my randomizer amusing.
This thing does not care what is optimal (or even possible) much of the time, so for those who want a high win ratio, this is likely to be useless.
The randomizer has a list of optional challenges in it. I'll post that in a spoiler at the end, since it's probably the single most useful or interesting thing in here to most.
If people like this concept and want to see the whole source, I can post it. It's written in mIRC's MSL, but quite easy to adapt to most any other platform since most all of the data is plaintext.
SAMPLE OUTPUT
I just picked the first 5 the bot spewed out here; it can generate quite a few random dudes...
#1. [SPRINT] [MAP 1: "RED SONJA"] YOU ARE GONDWANA THE MERFOLK GLADIATOR, FOLLOW THE GOD WHOSE ALTAR YOU SEE FIRST. YOU ARE FOND OF LONG SWORDS.
#2. [CRAWL] YOU ARE YAK THE HIGH ELF GLADIATOR! FOLLOW TROG. YOU PLAY TO YOUR WEAKNESSES - TRAIN YOUR LOWEST-APTITUDE SKILLS.
#3. [CRAWL] YOU ARE DEPRA THE DRACONIAN ENCHANTER! FOLLOW SIF MUNA. YOU ARE UNCOORDINATED - NO WANDS.
#4. [SPRINT] [MAP 2: "THE VIOLET KEEP OF MENKAURE"] YOU ARE WEDDING WRECKER THE MUMMY GLADIATOR, FOLLOW MAKHLEB. YOU ARE FOND OF KUNG FU MOVIES - FIGHT ONLY WITH UNARMED COMBAT.
#5. [SPRINT] [MAP 1: "RED SONJA"] YOU ARE BYIIUS TRYDZGOHU THE DEEP ELF TRANSMUTER, FOLLOW WHOEVER YOU LIKE. YOU LIKE YREDELEMNUL'S PHILOSOPHY - NEVER USE HOLY WRATH, HOLY WORD, OR STATUE FORM.
As you see, it's possible to have a challenge, a god, or both picked for you. Sometimes you get control over part of the creation and sometimes you don't. You can never rely on having control of anything, so you are forced to learn to make the best use of everything.
GENERAL
-------
The generator uses plaintext lists. The engine picks a random line from the specified text file, and the manner in which these files are mentioned and pulled from makes up the challenges.
This behavior is used to alter the chance of something happening. For instance, in 'templates' below, there are 4 lines, one of which is a Sprint challenge. So Sprint has a roughly 25% chance of being chosen, while vanilla Crawl has a 75% chance.
templates: This first file has the sentence structure for the overall challenge. The parenthesized parts are read commands - they select a random line from the specified file as mentioned.
FILE CONTENTS:
REFERENCED THINGS
Each one of these has a plaintext list associated with it. They're all easy to put together oneself, apart from the list of monsters (made by copy-pasting from CrawlWiki's alphabetical lists).
name (phonemes): A big list of syllables and words that are recombined internally to make up random names.
race (races): Pulls a race from a list of the races.
background (backgrounds): Picks from a list of backgrounds. This engine doesn't discriminate for exceptions (for instance, Felids cannot be Assassins or Gladiators. Sometimes one gets generated, and I have a function to reroll race or class only.)
gods (deities): A list of deities. There are no Beogh, Jiyva, or Lugonu in this list, only those deities which most any character could reasonably expect to convert to early-game/at the Temple. (Sometimes a demonspawn gets told to serve Elyvilon or the Temple is corrupted, and I have to reroll for the deity. Coding exceptions for this stuff is easy, but doesn't interest me.)
godsb (deities): A list of deities. This one has them all, including new deities from trunk versions.
monsters (monsters): A big list of all the monsters. Used mostly for the Arena randomizer, a seperate generator which makes up Arena mode scenarios, using the weapon files below to further set the battle up.
melee (melee weapon types): List of melee weapons.
ranged (ranged weapon types): List of ranged weapons.
meleeb (melee weapon brands): List of brands. Type-specific brands are concatenated together (so it's not asking for a hand axe of piercing).
rangedb (ranged weapon brands): List of brands. Type-specific brands are concatenated together.
skills (skill classes): For those challenges which emphasize (or forbid) particular skills.
sprint (Sprint maps): A list of Sprint maps. For picking a random map.
trial (challenges): A list of ~100 optional challenges, which range from harmless to game-breakingly difficult depending on their nature and your character. This is probably the file that's most useful on its own.
FILE CONTENTS:
I'd dig any suggestions people may have, particularly for that last list of challenges. I went to DCSS 0.17 after years of vanilla crawl, and love what the game's become - I'd like to build a generator that felt as fresh as every new DCSS run does.
Hope this proves enjoyable, or at least amusing. I still laugh when I get assigned a mummy berserker, carnivore Spriggan or something.
Cheers
Some time ago, I designed a random character generator for DCSS. You'd query my IRC robot and it'd give you a name, race, background, deity, and some optional challenges. The ideas were to play all manner of characters, learn what made a character good, and most importantly, learn to be resourceful. I kept a diary of my random characters' exploits, finally winning after perhaps 140 attempts, using a Felid Chaos Knight of Xom who spammed Shatter a lot. At that time I realized that the DCSS community might find my randomizer amusing.
This thing does not care what is optimal (or even possible) much of the time, so for those who want a high win ratio, this is likely to be useless.
The randomizer has a list of optional challenges in it. I'll post that in a spoiler at the end, since it's probably the single most useful or interesting thing in here to most.
If people like this concept and want to see the whole source, I can post it. It's written in mIRC's MSL, but quite easy to adapt to most any other platform since most all of the data is plaintext.
SAMPLE OUTPUT
I just picked the first 5 the bot spewed out here; it can generate quite a few random dudes...
#1. [SPRINT] [MAP 1: "RED SONJA"] YOU ARE GONDWANA THE MERFOLK GLADIATOR, FOLLOW THE GOD WHOSE ALTAR YOU SEE FIRST. YOU ARE FOND OF LONG SWORDS.
#2. [CRAWL] YOU ARE YAK THE HIGH ELF GLADIATOR! FOLLOW TROG. YOU PLAY TO YOUR WEAKNESSES - TRAIN YOUR LOWEST-APTITUDE SKILLS.
#3. [CRAWL] YOU ARE DEPRA THE DRACONIAN ENCHANTER! FOLLOW SIF MUNA. YOU ARE UNCOORDINATED - NO WANDS.
#4. [SPRINT] [MAP 2: "THE VIOLET KEEP OF MENKAURE"] YOU ARE WEDDING WRECKER THE MUMMY GLADIATOR, FOLLOW MAKHLEB. YOU ARE FOND OF KUNG FU MOVIES - FIGHT ONLY WITH UNARMED COMBAT.
#5. [SPRINT] [MAP 1: "RED SONJA"] YOU ARE BYIIUS TRYDZGOHU THE DEEP ELF TRANSMUTER, FOLLOW WHOEVER YOU LIKE. YOU LIKE YREDELEMNUL'S PHILOSOPHY - NEVER USE HOLY WRATH, HOLY WORD, OR STATUE FORM.
As you see, it's possible to have a challenge, a god, or both picked for you. Sometimes you get control over part of the creation and sometimes you don't. You can never rely on having control of anything, so you are forced to learn to make the best use of everything.
GENERAL
-------
The generator uses plaintext lists. The engine picks a random line from the specified text file, and the manner in which these files are mentioned and pulled from makes up the challenges.
This behavior is used to alter the chance of something happening. For instance, in 'templates' below, there are 4 lines, one of which is a Sprint challenge. So Sprint has a roughly 25% chance of being chosen, while vanilla Crawl has a 75% chance.
templates: This first file has the sentence structure for the overall challenge. The parenthesized parts are read commands - they select a random line from the specified file as mentioned.
FILE CONTENTS:
Spoiler: show
REFERENCED THINGS
Each one of these has a plaintext list associated with it. They're all easy to put together oneself, apart from the list of monsters (made by copy-pasting from CrawlWiki's alphabetical lists).
name (phonemes): A big list of syllables and words that are recombined internally to make up random names.
race (races): Pulls a race from a list of the races.
background (backgrounds): Picks from a list of backgrounds. This engine doesn't discriminate for exceptions (for instance, Felids cannot be Assassins or Gladiators. Sometimes one gets generated, and I have a function to reroll race or class only.)
gods (deities): A list of deities. There are no Beogh, Jiyva, or Lugonu in this list, only those deities which most any character could reasonably expect to convert to early-game/at the Temple. (Sometimes a demonspawn gets told to serve Elyvilon or the Temple is corrupted, and I have to reroll for the deity. Coding exceptions for this stuff is easy, but doesn't interest me.)
godsb (deities): A list of deities. This one has them all, including new deities from trunk versions.
monsters (monsters): A big list of all the monsters. Used mostly for the Arena randomizer, a seperate generator which makes up Arena mode scenarios, using the weapon files below to further set the battle up.
melee (melee weapon types): List of melee weapons.
ranged (ranged weapon types): List of ranged weapons.
meleeb (melee weapon brands): List of brands. Type-specific brands are concatenated together (so it's not asking for a hand axe of piercing).
rangedb (ranged weapon brands): List of brands. Type-specific brands are concatenated together.
skills (skill classes): For those challenges which emphasize (or forbid) particular skills.
sprint (Sprint maps): A list of Sprint maps. For picking a random map.
trial (challenges): A list of ~100 optional challenges, which range from harmless to game-breakingly difficult depending on their nature and your character. This is probably the file that's most useful on its own.
FILE CONTENTS:
Spoiler: show
I'd dig any suggestions people may have, particularly for that last list of challenges. I went to DCSS 0.17 after years of vanilla crawl, and love what the game's become - I'd like to build a generator that felt as fresh as every new DCSS run does.
Hope this proves enjoyable, or at least amusing. I still laugh when I get assigned a mummy berserker, carnivore Spriggan or something.
Cheers
And you think you're capable of finding the ORB? I had it, you know. Then I gave it away so I could steal it AGAIN.
- For this message the author Gongclonker has received thanks: 2
- Blade, Sprucery