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

[制作教程] Making a Legend of Zelda / Final Fantasy Style Hybrid.

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

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    If you wish to view this tutorial series offline, I am also making it available as a PDF..This file will be updated as new chapters are posted, so the newest revision will always be available.

    Images in this post are contained in spoilers due to overall length

    A shout-out to MushroomCake28 for advice on improving post quality.


    Introduction

    Two of the games that I remember most from my childhood are the original Legend of Zelda for the NES, and Final Fantasy II for the SNES. And while the latter has been represented in many different games for both console and PC over the years, very few games have managed to capture the thrill of exploration and discovery of the former. For that reason, I have decided to create a hybrid of the two within RPG Maker MV with an intent of producing a series of adventure games using the resulting style.​

    For the experimentation and implementation process, I have recreated a portion of the original Legend of Zelda overworld, and the first dungeon. For obvious reasons this project will not be released to the public and serves only as an in-development example. The content I will release will use entirely original maps and story elements. But as a case study of mechanics and design style, a pre-existing game, as a reference, has proven useful.​

    This document is not intended to take you on a step by step journey of creating an actual working game, but rather to teach you the process I came up with to produce the elements which you can use to create a game of this style. If you wish to follow along, you will need to download GIMP, or some other graphics editing program that allows you to create and edit .PNG files. Starting in Chapter 2, we're going to be creating new tilesets, as many of the tiles needed to accurately honor the visual style of Legend of Zelda do not exist in the default asset library for RPG Maker MV. But to make the process easy to follow, all of the new tiles we will be creating will use elements that DO exist. And since we are allowed to use these assets as we see fit for our RPG Maker MV projects, I figured it would be good to also demonstrate how these assets can be used to make more personalized elements.​

    Before we get into that, We need to tackle a fundamental element that will exist through every part of the game that will result. The Navigation System.​

    Be advised that I am writing this documentation for everyone, regardless of their level of experience with RPG Maker MV. The first time I touch on something, I will explain the steps involved. I'm not going to tell you to look somewhere else to find out how. If this is the first tutorial for RPG Maker MV you read, It is going to tell you what you need to know.​

    Having said that, as we head deeper into the subject matter, I will be assuming that you have been following along, and have an understanding of what has been covered up to that point. It is on me to share mission-critical information. It is on you to decide to make use of it. Now if I miss something you feel is critical, then please, by all means, send me a private message or reply in this thread with your question, and I will be more than happy to address the issue, both directly with you, and in a revision to this documentation. If, however, I have covered the issue already in this document, I will reply only with the statement, “Please re-read Chapter X,” where X is the chapter I cover the issue. This will not be me being rude or condescending. I simply do not have enough time to re-explain things when the information is already available. But I WILL tell you where you can find the answer.​

    Now that we have that out of the way, let us begin...​

    Chapter 1
    The Navigation System


    The First thing you want to do, obviously, is create a new RPG Maker Project.
    Spoiler






    Name it whatever you want.
    Spoiler






    Go to a fine restaurant and have a three-course meal while the files copy.
    Spoiler






    When you get back, you should be ready to begin.
    Spoiler






    The navigation system will use one single parallel event to manage player transfers between maps that are meant to be adjacent to each other. This will be achieved through the use of region Ids. I use regions 2, 3, 4 and 5 to represent North, West, East and South, respectively. Select the R tab under the tileset and paint in these regions like so:
    Spoiler






    This map now has what is needed to handle the player transfers. Now all we have to do is set up the Parallel event that will manage the process. In Event Mode, double-click on the top left tile to create a new event, and name it NavSys.
    Spoiler






    Make sure that Priority is set to Below Characters, and that Trigger is set to Parallel.
    Spoiler






    For those new to Event design, This means that the event will be below the characters in the game and so will not block player movement, and that this event will run constantly as long as the player is in the same map with it. This allows it to do its thing behind the scenes and the player won't even be aware of its existence.

    A word of advice when setting up Parallel events. While they allow some pretty powerful stuff to be done, you do not want to have a whole bunch of them running at any given time, as when added to the global events that run constantly game-wide, and interactive events, they could cause the game to run slow. All active events run once every frame. By default there are 60 frames per second. Too many parallel events running could push the frame rate down, so just be mindful of that.

    One other thing you need to know about events: The order they are processed is based on their ID value, from lowest to highest:
    Spoiler






    For this project, it is very important that NavSys is the first parallel event that is placed on a map. The reason being that some of the data it will generate may need to be called by other parallel event at the moment the player enters the map. If those events were to be processed first, they would not be getting the most updated information and their process could break. So even if all of the coding for all events is 100% correct, especially for parallel events, not having them run in the right order could cause undesirable issues. Knowing this little tidbit early on may save you a lot of debugging later on. I learned it the hard way. So when it comes to event processing, commit this concept to memory: First Placed, First Priority.

    Now, let's get to the fun part.

    Before we can make this event send a player to another map, it needs to know what maps are meant to be adjacent to the current one. We need to go ahead and set those up.

    Right-click on the project root and then click New to create a new map.
    Spoiler






    Under General Settings, change the name of the map to “0 -1”
    Spoiler






    Really, you can name it whatever you want, but since we are going to be dealing with maps that will be the same size and will be occupying specific locations on an overall world map, it is useful to adopt a naming convention based on the individual map's X and Y coordinates. The maps themselves can be renamed later, if desired.

    Like events, Maps have an ID number. It stays the same, no matter how many times you rename the map.
    Spoiler


    This is very important. The ID number can also be found at the very bottom of the RPG Maker MV program window. I advise making a note of map names and IDs for easy reference.







    Now, Create three more maps, naming them -1 0, 1 0 and 0 1 respectively. While you are at it, Right-click on MAP001 and then click edit so you can go ahead and change its name to 0 0, for the sake of consistency.
    Spoiler






    So now you should have a total of five maps, all with a consistent naming convention.
    Spoiler






    Now let's edit their layout. You can make them look however you want, as long as they only have one exit as follows:

    0 -1 South
    -1 0 East
    1 0 West
    0 1 North​


    I'm going the very simple route:

    0 -1
    Spoiler






    -1 0:
    Spoiler






    1 0:
    Spoiler






    0 1:
    Spoiler






    I also went ahead and added the region IDs to only the borders that have exists, using the values we established for the first map. North border = 2, West border = 3, East Border = 4 and South Border = 5.

    Also, go ahead and modify 0 0 to look like this:
    Spoiler






    In Event mode, Double-click on the NavSys event. We're ready to move forward with it.

    The first thing we need to do is define the maps the exits link to. This is where the map IDs come into play. Double-click on the first line under Contents, or right-click on it and select New, to bring up the Event Commands window. Under Game Progression, click Control Variables...
    Spoiler






    This will bring up the Control Variables window.
    Spoiler






    We have not yet created any variables to control, so we will go ahead and do that now. Under Variable, make sure that Single is selected, and then click the button to the right, currently labeled 0001 with no name after it. This will bring up the Variable Selector window:
    Spoiler





    RPG Maker MV allows up to 5000 variables to be created. They are displayed in groups of 20. The column to the left lists the groups. The column to the right lists the variables in the selected group. By default, the first 20 variables are allocated, but are not named. You can click Change Maximum to increase or decrease the number of allocated variables. This cannot be increased beyond 5000, and if you decrease it so that named variables would be removed, then they would need to be allocated and named again if you need them back.

    Selecting a variable and then entering a name will define the variable, so you can know what it is used for. One thing you need to know about this is that you can rename the variable all you want. The name itself doesn't matter. It is the ID number that all event scripting references when working with variables. I say this because if you plan to do a sequel to your game and you want to just copy and paste events, If you have already defined variables those events reference, then it is going to reference THOSE variables. This will require you to make sure that your new project has the variables defined and then you will have to go through your event script and select the correct variables. I ran into this issue when I copied the NavSys event from my experimentation project and pasted it into the actual work project. I just wanted to warn you about it in advance in case you do the same. An ounce of prevention is worth a pound of cure.

    What you need to do now is define the first nine variables as follows:
    Spoiler






    Yes... there's a lot of stuff to set up. But once it is all in place, the completed NavSys event will just simply WORK. It can be copied and pasted onto any map in the same project, and the only thing you will need to change is the map ID numbers, for the maps that the exists will lead to.

    Now that the above variables are defined, we can go ahead and do the event scripting.

    Select nmap and click OK You will see that it is now showing up under Variable in the Control Variables window.
    Spoiler






    Under Operation, make sure that Set is selected.
    Spoiler






    This is for the adjacent map to the north, which we named 0 -1. This is why I advised making a note of the map names and their ID numbers. Under Operand, make sure that Constant is selected. In your notes, find the ID# for map 0 -1. If you've been following along exactly, it will be 002. Set that as the Constant value and click OK.
    Spoiler






    Now repeat the process for the other three maps. Once done, this should be what you have in the event script:
    Spoiler






    At this point, NavSys knows the ID numbers of the maps to reference when transferring the player. But it does not know how to reference them and when, and it also does not know how to determine if the player needs to be transferred. The next step is to make NavSys keep track of the player's position on the map, and the region ID at that location.

    You will thank me for this later. The next line of code would do well to be a comment with dashes in it to serve as a script segment divider. You can put some descriptive text in if you want to. The important thing is being able to visually chop up the script so it is easy to identify the different segments. It is not mandatory, but I find it useful, and you may as well. So get to the Event Commands window, and under Flow Control, click Comment.
    Spoiler






    Now enter 80 dashes. Your script should now look like this:
    Spoiler





    In the rest of this document, I will refer to what we just did as a Dividing Line. So if I say, “Put a dividing line” somewhere in an event script, this is what I mean. Comments are ignored by event processing and serve as notes about what a script segment does, or for organizational purposes, as in this case.

    Add another Control Variable command, and select pxpos as the Single Variable. With a Set Operation. But this time, instead of Constant, we are going to select Game Data as the Operand.
    Spoiler






    Map ID is the default. That information will be of use in a later chapter, but it is not what we are looking for at the moment. Click on it and select Character. There are two buttons next to this selection. The first needs to be Player, and the second needs to be Map X. Once these options are selected, click OK.
    Spoiler






    Operand should now look like this.
    Spoiler






    Click OK, and repeat the above step for the pypos variable, but select Map Y as the Player Game Data. The event script segment we are working on should now look like this:
    Spoiler






    Now we just need to get the Region ID info for the player's position.

    Add a new Event Command. On Page 3, under Map, Click the Get Location Info button.
    Spoiler






    This brings up the Get Location Info window.
    Spoiler






    Variable is where the location information will be stored. Info type is the type of information to be obtained. Location can either be direct designation, or designation with varriables. The former will let you select a position on the current map, and the latter will use variables to designate the X and Y coordinate on the current map.

    Set Variable to regid.Set Info Type to Region ID. Under Location, select Designation with variables. For X, select pxpos and for Y select pypos and then click OK.
    Spoiler






    Here is how the event script segment should look now:
    Spoiler






    At this point, NavSys knows the Map ID numbers the current map's exits will reference, and it knows how to get the player's current X and Y coordinates and the Region ID at those coordinates. But it still doesn't know what to do with this information. That's about to change. But first it's time for a little more explanation.

    To approximate, Legend of Zelda's style, we make it so that the player moves around the gmeworld one screen at a time. By default, an RPG Maker MV map is 17x13 tiles in size. I have decided to stick with this size, as if played in full screen on a standard monitor, that size map fills the screen and will not scroll. To understand how the next part of this tutorial works, it is important to understand how the game defines X and Y coordinates on a map. For a 17x13 tile map, the left-most column of tiles is X=0. The top-most row of tiles is Y=0. The right-most column of tiles is X=16 and the bottom-most row of tiles is Y=12. So the Y value is greater towards the bottom and lesser towards the top, and the X value is greater towards the right and lesser towards the left. Keeping this information in mind will prove useful as we move forward.

    Put a dividing line after the Get Location Info command. This will mark the start of the current segment, which will process player transfers to the designated map ID in the nmap vriable. When the player loads into nmap, the character will be at the bottom of the screen, 1 tile up, but in the same column they were in when leaving the first screen.

    This can be achieved with just regular transfer player events, but you would need one for every tile along the edges of the map, each one pointing to a relative position along the edge of the opposite side of the screen in the new map. By using NavSys, we eliminate the need for so many events, and you only need to copy NavSys onto every new map and change the values for the nmap, wmap,emap and smap variables to the Map ID values of the maps that need to be loaded. So when we are done with this lesson, only 4 numbers need to be changed, and the rest of the process handles itself.

    You won't need to place region IDs on map borders that will not lead anywhere else. And you don't have to place them on tiles that you know the player will not be able to enter. Furthermore, you can omit lines in NavSys for designating a map ID if you know that border of the map cannot go anywhere else, and the following segments can be omitted for the same reason. It all depends on how clean you want your script to be. Leaving these elements in, even if not needed, is not going to hurt anything.

    So now you know about how a map's X and Y coordinates are processed, and what we are aiming to accomplish in the next step. And I've given you some idea of what you can do without when working with this system.

    Now, let's make the system work.

    First, we need to check to see if the player is at the north border of the map. So we need to add a new Event Command. On Page 1, under Flow Control, click Conditional Branch...
    Spoiler






    A conditional branch is RPG Maker MV's way of saying “If something is this, then do that or else do something else.”

    Let's look at the Conditional Branch window:
    Spoiler





    It's got 4 pages to it, each all about designating what “SOMETHING” and “THIS” are in “If SOMETHING is THIS.” After selecting and/or setting these elements, the event script will insert a blank line followed by an End line. The blank line is where we can tell the game what the “THAT” is in “then do THAT.” The End line tells the game where that conditional branch ends and it can move on to the next part after it. If the “Create Else Branch” box is checked, before the End line, an Else line is inserted with a blank line for more Event Commands. This is where we tell the game what the “SOMETHING ELSE” is in “or else do something else” To give you an idea of how powerful this can be, “Then do that” can be another conditional branch. “Or else do something else” can be as well.

    If you are new to all of this, I promise you that you will be using conditional branches a lot. Now that you know how they work, let's continue.

    On Page 1, select Variable, set it to regid is equal to a Constant of 2
    Spoiler





    We don't need an Else branch, because we only want something to happen if the player has entered a tile with a Region ID of 2. But what do we want to happen?

    We want the game to transfer the player to map 0 -1 one row above the south border but in the same column. We need to add a Control Variable command, where the Variable is transx, the Operation is SET and the Operand is Variable pxpos. And then we want to click OK
    Spoiler






    Then we need another Control Variable command to set transy to a constant of 11. Remember, the bottom most row of tiles is Y=12, so the row above it is Y=11.

    At this point, the current segment we are working on should look like this:
    Spoiler






    Now we need to transfer the player to the new map. Add a new Event Command below the control variable command for transy. On Page 2, under Movement, click Transfer Player...
    Spoiler






    Under Location, select Designation with variables, set ID to nmap, X to transx and Y to transy. Set Direction to Up. Leave Fade set to Black. Then Click OK.
    Spoiler






    Now, based on what you've learned so far, make the next three segments look like this:
    Spoiler






    Click OK to save the event.

    If you test the game now, you can exit the start screen in any direction and you will arrive at the destination on the correct side of the screen but still in the same row if you went West or East, or in the same column if you went north or south... But... Now you can't go back the way you came. That's because the new maps don't have a NavSys parallel event running on them.

    Create a new map from the project root. Name it Events. Don't do anything to it. Leave it completely empty. Now go to your map 0 0, right-click on the NavSys event and click Copy. Now go back to the Events map, right-click somewhere and then click Paste.

    Double-click on the event to edit it. Change the values for nmap, wmap, emap and smap to 0. Leave everything else alone and click OK. Now you have a template event that you can copy into any new map, asign the correct map ID values, and the system will automatically work on that map. When designing maps to be adjacent to each other, take care that you do not put any kind of barrier in tiles that NavSys will send the player to, unless there is a gameplay/plot-related reason for doing so. You do not want the player to get stuck due to design mistakes.

    This is how the complete NavSys template script should look:
    Spoiler: NavSys Parallel Event Script Template
    ◆Control Variables:#0001 nmap = 0
    ◆Control Variables:#0002 wmap = 0
    ◆Control Variables:#0003 emap = 0
    ◆Control Variables:#0004 smap = 0
    ◆Comment:--------------------------------------------------------------------------------
    ◆Control Variables:#0005 pxpos = Map X of Player
    ◆Control Variables:#0006 pypos = Map Y of Player
    ◆Get Location Info:regid, Region ID, ({pxpos},{pypos})
    ◆Comment:--------------------------------------------------------------------------------
    ◆If:regid = 2
      ◆Control Variables:#0008 transx = pxpos
      ◆Control Variables:#0009 transy = 11
      ◆Transfer Player:{nmap} ({transx},{transy}) (Direction: Up)
      ◆
    :End
    ◆Comment:--------------------------------------------------------------------------------
    ◆If:regid = 3
      ◆Control Variables:#0008 transx = 15
      ◆Control Variables:#0009 transy = pypos
      ◆Transfer Player:{wmap} ({transx},{transy}) (Direction: Left)
      ◆
    :End
    ◆Comment:--------------------------------------------------------------------------------
    ◆If:regid = 4
      ◆Control Variables:#0008 transx = 1
      ◆Control Variables:#0009 transy = pypos
      ◆Transfer Player:{emap} ({transx},{transy}) (Direction: Right)
      ◆
    :End
    ◆Comment:--------------------------------------------------------------------------------
    ◆If:regid = 5
      ◆Control Variables:#0008 transx = pxpos
      ◆Control Variables:#0009 transy = 1
      ◆Transfer Player:{smap} ({transx},{transy}) (Direction: Down)
      ◆
    :End
    The following is what the Map ID segment should look like on all 5 maps:
    Spoiler: Map ID Segments for All Five Playable Maps
    0 0:
    ◆Control Variables:#0001 nmap = 2
    ◆Control Variables:#0002 wmap = 3
    ◆Control Variables:#0003 emap = 4
    ◆Control Variables:#0004 smap = 5
    0 -1
    ◆Control Variables:#0001 nmap = 0
    ◆Control Variables:#0002 wmap = 0
    ◆Control Variables:#0003 emap = 0
    ◆Control Variables:#0004 smap = 1
    -1 0
    ◆Control Variables:#0001 nmap = 0
    ◆Control Variables:#0002 wmap = 0
    ◆Control Variables:#0003 emap = 1
    ◆Control Variables:#0004 smap = 0
    1 0
    ◆Control Variables:#0001 nmap = 0
    ◆Control Variables:#0002 wmap = 1
    ◆Control Variables:#0003 emap = 0
    ◆Control Variables:#0004 smap = 0
    0 1
    ◆Control Variables:#0001 nmap = 1
    ◆Control Variables:#0002 wmap = 0
    ◆Control Variables:#0003 emap = 0
    ◆Control Variables:#0004 smap = 0
    Edit - Images placed in spoilers due to post length. Fixed some spelling errors.

    Continure to Chapter 2



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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 14:21 , Processed in 0.092298 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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