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

[转载发布] Crafting

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

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    Author: Mr. Trivel


                    Name: Crafting


                    Created: 2016-03-27


                    Version: 1.0




             


            What does it do?


            Allows players to craft items.


             


            Video:










             


            How to use?


            First, you'll need 2 new files in data folder:
            Recipes.json
            Disciplines.json



            Recipes file will hold all recipe data and Disciplines file will hold data about disciplines. I *highly* recommend checking sample files that are located in the demo of this plugin.


             


            Discipline object looks like this:


    Spoiler                Code:       
    1. {
    2.    "ID": 999,
    3.    "Name": "NAME",
    4.    "IconID": 1337,
    5.    "ExpFormula": "10000*level",
    6.    "MaxLevel": 2,
    7.    "Categories": ["1", "2", "3", ... , "n"],
    8.    "Background": "FileName"
    9. }
    复制代码





             



                    And file structure looks like this:

                    Code:       
    1. [
    2. null,
    3. object,
    4. object,
    5. ...,
    6. object
    7. ]
    复制代码


                    "ID" - to identify which disciiplice is which and for plugin calls. ID > 0
                    "Name" - how discipline is called
                    "IconID" - icon for discipline
                    "ExpFormula" - leveling formula for discipline, level stands for current discipline level
                    "MaxLevel" - max possible discipline level
                    "Categories" - Categories to organize items when crafting
                    "Background" - Give a background to crafting. Leave it empty - "" to use default background. Images go into img\System


             


            Recipe object looks like this:


    Spoiler                Code:       
    1. {
    2.    "ID": 192312,
    3.    "Name": "Ultimate Sword of Ascension",
    4.    "IconIndex": 122,
    5.    "Result": [
    6.    {
    7.       "Type": "weapon",
    8.       "ID": 99999,
    9.       "Amount": 1
    10.    }
    11.    ],
    12.    "Requires": [
    13.    {
    14.       "Type": "item",
    15.       "ID": 1337,
    16.       "Amount": 99
    17.    }
    18.    ],
    19.    "Discipline": ID,
    20.    "Category": ["Swords", "Weapons"],
    21.    "XP": 999999999,
    22.    "LevelReq": 150,
    23.    "Learned": "command"
    24. }
    复制代码







                    And file structure looks like this:


    [
    null,
    object,
    object,
    ...,
    object
    ]


                    "ID" - To know which recipe is which. ID > 0
                    "Name" - How it appears in crafting window
                    "IconIndex" - Icon for recipe
                    "Result" - What items and how many of them result by crafting it, can be more than one item.
                    "Requires" - What items and how many of them are required to craft it.
                    {
                    "Type" - item type - "weapon", "item", "armor"
                    "ID" - item ID
                    "Amount" - how much of the item
                    }
                    "Discipline" - which disicipline's recipe is this
                    "Category" - under which categories will item be shown, can be multiple
                    "XP" - XP given for the discipline
                    "LevelReq" - Discipline level requirement to craft it
                    "Learned" - how is the recipe learned - "start" - from the start, "command" by plugin command, "levelhit" - unlocks automatically when hits  required level



            Plugin Commands:



            Crafting Start [DISCIPLINE_ID] - opens scene to craft with discipline
            Crafting GainExp [DISCIPLINE_ID] [EXP] - give exp to certain discipline
            Crafting Learn [RECIPE_ID] - learn a specific recipe
            Examples:
            Crafting Start 3
            Crafting GainExp 1 100
            Crafting Learn 5



            Script Calls:



            $gameSystem.getDisciplineExp(DISCIPLINE_ID) - returns EXP of a discipline
            $gameSystem.getDisciplineLevel(DISCIPLINE_ID) - returns LEVEL of a discipline
            $gameSystem.isRecipeKnown(RECIPE_ID) - returns if recipe is learned
            $gameSystem.knownRecipesNumber(DISCIPLINE_ID) - returns amount of recipes known


             


            Plugin: <Link: Github>


            How to download the Plugin: Click the link above, there will be a button named Raw, press Right Click -> Save As.


            Demo: <Link: Mediafire>


             


            Terms of Use:


            Don't remove the header or claim that you wrote this plugin.


            Credit Mr. Trivel if using this plugin in your project.


            Free non-commercial projects.


            For commercial use contact Mr. Trivel.


    本贴来自国际rpgmaker官方论坛作者:Mr. Trivel处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/crafting.59458/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 03:38 , Processed in 0.095998 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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