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

[转载发布] Ammunition System & Add-on (Crafting System)

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

    连续签到: 2 天

    [LV.7]常住居民III

    7524

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 3 小时前 | 显示全部楼层 |阅读模式
    Ammunition System - ver1.1.7


    by Unconnected42


    Latest updates


            - 2016-12-11 : ver1.1.7 : fixed a bug that make the game crash in some menus when an actor had no weapon equipped.


            - 2016-11-16 : ver1.1.6 : makes ammunition display for normal attack.


            - 2016-11-15 : ver1.1.5 : fixes the incompatibility with Yanfly's Weapon Unleash.


            - 2016-06-11 : ver1.1.4 : fixes the incompatibility with Yanfly's ItemCore ver. 1.24.


            - 2016-02-17 : ver1.1.3 : (supposedly?) corrected a bug that causes crashes when enemy attacks for some persons.


            - 2015-12-15 : ver1.1.2 : yet another bug correction.


            - 2015-12-15 : ver1.1.1 : corrected a bug that caused zero cost equip ammunition to be unequippable.


            - 2015-12-09 : ver1.1.0 : charged ammunition can now 'create' an 'empty' item when their charge number is reduced to zero. Also, charged ammunition will show their remaining charges in equip windows.


            - 2015-11-29 : ver1.0.0 : added charged ammunition feature. Fixed a (generally silent) bug that could make skills availables even in case of unsufficient ammunition in some rare cases.


            - 2015-11-26 : ver0.4.4 : fixed an issue that caused equip-type ammo to be equippable when it should not in some situations.


            - 2015-11-24 : ver0.4.3b : fixed an issue that caused ammo not to be consumed in some situations when using older versions of Yanfly's ATB.


            - 2015-11-21 : ver0.4.3 - the previous changes made actually break the ammo cost implementation when ammo are NOT independent items, causing the ammo to be simply unequipped... Corrected now.


            - 2015-11-20 : ver0.4.2 - correction of the 'reload skills' feature so that indicating the correct equip slot for equip ammunition is no more necessary. Slight modification of how the cost of equip ammunition is managed internally, so that it works more logically when independent ammo with variance is used.


            - 2015-11-15 : ver0.4.1 - corrected a bug causing a crash during battle when no weapon is equipped and the ammo amount is displayed next to attack command. Also corrected a bug that could make the displayed cost in attack command incorrect.


            - 2015-11-15 :


            * ver0.4.0: added compact cost display, game switch dependency, and weapon-type ammunition (for now, it is strongly recommended to use it only for weapons using themselves as ammo, such as throwing knives).


            * added extension Crafting System.


    Introduction


            This script allow to define costs in terms of gold, items or equipments (that is, armors or weapons) for skills or weapons use.


            It can be used for a variety of purposes : spells requiring special components in order to be cast, making items only usable by certain actors through the use of specific skills, having guns or bows needing bullets and arrows, throwing knives... 


    Features


            - the cost is added to any existing cost (MP, TP...)


            - if the equipped weapon has a cost in items/equips, this cost will be applied each time the normal attack is used.


            - if a skill/weapon has a cost for several items, each cost must be paid each time the skill/weapon is used.


            - if a skill/weapon has a cost for several equipments, only the equipped ammunition will be consumed when the skill/weapon is used. Additionally in that case, if no ammunition is equipped, the skill/weapon cannot be used.


            - skills can be used to change armour-type ammunition during battle.


            - equip-type ammunition (armor/weapon) can possess charges (a number of limited uses), in which case the ammo charges are reduced at each use, instead of the ammo being consumed. When the charges number hits zero, the ammo is unequipped and 'disappears'.


    Screenshots

    SpoilerSpoiler

























    How to Use, & Compatibility issues


            My lazyness made me simply copy/paste the plug-in's help below :

    SpoilerSpoiler







                            ============================================


                            Introduction


                            ============================================


                            This plug-in will allow skills or weapons to require the consumption of 


                            ammunition, components, etc. in order to work. The cost is  paid each 


                            time the skill is used, together with MP/TP costs, or each time the 


                            normal attack is used in the case of weapons.


                            The ammunition can be either gold, items or equipments (armours, weapons), or 


                            a mix.


                            However, things work differently depending on what type of cost is considered.


                            - items : if several types of items are marked as required as ammunition 


                              for a given skill/weapon, *ALL* of the corresponding prices must be 


                              paid each time the skill/weapon is used. 


                            - equipment : the equipment needs to be equipped in order for the skill/weapon


                              to work. If several types of equipments are marked as required as ammunition


                              for a given skill/weapon, *ONLY* the cost of the one that is *CURRENTLY


                              EQUIPPED* will be paid. That means a weapon/skill can be able to use 


                              different interchangeable ammunition types.


                            - Gold cost is straightforward in how it functions.


                            You can also define skills which can change the type of ammunition 


                            equipped even during combat, in the case of armour-type ammunition.


                            Then, your hero can use an action to change his/her ammunition type !


                            ============================================


                            Known Compatibility Issues


                            ============================================


                            This plug-in should be placed under all plug-ins that you are using,


                            especially Yanfly's since it actually uses some of their features if


                            they are present.


                            Known exceptions to that rule : 


                            - Yanfly's Skill Cooldown


                            - Jay's Dual Techs. 


                              -> Ammunition should be placed above these two plug-ins.


                            This might also be the case for other plug-ins whenever 


                            the modification of skill costs is concerned.


                            On the contrary, the following plug-ins MUST be placed above :


                            - Bobstah's BattleCommandList.


                            This plug-in in the present version should be fully compatible


                            with Yanfly's ItemCore Independent Items feature.


                            Therefore, ammunition of any kind can either be independent or


                            not (for the latter case, use a <Not Independent Item> notetag


                            in the ammunition notebox if you are using ItemCore and a max


                            number of items > 0).


                            ============================================


                            Use


                            ============================================


                            + Declaring a weapon/skill to need ammunition


                            ---------------------------------------------


                            Lines to put in either Weapon notebox or Skill notebox for defining costs :


                              <Gold Cost: c>


                              <Ammo i Item: c>  (for items ammo)


                              <Ammo i Equip: c>  (for armors ammo)


                              <Ammo i Weapon: c>  (for weapons ammo)


                            ... where i is the ID of the ammunition item/armor and c is the cost 


                            required for one use.


                            Disclaimer concerning weapon-type ammunition: 


                            In its present state it is intended to be used for weapons that would be


                            their own ammo, like throwing knives, shurikens, etc.


                            In theory, however, it *should* be possible to use as ammo for a weapon 


                            a different weapon, provided both of them are equipped, but this possibility


                            has yet to be playtested...


                            + Declaring a skill that serves for equipping ammo (during combat)


                            ------------------------------------------------------------------


                            To create a skill that will change the type of ammunition equipped:


                              <Ammo i Load>


                            ... where i is the ID of the ammunition armor.


                            The following syntax is also authorized:


                              <Ammo i Load: s>


                            ...where s is the specific slot to be equipped.


                            This syntax is kept only for compatibility reasons, so that people


                            who defined their tags for older versions of the script that did


                            not support the simpler syntax are not forced to change.


                            If your actor(s) have for example the following equipment types:


                                Weapon, Shield, Head, Body, Accessory, Ammunition


                            ... then the slot number would be 6.


                            Note 1: this is meant to be used during battle, when equip menu is not 


                            accessible, if you want your actors to be able to switch ammunition.


                            Note 2: it is necessary to define one skill per type of ammunition.


                            Note 3: it is possible to use this tag for equipping any kind of armor, and 


                            not just ammunition.


                            Also, the Load feature currently does not work with weapon-type ammo.


                            + Ammo equipment with charges


                            -----------------------------


                            For an armor- or weapon-type ammunition, you can allow each ammo item to


                            provide a given number of uses instead of being consumed after just one use.


                            Declare the following tag in the ammo equipment notebox:


                              <Ammo Charges: n>


                            ... where 'n' is the wished number of charges the item possesses.


                            This tag will only actually be used if you are using Yanfly's ItemCore and


                            the item is an independent item.


                            The equipped ammo item has a certain number of charges, and at each use, this


                            is this number that will be reduced, instead of the number of ammo items.


                            When the number of charges hits zero, the item is unequipped, without


                            being returned to inventory. No other item of same type will be equipped even


                            if available in inventory.


                            + Determining skill's availability depending on a game switch


                            -------------------------------------------------------------


                            You can also now have skill availability depend on a game switch status, with


                            the following tag to put in a skill's notebox:


                              <Game Switch: n>


                            If the game switch number 'n' is set at false, the skill cannot be used.


                            This might be useful, for example, if you are also using the crafting


                            extension of this plug-in and wish to make crafting available only


                            in certain places/situations.


                            ============================================


                            Displaying Ammunition Amounts & Costs


                            ============================================


                            A given ammunition type is almost always represented by its icon when it


                            is necessary (either to display a cost or a remaining amount).


                            Ammo costs for skills are indicated together with "normal" TP/MP costs.


                            There are several solutions for displaying the remaining ammunition amount


                            so that the player knows where he stands.


                            Most of them are turned on through the plug-in parameters.


                            - For weapons : 


                              + The number of ammunition left can be displayed at the


                                top of the screen when the actor command menu is active.


                                This is the default option.


                              + The number of ammunition left can be displayed in the 


                                command window, just next to the "Attack" option.


                                No icon in that case.


                              + If you are using Yanfly's SkillCore plug-in, you can use the following


                                notetag in the weapon note :


                                    <Swap Gauge n: AMMO>


                                ...where n is the number of the gauge you want to replace.


                                Instead of a normal HP/MP/TP gauge, you will then have the amount of


                                ammunition left for the currently equipped weapon.


                            - For skills : 


                              + The remaining amount for each ammunition type can be showed


                                together with cost in the skill window.


                              + It can also be displayed after the skill description, in the help


                                window. This is the default option.


                                In that case, you should keep the skill description within one unique


                                line with no line-break at the end, or else the remaining ammo will 


                                not be visible.


                            The text before ammunition left amounts can be customized with the following


                              notetag in the skill notebox:


                              <Ammo Left Text: xxx>


                              ... with xxx being your custom text.


                            The name of the ammunition type can be displayed along with its icon with


                            the following notetag in the weapon/skill notebox:


                              <Show Ammo Name>


                            Also, in the case of equipment ammunition, several types of


                            ammunition are possible but only one (the one equipped) will be displayed


                            in any skill/help/etc window (or gauge). When there is no more ammunition,


                            the system normally would not know which icon to use !


                            There is a default icon for that, but you can put the following notetag


                            in skill/weapon notebox to define which icon will be used :


                              <No Ammo Icon: i>


                              ... with i being the icon number. 


                            It is also possible to add details about the ammunition type currently 


                            equipped by adding the following notetag in the ammo notebox :


                              <Ammo Window Desc: xxx>


                            Where 'xxx' is the description you want to give to your ammo.


                            This description will show up in the skill help window and the ammunition


                            window visible during actor command selection.


                            Please that if you deactivate the ammo window or the display of remaining


                            ammo amount with the corresponding plug-in parameters, you will of course 


                            not see any description of ammunition !






    Plug-in code


    Js file download


    Add-on : Crafting System

    SpoilerSpoiler



                            A skill-based crafting system, requiring Ammunition System because it makes use


                            of its item costs mechanics. Must be placed *below* Ammunition System.


    Features


                            - Allow skills to produce items.


                            - Crafting skills must be affected to specific skill types listed in one of the plug-in parameters.


                            - Display of crafting skills products and components' detailed costs and amounts.


    How to use :



                                    Spoiler



                                            ============================================


                                            Introduction


                                            ============================================


                                            This plug-in provides a skill-based crafting system.


                                            ============================================


                                            Known Compatibility Issues


                                            ============================================


                                            This plug-in is an extension of Ammunition System.


                                            It will not work if Ammunition System is not installed, and


                                            must be placed below it in the plug-in list.


                                            If you are using Bobstah's BattleCommandList plug-in,


                                            you will probably have to manually remove from your actors'battle command


                                            lists the crafting skill types (see below).


                                            ============================================


                                            Use


                                            ============================================


                                            This plug-in functions by allowing skills to produce items of any kind.


                                            The crafting skills (i.e., skills producing items) can consume items


                                            according to the rules of Ammunition System, with some specific tweaks.


                                            Note that crafting skills are not supposed to be used during battle.


                                            For the crafting skills to work properly, they must be given special


                                            skill types that are to be listed inside the plug-in parameter


                                            'Crafting Skill Types'.


                                            Example : create a skill type named 'Alchemy' with number 6 and


                                            put '6' as the value for parameter 'Crafting Skill Types'. Then, give


                                            the skill type Alchemy to some skills that you want to produce items.


                                            Later, if for example you create another crafting skill type named


                                            'Cooking' (number 7), put '6,7' as the value for parameter


                                            'Crafting Skill Types'.


                                            When a skill type is listed in the Crafting Skill Types, there are two


                                            consequences:


                                            - the skill type will not appear during battle (only if you don't use


                                            any plug-ins altering the actor battle command list)


                                            - when in main skill menu, when a crafting skill type is selected, the


                                            normal item window will be replaced. Instead, you will have two windows:


                                            the one at left will display the list of skills corresponding to the


                                            selected skill type (all those skills should be crafting skills),


                                            the one at right will display a list of products and components of


                                            the currently selected skill. Current amounts of products/components


                                            will also be displayed.


                                            Here are the tags to put in crafting skills notebox for defining production :


                                            <Make i Item: n>


                                            <Make i Armor: n>


                                            <Make i Weapon: n>


                                            ... where 'i' is the index of the desired item/armour/weapon and 'n' is the desired


                                            amount.


                                            As for the components, use the same tags as seen in Ammunition System.


                                            However, there is a little difference regarding item consumption.


                                            Weapon and armour-type items will be considered as normal items:


                                            that is, they do not need to be equipped, only the items in inventory will


                                            be accounted for to estimate the available amount (not the ones being equipped),


                                            and all the listed equip-type ammo will be consumed, and not only the one


                                            equipped.


                                            It is possible to customize the texts introducing the products and components


                                            in the craft information window with the following tag to put in the skill's


                                            notebox:


                                            <Craft Product Text: xxx>


                                            <Craft Component Text: xxx>




    Screenshots:


    [/url]


    Download:


    [url=http://pastebin.com/CcKDENxk]Js file download










    Working Demo:


    Download Demo !


            (contains demonstration for plug-ins Ammunition System, Crafting extension and Change Equip On Battle) 


            (this demo contains no other plug-ins than the three aforementioned, meaning there is no demonstration for the functionalities depending on external plug-ins - such as Yanfly's plug-ins. Maybe another demo showing special functionalities and interactions with other plug-ins will be released later !)


    Credit and Thanks


            - Unconnected42


            You can freely use, edit, or do anything you want with this plug-in, commercially or not. Just give proper credit.  



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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-30 19:35 , Processed in 0.122701 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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