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

[制作教程] Simple Farming System

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

    连续签到: 2 天

    [LV.7]常住居民III

    4462

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 13:16 | 显示全部楼层 |阅读模式
    Introduction

    For years trends in gaming and patterns have become evident, one of the big examples is the use of zombie specific elements, even as mini games just to add that element into your game and appeal to fans of the genre. One of the current, and very popular styles of game / mini game present in most games is the farming element or system. This tutorial will teach you how to make a basic farming system for your own RPG Maker VX Ace games.

    What you need

    Knowledge of Eventing

    Galv's Event Spawn Timer

    Graphic of a Seed

    Graphic of a Vegetable

    Graphic of a Dirt Patch

    Graphic of a Dirt Patch with seed growing

    Graphic of a Dirt Patch with vegetable grown

    (If your only using this in a personal non-commercial game, Celianna's Parallax Tiles offer some great farming graphics)

    Special Thanks

    Galv - For his Event Spawn Timer Script.

    Celianna - For her awesome Tileset.

    How it's done

    After installing the script under Materials and above Main, importing the graphics into you RPG Maker game and going through the basic setup of a map, you are ready to set up a basic system. I will only cover the basics in the "How it's done" section, for more detailed analysis of each piece, look at the "How it works" section.

    You will need to set up items for the seed as well as the vegetable and place a seed into your inventory before you even start on the map.
     

    You will need to add a tile on your map of the dirt patch where it is possible to farm and then set an event on top of it. This event will be a 3 page event and I will go through each step with you.

    On the first event page, you want to leave your graphic empty (or use a dirt patch/tilled dirt patch). This event should have no conditions ticked and it's trigger should be set to Action Button. You want the contents to be as follows:

    Spoiler





    In place of Potion you would use your previously defined seed item and within the script call:

    Script: set_spawn(0,0,5)you will want to replace the 5 with how ever many seconds you wish the plant to take before it grows. This is entirely up to you, the more seconds it takes, the longer the plant will take to grow.

    The second page of the event should be set up like this:

    Spoiler





    You'll want to use your seeds or part grown plant as a graphic in this slot.

    It's very important that the Move Route type is set to Custom as this handles going on to the next frame once our timer is complete. Click the Move Route button and set it to a script call, placing the following code in:

    do_respawn?("B",true)Then we are ready to move onto our third event page:

    Spoiler





    Replace the graphic with that of your fully grown vegetable and replace hi-potion with the vegetable item you defined earlier and then you will have a working basic farming system with more than enough flexibility to make it as advanced as you want.

    If you haven't fully understood this or want to know how it works, read further down.

    How it works

    In this section I'm going to take you step by step through how it works and ways to make the system more advanced should you choose it.

    In Event Page 1, we are displaying a choice and that choice has two possible selections, they are Plant Crop or Leave it. If the player's input is Leave it then the game will simply cancel out of the event and your dirt patch left alone but if you select Plant Crop then a conditional branch is opened. The conditional branch is searching your inventory to see if you have any seeds available, if you do not then it will tell you so and cancel out the same as before but if you do then it will remove one seed from your inventory and start the Event Respawn Timer activating the Self Switch A.

    In Event Page 2, our event is triggered by Self Switch A being activated automatically making this the current event when you press the action button. When used by the user it'll simply say that your crop is growing and the player must wait. Within the Move Route, there is a script call doing a very important task. The code detects when the Event Respawn Timer is active and sets self switch B to true.

    In Event Page 3, our event is triggered by Self Switch B so our crop will become fully grown once the timer is done. When the player presses on the crop it will tell them it has grown and give the two choices again, either they can Harvest it or they can Leave it. Once more if you Leave it then nothing will happen and it will remain there but if harvested we are adding the grown crop to our inventory using the item we made and then switching both Self Switch A and B off allowing the event to return to Event Page 1.

    The reason this so flexible in it's design is because of the simplicity behind it. You could add more growth stages in by repeating Event Page 2 and placing a second timer in (though you'd have to activate the second growth by setting it as a parallel process opposed to a action button event) and adding on more Self Switches. You could implement a watering system where the plant won't go to the next stage of growth unless you water it using choices. You can even activate crops from another map using a separate event. The system is endless and free for you to play and experiment with.

    Why this method?

    A very understandable question to ask is why use this method? Well you don't have to, that is entirely your own choice but I personally like this approach because of it's flexibility in use.

    I would also advise this method because unlike waits, and most timers, Galv's system allows the player to freely move to any map they want without interrupting the timers, meaning that the growth of the plant will continue, even if your out adventuring on another map making it perfect for any system that uses farming not as the primary element in the game.

    I hope you have enjoyed reading this tutorial as much as I enjoyed making it and it comes in handy for anyone who was looking for a basic method of making a farming system.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-14 16:56 , Processed in 0.072823 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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