text:
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
v0.34:Modding guide
|This article is about an older version of DF.
This is intended to be a guide to inform those new to DF modding on what elements of the game can be modified, and how. After reading through this guide, a user should be capable of editing creatures, entities, materials et al, and creating their own.
Generally, breaking stuff is fine - nothing that can be changed will affect the DF executable, and new additions can be easily removed.
This guide is based on Teldin's guide, originally created for version 0.27.176.39c. Per wiki tradition, it has been updated through all the major releases since then; hopefully it reflects current knowledge.
See also: Category:V0.34:Modding
Modding Guide[edit]
Token Reference[edit]
It's always good to refer to tokens on the wiki. Even experienced modders have to look up tokens! A list of articles about tokens can be found here.
Basics of DF modding[edit]
All the base data that can be edited by prospective modders can be found in the \raw\ folder. This folder contains two subfolders: "graphics" (where you insert graphics sets), and "objects", which contains all the data for generally everything in the game that is not hardcoded.
Within the \raw\objects folder are a large number of text files - these are the raw files, and editing them is quite easy - you can also create your own if you wish. For now, take a look at one of the existing files. It should look something like this:
creature_standard [OBJECT:CREATURE] [CREATURE:DWARF] [DESCRIPTION:A short, sturdy creature fond of drink and industry.] [NAME:dwarf:dwarves:dwarven] [CASTE_NAME:dwarf:dwarves:dwarven] [CREATURE_TILE:1][COLOR:3:0:0] [CREATURE_SOLDIER_TILE:2] ...
As you can see, each file comprises a header string stating the file name, a second header stating the type of object data it contains, followed by the contents of the file itself. These are all necessary elements of the file, and without them, the file won't be parsed correctly by the game. You may have also noticed the file naming scheme - this is also important; files containing creatures have names starting with "creature_", entity file names must begin with "entity_", etc..
Below the headers, there begins a list of entries. Each entry is made up of its own header (in this case, "[CREATURE:DWARF]"), again stating the type of object, and then the object's unique identifier - if an identifier isn't unique, the game will mess up and you'll get some serious, and potentially very trippy, errors. Below that, we have the body of the entry, which determines the entry's specific properties.
The body of an entry is made up of a series of "tokens", which are essentially flags that can be added or removed to affect the entry's attributes. Most of these effects are hardcoded: for example, it's possible to make a creature only eat meat with the [CARNIVOROUS] token, but it's impossible to create your own token detailing a specific diet for the creature.
Before we continue, a few key things to remember when modding the raw files:
- Try to avoid modifying the existing raw files when adding objects. It makes removing mods far easier.
- When adding files, all you need to include to ensure proper references are maintained is the token identifier's. The game will load up all *.txt in the raw folder, and searches through them by tokens. For example: You can add a new pair of leather boots and not even have to add it to the item_shoes.txt file, but rather make your own file, say item_shoes_new.txt and ensure you have the token listed, ex. [ITEM_SHOES:ITEM_SHOES_BOOTS_NEW], that's how the game will look for the item.
- If you want to edit an already-existing creature, always back up the files you plan on editing to a different location. Since v0.31.22, the game no longer loads backup files, but duplicate entries are still a very bad thing.
- When a new world is generated, all the raw files get copied into a \raw\ folder within the applicable save folder. If you want to change something within a world that's already been generated, you'll have to edit those files, not the ones in ~DF\raw\objects.
- There's nothing stopping you from just copying an existing creature/entity/whatever, changing the identifier, and modifying it. This can save you a lot of time, especially when it comes to entities... which are coincidentally what we'll be talking about next.
Modding civilizations (entities)[edit]
Entities - the objects that determine how civilizations work - are stored in entity_default.txt (though, like all other files, you may add more). They follow the same format as any other raw file:
entity_default [OBJECT:ENTITY] [ENTITY:ENTITYNAME] [CREATURE:CREATURETYPE] [TRANSLATION:LANGUAGETYPE] [BIOME_SUPPORT:BIOMETOKEN:FREQUENCY] ...[OTHER TAGS]...
Most of the time, it doesn't matter which order these tokens are in or where they're placed so long as they're below the "ENTITY:" identifier, but there are some important exceptions in the case of other files, especially creatures, which can contain a lot of "nested" tokens.
"[CREATURE:]" links the civilization with a specific creature defined in a creature file. This is the creature that'll be making up the entity's population, and will therefore be the creature you'll be playing as in fortress or adventure mode if the entity is a playable one. For example, if you wanted to do something silly, you could switch the "CREATURE:DWARF" entry in entity_default.txt with "CREATURE:ELF" and you would be marching elves around in fortress mode, although they would still use dwarven technology and language and names and so forth.
Oh, and before you get any funny ideas - it is possible to define more than one creature for a civ, but that won't work in quite the way you probably expect: later on, in the creature section, you'll learn about castes, which will provide a much more viable alternative, so try to bear with us until then.
"[TRANSLATION:]" defines the language file that the entity will be using, which will determine what their untranslated words are for things. This doesn't determine which words they use for naming things, only the way those words are spelled. The default language files are HUMAN, DWARF, ELF, and GOBLIN.
"[BIOME_SUPPORT:]" defines the biomes that civs will attempt to settle in. The "FREQUENCY" value determines the likelihood of them building there, but also raises an important point: most of the values you'll be setting for things are relative to each other. If one was to type:
This would have very much the same effect as:
This holds true for a lot of values throughout the files, excluding when it simply doesn't make sense, such as in materials.
You can find many details about the rest of the civilization tokens here. Besides those mentioned, some fundamental ones are the CIV_CONTROLLABLE token, which lets you control the civ in fortress mode, the INDIV_CONTROLLABLE token, which allows you to play the civ in adventure mode as an outsider, and the ADVENTURE_TIER token, which allows you to play a civ native (non-outsider) in adventure mode. Other tokens that you should pay attention to are START_BIOME and the ones regarding sites, but in general, you can just run through the aforementioned list and add or remove what you want.
If you have more than one civ with the CIV_CONTROLLABLE token, all the available civs from those entities will appear in the group selection section on the embark screen. It may not be immediately obvious from which species each civ may be - while this can be determined from legends mode, the topmost species in the "neighbors" display in the embark screen is always the same as the currently selected species; if your group is dwarven, dwarves will be topmost, whilst (say) elves will be topmost if your chosen group is elven. By default, the game seems to choose a civ (and therefore a species if there is more than one) at random.
You can also attempt to discern the civ yourself by the names it uses - this is the realm of "symbols", collections of words centered around a specific concept. The civ will use the words comprising whatever symbols are applicable to it for various things. This association might be a little obfuscating at first, so I'll run through it. Let's refer to the DWARF entity:
Here we can see that dwarves will generally name their wars first after words in the "NAME_WAR" symbol group, and then after words in the "VIOLENT" symbol group. This might, for example, result in a war being named "The War of Carnage". The symbols used for the other types of conflict are arrayed in a similar fashion. It would be trivial to replace the instances of VIOLENT with, say, PEACE and end up with a battle called "The Clash of Calm" or something.
The above applies here. Dwarves are fond of naming their roads and tunnels after roads and tunnels.
This section deals with everything else. The things that haven't already been dealt with (hence the "REMAINING") - such as site names, kingdom names, the names of individuals, and such - will have names from the ARTIFICE and EARTH symbol groups. After that the dwarf entity is told to cull all innapropriate symbols - this applies to everything (hence the "ALL") so if the game happens to choose a symbol associated with, say, EVIL for one of the battles, it'll scrap that name and try again. This sort of thing adds a lot of flavour to DF's entities and can account for a lot of a civ's perceived personality.
Another basic thing to note: any entity token that's dealing with weapons, armor, clothing, etc., will state the items that the civ can build natively, not necessarily the ones they can wear or use. For example, you could create a species with no clothes specified, but then rob a clothes shop in adventurer mode and wear everything you want, or give them weapons that are too large to wield and they could sell them, but not use them.
An easy method of creating a civilization is just to copy-paste a similar one to the bottom of the entity_default.txt file and edit things to your liking. Remember to always change the civ's "ENTITY:" identifier! This can be anything so long as it's not already existing.
At the end of some of the default entries you'll find a list of positions, both ones that'll directly affect you in fort mode (such as nobles) and ones that'll primarily affect worldgen and adventure mode. A list of the tokens applicable to positions can be found here; they don't require a great deal of explanation.
Modding the creatures[edit]
Creature modding is great fun. You can change nearly any aspect of a creature or make your own completely from scratch.
Modding creatures is very similar to modding civs: it's just a matter of editing, adding, or removing tokens, enclosed in square brackets underneath the creature's [CREATURE:] header. The creature entries contain all of the information about each and every non-random creature in the game, from animals to dwarves to goblins to even caravan wagons. A lot of the creature tokens are fairly self-explanatory; you can find a list of such tokens here. But before you start creating your own creatures, you'll want to learn how the tissues system works.
Creature materials and tissues[edit]
In the most basic sense, a creature is a series of bodyparts. These parts are defined in their own file, and we'll talk about them later. As a specific aspect of how creatures work which throws off a lot of prospective modders is the relationship between bodyparts, tissues, and materials. We're going to show you part of the creature entry for a bronze colossus (bear with us):
... [BODY:HUMANOID:2EYES:2EARS:NOSE:HUMANOID_JOINTS:5FINGERS:5TOES] [NO_THOUGHT_CENTER_FOR_MOVEMENT] [TISSUE:BRONZE] [TISSUE_NAME:bronze:bronze] [TISSUE_MATERIAL:INORGANIC:BRONZE] [MUSCULAR] [FUNCTIONAL] [STRUCTURAL] [RELATIVE_THICKNESS:1] [CONNECTS] [TISSUE_SHAPE:LAYER] [TISSUE_LAYER:BY_CATEGORY:ALL:BRONZE] ...
At the top, we can see the "BODY:" token, followed by a list of bodyparts. As you've probably guessed, these parts make up the physical form of the colossus. But the colossus has to be made out of something - it has to have tissues. And those tissues also have to be made out of something - in this case, bronze.
Below the BODY token you'll see a TISSUE token, followed by an identifier, much like the others we've seen. The TISSUE block is determining how the tissue works, and which purposes it'll serve. As the colossus is just going to be made out of this one tissue, this tissue needs to act like bone, muscle, and everything else combined, hence the MUSCULAR, FUNCTIONAL and STRUCTURAL tokens. The tissue also references a material - INORGANIC:BRONZE - the properties of which are declared in the inorganic materials file, and the tissue is subsequently made out of this material. With us so far?
Below the tissue definition is the TISSUE_LAYER line. TISSUE_LAYER allows you to control where each tissue is applied. Its first argument defines if it's to search by bodypart category (BY_CATEGORY), bodypart type (BY_TYPE), or look for a specific part (BY_TOKEN). That's followed by the parts argument itself, which is in this case ALL (so the game's looking for parts in all categories, which is to say, every bodypart). This is followed by the tissue to be applied, BRONZE. So the TISSUE_LAYER token is telling the game to select all bodyparts in every category and make them out of the tissue "BRONZE". The colossus is now made of bronze.
By now you're probably thinking "Wow, if this was for a creature made out of however many tissues, this would be amazingly longwinded". And you're right. Luckily, there are two methods by which we can speed things up a lot.
Firstly, there are material and tissue templates. Let's say you were going to make a lot of creatures out of bronze, and you didn't want to have to copy and paste the bronze tissue all over the place. Instead, you create a tissue template. This goes, as you've probably guessed, in a tissue template file.
[TISSUE_TEMPLATE:BRONZE_TEMPLATE] [TISSUE_NAME:bronze:bronze] [TISSUE_MATERIAL:INORGANIC:BRONZE] [MUSCULAR] [FUNCTIONAL] [STRUCTURAL] [RELATIVE_THICKNESS:1] [CONNECTS] [TISSUE_SHAPE:LAYER]
Now, instead of applying the tissue to each and every bronze creature you're making, you can just refer to the template:
Material templates work in the same way, but refer to materials instead of tissues.
However, if we're looking at something like a dwarf, even with the templates, editing can get very slow indeed:
This is where body detail plans come in. Detail plans, of course, have their own file, and they are designed to help automate some of the more common processes in creature creation. The first entry in b_detail_plan_default.txt does exactly what we've been trying to do above: it takes all the common materials and shoves them into one plan, which can be referenced with a single token.
Much easier. But what about the TISSUE_LAYER tokens? Will we have to type out all of those manually?
Nope, detail plans have that covered as well. It's possible to place variable arguments into a detail plan. For example:
First an argument is placed in the plan (ARG1, ARG2 etc.), followed by the thickness of the tissue that will be inserted in place of the argument. So when we reference the VERTEBRATE_TISSUE_LAYERS plan, we'll be able to do something like this:
ARG1 in the detail plan is replaced by SKIN, the first tissue we entered. ARG2 is replaced by FAT, ARG3 by muscle, ARG4 by bone, and ARG5 by CARTILAGE. Hence, our creature's bodypart designated as BODY is made up of SKIN with thickness 1, FAT with thickness 5, and MUSCLE with thickness 50. Its nose is made up of SKIN (thickness 1) and CARTILAGE (thickness 4).
Things left out of the body plans aside, our dwarf's entire body, material, tissue and tissue layer tokens have been boiled down to this:
This can save you a lot of time and space if you're making lots of changes common to many creatures. In general, if you're making a creature that's fleshy or chitinous, there's detail plans already included in the game to help you out. You should only have to resort to declaring tissues individually (like our bronze colossus) if you're doing something really out-of-the-ordinary.
Another great thing about templates (and so, detail plans) is that they can be modified after being declared. Let's say we wanted our dwarves to be perpetually on fire (don't ask). We declare the body stuff normally:
We then select the appropriate material:
We don't want them burning to death, so we'll need to stop that from happening:
Note that this makes use of DF's built-in temperature scale. You can read more about that on this page. We're also referencing material tokens, which we haven't gone over yet - we'll talk about making your own materials later.
Creature castes[edit]
Another potentially extremely powerful part of the creature raws is the caste system. The caste system handles both true biological castes and lesser variations, such as sexes.
To understand the true potential of the caste system, we only need to take a look at the raws for antmen, found in creature_subterrenean.txt:
... [CASTE:WORKER] [CASTE_NAME:worker ant woman:worker ant women:worker ant woman] Female, but non-breeding. [POP_RATIO:10000] [CASTE:SOLDIER] [CASTE_NAME:soldier ant woman:soldier ant women:soldier ant woman] Female, but non-breeding. [POP_RATIO:1000] [CASTE:DRONE] [MALE] [CASTE_NAME:drone ant man:drone ant men:drone ant man] [POP_RATIO:5] [CASTE:QUEEN] [FEMALE] [CASTE_NAME:queen ant woman:queen ant women:queen ant woman] [POP_RATIO:1] [SELECT_CASTE:WORKER] [SELECT_ADDITIONAL_CASTE:SOLDIER] [SELECT_ADDITIONAL_CASTE:QUEEN] [BODY:HUMANOID_4ARMS:2EYES:HEART:GUTS:BRAIN:MOUTH] [BODYGLOSS:INSECT_UPPERBODY:INSECT_LOWERBODY] [SELECT_CASTE:DRONE] [BODY:HUMANOID_4ARMS:2EYES:HEART:GUTS:BRAIN:MOUTH:2WINGS] [BODYGLOSS:INSECT_UPPERBODY:INSECT_LOWERBODY] [FLIER] [SELECT_CASTE:ALL] [BODY_DETAIL_PLAN:CHITIN_MATERIALS] [BODY_DETAIL_PLAN:CHITIN_TISSUES] [BODY_DETAIL_PLAN:EXOSKELETON_TISSUE_LAYERS:CHITIN:FAT:MUSCLE] [BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS] [ATTACK:PUNCH:BODYPART:BY_TYPE:GRASP] [ATTACK_SKILL:GRASP_STRIKE] [ATTACK_VERB:punch:punches] ...
It's evident that the process of creating and editing castes is comparable to the modifications we were making to tissues and materials earlier: A caste is declared, and modifications to the base creature are made. Declared castes can be selected and subsequently modified, again, just like tissues and materials.
In this case, each caste is declared, given its own name, and a POP_RATIO, which determines how commonly a birth results in that caste - for every 10000 workers born, there'll be an average of 1000 soldiers, 5 drones and one queen. You've probably also noticed that the DRONE and QUEEN castes have the MALE and FEMALE tokens respectively - these tokens determine how breeding works. A creature without both a MALE caste and a FEMALE caste will be unable to breed (no asexual creatures yet, unfortunately). As they lack FEMALE, the workers and soldiers are unable to breed with the male drones.
After this, there are some modifications to bodyparts. In this case, the drones have wings and the FLIER token, which the other castes lack. It's entirely possible for creatures of different castes to have completely different body stuctures, even to the extent that they don't resemble each other at all. If you read the section of this guide that dealt with entities, you may remember a passing mention of multi-creature civilisations and how they don't quite work as you may think they would. The castes system is your workaround. You could create a caste that is, for all intents and purposes, a human, and another caste of the same creature that acts exactly like a giant cave spider, put the creature in a civ, and get a human-spider civ. The only flaw in this approach is that the castes will interbreed.
That's the most complex components of creature creation out of the way. You should find the rest trivial by comparison.
Modding items[edit]
Items are fairly simple to deal with. By default, each item type is contained in its own file; this may help make browsing for a specific item easier, but from a purely technical point of view, it's possible to throw all items into one file. Unfortunately, item tokens don't seem to be especially well-documented (at least not as well as the other object types), but you should be able to figure out most things by way of our explanations and your assumptions.
Let's look at the entry for, of course, the thong:
[ITEM_PANTS:ITEM_PANTS_THONG] [NAME:thong:thongs] [LAYER:UNDER] [COVERAGE:25] [LAYER_SIZE:10] [LAYER_PERMIT:30] [MATERIAL_SIZE:1] [SOFT] [LEATHER] [STRUCTURAL_ELASTICITY_WOVEN_THREAD]
Most of these are pretty obvious if one compares them to the other entries in the file. There's a layer for the item, determining where it's worn; a coverage value to determine how well it protects you from cold and other things; a size token to determine how much it counts for when it's under something else; a layer permit token to determine how much can be worn under it; and a material size token to determine how much raw material it takes to make it.
Now, if you wanted to mod these to turn them into metal thongs (ouch!), you would simply have to add [METAL] to it somewhere. Simple! These tokens work by tying into material properties - some materials are designated as suitable for making hard items, some for soft, etc..
Weapons involve a little more detail:
[ITEM_WEAPON:ITEM_WEAPON_SWORD_2H] [NAME:two-handed sword:two-handed swords] [SIZE:900] [SKILL:SWORD] [TWO_HANDED:67500] [MINIMUM_SIZE:62500] [MATERIAL_SIZE:5] [ATTACK:EDGE:100000:8000:slash:slashes:NO_SUB:1250] [ATTACK:EDGE:50:4000:stab:stabs:NO_SUB:1000] [ATTACK:BLUNT:100000:8000:slap:slaps:flat:1250] [ATTACK:BLUNT:100:1000:strike:strikes:pommel:1000]
SIZE determines how heavy the weapon is. This has a substantial effect on weapon effectiveness. SKILL determines which skill is used in using the weapon; a list of skills can be found on this page. MINIMUM_SIZE determines the minimum size a creature must be before the weapon can be wielded, while TWO_HANDED determines how large a creature must be in order to wield the weapon with one hand.
Attacks take a little more explanation. The first value determines the contact area of the weapon's attack; this should be high for slashing weapons and low for bludgeoning, piercing and poking ones. The second value determines how deep the weapon penetrates - for BLUNT attacks this value is ignored as they're not supposed to penetrate anyway, but in the case of EDGE attacks it should generally be lower for slashing attacks and higher for stabbing attacks.
Following these are the nouns and verb used; they should be self-explanatory. Finally, we have the velocity modifier, which has a multiplying effect on the weapon's size for the purposes of determining how powerful it is in combat.
Other, more miscellaneous items are generally simple and shouldn't require any further explanation.
Once you've made an item, you just add it to the civ entry so a civilization can actually craft it, and it's done.
Modding language files[edit]
Let's say you added a whole new species. Sure, you could just swipe one of the existing translation files and steal their language for your species, but that's the lazy way! If you want to create a whole new language, it's very simple.
First, you'd need a whole new language_RACE file, such as language_LIZARDMAN.txt, along with "language_LIZARDMAN" at the top of the file proceeded by [OBJECT:LANGUAGE] and [TRANSLATION:LIZARDMAN]. After that, it's just a matter of copy-pasting one of the existing language lists and editing the finished 'translated' word. That's it! Then just add the translation link to your civ in entity_default.txt and it'll be added to the game on worldgen.
(Note that the name of the file doesn't actually matter; however, it's good form to name the file after a creature if only that creature speaks the language)
Modding body parts[edit]
Imagine you have this fantastic idea for a multi-tentacled winged spider-monster. Sounds great! But in order to make this a reality you may need to create a new set of body parts for it. That's no problem! Making body parts is easy, though it may look complicated at first.
All of the default body definitions are located in body_default.txt and then linked to a creature in the creature's entry. We've talked about how bodyparts make up creatures earlier, in the creature section. You can mix and match them in the creature entry and it makes no difference, as long as they're there: each bodypart will link itself to the appropriate connection automatically when the creature is first created.
Body parts work by sections: you can add as many sections as you want to a bodypart definition, but generally you should keep it fairly low for ease of use. Each body section entry is in the, very simple, format:
[BODY:BODYNAME] [BP:TOKENID:name][TOKENSGOHERE][DEFAULT_RELSIZE:][CATEGORY:WHATEVER]
The most important tokens are "CONTYPE" and "CON": CONTYPE means the bodypart in question is connected to a certain type of bodypart, while CON means it's connected to a specific one. TOKENID is yet another identifier, which should be unique, as it's referenced every time something uses CON or BY_TOKEN. DEFAULT_RELSIZE defines, of course, what the bodypart's size is in relation to the other parts. CATEGORY defines a category for the part, which can be unique or shared with other parts. This is referenced whenever BY_CATEGORY is used.
A list of bodypart tokens can be found here.
Let's take a simple example, a head:
[BODY:BASIC_HEAD] [BP:HD:head:STP][CONTYPE:UPPERBODY][HEAD][CATEGORY:HEAD] [DEFAULT_RELSIZE:300]
It connects directly to an upper body.
[BODY:2EYES] [BP:REYE:right eye:STP][CONTYPE:HEAD][SIGHT][EMBEDDED][SMALL][RIGHT][CATEGORY:EYE] [DEFAULT_RELSIZE:5] [BP:LEYE:left eye:STP][CONTYPE:HEAD][SIGHT][EMBEDDED][SMALL][LEFT][CATEGORY:EYE] [DEFAULT_RELSIZE:5]
These are a pair of eyes, connecting to the head.
[BODY:HUMANOID] [BP:UB:upper body:upper bodies][UPPERBODY][CATEGORY:BODY_UPPER] [DEFAULT_RELSIZE:1000] [BP:LB:lower body:lower bodies][CON:UB][LOWERBODY][CATEGORY:BODY_LOWER] [DEFAULT_RELSIZE:1000] [BP:HD:head:STP][CON:UB][HEAD][CATEGORY:HEAD] [DEFAULT_RELSIZE:300] [BP:RUA:right upper arm:STP][CON:UB][LIMB][RIGHT][CATEGORY:ARM_UPPER] [DEFAULT_RELSIZE:200] [BP:LUA:left upper arm:STP][CON:UB][LIMB][LEFT][CATEGORY:ARM_UPPER] [DEFAULT_RELSIZE:200] [BP:RLA:right lower arm:STP][CON:RUA][LIMB][RIGHT][CATEGORY:ARM_LOWER] [DEFAULT_RELSIZE:200] [BP:LLA:left lower arm:STP][CON:LUA][LIMB][LEFT][CATEGORY:ARM_LOWER] [DEFAULT_RELSIZE:200] [BP:RH:right hand:STP][CON:RLA][GRASP][RIGHT][CATEGORY:HAND] [DEFAULT_RELSIZE:80] [BP:LH:left hand:STP][CON:LLA][GRASP][LEFT][CATEGORY:HAND] [DEFAULT_RELSIZE:80] [BP:RUL:right upper leg:STP][CON:LB][LIMB][RIGHT][CATEGORY:LEG_UPPER] [DEFAULT_RELSIZE:500] [BP:LUL:left upper leg:STP][CON:LB][LIMB][LEFT][CATEGORY:LEG_UPPER] [DEFAULT_RELSIZE:500] [BP:RLL:right lower leg:STP][CON:RUL][LIMB][RIGHT][CATEGORY:LEG_LOWER] [DEFAULT_RELSIZE:400] [BP:LLL:left lower leg:STP][CON:LUL][LIMB][LEFT][CATEGORY:LEG_LOWER] [DEFAULT_RELSIZE:400] [BP:RF:right foot:right feet][CON:RLL][STANCE][RIGHT][CATEGORY:FOOT] [DEFAULT_RELSIZE:120] [BP:LF:left foot:left feet][CON:LLL][STANCE][LEFT][CATEGORY:FOOT] [DEFAULT_RELSIZE:120]
An entire humanoid body. The foot bone's connected to the ankle bone...
"BODYGLOSS" entries, which you can sometimes find applied to creature entries, are simply replacement words for specific part name strings in a creature. For example, you'll find the bodygloss [BODYGLOSS:CLAW_HAND:hand:claw] in body_default.txt; you can then use this in a creature via "[BODYGLOSS:CLAW_HAND]" and it'll replace all instances of "hand" with "claw" in that creature. Be warned, however—if you were to, say make a bodygloss [BODYGLOSS:EARSTALK:ear:stalk:ears:stalk], it would not only change "ear" and "ears" to "stalk" and "stalks", it would also change "heart" to "hstalkt"! For all intents and purposes the body part will still function as the proper part, though.
Modding plants[edit]
Plants are, again, not unlike creatures. With what you've learned so far in regard to tokens and the materials system, running through the notes included in plant_standard.txt should explain most things. Here's the list of plant-specific tokens.
Below is the plump helmet raw description:
[PLANT:MUSHROOM_HELMET_PLUMP] [NAME:plump helmet][NAME_PLURAL:plump helmets][ADJ:plump helmet] [USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE] [MATERIAL_VALUE:2] [BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL] [EDIBLE_VERMIN] [EDIBLE_RAW] [EDIBLE_COOKED] [PICKED_TILE:161][PICKED_COLOR:6:13:0] [GROWDUR:300][VALUE:2] [USE_MATERIAL_TEMPLATE:DRINK:PLANT_ALCOHOL_TEMPLATE] [STATE_NAME_ADJ:ALL_SOLID:frozen dwarven wine] [STATE_NAME_ADJ:LIQUID:dwarven wine] [STATE_NAME_ADJ:GAS:boiling dwarven wine] [MATERIAL_VALUE:2] [DISPLAY_COLOR:5:0:0] [EDIBLE_RAW] [EDIBLE_COOKED] [PREFIX:NONE] [DRINK:LOCAL_PLANT_MAT:DRINK] [USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE] [MATERIAL_VALUE:1] [EDIBLE_VERMIN] [EDIBLE_COOKED] [SEED:plump helmet spawn:plump helmet spawn:4:0:1:LOCAL_PLANT_MAT:SEED] [SPRING][SUMMER][AUTUMN][WINTER] [FREQUENCY:100] [CLUSTERSIZE:5] [PREFSTRING:rounded tops] [WET][DRY] [BIOME:SUBTERRANEAN_WATER] [UNDERGROUND_DEPTH:1:3] [SHRUB_TILE:142] [DEAD_SHRUB_TILE:28] [SHRUB_COLOR:5:13:0] [DEAD_SHRUB_COLOR:5:6:0]
Let's look at this line by line:
First, we define its file name. In this case it's MUSHROOM_HELMET_PLUMP. Next we define its in-game name (plump helmet) and its adjective for if you were to craft with it (e.g. plump helmet earrings).
This defines the structure and material of the plant. It references STRUCTURAL_PLANT_TEMPLATE in the first line, so if you were to say, add wings to the template, the plump helmet plant would be winged. This is for the plant itself, not the end plump helmets.
After that we get our edible tokens. These say that vermin can eat the plant, and it can be eaten raw or cooked by your dwarves. So if you wanted a plant vermin would leave alone, you'd remove the [EDIBLE_VERMIN] token.
Next, [PICKED_TILE:161] is the character (161 in this case) shown when the crop is harvested. See character table for a table of usable tiles. [PICKED_COLOR:6:13:0] is the color used for the crop's tile when harvested. It's in a foreground:background:brightness format. See color for the colors usable.
[GROWDUR:300] is how long it takes for your crop to grow. There are 1008 growdur units in a season.
[VALUE:2] Is the value of harvested plant (default 1). Appears to have no effect in version 0.31.
This defines the plant's alcohol states. [STATE_NAME_ADJ:ALL_SOLID:] is the frozen name, followed is the actual drink name, and then its boiling name. These are achieved by either Scorching or Freezing climates. [DISPLAY_COLOR] is, of course, color, and [EDIBLE_RAW] and [EDIBLE_COOKED] are saying you can drink the alcohol raw or cooked.
[USE_MATERIAL_TEMPLATE:DRINK:PLANT_ALCOHOL_TEMPLATE] [STATE_NAME_ADJ:ALL_SOLID:frozen dwarven wine] [STATE_NAME_ADJ:LIQUID:dwarven wine] [STATE_NAME_ADJ:GAS:boiling dwarven wine] [MATERIAL_VALUE:2] [DISPLAY_COLOR:5:0:0] [EDIBLE_RAW] [EDIBLE_COOKED] [PREFIX:NONE] [DRINK:LOCAL_PLANT_MAT:DRINK]
After that we get our seed template:
[USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE] [MATERIAL_VALUE:1] [EDIBLE_VERMIN] [EDIBLE_COOKED] [SEED:plump helmet spawn:plump helmet spawn:4:0:1:LOCAL_PLANT_MAT:SEED]
And all this says is that the seeds may be eaten by vermin or cooked. Then it gives the name of our plant's seed, its plural name, its foreground, background, and brightness colors, followed by its seed material; said material should have [SEED_MAT] to permit proper stockpiling.
And finally for the last chunk we have this:
[SPRING][SUMMER][AUTUMN][WINTER] [FREQUENCY:100] [CLUSTERSIZE:5] [PREFSTRING:rounded tops] [WET][DRY] [BIOME:SUBTERRANEAN_WATER] [UNDERGROUND_DEPTH:1:3] [SHRUB_TILE:142] [DEAD_SHRUB_TILE:28] [SHRUB_COLOR:5:13:0] [DEAD_SHRUB_COLOR:5:6:0]
First we define what season(s) the plant may grow in, then we define how frequently this plant is generated in a particular area, followed by how many harvested crop items may come from 1 plant. [PREFSTRING:] is what your dwarves like about the plant, which in this case is the rounded tops. [WET][DRY] are the conditions under which the plant can grow. Wet means it can grow close to water, dry means it can grow away from water. This does not mean you can grow the plant on dry stone however. It is just for natural spawning of the plant.
[BIOME] Is what biome the plant grows in. [UNDERGROUND_DEPTH:Minimum:Maximum] Is the highest and lowest cavern levels that the plant can appear in if its biome is subterranean. Dwarven civilizations will only export (via the embark screen or caravans) things that available at depth 1. Defaults to 0:0 (surface only).
Lastly, [SHRUB_TILE] is the character used for the naturally spawning shrub of this plant, [DEAD_SHRUB] is the dead shrub character. [SHRUB_COLOR] Is the shrub's color, and [DEAD_SHRUB_COLOR] is, of course, the dead shrub's color.
While this may or may not look like a lot of tokens, it's very easy. Just copy an existing plant and edit it to your new plant.
For the rest of the tokens, see plant token.
Workshops are raw-designed pretty differently from everything else in the game, being buildable structures rather than items or methods to gain items. However, they are fairly simple. For example, here's the raw for the soap maker's workshop:
[BUILDING_WORKSHOP:SOAP_MAKER] [NAME:Soap Maker's Workshop] [NAME_COLOR:7:0:1] [DIM:3:3] [WORK_LOCATION:2:2] [BUILD_LABOR:SOAP_MAKER] [BUILD_KEY:CUSTOM_SHIFT_S] [BLOCK:1:0:0:1] [BLOCK:2:0:0:1] [BLOCK:3:0:0:0] [TILE:0:1:' ':' ':150] [TILE:0:2:' ':' ':'/'] [TILE:0:3:'-':' ':' '] [COLOR:0:1:0:0:0:0:0:0:6:0:0] [COLOR:0:2:0:0:0:0:0:0:6:0:0] [COLOR:0:3:6:0:0:0:0:0:0:0:0] [TILE:1:1:' ':' ':'='] [TILE:1:2:'-':' ':8] [TILE:1:3:' ':' ':150] [COLOR:1:1:0:0:0:0:0:0:6:0:0] [COLOR:1:2:6:0:0:0:0:0:6:0:0] [COLOR:1:3:0:0:0:0:0:0:6:0:0] [TILE:2:1:'-':' ':8] [TILE:2:2:' ':' ':8] [TILE:2:3:' ':150:' '] [COLOR:2:1:6:0:0:0:0:0:6:0:0] [COLOR:2:2:0:0:0:0:0:0:6:0:0] [COLOR:2:3:0:0:0:6:0:0:0:0:0] [TILE:3:1:150:' ':8] [TILE:3:2:' ':' ':8] [TILE:3:3:' ':240:' '] [COLOR:3:1:6:0:0:0:0:0:6:7:0] [COLOR:3:2:0:0:0:0:0:0:6:7:0] [COLOR:3:3:0:0:0:7:0:1:0:0:0] [BUILD_ITEM:1:BUCKET:NONE:NONE:NONE][EMPTY][CAN_USE_ARTIFACT] [BUILD_ITEM:1:NONE:NONE:NONE:NONE][BUILDMAT][WORTHLESS_STONE_ONLY][CAN_USE_ARTIFACT]
A line-by-line breakdown:
[NAME:Soap Maker's Workshop] [NAME_COLOR:7:0:1]
These are the name of the workshop ("Soap Maker's Workshop") and color of the workshop's name when examined with 'q' (White with a black background).
DIM refers to how large the workshop will be, in this case 3 wide, 3 tall. WORK_LOCATION tells where the creature using it (usually a dwarf) will work, numbered from the top right--in this case, 2:2, or the middle. Multiple work locations can be defined, even outside the dim.
These refer to the worker required to build it (soap maker) and the key used to build it in the workshop menu (capital S).
This is a bit more complex, and is where we get to the meaty part of workshop making--the tiles' properties. BLOCK refers to which tiles will be untraversable--1 means blocked, 0 means unblocked. The first number refers to row, and the next 3 refer to column, so 1:0:0:1 means that, on the first row, the first two tiles will be unblocked and the last will be blocked.
The TILE token tells which tile will go where. note, however, that there are 5 entries here instead of 4. The first number, in this case, refers to build stage, numbered from 0 to 3; 3 or 1 is fully built (depending on whether there are stages), 0 is just placed, and 2 is always an intermediate stage, while 1 is usually an intermediate stage. Whether 1 is an intermediate stage or not depends on if there are a 2 and 3 stage; if 2 and 3 exist, 1 will be intermediate. The second number and beyond are similar to BLOCK; however, instead of 1s and 0s, you must input tiles. The tiles themselves can be given in quotes (as in ' ') or given as a number, which can be looked up here. Here, we have 150, which is û.
Color is as TILE, but with colors instead of tiles; however, colors are made up of 3 numbers each or MAT. MAT refers to the color of the material used to make it; the 3 numbers refer to foreground:background:foreground brightness, and can be looked up here. For example, 4:2:1 will give you bright red with a dark green background.
These refer to items required to build the building. These are in the same format as reaction reagents and products--quantity:item:material. You'll learn more about those on the article about reactions, though. The second BUILD_ITEM is special-- it uses modifiers exclusively to determine its requirements. BUILDMAT refers to wood logs, wood blocks, stone boulders, and stone blocks; WORTHLESS_STONE_ONLY means it can't use economic stone; CAN_USE_ARTIFACT means that it... can use artifacts. EMPTY, in the bucket's case, means that the bucket must be empty.
More can be seen at the building tokens article.
An in-depth guide for reactions is available here.
As we've seen when talking about creatures, materials are vital. Materials show up in two forms: material templates, which generally show up in creatures, and specific materials (designated as "inorganic"), which are (by default, at least) consigned purely to metal and stone types.
Let's take a look at METAL_TEMPLATE in material_template_default.txt. It's evident that most of the basic properties of metals are already defined in the template - it goes red and melts at a high enough temperature, it's heavy, and (as noted by the very bottom token) is a metal. We already know just how useful templates can be to creatures, and the same applies to other materials.
Now let's take a look at inorganic_metal.txt. You can see that the metals here refer to the templates, and, just like we did with creatures, then modify the properties of that template and expand upon it.
Finally, let's look at inorganic_stone_mineral.txt. Here we can see that in addition to the changes made to the template, there are also ENVIRONMENT tokens - these tell the game where to place these minerals during worldgen.
Here's a list of material tokens. It should also help you out with any modifications you want to make regarding those creature modifications we were making a while back. See, it all ties together in the end. The beauty of the current materials system is that there's actually very little difference between, say, leather and iron - they're fundamentally the same thing, just with different properties, which is how things really should be.
The Hydling by Mysteryguye (annotated and separated into blocks by Putnam)
[CREATURE:HYDLING] [DESCRIPTION:A five-headed small hairy thing, about the size of a dog. It is very loyal to its masters, and will promptly disembowel any enemy straying too close.] This is the description that shows up in-game when viewing the creature.
[NAME:hydling:hydlings:hydlish] If there were a civ made of hydlings, it would appear as "hydlings" in the neighbors screen.
[CREATURE_TILE:'='][COLOR:2:0:1] Will appear as a light green "=".
[PETVALUE:78][NATURAL] Creature is known to be naturally occurring by the game. Will cost 40 embark points to buy.
[LARGE_ROAMING] Will spawn outdoors, wandering around.
[COMMON_DOMESTIC][TRAINABLE][PET] Can be bought on embark as a pet, war animal, or hunting animal.
[BONECARN] Can eat meat and bones only--no vegetables.
[PREFSTRING:loyalty] Dwarves will like it for its loyalty.
[LIKES_FIGHTING] Will attack rather than flee.
[BODY:QUADRUPED:TAIL:10EYES:10EARS:5NOSES:2LUNGS:HEART:GUTS:ORGANS:5THROATS:5NECKS:5SPINES:5BRAINS:5SKULLS:3TOES_FQ_REG:3TOES_RQ_REG:MOUTH:TONGUE:GENERIC_TEETH_WITH_LARGE_EYE_TEETH:RIBCAGE] Has a lower body, upper body, 4 legs, a tail, ten eyes, ten ears, five noses, two lungs, a heart, guts, a pancreas etc., and 5 heads with all that goes with those.
[BODYGLOSS:PAW] Feet will be called "paws"
[BODY_DETAIL_PLAN:STANDARD_MATERIALS] Declares the standard materials that most creatures' tissues are made of.
[BODY_DETAIL_PLAN:STANDARD_TISSUES] This declares the tissues that the creature's tissue layers are made of.
[BODY_DETAIL_PLAN:VERTEBRATE_TISSUE_LAYERS:SKIN:FAT:MUSCLE:BONE:CARTILAGE] And this describes the tissue layers that the creature is made of.
[BODY_DETAIL_PLAN:BODY_HAIR_TISSUE_LAYERS:HAIR] Creature will be covered with a layer of fur.
[USE_MATERIAL_TEMPLATE:NAIL:NAIL_TEMPLATE] And it'll have nails.
[TISSUE_LAYER:BY_CATEGORY:TOE:NAIL:FRONT] On the toe, specifically.
[SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART] [PLUS_TISSUE_LAYER:SKIN:BY_CATEGORY:THROAT] [TL_MAJOR_ARTERIES] Heart and throat--called above--will cause heavy bleeding if ruptured.
[BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS] Places eyes, ears and what have you into their correct placement, so that you don't have people punching out eyes from behind.
[BODY_DETAIL_PLAN:HUMANOID_RIBCAGE_POSITIONS] Sets the ribcage as being around lungs and heart.
[USE_MATERIAL_TEMPLATE:SINEW:SINEW_TEMPLATE] Defines sinew so that... [TENDONS:LOCAL_CREATURE_MAT:SINEW:200] Tendons [LIGAMENTS:LOCAL_CREATURE_MAT:SINEW:200] And ligaments can be defined.
[HAS_NERVES] Creature has nerves, and as such can be disabled by severing them.
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE] Defines the material BLOOD using the template BLOOD_TEMPLATE. [BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID] Defines the creature's BLOOD as being made of the above-defined BLOOD material in a LIQUID state.
[CREATURE_CLASS:GENERAL_POISON] Creature can be affected by syndromes that affect GENERAL_POISON.
[GETS_WOUND_INFECTIONS] Pretty much self-explanatory. Creature can get infected from wounds. [GETS_INFECTIONS_FROM_ROT] And from necrosis.
[USE_MATERIAL_TEMPLATE:PUS:PUS_TEMPLATE] Defines PUS using PUS_TEMPLATE. [PUS:LOCAL_CREATURE_MAT:PUS:LIQUID] Defines PUS as being made of PUS.
[BODY_SIZE:0:0:1000] Creature will be 1000 cubic centimeters at birth... [BODY_SIZE:1:0:12500] 12500 cubic centimeters at 1 year old... [BODY_SIZE:2:0:30000] and 30000 cubic centimeters at 2.
[BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110] Creature can be anywhere from 90% to 110% as long as others. [BODY_APPEARANCE_MODIFIER:HEIGHT:90:95:98:100:102:105:110] As above, but with height. [BODY_APPEARANCE_MODIFIER:BROADNESS:90:95:98:100:102:105:110] As above, but with broadness. This puts the minimum size of the creature (when fully grown) at 21870 and the maximum size at 39930.
[MAXAGE:20:30] Creature will die of old age between the ages of 20 and 30, no later than 30, no sooner than 20.
[CAN_DO_INTERACTION:MATERIAL_EMISSION] Creature can use the MATERIAL_EMISSION interaction. [CDI:ADV_NAME:Hurl fireball] In adventurer mode, the MATERIAL_EMISSION interaction will appear as "Hurl fireball". [CDI:USAGE_HINT:ATTACK] Creature will use MATERIAL_EMISSION when it's attacking, on creatures that it's attacking. [CDI:BP_REQUIRED:BY_CATEGORY:HEAD] Creature must have at least one HEAD to use MATERIAL_EMISSION. [CDI:FLOW:FIREBALL] The MATERIAL_EMISSION will shoot a fireball. [CDI:TARGET:C:LINE_OF_SIGHT] The target for the emission--a location--must be within the line of sight of the Hydling. [CDI:TARGET_RANGE:C:15] And must be, at most, 15 tiles away. [CDI:MAX_TARGET_NUMBER:C:1] The hydling can only shoot at one target at a time... [CDI:WAIT_PERIOD:30] and only every 30 ticks (3 tenths of a second at 100 FPS)
[ATTACK:BITE:CHILD_BODYPART_GROUP:BY_CATEGORY:HEAD:BY_CATEGORY:TOOTH] Defines a BITE attack that uses teeth. [ATTACK_SKILL:BITE] Attack uses the BITE skill. [ATTACK_VERB:nom:noms] "The Hydling noms the Elf in the left first toe, tearing the muscle!" [ATTACK_CONTACT_PERC:100] Will use all of the tooth. Note that this can be more than 100. [ATTACK_PENETRATION_PERC:100] Will sink the tooth all the way in. This can also be more than 100. [ATTACK_FLAG_EDGE] Attack is an EDGE attack. [ATTACK_PRIORITY:MAIN] Attack is of priority MAIN. Other option is SECOND. [ATTACK_FLAG_CANLATCH] Attack can latch.
[ATTACK:SCRATCH:CHILD_TISSUE_LAYER_GROUP:BY_TYPE:STANCE:BY_CATEGORY:ALL:NAIL] As above, but for nail instead of teeth. [ATTACK_SKILL:STANCE_STRIKE] Uses the kicking skill. [ATTACK_VERB:slice:slices] "You slice the Elf in the left foot and the severed part sails off in an arc!" [ATTACK_CONTACT_PERC:100] Uses the whole nail. [ATTACK_PENETRATION_PERC:100] The whole nail goes in. [ATTACK_FLAG_EDGE] Attack is an edge attack. [ATTACK_PRIORITY:SECOND]
[CHILD:1] Hydling will become an adult at 1 year old.
[GENERAL_CHILD_NAME:hydie:hydies] Children will appear as "hydies".
[DIURNAL] Is active during the daytime.
[HOMEOTHERM:10070] Has a body temperature of 102 Fahrenheit.
[SWIMS_INNATE][SWIM_SPEED:2500] Swims innately, about 2.5x slower than it walks.
[CASTE:FEMALE] Defines a caste called FEMALE. [FEMALE] FEMALE caste is female.
[CASTE:MALE] As above, but with male. [MALE] See above.


text:
Living in New York City, we try to make the most of what the city has to offer. We hit the museums often, try out new restaurants when we can, and take in the occasional Broadway show. One thing that never occurs to us to do is go see a taping of a TV show, except for that one time I went with a group of friends to see Regis host Who Wants to Be a Millionaire?
Then a couple weeks ago, my husband came across the @Spiffomatic64 Twitter feed, which provides up-to-the minute news on tickets for The Daily Show and The Colbert Report. My husband went to a taping of The Colbert Report when it first came on the air and was easy to get tickets, but somehow tracking down tickets to The Daily Show seemed hard. And we're lazy like that. But with @Spiffomatic64, *poof* we had ticket reservations with no problem. They even list tickets for same day, so it's definitely worth having a look if you're passing through town or have an afternoon to kill.
And it does take all afternoon. First there's ticket pickup, which opens at 2:30 but people probably start lining up for around 1:00. You only need one person from your group to take on this task. My husband got there around 2:00 and was number 134. Everyone else in your group has to pick up tickets by 4:00. The line-up in numbered pens began at 4:30. (I'm making it sound more like cattle than it seemed. It was quite civilized.) While in the numbered areas, people came by to tell us the rules. First the little hipster kid gave us the run down of how it would all play out: We'll get into the studio where everyone has to stay in their seat. We can go to the bathroom now if we want. Jon will come out for a Q&A before the show, etc., etc. The best part was this kid talking about the Q&A: "Just don't be weird. Think about your question in your head, and if it sounds a little weird to you it's going to be super weird to everyone else. So don't be weird." Then the guy who looked more like Secret Service came out as an enforcer to the rules. I have no picture of inside the studio to show you because no way was I going to face the wrath of this guy.
At last, we were seated in the studio. We were numbers 134 and 135, and only a handful of people made it in after us (they overbook, so here's where the getting early to the ticket line comes into play). For the first 15 minutes or so, it was very exciting just to check out all of the details of the set, which is amazing in person. We were hoping to see a green-screen correspondent segment because we couldn't figure where they would record them on set. We were in the very back row of the studio, which doesn't feel as intimate as it does on TV, but it was still a great view. Then there was more waiting while listening to incredibly loud music. I realized that without my electronic devices, I've totally forgotten how to wait. It was hard not to get antsy knowing I could be using this time to check work emails, seeing as how I was playing hooky to go see The Daily Show.
I joked with my husband about the warm-up act for Regis. You know that comic Paul Mercurio? I never got off his mailing list after he was working the crowd outside Millionaire. Sure enough, out comes Paul Mercurio, who again passed out paper to get people on his mailing list. Way to hustle.
Finally, out comes Jon Stewart for the Q&A. The audience, despite the hipster's warning, was totally weird. One girl had this whole thing about making Jon a bumper sticker and it was her friend's birthday and then this funny happened to them… Jon couldn't get a word in edgewise. One girl asked him what he would ask Jane Austen if he had her on as a guest back from the dead. I can only imagine what he got asked before the 'weird' warning. You can see why he's always making jokes at the audience's expense. Audiences are weird.
Then it was showtime. There were monitors throughout the studio which showed the show as it looks at home, with the graphics and clips put in. I kept finding myself watching the monitor and not the desk, until I remembered that real-life Jon Stewart was just to the left of that monitor. The first segment was all about the latest Republican primary debate, with lots of Santorum footage. For more, Jon turned to Senior Political Analyst John Oliver, who was hilarious.
This segment ends with a brilliantly-crafted joke, which John Oliver flubbed a little bit. I was curious if they were going to redo it. During the commercial break, Jon and a couple of others (writers? producers?) leaned way over the desk in John Oliver's face looking all serious. I watched a lot of The Larry Sanders Show back in the day, which made me really wonder what they were talking about and if it had anything to do with what they had just taped. They didn't end up redoing anything, and John Oliver headed off with a friendly wave.
The guest was Paul Rudd. Why, yes, since you ask, he is even more adorable in person. He came out with candy for the crowd, which gives you a chance to see the extent of the studio audience. The interview was basically all about candy. I left the show starving for some Smarties. He didn't get the extended interview, so after a couple of minutes off he went. Then Jon reshot one joke from the first segment for time, and that was it. He came back out, thanked us for coming, and bid us adieu as we headed out into the night.
It was definitely worth doing, and it's made me want to see more. Colbert is on my list, and it seems like we should see Saturday Night Live at least once. My sister heard we were seeing The Daily Show and demanded that I get her Jimmy Fallon tickets the next time she's in town. Anyone got an inside scoop on that one?
What would you go see given the chance?

subset: commoncrawl


text:
Woman possibly injured in Worcester car crash
Staff Writer
Telegram & Gazette
Police investigated a crash at Shrewsbury and Belmont streets Monday night.
A Ford Flex and Toyota Camry collided at the busy, wide intersection about 7 p.m. A woman driving nearby at the time of the crash said she heard a bang, but only saw the aftermath of the crash. She said a woman in the Camry appeared to be hurt, and was taken away by ambulance.
Officers from the Traffic Division arrived at the scene, along with crime scene officers.
Traffic was slowed in the area, but was getting by in most directions.


text:
Read our commitment to our members and communities in response to COVID-19
Please complete this information to start your estimate.
Tell us about what you need fixed.
Certain damage to your windshield may be repairable. In fact, many insurance
companies will waive the deductible if you choose to have your windshield
repaired instead of replaced.
Online appointments are available a minimum of two business days in advance.
Need to schedule an appointment sooner? Please call (802) 397-9131.


text:
Some of you might know that I am a sort-of musician, and because of this, lots of people from around the country and the world have been getting in touch with me to ask how particular venues are coping. The problem is that information is very changeable, and is often revised after each aftershock. Of which there have been many. There are a number of rumours out there about all sorts of thing at the moment, and some of this post may just be covering those rumours. The truth may be out there … but it's a moving target. The final arbiter will be the owners of each building – who I haven't talked to myself.
The Repertory Theatre on Kilmore St has been one of the most high profile casualties. Much of the facade has fallen onto the street, which is a great shame. There had been much of an effort in the last few years to raise funds for earthquake strengthening for the building – which sadly hadn't started. Anna Crighton from the Historic Places Trust was on Close Up last night, suggesting that it could be rebuilt, but given the degree of the damage, I'd say it's highly unlikely.
The Dux was open on Saturday afternoon, which would suggest that they didn't suffer much. Though whether it was necessary to open such an 'essential' service as a pub in a part of town that is next to so many important buildings – such as the quake HQ at the art gallery – is an open question. There are a number of venues or former venues that I don't have any information about at this time: The Media Club, The Civic, AL's Bar. The Media Club has been looking a bit shabby for some time, and that may mean that it wasn't in the best shape for an earthquake. The Civic and AL's are both brick buildings, and you've gotta wonder – although I went past AL's, and didn't see any obvious damage.
UPDATE: My friend Hera just received a message from Al Park of AL's bar:
"Hi Hera.Yep we all good.No damage.Very lucky!"
So that's good news.
Goodbye Blue Monday have been updating their blog with frequency and detail since the quake, and say that they are fine. That's great, but while they are hoping to open on Friday, I will believe it if I see it. There is extensive damage to the building next to them – the old High Street Project – and it wouldn't surprise me if it was either too damaged to be saved, or if the extent of the damage meant that it and the surrounding buildings were going to be cordoned off for sometime. I'm not trying to be overly negative – but the uncertainty with Manchester Courts has led to other buildings on the same block being closed off. So fingers crossed for GBM and that area – and keep an eye on their blog.
The Bedford seems to have lost quite a few bricks, but according to this update that I dug up from facebook:
"The Bedford's sweet. Fully earthquake strengthened. We've just lost a few decorative bricks from the top"
The White Elephant Trust HQ is on the corner of Bedford Row and Manchester St, and I can see it out my kitchen window. They are a great organisation that are involved with young people and music, and were meant to be having an all-ages show with Tommy Ill this Saturday (which I was meant to be supporting them at.) I'm not really sure where that is at, at the moment, but given the crack in the building … it might not be good (see below)…
I'm trying to find out info about Chch / New Zealand's best record store, Galaxy Records, but don't have anything right now. The buildings directly opposite Galaxy are some of the worst hit in Christchurch – fortunately, Smiths had recently moved down the road a bit. Peaches and Cream has lost a few letters from the shop name – it's now aches and Cream, which could prove to be more useful! And there have to be massive worries about the old Odeon Theatre, which was in dire need of some earthquake strengthening.
I would be a little concerned for Christchurch's second best music store, Penny Lane Records, which is in the historic (read: run down brick) part of Sydenham. Colombo St, from Brougham to Moorehouse Ave, is very badly damaged, as most of the buildings were single or double story and brick. It hasn't been the most popular area of town for a couple of decades, so not much money has gone into keeping these buildings up to date. The building in the picture below is the one with Penny Lane, though it is about four shops to the left of the corner. I would fear for it though, as the whole building will probably have to go.
Just as I am writing this, I've seen an update on twitter regarding the Dux:
"Dux de Lux is currently not safe to enter and closed until further notice, no word on whether it's been condemned though"
Maybe opening on Saturday wasn't the smartest thing to do?
Will update as more info comes to hand – and will probably try and do a post on the Lyttelton situation too.


text:
World-ranked knockout specialist Jorge "Destroyer" Melendez (26-2-1, 25 KO's), of Bayamon, P.R., and former amateur standout Nick "The Machine Gun" Brinson (14-1-2, 6 KO's), of Rochester, N.Y., made weight on their first attempts Thursday for their 10-round main event fight tomorrow/Friday, June 7, on ShoBox: The New Generation live on SHOWTIME® (10 p.m. ET/PT delayed on the West Coast) from Turning Stone Resort Casino in Verona, N.Y.
There will be a new co-feature, undefeated Jeffrey Fontanez (11-0, 9 KOs), of Caguas, P.R., taking on Jose A. Rodriguez (18-10, 11 KOs), of Detroit, Mich. The Fontanez-Rodriguez lightweight bout was elevated to the telecast after a scheduled match between Jonathan Vidal and Mario Munoz was cancelled by the New York State Athletic Commission when Munoz could not make the weight.
10-Round Middleweight Bout
JORGE MELENDEZ – 158 Pounds
NICK BRINSON – 157¾ Pounds
Eight-Round Lightweight Bout
JEFFREY FONTANEZ – 132 Pounds
JOSE A. RODRIGUEZ – 132 Pounds
Vidal weighed in at 118 pounds, but Munoz came in at 125. When Munoz returned to the scale, he still weighed 125 and the commission called the fight off.
An aggressive-minded 20-year-old with good power, the highly regarded, 5-foot-8½, 20-year-old Fontanez is coming off a six-round unanimous decision victory over veteran Daniel Attah on March 2. It was the first time Fontanez had gone six full rounds.
Rodriguez, a 5-foot-7, 25-year-old, will be fighting for the fifth time this year after fighting six times in 2012 and seven times in 2011. A "traveling underdog" in recent outings, Rodriguez has often been matched against top prospects and local favorites, many times on short notice. He gives strong efforts each time out against very good opposition. He is coming off a 10-round unanimous decision loss against Ray Beltran in his last fight on April 27 – a fight he took on short notice.
Tickets priced at $75, $45, $35 and $25, plus tax and service charges, are on sale at the box office of the Turning Stone Resort & Casino, by calling (315) 361-SHOW (7469) and also through Ticketmaster at (800) 745-3000 or online at www.ticketmaster.com and www.turningstone.com


text:
Enoxaparin (By injection)
Enoxaparin (ee-nox-a-PAR-in)
Prevents and treats blood clots. Also treats heart attacks. This medicine is a blood thinner.
Brand Name(s):
Amerinet Choice Enoxaparin Sodium, Enoxaparin Sodium Novaplus, Lovenox, PremierPro Rx LovenoxThere may be other brand names for this medicine.
When This Medicine Should Not Be Used:You should not use this medicine if you have had an allergic reaction to enoxaparin, heparin, benzyl alcohol, or products made from pork. You should not use enoxaparin if you have bleeding disorders or any active bleeding.
How to Use This Medicine:
- Your doctor will prescribe your exact dose and tell you how often it should be given. This medicine is given as a shot under your skin.
- A nurse or other health provider will give you this medicine. It may also be given by a home health caregiver.
- You may be taught how to give your medicine at home. Make sure you understand all instructions before giving yourself an injection. Do not use more medicine or use it more often than your doctor tells you to.
- You will be shown the body areas where this shot can be given. Use a different body area each time you give yourself a shot. Keep track of where you give each shot to make sure you rotate body areas.
- Use a new needle and syringe each time you inject your medicine.
If a dose is missed:
- You must use this medicine on a fixed schedule. Call your doctor or pharmacist if you miss a dose.
How to Store and Dispose of This Medicine:
- If you store this medicine at home, keep it at room temperature, away from heat and direct light.
- If you were given a bottle of medicine to use with your syringes, you must use the medicine within 28 days after the first shot. Throw away the unused medicine in the bottle after 28 days.
- Throw away used needles in a hard, closed container that the needles cannot poke through. Keep this container away from children and pets.
- Ask your pharmacist, doctor, or health caregiver about the best way to dispose of any leftover medicine, containers, and other supplies. Throw away old medicine after the expiration date has passed.
- Keep all medicine out of the reach of children. Never share your medicine with anyone.
Drugs and Foods to Avoid:
Ask your doctor or pharmacist before using any other medicine, including over-the-counter medicines, vitamins, and herbal products.
- Make sure your doctor knows if you are also using blood thinners (such as clopidogrel, warfarin, or Coumadin®). Tell your doctor if you are also using dipyridamole (Persantine®), ketorolac (Toradol®), or sulfinpyrazone (Anturane®).
- Make sure your doctor knows if you are using pain or arthritis medicine (such as aspirin, Advil®, Aleve®, Motrin®, Orudis®, Dolobid®, Feldene®, Indocin®, Relafen®, or Voltaren®). Avoid taking aspirin or medicines that contain aspirin, unless your doctor tells you to.
Warnings While Using This Medicine:
- Make sure your doctor knows if you are pregnant or breastfeeding, or if you have liver disease, kidney disease, blood vessel problems, diabetes, a heart infection, uncontrolled high blood pressure, a stomach ulcer or bleeding, or a bleeding disorder such as hemophilia. Tell your doctor if you have a bleeding disorder caused by heparin.
- Make sure your doctor knows if you have recently had a stroke, or surgery on your eyes, brain, or spine. Tell your doctor if you have had a heart valve replaced.
- This medicine may cause bleeding or bruising. This risk is higher if you have a catheter in your back for pain medicine or anesthesia (sometimes called an "epidural"), or if you have kidney problems. The risk of bleeding increases if your kidney problems get worse. Discuss this with your doctor if you are concerned.
- You may bleed and bruise more easily while you are using this medicine. Be extra careful to avoid injuries until the effects of the medicine have worn off. Stay away from rough sports or other situations where you could be bruised, cut, or injured. Brush and floss your teeth gently. Be careful when using sharp objects, including razors and fingernail clippers. Avoid picking your nose. If you need to blow your nose, blow it gently.
- Watch for any bleeding from open areas such as around the injection site. Also check for blood in your urine or stool. If you have any bleeding or injuries, tell your doctor right away.
- Tell any doctor or dentist who treats you that you are using this medicine. You may need to stop using this medicine several days before you have surgery or medical tests.
- Your doctor will do lab tests at regular visits to check on the effects of this medicine. Keep all appointments.
Possible Side Effects While Using This Medicine:
Call your doctor right away if you notice any of these side effects:
- Allergic reaction: Itching or hives, swelling in your face or hands, swelling or tingling in your mouth or throat, chest tightness, trouble breathing
- Blood in your urine.
- Bloody or black, tarry stools.
- Chest pain, shortness of breath, or coughing up blood.
- Fever.
- Large, flat, blue or purplish patches in the skin.
- Numbness or weakness in your arm or leg, or on one side of your body.
- Pain in your lower leg (calf).
- Sudden or severe headache, problems with vision, speech, or walking.
- Swelling in your hands, ankles, or feet.
- Uneven heartbeat.
- Unusual bleeding or bruising.
- Vomiting blood or material that looks like coffee grounds.
- Warmth or redness in your face, neck, arms, or upper chest.
If you notice these less serious side effects, talk with your doctor:
- Confusion.
- Nausea or diarrhea.
- Pain, redness, bruising, swelling, or a lump under your skin where the shot was given.
If you notice other side effects that you think are caused by this medicine, tell your doctor
Call your doctor for medical advice about side effects. You may report side effects to FDA at 1-800-FDA-1088
Last Updated: 1/27/2017


text:
Somewhere near the Four Springs there's a dirt road that branches off the Transfagarasan and goes off into the mountains. It's used mainly by trekkers and shepherds with their flocks. Not many dare drive on it, because large boulders pop up here and there from the uneven ground, making it easy for the unexperienced driver to break their oil pan, bend their steering or wreck their suspension.
Those are the kind of roads that attract me. It's exciting to pull off the asphalt and tackle the unknown, relying on my senses and experience to straddle the boulders, humps and holes carefully, pulling my 2WD passenger car through without a scratch, proving to myself, time and time again, that I can do it without a 4WD. Sure, I've cracked the oil pan a couple of times in the past, but I learned from my mistakes and got better at it. Now I can safely maneuver our car on roads where even 4WD cars fear to tread. And that's what makes it possible for us to see places most people don't see and take photographs that most people can't take, not without some serious hiking.
This particular dirt road led off into an old glacier valley, where it split in half. Left meant climbing higher into the valley and right meant climbing into the peaks. We chose to go higher into the peaks, up to a point where we found a small waterfall that made its way down the cliff cheerfully. The view was glorious, so we climbed up the slope halfway, perched ourselves on a rock and took in the grandeur of nature for a while.
I included more photographs in the gallery below. Enjoy and remember to take some risks every once in a while. There are no guarantees but the taste of success is sweet!


text:
I'm a day behind on writing about this, but as everyone now knows and has processed, President Obama will be visiting Israel next month. There is lots of speculation about why he is going, and most of it has focused on the peace process. The instant conventional wisdom is that Obama is going to lean hard on Prime Minister Netanyahu to restart serious talks with the Palestinians and that the focus of the new Israeli government is now going to be on diplomacy and the two-state solution rather than on the domestic issues over which the election was fought. There are even those who argue, as Dan Margalit does in Israel Hayom, that Obama's pending arrival is going to affect which parties are in the coalition since Netanyahu will not want to welcome Obama to Israel without a center or left party included in the government.
I get why all of this makes sense on its face, but I disagree with the premise. Of course Obama cares about the peace process and assigns a large degree of importance to the Israeli-Palestinian conflict, and without question it will be a topic of conversation between Obama and Netanyahu and will be part of whatever public comments Obama makes while there. It would be bizarre for Obama to show up and not try to create some pressure on both sides to resume negotiations. But there are a few reasons to think that this trip is not intended to be a big diplomatic push over and above whatever else the administration is currently doing on the peace process front.
First, the White House said yesterday that the trip is not going to include a rollout of any specific peace proposals. That means no roadmap, no offer to host a summit, no calls for settlement freezes, or any other approaches that we have seen in the past by this or other administrations. Second, the U.S. has not coordinated this trip with any European countries, which is strange given EU efforts to convince the administration to reinsert itself into the peace process and the reports that Britain, France, and Germany are planning on making a big push on this issue now that Israeli elections are over. Third, a presidential visit to Israel does not automatically mean pressure on the Israeli government over the Palestinians, as there was little pressure placed when President Bush went to Israel in 2008 despite Ehud Olmert being more receptive to such an approach.
As Brent Sasley pointed out yesterday, there are lots of reasons for Obama to be going to Israel, although I disagree with Brent (which is rare) about Iran, and I think that this trip is much more about foreign policy issues than domestic politics (which is even more rare for me). Obama's travels are going to take him to Turkey, Saudi Arabia, Jordan, and Israel; if that isn't a lineup that indicates the focus will be on coordinating strategy to deal with Iran, then I don't know what is. Now that both Obama and Netanyahu have been returned to office and both clearly have their eyes on Tehran, I think that Obama's visit to Israel is about security issues – Iran, Syria, etc. – first and foremost. That John Kerry is going to Israel before Obama's trip reinforces that for me, since Kerry's visit will likely be focused on the peace process while Obama's visit will be geared toward other things. And of course, the possibility exists that Obama is going simply because he promised he would, as Haviv Rettig Gur reminded everyone yesterday.
Finally, on the coalition politics issue, I don't buy the argument that Obama's visit will affect the coalition one way or the other. Once the trip was announced, all leverage in that area was gone. Bibi could put together the most rightwing coalition imaginable at this point, and it won't alter the fact that Obama is going to Israel come hell or high-water. I don't quite get the argument that Netanyahu won't dare greet Obama without a center-left component in his government, or that a three day visit somehow creates such enormous pressure that an entire coalition designed to theoretically serve for five years has to be shaped around three days.
Furthermore, there is a real possibility that Netanyahu won't form a coalition until after Obama has come and gone, in which case all of this speculation is moot. [As Chemi Shalev has helpfully pointed out in the comments below, the deadline for Bibi to form a coalition is March 16 – ed.] Let's also not forget that Netanyahu went out of his way just this morning to reiterate that his policy on settlements has not changed. Obama coming to Israel is a new wrinkle, but if Netanyahu were not going to bend to internal and external pressure to jumpstart the peace process, I don't think Obama's visit would alter his calculations.
To be clear, I am sure that Obama will talk about the peace process, and I am also sure that Netanyahu will not embarrass Obama on Israeli soil so he will likely make some token concessions or promises. I do not think that this trip changes the entire thrust of the government's policy or makeup though, and I do not think it means we are about to get a real life version of the fictional Bartlet peace plan from the second to last season of the West Wing. It was always assumed that Kerry was going to be more interested in the peace process during the second term than Obama was until there was some real movement, and I haven't seen anything over the last two days to make me think that assumption is incorrect.


text:
No Show Sock 3 Pack - Navy
These no-show socks are your most stylish & best kept secret.
Technically perfect in every way, ensuring all day secure heel placement, unmatched comfort & breathability, and a true no-show look. Don't pretend you're wearing no-show peds, actually wear the real thing.
The Tech:
- Low-Rise Profile
- Heel Grip
- Seamless Toe
- Ultra-Breathable Peruvian Pima Cotton
One Size Fits Most (tried & tested on sizes 6-14):
Made in Peru
Delivery is free for all domestic US orders over $75. Otherwise, delivery is $8.
Once your product has shipped, it usually takes 3 to 5 business days in the USA, 5 to 15 for the rest of the world. If you have not received your products, feel free to contact us using our contact page. You can sign up for mobile alerts at checkout.
You can return your product up to 21 days after receiving your order. Please make sure that the products are not used, washed or damaged.
Initiate a Return - https://flexreturnapp.com/s/hookandalbert


text: Speedo will always be associated with performance swimwear, but Speedo's sleek one-piece swimsuits, swim dresses and swim tops and bottoms are also wonderful for casual beach and pool wear. Racerback styling frees up plenty of room for shoulder movement. Four-way stretch board shorts and compression swim briefs give you just the coverage you need for confidence in and out of the water. Look to HerRoom for your Speedo swimwear needs!


text:
I support a comprehensive national security approach, fully integrating and resourcing our diplomatic, development, and defense capabilities. We must execute a national security strategy that counters violent religious extremism and anti-American sentiment, builds partnerships around the world, work closely with friends and allies, and advances programs to create a more just, peaceful, and stable world. This means policies that understand and respect other nations and encourages self-determination, democracy, human rights, gender equality, economic development, and much greater access to education, health care, and jobs. This also means an increased focus on promoting the American values of democracy and an economy that also respects people and cultures.
As Chairman of the House Armed Services Committee, I have unique insights into today's foremost national security issues throughout the Middle East, including the war in Afghanistan, as well as our larger efforts to stop the spread of violent extremist groups and their ideology around the globe. Understanding the need for a holistic approach to national security, I recognize the importance of poverty reduction, access to education, sustainable global markets, diplomatic engagement, and good governance to enable our pursuit of stable international partners.
- Preventing Iran from acquiring or developing nuclear weapons: Supported the multilaterally negotiated Joint Comprehensive Plan of Action with Iran, has condemned the Iranian regime's objectionable behavior, and taken note of the constructive voices in Iran that seek global integration.
- Combating harmful cuts to U.S. diplomatic engagement: I have fought against draconian, misguided cuts proposed in the President's budget request to Congress, cosigned letters to Secretary Tillerson strongly condemning what can only be seen as an effort to weaken our ability to promote peace abroad.
- Enhancing Peace and Stability in Somalia: Co-led a letter requesting $87.7 million in Economic Support Funds to support the formation of legitimate, durable institutions in Somalia and has continued to work closely with the Treasury Department and community members to find ways to permit the legal transfer of remittances.
- Supporting Refugees: In addition to vocally speaking out against hateful rhetoric towards refugees, I have asked the President to increase the number of refugees who can come to the United States. I have also requested additional funding to help resettle refugees.
- Co-Chair, Congressional Caucus on Effective Foreign Assistance: Adam serves as a co-founder and co-chair of a bipartisan working group focused on highlighting the work of development, aid, and relief organizations and engaged on improving efficacy and transparency
- Building Capacity, Promoting Stability: A strong proponent of organizations such as the Millennium Challenge Corporation (MCC), Adam led a letter asking for $1 billion in funding for the MCC, which uses innovative and effective models to reduce poverty and building sustained economic growth.
- Strengthening Global Health: The United States is uniquely positioned to help strengthen healthcare systems in developing nations. Congressman Smith has aggressively pursued strong funding for programs which support International Family Planning, Maternal & Child Health, the Global Vaccine Initiative (GAVI), Global Fund to Fight AIDS, Vaccines for HIV and Malaria, Tuberculosis Funding, United Nations Population Fund, and Polio Eradication.
For more information on this issue, sign up to receive Congressman Smith's email updates.
More on International Leadership & Foreign Affairs
February 2023
|Rep. Smith Statement on the One Year Anniversary of Russia's Invasion of Ukraine
|Rep. Smith Statement on Violence in Lascanood
January 2023
|Rep. Smith Statement on the Terrorist Attack in Jerusalem
December 2022
August 2022
|Rep. Smith Statement on Six-Month Anniversary of Russia's Further Invasion of Ukraine
July 2022
|Rep. Smith Statement on the House Passage of the FY23 NDAA
March 2022
|Rep. Smith Reacts to President Zelenskyy's Virtual Address to Congress
|Rep. Smith Praises Biden Administration Decision to Ban Russian Oil Imports


text:
Robin Youngblood is one of the lucky ones. Her house was ripped from its foundation and landed a quarter-mile away, but she survived. Youngblood spoke to Anderson and described how the slide moved her house in 30-seconds and smashed it to "matchsticks." In their full conversation, she goes into detail about what she believes caused the ground to give way, and what she plans to do now.
Filed under: Washington landslide • Web Exclusive
You must be logged in to post a comment.
Anderson Cooper goes beyond the headlines to tell stories from many points of view, so you can make up your own mind about the news. Tune in weeknights at 8 and 10 ET on CNN.
Questions or comments? Send an email
Want to know more? Go behind the scenes with AC361°


text:
I consider the Clean Code book to be obligatory for every programmer. And if you currently haven't the time to read it all at once then you should read – and take deep into your heart – at least the 12th chapter Emergence by Jeff Langr, which introduces Kent Beck's Four Simple Design Rules and explains thoroughly what they mean and why they're so important. The rules, in the order of importance, are:
- Runs all the tests
- Contains no duplications
- Expresses the intent of the programmers
- Minimizes the number of classes and methods (this isn't as controversial as it may sound, see below)
Stated like this in simple sentences it's difficult to see the depth hidden behind them and thus their essential importance for clean, high-quality code with high-quality design and I'll therefore try to explain what they really mean in the full extent based on Clean Codes. I'll cite some parts of the book – for I can't find better words than the author – hoping for the author(s) and publisher graciously permitting it.
Runs all the tests – Why is it so important to have comprehensive tests1, which are run and pass all the time, as this rule implies? Foremost because to be actually able to write unit tests, the code must follow the well-known high-quality design principles such as simplicity, single responsibility (including dependency injection), low cohesion etc. – only small, on each other and on the environment maximally independent objects are easy to test.
Remarkably, following a simple and obvious rule that says we need to have tests and run them continuously impacts our system's adherence to the primary OO goals of low coupling and high cohesion. Writing tests leads to better designs.
This is no theoretical statement – I've personally experienced it many times. See e.g. In Test Driven Development, how do unit tests help drive good design? (answer: they don't – but they make bad design so painful that you will want to change it).
Contains no duplications – "Duplication … represents additional work, additional risk, and additional unnecessary complexity." It can have many forms – lines of code that are same (or similar – adepts for generalization), duplication of implementation (e.g. if a collection has int size() and bool isEmpty(), isEmpty shall be based on size() == 0 to reuse the implementation) and other ones. You usually apply abstractions such as Template Method to remove duplication. The true value is in how it leads to the reduction of complexity.
As we extract commonality at this very tiny level, we start to recognize violations of SRP. So we might move a newly extracted method to another class. That elevates its visibility. Someone else […] may further abstract the new method and reuse it in a different context. This "reuse in the small" can cause system complexity to shrink dramatically.
Understanding how to achieve reuse in the small is essential to achieving reuse in the large. [Emphasis by JH.]
Expresses the intent of the programmers – Writing code that expresses well the intent of the programmer so that another person can easily understand it is important for many reasons, especially taking into account that "the majority of the cost of a software project is in long-term maintenance". Expressiveness is also one of the essential requirements of a clean code.
The clearer the author can make the code, the less time others will have to spend understanding it. This will reduce defects and shrink the cost of maintenance.
You can express yourself by choosing good names. We want to be able to hear a class or function name and not be surprised when we discover its responsibilities.
You can also express yourself by keeping your functions and classes small. Small classes and functions are usually easy to name, easy to write, and easy to understand.
You can also express yourself by using standard nomenclature. Design patterns, for example, … .
Well-written unit tests are also expressive. A primary goal of tests is to act as documentation by example. Someone reading our tests should be able to get a quick understanding of what a class is all about.
But the most important way to be expressive is to try. All too often we get our code working and then move on … without giving sufficient thought to making that code easy for the next person to read. [Emphasis by JH.]
I'd like to add here that the XP motto "the code is the documentation" doesn't mean, as some people read it, that you simply don't bother with any comments at all. This is not an elimination of some work, it's actually a challenging commitment to writing code so, that it reads as documentation – which essentially means that it is maximally expressive. And writing such code is much, much more difficult than typing whatever comes on your mind and then adding few comments here and there. Regarding comments and their replacement by expressive method names, the Clean Code book has a whole, highly inspiration chapter on that. (I have to mention a nice post on why code isn't documentation, which I've quite enjoyed.)
Minimizes the number of classes and methods – The least important yet absolutely not negligible rule:
Even concepts as fundamental as elimination of duplication, code expressiveness, and the SRP can be taken too far. In an effort to make our classes and methods small, we might create to many tiny classes and methods. So this rule suggests that we also keep our function and class counts low.
High class and method counts are sometimes the result of pointless dogmatism. …
I like the mention of "pointless dogmatism". As too often in religion, pointless dogmatism is a sign of an insufficient, shallow understanding of a principle, its true purpose and the proper context of application. It requires experience, open mind, and reason to apply principles correctly. (By no means want I claim that I have that experience and bright reason :-).)
Please realize that this rule doesn't suggest you should have only few classes and methods – the 4 rules are ordered by priority and the last one only applies if the previous ones are satisfied. As you certainly noticed, e.g. rule #3 requires "keeping your functions and classes small" and thus also their counts high. But it's also possible to have too many classes and methods and rule #4 is here to remind you of that and to help you find the right balance. Small stuff is easier to understand – but if there is too many (though perfectly understandable) pieces, you won't be able to see the whole picture. To be concrete: I've seen code base where every method was in a class of its own. Wouldn't you agree it's too many?
The fourth rule is sometimes alternatively stated as "Has no superfluous parts", meaning that you should remove all classes and methods that you don't really need to get rid of unnecessary complexity and maintenance overhead. I'd suggest reading the discussion about what "minimize the number of methods/classes" really means. But I feel that this new phrasing isn't an alternative but rather an addition to or a clarification of the original one for you should be really aware when optimally many classes/methods become too many.
- "Comprehensive tests" of course doesn't necessarily mean 100% coverage, which is at least sometimes both impossible and useless (think simple getters/setters, GUI). You have to find the right coverage for yourself (though there are arguments that 100% coverage is the ideal goal).
Studying, understanding, and finally applying the rules described above makes it possible to create much better (micro)designs and code and thus quality. As it is the case with Zen (as I've been told), the basic truths are very simple, but to understand them and to truly master them it takes years and a lot of effort. The important thing is, as the author himself mentions, to try. (I'm myself only somewhere at the beginning of the path. You'll know I'm there once you see me levitating above my notebook.)
I recommend the Clean Code book and especially chapter 12 to every programmer but I'm actually not really sure when it's the right time for a junior programmer to read it for I can imagine that for somebody without sound practical experience both with a beautiful, clean code and with a terrible, low-quality one, the guidelines in the book are way too abstract (however concrete they're) and difficult to grasp and appreciate – and their appreciation is perhaps the important factor for being motivated and able to put them into practice. But it certainly won't harm to read it as early as possible and come back to it now and then to discover new depths and resonance with one's recent experience.
Experience and craftmanship is also necessary to be able to apply the clean code principles and guidelines correctly and effectively because, to some extent, one rule always conflicts with another one and you must have some sensibility to the code to be able to find the proper balance between them and to avoid any trace of "pointless dogmatism".
Finally, I'd like to thank all those who help(ed) me understand that – and why – my code is bad and thus lead me towards better quality. Please keep on! I'd like to also thank Rober Pirsig for pointing out the importance of quality to me 🙂
Update: You may also want to check my blog Hidden Dependencies Are Evil – Arguing With The Clean Code (Slightly), which deals with Clean Code's chatper 14: Successive Refinement.
- Jeff Langr's own summary of the 4 rules
- Current Xp Simplicity Rules and Older Wording Of Xp Simplicity Rules (still useful to read, I think)


text:
This Novell® GroupWise® Mobile Server Administration Guide helps you administer a GroupWise Mobile Server system. The guide is divided into the following sections:
This guide is intended for network administrators who install and administer GroupWise Mobile Server.
We want to hear your comments and suggestions about this manual and the other documentation included with this product. Please use the User Comment feature at the bottom of each page of the online documentation, or go to www.novell.com/documentation/feedback.html and enter your comments there.
For the most recent version of the GroupWise Mobile Server Administration Guide, visit the Novell GroupWise 7 Documentation Web site.
For additional GroupWise Mobile Server documentation, see the following guides at the Novell GroupWise 7 Documentation Web site:
In addition to the electronic versions of the manuals, the following online help systems are available via the Help menu:
In Novell documentation, a greater-than symbol (>) is used to separate actions within a step and items in a cross-reference path.
A trademark symbol (®, ™, etc.) denotes a Novell trademark. An asterisk (*) denotes a third-party trademark.
When a single pathname can be written with a backslash for some platforms or a forward slash for other platforms, the pathname is presented with a backslash. Users of platforms that require a forward slash, such as Linux*, should use forward slashes as required by your software.
When a startup switch can be written with a forward slash for some platforms or a double hyphen for other platforms, the startup switch is presented with a forward slash. Users of platforms that require a double hyphen, such as Linux, should use double hyphens as required by your software.