Bay 12 Games Forum

Please login or register.

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

Author Topic: Making a new creature, how do I do it?  (Read 2054 times)

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Making a new creature, how do I do it?
« on: July 20, 2008, 06:29:21 am »

I'm trying to make a new creature to play with, but the modding guide on the wiki is very short and doesn't explain it well. How do I simply add a new creature into the game?
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #1 on: July 20, 2008, 07:12:08 am »

Well, at first you should start in some of the creature_***.txt file or make your own if you want your creatures to be "modular" (read: being able to be installed without any overwriting).

To make a new creature file, create a .txt file and name it creature_yourname.txt.
There should be a "creature_yourname" in the 1st raw which indicates the file name.
Then there's usually a free line (a good tone to divide different sections/creatures by an empty raw) and then there's a token [OBJECT:CREATURE] which makes the game to know that this file has creatures inside.

Then an empty line and here goes your first creature.
The creature should start with [CREATURE:CREATUREID] where CREATUREID is the creature's name as identificator to be referenced in other places and it should be unique.
Then there go different tokens which will describe your creature. Note that everything but the creature's name and descriptions of attacks should be in uppercase.
There's a lot to tell, I'll quote myself from another thread:
The creature definitely should have:
[CREATURE:ID]
[NAME:] - the creature's name
[TILE:] - the tile which represents the creature
[COLOR:] - the color of the creature tile
[POPULATION_NUMBER:] - I guess it's important, it shows how many creatures can appear on a map per year
[PREFSTRING:] - is essential for the reference in dwarves' thoughts
[BODY:] is essential if you need it to have any type of body, it's skipped for vermin and they're considered as a "while part body" (I don't think it's destructable in ways other than with vermin_hunter or via bridge-smashing)
[MAXAGE:] if you want your creature not to be immortal, if you skip it it won't die of an old age
[ATTACK:] if you want your creature to have any type of attack
[SIZE:] - you definitely need it if it's not a vermin, I think if you skip it it's set to default 7 but you'd better define it
[BIOME:] if you want your creature to appear somewhere, FANCIFUL creatures in vanilla are used for reference only and lack this tag
[SWIMS_INNATE]/[SWIMS_LEARNED] if you want your creature to be able to swim in any way

Other tokens are definitely totally optionable.
http://www.dwarffortresswiki.net/index.php/Creature_tokens

P.S. Sorry for typos/bad grammar if there were any, it's 3:30 AM here and I'm drunk.

P.S. The df uses the following raw system: different types of things are in different files, and which thing is in the file is determined by [OBJECT:TYPE] in the beginning, where the TYPE shows what does this file contains.
As long as BODY type if different from CREATURE, it's described in separate files.
The BODY type should have

[BODY:ID] - id of the bodypart which is referenced in [BODY:ID1:ID2:ID3:<...>:IDX] in the creature file.
[BP:BPID:bpname]<[tokens]> - where BPID = just an id for the bodypart part (which can be referenced in attack*) and <[tokens]> is the list of tokens which describe the bodypart
http://www.dwarffortresswiki.net/index.php/Body_tokens

* The attack uses some bodypart of creature and it can be described in 2 ways:
[ATTACK:MAIN:BYTYPE:STANCE:kick:kicks:1:2:BLUDGEON]
or
[ATTACK:MAIN:BYTOKEN:RLA:punch:punches:1:2:BLUDGEON]

The 1st example means that for that attack any bodypart (random from existant) with [STANCE] token will be used.
The 2nd example means that for that attack the certain bodypart with id [BP:RLA:right lower arm] will be used
There's a description of attacks on the creature tokens page.
« Last Edit: July 20, 2008, 07:13:39 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #2 on: July 20, 2008, 07:27:18 am »

Ok, so I've made a new .txt file named "creature_modded.txt" in which is written:

[CREATURE:SCORPID]
   [NAME:SCORPID:SCORPIDS:SCORPID]
   [TILE:'S'][COLOR:4:0:1]
   [MODVALUE:2]
   [LARGE_ROAMING][FREQUENCY:10]
   [POPULATION_NUMBER:10:20]
   [CLUSTER_NUMBER:3:7]
   [LARGE_PREDATOR][EVIL][MEANDERER]
   [PETVALUE:50]
   [GRASSTRAMPLE:0]
   [BONECARN]
   [PREFSTRING:stingers]

[BODY:QUADRUPED:TAIL:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:MOUTH:TAIL_STINGER]
   [BODYGLOSS:PAW]
   [SIZE:5]
   [MAXAGE:10:20]
   [ATTACK:MAIN:BYTYPE:STINGER:bite:bites:1:6:GORE][ATTACKFLAG_CANLATCH]
   [CHILD:1][CHILDNAME:scorpid baby:scorbid babies]
   [FAT:1]
   [ALL_ACTIVE]
   [BIOME:ANY_DESERT]
   [STANDARD_FLESH]
   [HOMEOTHERM:10067]
   [LAYERING:100]

Is that along the right lines?
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #3 on: July 20, 2008, 07:53:18 am »

The name,as I said, should be in lowercase. [NAME:scorpid:scorpids:scorpid]. Also should it "bite" with it's tail? Not strike, not pierce? Also your "tail-biting" attack makes "GORE" damage which is like by a lash.  And should it "latch on" with the tail? It's a bit strange :).
Just in case if you don't know attack types and haven't read the wiki yet:
GORE - mouth/lash attack which damages and causes pain plus if the value is EXTREME it can cut the bodypart off.
SLASH - slashing damage, like a sword or with sharp claws. Can cut bodyparts off.
PIERCE - piercing damage, like from a spear/arrow/scorpion tail. Very likely to damage internal organs and make a mortal wound.
BLUDGEON - bludgeoning damage, can't cut bodyparts off but it can break joints and send people flying. Also causes "headsmash" and "collapses in lump of gore" criticals.
BURN - burning damage, causing big pain, like hot metal/acid. Can damage internal organs.
HEAT - heat damage, in high amounts incenerates target. It is likely to burn internal organs. It can't set the target on fire despite of some myths.
COLD - cold damage, causes "freezing" of bodyparts, it is likely to damage internal organs.

Also make sure that your text file has creature_modded as the 1st raw and the [OBJECT:CREATURE] is there too.

=====
creature_modded

[OBJECT:CREATURE]

[CREATURE:SCORPID]
   [NAME:scorpid:scorpids:scorpid]
   [TILE:'S'][COLOR:4:0:1]
   [MODVALUE:2]
   [LARGE_ROAMING][FREQUENCY:10]
   [POPULATION_NUMBER:10:20]
   [CLUSTER_NUMBER:3:7]
   [LARGE_PREDATOR][EVIL][MEANDERER]
   [EXTRACT:scorpid venom:7:0:0]
   [EXTRACT_VALUE:100]
   [EXTRACT_PARALYZE]
   [PETVALUE:50]
   [GRASSTRAMPLE:0]
   [BONECARN]
   [PREFSTRING:stingers]
   [BODY:QUADRUPED:TAIL:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:THROAT:NECK:SPINE:BRAIN:MOUTH:TAIL_STINGER]
   [BODYGLOSS:PAW]
   [SIZE:5]
   [MAXAGE:10:20]
   [ATTACK:MAIN:BYTYPE:STINGER:strike:strikes:1:6:PIERCE][SPECIALATTACK_INJECT_EXTRACT:50:100]
   [ATTACK:SECOND:BYTYPE:MOUTH:bite:bites:1:5:GORE][ATTACKFLAG_CANLATCH]
   [CHILD:1][CHILDNAME:scorpid baby:scorbid babies]
   [FAT:1]
   [ALL_ACTIVE]
   [BIOME:ANY_DESERT]
   [STANDARD_FLESH]
   [HOMEOTHERM:10067]
   [LAYERING:100]
=====

There's the full content of the file.
I fixed the name and made it to actually strike with it's tail and make deadly paralysation attack.
Also there's a second attack so if it's tail is busy (i.e. you grab the tail to prevent it from poisoning you) it will bite you.
« Last Edit: July 20, 2008, 08:02:30 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #4 on: July 20, 2008, 09:58:06 am »

Thanks! That's really kind of you!

I had actually copied the Ice Wolf entry, so that's why there were some weird entries, but I understand now, thanks.

A question, the "Bodygloss:Paw" entry, I'm guessing is wrong? I couldn't find a scorpion anywhere, so I didn't know what to change it to.

 Beacon
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #5 on: July 20, 2008, 11:41:56 am »

Ah , bodygloss = different name for an existing bodypart.

I.e. if you want your bird to have a beak not mouth then you can make another bodypart named "beak" or just rename the "mouth" using bodygloss.
Bodygloss is described in boy file too.

If you want your scorpid to have paws then leave it, it replaces "leg" word. If you want legs, remove it.
What about ears/nose?
Also there's a giant scorpion creature in raws.

You have something like this:

'O'      /'
 o====
,I,I  ,I,I

(4 paws, a tail with a stinger, a head with ears and nose). Like a dog with a stinger.
« Last Edit: July 20, 2008, 11:50:30 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Hishan

  • Bay Watcher
  • [ALCOHOL_DEPENDANT]
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #6 on: July 20, 2008, 02:36:15 pm »

Nice one Deon. Also copy-pasting a similar entity can save you a lot of time. I added Valkyries, by simply copy-pasting humans, renaming and adding 2WINGS and FLIER
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #7 on: July 21, 2008, 09:09:14 am »

I've made a guide about creating the creature witch a custom body from scratch.
http://www.dwarffortresswiki.net/index.php/User:Deon#How_to

I don't know how good is it since my english is not great but I hope it helps.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #8 on: July 22, 2008, 06:52:08 am »

Thanks very much so far, but how do I make a creature playable in fortress/adventure mode? I followed the guide on the wiki, but it's for the old version, and no matter what I do, I can't get it to show up as playable. I tried making a new entry above the dwarves in default_entity, with adventure_tier 4, but it wouldn't appear, I added Indiv_controllable, still nothing, I replaced the humans with just a different creature, and I couldn't even -access- adventure mode... What is required to play with your new creatures as races in the game?

 - Beacon
Logged

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #9 on: July 22, 2008, 01:08:12 pm »

I've even downloaded the Middle-Earth mod, and checked the raws against mine, and I can't find ANY reason why mine isn't working...
Logged

Demonic Gophers

  • Bay Watcher
    • View Profile
    • The Tunnels
Re: Making a new creature, how do I do it?
« Reply #10 on: July 22, 2008, 02:32:15 pm »

Hmm....


What's your entity entry look like?
Logged
*Digs tunnel under thread.*
I also answer to Gophers and DG.
Quote from: Shades of Gray
*Says something inspiring and quote worthy.*
Opinions are great, they're like onions with pi.

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #11 on: July 22, 2008, 04:58:52 pm »

Hehe, I did a  :o when I noticed, but I had done [OBJECT_ENTITY instead of OBJECT:ENTITY for some reason... It's crazy how the tiniest thing will kill all of it, with no indication where the problem is...

Anyway, I got it working with the correct raw, and they generated and appeared fine, and played as one in adventure mode.

Thanks guys,

 - Beacon
Logged

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #12 on: July 23, 2008, 05:56:19 am »

Ok, new problem.

I've added 10 new races, making them all adventure and dwarf mode playable, and they're working fine, but when I generate a world, then go to make an adventurer, I get candidates of races that I haven't even touched, e.g Ogres.

What's going on? Ogres aren't even mentioned in an entity____.txt file....
Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #13 on: July 23, 2008, 06:25:16 am »

An error in adding a creature. You probably made a duplicate somewhere.
Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India

Beacon

  • Bay Watcher
  • Holy Dwarf-Beacon
    • View Profile
Re: Making a new creature, how do I do it?
« Reply #14 on: July 23, 2008, 06:31:36 am »

But why Ogre?
Logged
Pages: [1] 2