PDA

View Full Version : Question about graphics_fonts.xml and color codes



Wintermute
July 2nd, 2019, 16:53
Ok, I noticed in the CoreRPG graphics_fonts.xml file that some font <color value="FFFFFF"/> don't have the # at the beginning of the hex code. CoreRPG fonts without the hash are hotkey, reference-section, and reference-chapter. I checked the 5e fonts and found the same on the reference-header and several more.

Is this a typo or is there a reason for no hash in the hex?

Thanks

Moon Wizard
July 8th, 2019, 23:32
The hash symbol is optional. It's a holdover from the original code that required it.

The color values are specified as either RGB or ARGB, where two hex value letters are used for each value (alpha (transparency), red, blue, green).

Regards,
JPG

Wintermute
July 9th, 2019, 01:43
Great, thanks for info. If I could ask a followup question. The bitmap image for the dicetower and dicetower drop (graphics/graphics_frames.xml) is shown as <bitmap>graphics/frames/dicetower.png</bitmap>. I'm guessing that this is a holdover as well. From my testing it looks like <bitmap file="graphics/frames/dicetower.png"/> format will work. I just wanted to confirm that it's ok to use the <bitmap file="" /> version, and not break anything down the line. To be honest, having that one element in a different format really aggravates my OCD. lol

Thanks again.

Moon Wizard
July 9th, 2019, 03:42
Many elements that are defined within tags, can also be defined as a specific attribute of the tag. (i.e. file/value/etc.) They are the same thing.

Regards,
JPG

Bidmaron
July 9th, 2019, 22:55
Well not quite. You cannot get to attributes through the api unless there is a specific call, whereas you can see tags using the array notation in the documentation regarding accessing control xml. Away from my computer so can’t give the link.
However, using attributes seems to be more memory efficient because it isn’t in the table FG builds from control xml.
At least this is what I have seen Moon Wizard?

Moon Wizard
July 10th, 2019, 01:24
Yes, Bidmaron is correct. That is the difference between the two during runtime script access. (Text within XML tags is accessible; but attributes are not.) In terms of built-in behavior, they are the same.

Regards,
JPG