Party Member slot changing.

Joined
Jun 15, 2019
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RM2k3
I am making a Pokémon Game, everything is going well so far, however when I got to the catching mechanic, I ran into a problem. When I catch a new Pokémon (party full) how do I switch the new Pokémon with another in party member?
The only option RM2K3 is giving me is the one you choose a character by name to remove and add a new one, however I just want to release a member from the party without having to choose a character in specific, I just want to select the Slot, in order to keep the new one I caught.
Can someone help me?
 
Last edited:

Thanatos

Abandoned account
Veteran
Joined
Aug 18, 2012
Messages
36
Reaction score
11
First Language
Portuguese
Primarily Uses
N/A
There is no way to help you, since you have made a simulated capture system.
This method only knows why you created it.

If I did, I would create a map-menu by events, and the protagonist 0002 to 0200 would be pokemons, all blank.
When capturing a monster you would get characteristics to the next "Hero" using an event counter.
To give a name it would be enough to use the same event that attributes the characteristics of the monster to "Hero".
 

BitBrosGames

*Keeps ruminating*
Veteran
Joined
Jan 11, 2019
Messages
120
Reaction score
94
First Language
Spanish
Primarily Uses
RM2k3
You can add and remove a character for your party by using the ID of the hero according to the database.
You could have, for example, an array of variables where the first four (or six, depending on the length of your team) have the ID of the ones which are currently in the party and the following, would have the IDs of the reserve pokémon in the order they appear on the list.
When you catch a new pokémon, add 1 to a variable with the number of pokémon you have so far, get that value and modify the hero in that slot giving it the stats, name, graphic and more of the new pokémon (you just need to do this once for each new pokémon).
That way, if you want to switch a pokémon with another, you just need to check the ID of the pokémon in the slot you want to release, and then add the ID of the pokémon you want on the team, and of course, modify the values of the variables with the order of the pokémon so it can be consistent.

For example, you have 20 pokémon, and you have D, L, C and A on the team, with IDs 4, 12, 3 and 1 respectively.

Pkm1: 4
Pkm2: 12
Pkm3: 3
Pkm4: 1
---out of the party---
Pkm5: 5
Pkm6: 2
...
Pkm20: 20
Pkm21: 0
...
No.Pkm: 20

When you catch a new pokémon, U, add 1 to No.Pkm (=21), and modify hero no. 21 with the stats of U.
Also set Pkm21 to 21 (the slot where U is stored).
If position variables start at, for example, number 100 on the list of variables of your game, just use 100 + 21 as the variable reference in Control Variables to identify the variable you want to modify and set the new value.


Pkm1:
4
Pkm2: 12
Pkm3: 3
Pkm4: 1
---out of the party---
Pkm5: 5
Pkm6: 2
...
Pkm20: 20
Pkm21: 21
Pkm22: 0
...
No.Pkm: 21

Then in order to switch members, show the list to the player so they can choose.
If the player decided to switch A (#4) with U (#21), use the ID stored in Pkm4 to remove A and add the ID stored in Pkm21 to put U into the party. Then switch the values of Pkm4 and Pkm21 for consistency:

Pkm1: 4
Pkm2: 12
Pkm3: 3
Pkm4: 21
---out of the party---
Pkm5: 5
Pkm6: 2
...
Pkm20: 20
Pkm21: 1
Pkm22: 0
...
No.Pkm: 21

And that's all. :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top