Dismantle Items (解体)

This slideshow requires JavaScript.

Version 1.3 (4/27/2013)
Script Download

This script is based off the Dismantling mechanic from Final Fantasy 13. However, copying that exact system isn’t very fun so I added a few extra optional features. You can also define the chance for items to be dismantled from the original item. Item dismantle information can also be masked until the player dismantles the item.

My motivation for making this script comes from wanting to learn how windows interact with each other in VXA scenes. While the process of making this script took much longer than I wanted, it was very much worth it.

Changelog

  • v1.3
    • Changed how dismantled item data is stored. (4/27/2013)
  • v1.2
    • Bugfix: Custom sound effects should no longer crash the game.
    • “Times Dismantled” values are now properly saved.
    • Dismantle mask flags are now properly saved.
    • Dismantle scene script call has changed for consistency. The old script call can still be used though. (4/05/2013)
  • v1.1
    • DISMANTLABLE_ITEMS_MASK_ICON_ID now works. (7/21/2012)
  • v1.0
    • Initial release. (7/21/2012)

Notetags

Note: Some tags are given shorter tags for typing convenience. You only need to use one <tag> from a given group for a notebox. Use common sense.

The following Notetags are for Items, Weapons, and Armors only:

<dismantle>
setting
setting
</dismantle>

This tag allows you define custom dismantle settings. You can add as many settings between the <dismantle> tags as you like. Only items with this tag will appear in the Dismantle Shop. Any settings you do not include will use the default values defined in the customization module if there are any. The following settings are available:

item: id
item: id, chance%
i: id
i: id, chance%

This setting defines the item that is dismantled from the original item, armor, or weapon where id is the Item ID number found in your database. Chance is a value between 0.0 and 100.0. If chance is omitted, it will use the default chance value defined in the customization module. This setting can be used multiple times within the tags.

weapon: id
weapon: id, chance%
w: id
w: id, chance%

This setting defines the weapon that is dismantled from the original item, armor, or weapon where id is the Weapon ID number found in your database. Chance is a value between 0.0 and 100.0. If chance is omitted, it will use the default chance value defined in the customization module. This setting can be used multiple times within the tags.

armor: id
armor: id, chance%
armour: id
armour: id, chance%
a: id
a: id, chance%

This setting defines the armor that is dismantled from the original item, armor, or weapon where id is the Armor ID number found in your database. Chance is a value between 0.0 and 100.0. If chance is omitted, it will use the default chance value defined in the customization module. This setting can be used multiple times within the tags.

fee: amount

This setting defines the amount of Gold required to dismantle the item, armor, or weapon where amount is any amount of gold. If this setting is omitted, it will use the default fee defined in the customization module.

——

Here are some examples of proper <dismantle> tags:

In this example, each item setting has omitted the chance value. This means that it will use the default chance value defined in the customization module.

In this example, each line uses the short-hand version of a setting. The dismantle chance values are included for some settings, but not all.  The “fee” setting is omitted meaning it will use the default fee value defined in the customization module.

Script Calls

The following script calls are meant to be used in “Script…” event commands found under Tab 3 when adding a new event command.

open_dismantle_shop

This script call opens up a Dismantle Shop scene.

remove_dismantle_mask(:item, id)
remove_dismantle_mask(:weapon, id)
remove_dismantle_mask(:armor, id)

This script call allows you to remove the dismantle information mask for a specified item, weapon, or armor where id is the database ID number

remove_all_dismantle_masks

This script call removes all dismantle information masks on all dismantlable items, weapons, and armors in the database.

get_dismantle_count(:item, id)
get_dismantle_count(:weapon, id)
get_dismantle_count(:armor, id)

This script call returns the “Times Dismantled” value of the specified item, weapon, and armor where id is the database ID number. This script call is meant to be used in the “Script” box within “Control Variable” event commands.

get_all_dismantle_count

This script call returns the cumulative “Times Dismantled” value of all items, weapons, and armors. This script call is meant to be used in the “Script” box within “Control Variable” event commands.

Compatibility

This script aliases the following default VXA methods:

  • DataManager#load_database

There are no default method overwrites.

Requests for compatibility with other scripts are welcome.

Terms and Conditions

Please do not repost this script elsewhere without permission.

Free for non-commercial use. For commercial use, contact me first.

Newest versions of this script can be found at https://mrbubblewand.wordpress.com/

Advertisements

20 Responses to Dismantle Items (解体)

  1. Pingback: RGSS3: Dismantle Items (解体) « Bubble Blog

  2. Shin says:

    This is really nice.
    Uh… would be nice if besides dismantling items, we could also combine items to make a new one.

  3. Mr. Bubble says:

    Funny you say that, Shin. I was originally planning on having multiple reagents or other item requirement options included in this script, but I realized that would just turn this into a really strange crafting system. If I were to make a crafting script, I would prefer to make it separate from a dismantling script.

    I can still add an item requirement for dismantling if there’s enough demand for it, though…

  4. Seth Jones says:

    Very nice, I may use this if I find a good Synthesis System. I think this by itself is great, because it leaves it open to other options without restricting developers – wise choice.

  5. Pingback: What features/options do you look for in an item crafting system? « Bubble Blog

  6. Pingback: News falsh 06 « Blog of Chaos17

  7. estriole says:

    @Seth Jones. just use mr bubble crafting system lol. you can even event it so certain npc only craft potions or weapon just give the recipebook item before the scene and remove it after that (item removal must be in different page. so selfswitch a on, in those new page remove the item + selfswitch a off). and even make it craft based people craftskill just add condition when actor have “potion making lv 1” skill give him potion lv1 recipe book before the scene.

    so many possibilities. indeed ultimate script because it’s simplicity concept.

  8. kast says:

    Hey Mr. Bubble, I really loved ur craft and dismantle systems, but when I’ve tried to use both in the same project, an error occurred:

    Script ‘Game_Interpreter’ line 1414: NameError occurred.

    undefined local variable or method ‘call_tocrafting_scene’ for #

    If u can help me, I’ll be very very grateful.

  9. Mr. Bubble says:

    kast, I’ve tested them both, they should work together. Make sure you’re using the latest version of the crafting system script. It should be 1.7 to use that script call.

    You must also not load from a saved game if you edited anything in the script editor.

    Otherwise, it’s something you’re doing wrong, not the scripts.

  10. kast says:

    Oh… yes! The problem is with the script call. Sorry for my lack of attention.
    Thanks for help.

  11. rofl1337 says:

    Suggestion:
    Include the option to never mask items, that have a 100% chance to be produced upon dismanteling.

  12. Hi, I have found a bug with the script.

    Whenever I set my sound effect of choice for dismantling (through the script itself), the game crashes whenever I’m about to hear it. Basically, this script only works with sound effects that are already packaged with RPG Maker VX Ace. It doesn’t work with other SE you import.

    Is there a way to fix that? Thank you so very much.

  13. Mr. Bubble says:

    Hm, I’ll check it out.

  14. Ray says:

    Very great script! I’m certainly using it in my project.
    btw, just a simple request.
    Like the crafting system you developed, it would be nice if certain designable restrictions could be made on the items dismantlable, like requiring certain tools present in the inventory… etc

  15. Pingback: Dismantle items « Ressources Rpg maker

  16. Polidoro says:

    Very nice script. Very, very, very nice script…
    Anyone know how to make conditional branches based on the Dismantle Count? Say, lower prices once you reach x amount of dismantles or even something more technical such as better items received from a dismantlement?

  17. hytporsche says:

    Excellent script! Works beautifully with no problems. But, I was wonder if their was anyway to have it show “Kread-EX Item charges” when in your dismantle items scene?

    For example; Instead of “Burning Flames : 1”
    It would be this: -> “Burning Flames x4 : 1”

  18. Say41Plz says:

    It’s not working for me, don’t really know why.
    The dismantle window opens, but there are no items shown in any list, even
    the ones with the dismantle tags.
    What could be problem?

  19. Moo says:

    Would you be interested in making this compatable with Fomar0153’s Individual Equipment? I know I’ve seen some scripts doing patches for it.

  20. Is there a way to link the Dismantle menu scene as a custom command to the in-game menu? something such as :command_dismantle

    Sorry, I’m not very good at RGSS3
    Thank you for your help.

Leave a Reply here. (Due to a recent increase in comment spam bots, new comments will be moderated unless you have at least one approved comment in the past.)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s