Map Effects

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
; )

Archeia > Nope, there's no invert color function in it.

Whatever, I've made one as fast as I could : https://www.dropbox.com/s/o7i4u51dkschjor/InvertColors.dll

You put the dll in the System folder of your game and you add this script :

Code:
class Bitmap  InvertColors = Win32API.new('System/InvertColors','InvertColors','i','')  def invert_colors    InvertColors.call(__id__<<1) rescue nil    clear_rect(0, 0, 0, 0) # for internal use  endendclass Game_Map_Effects  attr_accessor :invert_colors  alias addon_clear clear  def clear    addon_clear    @invert_colors = false  end  alias addon_active? active?  def active?    @active and (@invert_colors or addon_active?)  endendclass Spriteset_Map_Effects  alias addon_refresh_bitmaps refresh_bitmaps  def refresh_bitmaps    addon_refresh_bitmaps    @effects_bitmaps[0].invert_colors if @data.invert_colors  endend
: )
 
Last edited by a moderator:

KevinFrost

KevinFrost91
Veteran
Joined
Jul 19, 2013
Messages
39
Reaction score
9
First Language
English
Primarily Uses
RMMV
This script is absolutely incredible!!!!!!
 

uchihaponigon

Warper
Member
Joined
Dec 14, 2013
Messages
1
Reaction score
0
First Language
Spanish
Primarily Uses
Amazing script!!

But what about aplying effects to other viewports too?

Let's say i use a custom viewport to draw some pictures and i want the effects to affect those too. How can i do that?

I tried changing the viewport in the script (@viewport1) for my own viewport but when i apply any effect i only see a black screen until the end of the effect :S

Not even the pictures that are showing in the viewport before the effect are shown just a black screen...
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Update 1.4 :


- small optimizations


- reversed the behaviour of map_effects.back


- fixed bug of map_effects.memorize


- fixed bug of fluidity on some animations


https://www.dropbox.com/s/zpoxi8gn8ul38uq/Map%20Effects.rb


@uchihaponigon : take this last update, I've changed the way it works so you can add other viewports easily.


Line 488 : @map_effects ||= Spriteset_Map_Effects.new(@viewport1)


You can change it like that : @map_effects ||= Spriteset_Map_Effects.new(@viewport1, @viewport2)
 
Last edited by a moderator:

Bastrophian

The Pixel Heartist!
Veteran
Joined
Oct 26, 2013
Messages
3,830
Reaction score
2,069
First Language
English
Primarily Uses
Other
i have a little question. Is there a way to make this script effect only the parallax layer? Like, say i had a black hole parallax displayed in the back ground, could "Radial Blur+Zoom 50% + Fade 50 + Animation 5" make it look like it was spinning? I would need it to affect only the parallax layer though.

Anyway, awesome script!!!!
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Nope this script can't do that, it would need an other script in fact.
 

Euphoria

Veteran
Veteran
Joined
Jun 27, 2013
Messages
378
Reaction score
93
First Language
English
Primarily Uses
Is it possible to make items cause these effects for a certain period of time? Like poison or drugs, etc.
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Yes but it's up to you to implement it. (parallel event, condition, wait, etc...)

With scripts it would look like :

Code:
class Game_Map  alias map_effects_states_update update  def update(main = false)    poisoned_effect = $game_party.members.any? {|actor| actor.state?(2)}    if @poisoned_effect != poisoned_effect      @poisoned_effect = poisoned_effect      if poisoned_effect        effects.set_wave(8, 180, 360, 60)      else        effects.set_wave(0, 0, 0, 60)      end    end    map_effects_states_update(main)  endend
But if you don't understand scripts I think it's better that you do it by yourself with events. : )
 

Euphoria

Veteran
Veteran
Joined
Jun 27, 2013
Messages
378
Reaction score
93
First Language
English
Primarily Uses
Yeah, I don't know how to script so I'm confused.

Could you check out the script I do have that works somewhat like this?

http://forums.rpgmakerweb.com/index.php?/topic/23235-drunk-script/

I'm trying to change the screen darkening effect and the map effects from a simple shake to something more on your level.

If it could only be one effect for all items, I would prefer "Wave 8px + opacity 50%" from your video.

Thanks a ton if you can help :)
 
Last edited by a moderator:

Mireneye

High Chromancer
Veteran
Joined
Dec 22, 2013
Messages
143
Reaction score
19
Primarily Uses
First off I want to commend you on a phenomenal script! All this post processing WITHOUT an outside library! Awesome! Second I come with a question, something I've been thinking about for a while. Would it be possible to after you grab the picture, map it to say... A cylinder? Mathematically I guess you would just calculate the a bent surface you would then project the image onto? 

I'm asking because it would be pretty awesome to portray things like, the inside of a tower.
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Thanks!
As you said, this script doesn't use an external library and so I can't do this type of distortion.
I only use built-in functions and it's already a bit slow, doing per pixel operation would be far too slow in ruby.
 

RaddRadda

Villager
Member
Joined
Feb 13, 2014
Messages
20
Reaction score
2
First Language
English
Primarily Uses
RMMV
So I just added this script to my Script Editor, and I'm noticing my one scene seems to be buggin out on me now. I haven't actually started using the script yet, though. I haven't called on any commands. It also only seems to be this one scene, as it doesn't seem to have any adverse effects on other maps. I'm not sure if anyone else has run into any similar problems. I mostly wanted to use this script for this particular scene, so it's a bit disenheartening that it's the one that's messing up.

Update: I seemed to have resoled the problem. I made the map larger and the bugginess seems to have stopped. Apparently the default map size was too small for the script to run smoothly? Not entirely sure.
 
Last edited by a moderator:

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Normally it should work no matter the map size.

If you know how to reproduce the bug I'd like to have a look on it.
 

IceSage

Sage of Ice
Member
Joined
Jul 18, 2013
Messages
29
Reaction score
3
First Language
English
Primarily Uses
Normally it should work no matter the map size.

If you know how to reproduce the bug I'd like to have a look on it.
Smaller maps sort of jitter and bug out. A 17x13 room will start shaking and be all awkward if the player gets too close to a particular edge. This is a conflict with scripts that resize the screen dimensions. (Like Yanfly's Core Script.) For example, if I have a 640 x 418 screen size and 17x13 room, it doesn't really like it and will "loop" the map if you get close to the edge... and moving on the screen "jitters" around.

If you know of a way I could fix or adjust this, it would be appreciated. I know the solution so far is to just "resize the map" but it would be nice to have the flexibility for this script to just by plug and play.

(The stuff on the left is suppose to be on the right.)

 
Last edited by a moderator:

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
Ok thanks,

Maybe there's something fixable about the "jittering" but anyway you'll have to resize the map if you don't want it to loop.

That's how the vx tilemap works, you're not supposed to have maps smaller than the screen and it's automaticaly looped (not something related to my script).
 

C-C-C-Cashmere (old)

Resident Weirdo
Veteran
Joined
Mar 7, 2014
Messages
832
Reaction score
341
First Language
English
Primarily Uses
Yeah this script is absolutely breathtaking. Thank you. I'm probably going to be using this in tons of stuff now.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,137
Reaction score
15,461
First Language
Filipino
Primarily Uses
RMMZ
Hello Zeus, is it possible to make this do a grayscale filter over maps too?
 

Zack Phoenix

Artist
Veteran
Joined
Jun 12, 2013
Messages
187
Reaction score
26
First Language
German
Primarily Uses
RMMV
Isn't this done with map_effects.set_tone(0, 0, 0, 255, 60) as shown in the demo? Correct me if I'm wrong  :T
 
Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,137
Reaction score
15,461
First Language
Filipino
Primarily Uses
RMMZ
Oh odd, I did check the demo and somehow missed that. It's probably because of being unable to sleep for 2 weeks straight and today's deadlines getting to me XD
 

Zeus81

Veteran
Veteran
Joined
Mar 17, 2012
Messages
164
Reaction score
150
First Language
French
Primarily Uses
You can already change the screen tone with this command :

And for performance sake, it'll be better. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!
Anyone know the best size image to put in signature?
Well, the local collections agency is hiring... bleh. I'm not rude enough for them to hire me. Even the people they collect FOR don't like dealing with them. >.>
EA: "Kids are buying currency, not using money to gamble. It shouldn't be illegal!"
Me: "So... kids should be allowed into casinos to buy poker chips and not spend them at the blackjack table? Pretty sure, even buying currency used to gamble is illegal for children."
Been hard at work in photoshop working with MOG scripts for main menu & victory result screens, might do all my maps and Npc chatter this week too!

Forum statistics

Threads
105,500
Messages
1,014,214
Members
137,155
Latest member
diegodevin
Top