RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
RMV - Battle Weather

0 Members and 1 Guest are viewing this topic.

*
Scripter
Rep:
Level 40
Crownless King
Battle Weather
Version: 1.0
Author: Soulpour777
Date: 11 / 19 / 2015


Description


If you are using a weather in the map, you’d be surprised that the weather does not extend when you go into battle. This plugin allows you to retain your weather from the map into the battle. You can change it turned on or off via a script call.

Features

  • Battle Weather

Screenshots



Instructions

For the script call commands, locate them in the HELP of the plugin.

Script


Code: [Select]
// --------------------------------------
// Battle Weather.js
// --------------------------------------
/*:
* @plugindesc Creates a weather during battle.
* @author: Soulpour777
* @help
If you want to deactivate using battle weather, use
this script call:
this.activate_battle_weather(false);
when you want to activate it again:
this.activate_battle_weather(true);
*/
(function() {
var _soul_alias_game_system_initialize = Game_System.prototype.initialize;
var _soul_alias_spriteset_battle_createLowerLayer = Spriteset_Battle.prototype.createLowerLayer;
var _soul_alias_spriteset_battle_update = Spriteset_Battle.prototype.update;
Game_System.prototype._battleWeather;
Game_System.prototype.initialize = function() {
this._battleWeather = true;
_soul_alias_game_system_initialize.call(this);
}

Spriteset_Battle.prototype.createLowerLayer = function() {
    _soul_alias_spriteset_battle_createLowerLayer.call(this);
    if($gameSystem._battleWeather)this.createWeather();
};

Spriteset_Battle.prototype.createWeather = function() {
this._weather = new Weather();
this.addChild(this._weather);
}

Spriteset_Battle.prototype.update = function() {
    _soul_alias_spriteset_battle_update.call(this);
    if($gameSystem._battleWeather)this.updateBattleWeather();
};

Spriteset_Battle.prototype.updateBattleWeather = function() {
    this._weather.type = $gameScreen.weatherType();
    this._weather.power = $gameScreen.weatherPower();
    this._weather.origin.x = $gameMap.displayX() * $gameMap.tileWidth();
    this._weather.origin.y = $gameMap.displayY() * $gameMap.tileHeight();
}
Game_Interpreter.prototype.activate_battle_weather = function(x) {
if (x == Number || x === NaN || x === undefined) {
$gameSystem._battleWeather = true;
} else {
$gameSystem._battleWeather = x;
}
}
})();

Credit


  • Soulpour777


Demo


https://soulxregalia.wordpress.com/2015/11/18/rmv-battle-weather/


Terms of Use


https://soulxregalia.wordpress.com/terms-of-use/


If you like my work, please do support me on Patreon.
https://www.patreon.com/Soulpour777?ty=h