Color code help
#1
Posté 01 novembre 2011 - 04:51
#2
Posté 01 novembre 2011 - 06:36
However, if you take your .tga screenshot directly from your screenshots folder and open it in GIMP or Photoshop (or whatever good image editing program you use), you should be able to zoom in and get a sample of the text color, which can then be turned into the RGB values you'd need for scripting...assuming you use a script that converts RGB values for text into the proper code readable by NWN (I do because I don't really work well with things like color tokens).
#3
Posté 01 novembre 2011 - 07:07
#4
Posté 01 novembre 2011 - 11:35
Colors from the picture: (RGB)
Orangeish : 158 - 104 - 78
Cyanish : 204 - 219 - 212
Circled : 202 - 175 - 194
Purpleish : 184 - 156 - 171
Blueish : 157 - 176 - 193
But then again... Paint sucks and your screenshot resolution is a tad small aswell, so these values might not be accurate.
Modifié par Xardex, 01 novembre 2011 - 11:43 .
#5
Posté 01 novembre 2011 - 06:40
const string PRC_TEXT_BLUE = "<cfĚţ>"; // used by saving throws. const string PRC_TEXT_DARK_BLUE = "<c fţ>"; // used for electric damage. const string PRC_TEXT_GRAY = "<c™™™>"; // used for negative damage. const string PRC_TEXT_GREEN = "<c ţ >"; // used for acid damage. const string PRC_TEXT_LIGHT_BLUE = "<c™ţţ>"; // used for the player's name, and cold damage. const string PRC_TEXT_LIGHT_GRAY = "<c°°°>"; // used for system messages. const string PRC_TEXT_LIGHT_ORANGE = "<cţ™ >"; // used for sonic damage. const string PRC_TEXT_LIGHT_PURPLE = "<cĚ™Ě>"; // used for a target's name. const string PRC_TEXT_ORANGE = "<cţf >"; // used for attack rolls and physical damage. const string PRC_TEXT_PURPLE = "<cĚwţ>"; // used for spell casts, as well as magic damage. const string PRC_TEXT_RED = "<cţ >"; // used for fire damage. const string PRC_TEXT_WHITE = "<cţţţ>"; // used for positive damage. const string PRC_TEXT_YELLOW = "<cţţ >"; // used for healing, and sent messages.
Modifié par Alex Warren, 01 novembre 2011 - 06:43 .
#6
Posté 01 novembre 2011 - 07:34
http://nwvault.ign.c...r.Detail&id=931
Anyhow I also belive there is a way built in to apply some colour tokens without defining them, something like setRGB colour, you would have to see the lexicon. http://palmergames.c...oRGBString.html
#7
Posté 01 novembre 2011 - 09:07
OK... this is going to be complicated to explain...
Each letter is a character corresponding to a character code from 0000-0255 (not unlike what you get if you cast a char into an integer in a programming language like C, though the actual values are different). These are given as values <cRGB>.
In a way it's a bit like the 3 digit hexadecimal #RGB colour codes (eg #fff) you can use in web design, but using 8 bits rather than 4 bits worth of characters... Unfortunately not all characters are valid for use in NWScript. Some, like character 0, are just invisible. However you can use a space to represent zero. Others are specifically unusable because of issues with the compiler. Also, the toolset won't let you type in many of the codes. Copy pasting from notepad will work however.
To type out a character for the colour code, hold the Alt key, and type in the number from 0000-0255 you wish to use for the current channel, R G or B. For instance, to get a mid grey you could hold alt, type 0127, release, hold alt, type 0127, release, hold alt, type 0127, release. The 0 is important as the codes must all be 4 digits.
Modifié par _six, 01 novembre 2011 - 09:11 .
#8
Posté 01 novembre 2011 - 11:20
_six wrote...
To type out a character for the colour code, hold the Alt key, and type in the number from 0000-0255 you wish to use for the current channel, R G or B. For instance, to get a mid grey you could hold alt, type 0127, release, hold alt, type 0127, release, hold alt, type 0127, release. The 0 is important as the codes must all be 4 digits.[/i]
Interesting trick that I never knew about. On my system it only seems to work using the 10 key. I also have not figured out if it is the OS, Key board driver? or just the hardware of the Key board that allows it.
Thank for the trick Six.
#9
Posté 01 novembre 2011 - 11:40
My current guess is that it is a function of the keyboard that refferances the currently used code page.
Here is the link from my google search that some of you will find usefull.
http://tlt.its.psu.e...ealt.html#using
I would be interested in hearing if this works on lunix or not.
Modifié par Lightfoot8, 01 novembre 2011 - 11:41 .
#10
Posté 01 novembre 2011 - 11:59
it is not generally taught in schools anymore, unless you have an older (much older) teacher that grew up with early Unix.
As to how it is accomplished, it DOES depend on the hardware of the keyboard, and how that hardware was implemented. Every single key sends a different code to the computer, the computer associates that code to whatever language files have been assigned. Each combination of keys also sends a different code. Ctrl Alt Del for example has one code, Ctrl-Alt-A has a different code, Ctrl-A a different code etc... Typically the key coding is a combination of a maximum of 3 keys combined, Ctrl-Shift + key, Ctrl-Alt + key, etc, but you can't get a code for Ctrl-Alt-Shift-A for example except in rare keyboards.
The "1" above the "Q" key is a different code than the "1" on the ten-key pad. Depending on the language file and program using those codes, you end up with the same result on your screen, but it is actually a different code number that is sent.
So, it is a combination of hardware, driver, and actual program that interprets the resulting codes.
Edit: Forgot to give you the Alt-Code listing.
Modifié par Bannor Bloodfist, 02 novembre 2011 - 12:08 .
#12
Posté 02 novembre 2011 - 01:00
Lightfoot8 wrote...
Also most laptops will not be able to use it due to the lack of a ten key. Still a highly interesting and informitive post.
Most laptops can use numpad functions, however the NUM LOCK is often disguised. For me it is just a symbol on my F11 key toggled by the key combination FN + F11 (two keys used). Once there, the 10 pad numbers are from 0 to 9 listed as: m,j,k,l,u,i,o,7,8,9.
#13
Posté 03 novembre 2011 - 09:39
Or did yu already have your question answered to your satisfaction?
#14
Posté 03 novembre 2011 - 09:47
but im OK i will try to get color code from xardex's numbers, will see if I mix the right one, btw its none of the Alex Warren's colors as I already tried those, I got these codes as well
#15
Posté 04 novembre 2011 - 01:53
< cÌw.>< cÌ.Ì>Gnoll Shaman< /c> casts Magic Missile< /c>.
Gnoll Shaman casts Magic Missile.
Without the spaces after the < of cource.
The Hex for the colors there are on the first one CC 77 FF the second one is CC 99 CC
in decimal woild be 204 119 255 and 204 153 204.
I am not sure if spell as special ability is the same or not. If not just give me some more information on who was doing what to recreat it. Or try following that function call or one of the other ones to the same procedure. all the the text in the game seems to be proccesed through the same call to 0x00493BD0
Modifié par Lightfoot8, 04 novembre 2011 - 04:15 .
#16
Posté 04 novembre 2011 - 05:38
FF 66 01 & CC 99 CC & CC 77 FF
Gnoll Shaman damages A Test: 3 (3 Magical)
< cfÌ.>< c...>A Test< /c> : Will Save vs. Mind Spells : *success* :(9 + 8 = 17 vs.DC: 13)< /c>
66 CC FF & 99 FF FF
A Test : Will Save vs. Mind Spells : *success* :(9 + 8 = 17 vs.DC: 13)
Modifié par Lightfoot8, 04 novembre 2011 - 05:42 .
#17
Posté 04 novembre 2011 - 07:26
EDIT: lol what a mistake
Modifié par ShaDoOoW, 04 novembre 2011 - 06:45 .
#18
Posté 04 novembre 2011 - 05:45
ShaDoOoW wrote...
TYVM Funky, that was perfect answer the 204 153 204 matches exactly!
lol, Your welcome, But I have neer been called Funky before. Funky may even concider it an insult, He spells better then me.





Retour en haut







