设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
搜索附件  
同能RPG制作大师 › 附件中心 › 同能RM技术讨论区 › RPG Maker MV 讨论区 › Custom Item Types and Choices (now with demo!)-2.jpg

Custom Item Types and Choices (now with demo!)-2.jpg

 

Custom Item Types and Choices (now with demo!):
Custom Item Choices v1.1.1

LadyBaskerville
​


(This plugin was originally posted in my JS Snippets thread along with the rest of my small plugins, but even though this plugin is still short in terms of code, I feel like it deserves its own thread for the functionality it can provide.)

Introduction
This plugin allows you to designate any item as belonging to one or more custom types. It also lets you show only items of one specific custom type in the Select Item window, for when the Item Type distinction in the database isn't enough.

With some creativity, you can use this plugin to event a full crafting system / cooking system with variable ingredients. (This was part of my motivation for writing it in the first place - a demo can be found at the end of the post.)





How to use

To specify a custom item type, add a notetag of the formatto the item, where X is the custom item type (can be any string that does not contain spaces).

You can change the brackets in the plugin parameters, e.g. set prefix toand postfix toto only writein the item note field in order to specify custom type X. If you leave both parameters empty, an item will belong to custom type X if the string X appears anywhere in the note field.

Items can have multiple custom types. Simply add more notetags, e.g.
Plugin commands

Before using the Select Item command in an event, use the plugin commandto only show items of the type X in the Select Item window.

Use the plugin commandto return to the default behavior (showing all items in the selection window).


Script calls (advanced)

These script calls will probably be most useful in the Script fields of the Change Variables and Conditional Branch event commands.

Use the script callto get the number of items from custom type X in the party's inventory.

The script callreturns true if the item with ID n has the custom type X, otherwise false.

Spoiler: Usage Examples
This is the event from the picture above (both the "Common Fish" and "Rare Fish" items are tagged with <type:fish> in the database):



Here's an bare-bones example for how this plugin can be used to select seeds for planting as part of a simple farming game:





Terms of use
- Free for use in both non-commercial and commercial games.
- Please credit me as LadyBaskerville if you use this plugin (version 1.1.0 and higher).
- You may edit this plugin.
- You may redistribute this plugin and edits of it. In that case, please give credit and, if possible, link back to the original plugin thread.

Download
LB_CustomItemChoices.js
Plugin Demo (7.5 MB )

Spoiler: Changelog
Version 1.1.1
- Fixed a bug where the item selection screen would come up empty if no select item type was set.

Version 1.1.0
- Added parameters for prefix and postfix.
- Added support for more than one custom type per item.
- Added script calls for advanced functionality

Version 1.0.0
- Finished the plugin.


本贴来自国际rpgmaker官方论坛作者:LadyBaskerville处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/custom-item-types-and-choices-now-with-demo.142373/
Custom Item Types and Choices (now with demo!)-2.jpg
         同一主题附件:
    Custom Item Types and Choices (now with demo!)-2.jpg
    Custom Item Types and Choices (now with demo!)-3.jpg
    Custom Item Types and Choices (now with demo!)-4.jpg
简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)
关闭

幸运抽奖

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

立即查看

Loading...

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

GMT+8, 2026-10-24 21:27 , Processed in 0.123710 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部