• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] PokeRide Support

  • 232
    Posts
    7
    Years
    • Seen May 23, 2024
    I successfully installed Marin's PokeRide on Essentials V18. But the RiderPager support script allows you to ride any Pokémon, in my case I want to ride only on the Pokémon I own at Party.
    Would anyone know how to make a code so that at Party itself when interacting with the Pokémon, it recognizes its command?
    For example, when interacting with a Tauros the Game give the option pbMount (Tauros) for this to happen only if the player has a Tauros in the team. Everything done through Party would be perfect.
    Any solution?
     

    JulyArt

    New Developer
  • 70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    Alright, so. I'm unsure how you want to activate or how it activates. but I do know you'd need it to

    #1 all for the either the @party as an array. then used said array to determine which what is available (this is a menu that display all 6 pokemon choice specie of party in one menu, player up and down menu to select)

    #2 or the individual pokemon within party one by one. (this menu is the same place as trying to give item to a pokemon, instead, there's a new option to mount)

    $Trainer.ablePokemonParty if you want #1

    pokemon.species if you want #2

    I know I didn't actually write any code, however that's the 'logic flow' of the desirable effect.

    pbMount ($Trainer.ablePokemonParty ) <- this is probably easier to implement, as the below method will need to add an additional 'trigger menu'.

    pbMount (pkmn.species)

    This may help.
    https://essentialsdocs.fandom.com/wiki/Party
    https://essentialsdocs.fandom.com/wiki/Pokémon
     
    Last edited:
  • 232
    Posts
    7
    Years
    • Seen May 23, 2024
    Alright, so. I'm unsure how you want to activate or how it activates. but I do know you'd need it to

    #1 all for the either the @party as an array. then used said array to determine which what is available (this is a menu that display all 6 pokemon choice specie of party in one menu, player up and down menu to select)

    #2 or the individual pokemon within party one by one. (this menu is the same place as trying to give item to a pokemon, instead, there's a new option to mount)

    $Trainer.ablePokemonParty if you want #1

    pokemon.species if you want #2

    I know I didn't actually write any code, however that's the 'logic flow' of the desirable effect.

    pbMount ($Trainer.ablePokemonParty ) <- this is probably easier to implement, as the below method will need to add an additional 'trigger menu'.

    pbMount (pkmn.species)

    This may help.
    https://essentialsdocs.fandom.com/wiki/Party
    https://essentialsdocs.fandom.com/wiki/Pokémon

    I'm still learning ruby, could you give me this strength this time?
     

    JulyArt

    New Developer
  • 70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    Definitely as I need to eventually implement this into my own project.

    We just gotta start with like your preferences for your own project.

    Where would you like to bring up the option? The limit is your imagination. I'll give some examples.
    1. At the 'Main Menu' where it shows options like "Pokedex, Pokemon, Items, Save" etc.
    2. Within 'Pokemon Option', so when we press 'action' on pokemon party screen, we see options like 'Summary, Give Item, Fly, Teleport (if they have it) etc.
    3. Have a Flygon.png event on a map, when interacted with etc etc.

    So if choose choice 1. This is the one I'll likely implement, because it's way quicker for player to access it rather than choice 2 where they have to go into PokemonParty Menu first.
    Imagine if there was an 'option' on the 'main menu' that pretty much does "What are all the available field moves right now?" it's 'quality of life' design, it's so players don't have to enter an extra menu just to use 'fly'.

    If choose choice 2. It's much simpler to code (both these solution are pretty simple, but at my skill level, choice 1 would take more time). You'd just add an extra 'choice' to when the player select action on a pokemon within the 'pokemonparty screen'. So along with options such as 'fly' , there would be a 'Ride' 'Mount' whathaveyou.

    My mind is on other mechanics at the moment. At my skill level, it would take strength to get this done while someone whom known essentials and ruby for long time can do it within 20 seconds, so I'll let community try do that first before I get to it myself as it's a rather simple implementation. It's simply adding another choice and determining that choice from pkmn.species or @party.pkmn.species.join or something like that.
     
  • 232
    Posts
    7
    Years
    • Seen May 23, 2024
    Definitely as I need to eventually implement this into my own project.

    We just gotta start with like your preferences for your own project.

    Where would you like to bring up the option? The limit is your imagination. I'll give some examples.
    1. At the 'Main Menu' where it shows options like "Pokedex, Pokemon, Items, Save" etc.
    2. Within 'Pokemon Option', so when we press 'action' on pokemon party screen, we see options like 'Summary, Give Item, Fly, Teleport (if they have it) etc.
    3. Have a Flygon.png event on a map, when interacted with etc etc.

    So if choose choice 1. This is the one I'll likely implement, because it's way quicker for player to access it rather than choice 2 where they have to go into PokemonParty Menu first.
    Imagine if there was an 'option' on the 'main menu' that pretty much does "What are all the available field moves right now?" it's 'quality of life' design, it's so players don't have to enter an extra menu just to use 'fly'.

    If choose choice 2. It's much simpler to code (both these solution are pretty simple, but at my skill level, choice 1 would take more time). You'd just add an extra 'choice' to when the player select action on a pokemon within the 'pokemonparty screen'. So along with options such as 'fly' , there would be a 'Ride' 'Mount' whathaveyou.

    My mind is on other mechanics at the moment. At my skill level, it would take strength to get this done while someone whom known essentials and ruby for long time can do it within 20 seconds, so I'll let community try do that first before I get to it myself as it's a rather simple implementation. It's simply adding another choice and determining that choice from pkmn.species or @party.pkmn.species.join or something like that.

    The two simplest option! Would be very interesting!

    I trust you!
     

    JulyArt

    New Developer
  • 70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    #edit1 : alright I know the solution. it's rather simple. but I'm a dummy. I need to concatenate outside of the function.

    So I tried to do the more difficult version first, and it seems I don't understand the Pause Menu enough to debug it all the way. I'll refine it later.
    This is for anyone reading whom would like to just knock this out quickly if they understand the Pause Menu or know how to convert Specie parameter to Specie Name via PBS is the only way I can see right now.

    I can see the 'issue' now of why this isn't a 1 2 3 punch. The way PokeRide reference which mount to ride is via Modules assigned to specie name i.e. Flygon, Tauros, etc.

    However, there's no Pokemon parameter that returns the specie name as $Trainer.party[0].species returns the specie number.
    A simple workaround would be to rename Modules to the specie number, but it seems Modules cannot accept integer numbers as its 'identifier name'. If there's a way to name Modules integer string, or something, then solve. But I don't think that's possible.

    Thus, need to concatenate something like DEX"<<pkmn.specie thus returning DEX330 for Flygon for example, and finally 'working', that's the idea anyway. Can't seem to get Module to read the concatenation even though it's 'correct'.

    The choice of adding the option to Pokemon Summary screen would be way easier for sure, but the issue of converting pkmn.specie to a readable Module name would still be the roadblock I can't get over. With the solution that's on my mind anyway.

    That is, unless players don't plan to rename their PKMN, as pkmn.name returns whatever name it is. but, we all know that's not the desire goal.
     
    Last edited:
  • 232
    Posts
    7
    Years
    • Seen May 23, 2024
    #edit1 : alright I know the solution. it's rather simple. but I'm a dummy. I need to concatenate outside of the function.

    So I tried to do the more difficult version first, and it seems I don't understand the Pause Menu enough to debug it all the way. I'll refine it later.
    This is for anyone reading whom would like to just knock this out quickly if they understand the Pause Menu or know how to convert Specie parameter to Specie Name via PBS is the only way I can see right now.

    I can see the 'issue' now of why this isn't a 1 2 3 punch. The way PokeRide reference which mount to ride is via Modules assigned to specie name i.e. Flygon, Tauros, etc.

    However, there's no Pokemon parameter that returns the specie name as $Trainer.party[0].species returns the specie number.
    A simple workaround would be to rename Modules to the specie number, but it seems Modules cannot accept integer numbers as its 'identifier name'. If there's a way to name Modules integer string, or something, then solve. But I don't think that's possible.

    Thus, need to concatenate something like DEX"<<pkmn.specie thus returning DEX330 for Flygon for example, and finally 'working', that's the idea anyway. Can't seem to get Module to read the concatenation even though it's 'correct'.

    The choice of adding the option to Pokemon Summary screen would be way easier for sure, but the issue of converting pkmn.specie to a readable Module name would still be the roadblock I can't get over. With the solution that's on my mind anyway.

    That is, unless players don't plan to rename their PKMN, as pkmn.name returns whatever name it is. but, we all know that's not the desire goal.

    thanks for trying, i hope somebody knows how to make it work, however, hey ... would you know how to do some way to configure one by one? Without having to use a generic command like pokemon.species. But, use a different check like:
    pbHasSpecies? (: Tauros)
     

    JulyArt

    New Developer
  • 70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    "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.
     
    Last edited:
  • 107
    Posts
    3
    Years
    • Seen Apr 27, 2023
    "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.


    I saw that you came very close. You are able, do the simplest. If you operate through the
    Menu / Party / Pokemon would be perfect. You can do it❤️
     

    JulyArt

    New Developer
  • 70
    Posts
    3
    Years
    • Seen Dec 17, 2021
    Thank-you to STcooler once again for heavy lifting the concepts I cannot grasp yet. I managed to complete the basic, I added it to the Party Screen alongside with "Summary/Switch/Item/etc"

    Post Here
     
    Back
    Top