Graying Effect

Started by Spoofus, July 27, 2013, 04:55:22 pm

Previous topic - Next topic

Spoofus

I am looking for some help on how to achieve this (see image below).
I am wanting to use Map as Battleback from TONs, I have tried to do this through events but as you can tell it grays out the enemy battlers as well
(I am using Paradogs Side-view script so the character sprites of the player party don't gray out.

Is there a line or something I can put in the section of TONs for Map as Battleback, or if possible make it a separate script?

Spoiler: ShowHide
 


My Blog site I am working on: http://spoofus.weebly.com/

KK20

The event command "Change Screen Color Tone" affects anything drawn on @viewport1 in the classes Spriteset_Map and Spriteset_Battle. Looking at Spriteset_Battle (the default RMXP class), you can see these lines:
Spoiler: ShowHide
    # Make battleback sprite
    @battleback_sprite = Sprite.new(@viewport1)
    # Make enemy sprites
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
    # Make actor sprites
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))

@battleback_sprite is the background image. I'm pretty sure that's what "Map as Battleback" in TONS uses since it got greyed out as well.
But notice how the enemy sprites are drawn on @viewport1 while actors are drawn on @viewport2...If you were to make it so the enemy sprites were drawn on @viewport2 instead, they won't be greyed out.

The problem now is that the enemies are above layers they shouldn't be over. You can combat this with creating another viewport

    @viewport_enemy = Viewport.new(0, 0, 640, 480)
    # Make enemy sprites
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport_enemy, enemy))
    end

But it will still be over certain graphics that are drawn on @viewport1. I can't exactly help you much more than this since I don't have physical access to your scripts.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Spoofus

I can send my Script data to you if you would like.
And I see what you are saying, You always make sense and as always helpful.


My Blog site I am working on: http://spoofus.weebly.com/

Blizzard

July 31, 2013, 02:30:41 am #3 Last Edit: July 31, 2013, 02:31:43 am by Blizzard
I kept postponing my post here, but I should stop being lazy already.

So, I have an alternative additional solution. If you use a script that creates a bitmap from your map (or a part of your map or just a simple screenshot) and then the Bitmap.desaturate method that I put somewhere in DREAM (it doesn't really belong there, I know), you can get the same effect on the final bitmap that you can then use as desaturated image for the battle background.

But KK20's solution with a viewport that simply uses a different tone is significantly simpler.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

lol that does sound overly complicated x)

Anyways, I got your scripts from the email. With a quick glance, I didn't see anything that would require changes right off the bat. Try implementing my solution first and give me a list of what's not right.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Spoofus

July 31, 2013, 03:47:09 pm #5 Last Edit: July 31, 2013, 03:56:54 pm by Spoofus
KK20's  solution worked very well.
I tested to see if attack animations would show up correctly on the enemy battler and everything.
Spoiler: ShowHide

I am still curious if this can still be done through a script, but either way results are what I was looking for. Thank you.


My Blog site I am working on: http://spoofus.weebly.com/

Vexus

This has nothing to do with the topic but I suggest you create a bunch of map battle backs instead of showing the map as background since they will be cluttered up with other stuff like in that picture (Other people and such) and you can't exactly know where you will fight when on grass so you might be over a tree or the enemy is over a tree or a house.

This is my opinion of course as I was going to do the same as you but I knew it would look odd/unprofessional unless it's fixed like in chrono trigger.
Current Project/s:

Spoofus

July 31, 2013, 09:27:32 pm #7 Last Edit: July 31, 2013, 09:43:56 pm by Spoofus
I was going for osome thing similar to what the first Lufia game did with it's battle system.
The graying in the previous picture was barely grayed out, I will be darker initially, And I have two versions of my Battle System and trying it with both.

also was looking for a script solution to this in a way.
The way KK20 mentioned only really works if You you a enemy on shown on the map, so you can set the screen tone back to normal, If you do this with random battles it is a bit harder I realized, because I am not good at doing events and the event editor in the troops tab tends to not be helpful in this sense is the only I managed to get his working right requires the battle processing, and well yeah.

And I am deciding on going with either random battles or being able to see the enemies roaming the map, I would like to have a way to do both So I can decide on which I want to go with, and if one causes to much lag then the other one will still be there you know.


My Blog site I am working on: http://spoofus.weebly.com/