• 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.

Color-Changing Fakemon

26
Posts
9
Years
    • Seen Jan 30, 2016
    Alright, I know I've been asking a lot of questions lately and not really contributing much, but I'm going to try to learn Ruby when I have more time (probably over the summer), so hopefully that will change.
    However, I do have another question.
    There is a Fakemon I would like to make that can be absolutely any color (using hex values).
    I already have a base sprite, which has transparency in areas that I want to change color. Is there a way to make this base sprite layer on top of a second sprite, which would simply be a solid color and would change based on personality value?
    While I know that the best way to learn is to do it myself, I won't be able to start learning Ruby until this summer, so if you could simply help make the code and preferably also an explanation of what each part does/why it works to help me in the future ("Give a man a fish and feed him for a day; teach a man to fish and feed him for a lifetime," right? This will help me a lot more than just giving me the code, and also probably reduce the number of questions I need to ask, which is helpful to those who keep needing to answer them!), I would be extremely grateful.
    I'll obviously also provide credit in-game. ^^
    Thank you so much in advance!!


    Edit: Also, the reason I would like to use layers is because simply having RMXP draw the pixels on top as someone on a somewhat related help thread mentioned creates problems with shading, since this color is going to need to change based on shades and I think drawing pixels would create problems due to the fact that it generates the color based on personality value. If there IS a method that is easier and would still allow shading, please feel free to suggest that instead. ^^ (If it helps, the current base image I am using uses translucency for shading, which is why it can layer on top for the same effect.)
     
    Last edited:
    6
    Posts
    9
    Years
    • Seen Sep 11, 2015
    Maybe somebody better at scripting than I will write the code for you.


    I don't think the route you're thinking of going would be easy at all to do.


    I think an easier way to accomplish what you want to do would be to treat it as a form change or mega evolution. Maybe even something similar to the protean ability (where whatever event that makes your pokemon change color changes it's form).


    To do any of this you will need Sprites for each color you want and either A. someone good at scripting to create them for you or B. create them yourself. It is a very unique idea so I doubt anybody has done it before so searching around for already existing code is probably pointless.


    Again, I would gladly write the code for you if it wouldn't take me a lot longer than I'm willing to spend, so... My suggestion is to use this as an opportunity to learn how to script. It seems like any version of what you want to do would be very time consuming to make so waiting for somebody to write it for might be a bad idea but you never know, Maruno might just write it for you in 5 minutes because he's a wizard.
     
    26
    Posts
    9
    Years
    • Seen Jan 30, 2016
    I'm sorry, but since, as I said, it would be completely random and depend on personality value like Spinda, I can't make 16777216 different forms for every color possible. The reason I was asking about layers is because that can accomplish that.
    I already know how to add alternate forms, but that wouldn't add the amount of Spinda-level variety the Fakemon is supposed to have. ^^"
    I understand that it would be very time-consuming, but I feel it would be worth it and really think that having it randomly generate a color is superior in every way to having a finite number of forms to choose from (please consider that the difference is between 16777216 forms that would be automatically generated and a maximum of 256 that I would have to manually recolor, not counting Shiny for either (Shinies will just have different colors for the non-random body parts, so they won't require any additional scripting beyond the base form), and basically switching from Spinda-style randomness to Floette, which sort of undermines the Fakemon's unique trait anyway).
    Also, thank you, but as you can see in the post, I already know that it would be easier with scripting and am simply unable to do so at this time. If I have to wait until I learn to script from scratch, then that's fine, but I figured that if someone here is able to help or already knows how to do this, it would both help me get started scripting and save me from having to wait until summer.
     
    4
    Posts
    15
    Years
    • Seen Feb 24, 2015
    Disclaimer: I don't have RMXP+Essentials so I can't tell you anything about how to do it specifically with what you've got.

    I would assume the gist of how you would script something like this is to convert your sprite to HSV or HSVA from RGB/RGBA (just search RGB to HSV, it's a common beginner CS homework problem) then vary the hue of your base sprite and redraw to get any color. Bam, all your shading kept with no need for transparency. The only caveat is that your outlines, if not black, will also change color. If you're picky about that, then you can just do the same with with a base-color-back sprite as you mentioned and do pixel-by-pixel addition if there isn't already such a function in RMXP.
     
    Last edited:
    1,224
    Posts
    10
    Years
  • I'm sorry, but since, as I said, it would be completely random and depend on personality value like Spinda, I can't make 16777216 different forms for every color possible. The reason I was asking about layers is because that can accomplish that.
    I already know how to add alternate forms, but that wouldn't add the amount of Spinda-level variety the Fakemon is supposed to have. ^^"
    I understand that it would be very time-consuming, but I feel it would be worth it and really think that having it randomly generate a color is superior in every way to having a finite number of forms to choose from (please consider that the difference is between 16777216 forms that would be automatically generated and a maximum of 256 that I would have to manually recolor, not counting Shiny for either (Shinies will just have different colors for the non-random body parts, so they won't require any additional scripting beyond the base form), and basically switching from Spinda-style randomness to Floette, which sort of undermines the Fakemon's unique trait anyway).
    Also, thank you, but as you can see in the post, I already know that it would be easier with scripting and am simply unable to do so at this time. If I have to wait until I learn to script from scratch, then that's fine, but I figured that if someone here is able to help or already knows how to do this, it would both help me get started scripting and save me from having to wait until summer.

    From what I gather, the easiest way would be to create a method that uses your two base sprites, colors the bottom one, and then puts the two together. Then save it as your battler graphic. This should be fairly easy, but I'm not sure how often you need it to recreate the sprite. The best way would be to add it to this

    Code:
    def pbCheckPokemonBitmapFiles(params)
      [COLOR="Red"]if params[0]==getID(PBSpecies,:YOURPOKE) #params[0] is the species in this case
          makeSpriteHere(any,params)#might want to include whether it's shiny or not, and any other things
      end[/COLOR]
    end
    remembering that you have to make the back sprite too
     
    Back
    Top