Item fragments script

I know. I made a scripts hours ago. Yet here I am with a new thing.


Item Fragments script | Molegato functions script page

This simple small script brings a big new feature to your games: Items that are fragments of other items.

You liked the heart pieces from Zelda? Well it looks kind of similar. The specs are:

  • You can set any item, weapon or armor to be a fragment of other item, weapon or armor
  • Items can be fragments of weapons or armors, and vice versa, you’re not limited to items result in items or anything like that.
  • You can set the amount of fragment items needed for an union, and the amount of result items.
    For example, 10 potions could result in 2 great potions.
  • You can set the union to occur inmediatly, or to not happen till you call the union function via event script call.
  • You can set the union to show a message telling you the union was performed or not, both when automaticly happening and when forcing to unite via script call.
  • You can set the message to show to any text you want. You can add as many fields as you want of these kinds:
    • Arbitrary strings (Just add a string between quotes)
    • Names and icons of the fragment and result items:
      • 0 for fragment item name (icon + name)
      • 1 for amount of fragments used
      • 2 for result item name (icon + name)
      • 3 for amount of result items obtained
      • 4 for just the fragment item icon
      • 5 for just the result item icon
      • 6 for the fragment item name (without icon)
      • 7 for the result item name (without icon)
  • You can set two different message configurations (one for when only a single unit of result is obtained, and other when there’re more than one)
  • You can set the window position for the messages
  • You can set the message background (window, black background or nothing)
  • You can set a sound to automatically play when an union was performed.

And that’s pretty much it. Instructions pasted from the script cause it’s 4:00 am here and I’m sleepy:

# Author Molegato
# Version 1.1
# A number of items joins automatically into a different one
#   You have to put this tag on the FRAGMENT item.
# <fragment_of: result_id,result_kind,fragments_amount,result_amount,auto_join,auto_tell>
#   result_kind should be 0 for items, 1 for weapons and 2 for protectors
#   if auto_join is 1, the fragments will unite in the result as soon as you
#   get them. Else they wont unite until you call the unite function.
#   if auto_tell is 1, a message will show up telling that the items united
#   If you have fragment items with no auto_join, you can join them via event
#   script call using this
# ITEM_FRAGMENTS.unite(fragment_id,max_number,tell)
#   max number is the maximum amount of unions in the process.
#   You can skip the tell parameter, wich defaults at false

WARNING: you need molegato’s functions script to make it work.


EDIT: updated to V1.1 version


7 thoughts on “Item fragments script

  1. […] shows two interesting scripts: Item Fragments and Side/Top […]

  2. I like it and it seems to work just two little issues:

    When using auto_tell it displays the message before the current event finishes, which resulted in the message that I had received the heart piece after I got the message for them becoming the heart. This of course can be overcome by not using the auto join.
    And when there is only 1 created having the “x 1” is awkward.

    Also I personally would have liked a way to reorder the message for example I would have it say “The 4 Heart Piece(s) become 2 Heart(s)!”

    Maybe a custom string that you can enter for the message would work combined with the call script instead of the auto message.

    • molegato says:

      Well, for the first issue, showing the ‘you get a heart piece’ before actually gaining the item might be the fix.
      And yes, I kind of want to tidy up the message, to rearrange it however you want and be able to show item icons. I’ll be on it tomorrow, since today I have to study for an exam T.T

      • Yeah you should definitely prioritize the studying.

        You built in ways to allow the user to get around the underlying problems, so don’t lose any sleep over it. The basic function of the script works and it works well, I will use it whether you fix the minor issues or not.

  3. Very nice changes. Hopefully I will have time to test it soon.

  4. […] made this really nifty Items Fragments script.  I liked this a lot and combined with my Item Selection Menu it makes me want to make an […]

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s