DCSS Challenge Generator Thing


If it doesn't fit anywhere else, it belongs here. Also, come here if you just need to get hammered.

User avatar

Snake Sneak

Posts: 91

Joined: Monday, 7th March 2016, 19:10

Post Monday, 7th March 2016, 19:19

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:
Spoiler: show
[CRAWL] YOU ARE (name) THE (race) (background)! FOLLOW (gods). (trial)
[SPRINT] [MAP (sprint)] YOU ARE (name) THE (race) (background), FOLLOW (godsb). (trial)
[CRAWL] YOU ARE (name) THE (race) (background)! (trial)
[CRAWL] YOU ARE (name) THE (race) (background)! FOLLOW (godsb).


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
PRACTICE (skill)!
YOU ARE A COMPLETIONIST - FULLY EXPLORE EVERY FLOOR YOU ENTER.
YOU ARE A GLUTTON - REMAIN ENGORGED WHENEVER POSSIBLE.
YOU ARE A HOARDER - PICK UP EVERYTHING, NEVER DROP ANYTHING.
YOU ARE A LONE WOLF - NO MINIONS.
YOU ARE A MIME - WHEN A LONE ENEMY IS PRESENT, COPY ITS MOVEMENTS.
YOU ARE A PACIFIST - NO FIGHTING SKILL OR WEAPON SKILLS TRAINING.
YOU ARE A PLAGIARIST - WHEN A SLAIN FOE DROPS A WEAPON, WIELD IT.
YOU ARE A SCAVENGER - ONLY USE GEAR YOU FOUND ON THE GROUND.
YOU ARE A SECRET ATHEIST - REMAIN UNDER PENANCE.
YOU ARE A SENSATE - WHEN YOU FIND A WEAPON WITH A BRAND YOU HAVE NOT YET USED, WIELD IT.
YOU ARE A TEETOTALLER - NO POTIONS.
YOU ARE A TROPHY-TAKER - ONLY USE GEAR YOU TOOK FROM SLAIN FOES.
YOU ARE A TURNCOAT - SERVE A NON-NEUTRAL GOD, THEN SWITCH SIDES.
YOU ARE ABSENT-MINDED - NEVER TRAIN SPELLCASTING.
YOU ARE ACCIDENT-PRONE - NEVER TRAIN EVOCATIONS.
YOU ARE ACROBATICALLY INCLINED - FOCUS DODGING.
YOU ARE ADAPTABLE - TURN OFF ANY SKILL ABOVE 0.0 AND START ANEW.
YOU ARE ADDICTED TO MAGERY. USE WANDS IMMEDIATELY.
YOU ARE ADDICTED TO POTIONS. DRINK THEM IMMEDIATELY.
YOU ARE ADDICTED TO READING. USE SCROLLS IMMEDIATELY.
YOU ARE AFRAID OF COMMITMENT - NEVER EXCEED PIETY *** WITH ANY GOD.
YOU ARE AFRAID OF DOORS AND NEVER OPEN THEM YOURSELF.
YOU ARE AFRAID OF ESCAPE HATCHES - ONLY USE STAIRS.
YOU ARE AFRAID OF GHOSTS - NO ENGAGING WITH YOUR DEAD CHARACTERS.
YOU ARE AFRAID OF SHARP THINGS - NO USING SHORT BLADES, LONG BLADES, OR AXES.
YOU ARE AFRAID OF STAIRS - ONLY USE PORTALS, ARCHES, AND ESCAPE HATCHES.
YOU ARE AN INDIAN GIVER - ALWAYS RETRIEVE NON-DESTROYED THROWN ITEMS.
YOU ARE BELLIGERENT - FOCUS ONLY FIGHTING UNTIL IT'S AT 27.
YOU ARE CARNIVOROUS - NO BREAD RATIONS OR FRUITS.
YOU ARE CAUTIOUS - VISIT EACH FLOOR BY ALL THREE STAIRCASES BEFORE STEPPING OFF THE STAIRS.
YOU ARE CLAUSTROPHOBIC - ONLY REST/FIGHT IN THE OPEN.
YOU ARE CLUMSY - NEVER INCREASE AGL.
YOU ARE COMPLACENT - PLAY IN AN STYLE OPTIMIZED FOR YOUR COMBINATION.
YOU ARE DEFIANT - RENOUNCE RELIGION IF YOU HAVE IT, THEN REMAIN ATHEIST.
YOU ARE DIABETIC - NO BREAD RATIONS, FRUIT, OR ROYAL JELLY.
YOU ARE EASILY DISORIENTED - NO BLINK OR TELEPORT.
YOU ARE FICKLE - JOIN EVERY ALTAR YOU FIND.
YOU ARE FOCUSED - TURN OFF ALL BUT ONE SKILL UNTIL IT'S MAXED OUT.
YOU ARE FOND OF (melee weapon)S.
YOU ARE FOND OF (ranged weapon)S.
YOU ARE FOND OF KUNG FU MOVIES - FIGHT ONLY WITH UNARMED COMBAT.
YOU ARE FOND OF MAGICAL CONTAMINATION - WHEN IT FADES, REAPPLY IT.
YOU ARE FOND OF THE VESTIGIAL - ONLY MEMORISE SPELLS WHICH HAVE A 100% FAIL RATE.
YOU ARE FOND OF UNDERDOGS - ALWAYS WEAR GEAR WITH NEGATIVE ENCHANTMENTS. (UNLESS SERVING ASHENZARI)
YOU ARE FRUGAL - NO SHOPS.
YOU ARE GRANDIOSE - ONLY WEAR ARTEFACTS.
YOU ARE HAUGHTY - CHARGE DIRECTLY INTO DETECTED TRAPS.
YOU ARE HUMBLE - ONLY WEAR NON-ARTEFACTS.
YOU ARE ILLITERATE - NO SCROLLS.
YOU ARE LAZY - NEVER CHANGE YOUR SKILL SETUP FROM WHAT YOU START WITH.
YOU ARE MISERLY - NO SPENDING GOLD ON ANYTHING.
YOU ARE MYOPIC - NEVER USE 'AUTOEXPLORE'.
YOU ARE NEUROTIC - ONLY MOVE IN DIAGONAL PATHS. (NO 1X1 CORRIDORS)
YOU ARE NOMADIC - NEVER USE 'REST & HEAL'.
YOU ARE OBSESSIVE - ONLY MOVE IN NON-DIAGONAL PATHS. (NO KILL HOLES)
YOU ARE ORNERY - NEVER INCREASE INT.
YOU ARE OVERCONFIDENT - WHEN YOU WIELD A WEAPON OR LEARN A SPELL, UNFOCUS ITS ASSOCIATED SKILL(S).
YOU ARE POOR - NO JEWELRY.
YOU ARE PRONE TO HALF-ASSERY - NEVER FOCUS ANY SKILLS.
YOU ARE PRONE TO TUNNEL-VISION - NEVER ACTIVATE MORE THAN ONE SKILL AT A TIME.
YOU ARE RESOURCEFUL TO A FAULT - TURN ON ALL POSSIBLE SKILLS, ACTIVATING ANY THAT OPEN UP.
YOU ARE SCARED OF EVEN SMALL HEIGHTS - NO FLIGHT OR LEVITATION.
YOU ARE SUPERSTITIOUS - NO MAGIC.
YOU ARE UNCOORDINATED - NO WANDS.
YOU ARE VEGAN - NO MEAT RATIONS, CHUNKS, BEEF JERKY, OR ROYAL JELLY.
YOU ARE WEAK - NEVER INCREASE STR.
YOU DON'T TRUST (color)-COLORED OR (adjective) POTIONS - NEVER DRINK THEM.
YOU DON'T TRUST SCROLLS WITH THE LETTER (random from A to Z) IN THEIR NAMES - NEVER READ THEM.
YOU FELL ASLEEP ON YOUR ARM RECENTLY - NO USING/TRAINING THROWING OR SLINGS.
YOU FIGHT ON EQUAL TERMS - WHEN ENGAGING A FOE, MATCH ITS CHOICE OF WEAPON WHEN POSSIBLE.
YOU GOT DROPPED ON YOUR HEAD AND THINK YOU'RE A (background).
YOU HATE (monster)S AND ALWAYS PRIORITIZE KILLING THEM.
YOU HATE FEELING YOUR SKIN CRAWL - NO REGENERATION.
YOU HATE GOLD - TURN OFF AUTOPICKUP FOR IT.
YOU HATE LEAVING EMPTY-HANDED - IF A SHOP HAS SOMETHING YOU CAN AFFORD IN IT, BUY IT.
YOU HAVE A GAMBLING PROBLEM. MOVE WITH AUTOEXPLORE, FIGHT WITH TAB.
YOU HAVE A MALFUNCTION IN YOUR MEDULLA OBLONGATA - NEVER RUN FROM FIGHTS.
YOU HAVE POSH TASTES - ONLY EAT PERMAFOOD.
YOU HAVE REVERSE REFEEDING SYNDROME - ONLY EAT WHEN STARVING.
YOU LIKE ASHENZARI'S PHILOSOPHY - WIELD ONLY CURSED EQUIPMENT.
YOU LIKE CHEIBRIADOS' PHILOSOPHY - NEVER USE AGILITY POTIONS OR HASTE.
YOU LIKE DITHMENOS' PHILOSOPHY - NEVER USE FIRE-BASED WEAPONS, AMMO, SPELLS, OR LAMPS.
YOU LIKE FEDHAS' PHILOSOPHY - NEVER ATTACK PLANTS OR USE CORPSE-VIOLATING SPELLS.
YOU LIKE JIYVA'S PHILOSOPHY - SPREAD CLUTTER EVERYWHERE AND ACQUIRE MUTATIONS.
YOU LIKE LUGONU'S PHILOSOPHY - WHEN A CHANCE TO ENTER THE ABYSS PRESENTS ITSELF, TAKE IT.
YOU LIKE OKAWARU'S PHILOSOPHY - HUNT PREFERENTIALLY FOR 'DANGEROUS' AND 'EXTREMELY DANGEROUS' MOBS.
YOU LIKE POINTLESSNESS - WEAR ITEMS WHICH ARE USELESS TO YOUR BUILD AND STRATEGY.
YOU LIKE QAZLAL'S PHILOSOPHY - NEVER TRAIN STEALTH.
YOU LIKE THE SHINING ONE'S PHILOSOPHY - NO CANNIBALISM, NECROMANCY, UNHOLY MAGIC/ITEMS, POISON, OR UNCHIVALRIC FIGHTING.
YOU LIKE TO WASTE YOUR POTENTIAL - WASTE YOUR ADVANTAGES, POTION EFFECTS, AND SO ON.
YOU LIKE TROG'S PHILOSOPHY - NEVER USE SPELL MAGIC.
YOU LIKE XOM'S PHILOSOPHY - NEVER USE IDENTIFY SCROLLS.
YOU LIKE YREDELEMNUL'S PHILOSOPHY - NEVER USE HOLY WRATH, HOLY WORD, OR STATUE FORM.
YOU LIKE ZIN'S PHILOSOPHY - NO CANNIBALISM, DESECRATION, UNHOLY ITEMS/MAGIC, ATTACKING NONHOSTILES OR ALLIES, OR EATING SENTIENT BEINGS.
YOU LIVE DANGEROUSLY - ONLY IDENTIFY ITEMS BY PUTTING THEM ON.
YOU PLAY TO YOUR STRENGTHS - TRAIN YOUR HIGHEST-APTITUDE SKILLS.
YOU PLAY TO YOUR WEAKNESSES - TRAIN YOUR LOWEST-APTITUDE SKILLS.
YOU REFUSE TO KILL (race)S.
YOU REFUSE TO KILL (monster)S.
YOU THINK ODD NUMBERS ARE UNLUCKY - ON ODD-NUMBERED TURNS, YOU MAY ONLY MOVE OR WAIT.


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
User avatar

Abyss Ambulator

Posts: 1249

Joined: Sunday, 18th September 2011, 02:11

Post Monday, 7th March 2016, 19:26

Re: DCSS Challenge Generator Thing

This sounds awesome. Thanks for posting it! I'd love to see the whole source. Always good to see more projects like this around.
User avatar

Snake Sneak

Posts: 91

Joined: Monday, 7th March 2016, 19:10

Post Monday, 7th March 2016, 20:22

Re: DCSS Challenge Generator Thing

Cheers. I'm going to write a more advanced one with exceptions and the like (so it won't ask for invalid combinations). My bot runs on mIRC 7.38 but the logic should be easy to duplicate. Actually, I think this whole thing could be easily replicated with HTML, but probably not on the page here within the thread. I'll have a go at that later on.

The only code right now is this bit. You type .random and the bot invokes the command:
On 1:TEXT:.random*:#: { msg $chan $read(dcss0.txt) | halt }

dcss0.txt is the templates file with the 3 Crawl and 1 Sprint scenario in it. Every time $read names a file, a random line gets picked for me. So the rest of the 'code' is really a matter of structuring the text files full of data the way you want, then using the right $read commands to impart context to whatever rambly sentence you have typed. Joyous!

OTHER THINKEROOS I HAVE HAD:
- unoptimized character generator (tells you the worst combinations it can think of, using knowledge of aptitudes)
- suicide generator (tells you how to off a character you are sick of)
- arena mode scenario generator (implemented)
Creates amusing fight scenarios so we can watch 'em play out. You can gamble on the different monster groups.
Spoiler: show
Zephram> .ssarena
Razma> 19 JUMPING SPIDER v 14 SIMULACRUM ; BROAD AXE:DRAINING
Zephram> simulacrums won by a landslide

Zephram> .ssarena
Razma> 66 MOTH OF WRATH v 30 ELF ; DAGGER:PROTECTION
Zephram> moths won that one, natch :D

Zephram> .ssarena
Razma> 85 GERYON v 28 GHOUL
Zephram> https://dl.dropboxusercontent.com/u/156 ... arena3.png
good grief
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.

Return to Crazy Yiuf's Corner

Who is online

Users browsing this forum: No registered users and 18 guests

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