.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Invisible colour (http://forum.shrapnelgames.com/showthread.php?t=42637)

Klomster March 20th, 2009 02:26 PM

Invisible colour
 
Greetings.

I am making a small mod that features adeptus mechanicus from warhammer 40'000.
Perhaps not fitting, but i don't care.

Here are the problems i have run into, and with a bit of help from you, wan't to fix.

What colour should i use too create invisibility?

I've tried white, black, i've used no background in photoshop, nothing works.
Is it a specific rgb colour i need to use?


And i am also troubled with the fact that one of my weapons doesn't work.
Namely the earthshaker artillery cannon (i know, overkill on the poor fantasy guys but i wanted to do this mod)

Code: #newweapon 603#name "Earthshaker"#rcost 50#dmg 200#att 4#len 5#nratt -3#sound 18#armorpiercing#twohanded#range 150#ammo 12#aoe 50#nostr#secondaryeffect 171#explspr 10113#flyspr 100 1


It doesn't show the explosion effect i told it too have and it isn't aoe as i also told it too be.

Theese are the main problems, hope i get answers.

Basilisk mod stats.

#newweapon 603#name "Earthshaker"#rcost 50#dmg 200#att 4#len 5#nratt -3#sound 19#armorpiercing#twohanded#range 150#siegebonus 50#ammo 12#aoe 5#nostr#secondaryeffect 171#explspr 101 13#flyspr 100 1
#end

#newmonster 2203#name "Basilisk artillery unit"#spr1 "Basilisk 2.0 Ugly.tga"#descr "The basilisk is the standard artillery unit in the imperium. The adeptus mechanicus produces many of theese long range artillery units that has proven themselves time and time again. Although it is a tank, the drivers within (Cataphractii of the adeptus mechanicus Skitarii legions) can still be affected by some effects."#ap 18#mapmove 2#hp 90#prot 50#size 5#str 15#enc 0#att 1#def 11#prec 11#mr 15#mor 22#gcost 200#rcost 50#eyes 6#siegebonus 60#poisonres 40#maxage 250#neednoteat#armor "Medium armour plating"#trample#weapon 603
#end

Theese are the artillery unit codes, weapon and unit. Some things are unbalanced but that is a later issue.

Like (for some reason, the mod file is correct) skitarii troops (infantry) have 1000 castle defense each instead of 2. I'm working on fixing that.

Gregstrom March 20th, 2009 02:35 PM

Re: Invisible colour
 
Try magenta for the invisible colour. I don't know the exact RGB values, sadly.

But... other mods use it, so look at one of their tga files.

For the cannon, should #nratt -3 be #nratt 3, perhaps?

Calchet March 20th, 2009 03:28 PM

Re: Invisible colour
 
Pure black (0,0,0) will be transparent for images saved as 24-bit tga.

Edi March 20th, 2009 03:33 PM

Re: Invisible colour
 
Magenta is not invisible color, it's shadow. Its RGB is (255,0,255). Black is supposed to be the invisible color, and it's got to be the full (0,0,0) black.

Endoperez March 20th, 2009 05:47 PM

Re: Invisible colour
 
AoE 50 might be too big for the weapon. Try with lower AoE first, and see if that resolves the problem with explosion sprite. AoE 5 should work, and then increase it by 10 until it stops working.

You can get higher effective AoE by increasing number of effects.

lch March 20th, 2009 08:33 PM

Re: Invisible colour
 
Quote:

Originally Posted by Edi (Post 681318)
Magenta is not invisible color, it's shadow.

The funny thing is, in most old games or console games that use simple alphas like this, magenta is the usual color to indicate transparency, because it's usually safe to assume that it won't see any actual use. Only Dominions is different! :happy:

darloth March 21st, 2009 02:30 PM

Re: Invisible colour
 
On the other hand it makes sprite pages much easier to look at because they're on a black background with a magenta shadow, as opposed to a magenta background with a black shadow. I know which I prefer for seeing the actual details of a unit.

das123 March 21st, 2009 04:53 PM

Re: Invisible colour
 
Another couple of issues with using black as the alpha colour:

1. Black is a common colour so artist will need to be mindful that instead of selecting black, then need to change the colour slightly. This is an issue in graphic programs where artists are used to working from palettes.

2. Artists are also used drawing with soft brushes rather than pixel pencils so there is usually an anti-alias rim around the outside of images. When these images are used in-game there is a black rim of pixels around the edge where the anti-alias has kicked in. There are ways around this but by having magenta as the bg colour the problem areas should be a little clearer. Best bet would be to use a neutral warm grey (similar to the battle-field backgrounds) for image construction, then change the base colour afterwards. That way the aliasing is with a complimentary colour, I guess.

Of course, if we could use 32 bit TGA files instead of 24 bit, there wouldn't be a problem (32 bit supports full transparency).

Klomster March 23rd, 2009 02:14 PM

Re: Invisible colour
 
Aha, slight miss there.

It's supposed to be 24 bits.

Check, i'll change the targas to 24 bit files instead of 32 bits.


I first started out with 5-7 aoe for the weapon, but it didn't work.

The explosion effect didn't work either.

Klomster March 23rd, 2009 05:00 PM

Re: Invisible colour
 
Haha, awesome, now the models look good.

And i added a new "Pretender god"

Lucius pattern warhound titan. A really hard warmachine that destroys all in its path.

Only problem is that when i playtest the mod now it crashes when i press next turn (more precisely, when calculating events) and then i get.

"Error, bad monres"

I tried changing the resistances, but apart from that i have no clue what's wrong.

Sombre March 23rd, 2009 05:45 PM

Re: Invisible colour
 
Sounds more like you've put the resources on a unit up to some impossible value.

Edi March 23rd, 2009 06:05 PM

Re: Invisible colour
 
Yep, that's invalid resource value error. Anything past 900 is liable to cause a crash. The Better Independents mod's earliest attempts suffered from that. When I dialed it down to having a base resource cost of 800 for the units I wanted disabled, it worked. I wouldn't put anything past 850 there.

Endoperez March 24th, 2009 03:06 AM

Re: Invisible colour
 
If you give your warmachine armor instead of natural protection, make sure to test it against armor-destroying spells. Armor of Achilles, Descruction and Acid Storm outright destroy all armor, and weaker Acid spells as well as Rust Mist cause armor to be suspectible to breaking when the unit takes (melee?) damage.

Klomster March 24th, 2009 04:58 AM

Re: Invisible colour
 
Check, the resource value is too high.

i'll try with 500. Or perhaps, 300, it's a god after all.

Sombre March 24th, 2009 05:25 AM

Re: Invisible colour
 
Why does it need a resource cost at all if it's a pretender?

whiplashomega March 30th, 2009 03:37 AM

Re: Invisible colour
 
From my experience Dominions does support the 32 bit targas, but when using them you have to use the alpha channel for the background color instead of black (and I haven't figured out how to do the shadows). That being said, the 24 bit still seems easier to me, as it is much simpler to just color everything black then to painstakingly select the background and All and Only the background before converting to alpha, plus it tends to leave those unsightly black lines.

Endoperez March 30th, 2009 04:55 AM

Re: Invisible colour
 
When transparency is enabled, you can do the shadows with an area of 50% black.

Aezeal April 3rd, 2009 07:48 PM

Re: Invisible colour
 
sounds like a powerfull nation.. if you go sci-fi try balancing it against my nations from dominions 3000. It seems like those might be the nicest to play agaisnt thematically.. not to mention they are a bit stronger than regular too (though yours might be quite a bit stronger from the hints you dropped here). My Ulm nation is based on WH40K spacemarines quite a bit and the orcs are probably somewhat similar to WH40K orcs (don't know exactly since except for sprites they wheren't a real inspiration but giving orcs guns and spacecraft might get there fast I guess)

anyway I dont'know about 32-24 bits but I always delete the alpha channel in the end else I get blackboxed units, magenta as shadow is best but earlies I've had black there and acutally I didn't really notice either.

lch April 4th, 2009 03:19 AM

Re: Invisible colour
 
24 bits == RGB, 8 bits (value range 0-255) per color channel
32 bits == RGBA, the above with an additional 8 bits for the alpha channel mask


All times are GMT -4. The time now is 05:51 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.