How do I make the screen fade out but not the hero?
Short answer: Fake it[edit]
There is no easy way to selectively fade one part of the screen and not another but you can fake it using a free map linked to a free maptile and the fade screen out command.
First go under custom and edit your game. Choose a free map and a free tileset. I don't recommend you to choose the last one at the bottom because you may not be sure that this map and this tileset have to stay free. But anyway... For example map5 wille be used.
Once it's done save the change and go back under windows. Now launch hssed.exe and edit your hss file. Add the following plotscript.
script, screen fade, begin suspend player suspend npcs fade screen out (0,0,0) # black fade screen is optional teleport to map (5, 5, 7) fade screen in # delete this line if you don't use the fade screen out. resume player resume npcs end #end of the script
Not that this way is not a high quality way to fade one part of the screen and not another because the player can see the change of map as the hero teleports. Feel also free to add create npc command line if you intented to use screen fading to suggest telepathic communications. Enjoy!
Long Answer: Well, if you really want to...[edit]
If you are desperate to fade the map without fading the hero's walkabout sprite, then you can designate part of your master palette for the hero sprite (perhaps the first row of colors 0-15) and use the rest of the palette for the map and other things (colors 16-255). BE CAREFUL THIS REQUIERES ADVANCED KNOWLEDGE ABOUT THE OHRRPGCE.
First export your master palette and save your work as my_pal.mas or MyNewPal.mas. Now you can choose the part of the master palette you're going to free.
(See above the article how do I customize the master palette) I strongly recommend you to use the 2nd column on the right side of the master palette. Then go under custom and pick up a free palette. In the example below I've chosen palette 119 but indeed any of the 32767 palettes available will be fine.
Then, fill it with the colors of the 2nd column. (If you know where some colors of this rang have been used (or may have to, feel free to adapt your hero and maptile grafics by using a bit less dark colors .)
Now you can export your master and edit it with paledit.exe
(You can download paledit on this website if you don't have it on your hardrive.) Now it's time to lauch paledit.exe and to edit your master palette. First save your work as my_pal2.mas or MyNewPal2.mas. Now you can start to free the palette by transforming the range of colors into transparent. To do so, move all the cursors down. Do the same for each color. Save once more your work as my_pal2.mas or MyNewPal2.mas.
Now go back under custom and import the new master palette. If you have wisely chosen a column of the master palette with many unused colors in grafic making there shall be no main changes (and no problems hurra!).
If it is not the case feel free to import your old master palette and start all for the beginning (just import my_pal.mas or MyNewPal.mas and your grafics will be just like before). Now you can enter the following plotscripts
script, test fade master palette script, begin variable (mypalette) mypalette:= get hero palette (me) copy color(1, 0) # color 1 (number 0 transparent) copy color(17, 19) # color 2 (number 18) copy color(33, 249) # color 3 (number 249) copy color(49, 240) # color 4 (number 240 dark blue) copy color(65, 18) # color 5 (number 4) copy color(81, 20) # color 6 (number 20) copy color(97, 86) # color 7 (number 86) copy color(113, 190) # color 8 (number 190) copy color(129, 55) # color 9 (number 55) copy color(145, 255) # color 10 (number 255 white) copy color(161, 88) # color 11 (number 88) copy color(177, 90) # color 12 (number 90) copy color(193, 222) # color 13 (number 222) copy color(209, 63) # color 14 (number 63) copy color(225, 95) # color 15 (number 95) copy color(241, 253) # color 16 (number 253) update palette set hero palette (me, 119) #palette 119 pre defined for storing hero colors while fading update palette wait (3) #fade rest of master palette out to black GRADUALLY. Feel free to transform it into a simple #tweak palette if you need so. variable(i, j) for (i, -1, -16, -1) do, begin for (j, -1, 15) do, begin tweak palette(i, i, i, j * 16 + 2, j * 16 + 16) end update palette wait (2) end wait (35) #put stuff here fade screen out (240, 240, 240) #DO NO ERASE THOSE 3 LINES ELSE YOU MAY HAVE PROBLEMS TO LEAVE THE GAME wait (5) fade screen in #the game waits a few ticks before fading back in, change the hero palette back set hero palette (me, mypalette)# get back your current appearance end #end of the script #--------------------------------------------------------------------------- script, copy color, dest, source, begin write color(dest, color:red, read color(source, color:red)) write color(dest, color:green, read color(source, color:green)) write color(dest, color:blue, read color(source, color:blue)) end #end of the plotscript #---------------------------------------------------------------------------
Now some detailed explanations:
First about
variable(i, j) for (i, -1, -16, -1) do, begin for (j, -1, 15) do, begin tweak palette(i, i, i, j * 16 + 2, j * 16 + 16) end update palette wait (2) end
Be aware that figures in the variable make fade all the master palette except column number 2 on the left side. You remember that I strongly recommended you to choose that column didn't I?
Now further explanations about the line copy color (1, 0) (and above). 1 here correspond to the box for colors in master palette known as box 1. You can get this information by editing a master palette with paledit.exe and looking on the left down-side of the screen.
0 is the reference of the color you can find in the box numbered 0. What is to remember is that in each box of the master palette, 2 main pieces of informations are stored: first main piece the reference one of the 255 colors that you use to make your grafics, and the second main piece is the place (of the color in question) in the master palette.
That fully explains the sense of the warning message you have when you are going to import a new master palette! "It may change ALL your grafics!"
If the place of colors have changed in your new master palette then, all your grafics will be altered. (This is the reason I've made you saved your former master palette at the beginning of this article. How nice of me huh? ^_^ )
To finish I would like to point out that finding the color number of your hero is not that easy because of the shades of colors. The best thing to do is to launch both paledit and custom.exe and count the boxes until you find back the one you used.
Ex: the red I used to draw hero is the one on the 8th box from the left. Go under paledit.exe and you get 56! (with default master palette indeed)
You can now go back under custom and then test everything: your hero won't change as the master palette fades! (unless you didn't key in the right numbers ^_^|) ENJOY!