Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: What is this creature variant tag?  (Read 1034 times)

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
What is this creature variant tag?
« on: August 30, 2011, 01:38:18 am »

[CV_NEW_TAG:GRAVITATE_BODY_SIZE:70000]

As it says on the tin.  What is this?

BigFatStupidHead

  • Bay Watcher
  • obscure to the point of being cryptic
    • View Profile
Re: What is this creature variant tag?
« Reply #1 on: August 30, 2011, 04:08:51 am »

I believe that tag is used to make a creatures body size the median between the base creature and the value given. It seems to mostly be used in the [APPLY_CREATURE_VARIATION:ANIMAL_PERSON] tag, as in the panda man raws. I don't actually know where the creature variations might be viewed, sadly.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: What is this creature variant tag?
« Reply #2 on: August 30, 2011, 11:41:32 am »

My recollection, from looking through a disassembly of the code for parsing the raws (to determine CREATURE and CASTE data offsets), is that it takes all of the BODY_SIZE tokens specified and multiplies their values by the appropriate amount so that the adult size is now what you just specified - e.g. if you've got [BODY_SIZE:0:0:500][BODY_SIZE:1:0:2000][BODY_SIZE:2:0:5000] and [GRAVITATE_BODY_SIZE:20000], the effective result will be [BODY_SIZE:0:0:2000][BODY_SIZE:1:0:8000][BODY_SIZE:2:0:20000]. I believe [CHANGE_BODY_SIZE_PERC] works the same way, except you specify a multiplier instead of the target value for the adult size.

This should be fairly easy to verify once I have access to the necessary tools (Cheat Engine or equivalent memory viewer ) and information (the relevant data offsets).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: What is this creature variant tag?
« Reply #3 on: August 30, 2011, 01:44:48 pm »

That sounds very likely, yes.  I'm vaguely working on a mod similar to Fortress Defense, except all the enemies are rather weak, leaving your soldiers more vulnerable to exhaustion than anything else.  If I can just gravitate all of the regular creatures to be human-sized, that would make it a lot simpler.

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: What is this creature variant tag?
« Reply #4 on: August 30, 2011, 02:37:11 pm »

Experimentation suggests that the tag averages original body size and the gravitated-to body size. Pandas and panda men were a convenient way of testing.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: What is this creature variant tag?
« Reply #5 on: August 30, 2011, 03:47:44 pm »

I'm still not entirely sure what that means.  Does it make the adult size into the gravitate size, or does it average the adult size against the gravitate size?

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Re: What is this creature variant tag?
« Reply #6 on: August 31, 2011, 09:18:33 am »

I'm still not entirely sure what that means.  Does it make the adult size into the gravitate size, or does it average the adult size against the gravitate size?
From my experimentation, the latter (I'm not certain how it affects child and egg sizes). What Quietust described is more like the CHANGE_BODY_SIZE_PERC tag, but it's quite possible that it averages the last body size first, and then adjusts the other sizes as Quietust has described.
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: What is this creature variant tag?
« Reply #7 on: August 31, 2011, 10:06:29 am »

I've just done a test with serpent men (since they're easiest to locate in the game's memory), and it looks to be what you're describing.

With the default raws, the relevant BODY_SIZE vector contains the values 150, 1000, and 5000 (the game divides them by 10).
If I then add [GRAVITATE_BODY_SIZE:1000000], the values change to 1575, 10500, and 52500.

Thus, the new adult size is the average of the original adult size and the GRAVITATE_BODY_SIZE parameter, and all of the other sizes are scaled by the same factor.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: What is this creature variant tag?
« Reply #8 on: September 01, 2011, 12:42:17 am »

I see.  So then, is there a token that normalizes body size around a target?  Like, it changes the adult size to X, and then changes the other sizes by the same degree, to make the creature grow at the same rate?