Can items have dual purposes?

Discussion in 'RPG Maker MV' started by Jimminybob, Apr 21, 2017.

  1. Jimminybob

    Jimminybob Villager Member

    Messages:
    24
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi all,

    I've just started tinkering around with RPG Maker MV and have been coming up with a list of status effects and curative items. Two of the status effects i've created revolve around decreased/increased agility. I've created an item that will cure the negative state of decreased agility, but I was wondering is there was any way to have the same item cure and invoke effects based on the character's current status?

    So in this example, say a character has decreased agility. I use the item to cure this negative effect and bring them back up to normal. If I then use this item again on the same character, it adds the positive effect of increased agility. I don't want to go straight from a decreased to an increased effect through a single use of the item.

    It was just an idea I had, and not sure if it can be done, but if anyone could help me out on this that would be great!
     
    #1
  2. Andar

    Andar Veteran Veteran

    Messages:
    28,131
    Likes Received:
    6,372
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    yes and no - you can have the item call a common event, and use conditional branches in the common event to decide what to do.
    However, in battlescreen common events are executed at end of turn, so it would not work exactly like a normal item and it will require some tricks for targeting the effect.
     
    #2
  3. Another Fen

    Another Fen Veteran Veteran

    Messages:
    519
    Likes Received:
    234
    First Language:
    German
    Hi,

    In this particular case you could also work around the problem a bit:
    If you make your battler immune to the positive state while they are affected by the negative state (state resist trait), your item can simply add the positive state first and then remove the negative state to achieve the effect you want.
     
    #3
    Jimminybob likes this.
  4. Jimminybob

    Jimminybob Villager Member

    Messages:
    24
    Likes Received:
    7
    First Language:
    English
    Primarily Uses:
    RMMV
    That's a very interesting way around it, will definitely give it a go. Thanks!
     
    #4
  5. Zarsla

    Zarsla Veteran Veteran

    Messages:
    680
    Likes Received:
    195
    First Language:
    English
    If you use YEP_SkillCore, you can get what you ask easily.
    Lets say state 28 is the negative state & state 29 is the positive state. Now place this in the item notetag.
    <After Eval>
    if (b.isStateAffected(28)){
    b.removeState(28);
    }
    else{
    b.addState(29);
    }
    </After Eval>
     
    #5

Share This Page