Well, after few more tests, I finally understand more clearly what happens with the Roamer Rematch.
In RS (Jap, US, Fr) (and every EU version), opponent party slots 2 to 6 aren't cleared when a Roamer is encountered.
If one of these slots contains a Pokemon that is able to fight (not a Bad Egg, not KO), this Pokemon will be sent out in battle if the roamer is killed, like the game would do in a normal trainer fight.
This can only happen if your last battle before meeting the roamer was a trainer fight, and if you lost that trainer fight, (an opposing Pokemon in slot 2 to 6 must be alive when you lost the fight).
If you make a wild encounter before meeting the roamer, the opponent party slots will be cleared and there won't be any opposing Pokemon in slots 2 to 6 anymore.
Since sending another Pokemon was only supposed to happen in trainer matches, the message boxes displayed when another Pokemon is sent into battle use the trainer name of the last battled trainer, which is in many (if not every) case the trainer who had the Pokemon you're currently fighting against.
As this is a wild battle, you can catch any opposing Pokemon you want.
Catching a Pokemon will trigger the catching sequence, and end the battle.
If you win the battle, nothing (apart gaining exp) will happen, and you'll be back to the grass.
If you flee, well, you flee, and it ends the battle.
If you have "Shift" mode enabled, and if you chose NO when the game asks you about switching Pokemon (after killing one opposing Pokemon), this will be counted as you trying to flee (like it would do if one of your Pokemon dies).
And since it's a Roamer battle, every Pokemon will try to flee when sent into battle.
And if the Pokemon flee, the battle is over.
Thus, if you want to see multiple opposing Pokemon, you'll either need to OHKO them or to trap them with Shadow Tag / Mean Look / Spider Web and kill them slowly.
Also, as it's a Roamer battle, if you end the battle by killing every Pokemon or by catching a Pokemon, the Roamer will be considered beaten/caught and he won't appear again in Hoenn.
However, if you end the fight without killing everything/catching a Pokemon (by fleeing, losing, or letting an opposing Pokémon flee), the Roamer will still be considered "Roaming" and you'll still be able to meet him, even if he has 0 HP remaining.
If the Roamer has 0 HP remaining and if you perform Roamer Rematch Glitch, you'll directly face a Pokemon from the previous trainer instead of the roamer.
Since the opposing Pokemon you're meeting with the Roamer Rematch glitch come from the remnants of Pokemon data of your previous opponent's Pokemon, their IVs won't be affected at all by the Roamer IV storage glitch.
Roamer IV Storage Glitch : When a 3rd gen roamer is generated, its PID, IVs, Level, Species,.. are stores in specific adresses in order to recreate the Pokemon data of the roamer everytime he's met. But in RS/FrLg, the IVs double-word is stored as a byte, which means that the recreated IVs double-word of the roamer can only take values of 0000 00XX.
All the Pokemon you'll meet with the Roamer Rematch Glitch will be trainer Pokemon.
Thus, if you catch them, it will be the same thing as you stealing them directly from the trainer.
When you catch a wild Pokemon, its ID/SID couple is changed to yours. If the ID/SID couple of the Pokemon was originally different from yours, changing it will completely screw up the Pokemon data substructures as well as its checksum, transforming it into a Bad Egg.
However, you will keep the Dex entry as you're in a wild battle. (If you were stealing Pokemon in Trainer Tower or in Battle Frontier, you wouldn't have any Dex Entry as the Pokedex is disabled.)
In RS, the only Trainers' Pokemon that have a ID/SID couple equal to yours are Trainer Tower Pokemon. Thus, they are the sole Pokémon you can steal and keep as valid Pokemon.
(The reasons for this are unknown, as it's not a really important data generation gain, and as the only useful thing I see in this is to keep shinyness and ownership of Battle Factory Pokemon in Emerald.)
You can use the Roamer Rematch Glitch to shinyhunt in Trainer Tower. This is quite an interesting hunt since you'll meet evolved forms of Pokemon taken from a huge pool of trained Pokemon, but its flaw is that you can't catch the first Pokemon (as it'll be replaced by the roamer). Thus, you have a 1/3 chance of meeting an uncatchable shiny.
You also need to be cautious and lose the battle without killing the shiny, or you won't be able to see it with the Roamer Rematch Glitch. (You can't forfeit during a battle in RS Trainer Tower, unless you use a Glitch Move to change the battle type into a wild battle and flee.)
You could think of Secret Base Trainers, but their Pokemon have a randomized ID/SID couple each time you face them. (Shinyness isn't even kept)
Thus, you can't clone one of your Pokemon with this method, even if this wouldn't be an efficient cloning method at all.
However, you can use Secret Base Trainers to meet and catch specific Pokemon and obtain their Dex Entry.
And this can be pretty interesting with Glitch Pokemon, as their Dex Entries can either be :
- a normal Pokemon entry (it provides the entry that Pokemon)
- an entry of Decamark (a cool Dex Entry)
- a glitched entry (lots of japanese characters overflowing, as in US/Eu RS games, they aren't replaced by blank characters like in US/Eu Emerald)
- a freeze/soft reset
I don't know what were the things that made the game freeze/soft reset, so this might be useful for code execution. (it's not something I can for now test)
This glitch doesn't work in Emerald or FrLg, as encountering a Roamer clears the other opponent party slots.
Meeting a swarm Pokemon also clears these party slots. (I tried it since swarm Pokemon and Roamers are stored and generated in a similar way).
The supposed Infinite Roamer Glitch was something I noticed on my Ruby save, and I discovered that it was linked to my save not having the flag for the beginning Tv News (with the player's father) as well as different flags on the word containing the Tv News flag.
I have no idea about the causes of that, since that save was made to hunt Mudkip on console, so I had no reason to make some teleport to skip the utmost beginning of the game, and as I cheated after getting Mudkip in order to get the first badge and get my 2 other shiny starters from a trade at Odale.
But this is an old story and I might have forgotten things, so I'm waiting until I can get my hands back on the first Gameshark snapshot I have of that file in order to try to unveil the truth.
In curiosity, I checked RS roms and I found no trace of a clearflag command for the Tv News flag, (but that could be done inside a special sommand, I don't really know about that) so I really can't conclude about that glitch.
I objectively think that I screwed something up and that this glitch is a lucky unwanted consequence, sorry.
The stolen Trainer Tower Pokemon, they can at least be transferred to 6th gen (I don't know the main checks done during Pokétransfer), as they're Pokémon coming from 3rd gen who only happen to have weird IVs (they're all equal), and as 3rd->4th and 4th->5th transfers don't check things like that on Pokemon coming from 3rd gen.