Author Topic: [XP] Easy Party Switcher  (Read 83793 times)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
[XP] Easy Party Switcher
« on: January 09, 2008, 11:30:52 PM »
Easy Party Switcher
Authors: Blizzard
Version: 2.6
Type: Party Changing System
Key Term: Player / Party / Troop Add-on

Introduction

This script allows a more advanced switching of parties, disabling party members and fast switch between the current and a stored party.

This work is licensed under BSD License 2.0:
Quote
Copyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
Quote
Easy Party Switcher licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić

Alternatively, if your font doesn't support diacritic characters, you may use this variant:
Quote
Easy Party Switcher licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic

In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Easy Party Switcher created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.


Features

  • set party members for "not_available" (shown transparent in the reserve)
  • remove party members from the reserve list ("disabled_for_party")
  • set party members, who MUST be in the party (shown transparent in the current party, "must_be_in_party")
  • option either to wipe the party (for multi-party use) or only remove every member (except 1) from the party
  • easy to use and easy to switch party members
  • supports any party size
  • possible to fast-switch between the current and a stored party
  • full instructions inside the first comment
v1.1
  • the glitches I forgot to fix were fixed
  • enhanced compatibility a bit more
v1.2b
  • overworked system and added window "You cannot remove the last party member!"
  • alpha tested
v1.21b
  • fixed the "Unable to find Graphics/Characters/Faces/" glitch
v1.7b
  • improved coding
  • facesets now optional
  • no extra bitmap files needed anymore
  • works now with Tons of Add-ons
v1.8b
  • added "forced position"
  • added "forced party size"
v2.0b
  • fixed the bug where you could empty the party... again...
  • fixed the bug that appeared when you pressed SHIFT
  • added option to allow an empty party
  • added "EXP for party members in reserve" option
  • made the forced_size for party work more convenient
  • improved coding
  • slightly decreased lag
v2.1b
  • fixed a bug
  • improved coding
  • rewritten conditions using classic syntax to avoid RGSS conditioning bug
  • now can serve as enhancement for CP Debug System
v2.11b
  • improved coding and performance
v2.3b
  • optional feature to call the Party Switcher during battle
v2.32b
  • fixed crash problem with SDK 2.x when using the BATTLE_SWITCH option
  • fixed SP display glitch when using BARS from Tons of Add-ons
v2.4b
  • now you can activate party order change only in the party switcher
  • add option for automatic party order change only in battle
v2.41b
  • fixed problem where you could put together a party where everybody is dead
v2.42b
  • added possibility to change the BATTLE_SWITCH setting during the game
v2.43b
  • fixed a problem with SDK 2.x
v2.5b
  • fixed a problem caused by other scripts that remove the result window
v2.51b
  • fixed two bugs regarding actor visibility/availability
  • improved some of the code
v2.6
  • added new license
  • added usage and crediting instructions


Screenshots



Demo

Easy Party Switcher
If you can't start the demo, Search for the RMXP FAQ and see what to do.

Script

Just make a new script above main and paste this code into it.
Script Download

Instructions

Inside the script in the first comment.

Compatibility

98% compatible with SDK v1.x. 90% compatible with SDK 2.x. Can cause incompatibility issued with other Party Change Systems. WILL corrupt your old savegames.

Credits and Thanks

  • Boris "Blizzard" Mikić
  • Special Thanks to Zeriab for pointing out a few glitches and shortening the code in an earlier version =D

Author's Notes

For your own sake, do not apply the attribute "must_be_in_party" to a character at the same time with "not_available" or "disabled_for_party" as this WILL disrupt your party and party switch system. Use "forced_position" together with "must_be_in_party" to avoid bugs. Be careful when using "forced_position" with "$game_party.forced_size". Add actors at the very end to be sure the player can't put others after them if the "forced_size" is smaller than the maximum party size.

Character faces go into the "Characters" folder and they have the same name as the character spritesets have with _face added.

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
« Last Edit: March 23, 2019, 01:53:59 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Musicmuse

  • Guest
Re: Easy Party Switcher
« Reply #1 on: January 10, 2008, 07:17:08 AM »
Just a quick question...

Is there a way to incorporate a button in the main status menu that can call this script as well?  I'd like the player to be able to change the party whenever they'd like, given of course that the members are available.  I love the script, but this little tweak would really make it perfect for my situation :)

(I'd like a button like "Items", "Save", "Equip", but it would say "Party" or something  similar)

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: Easy Party Switcher
« Reply #2 on: January 10, 2008, 07:22:22 AM »
so what you want is just the default menu system but party added to it??? I can do it pretty quickly if that's what u want
EDIT: Here's a quick edit of the default menu, if you want/wanted an edit of someone elses menu just say
http://www.megaupload.com/?d=AUA41NYF
« Last Edit: January 10, 2008, 08:12:47 AM by Nortos »
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Musicmuse

  • Guest
Re: Easy Party Switcher
« Reply #3 on: January 10, 2008, 08:54:15 PM »
That's PERFECT!  Exactly what I'm looking for! ;D

I'm sure these things aren't particularly difficult, but without scripting knowledge all I can really do is read through directions to implement them myself, haha.

So is what I need in the script database for the demo?

EDIT:

It looks like it's in Scene_Menu and you added an option to call the party changer script when you select that option?  If so, I imagine I just have to copy and paste the Scene_Menu script into my own game and add (or rename) the scene_partyswitcher script so that when it calls the script there's actually somewhere to go... ?

EDIT 2:

I got it to work, and now I'm trying to figure out how to implement the same thing as a selectable option in the battle menu (in case a character is dead and needs to be replaced)

... it looks like I'll need to somehow edit the Scene_Battle scripts?
« Last Edit: January 10, 2008, 11:24:14 PM by Musicmuse »

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: Easy Party Switcher
« Reply #4 on: January 11, 2008, 02:54:14 AM »
I don't think it's implemented in this script to change party members in battle I haven't used his easy party script much he'll be able to give better answer but I don't think you can swap in battle
EDIT: You'll also want to use the scene party switcher from my demo as I had to make an edit when press B or "Esc" it goes back to menu and not the map
2nd EDIT: Looking at it it would be hard to implement it into battle not calling it just exiting it, I can think of an easy way to change party members but once you go to screen than exit the battle would start again, you would have to edit this pretty heavily to put it into scene_battle to implement that I think...Blizz will know better though
« Last Edit: January 11, 2008, 04:13:55 AM by Nortos »
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Easy Party Switcher
« Reply #5 on: January 11, 2008, 05:54:56 PM »
I was going to release another version which allowed optional party change during battle. Many people seem to want that feature. I'll do it as soon as I have the time.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: Easy Party Switcher
« Reply #6 on: January 11, 2008, 09:42:48 PM »
Yeah! And it's not that difficult, is it?
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Musicmuse

  • Guest
Re: Easy Party Switcher
« Reply #7 on: January 12, 2008, 12:28:35 AM »
Thanks for all of the help Nortos!

I'll be looking forward to the update, Blizz

You all are ridiculously nice here, haha.

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: Easy Party Switcher
« Reply #8 on: January 12, 2008, 07:13:47 AM »
it's cool Musicmuse and I think it wouldn't be too hard especially for Blizz
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Easy Party Switcher
« Reply #9 on: January 12, 2008, 05:42:52 PM »
Quote from: FTS
Yeah! And it's not that difficult, is it?
Scene-in-scene with stuff disposal to prevent too much lag. :3
It should be less than 50 lines of extra code.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Vell

  • Lexima Warrior
  • *******
  • Posts: 2915
  • LV: 49
  • Doubt for the dead.
    • View Profile
Re: Easy Party Switcher
« Reply #10 on: January 12, 2008, 06:30:15 PM »
wow, that'll be pretty awesome. I thought it would be pretty much very very difficult...

however, it was done in GS2, so yeah, i knew it was possible.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Easy Party Switcher
« Reply #11 on: January 27, 2008, 12:38:27 AM »
As I said, I only need to make an interruption in the battle scene. All the working code for the extra scene can be called there afterwards without problems.

I have to live up to the title you gave me. ^_^ *points to personal text*

EDIT:

*updates to v2.3b*

EDIT:

*updates to v2.32b*

EDIT:

*updates to v2.4b*
« Last Edit: January 29, 2008, 02:27:36 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: [XP] Easy Party Switcher
« Reply #12 on: January 30, 2008, 10:58:15 PM »
Psshh, didn;t want to give it away yet, but in my CMS, I used this feature from the main menu allowing the user to switch his party at any given time ;)

Megansunfire

  • Guest
Re: [XP] Easy Party Switcher
« Reply #13 on: February 19, 2008, 09:23:09 PM »
Hey all.
I was planning on using this script, but did some testing and came up with an error.

It appears that the party switcher gives an error about experience for the reserve and the only way I seem to NOT get the error, is if I set the reserve to recieve 100% experience.

I've tried setting it to 0%, 50% (which I want to do) and it gives me an error that points to this line:

$game_actors.exp += @result_window.exp * EXP_RESERVE/100

I've tried changing that number too, but nothing. :(

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Easy Party Switcher
« Reply #14 on: February 20, 2008, 01:16:48 PM »
You might be using an older version. In the current version (2.4b) the line says
Code: [Select]
$game_actors[i].exp += @result_window.exp * BlizzCFG::EXP_RESERVE/100

Try upgrading first.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Megansunfire

  • Guest
Re: [XP] Easy Party Switcher
« Reply #15 on: February 27, 2008, 02:20:50 AM »
Yeah. I upgraded it but I still get an error.
It says this:

 ' (*)Scene_PartySwitcher' ? 994  NoMethodError
undefined method 'exp' for nil:NilClass

And this is line 994:
$game_actors.exp += @result_window.exp * BlizzCFG::EXP_RESERVE/100

Any ideas?  ???

Quan

  • Guest
Re: [XP] Easy Party Switcher
« Reply #16 on: February 27, 2008, 07:40:06 AM »
Man, I might just be a total idiot, but whenever I try to call the script to set characters as disabled_from_party I get a Syntax Error...

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Easy Party Switcher
« Reply #17 on: February 27, 2008, 11:21:00 AM »
Keep in mind that you have to use

Code: [Select]
$game_party.actors[0].disabled_for_party =
true

or

Code: [Select]
$game_party.actors[0].
disabled_for_party = true

and not

Code: [Select]
$game_party.actors[0].disabled_for_party = true
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Quan

  • Guest
Re: [XP] Easy Party Switcher
« Reply #18 on: February 27, 2008, 03:24:34 PM »
First of all, thanks for the fast response.  I'm really impressed with your scriptwork and it's awesome that you're so willing to help people get it working.

Now, just to clarify, should I be using the full ID # (001) or just the ultimate value (1)?

I was also gonna say, I don't know how difficult it would be, but it would be nasty if setting the FACESETS option to true replaced the sprites on the regular menu screen as well.  It'd just look so much better!

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Easy Party Switcher
« Reply #19 on: February 27, 2008, 03:57:57 PM »
The ultimate value without the leading zeroes. My Tons of Add-ons has a faceset add-on that allows that. :)
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.