Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:ja
- //==============================================================================
- // ■ 絵文字エンジンMV - 通信 "高度なマッサージバスト"
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- @plugindesc ビジュアルノベルタイプのメッセージシステムを許可します。
- id: EEMV::AdvanceMessageSystem JAPANESE
- @author 霞上鳰
- @Dデータ : 2015/10/05
- @バージョン : 1.0.0 {ベータ}
- @必要 : EmojiBase
- //==============================================================================
- //==============================================================================
- // ■ 歴史
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // * 2015/10/29 - Begin and finish the plugin.
- //==============================================================================
- //==============================================================================
- // ■ 導入
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // * メッセージシステムのための複数のグラフィック強化を持つことが許可します。
- //==============================================================================
- //==============================================================================
- // ■ プラグインのパラメータ
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // このセクションでは、プラグインのパラメータを処理します。あなたは余分なプラグインのコマンドを追加する場合を除き、
- // 編集しないでください。
- //------------------------------------------------------------------------------
- * @param 許可バスト
- * @desc あなたのメッセージバストバストの使用を有効にして、それをプリロードします。
- * @default true
- * @param バストフォルダ
- * @desc バストのためのフォルダを設定します。
- * @default pictures
- * @param バスト位置
- * @desc バストの位置を設定します。「X-axis,Y-axis」
- * @default 150,200
- * @param バスト優先
- * @desc バストのZ位置を設定します。単語「below」または「above」を使用してください。.
- * @default below
- * @param 許可パノラマ
- * @desc バックグラウンドの使用を有効にして、それをプリロードします。
- * @default true
- * @param パノラマフォルダ
- * @desc 背景ファイルのフォルダを設定します。
- * @default pictures
- //==============================================================================
- //==============================================================================
- // ■ Help File
- // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // このセクションでは、入力のためにエンジン内のヘルプファイルを提供しています。編集しないでください。
- //------------------------------------------------------------------------------
- * @help
- * ==========================================================================
- * ■ Plugin Command
- * ==========================================================================
- * Emoji.setPanorama filename : パノラマファイル名を設定します。
- * Emoji.erasePanorama : 現在のパノラマを消去します。
- *
- * Emoji.mirror true,false : バストをミラーします。
- * --------------------------------------------------------------------------
- *
- * ==========================================================================
- * ■ Control Character
- * ==========================================================================
- * 一瞬のために何もありません。
- *---------------------------------------------------------------------------
- */
- //==============================================================================
- // ■ Emoji_Engine
- //------------------------------------------------------------------------------
- // the class who handle all the base of my plugins. Can be access via $emoji.
- //==============================================================================
- // anonymous function
- (function(){
- //----------------------------------------------------------------------------
- // ○ alias function: get_pluginname
- //----------------------------------------------------------------------------
- var NP01 = Emoji_Engine.prototype.get_pluginname;
- Emoji_Engine.prototype.get_pluginname = function() {
- NP01.call(this);
- this.message_params = this.set_PluginID('EEMV::AdvanceMessageSystem JAPANESE');
- };
- //----------------------------------------------------------------------------
- // ● alias function: get_params
- //----------------------------------------------------------------------------
- var NPN01 = Emoji_Engine.prototype.get_params;
- Emoji_Engine.prototype.get_params = function() {
- NPN01.call(this);
- // Get Bust Parameters.
- this.enableBust = this.setBoolean(this.message_params,'許可バスト');
- this.bustFolder = this.setString(this.message_params,'バストフォルダ');
- this.bustPos = this.setArray(this.message_params,'バスト位置');
- this.bustPriority = this.setString(this.message_params,'バスト優先');
- // Get Panorama Parameters.
- this.enablePanorama = this.setBoolean(this.message_params,'許可パノラマ');
- this.panoramaFolder = this.setString(this.message_params,'パノラマフォルダ');
- };
- //===============================================================================
- // => END : Emoji_Engine
- //===============================================================================
- //==============================================================================
- // ■ Game_Message
- //------------------------------------------------------------------------------
- // The game object class for the state of the message window that displays text
- // or selections, etc.
- //==============================================================================
- //----------------------------------------------------------------------------
- // ● alias function: clear
- //----------------------------------------------------------------------------
- var nio_message_clear = Game_Message.prototype.clear;
- Game_Message.prototype.clear = function() {
- nio_message_clear.call(this);
- this._bustName = "";
- this._bust_index = "";
- // this._panoramaName = ""; {obsolete}
- this._panorama_hue = 0;
- this._mirror = false;
- this._flag = false;
- };
- //----------------------------------------------------------------------------
- // ○ new function: bustName
- //----------------------------------------------------------------------------
- Game_Message.prototype.bustName = function() {
- return this._bustName;
- };
- //----------------------------------------------------------------------------
- // ○ new function: bustIndex
- //----------------------------------------------------------------------------
- Game_Message.prototype.bustIndex = function() {
- return this._bust_index;
- };
- //----------------------------------------------------------------------------
- // ○ new function: setBust
- //----------------------------------------------------------------------------
- Game_Message.prototype.setBust = function(filename,index) {
- this._bustName = filename;
- this._bust_index = index;
- };
- //----------------------------------------------------------------------------
- // ○ new function: panoramaName
- //----------------------------------------------------------------------------
- Game_Message.prototype.panoramaName = function() {
- return this._panoramaName;
- };
- //----------------------------------------------------------------------------
- // ○ new function: setPanorama
- //----------------------------------------------------------------------------
- Game_Message.prototype.setPanorama = function(p_filename,hue) {
- this._panoramaName = p_filename;
- this._panorama_hue = hue;
- };
- //----------------------------------------------------------------------------
- // ○ new function: ismirror
- //----------------------------------------------------------------------------
- Game_Message.prototype.isMirror = function() {
- return this._mirror;
- };
- //----------------------------------------------------------------------------
- // ○ new function: setMirror
- //----------------------------------------------------------------------------
- Game_Message.prototype.setMirror = function(flag) {
- this._mirror = flag;
- };
- //----------------------------------------------------------------------------
- // ○ new function: erasePanorama {obsolete}
- //----------------------------------------------------------------------------
- Game_Message.prototype.erasePanorama = function(flag) {
- this._flag = flag;
- };
- //----------------------------------------------------------------------------
- // ○ new function: callVoice
- //----------------------------------------------------------------------------
- Game_Message.prototype.callVoice = function(file,volume,pitch,pan) {
- AudioManager.playSe(file,volume,pitch,pan);
- };
- //===============================================================================
- // => END : Game_Message
- //===============================================================================
- //==============================================================================
- // ■ Window_Message
- //------------------------------------------------------------------------------
- // The window for displaying text messages.
- //==============================================================================
- //----------------------------------------------------------------------------
- // ● alias function: initialize
- //----------------------------------------------------------------------------
- var NMW01 = Window_Message.prototype.initialize;
- Window_Message.prototype.initialize = function() {
- NMW01.call(this);
- this.createPanorama();
- this.createBust();
- };
- //----------------------------------------------------------------------------
- // ● overwrite function: updateLoading
- //----------------------------------------------------------------------------
- Window_Message.prototype.updateLoading = function() {
- if (this._faceBitmap) {
- if (ImageManager.isReady()) {
- // if enableBust is not enable draw default face and panorama
- if(!$emoji.enableBust) {
- this.drawMessageFace();
- this.drawMessagePanorama();
- this._faceBitmap = null;
- this.panorama_graphics = null;
- return false;
- }else{
- // else draw bust and panorma and ignoring face
- if($gameMessage.isMirror()){
- this.spritebust.mirror(true,false);
- this.spritebust.x = 600;
- }else
- {this.spritebust.mirror(false,false);}
- if($gameMessage.erasePanorama()){
- this.panorama.visible = false;
- }else{
- this.panorama.visible = true;
- }
- this.drawMessagePanorama();
- this.drawMessageBust();
- this.bust_graphics = null;
- this.panorama_graphics = null;
- return false;
- }
- } else {
- return true;
- }
- } else {
- return false;
- }
- };
- //----------------------------------------------------------------------------
- // ● overwrite function: newPage
- //----------------------------------------------------------------------------
- Window_Message.prototype.newPage = function(textState) {
- this.contents.clear();
- this.resetFontSettings();
- this.clearFlags();
- this.loadMessageFace();
- textState.x = this.newLineX();
- textState.y = 0;
- textState.left = this.newLineX();
- textState.height = this.calcTextHeight(textState, false);
- this.load_Panorama();
- this.load_messagebust();
- };
- //----------------------------------------------------------------------------
- // ○ new function: load_messagebust
- //----------------------------------------------------------------------------
- Window_Message.prototype.load_messagebust = function() {
- if($gameMessage.ismirror != true){this.spritebust.x = $emoji.bustPos[0];}
- if ($gameMessage.bustName() != "") {
- this.bust_graphics = ImageManager.loadBust($gameMessage.bustName() + '_' + $gameMessage.bustIndex());
- }
- };
- //----------------------------------------------------------------------------
- // ○ new function: load_Panorama
- //----------------------------------------------------------------------------
- Window_Message.prototype.load_Panorama = function() {
- if($gameMessage.panoramaName() != ""){
- this.panorama_graphics = ImageManager.loadPanorama($gameMessage.panoramaName());
- }else{
- this.panorama_graphics = ImageManager.loadPanorama("");
- }
- };
- //----------------------------------------------------------------------------
- // ○ new function: create_panorama
- //----------------------------------------------------------------------------
- Window_Message.prototype.createPanorama = function() {
- if($emoji.enablePanorama){
- this.panorama = new Sprite();
- this.panorama.x = Graphics.width / 2;
- this.panorama.y = (Graphics.height / 2) - 15;
- this.panorama.setOrigin(0.5,1);
- this.addChildAt(this.panorama, 0);
- this.panorama.visible = false;
- }
- };
- //----------------------------------------------------------------------------
- // ○ new function: drawMessagePanorama
- //----------------------------------------------------------------------------
- Window_Message.prototype.drawMessagePanorama = function() {
- if($gameMessage.panoramaName() === ""){
- if($gameMessage.erasePanorama){
- this.panorama.bitmap = ImageManager.loadPanorama($gameMessage.panoramaName(),0);
- this.panorama.visible = false;
- }
- } else {
- this.panorama.visible = true;
- this.panorama.bitmap = ImageManager.loadPanorama($gameMessage.panoramaName(),0);
- }
- };
- //----------------------------------------------------------------------------
- // ○ new function: createBust
- //----------------------------------------------------------------------------
- Window_Message.prototype.createBust = function() {
- if($emoji.enableBust){
- this.spritebust = new Sprite();
- this.spritebust.setOrigin(0.5,1);
- this.spritebust.x = $emoji.bustPos[0];
- this.spritebust.y = $emoji.bustPos[1];
- this.spritebust.visible = false;
- // set the z axis of the sprite.
- switch($emoji.bustPriority.toLowerCase()){
- case 'below' :
- this.addChildAt(this.spritebust,1);
- break;
- case 'above' :
- this.addChildAt(this.spritebust,3);
- break;
- }
- }
- };
- //----------------------------------------------------------------------------
- // ○ new function: drawMessageBust
- //----------------------------------------------------------------------------
- Window_Message.prototype.drawMessageBust = function() {
- if ($gameMessage.bustName() != ""){
- this.spritebust.bitmap = ImageManager.loadBust($gameMessage.bustName() + '_' + $gameMessage.bustIndex());
- this.spritebust.visible = true;
- }else {
- this.spritebust.bitmap = ImageManager.loadBust("");
- this.spritebust.visible = false;
- }
- };
- //----------------------------------------------------------------------------
- // ● overwrite function: newLineX
- //----------------------------------------------------------------------------
- Window_Message.prototype.newLineX = function() {
- if($emoji.enableBust){
- if($emoji.bustPriority === 'above'){
- return $gameMessage.bustName() === '' ? 0 : 168;
- } else{
- return 0
- }
- }else{
- return $gameMessage.faceName() === '' ? 0 : 168;
- }
- };
- //===============================================================================
- // => END : Window_Message
- //===============================================================================
- //==============================================================================
- // ■ ImageManager
- //------------------------------------------------------------------------------
- // The static class that loads images, creates bitmap objects and retains them.
- //==============================================================================
- //----------------------------------------------------------------------------
- // ○ new function: loadBust
- //----------------------------------------------------------------------------
- ImageManager.loadBust = function(filename) {
- var pathofile = $emoji.bustFolder;
- return this.loadBitmap('img/'+ pathofile + '/', filename, 0, true);
- };
- //----------------------------------------------------------------------------
- // ○ new function: loadPanorama
- //----------------------------------------------------------------------------
- ImageManager.loadPanorama = function(filename,hue) {
- var pathofile = $emoji.panoramaFolder;
- return this.loadBitmap('img/'+ pathofile + '/', filename,hue,true);
- };
- //===============================================================================
- // => END : ImageManager
- //===============================================================================
- //==============================================================================
- // ■ Game_Interpreter
- //------------------------------------------------------------------------------
- // The interpreter for running event commands.
- //==============================================================================
- //----------------------------------------------------------------------------
- // ○ new function: inputPanorama
- //----------------------------------------------------------------------------
- Game_Interpreter.prototype.inputPanorama = function(filename,hue) {
- $gameMessage.setPanorama(filename,hue);
- };
- //----------------------------------------------------------------------------
- // ○ new function: restartPanorama
- //----------------------------------------------------------------------------
- Game_Interpreter.prototype.restartPanorama = function() {
- $gameMessage.setPanorama('',0);
- };
- //----------------------------------------------------------------------------
- // ○ new function: mirrorBust
- //----------------------------------------------------------------------------
- Game_Interpreter.prototype.mirrorBust = function(flag) {
- $gameMessage.setMirror(flag);
- };
- //----------------------------------------------------------------------------
- // ○ new function: setMirror
- //----------------------------------------------------------------------------
- var NPC01 = Game_Interpreter.prototype.pluginCommand;
- Game_Interpreter.prototype.pluginCommand = function(command, args) {
- NPC01.call(this,command,args);
- if(command === 'Emoji.setPanorama' && !$gameParty.inBattle()){
- this.inputPanorama(args,0);
- }
- if(command === 'Emoji.erasePanorama'){
- this.restartPanorama();
- }
- if(command === 'Emoji.mirror'){
- this.mirrorBust(args)
- }
- };
- //----------------------------------------------------------------------------
- // ● overwrite function: command101
- //----------------------------------------------------------------------------
- Game_Interpreter.prototype.command101 = function() {
- if (!$gameMessage.isBusy()) {
- $gameMessage.setFaceImage(this._params[0], this._params[1]);
- $gameMessage.setBackground(this._params[2]);
- $gameMessage.setPositionType(this._params[3]);
- $gameMessage.setBust(this._params[0],this._params[1]);
- while (this.nextEventCode() === 401) { // Text data
- this._index++;
- $gameMessage.add(this.currentCommand().parameters[0]);
- }
- switch (this.nextEventCode()) {
- case 102: // Show Choices
- this._index++;
- this.setupChoices(this.currentCommand().parameters);
- break;
- case 103: // Input Number
- this._index++;
- this.setupNumInput(this.currentCommand().parameters);
- break;
- case 104: // Select Item
- this._index++;
- this.setupItemChoice(this.currentCommand().parameters);
- break;
- }
- this._index++;
- this.setWaitMode('message');
- }
- return false;
- };
- })();
- //===============================================================================
- // => END : Game_Interpreter
- //===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement