Author |
Message |
Draco18s
Joined: Tue Jun 03, 2008 3:19 am Posts: 13
|
Weird Material Issue
So as a first attempt to see what I could do, I did this: Code: AddTerrainObject = TerrainObject InstanceName = Gold Bricks AddToGroup = Bunker Bits GoldCost = 150 FGColorFile = ContentFile Path = Stuff.rte/GoldBrickStackFG.bmp MaterialFile = ContentFile Path = Stuff.rte/GoldBrickStackMat.bmp BGColorFile = ContentFile Path = Stuff.rte/GoldBrickStackBG.bmp BitmapOffset = Vector X = 0 Y = 0 Basically copying the Tutorial Bunker entry on the gold pile and using a gold bar looking graphic I found (it was called 24GoldBrick) and duplicating it into a pile of bars (21 of them, pyramid with a base of 6). Made FG, BG, and Mat bitmap files named above and tried it out (all in a folder Stuff.rte). To my amazement, it didn't act like gold. I verified the material color no less than four times, eye-droppered it three times from various sources, and did all kinds of other things. It still acts like sand (actor walks into it and it collapses, digger just spits it around, no money gain). WTF? Attached is the *Mat file.
|
Wed Jun 04, 2008 5:54 am |
|
|
Aspect
Joined: Mon Apr 28, 2008 1:35 am Posts: 383
|
Re: Weird Material Issue
I can tell you that the problem definitely isn't with the .bmp, (if it was you'd have a red default texture or just an incorrect texture) but besides that I'm not sure I can be too much help. The only reason I can come up with is that you didn't define the material correctly (but it looks like you know that already). Search for bunker modules and sand and I'm sure you will find something similar to your problem. I am sure I have seen this issue discussed on these forums before.
|
Wed Jun 04, 2008 6:17 am |
|
|
Draco18s
Joined: Tue Jun 03, 2008 3:19 am Posts: 13
|
Re: Weird Material Issue
I searched for it and didn't find anything. I also tried adding a materials definition but it errored out on me (duplicated file stuff, just kinda exploded), I also added it to the existing base.rte files (down under the Tutorial Bunker) and had the same results.
|
Wed Jun 04, 2008 6:48 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Weird Material Issue
MAT files use a custom palette. Making it the same color as ingame gold will do nothing; you need to match it to the gold MAT color.
Try the attached image, I used the gold MAT color from Base.rte/Scenes/Objects/SmallGoldMat.bmp.
|
Wed Jun 04, 2008 10:02 pm |
|
|
Draco18s
Joined: Tue Jun 03, 2008 3:19 am Posts: 13
|
Re: Weird Material Issue
...ok, now you're going to have to explain to my why replacing my image with yours made it work.
I didn't make the same color as the in game gold, I made it the color of the gold I found in *Mat files that already existed (namely GoldPileMat.bmp in the Tutorial Bunker folder).
Your mat file has the "image" as a grey color (RGB 89,72,72) and not the orange color I found other places (there's a forum post that listed the various Mat colors and what they were and I stole that color too, which was the same as the color I was using already).
|
Thu Jun 05, 2008 12:08 am |
|
|
Roy-G-Biv
Joined: Mon Feb 12, 2007 12:46 am Posts: 1765 Location: ..............
|
Re: Weird Material Issue
Grif wrote: MAT files use a custom palette. Where might I find this custom pallate? The same pallate I use to color sprites?
|
Thu Jun 05, 2008 12:10 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Weird Material Issue
The palette used to color MAT files, perhaps?
Draco18s: No one's really SURE how anything in CC works. Thus, tutorials kind of need to be taken with a grain of salt. I was fairly confident in my method; I've used it in previous builds. I didn't know if it would work in this one, but I felt it was worth telling you, and it DID work.
Basically, here's the thing. I don't know WHY, but Data a few builds back made materials dependent on a pallete index. Palette indexes can be used up, AND they're unpredictable. You also can't see them in most programs. Thus, finding preexisting colors is your best bet.
And so that's what I did. Or, rather, had you do.
|
Thu Jun 05, 2008 2:46 am |
|
|
Draco18s
Joined: Tue Jun 03, 2008 3:19 am Posts: 13
|
Re: Weird Material Issue
But why is it a grey instead of the pre-existing color (the Gold Pile) I found?
Unpredictable. Right.
|
Thu Jun 05, 2008 3:37 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Weird Material Issue
The mat pallete indexes on a different set of colors.
For WHY that's done, you'd have to ask Data.
|
Thu Jun 05, 2008 4:00 am |
|
|
Draco18s
Joined: Tue Jun 03, 2008 3:19 am Posts: 13
|
Re: Weird Material Issue
You answered the wrong question. The following are two Mat files that both grant oz of gold. Both use the default Materials.ini file. W T F Why is one grey and the other yellow/orange?
|
Thu Jun 05, 2008 6:10 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Weird Material Issue
Ah.
Uh, yeah, that one I'm really not sure about.
Again, no one really knows how this all works.
|
Thu Jun 05, 2008 7:06 am |
|
|
Draco18s
Joined: Tue Jun 03, 2008 3:19 am Posts: 13
|
Re: Weird Material Issue
Except Data, who isn't talking. Yeah, reminds me a lot of Toady One and Dwarf Fortress. There's an entire wiki set up by the fans noting down each and every detail such that we can have some semblance of understanding. And we still don't know how combat works. (Long story short on that: all attacks do damage, regardless of the defender's DAMBLOCK value, it just takes more of them if it's lower. Eventually a limb being beaten on by a rubber sword will get bruised, then broken, then mangled, then missing entirely. Of course, the defender will probably have ripped your head off first or he'll dodge sidways off a cliff and break his legs--yes, kittens can beat dragons that way: provided that the fall is long enough and the dragon doesn't remember to fly).
|
Thu Jun 05, 2008 8:46 am |
|
|
|