设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 88|回复: 0

[转载发布] Eli_RevealDarkCovers(Mrts extension)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8037

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    30081
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    39012

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    Spoiler:  For moderators and author
    Hi!
    I have sent an email for MRTS a long time ago, but I never get an answer. Although I think it's okay to release an extension of his plugin, because of his terms of use.
    Here is the email:




    Here are his terms of use.


    Author: Eliaquim
    *Not supported anymore*


    Requirements
    You need to use the Dark Room Covers plugin from MR. Trivel above this plugin.

    Download it here.

    Introduction

    Inspired by the Fatal Labirinty game I tried in so many ways to make a system where the player walks and reveals the map as it moves. Using images to make this progression, depending on the size of the map can get very lag. Using events too, plus a lot of work.
    It was then that I found the Mr. trivel plugin (Mrts) that makes the tiles that have regions become dark. Through a plugin command, the tiles of a specific region can be revealed. However, doing this by events can become tiresome and repetitive.
    Finally, I had an idea that made this process viable and easy!
    So this plugin came up!

    Features

    This plugin offers the following:

    • Enable or disable tile disclosure.
    • Two ways to reveal the map: Progressive and Unique
    • A variable that determines the range of the view, in tiles, to reveal the dark regions.


    How to use

    SpoilerTo use it, you need to understand how the Mrts plugin works.
    By default, once activated in your project, it will make all regions placed on the map darken the tiles where they are and will be in a layer above the player.
    You can use plugin commands to make regions revealed. As well as to make them dark again. It is important to know that the plugin works on all maps. That is if you reveal a region on map 1, it will also be revealed on map 2 (unless that you execute the command to darken them before reaching map 2).

    Now we can talk about this plugin!

    • There are two modes:

    • Unique - Reveals only the region the player is in and deletes all others.
    It means that only one region will be revealed at a time.

    • Progressive - Reveal regions as the player moves, and keep them revealed.
    More details below about Progressive mode.

    It is possible to store a value in a variable that is responsible for the range of the player's vision. The greater this reach, the more regions will be revealed around you.
    If the reach is 1, all regions that are within the distance of a tile will be revealed. Now we must remember the MRTS plugin: If a region is revealed, it will be for the entire current and later map. So if that same region is elsewhere on the map, even if away from the player, it will have been revealed. The way to avoid this is to put the regions on the map progressively and not spread regions of the same number across places different from the map.
    The numerical order of the regions is not important.
    If the value of the range variable is equal to zero, only the region that the player is stepping on will be revealed.

    • Plugin commands

    You can use the commands to enable or disable the above modes:

    ENABLE_REVEAL
    DISABLE_REVEAL




    Terms of Use

    1. It is mandatory to give the credits to Mr. Trivel (Mrts) in the credits section of your game. Credit for me is optional (Eliaquim or Rakuen Zero).
    2. It can be used in free and commercial games.
    3. Do not sell or say that you made this plugin.
    4. Do not redistribute this plugin. Instead, give this link to the download.

    Spoiler: Eli_RevealDarkCovers.js
                    JavaScript:       
    1. //============================================================================
    2. // Eli_RevealDarkCovers.js
    3. //============================================================================
    4. /*:
    5. @plugindesc v1.0 - Dynamically reveals regions.
    6. @author Eliaquim || Hakuen Studio
    7. @help
    8. ==============================================================================
    9. Requirements
    10. ==============================================================================
    11. You need to use the Dark Room Covers plugin from MR. Trivel above this plugin.
    12. Link: https://forums.rpgmakerweb.com/index.php?threads/dark-room-covers.57057/
    13. ==============================================================================
    14. Introduction
    15. ==============================================================================
    16. Inspired by the Fatal Labirinty game I tried in so many ways to make a
    17. system where the player walks and reveals the map as it moves. Using images
    18. to make this progression, depending on the size of the map can get very lag.
    19. Using events too, plus a lot of work.
    20. It was then that I found the Mr. trivel plugin (Mrts) that makes the tiles
    21. that have regions become dark. Through a plugin command, the tiles of a
    22. specific region can be revealed.
    23. However, doing this by events can become tiresome and repetitive.
    24. Finally I had an idea that made this process viable and easy!
    25. So this plugin came up!
    26. ==============================================================================
    27. Features
    28. ==============================================================================
    29. This plugin offers the following:
    30. • Enable or disable tile disclosure.
    31. • Two ways to reveal the map: Progressive and Unique
    32. • A variable that determines the range of the view in tiles, to reveal the
    33. dark regions.
    34. ==============================================================================
    35. How to use
    36. ==============================================================================
    37. To use it, you need to understand how the Mrts plugin works.
    38. By default, once activated in your project, it will make all
    39. regions placed on the map darken the tiles where they are and will be in
    40. a layer above the player.
    41. You can use plugin commands to make regions
    42. revealed. As well as to make them dark again.
    43. It is important to know that the plugin works on all maps. That is if you
    44. reveal a region on map 1, it will also be revealed on map 2 (unless
    45. that you execute the command to darken them before reaching map 2).
    46. Now we can talk about this plugin!
    47. • There are two modes:
    48. • Unique - Reveals only the region the player is in and deletes all others.
    49. It means that only one region will be revealed at a time.
    50. • Progressive - Reveal regions as the player moves, and keep them
    51. revealed.
    52. More details below about Progressive mode.
    53. It is possible to store a value in a variable that is responsible for
    54. the range of the player's vision. The greater this reach, the more regions
    55. will be revealed around you.
    56. If the reach is 1, all regions that are within the distance of a tile will
    57. be revealed. Now we must remember the MRTS plugin: If a region is
    58. revealed, it will be for the entire current and later map. So if that same
    59. region is elsewhere on the map, even if away from the player, it will have
    60. been revealed. The way to avoid this is to put the regions on the map
    61. progressively and not spread regions of the same number across places
    62. different from the map.
    63. The numerical order of the regions is not important.
    64. If the value of the range variable is equal to zero, only the region
    65. that the player is stepping on will be revealed.
    66. • Plugin commands
    67. You can use the commands to enable or disable the above modes:
    68. ENABLE_REVEAL
    69. DISABLE_REVEAL
    70. ==============================================================================
    71. Terms of Use
    72. ==============================================================================
    73. 1. It is mandatory to give the credits to Mr. Trivel (Mrts) in the
    74. credits section of your game. Credit for me is optional (Eliaquim or Rakuen
    75. Zero).
    76. 2. Can be used in free and commercial games.
    77. 3. Do not sell or say that you made this plugin.
    78. 4. Do not redistribute this plugin. Instead, give this link to the download:
    79. ==============================================================================
    80. Special thanks
    81. ==============================================================================
    82. Thanks to:
    83. Mr. Trivel (Mrts).
    84. ==============================================================================
    85. Contact
    86. ==============================================================================
    87. RM Web - https://forums.rpgmakerweb.com/index.php?members/eliaquim.123037/
    88. Centro Rpg Maker - https://centrorpg.com/index.php?action=profile
    89. Instagram - https://www.instagram.com/hakuenstudio
    90. Twitter - https://twitter.com/hakuen_studio
    91. Facebook - https://www.facebook.com/hakuenstudio
    92. ==============================================================================
    93. Updatelog
    94. ==============================================================================
    95. Version 1.0 04/19/2020
    96. - Plugin release!
    97. @param enable
    98. @text Enable plugin
    99. @type boolean
    100. @desc Enable or disable the plugin.
    101. @default true
    102. @param mode
    103. @text Select mode
    104. @type select
    105. @option Only on Player
    106. @value Only on player
    107. @option Progressively
    108. @value Progressively
    109. @default Only on player
    110. @param range
    111. @text Line of sight
    112. @type variable
    113. @desc Choose a variable to set the range value.
    114. @default 0
    115. */
    116. /*:pt
    117. @plugindesc v1.0 - Revela regiões dinâmicamente.
    118. @author Eliaquim || Rakuen Zero
    119. @help
    120. ==============================================================================
    121. Requerimentos
    122. ==============================================================================
    123. É necessário usar o plugin Dark Room Covers da Mr. Trivel.
    124. Coloque esse plugin abaixo do Mrts.
    125. Link: https://forums.rpgmakerweb.com/index.php?threads/dark-room-covers.57057/
    126. ==============================================================================
    127. Introdução
    128. ==============================================================================
    129. Inspirado no jogo Fatal Labirinty eu tentei de muitas formas fazer um
    130. sistema onde o player anda e revela o mapa conforme avança.
    131. Usar imagens para fazer essa progressão, dependendo do tamanho do mapa, pode
    132. ficar muito lag. Usar eventos também, além de muito trabalhoso.
    133. Foi então que encontrei o plugin de Mr. trivel (Mrts) que faz os tiles que
    134. tem regiões ficarem escuros. Através de um comando de plugin, os tiles de
    135. uma região específica podem ser revelados. Entretanto, fazer isso por eventos
    136. pode se tornar cansativo e repetitivo.
    137. Finalmente tive uma ideia que tornasse esse processo viável e fácil!
    138. Assim surgiu esse plugin!
    139. ==============================================================================
    140. Funcionalidades
    141. ==============================================================================
    142. Esse plugin oferece o seguinte:
    143. • Ativar ou desativar a revelação dos tiles.
    144. • Dois modos de revelar o mapa: Progressivo e Único
    145. • Uma variável que determina o alcance da visão em tiles, para revelar as
    146. regiões escuras.
    147. ==============================================================================
    148. Como usar
    149. ==============================================================================
    150. Para usá-lo é necessário entender como o plugin do Mrts funciona.
    151. Por padrão, assim que ativado em seu projeto, ele fará com que todas as
    152. regiões colocadas no mapa escureçam os tiles onde se encontram e ficarão em
    153. uma camada acima do jogador.
    154. Você pode usar comandos de plugin para fazer com que as regiões sejam
    155. reveladas. Como também para torná-las escuras de novo.
    156. É importante saber que o plugin funciona em todos os mapas. Ou seja, se você
    157. revelar uma região no mapa 1, ela também estará revelada no mapa 2(a não ser
    158. que você execute o comando de escurecê-las antes de chegar ao mapa 2).
    159. A partir disso podemos falar desse plugin!
    160. • Existem dois modos:
    161. • Único - Revela somente a região que o player está, e apaga todas as outras.
    162. Quer dizer que somente uma região ficará revelada por vez.
    163. • Progressivo - Revela as regiões conforme o jogador se move, e as mantém
    164. reveladas.
    165. Mais detalhes abaixo sobre o modo Progressivo.
    166. É possível armazenar um valor em uma variável a qual é responsável pelo
    167. alcance da visão do jogador. Quanto maior esse alcance, mais regiões serão
    168. reveladas ao seu redor.
    169. Se o alcance for 1, todas as regiões que estão na distância de um tile serão
    170. reveladas. Agora devemos lembrar do plugin do MRTS: Se uma região é revelada,
    171. ela será para todo o mapa atual e posterior. Portanto se essa mesma região
    172. está em outro lugar do mapa, mesmo que longe do player, ela terá sido
    173. revelada. A maneira de evitar isso é você colocar as regiões no mapa
    174. progressivamente e não espalhar regiões do mesmo número por lugares
    175. diferentes do mapa.
    176. A ordem numérica das regiões não é importante.
    177. Se o valor da variável do alcance for igual a zero, somente a região que o
    178. player estiver pisando será revelada.
    179. • Comandos de plugin
    180. Você pode usar os comandos para ativar ou desativar os modos acima:
    181. ENABLE_REVEAL
    182. DISABLE_REVEAL
    183. ==============================================================================
    184. Termos de uso
    185. ==============================================================================
    186. 1. É obrigatório dar os créditos para Mr. Trivel (Mrts) na seção
    187. de créditos do seu jogo. O crédito para mim é opcional (Eliaquim ou Rakuen
    188. Zero).
    189. 2. Pode ser usado em jogos gratuitos e comerciais.
    190. 3. Não venda e nem diga que foi você que fez esse plugin.
    191. 4. Não redistribua esse plugin. Ao invés disso, dê este link para o download:
    192. ==============================================================================
    193. Agradecimentos especiais
    194. ==============================================================================
    195. Agradecimentos a:
    196. Mr. Trivel (Mrts).
    197. ==============================================================================
    198. Contato
    199. ==============================================================================
    200. RM Web - https://forums.rpgmakerweb.com/index.php?members/eliaquim.123037/
    201. Centro Rpg Maker - https://centrorpg.com/index.php?action=profile
    202. Instagram - https://www.instagram.com/hakuenstudio
    203. Twitter - https://twitter.com/hakuen_studio
    204. Facebook - https://www.facebook.com/hakuenstudio
    205. ==============================================================================
    206. Log de atualizações
    207. ==============================================================================
    208. Versão 1.0 19/04/2020
    209. - Plugin lançado!
    210. @param enable
    211. @text Ativa o plugin
    212. @type boolean
    213. @desc Ativa ou desativa o plugin.
    214. @default true
    215. @param mode
    216. @text Seleção de modo
    217. @type select
    218. @option Único
    219. @value Only player
    220. @option Progressivamente
    221. @value Progressively
    222. @default Only player
    223. @param range
    224. @text Campo de visão
    225. @type variable
    226. @desc Escolha uma variável para determinar o campo de visão em tiles.
    227. @default 0
    228. */
    229. "use strict";
    230. var Imported = Imported || {};
    231. Imported.Eli_RevealDarkCovers = true;
    232. var Eli = Eli || {};
    233. Eli.RevealDarkCovers = Eli.RevealDarkCovers || {};
    234. Eli.RevealDarkCovers.checkMrts = function(){
    235.     for(let l = $plugins.length - 1;l--;){
    236.         console.log($plugins[l].name)
    237.         if($plugins[l].name === "MrTS_DarkRoomCovers" && $plugins[l].status){
    238.             return true;
    239.         }
    240.     }
    241. };
    242. Eli.RevealDarkCovers.needMrts = function() {
    243.         window.alert(`MrTS_DarkRoomCovers.js was not found.
    244. Please download the mrts plugin`);
    245.         if(confirm) {
    246.             window.open('https://forums.rpgmakerweb.com/index.php?threads/dark-room-covers.57057/');
    247.         }
    248. };
    249. if(!Eli.RevealDarkCovers.checkMrts()) {
    250.     Eli.RevealDarkCovers.needMrts();
    251. };
    252. Eli.RevealDarkCovers.Parameters = PluginManager.parameters('Eli_RevealDarkCovers');
    253. Eli.RevealDarkCovers.Param = Eli.RevealDarkCovers.Param || {};
    254.     Eli.RevealDarkCovers.Param = {
    255.         enable: JSON.parse(Eli.RevealDarkCovers.Parameters['enable']),
    256.         mode: String(Eli.RevealDarkCovers.Parameters['mode']),
    257.         range: Number(Eli.RevealDarkCovers.Parameters['range']),
    258.     };
    259. Eli.RevealDarkCovers.reveal = function(mode) {
    260.     if(!Eli.RevealDarkCovers.Param.enable) return;
    261.     if(mode === "Only on player"){
    262.         const playerRegion = $gamePlayer.regionId();
    263.         $gameMap._openRegionIds = [playerRegion];   
    264.     } else if(mode === "Progressively"){
    265.         const vision = $gamePlayer.regionId();
    266.         const range = $gameVariables.value(Eli.RevealDarkCovers.Param.range);
    267.             for(let i = 0; i < range; i++) {
    268.                 $gameMap.addToCurrentlyOpenRegions(vision + i);
    269.             }
    270.         }
    271. };
    272. Eli.RevealDarkCovers.Game_Player_executeMove = Game_Player.prototype.executeMove;
    273. Game_Player.prototype.executeMove = function(direction) {
    274.     Eli.RevealDarkCovers.Game_Player_executeMove.call(this, direction);
    275.     Eli.RevealDarkCovers.reveal(Eli.RevealDarkCovers.Param.mode);
    276. };
    277. Eli.RevealDarkCovers.Scene_Map_start = Scene_Map.prototype.start;
    278. Scene_Map.prototype.start = function() {
    279.     Eli.RevealDarkCovers.Scene_Map_start.call(this);
    280.     Eli.RevealDarkCovers.reveal();
    281. };
    282. Eli.RevealDarkCovers.Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
    283. Game_Interpreter.prototype.pluginCommand = function (command, args) {
    284. Eli.RevealDarkCovers.Game_Interpreter_pluginCommand.call(this, command, args);
    285. let cmd = command.toUpperCase();
    286.     if (cmd === "ENABLE_REVEAL") {
    287.         Eli.RevealDarkCovers.Param.enable = true;
    288.         $gameMap._openRegionIds = [$gamePlayer.regionId()]
    289.     } else if(cmd === "DISABLE_REVEAL"){
    290.         Eli.RevealDarkCovers.Param.enable = false;
    291.     }
    292. };
    复制代码




    Update Log
    Version 1.0 - 04/19/2020
    - Released!


    本贴来自国际rpgmaker官方论坛作者:Eliaquim处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/eli_revealdarkcovers-mrts-extension.120390/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 10:42 , Processed in 0.080041 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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