DasMoony 10 Posted January 3, 2012 (edited) Loosing some words about first: Yep, another parallax script. I know, they're already some out there and there probably will come much more. But no one I found could really handle maps with water. You could use water or whatever but it became much more difficult if you wanted actually something IN the water. As long as this stuff should be static, it's also possible already...but I wanted to throw events in the water. I want to see fishes swim around and all this stuff, or may let the hero dive in and well, all this fun stuff you can actually do with real water (except flooding...I'll try this later ). So.. this one let you do this and yet its simple to use Features: â— Easy-To-Use: Plug&Play (okay, you'll need to have the parallaxes...) â— Every single ParallaxLayer can be animated â— High compatibility â— Underwater Layer: Put stuff under the water-level â— Water Layer: Well, it's actually the water itself â— Basic Layer: Standard Parallax Layer â— Top-Layer: Use this one for Roofs, etc. â— Choose between 1-2-3 or 1-2-3-2 animation (Note:currently this is global) Screenshot Here's a little screenshot (it's crappy, I know but the slime is under water and it moves there around) How to use You can find detailed instructions in the script. Just follow them and you'll get happy^^ For putting somewhat under water make use of a script call dmo_change_z(-130). *edit* Almost forgot two things: - the parallaxes have to be *.png-files - the water-layer...save it with the transparency you want to use - the script itself doesn't make water transparent *endedit* Script #============================================================================== #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # â– DMO - LIQUID & PARALLAX SCRIPT # â— Version: 1.2 # â— Author: DasMoony # â— Date: January 4th, 2012 # â— Credits: DasMoony # â— LastEdit: February 25th, 2012 # #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # â– Features (or 8 reasons why to use this one): # â— Every single ParallaxLayer can be animated # â— Easy-To-Use: Plug&Play # â— High compatibility # â— Underwater Layer: Put stuff under the water-level # â— Water Layer: Well, it's actually the water itself # â— Basic Layer: Standard Parallax Layer # â— Top-Layer: Use this one for Roofs, etc. # â— Choose a global animation pattern (1-2-3 or 1-2-3-2) # #============================================================================== # â– Description # A nice parallax script that makes uses of several layers which you could # animate if you want. It's also possible to put events under water, so # you're finally able to make fishes and other livings living in the water. # But one of the greatest part about all this stuff is how easy you can use # it. If you're okay with the default settings you'll never have to touch the # script again. # #============================================================================== # â– Credits and Terms of use # â— Credits: # DasMoony # â— This script is made for free use in commercial and non-commercial # projects but credits are required # â— Do not post direct links to the download file, instead link the page that # contains it # â— You're not allowed without the authors permission to distribute this # script. Of course you're allowed to distribute the script within your # project. # â— If you're allowed to distribute the script you can't require any rights # about the script # â— If this script is used in commercial projects, I demand a free copy of # it. Contact me for the details. # #============================================================================== # â– Instructions # â— Plug the script in # Put this script to the Materials-Section. # â— The old Parallaxes # If you want to use any parallaxes in the old way, you can do this without # any problems. Just make sure that they don't have a '['-Character in # their filename # â— The Frames # In the following part of the Instructions I often refer to X. X is a # number from 1 to infinite. The numbers describe the order of your frames. # â— The Parallaxes # â— Underwater-Layer # This layer represents your underwater-world. Simply add the suffix # [subX] to the filename # â— Water-Layer # This layer represents your water surface. Simply add the suffix # [waterX] to the filename # â— Ground-Layer # This layer represents your actual map. Simply add the suffix # [groundX] to the filename # â— Top-Layer # This layer represents the ceiling, sky, tree crowns or whatever # you have over your heads. Simply add the suffix [topX] to the # filename # â— How to use the parallaxes # Name all your parallaxes for a map the same and add one of the suffixes # mentioned above (Example: demomap[ground1].png). # To use your parallax-set simply choose anyone of the set as your # parallax background like ever. That's all. # â— Putting stuff underwater # To place an event under the water level change its z-value. You can make # use of 'dmo_change_z(VALUE)' in a script call to place the event itself # in the water or 'dmo_change_z(VALUE,EVENT_ID)' should be lower then # your water-level (-110 by default) and higher then the Underwater-layer # (-250 by default) # â— Configurations # You can configure some stuff if you scroll down to the Options (Or search # for OPTIONS) # â— DEFAULT_SPEED # is the speed of the animation. It determines how often a # parallax frame will be changed # â— SUB_Z, WATER_Z and TOP_Z # They are the z-values for the 3 extra-layers # â— PATTERN_LOOP # Define the animation pattern. You can choose between 1-2-3 and # 1-2-3-2 # #============================================================================== # â– FAQ # â— What if I want to use 3 water frames but only one ground frame? # It's no problem. The script will know how many frames of each type exists # and loops through the ones which are there. # #============================================================================== # â– Support # â— Currently this script is supported on rpgmakervxace.net # #============================================================================== # â– Technical Aspects (this section is thought for other scripters) # â— aliases # â— Spriteset_Map # â— create_parallax # â— dispose_parallax # â— Game_CharacterBase # â— screen_z # â— Scene_Map # â— pre_transfer # â— overwrites # â— Spriteset_Map # â— update_parallax # â— naming standards # I make use of the prefix 'dmo_' for own properties, methods and classes. # For aliases I use the prefix 'dmo_al_'. # #============================================================================== # â– Contact Information # â— Email: # sid.dasmoony@gmail.com # #============================================================================== #============================================================================== module DMO #============================================================================== # â– OPTIONS - Here you can change some settings. #============================================================================== module OPTIONS module PARALLAX # The amount of frames that shall pass by until the update of the # parallax frames # Default value: # 30 DEFAULT_SPEED = 30 # Z-Indexes of the 3 extra layers # Default values: # SUB_Z = -250 # WATER_Z = -110 # TOP_Z = 250 SUB_Z = -250 WATER_Z = -110 TOP_Z = 250 # Defines the animation pattern. If true it's 1-2-3, if false it's # 1-2-3-2 PATTERN_LOOP = false end end #============================================================================== # â– End of OPTIONS. # It's recommended not to change anything behind this point. If you're still # do, it's your pretty own risk. #============================================================================== end #============================================================================== # â– Spriteset_Map #============================================================================== class Spriteset_Map def dmo_set_parallax_info if !@parallax_name.index('[') @dmo_parallax_info = {"ground"=>[[1,1,0],@parallax_name]} return end name = @parallax_name[0,@parallax_name.index('[')] @dmo_parallax_info = {} Dir.glob("Graphics/Parallaxes/" + name + '\[*\].png').each do|f| f.gsub(/Graphics\/Parallaxes\/(.*\[(\D*)(\d*)\].png)/){ @dmo_parallax_info[$2] || @dmo_parallax_info[$2] = Array.new([]) @dmo_parallax_info[$2][$3.to_i] = $1 @dmo_parallax_info[$2][0] || @dmo_parallax_info[$2][0] = [1,0,1] @dmo_parallax_info[$2][0][1] += 1 } end end def dmo_add_parallax_layer(type) @dmo_parallax_info || dmo_set_parallax_info tmp = @dmo_parallax_info[type][@dmo_parallax_info[type][0][0]] if(@dmo_parallax_info[type]) if tmp @dmo_parallax_info[type][0][0] += @dmo_parallax_info[type][0][2] if DMO::OPTIONS::PARALLAX::PATTERN_LOOP @dmo_parallax_info[type][0][0] = 1 if @dmo_parallax_info[type][0][0]>@dmo_parallax_info[type][0][1] else @dmo_parallax_info[type][0][2] *= -1 if @dmo_parallax_info[type][0][0] >= @dmo_parallax_info[type][0][1]||@dmo_parallax_info[type][0][0] <= 1 end end return tmp end alias dmo_al_create_parallax create_parallax def create_parallax dmo_al_create_parallax @dmo_parallax_sub = Plane.new(@viewport1) @dmo_parallax_sub.z = -250 @dmo_parallax_water = Plane.new(@viewport1) @dmo_parallax_water.z = -110 @dmo_parallax_top = Plane.new(@viewport1) @dmo_parallax_top.z = 250 @dmo_counter || @dmo_counter = 0 end def dmo_clear_parallax_cache if !@parallax_name.index('[') Cache.parallax(@parallax_name).dispose return end name = @parallax_name[0,@parallax_name.index('[')] Dir.glob("Graphics/Parallaxes/" + name + '\[*\].png').each do|f| f.gsub(/Graphics\/Parallaxes\/(.*\[\D*\d*\].png)/){ Cache.parallax($1).dispose} end end alias dmo_al_dispose_parallax dispose_parallax def dispose_parallax dmo_al_dispose_parallax dmo_clear_parallax_cache @dmo_parallax_sub.dispose @dmo_parallax_water.dispose @dmo_parallax_top.dispose end def update_parallax if @parallax_name != $game_map.parallax_name || @dmo_counter >= DMO::OPTIONS::PARALLAX::DEFAULT_SPEED @dmo_parallax_info = nil if @parallax_name != $game_map.parallax_name @dmo_counter < DMO::OPTIONS::PARALLAX::DEFAULT_SPEED || @dmo_counter = 0 @parallax_name = $game_map.parallax_name @parallax.bitmap = Cache.parallax(@dmo_tmp) if (@dmo_tmp = dmo_add_parallax_layer("ground")) @dmo_parallax_sub.bitmap = Cache.parallax(@dmo_tmp) if (@dmo_tmp = dmo_add_parallax_layer("sub")) @dmo_parallax_water.bitmap = Cache.parallax(@dmo_tmp) if (@dmo_tmp = dmo_add_parallax_layer("water")) @dmo_parallax_top.bitmap = Cache.parallax(@dmo_tmp) if (@dmo_tmp = dmo_add_parallax_layer("top")) Graphics.frame_reset end @dmo_counter += 1 x = $game_map.display_x * 32 y = $game_map.display_y * 32 if @dmo_parallax_info.size == 1 @parallax.ox = $game_map.parallax_ox(@parallax.bitmap) @parallax.oy = $game_map.parallax_oy(@parallax.bitmap) else @parallax.ox = x @parallax.oy = y @dmo_parallax_sub.ox = x @dmo_parallax_sub.oy = y @dmo_parallax_water.ox = x @dmo_parallax_water.oy = y @dmo_parallax_top.ox = x @dmo_parallax_top.oy = y end end end #============================================================================== # â– Scene_Map #============================================================================== class Scene_Map alias dmo_al_pre_transfer pre_transfer def pre_transfer dmo_al_pre_transfer @spriteset.dmo_clear_parallax_cache end end #============================================================================== # â– Game_CharacterBase #============================================================================== class Game_CharacterBase alias dmo_al_screen_z screen_z def screen_z(value = nil) return dmo_al_screen_z if !value && !@dmo_screen_z @dmo_screen_z || (value && @dmo_screen_z = value) return @dmo_screen_z end end #============================================================================== # â– Game_Interpreter #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # â— dmo_change_z # changes the z-value of an event # (value) : the new z-value # (event) : the event_id #-------------------------------------------------------------------------- def dmo_change_z(value = nil,event = @event_id) $game_map.events[event].screen_z(value) end end Yep, you saw it right. IThere are a lots of comments in the beginning: I made the infos and instructions about the script as fool-proof as I could. And there are some infos for other scripters in as well in case of incompatibilities. If you're still having trouble...just ask Demo I finally did it and the parallax map may be far away from a 'good' parallax map but it should be enough to show the script. Click me to download (2.18MB, RAR-format, no rtp) Credits & Terms of use â— Credits: DasMoony â— This script is made for free use in commercial and non-commercial projects but credits are required â— Do not post direct links to the download file, instead link the page that contains it â— You're not allowed without the authors permission to distribute this script. Of course you're allowed to distribute the script within your project. â— If you're allowed to distribute the script you can't require any rights about the script â— If this script is used in commercial projects, I demand a free copy of it. Contact me for the details. For this, look at contact informations or send me a pm on the forum About Support, Redistribution, etc. This is what this thread is for At the moment this script is exclusive shared at rpgmakervxace.net and that's my full intention until I set up a script section on my own homepage. So, if you see it somewhereelse please inform me. Thanks in advance for this. Future Intentions to this Script The scripts runs fine at the time and I'm happy about that. If you find any bugs or encounter any problems, I'd be happy for your hint. Also it's still a way too tricky for my taste to put the player under water, I'm planning on a easy solution for that. If you have any questions you're also welcome. Updates â— Added AnimationPattern â— 8th of January: Fixed of a major bug (well...somehow I missed the row who changes the parallax on map changing >_< Now it works â—25th of February: Fixed another bug (again, sometimes parallax maps stayed on screen after map change) Uploaded Demo. Special thanks and cookies â— I looked at a lot of the existing parallax scripts, so I'm happy that I could learn something out of them. But unfortunately I can't remember all of them, so you have to live with that. â— Also I want to thank for the positive feedback I received by rgangsta,radscythe and heolix. They really keep me motivated. (Who doesn't like a 'very impressive' before going to sleep and waking up with something about the maker's graphics to the next level?) Edited February 25, 2012 by DasMoony 2 Archeia and ultimarox7 reacted to this Share this post Link to post Share on other sites
+ Abscond 149 Posted January 3, 2012 O.o Very impressive. I've never used parallaxed water before but I'll try it with this script. It looks pretty easy to use. Share this post Link to post Share on other sites
Radscythe 72 Posted January 4, 2012 I think it's a perfect way of thinking to bring this maker's graphics to the next level. Having an animated world costs a good amount of MB, but if done right is downright beautiful and good for immersion. And you can't have that without things animated under da sea. Imagine a small pond with fish swimming around. Share this post Link to post Share on other sites
Wishdream 5 Posted January 4, 2012 I support this idea. Definitely bringing this maker a better look and outcome. Share this post Link to post Share on other sites
DasMoony 10 Posted January 4, 2012 Thankies for your positive feedback The script is now finished and ready for the Complete RGSS3-Scetion.It would be great if a mod could move this to the right place Share this post Link to post Share on other sites
Mr. Bubble 116 Posted January 5, 2012 Moved. Please remember that you can report your own topic so you can get these things done faster. Share this post Link to post Share on other sites
DasMoony 10 Posted January 5, 2012 So...fixed a little bug that came in with the last update, now everything should run fine again 1 ultimarox7 reacted to this Share this post Link to post Share on other sites
Nicke 150 Posted January 5, 2012 Cool, gonna try this later! Share this post Link to post Share on other sites
DasMoony 10 Posted January 8, 2012 Aww... I made a terrible mistake. I tried the script with different parallaxes, scene calls and and and but I forgot to test a mapchange...So now I found a major bug (only 1 parallax/parallax map - the one of the map the player starts...). Fortunetely it was easy to fix So if you got the version which was out before today (8th of January, look at the header, there's the date of last edit) you should update your script to the current version where I fixed this. I think next time I had to concentrate a bit more when I release a script (it's such a embarassing fault ) 1 ultimarox7 reacted to this Share this post Link to post Share on other sites
Shadonn 12 Posted January 18, 2012 This script sounds like it opens a lot of possibilities. My only problem is my horrible parrallaxing experience. I'm still trying to grasp the concept itself. Share this post Link to post Share on other sites
Joshua Murph 5 Posted February 22, 2012 Can you make a demo? It's easier for me to learn how to use scripts(even simple ones) with a demo. Share this post Link to post Share on other sites
DasMoony 10 Posted February 25, 2012 (edited) Yeah, I can and I will (already started the new parallaxes, just have to finish them, I'm a bit lazy about this ) When I'm back from training I'll finish it and upload it. *edit* Updated script and uploaded demo, you can find the link in the first post Edited February 25, 2012 by DasMoony 1 ultimarox7 reacted to this Share this post Link to post Share on other sites
Siul 0 Posted February 18, 2013 I know this post is far from old, but I'm starting at RPGVXA and trying to parallax. I'm really interested in your script since it seems to be a good option between MA fix picture to map and MA animated parallax, but i found that the demo isn't up (Error 404 or something else). I don't really know if the demo is down or whatever, but i'd really appreciate if you can upload it again.Sorry about my noobish question and my bad english, definitely, they are not my best neither my strenghts ^^'.Help me if possible please Share this post Link to post Share on other sites
FleshRenderStudios 21 Posted February 20, 2013 I really wanted to use this as well but the screenshot and demo have been moved or deleted! Can OP re-paste new link or someone else if they know where to find it. Thanks =) Share this post Link to post Share on other sites
+ MurgianSwordsman 36 Posted March 11, 2013 Same as everyone else, [insert long-winded complaint about missing demo here]. Be nice if a demo was available. Please upload another soon! Thanks! 1 Fallun reacted to this Share this post Link to post Share on other sites
Galv 1,386 Posted March 11, 2013 Guys, the author of this script has not been here for nearly a year now. You may have better luck asking in the script support section if you have trouble with the script.I'm going to close this topic for now, Dasmoony can PM me if he returns and wants it reopened. Share this post Link to post Share on other sites