• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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.

Forcing a new obtain mode and characteristic

  • 59
    Posts
    9
    Years
    • Seen Aug 9, 2020
    I tried adding a new obtainmethod simply by adding a new line at
    Code:
    if pokemon.obtainMode
          mettext=
    But forcing it (.obtainMode=5) will not do anything.

    I'd also like to force a NEW characteristic (often dozes off, etc) that CANT be generated randomly like the others, but then, more trouble. Is there any simple way for this?
     
    I'm pretty sure you're in the right place.
    Code:
       if pokemon.obtainMode
          mettext=[_INTL("Met at Lv. {1}.",pokemon.obtainLevel), # obtainMode==0
                   _INTL("Egg received."), # obtainMode==1
                   _INTL("Traded at Lv. {1}.",pokemon.obtainLevel), # obtainMode==2
                   _INTL(""), # obtainMode==3
                   _INTL("Had a fateful encounter at Lv. {1}.",pokemon.obtainLevel), # obtainMode==4 # Added comma
                   _INTL("Fell from the sky."), # obtainMode==5
                   _INTL("Created in a lab.") # obtainMode==6 # Has no comma
                   ][pokemon.obtainMode]
          memo+=_INTL("<c3=404040,B0B0B0>{1}\n",mettext)
    I think obtainMode does nothing but check in summary for the "mettext" and through Conditional Branches, so you can have as many as you'd like, just remember the right syntax.
     
    As for adding a new characteristic, that doesn't really work. They're based on your IVs. Which IV is the highest determines which characteristic appears. They're not as random as they appear to be.
     
    As for adding a new characteristic, that doesn't really work. They're based on your IVs. Which IV is the highest determines which characteristic appears. They're not as random as they appear to be.

    I know that, but I hoped I could force them somehow :/
     
    Off the top of my head (with the big-flashing-angry-red-letters caveat that I've not played with these parts of Essentials and so don't know how well it'd actually work), I wonder if it would be possible to:

    1. Change the maximum possible IV to 32
    2. Ensure that pokémon can still only be randomly generated with IVs ranging from 0–31
    3. Create a new characteristic that only applies when all IVs are 32 (or when only a certain IV is 32, allowing you to create up to 6 new characteristics)
    4. When you want to give a pokémon with the new characteristic to the player, manually assign it one or more IVs of 32, as appropriate

    It sounds simple, at least, and would give you the added benefit of letting these "special characteristic" pokémon have something else special about them (slightly higher stats than normal). But again, I don't know that it would actually be simple, because I haven't looked at this part of the code at all. Maybe the IV range is more tightly tied to personality values than that, or maybe futzing with the IV range will affect something else I haven't thought of. I know the general idea behind how characteristics work in the games, but I don't know how Essentials implemented them and they may not be that trivial to alter. I would guess that these changes would be all right, but I don't know, so someone with a better understanding of the relevant code will have to weigh in, or you can check for yourself.

    I also don't know whether you want to bother changing the way IVs work at all, or whether you want these special characteristics to tie in with stronger pokémon, so even if it's possible this may not be what you're looking for. It would help if you explained what you're trying to accomplish with this new characteristic, and/or why it needs to be the characteristic that is different. Maybe there's another way to achieve your desired result without messing with IVs at all.

    EDIT: Although, really, I'd be surprised if it's truly impossible to just force a characteristic based on some other criteria. Maybe you could create some sort of special attribute that can be set for a pokémon, a simple boolean option or whatever, and then tuck the code that decides the characteristic into an if condition. In grossly-oversimplified pseudocode, something like

    Code:
    if specialAttribute = 1
        characteristic is "This characteristic is fancy and special."'
    elsif specialAttribute = 0
        characteristic is "code to generate characteristics normally goes here"
    end
    But that would require defining said new attribute for all pokémon, and so forth. Something like the way shinies are defined, perhaps, but affecting far fewer things (unless you wanted it to do something else as well). Again, I couldn't even begin to tell you exactly how to do that, but it definitely sounds possible to me. I leave it to you/someone else who knows Essentials better than I do to actually work it out.
     
    Last edited:
    Back
    Top