❤❣ღ rpg maker mv收集 ❤❣ღ
㊕rpg maker mv新功能☪

〄数据库道具上限提升 ✿自动三层级地图
☪高分辨率游戏画面 触屏控制✿
____________________________________________
多设备支持:
输出Windows exe文件、Mac App文件、安卓Apk和iOS ipa✿
Mac、android、windows☪

即使你不用懂编程☪、不用会代码,依然能制作属于自己游戏✿
————————————————
转载于插件の素材の等资源,免费下载☪
✉开发: KADOKAWA ✿ Yoji Ojima
✉发行: Degica
 

[网上存档]云管理-简单的基于云的存档系统


purzelkater

 

简介
云管理器是一个简单的云(服务器)通过加载和保存系统的RPG制作MV。随着云经理可以存储存档,从你的服务器负载。无论你在哪里玩游戏。你可以开始在您的Windows桌面,辞职后继续在浏览器没有手动复制存档。

你可以找到完整的描述和对插件代码的安装指南。

脚本

云来自3个文件:

  • db_create.php:一个简单的脚本来初始化数据库
  • cloudmanager.php:服务器脚本
  • cloudmanager.js的RPG Maker插件:

 


cloudmanager.js

//###############################################################################// Name:        CloudManager// Description: A simple cloud based game load and save system for RPG Maker MV// Version:     0.9.1 (Typo fix)// Author:      Frank A. Grenzel// License:     CC BY 3.0//###############################################################################//// ### Longer description ###// This file is part of the Cloud Manager, a simple cloud (server) based load and// save system for RPG Maker MV. With the Cloud Manager you can store your save-// games on and load it from your server. It doesn't matter where you play the// game. You can start it on your Windows desktop, quit it and later continue it// on a browser anywhere - without copy savegames manually.// This file is a plugin for RPG Maker MV and part of the Cloud Manager.// For simplification the Cloud Manager is using SQLite database for storage // instead of MySQL. SQLite needs no special database server setup and uses just// a simple file (you can easily saved for backup).//// ### How to install ###// To use the Cloud Manager on your game you need a server, with some requirements:// * >=PHP 5.6 (maybe other versions would work but not tested)// * SQLite3 database driver// * PHP PDO support for SQLite (pdo_sqlite)//// The Cloud Manager comes with 3 files:// * db_create.php    - a simple script to initialize the database// * cloudmanager.php - the server script// * CloudManager.js  - the RPG Maker plugin//// 1. Copy db_create.php and cloudmanager.php on your server.// 2. Once run db_create.php. This should create the database (rmmv.sqlite) on//    your server with 3 tables in it.// 3. Copy CloudManager.js to your js/plugin folder and add the plugin on the//    PluginManager. Then setup the plugin properties.//    IMPORTANT: As long as the CloudManager plugin is active your games needs a//               semi-permanent connection to your server to run!//               Semi-permanent means on start, continue, new game, save game//               and back to title screen.//    HINT: If you have a server connection as needed but the Cloud Manager won't//          work, check the permissions of your scripts and database file.//// ### How it works ###// If the plugin is activated, your game don't write or read savegames from you// local drive or the browser local storage anymore. Also there are no save/load// slots anymore. Your game will have just one savegame on your server. No more,// no less. But with access to the database you have access to all previous made// savegames (stored on your server). //// Title Screen// On start the plugin checks if a savegame for this game is on the server.// // enough. If you select // server and the game starts with it.// If you select // as you know. If preventRestart is enabled the plugin checks for a savegame on// the server. If there is no savegame you can start a new game. If a savegame was// found but your game version is obsolete you fall back to the title screen (well,// you can't play the game until you have a newer game version). If a savagame was// found and your game version is up-to-date the latest savegame will be loaded from// the server and the game starts with it.//// InGame Command Menu// If you select // hopefully saves it on the database. There are no other options, just save and// gone.// If you select // data will be saved on the server before the title menu is shown. If saveOnEnd// is disabled you will see the title menu without saveing the last state on server.//// Server// On the server side there is just one script to handle all plugin requests. It// reads the game version of the last relevant savegame and compares it with your game// version. It reads the last relevant savegame from the database and sends the json// game data back to the game and it writes the transmitted json game data into the// database (with game name and version, username and timestamp).// ### Plugin Parameters ###// * gameName: This should be unique for all your games, because it makes sure you get//   the saved data of the right game from your server (so you can handle several//   different games on your server).// * gameVersion: The plugin verify the version of a game is up-to-date to handle the//   last game saved on the server.// * url: Right, this is where your php scripts are.// * saveOnEnd: If active your game is saved on every games end on the server. Well,//   of course you can save it at all times but with this option a player can't drop//   the last events and try it again.// * preventRestart: Usually you can start a new game at all times. This would overwrite//   the could saved data and reset the whole game. With this option active you can't//   start a new game if a saved game is on the server.// * sessionManagement: If you want to use the session management set it to 1.// * logLevel: Well, just an option which messages are shown on the console.//// ### Session Management ### (BETA!)// Okay, I have added some simple session management.// player//// How does it work?//// On the server there is a session table. Every time a player wants to continue a// saved or start a new game the game ask the server if there is an active player// already in the game. If so, the games runs in // found, the game runs in // game has an entry on the session table (so you can see, how many players are on the// game this time).// game. So in // in passive mode too).//// To distinguish the game instances the server sends a GUID to the game on first connect.// This GUID is unique for every session (expires if the whole game will be quit).//// Important: An active session will be changed to passive if the player comes back to// the title screen. But if the game is closed without come back to the title screen, // the session is marked as active on the database furthermore and nobody can be active// anymore.//// ### Terms of Use ###// The Cloud Manager is distributed as is under the creative commons license CC BY 3.0// (Attribution 3.0 Unported) for free.// You are free to share, copy, redistribute or edit it for any purpose, even commercially// under the following terms: You must give appropriate credit, provide a link to the// license, and indicate if changes were made. You may do so in any reasonable manner,// but not in any way that suggests the licensor endorses you or your use.// // THE SOFTWARE IS PROVIDED // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR// OTHER DEALINGS IN THE SOFTWARE.//// ### Contact ###// Feel free to contact me. You can find me as Purzelkater on https://forums.rpgmakerweb.com/*: * @plugindesc Save and load games into/from the cloud * @author Purzelkater * @param gameName * @desc The name of the game (should be unique) * @default My Game  * @param gameVersion * @desc The version of the game * @default 1.0  * @param url * @desc URL to server (the php script bust be there) * @default https://www.my-server.com  * @param saveOnEnd * @desc Save game on game quit? * @default 1  * @param preventRestart * @desc Prevent new game if saved game is found * @default 1  * @param sessionManagement * @desc Use session management? (0=all can save, 1=only active player can save) * @default 0   * @param logLevel * @desc 0=Disabled, 1=Errors, 2=Errors/Warnings, 3=All * @default 0 */(function(){// Extract parameters from plugin settings (RPG Maker plugin manager)var _parameters        =PluginManager.parameters('CloudManager');var _gameName          = _parameters['gameName']||;var _gameVersion       = parseFloat(_parameters['gameVersion']||1.0);var _url               = _parameters['url']||;var _saveOnEnd         = parseInt(_parameters['saveOnEnd']||1);var _preventRestart    = parseInt(_parameters['preventRestart']||1);var _sessionManagement = parseInt(_parameters['sessionManagement']||0);var _logLevel          = parseInt(_parameters['logLevel']||0);var _userName          =;// not used so farvar _password          =;// not used so farvar _gameMode          =0;// 0: undefined// 1: game started (on title screen)// 2: passive (can't save)// 3: active (can save)var _guid              =;/*****************************************************  Store default function definitions for future calls******************************************************/var commandNewGame =Scene_Title.prototype.commandNewGame;//--[not used]-- var commandContinue = Scene_Title.prototype.commandContinue;//--[not used]-- var commandSave = Scene_Menu.prototype.commandSave;var commandToTitle =Scene_GameEnd.prototype.commandToTitle;//--[not used]-- var isContinueEnabled = Window_TitleCommand.prototype.isContinueEnabled;var makeCommandList =Window_MenuCommand.prototype.makeCommandList;/******************************  Disable command menu items*****************************/Window_MenuCommand.prototype.makeCommandList =function(){// Check sessionmodeGame();if(_gameMode==3){makeCommandList.call(this, arguments);}else{Debug(2,);this.addOptionsCommand();this.addGameEndCommand();};};/***************************************  Overwrite Scene_Title.prototype.commandNewGame =function(){Debug(3,);// Prevent game reset/restart?if(_preventRestart==1){switch(parseInt(checkGame()[])){case-1:Debug(2,);// Open sessionmodeGame();commandNewGame.call(this, arguments);break;case0:Debug(1,);commandToTitle.call(this, arguments);break;case1:Debug(3,);// Open sessionmodeGame();loadGame();break;default:Debug(1,);};}else{// Open sessionmodeGame();commandNewGame.call(this, arguments);};};/********************************************  Overwrite Scene_Title.prototype.commandContinue =function(){Debug(3,);// Open sessionmodeGame();loadGame();};/*******************************************  Overwrite Scene_Menu.prototype.commandSave =function(){Debug(3,);if(_gameMode==3){saveGame();}else{Debug(2,);};// Close option windowSceneManager.pop();};/***********************************************  Overwrite Scene_GameEnd.prototype.commandToTitle =function(){Debug(3,);// AutoSave on game end?if(_saveOnEnd==1){if(_gameMode==3){saveGame();}else{Debug(2,);};};// Close sessionmodeGame();// Call regular game end functioncommandToTitle.call(this, arguments);};/***********************************************************  Overwrite Window_TitleCommand.prototype.isContinueEnabled =function(){switch(parseInt(checkGame()[])){case-1:Debug(2,);returnfalse;break;case0:Debug(1,);returnfalse;break;case1:Debug(3,);returntrue;break;default:Debug(1,);returnfalse;};};/********************  Sessen management********************/function modeGame(state){if(_sessionManagement==1){// Initialize HTTP Requestvar xhttp =newXMLHttpRequest();var data ="action=state&guid="+encodeURIComponent(_guid)+"&userName="+encodeURIComponent(_userName)+"&password="+encodeURIComponent(_password)+"&gameName="+encodeURIComponent(_gameName)+"&gameVersion="+encodeURIComponent(_gameVersion)+"&gameData="+encodeURIComponent(state);Debug(3,+_url++data);xhttp.open('POST', _url+,false);xhttp.setRequestHeader(,);xhttp.send(data);var result = xhttp.responseText;Debug(3,+result);var json = JSON.parse(result);_gameMode = parseInt(json[]);_guid = json[];}else{switch(state){case:_gameMode =3;break;case:_gameMode =1;break;case:_gameMode =3;break;default:_gameMode =0;};};};/**********************************  Check save game stats on server**********************************/function checkGame(){// Initialize HTTP Requestvar xhttp =newXMLHttpRequest();var data ="action=check&userName="+encodeURIComponent(_userName)+"&password="+encodeURIComponent(_password)+"&gameName="+encodeURIComponent(_gameName)+"&gameVersion="+encodeURIComponent(_gameVersion);// Get savegame dataDebug(3,+_url++data);xhttp.open('POST', _url+,false);xhttp.setRequestHeader(,);xhttp.send(data);var result = xhttp.responseText;Debug(3,+result);return JSON.parse(result);};/***************************  Send game data to server***************************/function saveGame(){$gameSystem.onBeforeSave();// Generate savegame datavar json =JsonEx.stringify(DataManager.makeSaveContents());if(json.length >=200000){Debug(2,'Save data too big');};// Initialize HTTP Requestvar xhttp =newXMLHttpRequest();var data ="action=save&userName="+encodeURIComponent(_userName)+"&password="+encodeURIComponent(_password)+"&gameName="+encodeURIComponent(_gameName)+"&gameVersion="+encodeURIComponent(_gameVersion)+"&gameData="+encodeURIComponent(json);// Send savegame dataDebug(3,+_url++data);xhttp.open('POST', _url+,false);xhttp.setRequestHeader(,);xhttp.send(data);var result = xhttp.responseText;Debug(3,result);};/*****************************  Load game data from server*****************************/function loadGame(){// Initialize HTTP Requestvar xhttp =newXMLHttpRequest();var data ="action=load&userName="+encodeURIComponent(_userName)+"&password="+encodeURIComponent(_password)+"&gameName="+encodeURIComponent(_gameName)+"&gameVersion="+encodeURIComponent(_gameVersion);// Get savegame dataDebug(3,+_url++data);xhttp.open('POST', _url+,false);xhttp.setRequestHeader(,);xhttp.send(data);var result = xhttp.responseText;Debug(3,+result);// Extract data from savegameDataManager.createGameObjects();DataManager.extractSaveContents(JsonEx.parse(result));// Move player$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);$gamePlayer.requestMapReload();// Initialize mapSceneManager.goto(Scene_Map);$gameSystem.onAfterLoad();returntrue;};/*****************  Console output*****************/functionDebug(level, text){if(_logLevel>=level){switch(level){case1:console.error(+text);break;case2:console.warn(+text);break;case3:console.log(+text);break;};};}})();

db_create.php

<?php//###############################################################################// Name:        CloudManager// Description: A simple cloud based game load and save system for RPG Maker MV// Version:     0.9.0 (First release)// Author:      Frank A. Grenzel// License:     CC BY 3.0//###############################################################################//// ### Terms of Use ###// The Cloud Manager is distributed as is under the creative commons license CC BY 3.0// (Attribution 3.0 Unported) for free.// You are free to share, copy, redistribute or edit it for any purpose, even commercially// under the following terms: You must give appropriate credit, provide a link to the// license, and indicate if changes were made. You may do so in any reasonable manner,// but not in any way that suggests the licensor endorses you or your use.// // THE SOFTWARE IS PROVIDED // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR// OTHER DEALINGS IN THE SOFTWARE.if(!isset($_POST[]))die();if(!isset($_POST[]))die();if(!isset($_POST[]))die();try{$action      = $_POST[];$gameName    = $_POST[];$gameVersion = $_POST[];$gameData    = $_POST[];$userName    = $_POST[];$password    = $_POST[];$guid        = $_POST[];$time        = time();$array       = array();$result      =;$db =new PDO('sqlite:rmmv.sqlite');$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);switch($action){case:$sql =" data-dst=">" style="box-sizing: border-box;">->exec($sql);$result = $rows.;break;case:$sql ="SELECT * FROM savegames WHERE gameName='".$gameName." data-dst=">" style="box-sizing: border-box;">->query($sql);$rows = $select->fetchAll();if(count($rows)>0){if(floatval($gameVersion)<floatval($rows[0]['gameVersion'])){$array['Version']=0;}else{$array['Version']=1;};}else{$array['Version']=-1;};$result = json_encode($array);break;case:// if empty guid (new startetd game), generate a new uid for this sessionif(empty($guid)){if(function_exists('com_create_guid')===true){$guid = com_create_guid();}else{$guid = uniqid();};};// login or logout?switch($gameData){case:// Check if the game has an active session$sql ="SELECT * FROM sessiondata WHERE gameName='".$gameName."' and action='active'";$select = $db->query($sql);$rows = $select->fetchAll();if(count($rows)>0){// Active session found - write session log for new passive game$sql =.$gameVersion..$time.;$rows = $db->exec($sql);if($rows>0){// Write new entry for passive game on sessiondata$sql =.$gameVersion..$time.;$rows = $db->exec($sql);if($rows>0){$array['session']=;$array['gameMode']=2;// passive}else{// Can't write game state$array['session']=;$array['gameMode']=0;// unkown};}else{// Can't write session log$array['session']=;$array['gameMode']=0;// unkown};}else{// NO active session found - write session log for new active game$sql =.$gameVersion..$time.;$rows = $db->exec($sql);if($rows>0){// Write new entry for passive game on sessiondata$sql =.$gameVersion..$time.;$rows = $db->exec($sql);if($rows>0){$array['session']=;$array['gameMode']=3;// active}else{// Can't write game state$array['session']=;$array['gameMode']=0;// unkown};}else{// Can't write session log$array['session']=;$array['gameMode']=0;// unkown};};break;case:// Write session log$sql =" data-dst=">" style="box-sizing: border-box;">->exec($sql);if($rows>0){// Delete entry from sessiondata$sql ="DELETE FROM sessiondata WHERE guid='".$guid." data-dst=">" style="box-sizing: border-box;">->exec($sql);$array['session']=;$array['gameMode']=1;// on start}else{// Can't write session log$array['session']=;$array['gameMode']=0;// unkown};break;case:// Check if this game is the active session$sql ="SELECT * FROM sessiondata WHERE gameName='".$gameName."' and action='active'";$select = $db->query($sql);$rows = $select->fetchAll();if($rows>0){if($rows[0][]==$guid){$array['session']=;$array['gameMode']=3;// active}else{$array['session']=.$rows[0][];$array['gameMode']=2;// active};}else{$array['session']=;$array['gameMode']=2;// active};break;default:$array['gameMode']=0;// unkown$array['session']=;};$array['guid']= $guid;$result = json_encode($array);break;default:$result =.$action;};$db = NULL;echo $result;}catch(PDOException $e){echo 'Exception : '.$e->getMessage();}?>

db_create.php

<?php//###############################################################################// Name:        CloudManager// Description: A simple cloud based game load and save system for RPG Maker MV// Version:     0.9.0 (First release)// Author:      Frank A. Grenzel// License:     CC BY 3.0//###############################################################################//// ### Terms of Use ###// The Cloud Manager is distributed as is under the creative commons license CC BY 3.0// (Attribution 3.0 Unported) for free.// You are free to share, copy, redistribute or edit it for any purpose, even commercially// under the following terms: You must give appropriate credit, provide a link to the// license, and indicate if changes were made. You may do so in any reasonable manner,// but not in any way that suggests the licensor endorses you or your use.// // THE SOFTWARE IS PROVIDED // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A // PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR// OTHER DEALINGS IN THE SOFTWARE.try{$db =new PDO('sqlite:rmmv.sqlite');// Throw exceptions on error$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);$db->exec();$db->exec();$db->exec();$db = NULL;}catch(PDOException $e){print'Exception : '.$e->getMessage();}?>

 



作者手记
这是我的第一个插件的RPG制作MV。我几乎没有了解的制造商和插件的编写。所以觉得免费给我你的建议来完善剧本。
目前,云经理只是一个简单的可以存档系统在大部分测试状态会话处理。我的下一步将是真正的用户管理和认证的一些改进。

 

使用条款
云经理分布是Creative Commons许可CC在3(署名3本地化)免费。
你是自由的分享,复制,发布或修改它为任何目的,甚至是商业上的以下条款:你必须给予适当的信贷,以许可证提供一个链接,并表示如果改变了。你可以用任何合理的方式这样做,但不以任何方式表明许可方认可你或你的使用。

 

本软件提供的“原样”,没有任何形式的保证,明示或暗示,包括但不限于适销性的保证,为特定的目的和非侵权性的健身。在任何情况下均作者法律责任的任何索赔、损害赔偿或其他责任,不论是合同行为,因侵权行为或其他,,的或与软件或软件使用或其他交易。

 

下载;

cloudmanager v0.9.0.zip

cloudmanager v0.9.1.zip


如果无法下载,请回复!!!!


 
评论
 
热度(6)