Hey I have a small issue, I added a column called "color" to assign a color to each of my characters. From there, I added a line in the deck script that would extract the color value from the table and make it the color of the text that appears in dialogizer (with the .fcolor attribute). I tried mirroring how you handled it with the talk value in your lines of script, but I must be doing something wrong because it doesn't work. I cannot for the life of me figure it out on my own.. can I get some help please ToT
Sure I can help out! How are you storing the colors? Are you putting them in as hex codes, pattern number, or color names? If you're using color names (like red, orange, blue, etc), this is how you would do it
... the command script, handling colors should go in the same spot as where we handle talk sounds if (sum x=(extract command from char_table))>0 # gets the current style o:dd.getstyle[] # gets the talk value o.tsound:first extract talk where command=x from char_table # heres the new code!! "color" should be replaced with the name you used in the table c:first extract color where command=x from char_table o.fcolor:colors[c] # end of new code # apply the style dd.style[o] else ... rest of the script
This should work. If you're using pattern numbers instead, instead of colors[c], you just feed in "c" directly into the fcolor (since fcolor is looking for a pattern number). Since fcolor is looking for a pattern number, you probably can't use a hex code, and instead would need to modify the color palette of your game if you want to use different colors outside of the default colors.
Just FYI, All About Color includes a module ("col") which can handle conversion between RGB, HSV, and CSS names and find the closest match in the currently configured Decker palette.