And, while on the topic, of monster speech:
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3465 c06c8d41-db1a-0410-9941-cceddc491573
G7CTMQ3VNTAB73ZI3LNZHKTAJ5LEQEGG772MVFQQ5XXLCMJVORTQC
3RR5RASA63JOMIHQONIMP55RFG4AJW4GWFAUWN65OECAFTCQY3PQC
INGL6QIRRFTJFPGB2BLJBFFWIJ6RQF7KDR5K5CWZY6DWKWIMKJ3AC
EJKHYV2Z6UPRVYUAL4WRW33GBNHYBFPMPA57HMBX2LQKXHIUO5VQC
UL7XFKMUX3WIU4O2LZANK4ECJ654UZPDBFGNXUEYZYOLKBYBCG6AC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
3QLM46S44Z7GDLWPH3VHBMW2RSWZAOLGJMG2BDKNGUOZIM4IX6WAC
J6APXOT4QOGQFONWB7G546VTVF6QG42HVOROMHF7YBDJPR4K26OAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
E5DMZFW6WCFAKTKKOQPYTQXZ2CGLWMVH64LRXDUI2UIG4VYUHIVQC
YCL3W2PFE6ILTGBFODCSXNPDIA46KVSZP2TI7HDMYAOEJT65RIEAC
74LQ7JXVLAFSHLI7LCBKFX47CNTYSKGUQSXNX5FCIUIGCC2JTR3QC
X7TRUBJTRDVUI53BROBYHF4UDC4I5SUYWBUOGQMZNN2WEZAFVGVQC
RBAGQ2PB7V5YAM5KSHSZR2E3MLKDSRVM5XYGI2TIXP5QMVBOQHDQC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
7Y5HSDFKA5TPLS2TWTRFMQVX6UXUDHXU5MUMXQSDFAIY4THQ3BIQC
Y56C5OMUQ5XF2G6DKDV4R5MED44UOIUPTBBQVWQBUHYIXYA5MOZAC
QHUJATUWL3I7TJOLOY55LPZSAU3EB5X2AKRKTBVN7VSZD527VAXQC
3ZNI2YMHYXRVEONY5CGWXSRMFSLOATZMKU7H6HRY3CC2W6OZAM7QC
KR655YT3I3U5DMN5NS3FPUGMDNT4BI56K3SFF2FNJ77C45NFKL5AC
BMHUBADDGIOZRVN4P3O5QKIDUYD4RFWBS7MP5X6LZWAYHUBRVD2QC
652WD4FIJ7E2WV2M2RSIJXVKZULJHKMRMH7P3DKXLUX6WLEZLY3AC
AIIVH43Z5X3GTPFY4FXQRZPG6Y7QPH2KJ47VM2Q43PCGGD5MTMOAC
FYD4A5TIETIV2ZLFYWGHXANU6WQFKMVREHM7OZY2TAXSBMMCDLJAC
#ifndef INSULT_H
#define INSULT_H
#include "externs.h"
const char * generic_insult(void);
const char * racial_insult(void);
#endif
std::string imp_taunt_str();
std::string demon_taunt_str();
void imp_taunt( const monsters *mons );
void demon_taunt( const monsters *mons );
// insult generator
// Josh Fishman (c) 2001, All Rights Reserved
// This file is released under the GNU GPL, but special permission is granted
// to link with Linley Henzel's Dungeon Crawl (or Crawl) without change to
// Crawl's license.
//
// The goal of this stuff is catachronistic feel.
#include "AppHdr.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "externs.h"
#include "insult.h"
#include "mon-util.h"
#include "stuff.h"
static const char* insults1(void);
static const char* insults2(void);
static const char* insults3(void);
static const char* run_away(void);
static const char* give_up(void);
static const char* meal(void);
static const char* whilst_thou_can(void);
static const char* important_body_part(void);
static const char* important_spiritual_part(void);
static void init_cap(char *);
void init_cap(char * str)
{
if (str != NULL)
str[0] = toupper( str[0] );
}
{
char buff[80];
snprintf( buff, sizeof(buff),
"%s, thou %s!",
random2(7) ? run_away() : give_up(),
generic_insult() );
init_cap( buff );
// XXX: Not pretty, but stops truncation...
{
}
else
{
}
}
{
char buff[80];
if (coinflip())
{
snprintf( buff, sizeof(buff),
"%s, thou %s!",
random2(3) ? give_up() : run_away(),
generic_insult() );
}
else
{
switch( random2( 4 ) )
{
case 0:
snprintf( buff, sizeof(buff),
"Thy %s shall be my %s!",
random2(4) ? important_body_part()
: important_spiritual_part(), meal() );
break;
case 1:
snprintf( buff, sizeof(buff),
"%s, thou tasty %s!", give_up(), meal() );
break;
case 2:
snprintf( buff, sizeof(buff),
"%s %s!", run_away(), whilst_thou_can() );
break;
case 3:
snprintf( buff, sizeof(buff),
"I %s %s thy %s!",
coinflip() ? "will" : "shall",
coinflip() ? "feast upon" : "devour",
random2(4) ? important_body_part()
: important_spiritual_part() );
break;
default:
snprintf( buff, sizeof(buff), "Thou %s!", generic_insult() );
break;
}
}
init_cap( buff );
// XXX: Not pretty, but stops truncation...
{
}
else
{
}
}
const char * generic_insult(void)
{
static char buffer[80]; //FIXME: use string objects or whatnot
strcpy(buffer, insults1());
strcat(buffer, " ");
strcat(buffer, insults2());
strcat(buffer, " ");
strcat(buffer, insults3());
return (buffer);
}
static const char * important_body_part(void)
{
static const char * part_list[] = {
"head",
"brain",
"heart",
"viscera",
"eyes",
"lungs",
"liver",
"throat",
"neck",
"skull",
"spine",
};
return (part_list[random2(sizeof(part_list) / sizeof(char *))]);
}
static const char * important_spiritual_part(void)
{
static const char * part_list[] = {
"soul",
"spirit",
"inner light",
"hope",
"faith",
"will",
"heart",
"mind",
"sanity",
"fortitude",
"life force",
};
return (part_list[random2(sizeof(part_list) / sizeof(char *))]);
}
static const char * meal(void)
{
static const char * meal_list[] = {
"meal",
"breakfast",
"lunch",
"dinner",
"supper",
"repast",
"snack",
"victuals",
"refection",
"junket",
"luncheon",
"snackling",
"curdle",
"snacklet",
"mouthful",
};
return (meal_list[random2(sizeof(meal_list) / sizeof(char *))]);
}
static const char * run_away(void)
{
static const char * run_away_list[] = {
"give up",
"quit",
"run away",
"escape",
"flee",
"fly",
"take thy face hence",
"remove thy stench",
"go and return not",
"get thee hence",
"back with thee",
"away with thee",
"turn tail",
"leave",
"return whence thou came",
"begone",
"get thee gone",
"get thee hence",
"slither away",
"slither home",
"slither hence",
"crawl home",
"scamper home",
"scamper hence",
"scamper away",
"bolt",
"decamp",
};
return (run_away_list[random2(sizeof(run_away_list) / sizeof(char *))]);
}
static const char * give_up(void)
{
static const char * give_up_list[] = {
"give up",
"give in",
"quit",
"surrender",
"kneel",
"beg for mercy",
"despair",
"submit",
"succumb",
"quail",
"embrace thy failure",
"embrace thy fall",
"embrace thy doom",
"embrace thy dedition",
"embrace submission",
"accept thy failure",
"accept thy fall",
"accept thy doom",
"capitulate",
"tremble",
"relinquish hope",
"taste defeat",
"despond",
"disclaim thyself",
"abandon hope",
"face thy requiem",
"face thy fugue",
"admit defeat",
"flounder",
};
return (give_up_list[random2(sizeof(give_up_list) / sizeof(char *))]);
}
static const char * whilst_thou_can(void)
{
static const char * threat_list[] = {
"whilst thou can",
"whilst thou may",
"whilst thou are able",
"if wit thou hast",
"whilst thy luck holds",
"before doom catcheth thee",
"lest death find thee",
"whilst thou art whole",
"whilst life thou hast", //jmf: hmm. screen vs. this for undead?
};
return (threat_list[random2(sizeof(threat_list) / sizeof(char *))]);
}
static const char * insults1(void)
{
static const char * insults1_list[] = {
"artless",
"baffled",
"bawdy",
"beslubbering",
"bootless",
"bumbling",
"canting",
"churlish",
"cockered",
"clouted",
"craven",
"currish",
"dankish",
"dissembling",
"droning",
"ducking",
"errant",
"fawning",
"feckless",
"feeble",
"fobbing",
"foppish",
"froward",
"frothy",
"fulsome",
"gleeking",
"goatish",
"gorbellied",
"grime-gilt",
"horrid",
"hateful",
"impertinent",
"infectious",
"jarring",
"loggerheaded",
"lumpish",
"mammering",
"mangled",
"mewling",
"odious",
"paunchy",
"pribbling",
"puking",
"puny",
"qualling",
"quaking",
"rank",
"pandering",
"pecksniffian",
"plume-plucked",
"pottle-deep",
"pox-marked",
"reeling-ripe",
"rough-hewn",
"simpering",
"spongy",
"surly",
"tottering",
"twisted",
"unctious",
"unhinged",
"unmuzzled",
"vain",
"venomed",
"villainous",
"warped",
"wayward",
"weedy",
"worthless",
"yeasty",
};
return (insults1_list[random2(sizeof(insults1_list) / sizeof(char*))]);
}
static const char * insults2(void)
{
static const char * insults2_list[] = {
"base-court",
"bat-fowling",
"beef-witted",
"beetle-headed",
"boil-brained",
"clapper-clawed",
"clay-brained",
"common-kissing",
"crook-pated",
"dismal-dreaming",
"ditch-delivered",
"dizzy-eyed",
"doghearted",
"dread-bolted",
"earth-vexing",
"elf-skinned",
"fat-kidneyed",
"fen-sucked",
"flap-mouthed",
"fly-bitten",
"folly-fallen",
"fool-born",
"full-gorged",
"guts-griping",
"half-faced",
"hasty-witted",
"hedge-born",
"hell-hated",
"idle-headed",
"ill-breeding",
"ill-nurtured",
"kobold-kissing",
"knotty-pated",
"limp-willed",
"milk-livered",
"moon-mazed",
"motley-minded",
"onion-eyed",
"miscreant",
"roguish",
"moldwarp",
"ruttish",
"mumble-news",
"saucy",
"nut-hook",
"spleeny",
"pigeon-egg",
"rude-growing",
"rump-fed",
"shard-borne",
"sheep-biting",
"sow-suckled",
"spur-galled",
"swag-bellied",
"tardy-gaited",
"tickle-brained",
"toad-spotted",
"toenail-biting",
"unchin-snouted",
"weather-bitten",
"weevil-witted",
};
return (insults2_list[random2(sizeof(insults2_list) / sizeof(char*))]);
}
static const char * insults3(void)
{
static const char * insults3_list[] = {
"apple-john",
"baggage",
"bandersnitch",
"barnacle",
"beggar",
"bladder",
"boar-pig",
"bounder",
"bugbear",
"bum-bailey",
"canker-blossom",
"clack-dish",
"clam",
"clotpole",
"coxcomb",
"codpiece",
"death-token",
"dewberry",
"dingleberry",
"flap-bat",
"flax-wench",
"flirt-gill",
"foot-licker",
"fustilarian",
"giglet",
"gnoll-tail",
"gudgeon",
"guttersnipe",
"haggard",
"harpy",
"hedge-pig",
"horn-beast",
"hugger-mugger",
"joithead",
"lewdster",
"lout",
"maggot-pie",
"malt-worm",
"mammet",
"measle",
"mendicant",
"minnow reeky",
"mule",
"nightsoil",
"nobody",
"nothing",
"pigeon-egg",
"pignut",
"pimple",
"pustule",
"puttock",
"pumpion",
"ratsbane",
"scavenger",
"scut",
"simpleton",
"skainsmate",
"slime mold",
"snaffler",
"snake-molt",
"strumpet",
"surfacer",
"tinkerer",
"tiddler",
"urchin",
"varlet",
"vassal",
"vulture",
"wastrel",
"wagtail",
"whey-face",
"wormtrail",
"yak-dropping",
"zombie-fodder",
};
return (insults3_list[random2(sizeof(insults3_list) / sizeof(char*))]);
}
// currently unused:
#if 0
const char * racial_insult(void)
{
static const char * food3[] = {
"snackling",
"crunchlet",
"half-meal",
"supper-setting",
"snacklet",
"noshlet",
"morsel",
"mug-up",
"bite-bait",
"crunch-chow",
"snack-pap",
"grub",
};
static const char * elf1[] = {
"weakly",
"sickly",
"frail",
"delicate",
"fragile",
"brittle",
"tender",
"mooning",
"painted",
"lily-hearted",
"dandy",
"featherweight",
"flimsy",
"rootless",
"spindly",
"puny",
"shaky",
"prissy",
};
static const char * halfling3[] = {
"half-pint",
"footstool",
"munchkin",
"side-stool",
"pudgelet",
"groundling",
"burrow-snipe",
"hole-bolter",
"low-roller",
"runt",
"peewee",
"mimicus",
"manikin",
"hop-o-thumb",
"knee-biter",
"burrow-botch",
"hole-pimple",
"hovel-pustule",
};
static const char * spriggan3[] = {
"rat-rider",
"mouthfull",
"quarter-pint",
"nissette",
"fizzle-flop",
"spell-botch",
"feeblet",
"weakling",
"pinchbeck-pixie",
"ankle-biter",
"bootstain",
"nano-nebbish",
"sopling",
"shrunken violet",
"sissy-prig",
"pussyfoot",
"creepsneak",
};
static const char * dwarf2[] = {
"dirt-grubbing",
"grit-sucking",
"muck-plodding",
"stone-broke",
"pelf-dandling",
"fault-botching",
"gravel-groveling",
"boodle-bothering",
"cabbage-coddling",
"rhino-raveling",
"thigh-biting",
"dirt-delving",
};
static const char * kenku2[] = {
"hollow-boned",
"feather-brained",
"beak-witted",
"hen-pecked",
"lightweight",
"frail-limbed",
"bird-brained",
"featherweight",
"pigeon-toed",
"crow-beaked",
"magpie-eyed",
"mallardish",
};
static const char * minotaur3[] = {
"bull-brain",
"cud-chewer",
"calf-wit",
"bovine",
//"mooer", // of Venice
"cow",
"cattle",
"meatloaf",
"veal",
"meatball",
"rump-roast",
"briscut",
"cretin",
"walking sirloin",
};
switch (you.species)
{
default:
break;
}
}
#endif
"serf",
mprf(MSGCH_TALK, "%s %s, \"%s\"", mon_name.c_str(), voice,
str.c_str() );
mprf(MSGCH_TALK, "%s %s:", mon_name.c_str(), voice );
mprf(MSGCH_TALK, "%s", str.c_str());
if (mon_name.length() + strlen(voice) + str.length() + 5 >= 79)
void demon_taunt( const monsters *mons )
{
std::string str = demon_taunt_str();
const std::string mon_name = mons->name(DESC_CAP_THE);
static const char * sound_list[] =
{
"says", // actually S_SILENT
"shouts",
"barks",
"shouts",
"roars",
"screams",
"bellows",
"screeches",
"buzzes",
"moans",
"whines",
"croaks",
"growls",
"hisses",
"breathes", // S_VERY_SOFT
"whispers", // S_SOFT
"says", // S_NORMAL
"shouts", // S_LOUD
"screams" // S_VERY_LOUD
};
const char *voice = sound_list[ mons_shouts(mons->type) ];
return (buff);
}
std::string demon_taunt_str()
mprf(MSGCH_TALK, "%s shouts, \"%s\"", mon_name.c_str(),
str.c_str() );
mprf(MSGCH_TALK, "%s shouts:", mon_name.c_str() );
mprf(MSGCH_TALK, "%s", str.c_str() );
if (mon_name.length() + 11 + str.length() >= 79)
return (buff);
}
void imp_taunt( const monsters *mons )
{
std::string str = imp_taunt_str();
std::string mon_name = mons->name(DESC_CAP_THE);
std::string imp_taunt_str()
//
// Modified for Crawl Reference by $Author$ on $Date$
static std::string get_species_insult(const std::string type)
{
std::string lookup = "insult ";
// get species genus
lookup += species_name(you.species, 1, true);
lookup += " ";
lookup += type;
std::string insult = getSpeakString(lowercase(lookup));
if (insult.empty()) // species too specific?
{
lookup = "insult general ";
lookup += type;
insult = getSpeakString(lookup);
}
return (insult);
}
msg = replace_all(msg, "@imp_taunt@", imp_taunt_str());
msg = replace_all(msg, "@demon_taunt@", demon_taunt_str());
// replace with species specific insults
msg = replace_all(msg, "@species_insult_adj1@", get_species_insult("adj1"));
msg = replace_all(msg, "@species_insult_adj2@", get_species_insult("adj2"));
msg = replace_all(msg, "@species_insult_noun@", get_species_insult("noun"));
if (!speakDB)
{
std::string speakPath = get_savedir_path(SPEAK_DB);
std::vector<std::string> textPaths = speak_txt_paths();
// If any of the speech text files are newer then
// aggregated speak db, then regenerate the whole db
for (int i = 0, size = textPaths.size(); i < size; i++)
if (is_newer(textPaths[i], speakPath))
{
generate_speak_db();
break;
}
unlink( full_db_path.c_str() );
for (int i = 0, size = txt_paths.size(); i < size; i++)
store_text_db(txt_paths[i], db_path);
DO_CHMOD_PRIVATE(full_db_path.c_str());
}
static std::vector<std::string> speak_txt_paths()
{
std::vector<std::string> txt_file_names;
std::vector<std::string> paths;
txt_file_names.push_back("speak"); // monster speech
txt_file_names.push_back("noise"); // noisy weapon speech
txt_file_names.push_back("insult"); // imp/demon taunts
for (int i = 0, size = txt_file_names.size(); i < size; i++)
{
std::string name = DATABASE_TXT_DIR;
name += FILE_SEPARATOR;
name += txt_file_names[i];
name += ".txt";
std::string txt_path = datafile_path(name);
if (!txt_path.empty())
paths.push_back(txt_path);
}
return (paths);
}
static void generate_speak_db()
{
std::string db_path = get_savedir_path(SPEAK_BASE_NAME);
std::string full_db_path = get_savedir_path(SPEAK_DB);
std::vector<std::string> txt_paths = speak_txt_paths();
file_lock lock(get_savedir_path(SPEAK_BASE_NAME ".lk"), "wb");
%%%%
##############################################
##############################################
# Weapons that make noises.
##############################################
# The Singing Sword loves to sing and sometimes talks.
singing sword
w:4
@weapon_sings@
w:1
@weapon_talks@
%%%%
# Noisy weapons like to chatter and imitate dungeon noises.
noisy weapon
w:2
@weapon_talks@
w:1
SOUND:You hear @weapon_noise@
%%%%
# for the Singing Sword only!
weapon_sings
#sings
@The_weapon@ hums a little @tune_or_melody@.
@The_weapon@ breaks into glorious song!
@The_weapon@ sings.
@The_weapon@ sings loudly.
@The_weapon@ sings off-key.
@The_weapon@ sings, "Tra-la-la..."
@The_weapon@ sings a lullaby.
@The_weapon@ whines plaintively.
@The_weapon@ wails mournfully.
@The_weapon@ practices its scales.
@The_weapon@ lilts tunefully.
@The_weapon@ yodels.
@The_weapon@ hums tunelessly.
@The_weapon@ makes a painfully high-pitched squeak.
@The_weapon@ sings a sudden staccato note.
@The_weapon@ sings a catchy @tune_or_melody@.
@The_weapon@ hums a slow waltz.
@The_weapon@ whistles merrily.
#Beethoven
@The_weapon@ goes "Da-da-da-dum".
@The_weapon@ chants serenely.
@The_weapon@ trills happily.
@The_weapon@ chants a little melody.
@The_weapon@ sings a deeply moving song.
@The_weapon@ hums an eerie @tune_or_melody@.
@The_weapon@ hums a slow and mournful tune.
@The_weapon@ launches into yet another solo.
@The_weapon@ strikes up a merry @tune_or_melody@.
@The_weapon@ emits a series of high-pitched trills.
@The_weapon@ composes a new song.
@The_weapon@ makes a sound as if to clear its throat.
@The_weapon@ sings a quivering drawn-out note.
@The_weapon@ sings a little jingle.
@The_weapon@ strikes up a funeral march.
@The_weapon@ merrily whistles a melody.
In a hysterical voice, @the_weapon@ strikes up a march.
@The_weapon@ sings @several@ chords at once.
@The_weapon@ trains the @kind_of_scales@ scales.
@The_weapon@ pulls out all the stops.
@The_weapon@ sets up a furious crescendo.
@The_weapon@ plays a requiem for the unknown sword.
@The_weapon@ strikes up a @dance@.
@The_weapon@ intones @an_aria_or_fugue@.
@The_weapon@ @nearly_or_clearly@ @hits_or_misses@ the concert pitch.
#imitates instruments
@The_weapon@ makes a twanging sound.
@The_weapon@ chimes melodiously.
@The_weapon@ chimes harmoniously.
@The_weapon@ makes beautiful music.
@The_weapon@ produces a loud orchestral chord.
@The_weapon@ tinkles.
@The_weapon@ rings like a bell.
@The_weapon@ imitates a saxophone.
@The_weapon@ chimes like a gong.
@The_weapon@ applauds itself.
@The_weapon@ goes toot-toot!
@The_weapon@ does a drum roll.
@The_weapon@ holds a dissonant chord.
@The_weapon@ beats time.
#speaks
@The_weapon@ says, "Hi! I'm the Singing Sword!"
@The_weapon@ shouts, "Sing along with me!"
@The_weapon@ shouts, "One, two, three..."
@The_weapon@ spouts musical wisdom.
@The_weapon@ chants, "I am golden and pointed, and with blood well anointed."
@The_weapon@ dictates a lengthy tome entitled 'The Well-Tempered Blade'.
@The_weapon@ @points_out@ the lack of singing @not_swords@.
@The_weapon@ embarks on a lenghty monologue about murderous music.
@The_weapon@ curses its smith: "I was supposed to be the Stinging Sword!"
@The_weapon@ muses how they don't make such fine swords anymore.
@The_weapon@ tries to improvise rhymes, and fails miserably.
@The_weapon@ complains about @double_or_triple@ swords.
@The_weapon@ derides short swords.
@The_weapon@ yells, "Ploughshares to swords!" and giggles.
@The_weapon@ chants, "Rather stab than club, rather slice than rub!"
# end Singing Sword
# general chatter for noisy weapons,
# including Singing Sword
weapon_talks
#speaks
@Your_weapon@ shouts, "Whoopee!"
@Your_weapon@ argues with itself.
@Your_weapon@ complains about the scenery.
@Your_weapon@ says, "I'm bored."
@Your_weapon@ shouts out instructions!
@Your_weapon@ says, "Ssh! Did you hear that?"
@Your_weapon@ cheers you on.
@Your_weapon@ calls out a warning!
@Your_weapon@ hurls insults at you.
@Your_weapon@ chatters happily.
@Your_weapon@ recites a poem.
@Your_weapon@ prattles on and on.
@Your_weapon@ regales you with its life story.
@Your_weapon@ speaks gibberish.
@Your_weapon@ raves incoherently.
@Your_weapon@ shouts, "Help!"
@Your_weapon@ happily shouts, "Violence is virtue, silence is sin."
@Your_weapon@ says, "They will have to pry me from your cold, dead hands."
@Your_weapon@ longs back for the days in the arena.
#song by the Misfits
@Your_weapon@ asks plaintively, "Mommy, can I go out and kill tonight?"
@Your_weapon@ cries, "Don't ditch me yet! I promise to be forever silent."
@Your_weapon@ amuses itself with detailed descriptions of past executions.
@Your_weapon@ wails, "I am too young to rust!"
@Your_weapon@ wishes everyone in the dungeon @unpleasant_or_sudden@ @demise_or_death@.
@Your_weapon@ fumes, "Being battered, bent and broken sure is better than this boredom!"
@Your_weapon@ yells, "No battle, no fun!"
@Your_weapon@ shouts, "This level is mine! Um, ours."
@Your_weapon@ cracks jokes of @questionable@ humour.
@Your_weapon@ dwells on sagas on the glory of old.
@Your_weapon@ belts out, "Dying in battle is most honourable!"
@Your_weapon@ gleefully confesses its misdeeds.
@Your_weapon@ groans, "That's what you call fighting?"
@Your_weapon@ shouts, "Left! No, no, right!".
@Your_weapon@ says, "How I wish you were a better fighter."
@Your_weapon@ grouses, "Could you please kill something? I'm itching all over."
@Your_weapon@ shouts, "Make war, not love!"
#makes noises
@Your_weapon@ growls menacingly.
@Your_weapon@ sputters and hisses.
@Your_weapon@ hollers!
@Your_weapon@ pants and wheezes.
@Your_weapon@ barks abruptly.
@Your_weapon@ sighs.
@Your_weapon@ wails.
@Your_weapon@ howls with laughter!
@Your_weapon@ laughs crazily.
@Your_weapon@ burps!
@Your_weapon@ goes snicker-snack!
@Your_weapon@ lets out a mournful sigh.
@Your_weapon@ yells in some weird language.
@Your_weapon@ makes a horrible noise.
@Your_weapon@ makes a deep moaning sound.
@Your_weapon@ gives off a wolf whistle.
@Your_weapon@ wails.
@Your_weapon@ giggles.
@Your_weapon@ lets out a whoop!
@Your_weapon@ yawns loudly.
@Your_weapon@ intones a prayer.
@Your_weapon@ cries out!
@Your_weapon@ swears loudly.
@Your_weapon@ inquires about your family.
@Your_weapon@ coughs loudly.
@Your_weapon@ burbles away merrily.
@Your_weapon@ gurgles.
@Your_weapon@ suddenly shrieks!
@Your_weapon@ cackles.
@Your_weapon@ warbles.
@Your_weapon@ suddenly bursts into laughter!
@Your_weapon@ snorts.
@Your_weapon@ comments on the weather.
@Your_weapon@ makes a deep, guttural noise.
@Your_weapon@ gives off a sizzling sound.
@Your_weapon@ whistles innocently.
@Your_weapon@ makes a popping sound.
@Your_weapon@ yelps loudly!
@Your_weapon@ lets out a series of bird calls.
# end weapon chatter
%%%%
# noises for weapons with NOISES property (not Singing Sword!)
weapon_noise
#dungeon noises
a shout.
an angry hiss.
a high-pitched scream!
a roar!
a hideous shriek!
a piteous moan.
a screech!
a bellow!
a loud, deep croak!
an angry buzzing noise.
an irritating high-pitched whine.
a splashing noise.
a sizzling sound.
a loud clanging noise!
a grinding noise.
a mighty clap of thunder!
a hideous screaming!
a bark!
a rumbling sound.
a crunching sound.
a distant "Zot"!
the distant roaring of an enraged frog.
# other noises, usually not found in the dungeon
a voice call your name.
a very strange noise.
someone snoring.
the sound of rushing water.
someone calling for help!
strange voices.
a knock.
maniacal laughter.
snatches of song.
a twanging sound.
the chiming of a distant gong.
the tinkle of an enormous bell.
an echo.
the wailing of sirens.
a flourish of trumpets!
# end weapon noises
%%%%
#synonyms for weapon noises
several
several
three or four
a multitude of
%%%%
kind_of_scales
pentatonic
chromatic
diatonic
%%%%
not_swords
clubs
axes
polearms
%%%%
points_out
points out
remarks in passing on
%%%%
dance
bossanova
waltz
menuet
%%%%
an_aria_or_fugue
an aria
a fugue
%%%%
nearly_or_clearly
nearly
clearly
%%%%
hits_or_misses
hits
misses
%%%%
tune_or_melody
tune
melody
%%%%
unpleasant_or_sudden
an unpleasant
a sudden
%%%%
demise_or_death
demise
death
%%%%
questionable
questionable
doubtful
%%%%
double_or_triple
double
triple
%%%%
############################################################
# As of Stone Soup 0.3 the previously hardcoded monster
# speech has been outsourced. This makes changing existing
# messages, and adding new ones really easy.
#
# noise.txt contains the messages of randart weapons with
# the noise property and of the Singing Sword, one of
# Crawl's fixed artefacts.
#
# For an explanation of how to read noise.txt and how to
# add new messages, see monster_speech.txt in the docs
# directory
############################################################
%%%%
############################################################
# The SINGING SWORD loves to sing and sometimes talks.
############################################################
singing sword
w:4
@weapon_sings@
w:1
@weapon_talks@
%%%%
############################################################
# NOISY WEAPONS like to chatter and imitate dungeon noises.
############################################################
noisy weapon
w:2
@weapon_talks@
w:1
SOUND:You hear @weapon_noise@
%%%%
############################################################
# for the SINGING SWORD only!
############################################################
weapon_sings
#sings
@The_weapon@ hums a little @tune_or_melody@.
@The_weapon@ breaks into glorious song!
@The_weapon@ sings.
@The_weapon@ sings loudly.
@The_weapon@ sings off-key.
@The_weapon@ sings, "Tra-la-la..."
@The_weapon@ sings a lullaby.
@The_weapon@ whines plaintively.
@The_weapon@ wails mournfully.
@The_weapon@ practices its scales.
@The_weapon@ lilts tunefully.
@The_weapon@ yodels.
@The_weapon@ hums tunelessly.
@The_weapon@ makes a painfully high-pitched squeak.
@The_weapon@ sings a sudden staccato note.
@The_weapon@ sings a catchy @tune_or_melody@.
@The_weapon@ hums a slow waltz.
@The_weapon@ whistles merrily.
#Beethoven
@The_weapon@ goes "Da-da-da-dum".
@The_weapon@ chants serenely.
@The_weapon@ trills happily.
@The_weapon@ chants a little melody.
@The_weapon@ sings a deeply moving song.
@The_weapon@ hums an eerie @tune_or_melody@.
@The_weapon@ hums a slow and mournful tune.
@The_weapon@ launches into yet another solo.
@The_weapon@ strikes up a merry @tune_or_melody@.
@The_weapon@ emits a series of high-pitched trills.
@The_weapon@ composes a new song.
@The_weapon@ makes a sound as if to clear its throat.
@The_weapon@ sings a quivering drawn-out note.
@The_weapon@ sings a little jingle.
@The_weapon@ strikes up a funeral march.
@The_weapon@ merrily whistles a melody.
In a hysterical voice, @the_weapon@ strikes up a march.
@The_weapon@ sings @several@ chords at once.
@The_weapon@ trains the @kind_of_scales@ scales.
@The_weapon@ pulls out all the stops.
@The_weapon@ sets up a furious crescendo.
@The_weapon@ plays a requiem for the unknown sword.
@The_weapon@ strikes up a @dance@.
@The_weapon@ intones @an_aria_or_fugue@.
@The_weapon@ @nearly_or_clearly@ @hits_or_misses@ the concert pitch.
#imitates instruments
@The_weapon@ makes a twanging sound.
@The_weapon@ chimes melodiously.
@The_weapon@ chimes harmoniously.
@The_weapon@ makes beautiful music.
@The_weapon@ produces a loud orchestral chord.
@The_weapon@ tinkles.
@The_weapon@ rings like a bell.
@The_weapon@ imitates a saxophone.
@The_weapon@ chimes like a gong.
@The_weapon@ applauds itself.
@The_weapon@ goes toot-toot!
@The_weapon@ does a drum roll.
@The_weapon@ holds a dissonant chord.
@The_weapon@ beats time.
#speaks
@The_weapon@ says, "Hi! I'm the Singing Sword!"
@The_weapon@ shouts, "Sing along with me!"
@The_weapon@ shouts, "One, two, three..."
@The_weapon@ spouts musical wisdom.
@The_weapon@ chants, "I am golden and pointed, and with blood well anointed."
@The_weapon@ dictates a lengthy tome entitled 'The Well-Tempered Blade'.
@The_weapon@ @points_out@ the lack of singing @not_swords@.
@The_weapon@ embarks on a lenghty monologue about murderous music.
@The_weapon@ curses its smith: "I was supposed to be the Stinging Sword!"
@The_weapon@ muses how they don't make such fine swords anymore.
@The_weapon@ tries to improvise rhymes, and fails miserably.
@The_weapon@ complains about @double_or_triple@ swords.
@The_weapon@ derides short swords.
@The_weapon@ yells, "Ploughshares to swords!" and giggles.
@The_weapon@ chants, "Rather stab than club, rather slice than rub!"
# end Singing Sword
%%%%
############################################################
# general chatter for noisy weapons,
# including Singing Sword
############################################################
weapon_talks
#speaks
@Your_weapon@ shouts, "Whoopee!"
@Your_weapon@ argues with itself.
@Your_weapon@ complains about the scenery.
@Your_weapon@ says, "I'm bored."
@Your_weapon@ shouts out instructions!
@Your_weapon@ says, "Ssh! Did you hear that?"
@Your_weapon@ cheers you on.
@Your_weapon@ calls out a warning!
@Your_weapon@ hurls insults at you.
@Your_weapon@ chatters happily.
@Your_weapon@ recites a poem.
@Your_weapon@ prattles on and on.
@Your_weapon@ regales you with its life story.
@Your_weapon@ speaks gibberish.
@Your_weapon@ raves incoherently.
@Your_weapon@ shouts, "Help!"
@Your_weapon@ happily shouts, "Violence is virtue, silence is sin."
@Your_weapon@ says, "They will have to pry me from your cold, dead hands."
@Your_weapon@ longs back for the days in the arena.
#song by the Misfits
@Your_weapon@ asks plaintively, "Mommy, can I go out and kill tonight?"
@Your_weapon@ cries, "Don't ditch me yet! I promise to be forever silent."
@Your_weapon@ amuses itself with detailed descriptions of past executions.
@Your_weapon@ wails, "I am too young to rust!"
@Your_weapon@ wishes everyone in the dungeon @unpleasant_or_sudden@ @demise_or_death@.
@Your_weapon@ fumes, "Being battered, bent and broken sure is better than this boredom!"
@Your_weapon@ yells, "No battle, no fun!"
@Your_weapon@ shouts, "This level is mine! Um, ours."
@Your_weapon@ cracks jokes of @questionable@ humour.
@Your_weapon@ dwells on sagas on the glory of old.
@Your_weapon@ belts out, "Dying in battle is most honourable!"
@Your_weapon@ gleefully confesses its misdeeds.
@Your_weapon@ groans, "That's what you call fighting?"
@Your_weapon@ shouts, "Left! No, no, right!".
@Your_weapon@ says, "How I wish you were a better fighter."
@Your_weapon@ grouses, "Could you please kill something? I'm itching all over."
@Your_weapon@ shouts, "Make war, not love!"
#makes noises
@Your_weapon@ growls menacingly.
@Your_weapon@ sputters and hisses.
@Your_weapon@ hollers!
@Your_weapon@ pants and wheezes.
@Your_weapon@ barks abruptly.
@Your_weapon@ sighs.
@Your_weapon@ wails.
@Your_weapon@ howls with laughter!
@Your_weapon@ laughs crazily.
@Your_weapon@ burps!
@Your_weapon@ goes snicker-snack!
@Your_weapon@ lets out a mournful sigh.
@Your_weapon@ yells in some weird language.
@Your_weapon@ makes a horrible noise.
@Your_weapon@ makes a deep moaning sound.
@Your_weapon@ gives off a wolf whistle.
@Your_weapon@ wails.
@Your_weapon@ giggles.
@Your_weapon@ lets out a whoop!
@Your_weapon@ yawns loudly.
@Your_weapon@ intones a prayer.
@Your_weapon@ cries out!
@Your_weapon@ swears loudly.
@Your_weapon@ inquires about your family.
@Your_weapon@ coughs loudly.
@Your_weapon@ burbles away merrily.
@Your_weapon@ gurgles.
@Your_weapon@ suddenly shrieks!
@Your_weapon@ cackles.
@Your_weapon@ warbles.
@Your_weapon@ suddenly bursts into laughter!
@Your_weapon@ snorts.
@Your_weapon@ comments on the weather.
@Your_weapon@ makes a deep, guttural noise.
@Your_weapon@ gives off a sizzling sound.
@Your_weapon@ whistles innocently.
@Your_weapon@ makes a popping sound.
@Your_weapon@ yelps loudly!
@Your_weapon@ lets out a series of bird calls.
# end weapon chatter
%%%%
############################################################
# noises for weapons with NOISES property (not Singing Sword!)
############################################################
weapon_noise
#dungeon noises
a shout.
an angry hiss.
a high-pitched scream!
a roar!
a hideous shriek!
a piteous moan.
a screech!
a bellow!
a loud, deep croak!
an angry buzzing noise.
an irritating high-pitched whine.
a splashing noise.
a sizzling sound.
a loud clanging noise!
a grinding noise.
a mighty clap of thunder!
a hideous screaming!
a bark!
a rumbling sound.
a crunching sound.
a distant "Zot"!
the distant roaring of an enraged frog.
# other noises, usually not found in the dungeon
a voice call your name.
a very strange noise.
someone snoring.
the sound of rushing water.
someone calling for help!
strange voices.
a knock.
maniacal laughter.
snatches of song.
a twanging sound.
the chiming of a distant gong.
the tinkle of an enormous bell.
an echo.
the wailing of sirens.
a flourish of trumpets!
# end weapon noises
%%%%
############################################################
# synonyms for weapon noises
############################################################
several
several
three or four
a multitude of
%%%%
kind_of_scales
pentatonic
chromatic
diatonic
%%%%
not_swords
clubs
axes
polearms
%%%%
points_out
points out
remarks in passing on
%%%%
dance
bossanova
waltz
menuet
%%%%
an_aria_or_fugue
an aria
a fugue
%%%%
nearly_or_clearly
nearly
clearly
%%%%
hits_or_misses
hits
misses
%%%%
tune_or_melody
tune
melody
%%%%
unpleasant_or_sudden
an unpleasant
a sudden
%%%%
demise_or_death
demise
death
%%%%
questionable
questionable
doubtful
%%%%
double_or_triple
double
triple
%%%%
############################################################
# Outsourced monster speech.
#
# insult.txt contains the messages imps and demons apply in
# Crawl to insult players.
#
# For an explanation of how to read insult.txt and how to
# add new messages, see monster_speech.txt in the docs
# directory
############################################################
%%%%
imp_taunt
@run_or_give_up@, thou @generic_insult@!
%%%%
run_or_give_up
w:6
@run_away@
w:1
@give_up@
%%%%
demon_taunt
w:1
@run_away@, thou @generic_insult@!
w:2
@give_up@, thou @generic_insult@!
w:3
@demon_taunt_special@
%%%%
demon_taunt_special
Thy @body_or_spiritual_part@ shall be my @meal@!
@give_up@, thou tasty @meal@!
@run_away@ @whilst_thou_can@!
I @will_or_shall@ @feast_or_devour@ thy @body_or_spiritual_part@!
# Not currently used:
#Thou @generic_insult@!
%%%%
body_or_spiritual_part
w:3
important_body_part
w:1
important_spiritual_part
%%%%
#######################################################
# generic insults consists of three random parts
#######################################################
generic_insult
@insult_adjective1@ @insult_adjective2@ @insult_noun@
%%%%
important_body_part
head
brain
heart
viscera
eyes
lungs
liver
throat
neck
skull
spine
%%%%
important_spiritual_part
soul
spirit
inner light
hope
faith
will
heart
mind
sanity
fortitude
life force
%%%%
meal
meal
breakfast
lunch
dinner
supper
repast
snack
victuals
refection
junket
luncheon
snackling
curdle
snacklet
mouthful
%%%%
# capitalized "flee" verbs
run_away
Away with thee
Back with thee
Begone
Bolt
Crawl home
Decamp
Escape
Flee
Fly
Get thee gone
Get thee hence
Give up
Go and return not
Leave
Quit
Remove thy stench
Return whence thou came
Run away
Scamper away
Scamper hence
Scamper home
Slither away
Slither hence
Slither home
Take thy face hence
Turn tail
%%%%
# capitalized synonyms for "give up"
give_up
Abandon hope
Accept thy failure
Accept thy fall
Accept thy doom
Admit defeat
Beg for mercy
Capitulate
Despair
Despond
Disclaim thyself
Embrace submission
Embrace thy dedition
Embrace thy doom
Embrace thy failure
Embrace thy fall
Face thy fugue
Face thy requiem
Flounder
Give in
Give up
Kneel
Quail
Quit
Surrender
Succumb
Submit
Tremble
Relinquish hope
Taste defeat
%%%%
whilst_thou_can
whilst thou can
whilst thou may
whilst thou are able
if wit thou hast
whilst thy luck holds
before doom catcheth thee
lest death find thee
whilst thou art whole
# screen vs. this for undead?
whilst life thou hast
%%%%
###############################################################
# adjective1, usually short and/or consisting of one word only
###############################################################
insult_adjective1
w:5
@species_insult_adj1@
@insult general adj1@
%%%%
insult general adj1
artless
baffled
bawdy
beslubbering
bootless
bumbling
canting
churlish
cockered
clouted
craven
currish
dankish
dissembling
droning
ducking
errant
fawning
feckless
feeble
fobbing
foppish
froward
frothy
fulsome
gleeking
goatish
gorbellied
grime-gilt
horrid
hateful
impertinent
infectious
jarring
loggerheaded
lumpish
mammering
mangled
mewling
odious
paunchy
pribbling
puking
puny
qualling
quaking
rank
pandering
pecksniffian
plume-plucked
pottle-deep
pox-marked
reeling-ripe
rough-hewn
simpering
spongy
surly
tottering
twisted
unctious
unhinged
unmuzzled
vain
venomed
villainous
warped
wayward
weedy
worthless
yeasty
%%%%
##########################################################
# adjective1, Elf special
##########################################################
insult elf adj1
weakly
sickly
frail
delicate
fragile
brittle
tender
mooning
painted
lily-hearted
dandy
featherweight
flimsy
rootless
spindly
puny
shaky
prissy
%%%%
###############################################################
# adjective2, usually longer and consisting of two words
###############################################################
insult_adjective2
w:5
@species_insult_adj2@
@insult general adj2@
%%%%
insult general adj2
base-court
bat-fowling
beef-witted
beetle-headed
boil-brained
clapper-clawed
clay-brained
common-kissing
crook-pated
dismal-dreaming
ditch-delivered
dizzy-eyed
doghearted
dread-bolted
earth-vexing
elf-skinned
fat-kidneyed
fen-sucked
flap-mouthed
fly-bitten
folly-fallen
fool-born
full-gorged
guts-griping
half-faced
hasty-witted
hedge-born
hell-hated
idle-headed
ill-breeding
ill-nurtured
kobold-kissing
knotty-pated
limp-willed
milk-livered
miscreant
moon-mazed
motley-minded
moldwarp
mumble-news
nose-picking
nut-hook
onion-eyed
pigeon-egg
roguish
rude-growing
rump-fed
ruttish
saucy
shard-borne
sheep-biting
sow-suckled
spleeny
spur-galled
swag-bellied
tardy-gaited
tickle-brained
toad-spotted
toenail-biting
unchin-snouted
weather-bitten
weevil-witted
%%%%
##########################################################
# adjective2, Dwarf special
##########################################################
insult dwarf adj2
dirt-grubbing
grit-sucking
muck-plodding
stone-broke
pelf-dandling
fault-botching
gravel-groveling
boodle-bothering
cabbage-coddling
rhino-raveling
thigh-biting
dirt-delving
%%%%
##########################################################
# adjective2, Kenku special
##########################################################
insult kenku adj2
hollow-boned
feather-brained
beak-witted
hen-pecked
lightweight
frail-limbed
bird-brained
featherweight
pigeon-toed
crow-beaked
magpie-eyed
mallardish
%%%%
###############################################
# noun of the insult
###############################################
insult_noun
w:5
@species_insult_noun@
@insult general noun@
%%%%
insult general noun
apple-john
baggage
bandersnitch
barnacle
beggar
bladder
boar-pig
bounder
bugbear
bum-bailey
canker-blossom
clack-dish
clam
clotpole
coxcomb
codpiece
death-token
dewberry
dingleberry
flap-bat
flax-wench
flirt-gill
foot-licker
fustilarian
giglet
gnoll-tail
gudgeon
guttersnipe
haggard
harpy
hedge-pig
hugger-mugger
joithead
lewdster
lout
maggot-pie
malt-worm
mammet
measle
mendicant
minnow reeky
mule
nightsoil
nobody
nothing
pigeon-egg
pignut
pimple
pustule
puttock
pumpion
ratsbane
scavenger
scut
serf
simpleton
skainsmate
slime mold
snaffler
snake-molt
strumpet
surfacer
tinkerer
tiddler
urchin
varlet
vassal
vulture
wastrel
wagtail
whey-face
wormtrail
yak-dropping
zombie-fodder
%%%%
##########################################################
# noun, small species special
##########################################################
small_food
snackling
crunchlet
half-meal
supper-setting
snacklet
noshlet
morsel
mug-up
bite-bait
crunch-chow
snack-pap
grub
mouthful
half-pint
%%%%
##########################################################
# noun, Halfling special
##########################################################
insult halfling noun
w:100
@small_food@
footstool
munchkin
side-stool
pudgelet
groundling
burrow-snipe
hole-bolter
low-roller
runt
peewee
mimicus
manikin
hop-o-thumb
knee-biter
burrow-botch
hole-pimple
hovel-pustule
%%%%
##########################################################
# noun, Spriggan special
##########################################################
insult spriggan noun
w:100
@small_food@
rat-rider
quarter-pint
nissette
fizzle-flop
spell-botch
feeblet
weakling
pinchbeck-pixie
ankle-biter
bootstain
nano-nebbish
sopling
shrunken violet
sissy-prig
pussyfoot
creepsneak
%%%%
##########################################################
# noun, Minotaur special
##########################################################
insult minotaur noun
bovine
briscut
bull-brain
cud-chewer
calf-wit
cretin
cow
cattle
horn-beast
meatloaf
meatball
mooer
rump-roast
veal
walking sirloin
%%%%
As of Dungeon Crawl Stone Soup 0.3 the previously hard-coded
monster speech has been outsourced by Matthew Cline into
shout.txt and speak.txt. This makes changing existing
messages, or adding new ones really easy. This file will
hopefully help you in this endeavour.
Overview
========
As of Dungeon Crawl Stone Soup 0.3 the previously hard-coded monster
speech has been outsourced by Matthew Cline into shout.txt and
speak.txt. This makes changing existing messages, or adding new ones
really easy. This file will hopefully help you in this endeavour.
speak.txt handles messages for monsters communicating, and
also the messages for weapon noises.
speak.txt handles messages for monsters communicating.
insult.txt handles insults thrown at you by imps and demons.
noise.txt handles messages randart weapons with the noisy property.
A simple example
================
If you take a look through the two files, you'll see that all entries
have basically the same structure: a key, followed by one or more
values. Here is an example.
%%%%
# Friendly imps are very common so they speak very rarely
friendly '5'
w:1
@The_monster@ laughs.
w:1
@_friendly_imp_@
__NONE
%%%%
Let's look at this entry's components in more detail.
%%%%
Four percentage signs mark beginning and end of a database entry. If
you forget to place these, you will get buggy monster speech.
# Friendly imps are very common so they speak very rarely
A '#' sign at the beginning of a line causes it to be ignored; these
are comment lines.
If you take a look through the two files, you'll see that
all entries have basically the same structure. Let's have a
look at an example:
friendly '5'
The first non-comment, non-blank line is interpreted as the key of an
entry. Most keys are hardcoded but there's place for user defined ones
as well. In this case, the key is "friendly '5'".
'5' refers to the monster glyph, so the speech will not be entirely
restricted to imps, though they are by far the most common type of
minor demons.
w:9
__NONE
The rest of the entry consists of messages, separated by blank
lines. This is one of them. Each may be prefixed with an optional
weight ('w:1'). A message will be chosen with a probability of its
weight out of the sum of weights for its entry. Weight defaults to 10
if not specified. In this example, this particular message will be
selected 1 time out of 12.
%%%%
This is the message that will be printed. The '@' markers indicate
variables that will be substituted before printing. This particular
variable "@The_monster@" is treated specially by the game; the
substitution will change based on the monster giving the speech. See
below for more details.
friendly '5'
The first non-comment, non-clear line is interpreted as
the key of an entry. Most keys are hardcoded but there's
place for user defined ones as well. In this case, the key
is "friendly '5'".
Key lookup is always case-insensitive. The game looks up several
different keys when finding monster speech.
'5' refers to the monster glyph, so the speech will not be
entirely restricted to imps, though they are by far the
most common type of minor demons.
On the whole there are three ways the game tries to look
for keys in the database. First the actual monster name is
used, then the monster glyph (with prefix "cap-" for
capital letters), then a group description (such as insect
or humanoid) defined by the monster's body shape (winged,
tailed etc). The latter is entirely hardcoded, though.
1. The actual monster name.
Examples: "crystal golem", "default confused moth of wrath"
2. Then the monster glyph, with prefix "cap-" for capital letters.
Examples: "default 'cap-J'", "default confused 'k'"
3. A group description (such as 'insect' or 'humanoid') defined by the
monster's body shape (winged, tailed etc). The latter is entirely
hardcoded, though.
Examples: "default winged insect"
"friendly" is one of a couple of allowed prefixes,
distinguishing the speech from "hostile" (default).
"friendly" is one of a couple of allowed prefixes, distinguishing the
speech from "hostile" (default). These prefixes are optional and
tested in the following order:
First the database is searched for the whole prefix
string, then, reading from left to right, combinations are
tested, beginning at three prefixes and ending at none, at
which time the prefix "default" is used instead.
First the database is searched for the whole prefix string, then,
reading from left to right, combinations are tested, beginning at
three prefixes and ending at none, at which time the prefix "default"
is used instead.
For the last round (shape comparison, e.g. winged
humanoid) occasionally an additional intelligence estimate
("stupid", "smart") is prefixed to the search string. If
in this last round still nothing has been found, the
monster stays silent.
For the last round (shape comparison, e.g. winged humanoid)
occasionally an additional intelligence estimate ("stupid", "smart")
is prefixed to the search string.
For obvious reasons, weapon noises get by without any such
prefixes, and the only hardcoded keywords are
"noisy weapon" for weapons with the noises property, and
"singing sword" for (who'd have guessed?) the Singing
Sword.
If no matching keys are found after all 3 rounds, the monster stays silent.
w:9
After a clear line the actual talk begins. You can skew
the probability of a given message with the weight ('w')
tag. A message will be chosen with a probability of its
weight (defaults to 10 if none set) out of the sum of
weights for this entry. In this case, nine times out of
ten a friendly imp will stay silent.
For obvious reasons, weapon noises get by without any such prefixes,
and the only hardcoded keywords are "noisy weapon" for weapons with
the noises property, and "singing sword" for (who'd have guessed?) the
Singing Sword.
__NONE : no message
__NEXT : try the next combination of attributes
__MORE : enforce a "--more--" prompt
__YOU_RESIST : "You resist."
__NOTHING_HAPPENS : "Nothing appears to happen."
Spacing
-------
In addition, some more are defined in speak.txt and
shout.txt, such as __RESIST_OR_NOTHING, __SHOUT, and
others. For the shouting messages, Crawl looks up the
noises a given monster can produce and looks for keys
that match the string, i.e. __SHOUT, __BARK and so on.
There have to be blank lines between the different messages. If
messages are placed directly one after another they will be printed as
a block. This can be useful, e.g. for outputting first a "spell" and
then its (fake) result.
@_friendly_imp_@
More variables can be defined in the form of @variable@.
The "@_friendly_imp_@" above is a reference to another
entry in the database that has the key "_friendly_imp_"
(without those '@' signs) that actually has imps talking.
Their speech includes messages such as the following.
The message entries themselves can be longer than a line, though Crawl
will simply truncate it should it exceed the screen width (assuming 80
columns or less). The actual message length will usually differ from
the one defining an entry as parameters can be stripped from the entry
or replaced by other values, as explained in the following section.
VISUAL:@The_monster@ grins impishly at you.
Values can contain variable references, which look like text
surrounded by @@. These variables may be defined by entries in
shout/speak.txt, in which case they are replaced with a random value
from the entry; or they may have hardcoded expansions defined by the
game.
Again, there have to be clear lines between the different
messages. If messages are placed directly one after another
they will be printed as a block. This can be useful, e.g.
for outputting first a "spell" and then it's (fake) result.
@monster@ : Plain monster name, e.g. "rat" or "Sigmund"
@a_monster@ : Indefinite article plus monster name,
or only the name if it is unique ("Sigmund").
@the_monster@ : Definite article plus monster name ("the rat"),
or a possessive if it is friendly ("your rat"),
or only the name if it is unique ("Sigmund").
@something@ : Like @monster@, with monster name replaced by "something"
if the monster is invisible and the player cannot see invis.
@a_something@ : similar
@the_something@ : similar
@player_name@ : Player name.
@surface@ : Whatever the monster is standing on.
@feature@ : The monster's square's feature description.
@pronoun@ : it, she, he, as appropriate
@possessive@ : its, her, his, as appropriate
@imp_taunt@ : imp type insults (see insult.txt)
@demon_taunt@ : demon type insults (see insult.txt)
@says@ : synonym of 'say' that fits monster's (hardcoded)
speech pattern and noise level.
The message entries themselves can be longer than a line,
though Crawl will simply truncate it should it exceed the
screen width (assuming 80 columns or less). The actual
message length will usually differ from the one defining an
entry as parameters can be stripped from the entry or
replaced by other values, as explained in the following
section.
Weapon noises are handled differently in that all of the above
replacements don't hold. Instead you can use @The_weapon@,
@the_weapon@, @Your_weapon@, @your_weapon@ and @weapon@ which will get
replaced by "The (weapon name)", "the (weapon name)", "Your (weapon
name)", "your (weapon name)" and the plain weapon name,
respectively. Note that the Singing Sword, being unique, cannot be
referred to by the possessive variants, so they will be replaced with
one of the definite article ones.
Monster speech can be greatly customized by the use of
several variables. This example already includes a few.
Pre-defined variables in the database include _high_priest_,
_mercenary_guard_, _wizard_, _hostile_adventurer_, _friendly_imp_,
_hostile_imp_, and _tormentor_. There are also a few synonyms defined
at the beginning of speak.txt such as for @ATTACK@, @pointless@,
@shouts@, @wails@, and others.
The channels have been assigned different colours and are
sometimes treated differently, e.g. any of MSGCH_TALK,
MSGCH_SOUND and MSGCH_TALK_VISUAL will never interrupt
resting or travel unless specifically added in the options
file.
The channels have been assigned different colours and are sometimes
treated differently, e.g. any of MSGCH_TALK, MSGCH_SOUND and
MSGCH_TALK_VISUAL will never interrupt resting or travel unless
specifically added in the options file.
Note that MSGCH_SOUND and MSGCH_TALK get filtered out
when you are silenced. For similar reasons monster speech
of channel SPELL is muted under silence, along with
ENCHANT and WARN, both of which currently only occur in
combination with SPELL. To allow for silent spells along
with fake warnings and enchantments, you can combine these
with VISUAL and enforce output even when silenced.
Note that MSGCH_SOUND and MSGCH_TALK get filtered out when you are
silenced. For similar reasons monster speech of channel SPELL is muted
under silence, along with ENCHANT and WARN, both of which currently
only occur in combination with SPELL. To allow for silent spells along
with fake warnings and enchantments, you can combine these with VISUAL
and enforce output even when silenced.
Note, though, that these rarely will take effect as
usually the "silenced humanoid" types will take
precedence. In the case of silenced monsters, first the
database is searched for the monster key along with
several prefixes including "silenced", and only if no
message can be found through all iterations of monster
name, glyph and group description, the search will repeat
ignoring the "silenced" prefix and only then these special
VISUAL cases can apply.
Note, though, that these rarely will take effect as usually the
"silenced humanoid" types will take precedence. In the case of
silenced monsters, first the database is searched for the monster key
along with several prefixes including "silenced", and only if no
message can be found through all iterations of monster name, glyph and
group description, the search will repeat ignoring the "silenced"
prefix and only then these special VISUAL cases can apply.
For shouts the default is also MSGCH_TALK which is
automatically changed to MSGCH_TALK_VISUAL for monsters
that can't speak (animals, usually), and manually set to
MSGCH_SOUND for all those variants of "You hear a shout!"
For shouts the default is also MSGCH_TALK which is automatically
changed to MSGCH_TALK_VISUAL for monsters that can't speak (animals,
usually), and manually set to MSGCH_SOUND for all those variants of
"You hear a shout!"
For weapon noises only a subset of the above is relevant,
as anything including VISUAL and the channel keys SPELL
and ENCHANT are considered invalid and will trigger a
default message instead. Again, the default channel is
MSGCH_TALK.
For weapon noises only a subset of the above is relevant, as anything
including VISUAL and the channel keys SPELL and ENCHANT are considered
invalid and will trigger a default message instead. Again, the default
channel is MSGCH_TALK.
@The_monster@, @surface@
Like with @_friendly_imp_@ above, a number of variables
has been defined to allow for greater flexibility.
Whenever the speech code encounters an '@' sign it will
search the database for a variable of that name and
execute the necessary replacement. Note that recursive
replacement of one variable with another is possible, so
try to avoid loops. The remaining variables it was unable
to find in the database are hardcoded and will be replaced
before output.
If you add a new variable make sure to also add a database
entry for it (without those '@' marks around!); otherwise
it won't get replaced and just look weird.
Special commands and variables
------------------------------
A variable that you will see all over the place is
@The_monster@, which is hardcoded and will be replaced by
the monster's name. This is particularly useful for groups
of monsters that share the same speech pattern. Another
variable you can see in this example is @surface@, which
will be replaced by whatever the monster is standing on.
Messages may also be one of these special commands. These aren't
variables, so they aren't surrounded by @@. They are not expanded, but
rather they produce special game behavior.
@monster@ : replaced by plain monster name,
e.g. "rat" or "Sigmund"
@Monster@ : as above, but capitalized
@the_monster@ : replaced by definite article plus
monster name, or only the name if it is
unique, e.g. "the rat" or "Sigmund"
@The_monster@ : as above, but capitalized
@a_monster@ : replaced by indefinite article plus
monster name, if more than one can exist,
e.g. "a rat" or (again) "Sigmund"
@A_monster@ : as above, but capitalized
Some special keys are defined in speak.txt and shout.txt, such as
__RESIST_OR_NOTHING and __SHOUT. These are normal variable expansions,
and may be used as such. They are given special-looking names because
Crawl looks up the noises a given monster can produce and looks for
keys that match the string, i.e. __SHOUT, __BARK and so on.
As an alternative there's also @the_something@,
@The_something@, @a_something@, @A_something@, @something@
and @Something@, all of which behave like the corresponding
monster definitions above but get replaced by "something"
and "Something", respectively, should the monster be
invisible and the player be unable to see invisible.
But wait, there's more!
@player_name@ : replaced by player name
@surface@ : replaced by whatever the monster stands on
@feature@ : replaced by the monster's square's feature
description
@pronoun@ : replaced by it, she, he, as appropriate
@Pronoun@ : replaced by It, She, He, as appropriate
@possessive@ : replaced by its, her, his, as appropriate
@Possessive@ : replaced by Its, Her, His, as appropriate
@imp_taunt@ : replaced by hardcoded imp type insults
@demon_taunt@ : replaced by hardcoded demon type insults
Also, @says@ will get replaced with a synonym of 'say' that
fits a monster's (hardcoded) speech pattern and noise level.
Weapon noises are handled differently in that all of the
above replacements don't hold. Instead you can use
@The_weapon@, @the_weapon@, @Your_weapon@, @your_weapon@ and
@weapon@ which will get replaced by "The (weapon name)",
"the (weapon name)", "Your (weapon name)", "your (weapon
name)" and the plain weapon name, respectively. Note that
the Singing Sword, being unique, cannot be referred to by
the possessive variants, so they will be replaced with one
of the definite article ones.
Testing your changes
====================
Pre-defined variables in the database include _high_priest_,
_mercenary_guard_, _wizard_, _hostile_adventurer_,
_friendly_imp_, _hostile_imp_, and _tormentor_. There are
also a few synonyms defined at the beginning of speak.txt
such as for @ATTACK@, @pointless@, @shouts@, @wails@, and
others.
Weapon noises also use a number of synonyms which are
defined at the end of speak.txt.
The best way to learn about how variables and other concepts
can be used is probably to see how it has been done for
existing messages.
TESTING YOUR CHANGES
Should you have a version of Stone Soup that has been
compiled with the WIZARD mode defined, this could greatly
simplify testing. You can check whether this is the case by
pressing '&' during the game. If you are told that this is
an "unknown command" you are out of luck and might consider
compiling the game for yourself. You can download the source
code from the Crawl homepage [1].
Read the "INSTALL" file in the main directory for
instructions. Should you, after reading the documentation
and checking the archives of the Crawl newsgroup [2], still
have any questions, ask away!
Get a version of Stone Soup that contains WIZARD mode. You can check
whether this is the case by pressing '&' during the game. If you are
told that this is an "unknown command" (likely, since WIZARD builds
are generally not distributed), you will have to compile the game for
yourself.
If you have WIZARD mode compiled in, you can simply answer
"yes" to the safety question resulting from pressing '&',
and then test to your heart's content. Pressing '&' followed
by a number of other keys will execute wizard mode commands
that are all listed in the wizard help menu (press '&?').
To build Crawl yourself, download the source code from the Crawl
homepage [1] and read the "INSTALL" file in the main directory for
instructions. Should you still have any questions after reading the
documentation and checking the archives of the Crawl newsgroup [2],
ask away!
In particular, you can create a monster with '&M', and
enforce behaviour on a monster by examining it (with 'x',
as usual). In wizard mode this offers several new commands
such as 'F' (make monster friendly/unfriendly) and 's'
(make monster shout). These last two are of particular
interest to monster speech designers.
If you have WIZARD mode compiled in, you can simply answer "yes" to
the safety question resulting from pressing '&', and then test to your
heart's content. Pressing '&' followed by a number of other keys will
execute wizard mode commands that are all listed in the wizard help
menu (press '&?').
The Singing Sword and all other hardcoded artefacts can be
created with '&|'. The Elemental Staff and the spear of
Voo-Doo are examples of noisy weapons.
In particular, you can create a monster with '&M', and enforce
behaviour on a monster by examining it (with 'x', as usual). In wizard
mode, examining monsters offers several new sub-commands such as 'F'
(make monster friendly/unfriendly) and 's' (make monster shout). These
last two are of particular interest to monster speech designers.
You can also temporarily increase the likelihood of a given
message by adding a high weight value before it, e.g. w:500,
or equally temporarily push it into another channel (e.g.
MSGCH_WARN) to make it more noticeable.
The Singing Sword and all other hardcoded artefacts can be created
with '&|'. The Elemental Staff and the spear of Voo-Doo are examples
of noisy weapons.
PUBLISHING YOUR ADDITIONS AND CHANGES
If you feel that your additions really add something to the
game and would like to make them available to the general
public, you can post them (in the form of a diff file, or in
plain text) in the newsgroup [2] or as a feature request on
sourceforge.net [1].
[1] http://crawl-ref.sourceforge.net
http://sourceforge.net/projects/crawl-ref
If you feel that your additions add something to the game and would
like to make them available to the general public, you can post them
(in the form of a diff file, or in plain text) as a feature request on
sourceforge.net [1]_ or in the newsgroup [2]_.
[2] rec.games.roguelike.misc
Since this newsgroup is being shared with a number of other
roguelike games, it is generally considered polite to flag
subjects of posts pertaining only to Crawl with "-crawl-" or
a similar marker.
.. [1] http://crawl-ref.sourceforge.net
http://sourceforge.net/projects/crawl-ref
.. [2] rec.games.roguelike.misc
Since this newsgroup is being shared with a number of other
roguelike games, it is generally considered polite to flag
subjects of posts pertaining only to Crawl with "-crawl-" or
a similar marker.