Add/Remove items or exp from actor INDEX not ID

Hey Guys!


In my game there'll be missions or dungeons where the player will have to choose 4 other actors to complete them.


I want to add/remove some equips or Exp/Lv from these actors without making a huge conditional branch (I have 10 actors now, and I'm planning to make some more).


I also want to get each actor in party Level during the dungeon to make things harder or easier depending on how they leveled up. For this I'd have to make a HUGE conditional branch to check which actors are in party :/


I thought in something like a script call but instead of giving actorID maybe actorIndex (the actor in 1st position in party, 2nd position...)


So I'd use this to get the actors Level, to give them Exp individualy etc...
Hum, I'm not sure I fully understand.


What prevents you from using a variable to get the party member actor id from its index?


Control variables -> Game Data -> Party


You then select the party slot you want to check and it returns the corresponding actor id.


You can then either with conditional branches or with script calls change equipment from all the actors in the party this way.


Same for checking their level. You get like this the id of all four party members, and then you can access their lvl.


Changing exp or level can already be done via a variable so no need for a script call.


If you don't want a lot of conditionnals and want to change equipment by id instead of with a drop down menu, you're gonna need a script call. This google doc contains a large amount of them.


https://docs.google.com/spreadsheets/d/1-Oa0cRGpjC8L5JO8vdMwOaYMKO75dtfKDOetnvh7OHs/edit?pref=2&pli=1#gid=0


For example, to equip a weapon by id, you could use:

Code:
$gameActors.actor(actorId).changeEquip(slotId, $dataWeapons[weaponId]);

Original thread: https://forums.rpgmakerweb.com/threads/add-remove-items-or-exp-from-actor-index-not-id.64270/