Tint an event/player separate from screen?

Status
Not open for further replies.

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
Is it possible to tint an event or the player separately from tinting the screen? I'm using some picture overlays to create some very simple lights, but it looks odd to have the fire be dim like the rest of the screen. I'd like to be able to tint the torch event to 0,0,0,0 while the screen is tinted to -68,-68,-68,170.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
or maybe just create holes in your overlay so that the fire isn't tinted? because after all, if you have a fire, the area around it should be lighted too, not just the fire itself...
 
Last edited by a moderator:

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
I have holes in the overlay. Here's a picture of what I mean:



So in this picture, the screen has been tinted. The problem is, so is the fire, and it looks strange. I'd like to just tint the fire back to normal.



In this image, the picture has been tinted, but now the player looks too bright and colorful when out in the shadows. I want him tinted darker.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Put the fire in the picture (with glow). Problem solved.
 
Last edited by a moderator:

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
Had to create 3 copies of the picture and loop them in a parallel process to fake the stepping animation, but that did give me the effect I was looking for.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Sometimes, you have to get creative! Though I recommend looking for some scripts that let's you play GIF pictures, so you wouldn't have to manually loop it.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
Will parallax mapping solve that issue for all occasions? While trying to find a solution to my question, I came across one thread where someone was trying to create a "forensic vision," where the screen would turn blue, and clues would highlight orange, but the player's sprite would be unaffected.

Sans scripts, how would you do that? Just create the whole map as a parallax and manually set all the passable tiles? Or, to my original question, is there in fact a way to only tint events/sprites/players or something separate from the rest of the screen?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
Parallaxing all maps like this would help solve the issue, yes. You can simply have things you don't want affected by the tint on the overlay image. I do this for my own parallax maps, and have all lights (lanterns, windows etc.) on a new image which also includes a lot of hand painted shadows, to make it look like it's nighttime.


As for the script, I mentioned finding one that let's you play GIFs, which means you can import a picture that is a GIF to cycle between the flame animation, so you don't have to do it with looping and changing pictures yourself.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
ah, yeah... you're tinting the screen... well, maybe you could create an animation that greys out the target and have a parallel process event in that map to play that animation on the player over and over again...

or just Parallax things like Celianna said...
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
well, maybe you could create an animation that greys out the target and have a parallel process event in that map to play that animation on the player over and over again...
How would I go about doing that?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I'm not sure if it will work totally nice though as it might cause the gray part to flash...

but if you really want to try... make a new animation on the database, and simply make it flash a gray color into the target...then create a parallel process event on your map and make it play the animation on the player every so-so frames... 
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV




Decided to run with the idea of parallax mapping my lights and shadows a bit, which is a new experience for me - but it does seem to have a much better effect on tinting.

Thanks for the suggestion, Celianna - I'll consider the matter solved.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
You might find this parallaxing tutorial useful (ignore the script portion, as this was for VX) because it deals with custom lighting and such.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Reopening after discussion in this thread

Okay, I have something that should work for you. Just throw this script into your custom scripts - it aliases everything, so can go below everything.

class Game_CharacterBase alias shaz_vp_init_private_members init_private_members def init_private_members shaz_vp_init_private_members @viewport = 1 end def set_viewport(value=1) @viewport = value if value.between?(1,3) end def viewport @viewport ? @viewport : 1 endendclass Spriteset_Map alias shaz_vp_update_characters update_characters def update_characters shaz_vp_update_characters @character_sprites.each {|sprite| sprite.viewport = [@viewport1, @viewport2, @viewport3][sprite.character.viewport - 1] } endendTo call it, just do a Call Script command from an event, with this:
Code:
$game_map.events[id].set_viewport(2)
where id is the event id (no leading 0's) and the viewport is the one you want it to go to. 1 is the default, and anything in this viewport will be subject to the screen tone and shake. Anything in viewport 2 will not be affected by tone or shake, but will be affected by flash. Anything in viewport 3 will not be affected by tone, shake or flash, but will be affected by brightness (which changes when the screen fades for a transition). Those are the only viewports you should use. It's unfortunate that removing the influence of screen tone will also remove the influence of screen shake. Maybe with a little more effort that could be overcome (maybe just applying the screen shake to all of viewport2 might do it).You can also do this:

$game_player.set_viewport(2)but I wouldn't make that a permanent thing - I'd set it, do what needs to be done, and ensure at some point (even if it's when leaving the map) that it's changed back to 1 again.It will work on vehicles and followers too, but I haven't looked closely at what the script call would be. Probably something like calling the set_viewport() method on $game_map.vehicles[index] and $game_player.followers[index].

I also added a little security in there to ensure a game doesn't crash if you load a save file after installing this script.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
wow... that's pretty neat...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Note - this DOES mean the character will always appear over the top of everything on the map and all other players/events. So you couldn't do this to the player or event and still have them walk under things set to star passability on the map.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
640
Reaction score
353
First Language
English
Primarily Uses
RMMV
Works great, Shaz, thank you very much - and Celianna, I was impressed with your parallax tutorial. Since it's still my first game project, I'm concerned about biting off more than I can chew and never getting the game finished, especially since mapping is already my biggest hurdle. I may try and tackle it at some point, but for the moment I'm pretty happy with the discovery and implementation of doing lights and shadows over maps created with the maker.

I added your script and commented post to my game and added you to the credits, Shaz - thanks again.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top