Darkness 0 Report post Posted November 4, 2012 Is there any ways to insert the fog theme into the battle scene? Share this post Link to post Share on other sites
albertibay 0 Report post Posted November 5, 2012 you have to edit the scripts but i can't quite explain how Share this post Link to post Share on other sites
Thallion 0 Report post Posted November 9, 2012 (edited) Just in case you actually wanted this, I made a script for it. module Fog_Config # the id of the switch that determines whether or not to display the fog in the battle scene ENABLED_SWITCH_ID = 51 end class Spriteset_Battle alias tdks_battle_fog_init initialize def initialize tdks_battle_fog_init @fog = Plane.new(@viewport1) @fog.bitmap = $scene.fog @fog.ox, @fog.oy, @fog.zoom_x, @fog.zoom_y, @fog.opacity, @fog.blend_type, @fog.tone, @fog.color, @fog_sx, @fog_sy = *$scene.fog_settings @fog.z = 1000 @fog.visible = $game_switches[Fog_Config::ENABLED_SWITCH_ID] end alias tdks_battle_fog_update update def update tdks_battle_fog_update @fog.ox -= @fog_sx / 8.0 if @fog @fog.oy -= @fog_sy / 8.0 if @fog end end class Spriteset_Map attr_reader :fog end class Scene_Battle attr_reader :fog, :fog_settings alias tdks_battle_fog_init initialize def initialize(*args) tdks_battle_fog_init(*args) tmp = $scene.spriteset.fog @fog = tmp.bitmap.clone @fog_settings = [tmp.ox, tmp.oy, tmp.zoom_x, tmp.zoom_y, tmp.opacity, tmp.blend_type, tmp.tone.clone, tmp.color.clone, $game_map.fog_sx, $game_map.fog_sy] end end class Scene_Map attr_reader :spriteset end Edited November 11, 2012 by Thallion Share this post Link to post Share on other sites
Darkness 0 Report post Posted November 9, 2012 Thank you very much for that script,Thallion. Is it ok for you if I want to requests some more? I want your script can be call with events. So,I can use it and cancel it anytime. And if you can let me choose the fog scene by my own (in script). It would be better. Share this post Link to post Share on other sites
Thallion 0 Report post Posted November 9, 2012 (edited) Alright, I'll make a variable to use to enable or disable the fog in the battle scene. I'll fix it once I get home from school. Edit: I added in a config option to choose which switch to determine whether to use fogs on the battle scene. Script updated. Edited November 10, 2012 by Thallion Share this post Link to post Share on other sites
Darkness 0 Report post Posted November 10, 2012 Thanks again! But,I don't understand how to enable it. I'm just a rookie for RPG Maker. Share this post Link to post Share on other sites
Thallion 0 Report post Posted November 10, 2012 In RMXP, there are special types of variables called switches. These can be either on or off. I am basically letting you use a switch to control whether the script is enabled. First, go in the script where it says: ENABLED_SCRIPT_ID = 51 Change 51 to the id of whatever switch you want to use to control whether the script is enabled. Now, to enable / disable the script from an event, put in a Control Switches action. Change the switch # to what you changed 51 to. If you turn the switch on, the script will be enabled, else it will be disabled. Share this post Link to post Share on other sites
Darkness 0 Report post Posted November 11, 2012 Thank you again! I can use it now. Well, Mind if I may asked you one thing? Can you let me change the fog's color in the script freely? I want more than one color in my game. The battle in white fog. The battle in Poison Fog. etc. I want the color to change freely. It's okay if you can't make it. Share this post Link to post Share on other sites
Thallion 0 Report post Posted November 11, 2012 Sorry, I forgot to have it use the fog's color tone from the map. I updated the script with the fixed version. Share this post Link to post Share on other sites