KenzoMe92

KZM_Core

Dec 22nd, 2016 (edited)
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // ** KZM - Core **
  3. // by KenzoMe92
  4. // Date: 22/12/2016  
  5. // Versione 1.3 (Update 15/01/2019)
  6. // Quest'opera è stata rilasciata con licenza Creative Commons  //
  7. // Attribuzione - Condividi allo stesso modo 3.0 Italia. Per    //
  8. // leggere una copia della licenza visita il sito web           //
  9. // http://creativecommons.org/licenses/by-sa/3.0/it/            //
  10. // o spedisci una lettera a                                     //
  11. // Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. //
  12. //=============================================================================
  13.  
  14.  
  15. /*:
  16.  * @plugindesc Il plugin permette di impostare il titolo del gioco,
  17.  * dimensione, corsivo, colore, allineamento dello stesso, versione del gioco e cura su Level UP  
  18.  * @author KenzoMe92
  19.  *
  20.  *
  21.  *
  22.  * @param TITOLO
  23.  * @text Titolo del gioco:
  24.  * @desc Inserire il Titolo del proprio gioco
  25.  * @default KZM - MV Engine
  26.  *
  27.  *
  28.  * @param Size
  29.  * @text Dimensione titolo:
  30.  * @desc Imposta la dimensione di default del font
  31.  * @type number
  32.  * @min 20
  33.  * default 72
  34.  * @default 48
  35.  *
  36.  * @param Bold
  37.  * @text Titolo in grassetto:
  38.  * @desc Imposta se il testo deve essere in grassetto o meno
  39.  * @type boolean
  40.  * @on YES
  41.  * @off NO
  42.  * YES - true NO - false
  43.  * @default true
  44.  *
  45.  * @param Underline
  46.  * @text Titolo sottolineato:
  47.  * @desc Imposta se il testo deve essere sottolineato o meno
  48.  * @type boolean
  49.  * @on YES
  50.  * @off NO
  51.  * YES - true NO - false
  52.  * @default false
  53.  *
  54.  * @param Italic
  55.  * @text Titolo in corsivo:
  56.  * @desc Imposta se il testo deve essere in corsivo o meno
  57.  * @type boolean
  58.  * @on YES
  59.  * @off NO
  60.  * YES - true NO - false
  61.  * @default false
  62.  *
  63.  * @param Posizione X
  64.  * @desc Imposta la posizione X nello schermo
  65.  * @type number
  66.  * @min 0
  67.  * default 20
  68.  * @default 20
  69.  *
  70.  * @param Posizione Y
  71.  * @desc Imposta la posizione Y nello schermo
  72.  * @type number
  73.  * @min 0
  74.  * default 32
  75.  * @default 32
  76.  *
  77.  * @param Colore Bordo
  78.  * @desc Imposta il colore del bordo
  79.  * default black
  80.  * @default black
  81.  *
  82.  * @param Colore Testo
  83.  * @desc Imposta il colore del testo
  84.  * default white
  85.  * @default white
  86.  *
  87.  * @param Allineamento
  88.  * @desc Imposta l'allineamento del testo
  89.  * @type combo
  90.  * @option Left
  91.  * @option Center
  92.  * @option Right
  93.  * Left - left Center - center Right - right
  94.  * @default center
  95.  *
  96.  * @param Versione
  97.  * @desc Imposta la versione del gioco
  98.  * esempio 1.0.0.0 (Main Release.Minor Release.Build.Bugfix)
  99.  * @default 1.0.0.0
  100.  *
  101.  * @param Cura totale su LV UP
  102.  * @text Cura HP, MP e Status sul Level UP
  103.  * @type boolean
  104.  * @on ON
  105.  * @off OFF
  106.  * default ON
  107.  * @desc ON = HP/MP/Status   OFF = HP/MP
  108.  * @default true
  109.  *
  110.  * @param xversione
  111.  * @text Impostare la X della versione:
  112.  * @type number
  113.  * @min 0
  114.  * @desc Posizione X
  115.  * default 0
  116.  *
  117.  * @param yversione
  118.  * @text Impostare la y della versione:
  119.  * @type number
  120.  * @min 0
  121.  * @desc Posizione y
  122.  * default 600
  123.  *
  124.  * @help
  125.  * ------------------------------
  126.  * KZM - MV Engine Core
  127.  * ------------------------------
  128.  * Versione 1.3 (Update 15/01/2019)
  129.  * ------------------------------
  130.  * Corretti alcuni bug
  131.  * ------------------------------
  132.  * Data: 22/12/2016
  133.  * ------------------------------
  134.  * Istruzioni d'uso
  135.  * ------------------------------
  136.  *  Plug and Play,impostare i parametri e il codice farà tutto
  137.  */
  138.    
  139. (function() {
  140.   var parameters = PluginManager.parameters('KZM_Core');
  141.   var dfont = String(parameters['Size'] || '48');
  142.   var ifont = String(parameters['Italic'] || 'false');
  143.   var xfont = String(parameters['Posizione X'] || '20');
  144.   var yfont = String(parameters['Posizione Y'] || '32');
  145.   var ofont = String(parameters['Colore Bordo'] || 'black')
  146.   var cfont = String(parameters['Colore Testo'] || 'white')
  147.   var afont = String(parameters['Allineamento'] || 'center')
  148.   var ttext = String(parameters['TITOLO'] || 'KZM - MV Engine')
  149.   var vgame = String(parameters['Versione'] || '1.0.0.0')
  150.   var cure = String(parameters['Cura totale su LV UP'] || 'true')
  151.   var xver = String(parameters['xversione']|| '0')
  152.   var yver = String(parameters['yversione'] || '600')
  153.  
  154.   var _Scene_Title_xxx = Scene_Title.prototype.drawGameTitle;
  155.   var _Scene_Title_fff = Scene_Title.prototype.createForeground;
  156.   var _Game_Actor_lu = Game_Actor.prototype.levelUp;
  157.  
  158.   Game_Actor.prototype.levelUp = function() {
  159.     _Game_Actor_lu.call(this);
  160.     if (cure == 'true'){
  161.     this.recoverAll();
  162.     }
  163.     else if (cure == 'false'){
  164.     this._hp = this.mhp;
  165.     this._mp = this.mmp;
  166.     }
  167.  
  168.   }
  169.  
  170.   Scene_Title.prototype.drawGameTitle = function() {
  171.   // _Scene_Title_xxx.call(this);
  172.   //sometimes you have to call your function to get this to work.  In this case you don't Ill explain why later.
  173.     var x = xfont;
  174.     var y = yfont;
  175.     var maxWidth = Graphics.width - x * 2;
  176.     var text = ttext;
  177.     this._gameTitleSprite.bitmap.fontItalic = ifont;
  178.     this._gameTitleSprite.bitmap.textColor = cfont;
  179.     this._gameTitleSprite.bitmap.outlineColor = ofont;
  180.     this._gameTitleSprite.bitmap.outlineWidth = 8;
  181.     this._gameTitleSprite.bitmap.fontSize = dfont;
  182.     this._gameTitleSprite.bitmap.drawText(text, x, y, maxWidth, 48, afont);
  183.   }
  184.    
  185.   Scene_Title.prototype.createForeground = function() {
  186.    
  187.     _Scene_Title_fff.call(this);
  188.     this._gameVersionSprite = new Sprite(new Bitmap(Graphics.width, Graphics.height));
  189.     this.addChild(this._gameVersionSprite);
  190.     this.drawGameVersion();
  191.    
  192.     }
  193.    
  194.   Scene_Title.prototype.drawGameVersion = function() {
  195.    
  196.     var x = xver;
  197.     var y = yver;
  198.     var maxWidth = Graphics.width - x * 2;
  199.     var text = vgame;
  200.     this._gameVersionSprite.bitmap.textColor = cfont;
  201.     this._gameVersionSprite.bitmap.outlineColor = ofont;
  202.     this._gameVersionSprite.bitmap.outlineWidth = 3;
  203.     this._gameVersionSprite.bitmap.fontSize = 20;
  204.     this._gameVersionSprite.bitmap.drawText('Versione: ' + text, x, y, maxWidth, 20, 'left')
  205.   }
  206. })();  // dont touch this.
  207. //=============================================================//
  208. // *** *** *** *** *** *** *** EOF *** *** *** *** *** *** *** //
  209. //=============================================================//
Add Comment
Please, Sign In to add comment