Community

The PokéCommunity

We are still working on a better slogan!

Visit Index



Advertise here

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Notices

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.

Post Reply
 
Thread Tools
  #1    
Old January 12th, 2012, 05:48 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England

Advertise here
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?
  #2    
Old January 12th, 2012, 05:54 PM
Ho-oh 112's Avatar
Ho-oh 112
Advance Scripter
 
Join Date: Feb 2011
Age: 18
Gender: Male
Nature: Hasty
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/showthr...62#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

Last edited by Ho-oh 112; January 12th, 2012 at 06:36 PM.
  #3    
Old January 13th, 2012, 05:57 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
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.
  #4    
Old January 13th, 2012, 06:24 AM
Ho-oh 112's Avatar
Ho-oh 112
Advance Scripter
 
Join Date: Feb 2011
Age: 18
Gender: Male
Nature: Hasty
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/showthr...62#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
  #5    
Old January 13th, 2012, 09:18 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
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?
  #6    
Old January 13th, 2012, 01:10 PM
Ho-oh 112's Avatar
Ho-oh 112
Advance Scripter
 
Join Date: Feb 2011
Age: 18
Gender: Male
Nature: Hasty
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/showthr...62#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
  #7    
Old January 13th, 2012, 02:30 PM
DarkDoom3000's Avatar
DarkDoom3000
Super Pokemon Eevee Edition
 
Join Date: Jul 2004
Location: New Zealand
Age: 22
Gender: Male
Nature: Calm
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.
Beta 0.73 is out
Thread | Website | Blog
  #8    
Old January 13th, 2012, 06:33 PM
IceGod64's Avatar
IceGod64
My imagination.
 
Join Date: Oct 2008
Location: Castelia City
Age: 26
Gender: Male
Nature: Naive
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.

  #9    
Old January 14th, 2012, 05:57 PM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
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.
Post Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:15 PM.

About Us
© 2002 - 2014 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.

Copyright
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 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. Header artwork by Jordanice of deviantART.

Social Media
If you would like to stay up-to-date with us on the go, when we're down, or other such things, follow us on social media sites--most notibly Twitter, Facebook, and Google Plus--by clicking on the links provided.

Design presented by Peitharchia. Special thanks to Hiroshi Sotomura and Ausaudriel.