Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 5:15 pm
All times are UTC + 0
[YR] How does [ColorAdd] work, for non-programmers?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Sun Mar 03, 2019 10:54 am    Post subject:  [YR] How does [ColorAdd] work, for non-programmers? Reply with quote  Mark this post and the followings unread

What I've been trying to do is change BerserkColor's tint effect on units affected by Psychedelic=yes warheads, so that they're tinted purple instead of red. I changed BerserkColor to 11, and figured the vanilla rulesmd's Purple=15,0,15 would make berserk units turn purple. But they turn greenish instead.

WW's comments on the [ColorAdd] section in the ini file have a lot of programming jargon that goes over my head. I get that the 3 values are supposed to be "Red,Green,Blue" in that order, but they aren't out of 255 like LaserInnerColor.

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Sun Mar 03, 2019 12:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

They're binary based to convert to WW's choice of 5,6,5 color coding to support old monitors that can't understand 24-bit color (the usual 255 system). What this means is the maximums for each color are (in R,G,B) 31,63,31 meaning 15,0,15 is half colorized (the usual 128), changing browns to greens and other crazy color changes. What you want is at least 24,0,24. If you wanted to colorize it from from the usual system, take for example 200,50,175, you would divide by 8, 4, and 8 then take away 1 and round to the nearest whole number, so 200 would be 24, 50 would be 11 or 12, and 175 would be 21.

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Sun Mar 03, 2019 9:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

As a non-programer I don't know what are you saying

_________________

Back to top
View user's profile Send private message Skype Account
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Sun Mar 03, 2019 10:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

After a bunch of painstaking guess-and-check, I found my ideal setting: Purple=12,0,24. The only things I edited were setting AllowedToStartInMultiplayer=yes on CAOS (and no on LTNK) so I could quickly test how the tint looked on affected units, and the CDGAS anim was given Translucency=75 so I could see better.



SCRN.20190303-152339-00795.jpg
 Description:
Tested on a randomly-generated map.
 Filesize:  41.67 KB
 Viewed:  549 Time(s)

SCRN.20190303-152339-00795.jpg



Back to top
View user's profile Send private message
MRMIdAS
Energy Commando


Joined: 17 Jul 2008

PostPosted: Mon Mar 04, 2019 12:06 am    Post subject: Reply with quote  Mark this post and the followings unread

cxtian39 wrote:
As a non-programer I don't know what are you saying


Do you maths? because even as a non-programmer, so I understood none of the why, I can at least wrap my brain around punching shit into a calculator.

_________________
MIdAS - Turning wages into beer since 2002

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1374s ][ Queries: 14 (0.0102s) ][ Debug on ]