Post new topic    
Red Slime
Send private message
Is there a way to invert the color of a map? 
 PostTue Feb 11, 2014 5:39 pm
Send private message Reply with quote
I'm working on the storyline for Drakenmoor and think a useful indicator that the main character senses something's off would be for the entire map to invert its color.
The context for my need for this is that the MC will meet a primary antagonist and sense a wrongness about him enough for him to pick up a sword dropped by another character and engage him in battle.

(In fact, now that I think about it, this could be useful as a transition for normal battles. I'll have to think on that later...)
May the Moon light your path, and the Shadows hide you from your prey.

Posgagen urzefa Posyosriig ahgesqizeur genyouldr Jiikyouldr, gariigig urzefa Sazegaigyouldsa zegesigfe genyould fr'yopos genyouldr jiikrfagen.
Metal Slime
Send private message
 
 PostTue Feb 11, 2014 6:53 pm
Send private message Reply with quote
I think you could manually create an inverted alternate master palette and then use the 'load palette' command.
Red Slime
Send private message
 
 PostTue Feb 11, 2014 8:06 pm
Send private message Reply with quote
Seems like a lot of work for a second or two of inverted color, but then again, if the palette itself is inverted, then it's feasible that it would work. (Hours of rambling and thinking about this later...)

Could you test this and have a video showing the results?
May the Moon light your path, and the Shadows hide you from your prey.

Posgagen urzefa Posyosriig ahgesqizeur genyouldr Jiikyouldr, gariigig urzefa Sazegaigyouldsa zegesigfe genyould fr'yopos genyouldr jiikrfagen.
Blubber Bloat
Send private message
 
 PostTue Feb 11, 2014 8:15 pm
Send private message Reply with quote
Something I can think of, and I'll have to check plotscripting to make sure there is such coding, but changing master pallets with coding. at that point, just mirror or whatever your master pallete and then stick that as a secondary master-p then use coding to flip between the two.
edit:
Code:

load palette (palette number)
Loads a different master palette (one of the palettes on the "View Master Palettes..." menu), and the user interface colors for that palette. Use this if a backdrop or entire map was imported/drawn with a palette other than the default. Changes to the palette do not take effect until you call update palette or fade screen in, however the UI colors are changed immediately.

dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x V
Metal Slime
Send private message
 
 PostTue Feb 11, 2014 8:23 pm
Send private message Reply with quote
You could try something like this? This will invert the color of everything, including maptiles and walkabouts.

Code:
script, invert palette, begin
  variable(index, element)

  for(index, 0, 255) do,begin
    for(element, 0, 2) do,begin
      write color(index, element, 63 -- readcolor(index, element))
    end
  end

  update palette
end


If you just want to invert just the maptiles, you have to make a new tileset and load it using "load tileset". It is really super-easy to invert your maptiles using MSPaint.
- Just open up your tileset in MSPaint.
- Ctrl-A to select everything.
- Right-click and choose "Invert colors".
Red Slime
Send private message
 
 PostTue Feb 11, 2014 9:33 pm
Send private message Reply with quote
At the point, I would need everything, including walkabouts, to be inverted. Given that all of my sprites will be using the default palette, I think changing the palette during that time would work. (If I'm understanding what everyone is saying correctly)
May the Moon light your path, and the Shadows hide you from your prey.

Posgagen urzefa Posyosriig ahgesqizeur genyouldr Jiikyouldr, gariigig urzefa Sazegaigyouldsa zegesigfe genyould fr'yopos genyouldr jiikrfagen.
Metal King Slime
Send private message
 
 PostWed Feb 12, 2014 6:16 am
Send private message Reply with quote
Switching the master palette around does seem like the ideal solution for what you want. Consider though, that it would look absolutely garish. Even for a second or two, the screen would look all strange, and that would include the menus as well, not just the sprites and the map.

Perhaps consider darkening everything instead? That'd be easier and you wouldn't have to muck about with other palettes.
Being from the third world, I reserve the right to speak in the third person.

Using Editor version wip 20170527 gfx_sdl+fb music_sdl
Blubber Bloat
Send private message
 
 PostWed Feb 12, 2014 6:43 am
Send private message Reply with quote
BMR wrote:
Switching the master palette around does seem like the ideal solution for what you want. Consider though, that it would look absolutely garish. Even for a second or two, the screen would look all strange, and that would include the menus as well, not just the sprites and the map.

Perhaps consider darkening everything instead? That'd be easier and you wouldn't have to muck about with other palettes.

the code snippet and stuff I posted from the plotscriptionary suggests using the fade effect in the code, so I'm sure fading out will make the pallete swapping not appear terrible of course, this is all in theory
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x V
Red Slime
Send private message
 
 PostWed Feb 12, 2014 7:05 am
Send private message Reply with quote
The inversion would only appear for a moment, then it would be gone as quickly as it came.
May the Moon light your path, and the Shadows hide you from your prey.

Posgagen urzefa Posyosriig ahgesqizeur genyouldr Jiikyouldr, gariigig urzefa Sazegaigyouldsa zegesigfe genyould fr'yopos genyouldr jiikrfagen.
Metal King Slime
Send private message
 
 PostWed Feb 12, 2014 11:58 am
Send private message Reply with quote
Fades are fairly slow (the speed isn't adjustable yet), so you would probably not want to use them.

readcolor and writecolor lose some precision (they use values from 0-63 instead of 0-255). If you called Sephy's script twice it would slightly modify the palette, so instead do the following:

Code:
plotscript, inversion flash, begin
  invert palette
  wait(2)  # about 1/9th of a second, as there are 18.3 ticks per second
  reset palette
  update palette
end
Display posts from previous: