• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!

New guy needs help (please)

Fil

Novice
Member
Joined
Jul 11, 2024
Posts
12
Hi to everyone,
i don't find any section to introduce myself, so i hope i'm doing everything in the right way.
I am Italian, so I could misspell something or do any sort of funny mistake, in that case educate me, i'll appreciate that.
I fiddle around rpgmaker since my adolescence (i'm 32 now) and i have lot of experience with RPGM XP. But i really never need to go deep in the scripts, so even if i am very good in event, variable, switch and all that stuff, i don't know anything about ruby and Essential is still a little hard to me.
When i was younger i knew of its existence, but i didn't understand english enough to try an approach to it. Now i glad that this community is still alive and i really hope to find some casual support and a lot of fun games to try. Of course i don't have all the time i have in the past, but my project waited for so much in the background of my mind i don't have any rush eather.
I've done some pixel art, modifying trees and some beautifull tilset by Ekat, creating some statues and ruins. I've also done some chara, animations for a new move, a new legendary, ecc. I've downloaded some of the amazing script founded here, everything seems to work smoothly... but i need some help to make somethings work the way i really want. And i hope that in a few time i'll be able to stand on my own feet.

The bike, for start, there is a script command, or anything like that, that can force a check before letting you mount, if one between some species of pokèmon are in your party, and then and only then letting you ride?
I've try fiddling around Game_Player script section, in def pbCanUseBike?, def pbMountBike, def pbDismountBike, ecc., and i try to add if conditions for stuff like player.has_species?(:XXX,XXX,XXX), but i don't think i suppose to use the dollar stuff in this way. Feeling stupid. It was amazing if i just can undestrand how to make simple script, event runned or not, that can check if you have a pokèmon in the party, or if you have captured some specific Unown form before letting you do stuff, or use an item.
Please help.
 
Last edited:

Atlat

Novice
Member
Joined
Jan 8, 2023
Posts
30
Try adding these lines to here.
def pbCanUseBike?(map_id)
map_metadata = GameData::MapMetadata.try_get(map_id)
return false if !$player.has_species?(:SPECIES,FORM) <--- ADD
return false if !map_metadata
return map_metadata.always_bicycle || map_metadata.can_bicycle || map_metadata.outdoor_map
end

def pbMountBike
return if $PokemonGlobal.bicycle
----------------------------------------------------------------------------
(Bit fancier if you want a message, but at least have the first line with a return in not the message)
if !$player.has_species?(:SPECIES,FORM)
pbMessage("You do not have the required Pokémon for biking.")
return
end
----------------------------------------------------------------------------
$PokemonGlobal.bicycle = true
$stats.cycle_count += 1
pbUpdateVehicle
bike_bgm = GameData::Metadata.get.bicycle_BGM
pbCueBGM(bike_bgm, 0.4) if bike_bgm
pbSEPlay("Bicycle")
pbPokeRadarCancel
end
 
  • Like
Reactions: Fil

Fil

Novice
Member
Joined
Jul 11, 2024
Posts
12
Hey, thanks for your reply and for trying.
However, that dosen't work. If you don't have the correct pokèmon(s), message shows up, but after that you still mount your bike. Could be a Debug Mode stuff? Dunno, but thanks again for your tryin'.
 
Last edited:

Atlat

Novice
Member
Joined
Jan 8, 2023
Posts
30
Can you go into more depth about how you're using the bike in this case and if you have any other plugins I should know about? Because this works perfectly fine for me. Make sure the return is in that if statement.
 

Fil

Novice
Member
Joined
Jul 11, 2024
Posts
12
Thank you, it's working! 🦄
I put both the lines you suggested and this is create some kind of conflict, i didn't immidiatly understand they were alternatives.
How you suggest to add more then one species? I see that (:XXX || :XXX) dosen't work.
I copy paste this part for all the species that can let you biking? They're a lot.

Ruby:
Expand Collapse Copy
if !$player.has_species?(:SPECIES,FORM)
pbMessage("You do not have the required Pokémon for biking.")
return
end

Maybe i should use some kind of flag in the pokèmon PBS, instead, to call all the species with less redundancy?
 

Atlat

Novice
Member
Joined
Jan 8, 2023
Posts
30
You could, but note that symbols like || or && can't go inside the parameters. What you're looking for is something like !([imath]player.has_species(parameters) ||[/imath]player.has_species(parameters)) Though looking at your message in the if statement, it sounds like you require multiple species to use your bike. Either the message should be modified to make it clear that there are options or change the || in the if statement above to &&.
 
  • Like
Reactions: Fil

Fil

Novice
Member
Joined
Jul 11, 2024
Posts
12
I probably poorly explain myself, sorry for that.
It's not like you need multiple species, but you need at least one pokèmon in your party which must be of a species among certain predetermined species.
Of course the pbMessage will be modify to make everything more clear, but that's not the hard part.
 

Fil

Novice
Member
Joined
Jul 11, 2024
Posts
12
It works, with appropriates $ and ? it finally works 🥹
I have to make a very long string, not very elegant probably, but it works, so i'm very happy...
i also learn how to use ( ) in if-conditional with || and &&, so it's also very instructive. Thank you! 🦄🍩
 
Back
Top