Page 1 of 1

Changing Maximum Party Size On the Fly?

Posted: Sat Apr 27, 2013 4:02 am
by Seriously Unserious
Is there any way to change the maximum party size while a dungeon is running? ie by using an Action object or something like that?

I did a quick search of the forum, wiki and RTCEditor and couldn't find what I was looking for anywhere obvious but I think others may have done something like this before so I'm hoping there is a way I'm just not seeing...

Re: Changing Maximum Party Size On the Fly?

Posted: Sat Apr 27, 2013 5:02 am
by beowuuf
Not that I'm aware of, I think increasing the party is done through intercting with mirrors only. Don't recall even a swapping function, but i could be wrong

Re: Changing Maximum Party Size On the Fly?

Posted: Sat Apr 27, 2013 11:20 am
by Gambit37
I don't think it's possible. RTC doesn't expose high level functionality like that.

Re: Changing Maximum Party Size On the Fly?

Posted: Sat Apr 27, 2013 12:16 pm
by Lord_BoNes
You can remove a member from the party by using a WALLITEM_ACTION:
- Clone a mirror, and give it a name that'll make it stand out from other mirrors. Place 1 of these mirrors somewhere in the dungeon (it can be anywhere... but just make sure you only have 1 in the dungeon, this part is important).
- Place a WALLITEM_ACTION and set the action value to ACTION_REMOVE_CHARACTER_AND_ITEMS_FROM_PARTY, and set the object 1 value to your newly cloned mirror object type.
When you trigger the WALLITEM_ACTION, the triggering member (or the party leader, if the whole party triggers it) will be removed from the party and placed in the cloned mirror.

- To add the member back into the party, just place another WALLITEM_ACTION that has it's action set to ACTION_ADD_CHARACTER_TO_PARTY with the object 1 set as your cloned mirror type. When this WALLITEM_ACTION is triggered, and there is someone contained in the mirror (otherwise, it does nothing) then the character will be added to the party, if there is enough room.
You can also have the character in the mirror from startup, and then trigger the action to add them into the party.

EDIT: Something I forgot to add, it's honestly easiest to just have a cloned mirror per character (leads to a whole lot less confusion)... this seems to be the long winded way to do things, but that's RTC for ya :P

Re: Changing Maximum Party Size On the Fly?

Posted: Sat Apr 27, 2013 4:11 pm
by beowuuf
Sweet, so the mirror swapping was extrapolated to be more versitile.

Re: Changing Maximum Party Size On the Fly?

Posted: Sun Apr 28, 2013 12:44 am
by Seriously Unserious
Thanks guys.

I am actually looking for a way to temporarily block the player from adding more then 1 party member, then free up the remaining 3 slots after the player had done something. I could use something like LB suggested only have the remove character from party action triggered automatically on a party size > 1 to create this limit, and later disable this check when I'm ready to let the player finish the recruiting. Sounds like I'll need to do a lot of cloning though and that's a bit of a pain in the rear, but at least there is a way.

Re: Changing Maximum Party Size On the Fly?

Posted: Sun Apr 28, 2013 12:49 am
by beowuuf
Can you filter a mirror click through a relay and check the party size?

Re: Changing Maximum Party Size On the Fly?

Posted: Sun Apr 28, 2013 10:33 am
by Lord_BoNes
You should be able to pass the "activation of a mirror" off to a relay (the mirror object itself activates the relay) that checks the party size. If the party size is greater than the value of a counter (that you could set to whatever value), then you can remove the member from the party (back into the same mirror, if you wanted... so it seems like they never left it). The problem that you'll run into is "selecting" a particular member to remove... as I said above, if the party (as a whole) activates the removing effect, then the current party leader (which WOULDN'T be the member we just added) will get "selected" as they'll be the member to get sucked into the mirror :(

What you could do: clone a VI potion, change its stats so that it doesn't give you any stat bonus (like healing health points). Under the convert/consume section, make it activate a relay (cloned relay type). And have that relay check if the current member is greater than the counter above... if so, remove the party member. Now, just use a BOOST_PARTY_BY_OBJECT action with the cloned VI potion as the object 1 (the whole party gets "boosted" by the given potion, activating it's effect on each living party member).

Re: Changing Maximum Party Size On the Fly?

Posted: Tue Apr 30, 2013 12:40 am
by Seriously Unserious
@Lord_Bones: I just tested your idea and it works fine. As for what party member gets removed, that's not a big concern of mine. If the player chooses a new party member that exceeds the current size limit, it'll just swap them out so and if the player doesn't like the swap, (s)he can just swap them back as the old party member will be in the mirror right in front of the party anyways.

What I did is set up each mirror as a unique clone of the standard mirror, have it act as a trigger and activate 2 relays, 1 tests if the party is too big with the new member added and if so, removes the party leader, the other relay checks if the new member that was added left the party with a still valid party size and if so, updates a counter that tracks the current party size.

So basically I have 1 mirror for each character in the game, 1 relay for each mirror, 1 action for each mirror (to remove an invalid party member), 1 relay to update the party size counter whenever a new party member is added, and 2 counters, 1 to track the max party size, the other to track the current party size.

All I'll need to do now is refine the system to make sure the party size counter is kept accurate at all times.

EDIT: the accuracy of the current party size counter is perfect. The main concern I had was if the player clicked on a mirror, then decided not to take the character within that he party size could be incorrectly updated to 1 higher but upon further testing, it turns out the mirror, when being used as a trigger, only triggers it's targets if a party member was reincarnated/resurrected, otherwise it does nothing.

EDIT2: I added the RTC formatted text and some further instructions to the Libraries thread. If you need to discuss this technique or ask questions or anything please do it here to prevent the Libraries thread from getting too cluttered.

Re: Changing Maximum Party Size On the Fly?

Posted: Tue Apr 30, 2013 8:58 am
by beowuuf
Excellent. So.....when's Lytchgate coming out?

Re: Changing Maximum Party Size On the Fly?

Posted: Tue Apr 30, 2013 8:07 pm
by Seriously Unserious
I'll be releasing a playable demo soon. That demo would've been out by now if it wasn't for my wrist getting buggered up a month ago, but I am now working on getting everything ready for a demo.

Re: Changing Maximum Party Size On the Fly?

Posted: Sun May 12, 2013 4:27 am
by Seriously Unserious
Here's a link to download the txt file just in case anyone doesn't want to fiddle around with copying+pasting the text from the Libraries thread into a notepad file and having to fix the tabs and lines back to RTC standards: http://www.sendspace.com/file/eu1hir