Bay 12 Games Forum

Please login or register.

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

Author Topic: Random rainbow blood?  (Read 3255 times)

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Random rainbow blood?
« on: October 23, 2010, 10:31:00 pm »

This is my first real attempt at modding under the new version.  Yeah, it took me since April.  Anyway, I'm trying to make a creature with differently colored blood; but instead of just changing the blood's color, I want the blood color to be random for every individual creature, the same way hair and eye colors work.  I tried adding this down with the appearance templates-

Code: [Select]
[SET_TL_GROUP:BY_CATEGORY:ALL:BLOOD]
[TL_COLOR_MODIFIER:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1:LEMON:1:OLIVE:1:YELLOW:1:LIME:1:CHARTREUSE:1:MOSS_GREEN:1:GREEN:1:EMERALD:1:JADE:1:AQUAMARINE:1:TEAL:1]
[TLCM_NOUN:blood:SINGULAR]

-copied from the hair-color model, with a good spread of colors.  But it doesn't appear to do anything, all the blood splatters are still dark red.  I don't know where exactly the issue is, since there's also no way (that I know of) to make the game actually say what color a blood splatter is.  I know for instance that trolls have Aqua blood from this-

Code: [Select]
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE]
[STATE_COLOR:ALL:AQUA]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]

So, I need to work a randomization in there somewhere, if it's actually possible to randomly color blood, and I don't see why it wouldn't be.  It would also be nice to append a creature's blood color somewhere in the visual description.  I'm in way over my head with these raws - any hints?
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

Fayrik

  • Bay Watcher
    • View Profile
Re: Random rainbow blood?
« Reply #1 on: October 23, 2010, 10:46:15 pm »

I'm glad you want it on a per creature basis. At first I thought you wanted a different colour every time it was struck.

Firstly, I wanna know if you've managed to change a creature's blood colour to something crazy already?

And, how does:
Code: [Select]
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE]
[STATE_COLOR:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]
or variences fare?
Probably not too well, but other than that vague idea, I think unless someone else has already achieved this, that only Toady's gunna know what the tags should be and if it's possible.

And.. If this really isn't possible *coughyetcough* then, I will support a cause for getting this in an arc.
At the bare minimum, Unicorns should have this if nothing else!
Logged
So THIS is how migrations start.
"Hey, dude, there's this crazy bastard digging in the ground for stuff. Let's go watch."

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Random rainbow blood?
« Reply #2 on: October 23, 2010, 10:56:49 pm »

Try using a bunch of castes.
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.

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: Random rainbow blood?
« Reply #3 on: October 23, 2010, 11:04:16 pm »

And, how does:
Code: [Select]
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE]
[STATE_COLOR:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]
or variences fare?

Initially, did nothing, just red blood.  Then I made it-
Code: [Select]
[STATE_COLOR:ALL:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1]

And they all had yellow blood when I sliced them open in the Arena.  So, it starts to work, but it just uses the first color it comes to.  Still not random.

Try using a bunch of castes.

There has to be a more inclusive and simpler solution.  Especially since all those castes would be royal Hell for positions and Arena and such.
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

Zaerosz

  • Bay Watcher
  • ☼sperm whale leather thong☼
    • View Profile
Re: Random rainbow blood?
« Reply #4 on: October 23, 2010, 11:14:49 pm »

And, how does:
Code: [Select]
[USE_MATERIAL_TEMPLATE:BLOOD:BLOOD_TEMPLATE]
[STATE_COLOR:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1]
[BLOOD:LOCAL_CREATURE_MAT:BLOOD:LIQUID]
or variences fare?

Initially, did nothing, just red blood.  Then I made it-
Code: [Select]
[STATE_COLOR:ALL:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1]

And they all had yellow blood when I sliced them open in the Arena.  So, it starts to work, but it just uses the first color it comes to.  Still not random.
They all had yellow blood because all those colours default to yellow. Like how emerald dye shows up as microcline-cyan. If you're specifying a colour with a word instead of the three-digit code (e.g. 7:0:1), the colour displayed is the one that most matches the selected colour's RGB values - in this case, yellow.
Logged
くコ:彡

Fayrik

  • Bay Watcher
    • View Profile
Re: Random rainbow blood?
« Reply #5 on: October 23, 2010, 11:21:53 pm »

Initially, did nothing, just red blood.  Then I made it-
Code: [Select]
[STATE_COLOR:ALL:ORANGE:1:AMBER:1:SAFFRON:1:GOLD:1]

And they all had yellow blood when I sliced them open in the Arena.  So, it starts to work, but it just uses the first color it comes to.  Still not random.
I had a feeling that that was how it was going to work. That's why I hedged my bets on it working without the ALL tag, since ALL seems to me that it is forcing a value change along something somewhere.
Alas, I was half right, in the worst possible way.

I think for now Castes may be your best bet, untill this can be updated.
Though, this method opens up a few options of it's own. (Anyone here think of the Homestuck trolls as well?)

Zaerosz' post has changed this a bit, since my writing of this post.
I'll just mention that I meant to add (ETC) to the end of that colours list, since it was incredibly short. Sorry!
Logged
So THIS is how migrations start.
"Hey, dude, there's this crazy bastard digging in the ground for stuff. Let's go watch."

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: Random rainbow blood?
« Reply #6 on: October 23, 2010, 11:34:38 pm »

Yeah, I know the actual rendering just makes an approximate color for whatever the word is, from the init files.  "Orange" was the first one in line, so it all came out as ASCII orange (that is, yellow).  I added a bunch more colors too, just in case, to effect.

I suppose castes are a reasonable solution, I just figured there might be a shorter answer.  I mean, I don't have the slightest clue how any of the "SET_TL_GROUP" type tags actually work, so it seems to me that blood should work, unless Toady hardcoded it so that only exterior features can be applied like that, but it has to know which features are exterior.  Maybe I could trick it into thinking blood is a displayed feature?  There should be some way to make this happen.






(Anyone here think of the Homestuck trolls as well?)
Oh fuck, they're on to me.
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Random rainbow blood?
« Reply #7 on: October 23, 2010, 11:48:45 pm »

Yeah, I know the actual rendering just makes an approximate color for whatever the word is, from the init files.  "Orange" was the first one in line, so it all came out as ASCII orange (that is, yellow).  I added a bunch more colors too, just in case, to effect.

FYI the rest of those colors you added also would come out yellow.

Don't think it would matter, though.


EDIT: I tried it with colors that weren't all the same and, as expected, it didn't work. Didn't turn up in the errorlog either for some reason, though.

EDIT2: Making its blood color a pattern rather than a solid color didn't work either. Just uses the first color in the pattern, I think.

EDIT3:


I mean, I don't have the slightest clue how any of the "SET_TL_GROUP"   type tags actually work, so it seems to me that blood should work,   unless Toady hardcoded it so that only exterior features can be applied   like that, but it has to know which features are exterior.  Maybe I   could trick it into thinking blood is a displayed feature?  There should   be some way to make this happen.

The problem here is that TL stands for Tissue Layer. Blood isn't a tissue.
« Last Edit: October 24, 2010, 12:03:17 am by Untelligent »
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.

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: Random rainbow blood?
« Reply #8 on: October 24, 2010, 01:00:04 am »

The problem here is that TL stands for Tissue Layer. Blood isn't a tissue.

Well, if STL wouldn't work, then what is Blood?  Maybe there's another tag for that.  I'm still looking myself.

I suppose the alternative is to make a blood tissue of some kind, but that's stupid.
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

JoRo

  • Bay Watcher
    • View Profile
Re: Random rainbow blood?
« Reply #9 on: October 24, 2010, 02:39:47 am »

I've got it working with castes.  Each color of blood needs to be defined separately with a separate name because otherwise it just takes the last definition of the 'blood' material as applying in every case.  I have it like this:
Code: [Select]
    [CASTE:AQUA]
    [CASTE_NAME:aqua groundhog:groundhogs:groundhog]
    [USE_MATERIAL_TEMPLATE:BLOODA:BLOOD_TEMPLATE]
    [STATE_COLOR:ALL:AQUA]
    [BLOOD:LOCAL_CREATURE_MAT:BLOODA:LIQUID]
    [CASTE:YELLOW]
    [CASTE_NAME:yellow groundhog:groundhogs:groundhog]
        [USE_MATERIAL_TEMPLATE:BLOODB:BLOOD_TEMPLATE]
    [STATE_COLOR:ALL:YELLOW]
    [BLOOD:LOCAL_CREATURE_MAT:BLOODB:LIQUID]
        [CASTE:WHITE]
    [CASTE_NAME:white groundhog:groundhogs:groundhog]
        [USE_MATERIAL_TEMPLATE:BLOODC:BLOOD_TEMPLATE]
    [STATE_COLOR:ALL:WHITE]
    [BLOOD:LOCAL_CREATURE_MAT:BLOODC:LIQUID]
Logged
You have been struck down.
The giant cave spider spits out your head.

Aqizzar

  • Bay Watcher
  • There is no 'U'.
    • View Profile
Re: Random rainbow blood?
« Reply #10 on: October 24, 2010, 03:14:30 am »

Do the castes actually need to have separate names?  That's just too cluttered and confusing.  Well, not confusing, but it's just not what I'm looking for.  Obviously, castes work and need to have different internal titles, yeah, but I don't think their blood color needs to be reflected in their listed names.

And I could easily be wrong on this, but don't the castes need gender tags?  Or won't the groundhogs all be neuter written like that?
Logged
And here is where my beef pops up like a looming awkward boner.
Please amplify your relaxed states.
Quote from: PTTG??
The ancients built these quote pyramids to forever store vast quantities of rage.

3

  • Bay Watcher
    • View Profile
Re: Random rainbow blood?
« Reply #11 on: October 24, 2010, 04:30:47 am »

And I could easily be wrong on this, but don't the castes need gender tags?  Or won't the groundhogs all be neuter written like that?

They will. Ideally you'd make one caste for each colour and sex combination.
Logged

Untelligent

  • Bay Watcher
  • I eat flesh!
    • View Profile
Re: Random rainbow blood?
« Reply #12 on: October 24, 2010, 12:26:00 pm »

They don't need to have seperate names, but it probably helped for arena testing.
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.

Daywalkah

  • Bay Watcher
    • View Profile
Re: Random rainbow blood?
« Reply #13 on: October 24, 2010, 01:09:55 pm »

Try this:
Code: [Select]
[SET_TL_GROUP:BY_CATEGORY:ALL:BLOOD]
[TL_COLOR_MODIFIER:ORANGE:1:AMBER:2:SAFFRON:3:GOLD:4:LEMON:5:OLIVE:6:YELLOW:7:LIME:8:CHARTREUSE:9:MOSS_GREEN:10:GREEN:11:EMERALD:12:JADE:13:AQUAMARINE:14:TEAL:15]
[TLCM_NOUN:blood:SINGULAR]

A while back, there was a thread about how most dwarves had a single eye color. Numbering them consecutively solved the problem.

EDIT:You get the general idea. I just noticed Unintelligent's post about how we can't select blood with TL. What would we use to select blood?
« Last Edit: October 24, 2010, 01:19:30 pm by Daywalkah »
Logged
Magma cancels flow; interrupted by Ironblood.

3

  • Bay Watcher
    • View Profile
Re: Random rainbow blood?
« Reply #14 on: October 24, 2010, 01:18:53 pm »

As far as I'm aware, you just wouldn't. It might be possible with Toady's approach to gas layers - that is, via use of TISSUE_LAYER_UNDER, but not with blood.
Logged
Pages: [1] 2