• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Custom Feature Question] bag

etique

etique
  • 266
    Posts
    7
    Years
    • Seen Oct 30, 2022
    my game is based on Pokémon Ruby, with 3 options of players (Brendan, May and Wally), I wanted each one to have a type of bag, for a first player (bag1), second player (bag1f) and for the third player? ???
     
    did not give to understand my doubt ... but already looked at everything and I do not know how to do
     
    I guess you are using v16, because v17 has a different naming scheme.
    you'll need to find the equivalent of these lines in PScreen_Bag in your copy of the game. (Best bet is looking for the $Trainer.isFemale?)
    Code:
      def pbRefresh
        # Set the background image
        @sprites["background"].setBitmap(sprintf("Graphics/Pictures/Bag/bg_#{@bag.lastpocket}"))
        # Set the bag sprite
        fbagexists = pbResolveBitmap(sprintf("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_f"))
        if $Trainer.isFemale? && fbagexists
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_f")
        else
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}")
        end
    Then you'll have to edit it to use the trainertype, because you can't check male/female as Wally is male.
    I'd give an example but your code might be different anyway.
     
    and putting the mixed option to wally? it would not be neither male nor female. How could I do this?
     
    and putting the mixed option to wally? it would not be neither male nor female. How could I do this?

    Yeah, I guess you can set wally to unknown. Just be aware that this will affect wally's text color.
    Code:
      def pbRefresh
        # Set the background image
        @sprites["background"].setBitmap(sprintf("Graphics/Pictures/Bag/bg_#{@bag.lastpocket}"))
        # Set the bag sprite
        fbagexists = pbResolveBitmap(sprintf("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_f"))
        ubagexists = pbResolveBitmap(sprintf("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_u"))
        if $Trainer.isFemale? && fbagexists
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_f")
        elsif $Trainer.gender==2 && ubagexists
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_u")
        else
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}")
        end
    But remember, this code is for a different version of essentials, or at least a different naming scheme.
    it looks for the bag in Pictures/Bag, and in the format bag_1, bag_1_f (for female), or bag_1_u (for unknown gender)
     
    Yeah, I guess you can set wally to unknown. Just be aware that this will affect wally's text color.
    Code:
      def pbRefresh
        # Set the background image
        @sprites["background"].setBitmap(sprintf("Graphics/Pictures/Bag/bg_#{@bag.lastpocket}"))
        # Set the bag sprite
        fbagexists = pbResolveBitmap(sprintf("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_f"))
        ubagexists = pbResolveBitmap(sprintf("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_u"))
        if $Trainer.isFemale? && fbagexists
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_f")
        elsif $Trainer.gender==2 && ubagexists
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}_u")
        else
          @sprites["bagsprite"].setBitmap("Graphics/Pictures/Bag/bag_#{@bag.lastpocket}")
        end
    But remember, this code is for a different version of essentials, or at least a different naming scheme.
    it looks for the bag in Pictures/Bag, and in the format bag_1, bag_1_f (for female), or bag_1_u (for unknown gender)
    I will not be home these days, just Monday, "this will affect the color of the wally text" why? there's no other way? Thank you!
     
    You can use "$Trainer.trainertype" instead of "$Trainer.isFemale?" to determine which Graphic to use. Since every choosable Character should have its own trainertype anyway, this shouldn't be a problem. Just make sure to you use the ID number of the trainertype (e.g the male and female player both have the id numbers 000 and 001 respectively) instead of the internal name.

    Although you can just use "$Trainer.trainerTypeName" and then the internal name instead.
     
    Back
    Top