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

[转载发布] Drop Item Sets

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

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-31 19:35:29 | 显示全部楼层 |阅读模式
    This script allows you to set up "drop item sets". A drop item set is simply a collection of drop items: at the end of battle, you can potentially receive drops from a chosen set.

    Drop item sets are chosen depending on whether their condition is met. The drop item set condition can be anything related to the state of the game when the enemy dies, such as the skill that was used to defeat the enemy, or certain properties of the battler that defeated the enemy, or the values of game variables or switches.

    Drop item sets allow you to further control which drops are available for the party to obtain after winning a battle.

    For example, suppose an enemy drops three items: Potion, Hi-Potion, and Gold Ore.

    You organize the drops into two separate groups as folows:

    Group 1: Potion, Hi-Potion

    Group 2: Potion, Hi-Potion, Gold Ore

    You then place a condition on the second group such that it will only drop if Hime is in the active battle party. This means that group 2 drop set will not be selected if Hime is not in the battle party, and therefore Gold Ore does not drop if Hime is not in the battle party.

    Download

    Get it at Hime Works!

    Installation

    Place this script below Materials and above Main

    Usage

    Start by setting the drop items for the enemy.

    Then create drop item sets. By default, there are no sets, so none of the

    enemies will drop anything.



    To create a drop item set, use a note-tag of the format

    <drop-item set>drops: 1, 2, 3priority: 7condition: formuladrop: w1 0.6drop: a4 0.23drop: i7 1</drop-item set>The drops is a list of drop item ID's, corresponding to each drop in theenemy's list of drop items. The editor provides 3 drop items, so the first

    drop is numbered 1. You can repeat the same drop multiple times in the list

    if you want it to be dropped multiple times.

    In addition to pulling drop items from a list, you can also manually add drops

    to each group using the `drop` option. The drop option takes an object ID,

    where you choose "w" for weapon, "a" for armor, and "i" for item, followed

    by the database ID. The second value is the droprate, as a percentage. So

    0.6 means 60%, 0.23 means 23%, and 1 means 100%

    Priority determines whether the drop set should be checked before other sets.

    For example, a priority 10 set is checked before a priorty 5 set.

    The condition is a ruby statement that determines whether the set will be

    chosen or not. When the set is chosen, then those drops are the ones that you

    can potentially receive at the end of battle.

    The condition comes with 5 variables for you to use

    a - the Game_Battler that defeated this enemyb - this enemyc - the Game_Action used by the battler in `a`v - game variabless - game switchesBecause drops, by default, are only rewarded when the enemy has been killed,we only need to keep track of who killed the enemy. It's possible that an event

    kills the enemy, in which case `a` would be nil, and your formula will not

    work as you expect (it will return false in these cases, so no errors).

    Examples

    Some conditions that you might use for drop item sets

                    Code:       
    1. Attacker's level.Maybe drops are only available if your level > 5   a.level > 5Killing blow skill.Maybe a drop is only available if you kill using skill 23   c.item == $data_skills[23]Attacker's stateSet requires attacker to have state 23 applied when enemy was killed   a.state?(23)Attack elementSet requires the damage to have element 5 (not including features)   c.item.damage.element_id == 5
    复制代码




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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 20:13 , Processed in 0.077131 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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