The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Pokémon Essentials
Reload this Page Discussion How Pokémon data is defined
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old January 12th, 2012 (5:48 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,133
This is a technical discussion about how particular aspects of a Pokémon (in particular, gender, nature, etc.) are defined.

As we all know (ahem), a Pokémon's personal ID number defines its gender, nature, ability and shininess. And frankly, it's irritating. There's no way to set all four for a Pokémon at the same time. The nearest we've got is something that sets gender plus nature, and abilityflag which means it doesn't need to be worried about quite as much. There's still shininess, though.

As mentioned, abilityflag exists, which is an override for the ability. It's very convenient.

What I was wondering is this: Could/should Essentials have similar override flags for gender, nature and shininess?

Pros:
# It'd be easy to change one flag without affecting the other things that depend on the personal ID number, thus making many lives easier.
# abilityflag already does it, and no one's complaining (I don't think such a thing exists in the official games).
# Considering trading and all that, compatibility isn't a problem, because a game will tend to only be compatible with itself.

Cons:
# It's not how the official games do it.
# There are still other things that depend on the personal ID number (e.g. Hidden Power), so it can't just be removed.
# If for some strange reason the flags are ignored, things go screwy (but why would they be ignored?).

Taking the flag idea to the extreme, they could even replace the personal ID-based calculations, i.e. have nature be rand(25) when the Pokémon is generated, nothing more. As mentioned, the personal ID couldn't be removed completely, but what it is used for could at least be lessened to make lives easier (because who really cares about setting a Pokémon's Hidden Power?).

Whether it's left as it is, or more flags are added (to whatever extent), Pokémon would look just the same to the player. It's just a matter of how it works in the background.

Basically, it's a question of convenience versus keeping things working like the official games.

Thoughts?
__________________
Reply With Quote

Relevant Advertising!

  #2    
Old January 12th, 2012 (5:54 PM). Edited January 12th, 2012 by Ho-oh 112.
Ho-oh 112's Avatar
Ho-oh 112 Ho-oh 112 is offline
Advance Scripter
 
Join Date: Feb 2011
Age: 20
Gender: Male
Nature: Hasty
Posts: 311
Quote:
Originally Posted by Maruno View Post
Could/should Essentials have similar override flags for gender, nature and shininess?

pokemon.nature = setNature(nature)
pokemon.abilityflag = ability
pokemon.makeShiny
pokemon.gender = gender

yet for some reason the pIDs are different,
you can write a pokemon's internal data by doing this:
define the pokemon, then do this:

p pokemon

It'll print you a fixnum of the pokemon which can be converted to a string by putting it into a ".txt" file and from a string to fixnum and added again by using "pokemon.flatten!"

Not sure if this is really what you meant by other ways to define pokemon, but here's a small thing for ya.

EDIT:
Setting the pID then the other stats would be a high chance of the same pID, I'm not sure that's why I used "high chance"
and not will

EDIT2:
No, I just tested it....

EDIT3:
How does this small code skip the process of changing the pID?:
Code:
  def abilityflag
    return @abilityflag if @abilityflag
    dexdata=pbOpenDexData
    pbDexDataOffset(dexdata,@species,29)
    ret1=dexdata.fgetb
    ret2=dexdata.fgetb
    dexdata.close
    if ret1==ret2 || ret2==0
      return 0
    end
    return (@personalID&1)
  end
__________________
Scripting Level: Advance

RMXP Poke-Essentials MySQL Trading System Link:
http://www.pokecommunity.com/showthread.php?p=7077162#post7077162

RMXP Poke-Essentials Mystery Gift Link:
http://www.pokecommunity.com/showthread.php?t=270687

RMXP Poke-Essentials Award System Link:
http://www.pokecommunity.com/showthread.php?p=7111566
Reply With Quote
  #3    
Old January 13th, 2012 (5:57 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,133
Quote:
Originally Posted by Ho-oh 112 View Post
pokemon.nature = setNature(nature)
pokemon.abilityflag = ability
pokemon.makeShiny
pokemon.gender = gender

yet for some reason the pIDs are different,
you can write a pokemon's internal data by doing this:
define the pokemon, then do this:

p pokemon

It'll print you a fixnum of the pokemon which can be converted to a string by putting it into a ".txt" file and from a string to fixnum and added again by using "pokemon.flatten!"

Not sure if this is really what you meant by other ways to define pokemon, but here's a small thing for ya.

EDIT:
Setting the pID then the other stats would be a high chance of the same pID, I'm not sure that's why I used "high chance"
and not will

EDIT2:
No, I just tested it....

EDIT3:
How does this small code skip the process of changing the pID?:
Code:
  def abilityflag
    return @abilityflag if @abilityflag
    dexdata=pbOpenDexData
    pbDexDataOffset(dexdata,@species,29)
    ret1=dexdata.fgetb
    ret2=dexdata.fgetb
    dexdata.close
    if ret1==ret2 || ret2==0
      return 0
    end
    return (@personalID&1)
  end
I don't think you get what I'm on about. Incidentally, the nature and gender lines at the top of your post are wrong - they simply can't be defined like that (although the point of this thread is to ask: why not?).

If you change a Pokémon's gender, what it actually does is change the personal ID until it comes up with one that's the required gender. Changing the personal ID will also affect nature, ability and shininess, since they all depend on it.

The line I put in red is what skips the personal ID when looking at the ability. It's pretty simple code, compared to what you've been churning out recently.
__________________
Reply With Quote
  #4    
Old January 13th, 2012 (6:24 AM).
Ho-oh 112's Avatar
Ho-oh 112 Ho-oh 112 is offline
Advance Scripter
 
Join Date: Feb 2011
Age: 20
Gender: Male
Nature: Hasty
Posts: 311
Quote:
Originally Posted by Maruno View Post
I don't think you get what I'm on about. Incidentally, the nature and gender lines at the top of your post are wrong - they simply can't be defined like that (although the point of this thread is to ask: why not?).

If you change a Pokémon's gender, what it actually does is change the personal ID until it comes up with one that's the required gender. Changing the personal ID will also affect nature, ability and shininess, since they all depend on it.

The line I put in red is what skips the personal ID when looking at the ability. It's pretty simple code, compared to what you've been churning out recently.

Why not remove it, oh yeah the hidden power....

Why not make the hidden power reliable on something else, or atleast remove the shininess/gender/nature from it.... really it doesn't bother me rightnow, but if you think you should then.... why not just make hidden power based of another atribute.....

EDIT:
Yeah sorry 'bout the error, I was getting tired....
__________________
Scripting Level: Advance

RMXP Poke-Essentials MySQL Trading System Link:
http://www.pokecommunity.com/showthread.php?p=7077162#post7077162

RMXP Poke-Essentials Mystery Gift Link:
http://www.pokecommunity.com/showthread.php?t=270687

RMXP Poke-Essentials Award System Link:
http://www.pokecommunity.com/showthread.php?p=7111566
Reply With Quote
  #5    
Old January 13th, 2012 (9:18 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,133
In addition to the four properties I've mentioned, the personal ID also determines where Spinda's spots are, how Wurmple evolves and Unown's form. Interestingly, in Gen 4 and 5, Unown's form is just another variable, and doesn't depend on the personal ID. Oh, it turns out I was wrong about Hidden Power - it depends on IVs instead.

I could change the system in an afternoon; that's not the problem. My question is whether I should. I know people like Essentials to work just like the official games, which makes sense for things that the player actually sees, but this is solely the background system. Would people care if it was changed?
__________________
Reply With Quote
  #6    
Old January 13th, 2012 (1:10 PM).
Ho-oh 112's Avatar
Ho-oh 112 Ho-oh 112 is offline
Advance Scripter
 
Join Date: Feb 2011
Age: 20
Gender: Male
Nature: Hasty
Posts: 311
Quote:
Originally Posted by Maruno View Post
In addition to the four properties I've mentioned, the personal ID also determines where Spinda's spots are, how Wurmple evolves and Unown's form. Interestingly, in Gen 4 and 5, Unown's form is just another variable, and doesn't depend on the personal ID. Oh, it turns out I was wrong about Hidden Power - it depends on IVs instead.

I could change the system in an afternoon; that's not the problem. My question is whether I should. I know people like Essentials to work just like the official games, which makes sense for things that the player actually sees, but this is solely the background system. Would people care if it was changed?

You can change the unown forms easily by using the form function right?

Spinda spots I knew was random but.... WHO REALLY CARES ABOUT EM!?!?! Ok, that's good that hidden power doesn't rely on the pID, so.... er yeah, I guess I answered the other 2 things right?
__________________
Scripting Level: Advance

RMXP Poke-Essentials MySQL Trading System Link:
http://www.pokecommunity.com/showthread.php?p=7077162#post7077162

RMXP Poke-Essentials Mystery Gift Link:
http://www.pokecommunity.com/showthread.php?t=270687

RMXP Poke-Essentials Award System Link:
http://www.pokecommunity.com/showthread.php?p=7111566
Reply With Quote
  #7    
Old January 13th, 2012 (2:30 PM).
DarkDoom3000's Avatar
DarkDoom3000 DarkDoom3000 is offline
Super Pokemon Eevee Edition
 
Join Date: Jul 2004
Location: New Zealand
Age: 24
Gender: Male
Nature: Calm
Posts: 1,692
took me a few posts to get it.

So you can't change any personal ID attributes without generating a whole new ID, thus screwing up the other attributes. In that case; yeah, make overrides for all.

You don't have to remove the PID, just make it give the defaut attributes, then have the overrides if you want something else. thus it won't effect hidden power and spinda and whatnot.
__________________
Version 0.753 is out
Thread | Website | Blog
Reply With Quote
  #8    
Old January 13th, 2012 (6:33 PM).
IceGod64's Avatar
IceGod64 IceGod64 is offline
My imagination.
 
Join Date: Oct 2008
Location: Castelia City
Age: 28
Gender: Male
Nature: Naive
Posts: 610
I say go for it; Essentials doesn't operate exactly like the base game as it is, and I'm all for convenience Vs. Accuracy.
__________________

Reply With Quote
  #9    
Old January 14th, 2012 (5:57 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,603
I don't think thats this is necessary because you can use this:
(is an example, don't try to execute)
Code:
while(true)
 pokemon.generate
 break if (pokemon.nature==nature && pokemon.gender==gender && pokemon.isShiny)
end
This can be only interesting if you think of changing the nature of a player pokémon.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:03 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.