It's a basic feature of Ruby. It occurred to me when thinking about online battles that the only information you really need to send across are the initial conditions (i.e. the party Pokémon at the start, not the battlers), the chosen commands and any outcomes of randomness - everything else is calculated. Knowing how an RNG works, I then figured you don't even need to send the outcomes of randomness; just sync the seed at the start and it becomes just more calculations. In theory.
An example of setting the RNG seed is in the Lottery mini-game. Here the seed is set depending on the day, which ensures the winning number is the same on any given day. You'll probably want to randomise it again afterwards to prevent any possible abuse (not that I think anyone will care enough to try it for a fangame).
That sounds like a very unnecessary way of getting online battles to work. If you synchronise the random number seed at the beginning of the battle for all participants, then all random events in the battle will be the same for both players (assuming identical code). This way you only need to send the information about which command is chosen, and play each round locally for each player, knowing that the RNG is playing out the exact same moves for each participant so there'll be no desynching.
I'm not sure how to answer your question. pbAttackPhase starts the activity and handles retreating and priority calculations. Then for each battler, in order of priority, that battler's pbProcessTurn is run. pbProcessTurn makes that battler use a move. The process of using a move is definitely a jumble of code.
What would you possibly want to do that for? Debugging purposes? Surely there are better ways...
You'll have put the dump code in the wrong place. Marshal.dump(@battlers) will work somewhere in PokeBattle_Battle and that's about it. Also, you can't really use that line all by itself - you'll need to open a file to dump it into - check other dumping for examples.
Alright I made an update to my code, it can now support 3D models (I still need to make a model loader) I also converted from DirectX to openGL but now it does not render anything, do you think you can look at the code for me?