Friendship Conditional branch dilemma

Hi! So I'm playing around with variables and using them as a character likes you or not. For example, let's have a variable for John called "John♥" and another for "Mary Jane" called "Mary♥".


Each time player has a choice option the variable subtracts -1 or adds 1 if you answer friendly or not. Simple so far, right?


I then flip a self switch and create a new page using that self switch as a page condition, after the player answers the question on the first page to change the variables for John&Mary" and use another variable "Story progress"  to hide all the other John&Mary's" on the map as the story progresses.


The new page has random conversation BUT it's different for each person on that one page. If you're mean in general you'll get mean responses back.


So, I've set up the self page with branches like this:
​


Variable set Random 1-3:
​


IF John♥" = is less  than or equal to "0 " then
​


here are the mean messages with another branch using IF variable is equal to 1,2 or 3
​


 
​


ELSE
​


IF "John♥" = is greater than or equal to "5" then 
​


here are the nice messages with another branch using IF variable is equal to 1,2 or 3
​


 
​


 
​


ELSE
​


IF "John♥" = is less than or equal to "4" then 
​


here are the average messages messages with another branch using IF variable is equal to 1,2 or 3
​


 
​






While that's all great an all upon testing the game John doesn't even answer unless you are first under or equal to 0, it is only then he recognizes if his variable is equal to 5 or more, etc


I was hoping that with the ELSE that has greater than or equal to 5 that if it's not 0 then it moves to that branch and so on. But it doesn't. In the testing I am using the f9 function to change the respective variables numbers to see how it works and if it works. I didn't think you had to leave the area to make an effect but now I'm not even sure.


This really puts a block in front of me. I also have 7 heroes and sometimes have the self switch page with an extra branch to recognize if that hero is in the party so I can use the \N[0] message action. But I can't use 35 pages.


For now, I'm using those 7 copy pages with hero in party conditions to all jump to the one page with the self switch. 


How do I create branches that can recognize the 3 responses: mean, average and nice that works and not have to add on individual branches and just stick with greater or less thans?


I figure it is the conditional branch being picky as to what order it's in or something. I've spent 30 minutes to no avail and now I'm just tired & frustrated. I really wanted some variety with messages and I'm willing to go the extra mile to do this. But that kinda stops if it's not working properly as I thought it would....


Thanks in advance!


Regards,


Evmaster
Can all 7 heroes be in the party during the same playthrough?  Also could you post a screenshot of your event?
Logically, what you posted should work. Somehow on the way it is off. See, if you did:


If <= 0 else, the part in the if will be called if the variable is <= 0, if not, go to the else code.


Then, if >= 5 else, the part under the if will be called if the variable is >= 5, if not, go to the else code (which means at this point you are between 0 - 5)


There is no need for the last if/else, as you can only be between 0 - 4 if you get to this point anyways.


You may need to copy and paste your code you have so far, because, logically, it works (except for a redundant last step), so something somewhere else is throwing it off.
Logically, what you posted should work. Somehow on the way it is off. See, if you did:


If <= 0 else, the part in the if will be called if the variable is <= 0, if not, go to the else code.


Then, if >= 5 else, the part under the if will be called if the variable is >= 5, if not, go to the else code (which means at this point you are between 0 - 5)


There is no need for the last if/else, as you can only be between 0 - 4 if you get to this point anyways.


You may need to copy and paste your code you have so far, because, logically, it works (except for a redundant last step), so something somewhere else is throwing it off.



Just to make clear, as previously said, I am using the greater than or equal to sign. I'll take a moment to get a screen shot or something soon.


Thanks everyone.

Can all 7 heroes be in the party during the same playthrough?  Also could you post a screenshot of your event?



Specifically, you only play as one hero. I've made it where 2 are your choices of male and female, the others are custom made. 


Edit: Here is a example pic. I took screenshots and put this together real quick with Photoshop.


Edit: This is a copy of the event so the extra pages aren't there but the eventing inside is and should be the same IIRC, I was having trouble with both pages, self switch and this one. If needed, I'll go get pics of the self switch A page.


John variable.png
Just to make clear, as previously said, I am using the greater than or equal to sign. I'll take a moment to get a screen shot or something soon.


Thanks everyone.


Specifically, you only play as one hero. I've made it where 2 are your choices of male and female, the others are custom made. 

Couldn't you just use the change actor image and change class commands so you only have to deal with 1 actor then?
Unfortunately, those images are too small to be readable. We'll need them as 5 separate images to have a shot at being able to see what is going on.
Couldn't you just use the change actor image and change class commands so you only have to deal with 1 actor then?


But I wanted pages for male and female, messages that say "he" replaced with "she" and vice versa, and the custom ones I want to stay no matter what, they have separate battle moves, etc. Just having one ruins the whole purpose of what I've started, I wanted more variety. I'll be doing a lot of copying and pasting especially for messages that need  


\N[0] changed.
Unfortunately, those images are too small to be readable. We'll need them as 5 separate images to have a shot at being able to see what is going on.



You can open them up in a new tab and read them. Lemme know if you still have trouble. Thanks. =)
Ok, first of all, you didn't use the else at all. What you did was


If <= 0, else nothing


If >= 4 else nothing


If == 0, else nothing


If <= 3 else nothing (and why do you have this one still? That is going to overlap many of your other conditions!)


So this means if you had the variable at say -2 it should run both the <= 0 and the <= 3 condition. Also the == 0 is going to run at the same time as the <= 0 condition.


What you need to do is to have the If <= 0 condition, but inside the else for that very if statement, put the >= 4 check and code (maybe then test this much? It would do nothing if between 1 - 3 but could test those two at least). Then inside the else for that if, put the rest. That should check all conditions. As it is, you are not using the else part of the code (see end of picture one in your screenshot how it says else, then picture 2 starts with end? That means you left the else blank).


Though, another way you could do this is three event pages. One is blank (for the <= 0), page 2 is set to John >= 1, and page 3 is set to John >= 4. This way page 2 will only run if John is between 1 - 3, and page 3 will run if 4 or higher. Though that would have a disadvantage that you would have to do it again for each self switch, and events can only have 20 pages in MV.
Wow, this is what happens when I'm tired and trying to make something work. xD Really thought I had those in the "Else" branch, I probably did earlier, and did moved them to see if I could get it working another way. Derp. (In my state of confusion)


So you are saying for 1-3 I should make a branch for 1,2 and 3? (I had that one still because I didn't remove it yet, as previously said I hastily threw this together in Photoshop)


Alright, I'll try it out and get back to it I guess. Thanks everyone so far. =)


Edit: How am I going to get 1, 2 and 3 with 


If <= 0, else nothing


If >= 4 else nothing


If == 0, else nothing


What branch do you recommend to handle this?
If <4


    if >=1


You could still have pages for male and female, just have a switch turned on when a player chooses one gender off for the other, then you would only need nested conditionals.  i.e. if john<3 >=4


                                                                       if female(or male) is on

Original thread: https://forums.rpgmakerweb.com/threads/friendship-conditional-branch-dilemma.60612/