1. Yes! After line 'attr_reader :form' add 'attr_reader :shiny'. After line '@form=pokemon.form' add '@shiny=pokemon.isShiny?'. ChangeMan, I really love this script, thanks a lot! I've been tinkering with it and made some graphics to go with my Summary page layouts, and I really like the results. I still have to tweak them, but it's coming along.
However, I do have a couple of questions in case you have any quick ideas for some solutions.
1) Is it possible for this to display the icons for shiny Pokemon, if any of the parents/grandparents were shiny? I tested it, and it just shows the regular icon even if I made one of them shiny prior to breeding. It's just a small detail, but I would love it if there was a way to implement that. Other forms still display (Such as Rotom's forms), so I was wondering if this would be a simple thing to add.
2) When breeding with Ditto, is there some way to make it so Ditto always takes the 'role' of the gender opposite it's partner (in terms of how it's displayed on the page)? I ask this because of my attached screenshot.
You'll notice that Gardevoir's grandfather on her father's side is a Jellicent (named Majellyn here). It's a male Jellicent. However, since I bred it with a Ditto, the Ditto by default assumes the 'role' of the male (I assume?), and thus the male Jellicent now displays as a female Jellicent; despite sitting in the slot designated for the male parent. Or something like that. It's just an odd visual quirk that is slightly annoying given my layout, and if there is an easy way to resolve this, that would be great (though something tells me it's more trouble than its worth).
3) This question isn't really specific to this script, but I was wondering if there was a way to resize certain icon sprites on the page? I just want to shrink the grandparent's sprites down so they're smaller than the parent's sprites. I assume i have to use zoom=0.5 or something like that, I'm just not sure how to implement it.
iconParentParam = parent ? [parent.species,
parent.gender==1,false,parent.form,false] : [0,0,false,0,false]'
iconParentParam = parent ? [parent.species,
parent.gender==1,parent.shiny,parent.form,false] : [0,0,false,0,false]'
iconGrandParam = parent && parent[j] ? [parent[j].species,
parent[j].gender==1,false,parent[j].form,false] :
[0,0,false,0,false]
iconGrandParam = parent && parent[j] ? [parent[j].species,
parent[j].gender==1,parent.shiny,parent[j].form,false] :
[0,0,false,0,false]
# switch the parent position in Ditto case.
if @mother && @mother.gender==0 # male
temporary = @mother
@mother = @father
@father = temporary
end
if @father && @father.gender==1 # female
temporary = @mother
@mother = @father
@father = temporary
end
overlay.blt(
grandX[j],68+parentsY[i],iconGrand.bitmap,Rect.new(0,0,64,64))
overlay.stretch_blt(Rect.new(grandX[j],68+parentsY[i],32,32),
iconGrand.bitmap,Rect.new(0,0,64,64))
i have this error :S , i cant run my game
Spoiler:![]()
and if i erase this line
Spoiler:![]()
i have this error when i wan to see the family tree
Spoiler:![]()
you can help me TT_TT please
PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,@pokemon,31)
compat10=dexdata.fgetb
compat11=dexdata.fgetb
eggGroupArray=[
nil,_INTL("Monster"),_INTL("Water1"),_INTL("Bug"),_INTL("Flying"),
_INTL("Ground"),_INTL("Fairy"),_INTL("Plant"),_INTL("Humanshape"),
_INTL("Water3"),_INTL("Mineral"),_INTL("Indeterminate"),
_INTL("Water2"),_INTL("Ditto"),_INTL("Dragon"),_INTL("No Eggs")
]
eggGroups = compat10==compat11 ? eggGroupArray[compat10] :
_INTL("{1}, {2}",eggGroupArray[compat10],eggGroupArray[compat11])
textpos=[
[_INTL("Group: {1}",eggGroups),200,354,0,base,shadow],
]
dexdata.close
I guess that you biggest problem is that pbDexDataOffset second paramether must be the Pokémon index number (species) and you are passing a PokeBattle_Pokemon instance.Nice! Thanks a lot, everything works exactly how I want now! It's really starting to come together.
One last thing though, if you don't mind...
I'm thinking it would be cool if you could display the Pokemon's Egg Groups on this page, since it's relevant information to go along with this. I've been trying to figure out how to implement this (I made a thread asking for help in the Essentials forum, but I'm not expecting a response anytime soon).
By working off existing scripts that I've found, this is what I've come up with so far:
Code:dexdata=pbOpenDexData pbDexDataOffset(dexdata,@pokemon,31) compat10=dexdata.fgetb compat11=dexdata.fgetb eggGroupArray=[ nil,_INTL("Monster"),_INTL("Water1"),_INTL("Bug"),_INTL("Flying"), _INTL("Ground"),_INTL("Fairy"),_INTL("Plant"),_INTL("Humanshape"), _INTL("Water3"),_INTL("Mineral"),_INTL("Indeterminate"), _INTL("Water2"),_INTL("Ditto"),_INTL("Dragon"),_INTL("No Eggs") ] eggGroups = compat10==compat11 ? eggGroupArray[compat10] : _INTL("{1}, {2}",eggGroupArray[compat10],eggGroupArray[compat11]) textpos=[ [_INTL("Group: {1}",eggGroups),200,354,0,base,shadow], ] dexdata.close
But I'm not sure how to implement it, or if I'm even on the right track. I'd appreciate it if you could point me in the right direction!
The attached screenshot is just to show where I'm thinking I could display the information (also showing off all your fixes!)
def getEggGroupString(species)
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,species,31)
compat10=dexdata.fgetb
compat11=dexdata.fgetb
eggGroupArray=[
nil,_INTL("Monster"),_INTL("Water1"),_INTL("Bug"),_INTL("Flying"),
_INTL("Ground"),_INTL("Fairy"),_INTL("Plant"),_INTL("Humanshape"),
_INTL("Water3"),_INTL("Mineral"),_INTL("Indeterminate"),
_INTL("Water2"),_INTL("Ditto"),_INTL("Dragon"),_INTL("No Eggs")
]
ret = compat10==compat11 ? eggGroupArray[compat10] :
_INTL("{1}, {2}",eggGroupArray[compat10],eggGroupArray[compat11])
dexdata.close
return ret
end
I guess that you biggest problem is that pbDexDataOffset second paramether must be the Pokémon index number (species) and you are passing a PokeBattle_Pokemon instance.
Add this def on your script.
Code:def getEggGroupString(species) dexdata=pbOpenDexData pbDexDataOffset(dexdata,species,31) compat10=dexdata.fgetb compat11=dexdata.fgetb eggGroupArray=[ nil,_INTL("Monster"),_INTL("Water1"),_INTL("Bug"),_INTL("Flying"), _INTL("Ground"),_INTL("Fairy"),_INTL("Plant"),_INTL("Humanshape"), _INTL("Water3"),_INTL("Mineral"),_INTL("Indeterminate"), _INTL("Water2"),_INTL("Ditto"),_INTL("Dragon"),_INTL("No Eggs") ] ret = compat10==compat11 ? eggGroupArray[compat10] : _INTL("{1}, {2}",eggGroupArray[compat10],eggGroupArray[compat11]) dexdata.close return ret end
So, if you call 'getEggGroupString(parent[j].species)' (on the right spot where 'parent' and 'j' exist, of course), this will return you the Egg Group formatted.
Sorry, I didn't notice your message. Just copy the script using "Show Printable Version" option and follow the instructions.I'm having a problem with this script. When it comes to loading the game, it reads the line on 677 and throws an error. Syntax Error occurred.
Here's what I have in that area.
676 def drawPageFive(pokemon)
677 when 5
678 drawPageSix(@pokemon)
679 overlay=@sprites["overlay"].bitmap
680 overlay.clear
Exact as Super Dedenne said. The load script is called on pbSetUpSystem() on PokemonSystem, so, if you put any class below this section that have an instance on any part of save data, you got this error. I've warned Maruno long time ago.It's a great script, good work.
I tested it in various ways to see if i got errors. This script works fine but if i have a pokemon in the party that have parents in summary family tree page, when i close the game and open again, this errors appear before the tittle screen, after i press ok in all messages, the game runs nice.
Is that a way to fix this?
![]()
Exception: NoMethodError
Message: undefined method `name' for nil:NilClass
PField_Field:1695
PField_Field:1688:in `call'
Event:54:in `trigger'
Event:49:in `each'
Event:49:in `trigger'
PField_Map:617:in `setMapChanging'
PField_Map:594:in `setup'
PScreen_Load:365:in `pbStartLoadScreen'
PScreen_Load:335:in `open'
PScreen_Load:335:in `pbStartLoadScreen'
Updated and tested.I'm sorry I know this thread is old, but I tried putting in this script (using v16.1). When I go into the Pokemon Summary screen I get this error.
Code:Exception: NoMethodError Message: undefined method `name' for nil:NilClass PField_Field:1695 PField_Field:1688:in `call' Event:54:in `trigger' Event:49:in `each' Event:49:in `trigger' PField_Map:617:in `setMapChanging' PField_Map:594:in `setup' PScreen_Load:365:in `pbStartLoadScreen' PScreen_Load:335:in `open' PScreen_Load:335:in `pbStartLoadScreen'
You probably done something wrong/missed a step, since this tutorial was tested with 16.1. Redo the steps.Hello
I put the script and I have done all the modifications but I can't access to the family tree summary page. It doesn't says any error. I am working with the 16.1 version.
Thanks!