Chaos Krux 29 Posted December 29, 2020 Hello again, it has been a while. I typically only come here when I have an issue that I need the help of smarter people to solve, so it makes sense that I don't post too often. Still, as yet another example to support my theory that I'm far worse at this than I thought, I have another problem. Sorry~ I have a summoning system in my project that runs entirely off of a series of common events. It probably isn't the most efficient or prettiest system out there, but it worked perfectly well for what I wanted it to do. That is until recently. The system is done in a way that is supposed to remove the party members one by one, excluding the summoner, and then add the summoned character into the party before then removing the summoner. Once the summon is dismissed or the battle ends, the party is supposed to reappear in the order that they joined the party. For the purposes of this example, that would be Ryan, then Jason, then Charlla, Luna, Lomendres, Devora, Aki and then finally Selina. There are other characters in between that only appear in certain areas, but those eight are the main party. The problem I'm having now is that the system has ceased functioning correctly. Now, even though the summon itself still works perfectly fine, when the summon is dismissed or the battle ends, the character reappear in the party in a randomised order. This wouldn't necessarily be a problem if not for the fact that party members are supposed to stick in certain slots for the most part. Jason is always meant to be locked in the 1st party slot, and any of the characters listed that I didn't mention above are always meant to be in the 5th or 6th party slot. Due to the fact that the system recently broke for some reason, this is now messed up and characters end up in randomised slots, meaning that certain characters sometimes get locked out of the active party. Not to mention the fact that this can lead to multiple copies of certain characters appearing in cutscenes. As I said, it was working perfectly fine until recently. I am not entirely certain, but I believe it may have broken when I added the "If X Character is in Party" conditional branch, though I'm not sure why adding that one thing would have broken it to this degree. I could try removing these branches and returning it to its original state, but that would mean forcing summoning to be disabled whenever even one character is absent from the party, which would suck. Any help any of you can give would be greatly appreciated. The three images below are the Common Events for the Summoning System. The first is the one called by the Summon Ability, the Second Triggers after a battle has ended, and the third is called by the Dismiss Ability. Share this post Link to post Share on other sites
roninator2 257 Posted December 29, 2020 looks like a lot is messed up there. image one you remove characters (presumably in the order they are expected to be in), then you remove area members. Cool, good, but you set a variable each time you remove one. Is there EVER only one area member in the party at one time? If not then this is problem one. Unless they are all going to be in the party then using a variable will not work, you need to use switches for each actor. If area member 7 was in the party and no others, it would be fine, but if there are more than just the one, you would only ever get the one returning to the party. The flow will start at the top and work its way down. If Jason is in position 1 then he is removed, position 1 will be empty. Cool, good, but on the third image you add in Ryan then Jason. When an actor is added they go into the lowest slot (1) then the process checks every slot counting up until an empty slot is found. So if Ryan and Jason were to be added, then Jason would now be in slot 2 not 1. Without knowing more on the intended order at each stage, it's hard to give more advise. Do the actors go in whatever slot at some point then go in a specific order at another point? 2 Share this post Link to post Share on other sites
Kayzee 4,033 Posted December 30, 2020 (edited) Wouldn't it be easier to just save and restore the whole party at once? I could imagine using a small script like this: class Game_Party < Game_Unit def save_actors @saved_actors = @actors end def restore_actors return unless @saved_actors @actors = @saved_actors @saved_actors = nil end end Use $game_party.save_actors to remember the actors in the party and $game_party.restore_actors to restore and it should remember every party member in the exact order every time. Edited December 30, 2020 by Kayzee 3 Share this post Link to post Share on other sites
Chaos Krux 29 Posted January 3, 2021 (edited) On 12/29/2020 at 11:19 PM, roninator2 said: looks like a lot is messed up there. image one you remove characters (presumably in the order they are expected to be in), then you remove area members. Cool, good, but you set a variable each time you remove one. Is there EVER only one area member in the party at one time? If not then this is problem one. Unless they are all going to be in the party then using a variable will not work, you need to use switches for each actor. If area member 7 was in the party and no others, it would be fine, but if there are more than just the one, you would only ever get the one returning to the party. The flow will start at the top and work its way down. If Jason is in position 1 then he is removed, position 1 will be empty. Cool, good, but on the third image you add in Ryan then Jason. When an actor is added they go into the lowest slot (1) then the process checks every slot counting up until an empty slot is found. So if Ryan and Jason were to be added, then Jason would now be in slot 2 not 1. Without knowing more on the intended order at each stage, it's hard to give more advise. Do the actors go in whatever slot at some point then go in a specific order at another point? Thanks for your feedback. I did say it may not be the prettiest thing out there. For starters, only one of the Area Party Members with the Variables are ever in the party at any given time. Essentially the game has certain areas where an additional member is added to the party, but there's only ever one of these special characters in the party at any given time. For exceptions to this, switches are used instead of variables. For example Flow and Mrs Moonlight both use switches due to the fact that they can appear in the party alongside Monique and Francia-Midna respectively. Otherwise, only one of the characters is ever present, or none at all. As for the ordering of characters, the basic order is Jason, Ryan, Charlla, Luna, Lomendres, Devora, Aki and finally Selina. The first four characters in the party are the active battle team (Which should be Jason and then three others) If any of the special characters are in the party, they are placed between Luna and Lomendres and the party size is increased accordingly to fit the extra characters in. Jason is always locked to party slot 1, meaning he is meant to be the character that the player controls on the map. The special characters are likewise locked into the 5th or 6th slot depending on the character. (Flow and Mrs Moonlight go in the 6th slot if Monique or Francia-Midna are already present in the 5th) Before it broke, the system was supposed to add the characters back into the party in the order above, starting with Jason and ending with Selina. Now it adds them randomly which causes problems with Jason and the special characters being locked into their slots. The seven other characters could technically be add to the party in any order since they aren't locked and can be swapped mid battle if need be. The only reason why this is even an issue is because of Jason and the special characters. Does that help? Or even make sense? Edited January 3, 2021 by Chaos Krux Clarification Share this post Link to post Share on other sites
Chaos Krux 29 Posted January 3, 2021 (edited) On 12/30/2020 at 4:17 PM, Kayzee said: Wouldn't it be easier to just save and restore the whole party at once? I could imagine using a small script like this: class Game_Party < Game_Unit def save_actors @saved_actors = @actors end def restore_actors return unless @saved_actors @actors = @saved_actors @saved_actors = nil end end Use $game_party.save_actors to remember the actors in the party and $game_party.restore_actors to restore and it should remember every party member in the exact order every time. Wait, seriously? I'll have to try this... I have practically no in depth scripting knowledge so I'd never have known about this sort of thing. I was actually kinda proud of the jarbled mess that is the current summoning system up until it broke. If this works, it would make the entire summoning system so much simpler. I'll try it and get back to you. Edited January 3, 2021 by Chaos Krux Spelling 1 Share this post Link to post Share on other sites
roninator2 257 Posted January 5, 2021 On 1/3/2021 at 6:10 PM, Chaos Krux said: Does that help? Not really, it just explains what your intentions are not why you have the party member being added back in, in a different order from what you want. I just found this script today. Maybe it will help you. https://forums.rpgmakerweb.com/index.php?threads/switch-party.3060/ 1 Share this post Link to post Share on other sites
Chaos Krux 29 Posted January 6, 2021 Thanks you all for your efforts. I've actually found a solution to this problem that does exactly what I want it to do thanks to a very special friend of mine. 1 Share this post Link to post Share on other sites