Help with setting up a conditional branch

hiya Zia, thanks for all your help yesterday...I was wondering if you might be able to set up how you were talking about doing the conditional branches with the elses? only if and when you have time. I just need a screenshot of how you do it, I farted around with it for a few hours and im having no luck, the way i did it it only equips the first one on the list and it doesnt equip anything else. here is what i have going on. like i said no rush only if you have some spare time. View attachment 326499
Thanks mate, I understand you, I do have all the sprite images with different combinations, but my problem is I am not sure how to set up the conditional branch for more than one item, i tried to set it up with the sword or the armor just for testing but it was only changing the weapon and not the armor. i do not think im setting up the branches right, i did the sword by itsself and it works fine. but when i run another branch for the armor it should switch to the armor sprite, but its not. i even unequipped the sword and just equipped the armor and it didnt change to the armor sprite.
Thanks mate, I understand you, I do have all the sprite images with different combinations, but my problem is I am not sure how to set up the conditional branch for more than one item, i tried to set it up with the sword or the armor just for testing but it was only changing the weapon and not the armor. i do not think im setting up the branches right, i did the sword by itsself and it works fine. but when i run another branch for the armor it should switch to the armor sprite, but its not.
You will need to nest each successive branch inside an else for the previous one, otherwise they'll overwrite each other.
What you want to do won't work with this approach; you can only check one equipment type at a time, and each of your character images contains only a single matching item. In order to do it with this method, you'd have to cross-reference every possible combination of armour and weapons, and have a conditional branch (and walking graphic) for every single configuration. This also means that every new piece of equipment you add will exponentially increase the number of checks you need.

For example, if you have only a single sword and piece of armour, you will need to check:

1. Nothing equipped
2. Just the sword
3. Just the armour
4. The sword and armour together

Add an additional sword, and you need:

1. Nothing equipped
2. Just the first sword
3. Just the second sword
4. Just the armour
5. Armour with first sword
6. Armour with second sword

Add an additional armour:

1. Nothing equipped
2. Just the first sword
3. Just the second sword
4. Just the first armour
5. Just the second armour
6. Armour 1 with sword 1
7. Armour 1 with sword 2
8. Armour 2 with sword 1
9. Armour 2 with sword 2

And so on, and so forth...
Thanks mate, I am understanding you, I do have all the sprite images for the different comboinations. my problem is I dont think im setting up the branches right. It only equips the first thing on the list. I even unequipped the sword then equipped the leather armor and it does not change to the armor sprite, it only works with the first branch the sword.
Thanks mate, I am understanding you, I do have all the sprite images for the different comboinations. my problem is I dont think im setting up the branches right. It only equips the first thing on the list. I even unequipped the sword then equipped the leather armor and it does not change to the armor sprite, it only works with the first branch the sword.
Show me what you have currently.
To cover all combinations, you'll have to combine If Conditions.

By setting them up like this, you can check multiple conditions to be true, before changing the image of your charset. Be careful to keep track which ELSE belongs to which IF.

Spoiler
Code:
◆If:Reid has equipped Short Sword
  ◆If:Reid has equipped Leather Armor
    ◆Comment:Change Image to Sword+Leather Armor
    ◆
  :Else
    ◆If:Reid has equipped Iron Armor
      ◆Comment:Change Image to Sword+Iron Armor
      ◆
    :Else
      ◆Comment:Change Image to Sword only
      ◆
    :End
    ◆
  :End
  ◆
:Else
  ◆If:Reid has equipped Hand Axe
    ◆If:Reid has equipped Leather Armor
      ◆Comment:Change Image to Axe+Leather Armor
      ◆
    :Else
      ◆If:Reid has equipped Iron Armor
        ◆Comment:Change Image to Axe+Iron Armor
        ◆
      :Else
        ◆Comment:Change Image to Axe only
        ◆
      :End
      ◆
    :End
    ◆
  :Else
    ◆If:Reid has equipped Leather Armor
      ◆Comment:Change Image to Leather Armor
      ◆
    :Else
      ◆If:Reid has equipped Iron Armor
        ◆Comment:Change Image to Iron Armor
        ◆
      :Else
        ◆Comment:Change Image to nothing
        ◆
      :End
      ◆
    :End
    ◆
  :End
  ◆
:End

PS:
What might be easier for you to follow is a line of Script in your conditional branch to specify the equipment.
You can do that on page 4 of your conditional branch window.

Maybe someone can correct me, but it should be something like this:
$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[3])
This line will check, if actor 1 has weaponID 0001 and armorID 0003 equipped.

Change the numbers in the [ ] to define the weapons and armors, and nest as many conditional branches as you need to cover all your combinations.

Code:
◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[3])
  ◆Comment:Change Image to Weapon1+Armor3
  ◆
:Else
  ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[4])
    ◆Comment:Change Image to Weapon1+Armor4
    ◆
  :Else
    ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[5])
      ◆Comment:Change Image to Weapon1+Armor5
      ◆
    :Else
      ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[2]) && $gameActors.actor(1).isEquipped($dataArmors[3])
        ◆Comment:Change Image to Weapon2+Armor3
        ◆
      :Else
        ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[2]) && $gameActors.actor(1).isEquipped($dataArmors[4])
          ◆Comment:Change Image to Weapon2+Armor4
          ◆
        :Else
          ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[2]) && $gameActors.actor(1).isEquipped($dataArmors[5])
            ◆Comment:Change Image to Weapon2+Armor5
            ◆
          :Else
            ◆Comment:Change Image to nothing
            ◆
          :End
          ◆
        :End
        ◆
      :End
      ◆
    :End
    ◆
  :End
  ◆
:End
Show me what you have currently.
1734819934664.png
Is there a reason you're doing all this instead of using a character creator plugin? MPP CharacterMake or SRD Character Creator are free
To cover all combinations, you'll have to combine If Conditions.

By setting them up like this, you can check multiple conditions to be true, before changing the image of your charset. Be careful to keep track which ELSE belongs to which IF.

Spoiler
Code:
◆If:Reid has equipped Short Sword
  ◆If:Reid has equipped Leather Armor
    ◆Comment:Change Image to Sword+Leather Armor
    ◆
  :Else
    ◆If:Reid has equipped Iron Armor
      ◆Comment:Change Image to Sword+Iron Armor
      ◆
    :Else
      ◆Comment:Change Image to Sword only
      ◆
    :End
    ◆
  :End
  ◆
:Else
  ◆If:Reid has equipped Hand Axe
    ◆If:Reid has equipped Leather Armor
      ◆Comment:Change Image to Axe+Leather Armor
      ◆
    :Else
      ◆If:Reid has equipped Iron Armor
        ◆Comment:Change Image to Axe+Iron Armor
        ◆
      :Else
        ◆Comment:Change Image to Axe only
        ◆
      :End
      ◆
    :End
    ◆
  :Else
    ◆If:Reid has equipped Leather Armor
      ◆Comment:Change Image to Leather Armor
      ◆
    :Else
      ◆If:Reid has equipped Iron Armor
        ◆Comment:Change Image to Iron Armor
        ◆
      :Else
        ◆Comment:Change Image to nothing
        ◆
      :End
      ◆
    :End
    ◆
  :End
  ◆
:End

PS:
What might be easier for you to follow is a line of Script in your conditional branch to specify the equipment.
You can do that on page 4 of your conditional branch window.

Maybe someone can correct me, but it should be something like this:
$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[3])
This line will check, if actor 1 has weaponID 0001 and armorID 0003 equipped.

Change the numbers in the [ ] to define the weapons and armors, and nest as many conditional branches as you need to cover all your combinations.

Code:
◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[3])
  ◆Comment:Change Image to Weapon1+Armor3
  ◆
:Else
  ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[4])
    ◆Comment:Change Image to Weapon1+Armor4
    ◆
  :Else
    ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[1]) && $gameActors.actor(1).isEquipped($dataArmors[5])
      ◆Comment:Change Image to Weapon1+Armor5
      ◆
    :Else
      ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[2]) && $gameActors.actor(1).isEquipped($dataArmors[3])
        ◆Comment:Change Image to Weapon2+Armor3
        ◆
      :Else
        ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[2]) && $gameActors.actor(1).isEquipped($dataArmors[4])
          ◆Comment:Change Image to Weapon2+Armor4
          ◆
        :Else
          ◆If:Script:$gameActors.actor(1).isEquipped($dataWeapons[2]) && $gameActors.actor(1).isEquipped($dataArmors[5])
            ◆Comment:Change Image to Weapon2+Armor5
            ◆
          :Else
            ◆Comment:Change Image to nothing
            ◆
          :End
          ◆
        :End
        ◆
      :End
      ◆
    :End
    ◆
  :End
  ◆
:End
Wow, Thank you Zia....I'm going to try this it looks less confusing then all of those if's and else's lol many thanks for all you guy's help not sure what i would do with you guys!
Is there a reason you're doing all this instead of using a character creator plugin? MPP CharacterMake or SRD Character Creator are free
well i have tried to use them, but my sprites will not work with them plugins, because my spriutes don't have pieces i only have the full character sprites with different stuff equipped. the plugins i tried required you to have different pieces, unless i just didnt know what i was doing.
Wow, Thank you Zia....I'm going to try this it looks less confusing then all of those if's and else's lol many thanks for all you guy's help not sure what i would do with you guys!
What Zia said is what I meant when I said you'd have to nest the if conditions inside each other to stop them overwriting...which is exactly what you have that I told you wouldn't work. 😛
What Zia said is what I meant when I said you'd have to nest the if conditions inside each other to stop them overwriting...which is exactly what you have that I told you wouldn't work. 😛
Thank you very much im thinking of just going ahead and making pieces for the main character and use some sort of plugin, can you recommend one for mz? the less complicated the better haha I'm an old fart and get confused easy when it comes to stuff. Thanks again for all your help.
Thank you very much im thinking of just going ahead and making pieces for the main character and use some sort of plugin, can you recommend one for mz? the less complicated the better haha I'm an old fart and get confused easy when it comes to stuff. Thanks again for all your help.
Use MPP CharacterMake or SRD Character Creator with FOSSIL and the Yorae Rosantae add-on


Use MPP CharacterMake or SRD Character Creator with FOSSIL and the Yorae Rosantae add-on


sweet! thank you

Original thread: https://forums.rpgmakerweb.com/threads/help-with-setting-up-a-conditional-branch.174055/