- Apr 29, 2017
- 23
- 18
In math you have operators for things like addition(+), subtraction(-). A boolean operator is for things involving logic. A variable could be true or false for example, and think of true as being on, and false as being off.
If variable X is is true and variable Y is true, do this action.
Else if Variable is X is true and Variable Y is not true, do this action.
In this example, X could be the points on the corruption, so the more points in corruption, the different dialogue options that's are chosen, with increasing
IF X < 20 do BJ_Dialouge_1
ELSE IF X >= 20 AND X < 40 do BJ_Dialouge_2
ELSE IF X >= 40 AND X < 60 do BJ_Dialouge_3
ELSE IF X >= 60 AND X < 80 do BJ_Dialouge_4
ELSE IF X >= 80 AND X < 100 do BJ_Dialouge_5
ELSE IF X = 100 do BJ_Dialouge_6
From there, there can be additional operations for the logic like AND, OR, and XOR. For example there could be a flag, that the condition could also check. For example, in your mod, there are different dialogue options for the slave flag, so there would be something like
ELSE IF X = 100 do BJ_Dialouge_1
IF X = 100 AND Slavery = True/On/1 do Slave_BJ_Dialouge_1
So really in the context of RPGmaker, flags are variable that can be set to on or off, which essentially means true and false. To break it down, boolean variable can be true or false, so you use boolean operations to check what actions should be taken based on the condition of the flag
If variable X is is true and variable Y is true, do this action.
Else if Variable is X is true and Variable Y is not true, do this action.
In this example, X could be the points on the corruption, so the more points in corruption, the different dialogue options that's are chosen, with increasing
IF X < 20 do BJ_Dialouge_1
ELSE IF X >= 20 AND X < 40 do BJ_Dialouge_2
ELSE IF X >= 40 AND X < 60 do BJ_Dialouge_3
ELSE IF X >= 60 AND X < 80 do BJ_Dialouge_4
ELSE IF X >= 80 AND X < 100 do BJ_Dialouge_5
ELSE IF X = 100 do BJ_Dialouge_6
From there, there can be additional operations for the logic like AND, OR, and XOR. For example there could be a flag, that the condition could also check. For example, in your mod, there are different dialogue options for the slave flag, so there would be something like
ELSE IF X = 100 do BJ_Dialouge_1
IF X = 100 AND Slavery = True/On/1 do Slave_BJ_Dialouge_1
So really in the context of RPGmaker, flags are variable that can be set to on or off, which essentially means true and false. To break it down, boolean variable can be true or false, so you use boolean operations to check what actions should be taken based on the condition of the flag