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

[制作教程] Create your crafting system with no plugins

[复制链接]
累计送礼:
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 天前 | 显示全部楼层 |阅读模式
    A crafting system is always appreciated. But it often needs plugins, which mean compatibility issues and less personalization. But what if you could create your crafting system from scratch, only with events?

    Requirements:
    This is optional, but to create a  "recipes" system you will need the plugin HIME_HiddenChoicesConditions. All the script calls used in the part 3) can be used without any plugin. It is also useful to have a good comprehension of events.

    First, why create a new crafting system?
    Well, it will allow you to personalize it as you want, and also to change recipes in-game (for example, you could use a variable as amount needed for a specific ingredient, add specializations linked to experience…)
    To create your crafting system, you will need to create ingredients. Just create new items and define their use on "never". Next, let's start this tutorial and create a common event. If you have many crafting categories, you will create a common event for each one.
    1)- Choose an item to craft, then craft it
    In this common event, you will show choices to make the player choose what he wants to craft. In each branch, you will show a message that shows a short description of the item and the necessary ingredients. You will also put in variables the amount of ingredients needed to craft the item. Don't make too much variables! If your recipes have three ingredients at maximum, create only three variables!
    Spoiler: message example
    [/quote]
    You can use this variables with text codes to show to the player how many ingredients he owns.
    Next, you can add a Yes/No choice to avoid crafting an unused item. In the "Yes" branch, you can add conditionnal branches to make sure the player really has the ingredients. If he has, remove them and add the crafted item to the player's inventory. If he has not, you can add an "else" branch and play a buzzer sound or show a message to inform the player that he has not the necessary stuff.
    Spoiler: event (only one potion)[quote]
    Now, you can create an event that will call this common event or use it with a menu plugin!
    2)- Create recipes
    With Hime's Hidden Choices, we can add a recipes system to our game. Just create a "Recipe" item and use this script call before your recipe choice:
                    Code:       
    hide_choice(CHOICE_NUMBER,!$gameParty.hasItem($dataItems[RECIPE_ID]))

    You won't be able to see the craft option until you have the necessary recipe.

    3)- Item Synthesis : Choose two ingredients to make a new item
    This first craft system is very cool, but what if I prefer the player to try different combinations?
    To create this synthesis system, you can be more efficient by using variables.
    BE CAREFUL: YOUR ITEMS MUST KEEP AT SPECIFIC ORDER.
    Example of my database:
    Spoiler: items and weapons
    [/quote]
    Create your choices. In our example, it will be blacksmithing: the player will choose the base weapon, next the metal ore that they will use.
    Spoiler: common event (only one metal)[quote]
    Ok... But why so much variables? To find more easily the weapon crafted! Look at the end of my common event...
    Spoiler: craft item

    The ID of the crafted weapon is the sum of the IDs of the ingredients! (Now you understand why I told you to keep your items in specific order).
    Use this script calls to remove or gain items :
                    Code:       
    $gameParty.gainItem($dataWeapons[$gameVariables.value(VARIABLE_ID)], AMOUNT);// You can replace $dataWeapons with $dataItems or $dataArmors

                    Code:       
    $gameParty.loseItem($dataItems[$gameVariables.value(VARIABLE_ID)], AMOUNT);//Same. If you want to remove armors or weapons, write:$gameParty.loseItem($dataWeapons[$gameVariables.value(VARIABLE_ID)], AMOUNT, true/false);//Set true if you want to include equipped weapons/armors. You can also use $dataArmors.


    The Self Switch is used to create a new branch if the player have cancelled to avoid crafting an item if the player cancelled.
    Here the metal is the only losable ingredient, but you can add more conditionnal branches or just copy/paste your second part.

    Thanks for looking at my tutorial! How will you personalize your game's crafting system?
    Tags: crafting, events, common events, script calls, choices, create, no plugins


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

    本帖子中包含更多资源

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

    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.064152 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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