Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Creating a Creature  (Read 2754 times)

FluffyToast J

  • Bay Watcher
    • View Profile
Creating a Creature
« on: May 09, 2008, 09:17:00 pm »

Hello everybody. I've just started modding DF, and I want to create a creature. Not any old creature, though. A magical one. So, a bipedal creature, that has native attacks that are magical. I'm not sure about how to go about this, so any help would be greatly appreciated. I might even post here about how I'm going, and a download if anybody wants it.

Oh, and this creature needs to be adventureable.
Thanks again, in advance... yeah.

Logged

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Creating a Creature
« Reply #1 on: May 09, 2008, 10:34:00 pm »

"Magic" hasn't really been implemented yet, but there's a few attacks you can give it that are out of the ordinary.


[FIREBREATH] gives the creature a fire breath attack, as well as the ability to throw fireballs.

I THINK the HEAT damage type can set the target on fire. Example:
[ATTACK:MAIN:BYTYPE:MOUTH:conjure flames to engulf:conjures flames to engulf:1:6:HEAT]

The [FIXED_TEMP:xxxx] tag makes a creature completely immune to extreme temperatures, and also affects the temperature around it. Room temperature is about 10060. Burn-anything-that-comes-in-contact-with-it is about 25000. Kill-everything-near-it-with-coldness is about 5000, I think.

The [WEBBER] and [THICKWEB] tags, when used together, cause the creature to create giant webs as a form of attack. I THINK they slow down things, but I'm not sure.

Logged
The World Without Knifebear — A much safer world indeed.
regardless, the slime shooter will be completed, come hell or high water, which are both entirely plausible setbacks at this point.

Lyrax

  • Bay Watcher
    • View Profile
Re: Creating a Creature
« Reply #2 on: May 10, 2008, 01:37:00 am »

HEAT and BURN are different things.  I *believe* that HEAT is just hot damage, but that BURN turns animals and adventurers into roman candles.

BURN, HEAT, and COLD are all quite special damage types, and are found in few locations in the game, especially as far as monsters go.

[SPECIALATTACK_INJECT_EXTRACT:X:Y] is another good special attack that injects poison.  You can make a creature capable of poisoning, but incapable of dealing damage.  I think.

[SPECIALATTACK_SUCK_BLOOD:X:Y] is good, BYTYPE:THOUGHT might also be what you're looking for.  BYTOKEN:BRAIN ?

It sounds like it's time to take Dwarf Fortress... and DO SCIENCE to it!

Logged
Witty

Comedian
Dabbling Pacifier
Dabbling Judge of Intent
Skilled Forum Poster

Kagus

  • Bay Watcher
  • Olive oil. Don't you?
    • View Profile
Re: Creating a Creature
« Reply #3 on: May 10, 2008, 01:44:00 am »

BYTYPE:THOUGHT can lead to some unusual attacks, I would recommend using the brain token instead.

HEAT, as confirmed by Deon, does not light people on fire.  I doubt that BURN does either, especially since HEAT has the more fire-related injury messages.  HEAT is like getting burned by flames, BURN is like getting touched with an exceptionally hot object like a frying pan.


Please note that [WEBBER], [FIREBREATH], [SPECIALATTACK_SUCK_BLOOD:X:Y] and other "special attacks" cannot be used in adventure mode.  Poison, however, can be inflicted through your attacks.  Also, [WEBBER], at least when combined with [THICKWEB], completely immobilizes the enemy, and prevents them from attacking until they break free.  That gives the webber several free attacks against them, which is really the main reason why giant cave spiders are so dangerous.

Devath

  • Bay Watcher
  • Dabbling Insane Dev
    • View Profile
Re: Creating a Creature
« Reply #4 on: May 10, 2008, 02:39:00 am »

It also tends to be a good idea to make the creature immune to its own attacks, esp. with web attacks, as a critter getting stuck on its own web would be stupid. THese are done by such tags as [WEBIMMUNE] and [SUPERFIREBREATHIMMUNE]. In addition, for poisons and the like, you must input values for EXTRACT, else it won't be injecting anything.
Logged
"Do not meddle in the affairs of Dragons, for you are crunchy and taste good with ketchup." - Unknown

FluffyToast J

  • Bay Watcher
    • View Profile
Re: Creating a Creature
« Reply #5 on: May 10, 2008, 06:02:00 pm »

Wow, thanks for the input! Now, If I'd known that this would be so difficult, I maybe wouldnt have started. But as I have, I suppose I gotta go through with it.

Making an adventure-able person requires it to be in the entity_defualt.txt right?
And somewhere else, just I dont know where...

creature_other.txt?
I've got no idea, and am stumped on how to do this. =/

Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Creating a Creature
« Reply #6 on: May 10, 2008, 06:25:00 pm »

You can actually create your own text files for your creatures, and just as long as the header is correct DF will find it and know what to do with it.

First line is just the name of the file without the .txt.  If the file is "creature_custom.txt" the first line inside will be "creature_custom"

the next thing in the file tells DF what kind of data to expect.  "[OBJECT:CREATURE]" tells DF that everything in the file is creatures, "[OBJECT:ENTITY]" tells DF to expect civilisations.

Once those are put in you have pretty much free rein.  If DF dosn't understand a line it just ignores it so you can comment freely.  The only real rules at this point is that everything you want the game to understand needs to be surrounded with brackets, and that every entry needs to start with [(OBJECT TYPE):(NAME OF OBJECT)] For example [CREATURE:CHOCOBO].  Everything under that line refers to the chocobo creature.

So if you wanted to add the chocobo by itself you would put in this.

code:
creature_custom

[OBJECT:CREATURE]

[CREATURE:CHOCOBO]<-Name the game uses for ID
   [NAME:chocobo:chocobos:chocobo]<-name desplayed onscreen
   [TILE:'C'][COLOR:6:0:1]<-Icon and color
   [PETVALUE:200][SPEED:800]<-Value of pet and speed (lower speed=faster)
   [PREFSTRING:feathers]<-why dwarves like them
       [PREFSTRING:wark]<-Can have multiple
   [LARGE_ROAMING][COMMON_DOMESTIC][WAGON_PULLER]<-Unknown,common work animal, pulls wagons
   [BENIGN][MEANDERER][PET]<-harmless, wanders?, pet
   [BODY:HUMANOID_ARMLESS:TAIL:2EYES:2EARS:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:2WINGS:BEAK]
   [BODYGLOSS:TALON_FOOT][NATURAL][MOUNT]<-can be undead, mountable ^Bodyparts
   [POPULATION_NUMBER:15:30]<-Total population possible in an area
   [CLUSTER_NUMBER:3:7]<-Herd size
   [SIZE:8]<-Creature size bonuses to attack and defence.  Dwarves are 6
   [ATTACK:MAIN:BYTOKEN:BEAK:peck:pecks:1:3:GORE][ATTACKFLAG_WITH]<-Attack info
   [CHILD:1][CHILDNAME:chocobo chick:chocobo chicks]<-What kids are called
   [FAT:5]<-How much fat they give when butchered
   [DIURNAL]<-Sleep at night
   [BIOME:GRASSLAND_TEMPERATE]<-Where they live if wild
   [BIOME:SAVANNA_TEMPERATE]<-Can have multiple
   [STANDARD_FLESH]<-Gives typical temperature tolerances
   [HOMEOTHERM:10068]<-Don't really know, standard body temperature?
   [LAYERING:100]<-Protection from cold.
   [SWIMS_INNATE][SWIM_SPEED:2500]<-Can swim naturally and speed when swimming
   [TRADE_CAPACITY:1500] <-How much weight carried when trading



Sorry for breaking the formatting folks.  And to make it adventureable yes you need a new entity.  You can typically just copy over humans though and change the creature to your custom race and head it with something like [ENTITY:PLAINS2].  It will make an entire race of the custom creature.

[ May 10, 2008: Message edited by: Greiger ]

Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Devath

  • Bay Watcher
  • Dabbling Insane Dev
    • View Profile
Re: Creating a Creature
« Reply #7 on: May 10, 2008, 06:44:00 pm »

You need a creature entry and an entity entry. For ease of finding your modded creatures, I would recommend making extra txt files to put your "new" critters in.

They will need headers,

code:
entity_default

[OBJECT:ENTITY]



code:
creature_standard

[OBJECT:CREATURE]  



where the first line is the name of the txt file and the second is a line indicating the types of objects the txt file initializes.

The entries themselves will need to be structured differently based on which file you are editing. For simplicity, we will look at dwarves.

For the creature segment of the coding, you will ned something like this:

code:
[CREATURE :DWARF]
   [NAME:dwarf:dwarves:dwarven]
   [TILE:1][COLOR:3:0:0]
   [GENPOWER:3]
   [BUTCHERABLE_NONSTANDARD]
   [INTELLIGENT]
   [TRANCES]
   [BENIGN]
   [CANOPENDOORS]
   [PREFSTRING:beards]
   [BODY:HUMANOID:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS:THROAT:NECK:SPINE:BRAIN:5FINGERS:5TOES:MOUTH]
   [STOUT]
   [MAXAGE:150:170]
   [ATTACK:MAIN:BYTYPE:GRASP :DWARF]
   [TRANSLATION :DWARF]
   [INDIV_CONTROLLABLE]
   [CIV_CONTROLLABLE]
   [DIGGER:ITEM_WEAPON_PICK]
   [WEAPON:ITEM_WEAPON_AXE_BATTLE]
   [WEAPON:ITEM_WEAPON_HAMMER_WAR]
   [WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [WEAPON:ITEM_WEAPON_SPEAR]
   [WEAPON:ITEM_WEAPON_MACE]
   [WEAPON:ITEM_WEAPON_CROSSBOW]
      [AMMO:ITEM_AMMO_BOLTS]
   [ARMOR:ITEM_ARMOR_PLATEMAIL:COMMON]
   [ARMOR:ITEM_ARMOR_CHAINMAIL:COMMON]
   [ARMOR:ITEM_ARMOR_LEATHER:COMMON]
   [ARMOR:ITEM_ARMOR_COAT:COMMON]
   [ARMOR:ITEM_ARMOR_SHIRT:COMMON]
   [ARMOR:ITEM_ARMOR_CLOAK:COMMON]
   [ARMOR:ITEM_ARMOR_TUNIC:COMMON]
   [ARMOR:ITEM_ARMOR_TOGA:UNCOMMON]
   [ARMOR:ITEM_ARMOR_VEST:COMMON]
   [ARMOR:ITEM_ARMOR_DRESS:COMMON]
   [ARMOR:ITEM_ARMOR_ROBE:COMMON]
   [HELM:ITEM_HELM_HELM:COMMON]
   [HELM:ITEM_HELM_CAP:COMMON]
   [HELM:ITEM_HELM_HOOD:COMMON]
   [GLOVES:ITEM_GLOVES_GAUNTLETS:COMMON]
   [GLOVES:ITEM_GLOVES_GLOVES:COMMON]
   [GLOVES:ITEM_GLOVES_MITTENS:COMMON]
   [SHOES:ITEM_SHOES_SHOES:COMMON]
   [SHOES:ITEM_SHOES_BOOTS:COMMON]
   [SHOES:ITEM_SHOES_BOOTS_LOW:COMMON]
   [SHOES:ITEM_SHOES_SOCKS:COMMON]
   [PANTS:ITEM_PANTS_PANTS:COMMON]
   [PANTS:ITEM_PANTS_GREAVES:COMMON]
   [PANTS:ITEM_PANTS_LEGGINGS:COMMON]
   [SHIELD:ITEM_SHIELD_SHIELD]
   [SHIELD:ITEM_SHIELD_BUCKLER]
   [SIEGEAMMO:ITEM_SIEGEAMMO_BALLISTA]
   [TRAPCOMP:ITEM_TRAPCOMP_GIANTAXEBLADE]
   [TRAPCOMP:ITEM_TRAPCOMP_ENORMOUSCORKSCREW]
   [TRAPCOMP:ITEM_TRAPCOMP_SPIKEDBALL]
   [TRAPCOMP:ITEM_TRAPCOMP_LARGESERRATEDDISC]
   [TRAPCOMP:ITEM_TRAPCOMP_MENACINGSPIKE]
   [TOY:ITEM_TOY_PUZZLEBOX]
   [TOY:ITEM_TOY_BOAT]
   [TOY:ITEM_TOY_HAMMER]
   [TOY:ITEM_TOY_AXE]
   [TOY:ITEM_TOY_MINIFORGE]
   [INSTRUMENT:ITEM_INSTRUMENT_FLUTE]
   [INSTRUMENT:ITEM_INSTRUMENT_TRUMPET]
   [INSTRUMENT:ITEM_INSTRUMENT_HARP]
   [INSTRUMENT:ITEM_INSTRUMENT_DRUM]
   [INSTRUMENT:ITEM_INSTRUMENT_PICCOLO]
   [CLOTHING]
   [SUBTERRANEAN_CLOTHING]
   [CURRENCY_BY_YEAR]
   [CURRENCY:COPPER:1]
   [CURRENCY:SILVER:5]
   [CURRENCY:GOLD:15]
   [SELECT_SYMBOL:ALL:ARTIFICE]
   [SELECT_SYMBOL:ALL:EARTH]
   [CULL_SYMBOL:ALL :DOMESTIC]
   [CULL_SYMBOL:ALL:SUBORDINATE]
   [CULL_SYMBOL:ALL:EVIL]
   [CULL_SYMBOL:ALL:UNTOWARD]
   [CULL_SYMBOL:ALL:FLOWERY]
   [CULL_SYMBOL:ALL:NEGATIVE]
   [CULL_SYMBOL:ALL:UGLY]
   [CULL_SYMBOL:ALL:NEGATOR]
   [METAL_PREF]
   [GEM_PREF]
   [STONE_PREF]
   [INDOOR_FARMING]
   [USE_CAVE_ANIMALS]
   [USE_ANIMAL_PRODUCTS]
   [COMMON_DOMESTIC_PACK]
   [COMMON_DOMESTIC_PULL]
   [COMMON_DOMESTIC_MOUNT]
   [COMMON_DOMESTIC_PET]
   [USE_MISC_PROCESSED_WOOD_PRODUCTS]
   [EQUIPMENT_IMPROVEMENTS]
   [ART_IMAGE_ELEMENT_MODIFIER:PLANT:64]
   [ART_IMAGE_ELEMENT_MODIFIER:TREE:64]
   [ITEM_IMPROVEMENT_MODIFIER:RINGS_HANGING:64]
   [ITEM_IMPROVEMENT_MODIFIER:BANDS:384]
   [ITEM_IMPROVEMENT_MODIFIER:SPIKES:384]
   [ADVENTURE_TIER:3]
   [FRIENDLY_COLOR:1:0:1]
   [DEFAULT_SITE_TYPE:CAVE_DETAILED]
   [LIKES_SITE:CAVE_DETAILED]
   [TOLERATES_SITE:CITY]
   [TOLERATES_SITE:TREE_CITY]
   [TOLERATES_SITE:CAVE_DETAILED]
   [LEADER_TYPE:KING]
   [SITE_LEADER_TYPE:STANDARD]
   [START_BIOME:MOUNTAIN]
   [BIOME_SUPPORT:ANY_WETLAND:1]
   [BIOME_SUPPORT:ANY_DESERT:1]
   [BIOME_SUPPORT:ANY_FOREST:3]
   [BIOME_SUPPORT:MOUNTAIN:3]
   [BIOME_SUPPORT:ANY_GRASSLAND:4]
   [BIOME_SUPPORT:ANY_SAVANNA:4]
   [BIOME_SUPPORT:ANY_SHRUBLAND:3]
   [BIOME_SUPPORT:ANY_RIVER:1]
   [DIPLOMAT]
   [DIPLOMAT_BODYGUARDS]
   [MERCHANT_BODYGUARDS]
   [ACTIVE_SEASON:AUTUMN]
   [ENTITY_GROUPING:FRIENDLY]
   [SIEGER]
   [MAX_STARTING_CIV_NUMBER:3]
   [START_GROUP_NUMBER:10]
   [MAX_POP_NUMBER:500]
   [MAX_SITE_POP_NUMBER:200]
   [RELIGION:PANTHEON]
   [RELIGION_SPHERE:FORTRESSES]
   [RELIGION_SPHERE:JEWELS]
   [RELIGION_SPHERE:METALS]
   [RELIGION_SPHERE:MINERALS]
   [RELIGION_SPHERE:MOUNTAINS]
   [RELIGION_SPHERE:WEALTH]
   [MAYOR]


As for this one, it can be trimmed down to only 5 or six tags and achieve the objectives one might want. Who knows what one wants? But for something for only adventuring, very little of this is needed. Among the things needed in the file would be a translation language, biome tags, [INDIV_CONTROLLABLE], site tags, and (optionally), any equipment tags you may wish to put on the creature. I'm not keen on adventuring, so I don't know all the effects of the tags on adventure mode.

In addition, the wiki has a modding guide that would have suited your purposes quite well. Read the wiki. Its like the FAQ for DF questions. If you can't find info in there, do ask around the forums, but it is a useful resource, albeit more useful for modding than other purposes.

Logged
"Do not meddle in the affairs of Dragons, for you are crunchy and taste good with ketchup." - Unknown

Devath

  • Bay Watcher
  • Dabbling Insane Dev
    • View Profile
Re: Creating a Creature
« Reply #8 on: May 10, 2008, 06:46:00 pm »

He types faster, damn him...
Logged
"Do not meddle in the affairs of Dragons, for you are crunchy and taste good with ketchup." - Unknown

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: Creating a Creature
« Reply #9 on: May 10, 2008, 06:49:00 pm »

I edited like five times.  :) Yer more detailed with the entity stuff though.
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

Devath

  • Bay Watcher
  • Dabbling Insane Dev
    • View Profile
Re: Creating a Creature
« Reply #10 on: May 11, 2008, 03:37:00 am »

THat seemed to be what the question was asking for, from the context. It sounded like he was putting a copy of his critter in the entity_default file, which is just silly.
Logged
"Do not meddle in the affairs of Dragons, for you are crunchy and taste good with ketchup." - Unknown

Kagus

  • Bay Watcher
  • Olive oil. Don't you?
    • View Profile
Re: Creating a Creature
« Reply #11 on: May 11, 2008, 05:17:00 am »

The tag's [FIREIMMUNE_SUPER], not [SUPERFIREBREATHIMMUNE].  The immunity tag for standard fire breath (imps, fire men, demons) is [FIREIMMUNE].

Be aware that that doesn't actually make the creature immune to fire.  It makes the creature immune to the specific attack, and it makes it *think* that it can walk through lava.  You'll need to add in some temperature tags in order for it to survive taking a hot dip.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Creating a Creature
« Reply #12 on: May 11, 2008, 07:52:00 pm »

And [NATURAL] means that the creature is animal, not can be an undead. For undead there's a token [UNDEAD_CANDIDATE].
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Neonivek

  • Bay Watcher
    • View Profile
Re: Creating a Creature
« Reply #13 on: May 11, 2008, 07:56:00 pm »

One good tip I can give if you want the creature to obviously be magical... is to give the description of its attacks an obviously magical nature

"The Magical Creatures surrounds you in magical thorns"
"Your brain has been peirced

or

"The Magical Creature casts death on you"
"Your right leg has been bruised"

I don't know how to do that... but I am sure someone here knows how.

Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Creating a Creature
« Reply #14 on: May 11, 2008, 08:12:00 pm »

[ATTACK:MAIN:BYTYPE:HEAD:cast the ray of energy at:casts the ray of energy at:3:7:BURN]

Just a rough example.

[ May 11, 2008: Message edited by: Deon ]

Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository
Pages: [1] 2