Maliki's Mutable Items MZ ver 1.5

● ARCHIVED · READ-ONLY
Started by Maliki79 14 posts View original ↗
  1. Maliki's Mutable Items MZ
    (Works with MV as well)​

    ver 1.5

    Introduction:

    Allows you to have items in your inventory automatically change to other items after a set amount of player steps

    Features
    Upon receiving an item, a countdown will begin for it.
    Once the countdown reaches 0, the item will be consumed and a new item may be given.

    Devs can set which item is received.

    Can give a chance to receive a selection of different items or nothing at all.

    JavaScript evals have been added which are called upon success or failure to change original item.

    New Features: As of ver 1.4, steps have been upgraded to "step-points". This is because a step can now reduce the step counter by more than 1 at a time.
    (Default step-point amount can now be set in plugin parameters.)

    Also added a step-point eval. On each player step, an eval can run to determine how many step-points are taken from each item specifically.
    The number can be raised to make the change happen sooner or reduced as low as 0 to stop progress entirely!

    Lastly, fixed a bug that broke this plugin upon loading a save.
    Whoops! :blush:


    Howto: Install this plugin and activate it.

    (Detailed instructions can be found in the Help section.)

    Plugin Conflicts: There shouldn't be any conflicts with this plugin, however let me know if any are found and I'll try to correct them.


    Permissions: This plugin can be used in any project, commercial or otherwise, as long as credit is given.


    Download: LINK
  2. Hey Maliki, I can't believe you actually did it. Thanks a bunch. The plugin is working wonderfully!!!
  3. That's part of why I put the success and failure evals in there!

    So, for a sound, try this:
    JavaScript:
    <newItemSuccessEval: var sound = {
          name:   "Darkness2",
          volume: 100,
          pitch:  100,
          pan:    0
        };
        AudioManager.playSe(sound); >>>
    (You can change Darkness2 for any file in your SE folder.)

    Upon a successful item change, the sound there should play.

    For a message, try:

    JavaScript:
    <newItemSuccessEval: var message ="Your " + oldItem.name + " has became a " + newItem.name + "!";
    $gameMessage.add(message); >>>

    And you can switch things up if the item change fails.
    The only issue is that you'd have to do this for each mutatable item.
    However, this should make for a lot of customization in your project!
    Let me know how it works for you.
  4. while it plugin has MZ in it, and can work in MV as well, do you need to own MZ,
    or one of those MZ or MV? because I dont own MZ, but nice job on this :)
  5. Nope. If you intend to use this in MV, go right ahead.
  6. Hello! First of all, thank you for your plugin! I'd like to know, if it was possible to make it work with Ramza's Independent Items plugin? I'm trying to emulate an insect's lifecycle with your mutation plugin, and it works beautifully! Except, that even though I've set the insect items (egg -> nymph -> adult -> dead) to be independent, ALL instances of any of these mutate into the next stage at the same time, regardless of if any of them are newer and therefore shouldn't mutate quite yet.

    If you need any more information or screenshots on my end I'd be happy to provide. Thank you!
  7. HI @melmano
    From my cursory look, it seems that my plugin may not be able to play well with independent items.
    Try making the items NOT independent and see if the timing works. If that fixes it, then I'll have to see how I can code around the independent items.
  8. Hello!
    So, WITHOUT independent items, sometimes it works, sometimes it doesn't... I'm sorry I assumed before even testing that I'd need independent items for my idea to work. I've prepared screenshots to try to show you what happens in my tests.

    My plugin list to show you IndependentItems is disabled, then the items in question to show you how I've set them up. SkipStep is set to 0 and I'm progressing the step count manually with the $gameParty.muteStepCountdown() command.
    Setup
    plugins.jpg
    eggs.jpgnymph.jpgfemale.jpgmale.jpgdead.jpg

    Test #1
    "Day" 1 : Bought 10 nymphs.
    day_a1.jpg

    "Day" 2: Bought 10 more nymphs. Total 20 nymphs. "Tomorrow", 10 should mutate, 10 shouldn't.
    day_a2.jpg

    "Day" 3:... Except they all mutated at the same time.
    day_a3.jpg

    Test #2
    "Day" 1: Bought 1 female adult.
    day_c1.jpg

    "Day" 2: Bought 1 more female adult.
    day_c2.jpg

    "Day" 3: Bought yet another female adult. Total is 3 females and they should start dying one per day since they're all staggered by one day.
    day_c3.jpg

    "Day" 4 and onwards : And that's exactly what happens.
    day_c4.jpgday_c5.jpgday_c6.jpg

    Test #3
    "Day" 1 : I bought 5 eggs, 5 nymphs, 5 males and 5 females. I expect the following behavior :
    Day 2 : 10 nymphs, 5 males, 5 females; Day 3 : 5 nymphs, a total of 15 mixed adults; Day 4 : 0 nymphs, 10 mixed adults, 10 dead crickets.
    This is what happens instead ; all the adults die at the same time instead of being staggered.
    day_b1.jpg
    day_b2.jpg
    day_b3.jpg
    day_b4.jpg

    The way I'm understanding this, it seems that as soon as more than one item shares the same "timer" / step-count, all similar items mutate at the same time regardless of step-count. Does that make sense? Like, it looks like Test #2 worked perfectly because all the "Cricket, female" items had different step-counts, whereas Tests #1 and #3 failed because multiple items shared the same step-count. Maybe I'm wrong! But I'd appreciate if you could look into this for me? :)

    Sidenote: I discovered this plugin, PH - Warehouse/Storage Ported to MZ . Do you think it would be too much to ask / even possible to make it so items stored with this plugin could get updated step-counts as well?

    Thank you very much for your time and for your plugin!!!
  9. Ok. One more test before I have to delve deeper: Can you try it without the warehouse plugin on?
  10. This is a fantastic plugin!

    I've been testing this in MV and I have been able to gather multiple quantities of the same item and the plugin is still able to mutate them all individually based on when I gathered the items.

    So, for example, I picked up ItemA (which mutates after 10 steps into ItemB, then took 3 steps, and picked up another ItemA, took another 3 steps, picked up yet another ItemA, and by the 10th step, only the first ItemA had mutated into ItemB, but I still had 2 of ItemA.

    Absolutely brilliant that this works so well!!

    For the record, I am using Yanfly's suite of plugins including Item Core, and I'm also using Theo's Limited Inventory plugin, and so far I haven't run into any issues.

    The only question I have is I'm still a little unclear how to use the "skipStep Param". I have a simple time system in my game (just common events using simple eventing that counts frames using variables - quite basic; nothing fancy) but I'm not sure how to use my time system rather than counting steps.
  11. Hi there.

    Firstly, thank you for the kind words in regards to this plugin. I'm glad you are enjoying it and finding it useful for your project.

    As for the skipStep param, turning it to a number other than 1 will turn off the automatic counting when the player takes a step.

    To count steps at with skipStep, you have to make the script call $gameParty.muteStepCountdown() where appropriate. I don't know how your time system works, but whatever ticks you use in it can have the script call dropped in to simulate the count.

    So, if your game counted hours, you could have the call made on every say 6th hour. You set up that system, so you should know when the counts change.
  12. Maliki79 said:
    Hi there.

    Firstly, thank you for the kind words in regards to this plugin. I'm glad you are enjoying it and finding it useful for your project.

    As for the skipStep param, turning it to a number other than 1 will turn off the automatic counting when the player takes a step.

    To count steps at with skipStep, you have to make the script call $gameParty.muteStepCountdown() where appropriate. I don't know how your time system works, but whatever ticks you use in it can have the script call dropped in to simulate the count.

    So, if your game counted hours, you could have the call made on every say 6th hour. You set up that system, so you should know when the counts change.

    That worked brilliantly!

    I just went into my common event that keeps track of minutes / hours and added the code to when the hour changes, then changed the code for the specfic item to mutate after 12 hours and all the individual items mutated 12 hours after picking them up.

    If I could buy you a beer I totally would. Thank you for this plugin!
  13. Happy to help.
    I'll toss back a shot in your honor when I'm done with work.
  14. Thank you! I looked for something like this for food spoiling!