"Determination Solution" #1 i.e. how the code will covert pkmn.species for PokeRide pbMount() to read. (Posting this so others can utilize this to their own dev.)
We'd add the following code to wherever we would like pbMount() to activate. In this example, $Trainer.party[0].species.to_s calls for the specie of the first pokemon within the party, [1] calls for the second, etc, [5] calls for the sixth.
First however, we need to name the Module correctly. Let's say we want to add Flygon, instead of naming it module Flygon, we need to name it module DEX330 e.g. the Pokedex number from calling pkmn.species
This is so the following code will work properly with pbMount() without any other edit.
Code:
pbMount Kernel.const_get( "DEX"<<$Trainer.party[0].species.to_s )
When that activates within the script, it will do the same as pbMount(DEX330) which is where we placed our Flygon module e.g. module DEX330
Code:
module DEX330
MoveSheet = ["Pokeride/000_Flygon","Pokeride/001_Flygon"]
MoveSpeed = 5
ActionSheet = ["Pokeride/000_Flygon_Run","Pokeride/001_Flygon_Run"]
ActionSpeed = 2
end
To form condition in which to check if Pokemon is 'mountable' or not, limit is imagination in ways. and that's it.
~~
I'm not familiar enough with the Pause Menu nor the Party Screen Menu, I'm trying to add that singular line of code to activate , but the way these Menu are coded, I can't easily add my own option without knowing the full logic of said script, which I've tried and cannot. I thought it'd be simpler. I'm not going to mess with it further now, as I feel like it's a waste of time. The more important code is finished in terms of how we can easily activate pbMount() without changing anything except for how we name our module. e.g. DEX330 for Flygon. To do form as well, the idea is the same just 1 extra step in naming convention DEX3301 .species.to_s << .form.to_s
I plan to integrate Modular Pause Menu next, as I think that pause menu will be easier to mess with. The essentials default menu, I cannot wrap my head around its logic flow.
~~
edit#1 the code I've searched so long for. to turn strings into readable Module/Class name.
it's
Code:
Kernel.const_get("DEX"<<pkmn.species)
everything works now in terms of activation.
someone did mention this is 'overkill', but, I have little desire to change how pbMount() or how it's Module are at right now.
now it's just debugging what I want the menu to actually do, as I can't find resource to simply add 'another menu option. i.e. simply adding an option which when pressed will do the pb(mount)
I'll have to play with the 'pause menu' and 'pokemon party screen' more.
I saw there was an alternative solution, but I read over it, and it's 'too much code' for me to read and intergrade, I rather have a 30 lines solution which works with default PokeRide
~Old~
One by one is definitely a method that can be employed especially if the game has lower amounts, (dev. can manually code in conditioning 1 by 1)
If it has to come down to it, I'll definitely do that. Since I'm newer to RUBY, I'm at the phase where I'd like to try to understand the 'limit' of what it can do, as trying to figure out a more 'fluent' method would benefit my future coding.
It's mostly due to my inexperience with RUBY code now. I'm sure this will get done 'eventually' :) by me or someone else, especially the one by one method.
For now, refine other aspects of your project perhaps. I'm looking forward to when community have codes that they can just paste in and PokeRide will be easier to implement to projects.