Actions

Template talk

MDPalette

From Sonic Retro

Data can be a solid string, or separated by bars or spaces. I'm not sure how to do animation yet, but I had some thoughts about how to format it in the template:

{{MDPalette
|unanimated stuff
|rate of animation : number of animated colours : palette data
|unanimated stuff}}


Example: {{MDPalette|30:1:00000EEE}} would be one palette entry flashing black/white on a 1 second loop. - Hivebrain (talk) 19:15, 20 April 2018 (CDT)

How would you like to represent shadow/highlight mode - Mr. Cooljerk has suggested swapping the initial 0 for 1 or 2, or you could do it similarly to how you're proposing animations -Black Squirrel (talk) 04:25, 21 April 2018 (CDT)

Finally managed to log into my acct for the wiki, sorry been communicating thru PM. Hivebrain -- I see what you're doing with the wiki code to select the MD Palette from the string using #Sub and #switch, I'm just not familiar enough with the wiki code syntax to make the changes necessary. As BlackSquirrel mentioned, I'd like to have the ability to display shaded and highlighted colors on the wiki, and figure since the first character in 0BRG isn't used, we could use that as a selector flag. 0 = normal shading, 1 = shading, 2 or greater (for boundry checking) = highlighted. Let me just copy my PM to BS here -

"here's part of the changes that need to be made to MDHex2HTMLHex. I'm not sure exactly how to take the first of the 4 characters read and switch based on it's value, but here's the normal mappings:

|0=00 |2=34 |4=57 |6=74 |8=90 |a |A=AC |c |C=CE |e |E=FF


here's the mappings if the shadow flag is set (i.e. the first character is 1):

|0=00 |2=1D |4=34 |6=46 |8=57 |a |A=65 |c |C=74 |e |E=82


And here's the mappings if the highlight flag is set (i.e. the first character is 2 or greater):

|0=82 |2=90 |4=9E |6=AC |8=BB |a |A=CE |c |C=E4 |e |E=FF


you can see the new color steps are 1D, 46, 65, 82, 9E, BB, and E4, which can create colors otherwise not represented in the master palette. To clarify, these colors actually appear in special stages in both Sonic 2 and Sonic 3 (& Knuckles) and are used in a few backgrounds in Knuckles Chaotix as well. In order to document these colors appearing in these screens, you need a way to represent them in the wiki." -Cooljerk (talk) 02:01, 21 April 2018 (CDT)