设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 5161|回复: 8

[已经解决] 请问窗户的灯光效果怎么做出来?

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1112
在线时间
141 小时
注册时间
2006-2-12
帖子
219
发表于 2016-8-23 19:36:36 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x

求这种窗户的灯光效果如何做出来?

Lv2.观梦者

梦石
0
星屑
311
在线时间
204 小时
注册时间
2007-2-4
帖子
1817
发表于 2016-8-23 19:53:13 | 显示全部楼层
本帖最后由 玄天 于 2016-8-23 19:54 编辑

1)按照原比例获得地图的截图。如果地图不大直接print screen键,如果太大可用Orange - Mapshot这个插件(放在帖子最后)。这个插件的用途是测试游戏的时候直接对整张地图截图。

2)将获得的截图放到你惯常使用的图像编辑软件(比如PS),在截图上面做出半透明的光效,去掉截图,按照等大输出带透明通道PNG的图片。

3)使用『Kaus Ultimate Overlay』这个插件的遮罩功能,具体看插件内部的说明。
实际上还有许多遮罩插件,懂英文的可以搜搜看,效果大同小异。

————————————
Orange - Mapshot

JAVASCRIPT 代码复制
  1. /*=============================================================================
  2.  * Orange - Mapshot
  3.  * By Hudell - [url]www.hudell.com[/url]
  4.  * OrangeMapshot.js
  5.  * Version: 1.7
  6.  * Free for commercial and non commercial use.
  7.  *=============================================================================*/
  8. /*:
  9.  * @plugindesc This plugin will save a picture of the entire map on a Mapshots folder when you press a key. <OrangeMapshot>
  10.  * @author Hudell
  11.  *
  12.  * @param useMapName
  13.  * @desc if true, the filename will be the name of the map. If false it will be the number.
  14.  * @default true
  15.  *
  16.  * @param layerType
  17.  * @desc 0 = all, 1 = upper and lower, 2 = separate everything
  18.  * @default 0
  19.  *
  20.  * @param drawAutoShadows
  21.  * @desc set this to false to disable autoshadows on the map shot
  22.  * @default true
  23.  *
  24.  * @param drawEvents
  25.  * @desc set this to false to stop drawing the events on the full bitmap
  26.  * @default true
  27.  *
  28.  * @param keyCode
  29.  * @desc code of the key that will be used (44 = printscreen). [url]http://link.hudell.com/js-keys[/url]
  30.  * @default 44
  31.  *
  32.  * @param imageType
  33.  * @desc What type of image should be generated. Can be png, jpeg or webp
  34.  * @default png
  35.  *
  36.  * @param imageQuality
  37.  * @desc If the imageType is jpeg or webp, you can set this to a number between 0 and 100 indicating the quality of the image
  38.  * @default 70
  39.  *
  40.  * @param imagePath
  41.  * @desc The path where the images will be saved
  42.  * @default ./Mapshots
  43.  *
  44.  * @help
  45.  * Check keycodes at  [url]http://link.hudell.com/js-keys[/url]
  46.  */
  47. var Imported = Imported || {};
  48.  
  49. var OrangeMapshot = OrangeMapshot || {};
  50.  
  51. (function($) {
  52.   "use strict";
  53.  
  54.   var parameters = $plugins.filter(function(plugin) {
  55.     return plugin.description.indexOf('<OrangeMapshot>') >= 0;
  56.   });
  57.   if (parameters.length === 0) {
  58.     throw new Error("Couldn't find OrangeMapshot parameters.");
  59.   }
  60.   $.Parameters = parameters[0].parameters;
  61.  
  62.   $.Param = {};
  63.   $.Param.useMapName = $.Parameters.useMapName !== "false";
  64.   $.Param.drawAutoShadows = $.Parameters.drawAutoShadows !== "false";
  65.   $.Param.drawEvents = $.Parameters.drawEvents !== "false";
  66.   $.Param.layerType = Number($.Parameters.layerType || 0);
  67.   $.Param.imageType = $.Parameters.imageType || 'png';
  68.   $.Param.imagePath = $.Parameters.imagePath || './Mapshots';
  69.   $.Param.imageQuality = Number($.Parameters.imageQuality || 70);
  70.  
  71.   $.Param.keyCode = Number($.Parameters.keyCode || 44);
  72.  
  73.   $.imageType = function() {
  74.     if ($.Param.imageType == 'webp') return 'image/webp';
  75.     if ($.Param.imageType == 'jpeg' || $.Param.imageType == 'jpg') return 'image/jpeg';
  76.     return 'image/png';
  77.   };
  78.  
  79.   $.imageRegex = function() {
  80.     if ($.Param.imageType == 'webp') return (/^data:image\/webp;base64,/);
  81.     if ($.Param.imageType == 'jpeg' || $.Param.imageType == 'jpg') return (/^data:image\/jpeg;base64,/);
  82.  
  83.     return (/^data:image\/png;base64,/);
  84.   };
  85.  
  86.   $.fileExtension = function() {
  87.     if ($.Param.imageType == 'webp') return '.webp';
  88.     if ($.Param.imageType == 'jpeg' || $.Param.imageType == 'jpg') return '.jpg';
  89.     return '.png';
  90.   };
  91.  
  92.   $.imageQuality = function() {
  93.     if ($.fileExtension() == '.jpg' || $.fileExtension() == '.webp') {
  94.       return Math.min($.Param.imageQuality, 100) / 100;
  95.     }
  96.  
  97.     return 1;
  98.   };
  99.  
  100.   $.baseFileName = function() {
  101.     var mapName = ($gameMap._mapId).padZero(3);
  102.     if ($.Param.useMapName) {
  103.       mapName = $dataMapInfos[$gameMap._mapId].name;
  104.     } else {
  105.       mapName = 'Map' + mapName;
  106.     }
  107.  
  108.     return mapName;
  109.   };
  110.  
  111.   $.getMapshot = function() {
  112.     var lowerBitmap;
  113.     var upperBitmap;
  114.  
  115.     switch($.Param.layerType) {
  116.       case 1 :
  117.         lowerBitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  118.         upperBitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  119.         SceneManager._scene._spriteset._tilemap._paintEverything(lowerBitmap, upperBitmap);
  120.  
  121.         return [lowerBitmap, upperBitmap];
  122.       case 2 :
  123.         var groundBitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  124.         var ground2Bitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  125.         var lowerBitmapLayer = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  126.         var upperBitmapLayer = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  127.         var shadowBitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  128.         var lowerEvents = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  129.         var normalEvents = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  130.         var upperEvents = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  131.  
  132.         SceneManager._scene._spriteset._tilemap._paintLayered(groundBitmap, ground2Bitmap, lowerBitmapLayer, upperBitmapLayer, shadowBitmap, lowerEvents, normalEvents, upperEvents);
  133.         return [groundBitmap, ground2Bitmap, lowerBitmapLayer, upperBitmapLayer, shadowBitmap, lowerEvents, normalEvents, upperEvents];
  134.       default :
  135.         lowerBitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  136.         upperBitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  137.         SceneManager._scene._spriteset._tilemap._paintEverything(lowerBitmap, upperBitmap);
  138.  
  139.         var bitmap = new Bitmap($dataMap.width * $gameMap.tileWidth(), $dataMap.height * $gameMap.tileHeight());
  140.         bitmap.blt(lowerBitmap, 0, 0, lowerBitmap.width, lowerBitmap.height, 0, 0, lowerBitmap.width, lowerBitmap.height);
  141.         bitmap.blt(upperBitmap, 0, 0, upperBitmap.width, upperBitmap.height, 0, 0, upperBitmap.width, upperBitmap.height);
  142.         return [bitmap];
  143.     }
  144.   };
  145.  
  146.   function MapShotTileMap() {
  147.   }
  148.  
  149.   MapShotTileMap.prototype = Object.create(Tilemap.prototype);
  150.   MapShotTileMap.prototype.constructor = MapShotTileMap;
  151.  
  152.   MapShotTileMap.prototype._drawAutotile = function(bitmap, tileId, dx, dy) {
  153.     var autotileTable = Tilemap.FLOOR_AUTOTILE_TABLE;
  154.     var kind = Tilemap.getAutotileKind(tileId);
  155.     var shape = Tilemap.getAutotileShape(tileId);
  156.     var tx = kind % 8;
  157.     var ty = Math.floor(kind / 8);
  158.     var bx = 0;
  159.     var by = 0;
  160.     var setNumber = 0;
  161.     var isTable = false;
  162.  
  163.     if (Tilemap.isTileA1(tileId)) {
  164.       var waterSurfaceIndex = [0, 1, 2, 1][this.animationFrame % 4];
  165.       setNumber = 0;
  166.       if (kind === 0) {
  167.         bx = waterSurfaceIndex * 2;
  168.         by = 0;
  169.       } else if (kind === 1) {
  170.         bx = waterSurfaceIndex * 2;
  171.         by = 3;
  172.       } else if (kind === 2) {
  173.         bx = 6;
  174.         by = 0;
  175.       } else if (kind === 3) {
  176.         bx = 6;
  177.         by = 3;
  178.       } else {
  179.         bx = Math.floor(tx / 4) * 8;
  180.         by = ty * 6 + Math.floor(tx / 2) % 2 * 3;
  181.         if (kind % 2 === 0) {
  182.           bx += waterSurfaceIndex * 2;
  183.         }
  184.         else {
  185.           bx += 6;
  186.           autotileTable = Tilemap.WATERFALL_AUTOTILE_TABLE;
  187.           by += this.animationFrame % 3;
  188.         }
  189.       }
  190.     } else if (Tilemap.isTileA2(tileId)) {
  191.       setNumber = 1;
  192.       bx = tx * 2;
  193.       by = (ty - 2) * 3;
  194.       isTable = this._isTableTile(tileId);
  195.     } else if (Tilemap.isTileA3(tileId)) {
  196.       setNumber = 2;
  197.       bx = tx * 2;
  198.       by = (ty - 6) * 2;
  199.       autotileTable = Tilemap.WALL_AUTOTILE_TABLE;
  200.     } else if (Tilemap.isTileA4(tileId)) {
  201.       setNumber = 3;
  202.       bx = tx * 2;
  203.       by = Math.floor((ty - 10) * 2.5 + (ty % 2 === 1 ? 0.5 : 0));
  204.       if (ty % 2 === 1) {
  205.         autotileTable = Tilemap.WALL_AUTOTILE_TABLE;
  206.       }
  207.     }
  208.  
  209.     var table = autotileTable[shape];
  210.     var source = this.bitmaps[setNumber];
  211.  
  212.     if (table && source) {
  213.       var w1 = this._tileWidth / 2;
  214.       var h1 = this._tileHeight / 2;
  215.       for (var i = 0; i < 4; i++) {
  216.         var qsx = table[i][0];
  217.         var qsy = table[i][1];
  218.         var sx1 = (bx * 2 + qsx) * w1;
  219.         var sy1 = (by * 2 + qsy) * h1;
  220.         var dx1 = dx + (i % 2) * w1;
  221.         var dy1 = dy + Math.floor(i / 2) * h1;
  222.         if (isTable && (qsy === 1 || qsy === 5)) {
  223.           var qsx2 = qsx;
  224.           var qsy2 = 3;
  225.           if (qsy === 1) {
  226.             qsx2 = [0,3,2,1][qsx];
  227.           }
  228.           var sx2 = (bx * 2 + qsx2) * w1;
  229.           var sy2 = (by * 2 + qsy2) * h1;
  230.           bitmap.blt(source, sx2, sy2, w1, h1, dx1, dy1, w1, h1);
  231.           dy1 += h1/2;
  232.           bitmap.blt(source, sx1, sy1, w1, h1 / 2, dx1, dy1, w1, h1 / 2);
  233.         } else {
  234.           bitmap.blt(source, sx1, sy1, w1, h1, dx1, dy1, w1, h1);
  235.         }
  236.       }
  237.     }
  238.   };
  239.  
  240.   MapShotTileMap.prototype._drawNormalTile = function(bitmap, tileId, dx, dy) {
  241.     var setNumber = 0;
  242.  
  243.     if (Tilemap.isTileA5(tileId)) {
  244.       setNumber = 4;
  245.     } else {
  246.       setNumber = 5 + Math.floor(tileId / 256);
  247.     }
  248.  
  249.     var w = this._tileWidth;
  250.     var h = this._tileHeight;
  251.     var sx = (Math.floor(tileId / 128) % 2 * 8 + tileId % 8) * w;
  252.     var sy = (Math.floor(tileId % 256 / 8) % 16) * h;
  253.  
  254.     var source = this.bitmaps[setNumber];
  255.     if (source) {
  256.       bitmap.blt(source, sx, sy, w, h, dx, dy, w, h);
  257.     }
  258.   };
  259.  
  260.   MapShotTileMap.prototype._drawTableEdge = function(bitmap, tileId, dx, dy) {
  261.     if (Tilemap.isTileA2(tileId)) {
  262.       var autotileTable = Tilemap.FLOOR_AUTOTILE_TABLE;
  263.       var kind = Tilemap.getAutotileKind(tileId);
  264.       var shape = Tilemap.getAutotileShape(tileId);
  265.       var tx = kind % 8;
  266.       var ty = Math.floor(kind / 8);
  267.       var setNumber = 1;
  268.       var bx = tx * 2;
  269.       var by = (ty - 2) * 3;
  270.       var table = autotileTable[shape];
  271.  
  272.       if (table) {
  273.         var source = this.bitmaps[setNumber];
  274.         var w1 = this._tileWidth / 2;
  275.         var h1 = this._tileHeight / 2;
  276.         for (var i = 0; i < 2; i++) {
  277.           var qsx = table[2 + i][0];
  278.           var qsy = table[2 + i][1];
  279.           var sx1 = (bx * 2 + qsx) * w1;
  280.           var sy1 = (by * 2 + qsy) * h1 + h1/2;
  281.           var dx1 = dx + (i % 2) * w1;
  282.           var dy1 = dy + Math.floor(i / 2) * h1;
  283.           bitmap.blt(source, sx1, sy1, w1, h1/2, dx1, dy1, w1, h1/2);
  284.         }
  285.       }
  286.     }
  287.   };
  288.  
  289.   Tilemap.prototype._drawTileOldStyle = function(bitmap, tileId, dx, dy) {
  290.     if (Tilemap.isVisibleTile(tileId)) {
  291.       if (Tilemap.isAutotile(tileId)) {
  292.         MapShotTileMap.prototype._drawAutotile.call(this, bitmap, tileId, dx, dy);
  293.       } else {
  294.         MapShotTileMap.prototype._drawNormalTile.call(this, bitmap, tileId, dx, dy);
  295.       }
  296.     }
  297.   };  
  298.  
  299.   Tilemap.prototype._paintEverything = function(lowerBitmap, upperBitmap) {
  300.     var tileCols = $dataMap.width;
  301.     var tileRows = $dataMap.height;
  302.  
  303.     for (var y = 0; y < tileRows; y++) {
  304.       for (var x = 0; x < tileCols; x++) {
  305.         this._paintTilesOnBitmap(lowerBitmap, upperBitmap, x, y);
  306.       }
  307.     }
  308.  
  309.     if ($.Param.drawEvents !== false) {
  310.       this._paintCharacters(lowerBitmap, 0);
  311.       this._paintCharacters(lowerBitmap, 1);
  312.       this._paintCharacters(upperBitmap, 2);   
  313.     }
  314.   };
  315.  
  316.   Tilemap.prototype._paintLayered = function(groundBitmap, ground2Bitmap, lowerBitmap, upperLayer, shadowBitmap, lowerEvents, normalEvents, upperEvents) {
  317.     var tileCols = $dataMap.width;
  318.     var tileRows = $dataMap.height;
  319.  
  320.     for (var y = 0; y < tileRows; y++) {
  321.       for (var x = 0; x < tileCols; x++) {
  322.         this._paintTileOnLayers(groundBitmap, ground2Bitmap, lowerBitmap, upperLayer, shadowBitmap, x, y);
  323.       }
  324.     }
  325.  
  326.     this._paintCharacters(lowerEvents, 0);
  327.     this._paintCharacters(normalEvents, 1);
  328.     this._paintCharacters(upperEvents, 2);        
  329.   };
  330.  
  331.   Tilemap.prototype._paintCharacters = function(bitmap, priority) {
  332.     this.children.forEach(function(child) {
  333.       if (child instanceof Sprite_Character) {
  334.         if (child._character !== null) {
  335.           if (child._character instanceof Game_Player || child._character instanceof Game_Follower || child._character instanceof Game_Vehicle) return;
  336.         }
  337.  
  338.         child.update();
  339.  
  340.         if (child._characterName === '' && child._tileId === 0) return;
  341.         if (priority !== undefined && child._character._priorityType !== priority) return;
  342.  
  343.         var x = child.x - child._frame.width / 2 + $gameMap._displayX * $gameMap.tileWidth();
  344.         var y = child.y - child._frame.height + $gameMap._displayY * $gameMap.tileHeight();
  345.  
  346.         bitmap.blt(child.bitmap, child._frame.x, child._frame.y, child._frame.width, child._frame.height, x, y, child._frame.width, child._frame.height);
  347.       }
  348.     });
  349.   };
  350.  
  351.   Tilemap.prototype._paintTileOnLayers = function(groundBitmap, ground2Bitmap, lowerBitmap, upperBitmap, shadowBitmap, x, y) {
  352.     var tableEdgeVirtualId = 10000;
  353.     var mx = x;
  354.     var my = y;
  355.     var dx = (mx * this._tileWidth);
  356.     var dy = (my * this._tileHeight);
  357.     var lx = dx / this._tileWidth;
  358.     var ly = dy / this._tileHeight;
  359.     var tileId0 = this._readMapData(mx, my, 0);
  360.     var tileId1 = this._readMapData(mx, my, 1);
  361.     var tileId2 = this._readMapData(mx, my, 2);
  362.     var tileId3 = this._readMapData(mx, my, 3);
  363.     var shadowBits = this._readMapData(mx, my, 4);
  364.     var upperTileId1 = this._readMapData(mx, my - 1, 1);
  365.  
  366.     if (groundBitmap !== undefined) {
  367.       groundBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  368.     }
  369.  
  370.     if (ground2Bitmap !== undefined) {
  371.       ground2Bitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  372.     }
  373.  
  374.     if (lowerBitmap !== undefined) {
  375.       lowerBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  376.     }
  377.  
  378.     if (upperBitmap !== undefined) {
  379.       upperBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  380.     }
  381.  
  382.     if (shadowBitmap !== undefined) {
  383.       shadowBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  384.     }
  385.  
  386.     var me = this;
  387.  
  388.     function drawTiles(bitmap, tileId, shadowBits, upperTileId1) {
  389.       if (tileId < 0) {
  390.         if ($.Param.drawAutoShadows && shadowBits !== undefined) {
  391.           MapShotTileMap.prototype._drawShadow.call(me, bitmap, shadowBits, dx, dy);
  392.         }
  393.       } else if (tileId >= tableEdgeVirtualId) {
  394.         MapShotTileMap.prototype._drawTableEdge.call(me, bitmap, upperTileId1, dx, dy);
  395.       } else {
  396.         me._drawTileOldStyle(bitmap, tileId, dx, dy);
  397.       }
  398.     }
  399.  
  400.     if (groundBitmap !== undefined) {
  401.       drawTiles(groundBitmap, tileId0, undefined, upperTileId1);
  402.  
  403.       if (shadowBitmap !== undefined && tileId0 < 0) {
  404.         drawTiles(shadowBitmap, tileId0, shadowBits, upperTileId1);
  405.       }
  406.     }
  407.  
  408.     if (ground2Bitmap !== undefined) {
  409.       drawTiles(ground2Bitmap, tileId1, undefined, upperTileId1);
  410.  
  411.       if (shadowBitmap !== undefined && tileId1 < 0) {
  412.         drawTiles(shadowBitmap, tileId1, shadowBits, upperTileId1);
  413.       }
  414.     }
  415.  
  416.     if (lowerBitmap !== undefined) {
  417.       drawTiles(lowerBitmap, tileId2, undefined, upperTileId1);
  418.  
  419.       if (shadowBitmap !== undefined && tileId2 < 0) {
  420.         drawTiles(shadowBitmap, tileId2, shadowBits, upperTileId1);
  421.       }
  422.     }
  423.  
  424.     if (upperBitmap !== undefined) {
  425.       drawTiles(upperBitmap, tileId3, shadowBits, upperTileId1);
  426.  
  427.       if (shadowBitmap !== undefined && tileId3 < 0) {
  428.         drawTiles(shadowBitmap, tileId3, shadowBits, upperTileId1);
  429.       }
  430.     }
  431.   };
  432.  
  433.   Tilemap.prototype._paintTilesOnBitmap = function(lowerBitmap, upperBitmap, x, y) {
  434.     var tableEdgeVirtualId = 10000;
  435.     var mx = x;
  436.     var my = y;
  437.     var dx = (mx * this._tileWidth);
  438.     var dy = (my * this._tileHeight);
  439.     var lx = dx / this._tileWidth;
  440.     var ly = dy / this._tileHeight;
  441.     var tileId0 = this._readMapData(mx, my, 0);
  442.     var tileId1 = this._readMapData(mx, my, 1);
  443.     var tileId2 = this._readMapData(mx, my, 2);
  444.     var tileId3 = this._readMapData(mx, my, 3);
  445.     var shadowBits = this._readMapData(mx, my, 4);
  446.     var upperTileId1 = this._readMapData(mx, my - 1, 1);
  447.     var lowerTiles = [];
  448.     var upperTiles = [];
  449.  
  450.     if (this._isHigherTile(tileId0)) {
  451.       upperTiles.push(tileId0);
  452.     } else {
  453.       lowerTiles.push(tileId0);
  454.     }
  455.     if (this._isHigherTile(tileId1)) {
  456.       upperTiles.push(tileId1);
  457.     } else {
  458.       lowerTiles.push(tileId1);
  459.     }
  460.  
  461.     lowerTiles.push(-shadowBits);
  462.  
  463.     if (this._isTableTile(upperTileId1) && !this._isTableTile(tileId1)) {
  464.       if (!Tilemap.isShadowingTile(tileId0)) {
  465.         lowerTiles.push(tableEdgeVirtualId + upperTileId1);
  466.       }
  467.     }
  468.  
  469.     if (this._isOverpassPosition(mx, my)) {
  470.       upperTiles.push(tileId2);
  471.       upperTiles.push(tileId3);
  472.     } else {
  473.       if (this._isHigherTile(tileId2)) {
  474.         upperTiles.push(tileId2);
  475.       } else {
  476.         lowerTiles.push(tileId2);
  477.       }
  478.       if (this._isHigherTile(tileId3)) {
  479.         upperTiles.push(tileId3);
  480.       } else {
  481.         lowerTiles.push(tileId3);
  482.       }
  483.     }
  484.  
  485.     lowerBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  486.     upperBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
  487.  
  488.     for (var i = 0; i < lowerTiles.length; i++) {
  489.       var lowerTileId = lowerTiles[i];
  490.       if (lowerTileId < 0) {
  491.         if ($.Param.drawAutoShadows) {
  492.           MapShotTileMap.prototype._drawShadow.call(this, lowerBitmap, shadowBits, dx, dy);
  493.         }
  494.       } else if (lowerTileId >= tableEdgeVirtualId) {
  495.         MapShotTileMap.prototype._drawTableEdge.call(this, lowerBitmap, upperTileId1, dx, dy);
  496.       } else {
  497.         this._drawTileOldStyle(lowerBitmap, lowerTileId, dx, dy);
  498.       }
  499.     }
  500.  
  501.     for (var j = 0; j < upperTiles.length; j++) {
  502.       this._drawTileOldStyle(upperBitmap, upperTiles[j], dx, dy);
  503.     }
  504.   };
  505.  
  506.   $.saveMapshot = function() {
  507.     if (!Utils.isNwjs()) return;
  508.  
  509.     var fs = require('fs');
  510.     var path = $.Param.imagePath;
  511.  
  512.     try {
  513.       fs.mkdir(path, function() {
  514.         try{
  515.           var fileName = path + '/' + $.baseFileName();
  516.           var ext = $.fileExtension();
  517.           var names = [fileName + ext];
  518.           var regex = $.imageRegex();
  519.  
  520.           switch ($.Param.layerType) {
  521.             case 1 :
  522.               names = [
  523.                 fileName + ' Lower' + ext,
  524.                 fileName + ' Upper' + ext
  525.               ];
  526.               break;
  527.             case 2 :
  528.               names = [
  529.                 fileName + ' Ground' + ext,
  530.                 fileName + ' Ground 2' + ext,
  531.                 fileName + ' Lower' + ext,
  532.                 fileName + ' Upper' + ext,
  533.                 fileName + ' Shadows' + ext,
  534.                 fileName + ' Lower Events' + ext,
  535.                 fileName + ' Normal Events' + ext,
  536.                 fileName + ' Upper Events' + ext
  537.               ];
  538.  
  539.               break;
  540.             default :
  541.               names = [fileName + ext];
  542.               break;
  543.           }
  544.  
  545.           var snaps = $.getMapshot();
  546.  
  547.           var callback = function(error) {
  548.             if (error !== undefined && error !== null) {
  549.               console.error('An error occured while saving the mapshot', error);
  550.             }
  551.           };
  552.  
  553.           for (var i = 0; i < names.length; i++) {
  554.             var urlData = snaps[i].canvas.toDataURL($.imageType(), $.imageQuality());
  555.             var base64Data = urlData.replace(regex, "");
  556.  
  557.             fs.writeFile(names[i], base64Data, 'base64', callback);
  558.           }
  559.         } catch (error) {
  560.           if (error !== undefined && error !== null) {
  561.             console.error('An error occured while saving the map shot:', error);
  562.           }
  563.         }
  564.       });
  565.  
  566.       var nodePath = require('path');
  567.       var longPath = nodePath.resolve(path);
  568.  
  569.       if (process.platform == 'win32' && $._openedFolder === undefined) {
  570.         $._openedFolder = true;
  571.  
  572.         setTimeout(function(){
  573.           var exec = require('child_process').exec;
  574.           exec('explorer ' + longPath);
  575.         }, 100);
  576.       } else {
  577.         $gameMessage.add('Mapshot saved to \n' + longPath.replace(/\\/g, '\\\\').match(/.{1,40}/g).join('\n'));
  578.       }
  579.  
  580.     } catch (error) {
  581.       if (error !== undefined && error !== null) {
  582.         console.error('An error occured while saving the mapshot:', error);
  583.       }
  584.     }
  585.   };
  586.  
  587.   $.onKeyUp = function(event) {
  588.     if (event.keyCode == $.Param.keyCode) {
  589.       if (SceneManager._scene instanceof Scene_Map) {
  590.         $.saveMapshot();
  591.       }
  592.     }
  593.   };
  594.  
  595.   document.addEventListener('keyup', $.onKeyUp);
  596. })(OrangeMapshot);
  597.  
  598. Imported.OrangeMapshot = 1.7;



————————————————————————

Kaus Ultimate Overlay

下载原地址:
http://forums.rpgmakerweb.com/in ... xes-snippet-plugin/
新しい誕生祝いだッ!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
帖子
359
发表于 2016-8-25 21:23:10 | 显示全部楼层
我记得MV的编辑器中右击地图列表中的项目,可以直接选择导出为PNG的。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
311
在线时间
204 小时
注册时间
2007-2-4
帖子
1817
发表于 2016-8-25 21:32:05 | 显示全部楼层
sutao80216 发表于 2016-8-25 21:23
我记得MV的编辑器中右击地图列表中的项目,可以直接选择导出为PNG的。

那个输出并不等比例的……
新しい誕生祝いだッ!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
帖子
359
发表于 2016-8-25 21:37:19 | 显示全部楼层
玄天 发表于 2016-8-25 21:32
那个输出并不等比例的……

嘿,我还从没注意过这点。刚看了一下,输出的图像是实际地图大小的25%。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
407 小时
注册时间
2011-4-10
帖子
359
发表于 2016-8-25 21:46:58 | 显示全部楼层
这个“Orange Mapshot”很可能无法在1.3.1以及后续版本中使用了。刚看了下作者的博客,他在7月31号说以后不会再做插件了,然后又在8月11号说有两个插件在升级到1.3以后停止工作,其中就包括“Orange Mapshot”。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
153
在线时间
723 小时
注册时间
2014-4-10
帖子
129
发表于 2016-8-26 10:35:13 | 显示全部楼层
sutao80216 发表于 2016-8-25 21:46
这个“Orange Mapshot”很可能无法在1.3.1以及后续版本中使用了。刚看了下作者的博客,他在7月31号说以后不 ...

可以用 不用惊慌
回复 支持 反对

使用道具 举报

Lv5.捕梦者

梦石
0
星屑
21776
在线时间
8547 小时
注册时间
2011-12-31
帖子
3360
发表于 2016-8-26 11:01:25 | 显示全部楼层
本帖最后由 tseyik 于 2016-8-26 11:49 编辑

就是重合上去,MV和VA/Vx不同,B以後的圖塊預設不是互柤覆蓋,而是重合
例:
教会2.png
教会光.png
0c0b5f2.jpg

点评

大佬能请问下素材的出处吗?  发表于 2019-3-2 10:54
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-3-29 22:43

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表