What is the easiest way to use Conditional branches with Select Item and Random Conversations

Discussion in 'RPG Maker MV' started by evmaster, May 14, 2018.

  1. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    I apologize for the long title. I wanted to be clear in what I am asking so I hope it is not minded.

    Anyway, I wish to create a more complex event that can say lots of different things and that changes depending on how he/she likes you and you can give items to increase or decrease the relationship. Yes, I'm that insane to want to do all of this without a script.

    So, I like to start with that I know how to do do the random conversation with variables, do the select Item and friendship like/dislike thing with variables. My problem is how I am setting it up.

    Currently, my test event is almost set up with how I want him. However, when the NPClove value reaches over 11 and you give him an item, he will say something for the item followed by a random message for when he really likes you. I don't want that, I do not want two messages at the same time when you give him an item. He should say something for when you give him an item but stop there.

    I have attached screenshots and am tryingto provide as much detail and info as I can, so if you don't understand something please let me know. I may have forgotten to write something.

    My questions are

    1. Is there a better way to even this without scripts?

    2. Is there no way to avoid the Else branches that will eventually slide off screen?

    3. Can this all be done in one event page?

    Extra: Eventually, I want to add more 10 random conversations for each likeness value. So anything below negative 1, he say this etc Anything between 11-20, he say this, 21 to 30 he says this, etc and so on

    Edit1: Changed "besides" to "without"




     

    Attached Files:

    • 8.png
      8.png
      File size:
      104.4 KB
      Views:
      10
    • 7.png
      7.png
      File size:
      114 KB
      Views:
      10
    • 6.png
      6.png
      File size:
      108.4 KB
      Views:
      10
    • 5.png
      5.png
      File size:
      92.7 KB
      Views:
      10
    • 4.png
      4.png
      File size:
      111.9 KB
      Views:
      10
    • 3.png
      3.png
      File size:
      119.6 KB
      Views:
      10
    • 2.png
      2.png
      File size:
      117.4 KB
      Views:
      10
    • 1.png
      1.png
      File size:
      145.8 KB
      Views:
      10
    #1
  2. OmnislashXX

    OmnislashXX Veteran Veteran

    Messages:
    591
    Likes Received:
    3,629
    Location:
    Maryland
    First Language:
    English
    Primarily Uses:
    RMMV
    Sure.Use Switches. Or an item. There are many conditions that you can use.
     
    #2
  3. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    305
    Likes Received:
    576
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    You could get rid of a good number of "else" conditions where you check the item or the random message, making the whole thing a little easier to read. Just put your ifs checks in sequence without the elses (of course be careful to keep the usefull elses).
    Sure it's not clean programming and it will check all the other "if" conditions, but within the RMMV editor that's the best you can come up with (it won't make much of a difference when running the event anyway).
     
    #3
  4. Andar

    Andar Veteran Veteran

    Messages:
    28,131
    Likes Received:
    6,372
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    1) if you check for "equal", you don't need else-branches at all and can put the conditional branches directly under each other. If you don't check for equal but for greater/smaller, then you can skip the elses only if you ordered the numbers correctly.
    2) you can abort any branch of a long sequence by either "go to label" or "exit event processing".
    The label is used if you want to do something else before the event ends, the exit to skip all remaining processing to the end.
     
    #4
    evmaster likes this.
  5. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    Since -1 negative and less than 10 are both below 10, is there a way to have 10 different messages for both of those? I wanted 10 messages for IF NPClove between 1-10 and then I want 10 completely different messages for below IF NpClove is below -1.

    From my understanding, checking for "equal" with no "else" would mean a separate IF branch for the NPClove variable for 1, 2, 3, 4 etc with no else stacked underneath. Is that correct? Please correct me if I am wrong.

    Also thank you!
     
    #5
  6. Andar

    Andar Veteran Veteran

    Messages:
    28,131
    Likes Received:
    6,372
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    there are several ways to do this depending on what exactly the number structure is.
    one way is one branch for every number, especially if every number has a different message.
    if you want to contain several numbers per branch, you can work with comparisons, but then you'll either need an abort to prevent following branches (basically add a "go to label end" inside each branch as the last command of that branch, and then place the label after the last branch. Or you'll have to order the numbers checked in a way that all following branches are automatically false.
     
    #6
    evmaster likes this.
  7. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    Could you please provide an example of this? The "Or you'll have to order the numbers checked in a way that all following branches are automatically false." This sounds like what I rather do. But I'm not sure. If I can avoid it, I rather not have a branch for every number by itself.

    Just for these several numbers: 10 messages for the IF below negative 1(and for everything below negative the same 10 messages), 10 different messages for between 1-10, 10 different messages for between 11-20, 10 different messages for between 21 to 30 and so on. (I haven't decided if I would stop at 41-50 or 91-100)

    So how would this be ordered? I actually do not know what "label" is so I am going to read up on it right now.

    Edit 5-1-14-18: I just looked and read the RPG MV help to contents page and looked at Label. But I do not understand what to specially type into "Label"
     
    #7
  8. DarkHyudrA

    DarkHyudrA Actually I'm Enzonaki Veteran

    Messages:
    41
    Likes Received:
    20
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Just a name, a label is what it is: a label.
    You name a specific point of the event, so you can jump there from anywhere(while still on the same page of an event ofc).
     
    #8
    evmaster likes this.
  9. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    I think that makes sense. So that would mean whatever you name the label would have to be consistent throughout the page for it to work? And if the Label name matches it will jump to that Label, correct?
     
    #9
  10. Andar

    Andar Veteran Veteran

    Messages:
    28,131
    Likes Received:
    6,372
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    yes - each name can only be used once as a label, but dozens of goto label commands can jump there from within the same event page.
    and sorry, not fit enough at the moment to provide a number example.
     
    #10
    evmaster likes this.
  11. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    I love Exit Event Processing! It does what I want done for the event!

    While I think I am beginning to understand Labels, what I don't understand is how they will help me here better than Exit Event Processing?

    I think I can make this work with Exit Event Processing with the branches starting from the greatest number to the least. (Basically reverse)
    But I have this feeling that may not be such a great idea or is that alright if I want to do it this way?
     
    #11
  12. Andar

    Andar Veteran Veteran

    Messages:
    28,131
    Likes Received:
    6,372
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    exit event processing always goes to the end of the event page.
    with labels you can select a different point on the event page to go to and proceed with commands from there.
     
    #12
    evmaster likes this.
  13. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    Okay, so Exit Event processing ends the event basically? If so, I think this is resolved now as I can just use that to stop extra messages with conditional branches. Thank you so much!

    I have learned two new things today, thank you!
     
    #13
  14. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,505
    Likes Received:
    950
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Yes, 'Exit Event Processing' will abort the event early. If it uses that command, nothing after it will process.

    Labels can jump to anywhere in that event page after or before where it is used.

    A common use case is a dialogue tree, common in series such as Elder Scrolls and Mass Effect, maybe something like this:

    2018-05-14 18_16_30-ID_004 - Event Editor.png

    Labels can be very useful if you stay organized, but if your events get messy then they are very hard to understand what might have gone wrong.
     
    #14
    Nikitaw99 and evmaster like this.
  15. evmaster

    evmaster Think Outside the Box Veteran

    Messages:
    433
    Likes Received:
    706
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you Aloe for the visual example! I appreciate it! =)
     
    #15

Share This Page