Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: CTAG and animal-person body sizes... help?  (Read 514 times)

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
CTAG and animal-person body sizes... help?
« on: March 11, 2018, 07:26:00 pm »

My forum searches on the use of CTAG have yielded exactly zero results.

Toady One included this bit in the c_variation_default file:

Quote
Arguments:
If APPLY_CREATURE_VARIATION in the creature raws sends in arguments, you can use them below as !ARG1, !ARG2, etc.  The GAIT variations below have some examples.  In the creature raws, if an argument is of the form "5|6", for example, it'll be converted to "5:6" in the creature variation, so you can handle variable-token arguments with the | character.

Conditional tags:
Change TAG to CTAG and add, for example, CV_REMOVE_CTAG:1:YES:<regular stuff> to require !ARG1 to be YES to execute the changes.

After some syntax fiddling, I got it to work! Here's an example.

In creature, whichever;
   [APPLY_CREATURE_VARIATION:ANIMAL_PERSON:GLUG]

In CREATURE_VARIATION:ANIMAL:PERSON, within c_variation_default;
   [CV_NEW_CTAG:1:GLUG:AQUATIC]

The GLUG argument is first, so it's argument 1. When CREATURE_VARIATION_ANIMAL_PERSON checks it, the CTAG confirms that argument 1 is GLUG, and if so, it'll add AQUATIC. I tested this by applying ANIMAL_PERSON:GLUG to a hare man, and cackled with glee as he successfully air-drowned.

How is this any better than just adding [AQUATIC] to a creature?... Well, since you can batch a bunch of CTAGs with the same argument trigger, or different triggers, there's the possibility of adding sub-classes to a single creature variant instead of multiple creature variations!

However, my attempts to put this to use have failed so far. I applied the following to the creature in question, a damselfly man.

   [APPLY_CREATURE_VARIATION:ANIMAL_PERSON:DWARF_SIZE]

The remainder was added to CREATURE_VARIATION:ANIMAL_PERSON.

   [CV_REMOVE_CTAG:1:DWARF_SIZE:YES:BODY_SIZE]

   [CV_NEW_CTAG:1:DWARF_SIZE:YES:BODY_SIZE:0:0:3000]
   [CV_NEW_CTAG:1:DWARF_SIZE:YES:BODY_SIZE:1:168:15000]
   [CV_NEW_CTAG:1:DWARF_SIZE:YES:BODY_SIZE:12:0:60000]

In theory, this should remove the previous creature's size (in this case, bug's size of 0:0:1) and paste in the new sizes, copied from Dwarves, so that the creature can wear Dwarf clothing and vice versa... but it's not working. I think GRAVITATE_BODY_SIZE was interfering, so I tried to do a CTAG:1:DWARF_SIZE:NO with that, and then just cut the entire line out, but in the arena I still get my damselfly man wearing "small" armor and my dwarf wearing, from its perspective, "large" armor.

Is there something I'm doing wrong with the body sizes here, or are bugs a bad test case? Is the "large" and "small definitions still based on the total size of the creature, or do relsizes of body parts play a role? Help a brother out.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: CTAG and animal-person body sizes... help?
« Reply #1 on: March 12, 2018, 12:43:56 pm »

Update: Making new creatures from scratch is working just fine, though I'm disappointed by the result. I still like the idea of using CTAG for more procedural stuff, but I suppose it's not that useful in light of copy-pasting being more reliable...
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!