Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Creature Templates  (Read 834 times)

Roses

  • Bay Watcher
    • View Profile
Creature Templates
« on: August 21, 2011, 07:08:12 pm »

Is there a way to make creature templates so that you can just reference them when making a bunch of similar creatures?

I seem to recall a COPY_TAGS type function. Is that the only way to do it? And if so if I make a 'sample' creature and don't give it any biomes or size or anything like that is it going to cause a crash?
Logged

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Creature Templates
« Reply #1 on: August 21, 2011, 07:14:56 pm »

If you don't assing biomes/entities/pet tokens to a creature, it'll never show up, but no other effects.


You could simply make the first creature, copy it's raws, paste and modify what you want.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Roses

  • Bay Watcher
    • View Profile
Re: Creature Templates
« Reply #2 on: August 21, 2011, 07:17:52 pm »

The only reason I wanted to avoid directly copying and pasting is because it is going to get very very long and harder to modify. Was hoping I could have a basic template for things like "Big Cats", "Small Cats", "Dogs", "Bears", etc ... so that the individual creatures themselves don't have to complex of raws.
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Creature Templates
« Reply #3 on: August 21, 2011, 10:51:33 pm »

You can create a set of rules through the "variations" file in the raws and then reference it within a raw entry to create a creature. In this way it would be possible to create a 'small' or 'large' variation of a creature and then apply it to create large cats or whatever. Unfortunately I've never messed with it myself, but there is probably someone around who knows how or there is always the wiki.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

Nidokoenig

  • Bay Watcher
    • View Profile
Re: Creature Templates
« Reply #4 on: August 21, 2011, 11:15:44 pm »

A c_variation file is what you want. Especially if you're making a base creature yourself, it should be pretty easy, certainly much easier than making a big, complex raw.

If you want to, for example, have a ROSES_CAT_BIG template creature that won't actually appear, you can use the DOES_NOT_EXIST tag to block it from appearing or being selected for preferences, then use [CV_REMOVE_TAG:DOES_NOT_EXIST] in the creature variation file so that derivatives will appear. In fact, you could probably get away with only having that in the creature variation template, just fully define a big cat in the template, then the lion, tiger or whatever entry can just start with:

Code: [Select]
[COPY_TAGS_FROM:ROSES_CAT_BIG]
[APPLY_CREATURE_VARIATION:ACTUALLY_EXISTS]

Then define the descriptions, tile, body size, ages and caste data, they'll overwrite what's defined in the template creature.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: Creature Templates
« Reply #5 on: August 22, 2011, 01:49:34 pm »

Thanks for the reply, that is what I will do

Edit: Does it matter the order the tags appear in the raws?
Logged

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Creature Templates
« Reply #6 on: August 22, 2011, 02:38:51 pm »

Only for a few things, but you could, for example, place the creature's [NAME] token at the end of the raw and it'd still work.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Kiktamo

  • Bay Watcher
    • View Profile
Re: Creature Templates
« Reply #7 on: August 22, 2011, 04:39:02 pm »

I'm not sure how much help it would be but looking into VBASE might be a good idea it's been very helpful to me in the past at least.

Here's the original thread http://www.bay12forums.com/smf/index.php?topic=62500.msg2214449#msg2214449

and here's where it's being continued http://forums.nothingtolost.com/dicestation/viewtopic.php?f=6&t=7

Good luck with the mod.
Logged

Nidokoenig

  • Bay Watcher
    • View Profile
Re: Creature Templates
« Reply #8 on: August 23, 2011, 05:05:44 am »

Thanks for the reply, that is what I will do

Edit: Does it matter the order the tags appear in the raws?

If you're asking this because the errorlog has told you that order matters, it's because your template creature is appearing lower down in the raw file, or in a later raw alphabetically, meaning the template isn't loaded into memory when the derivative calls for its data. This is why the animal pony variants in My Little Fortress are in a file that starts with creature_zzz, so it loads dead last. Just put your creature templates in creature_aaa_template.txt so they load before absolutely anything else.
Logged

Eldrick Tobin

  • Bay Watcher
  • [ETHIC: MODDING_UNDWARFY: PERSONAL_MATTER]
    • View Profile
Re: Creature Templates
« Reply #9 on: August 23, 2011, 01:46:31 pm »

CV Method:

As everyone in the thread has been covering 'copy tags from' I feel my mentioning of cv doesn't fit... but here's my 2 cents anyway in case you find anything of value.

I heavily use c_variation files for My Little Arachnid mod. Here's the base spider before any syndrome  or material flavoring.

creature_base_spider.txt backed up at GitHub

the various parts use CV_ADD_TAGs to put the body together section by section -separated in case I need to plop something between the bits. observe

backed up at GitHub


Except for feeling I'm making world gen scream bloody murder under it's breath at me, it works really well. I assume the unspoken screaming is due to having to have a plain chitin declaration preceding any and all flavor because of the heavy caste usage. Like so:

      [BODY_DETAIL_PLAN:CHITIN_TISSUES]
      [APPLY_CREATURE_VARIATION:SPIDER_START]

Hope this odd approach gives some food for thought, just felt I had to give an alternative to COPY_TAGS_FROM which hasn't been my friend very often.
Logged
--
Eldrick Tobin
Behold the unimpressive Aspectus Lolin mod. || My Little Arachnid Fortress attempt...
I mumble to myself on tumblr... Sometimes about DF Modding.

Roses

  • Bay Watcher
    • View Profile
Re: Creature Templates
« Reply #10 on: August 23, 2011, 03:31:15 pm »

I have been looking into the CV method a bit, I think I will definately make use of it. I am actually trying now to use a combination of [COPY_TAGS_FROM] and the [CV_ADD_TAGS] methods in order to minimize the complexities of the raws. Hopefully this will allow me to save a bit of space in the raws and make it a bit quicker, since I plan on modding in about 10,000 species (never gonna happen, but the plan is nice). Also this way if something changes it might be easier to make it work then going through all of the species.
Logged