View Single Post
  #2807    
Old August 2nd, 2008, 10:15 PM
partyghoul2000's Avatar
partyghoul2000
Intermediate Game Designer
 
Join Date: Jan 2006
Location: USA
Age: 27
Gender: Male
Nature: Calm
Quote:
Originally Posted by fireyboy345 View Post
i need help. how do i connec maps so that i dont teleport and when ever i enter a few of my maps why does it start raining.

nvm my last comment i looked at the notes
Quote:
Originally Posted by partyghoul2000 View Post
well, make your maps. go to the debug/editor menu and go to visual editor. use the gui to put your maps together. F5 will tell you what buttons do what.
i posted that a page ago. please search the thread before asking.


anyways, i've been dinking around with some custom pokeballs and whatnot and im trying to figure out how it works and what can be used. i've been goin off of what's already in the script to make what i have so far. for those of you that can't find this, it's under PokeBattle_Battle script. here's the part to look at for customization.
Spoiler:
case ball
when PBItems::GREATBALL
rareness=(rareness*3/2).floor
when PBItems:AFARIBALL
rareness=(rareness*3/2).floor
when PBItems::ULTRABALL
rareness*=2
when PBItems::NETBALL
rareness*=3 if battler.pbHasType?(PBTypes::BUG) || battler.pbHasType?(PBTypes::WATER)
when PBItems::DIVEBALL
rareness=(rareness*7/2).floor if @environment==PBEnvironment::Underwater
when PBItems::TIMERBALL
if @turncount>30
rareness*=4
else
rareness=rareness*(@turncount+10)/10
end
when PBItems::REPEATBALL
rareness*=3 if self.pbPlayer.owned[battler.species]
when PBItems::NESTBALL
if battler.level<30
rareness*=(40-battler.level)/10
end
end
x=(((a*3-b*2)*rareness)/(a*3)).floor
if battler.status==PBStatuses:LEEP||
battler.status==PBStatuses::FROZEN
x*=2
elsif battler.status!=0
x=(x*3/2).floor
end
shakes=0
if x>255 || ball==PBItems::MASTERBALL
shakes=4
else
y = 0x000FFFF0 / (Math.sqrt(Math.sqrt( 0x00FF0000/x ) ) )
shakes+=1 if pbRandom(65536)<y
shakes+=1 if pbRandom(65536)<y
shakes+=1 if pbRandom(65536)<y
shakes+=1 if pbRandom(65536)<y
end
@scene.pbThrow(ball,shakes,battler.index)
case shakes
when 0
pbDisplay(_INTL("Oh no! The Pokemon broke free!"))
when 1
pbDisplay(_INTL("Aww... it appeared to be caught!"))
when 2
pbDisplay(_INTL("Aargh! Almost had it!"))
when 3
pbDisplay(_INTL("Shoot! It was so close, too!"))
when 4
pbDisplay(_INTL("Gotcha! {1} was caught!",pokemon.name))
@scene.pbThrowSuccess
@decision=4
if isConst?(ball,PBItems,:LUXURYBALL)
pokemon.happiness=200
end


now, just looking at it i was a tad bit confused about how rareness works. ultra ball is rareness*=2 which i gather means x2, which is what it should be. but the dive ball's is rareness=(rareness*7/2).floor. what exactly does that mean? i image it would mean 3.5, but it's an uneven percentage or is that what it should be? an uneven percentage?

another thing is the battler variable. i see that the net ball has battler.pbHasType?. what if i wanted to dictate a certain species? i tried battler.species and i got this error.
Spoiler:
Exception: ArgumentError
Message: wrong number of arguments(1 for 0)
PokeBattle_Battle:135:in `species'
PokeBattle_Battle:135:in `pbThrowPokeBall'
PokeBattle_Battle:1670:in `pbRegisterItem'
PokeBattle_Battle:2426:in `pbCommandPhase'
PokeBattle_Battle:2385:in `loop'
PokeBattle_Battle:2440:in `pbCommandPhase'
PokeBattle_Battle:2374:in `each'
PokeBattle_Battle:2374:in `pbCommandPhase'
PokeBattle_Battle:753:in `pbStartBattleCore'
PokeBattle_Battle:752:in `logonerr'


unless i was supposed to do battler.PBSpecies?. also, what if i wanted to call the battler's height or weight? would that be battler.weight & battler.height? also, what if instead of the of pokemon the trainer is battling, i wanted to get a variable or something from the trainer's pokemon? how would that be called?

and the last part of my huge post is the post-capture stuff. as you can see, the luxury ball automatically gives the pokemon 200 happiness. simple to change or add another ball with the same stat. but what if i wanted to change it's attack, speed, IVs, EVs and so on. im not too sure about the IVs and EVs but i do believe the stats would go as such:
pokemon.hp
pokemon.attack
pokemon.defense
pokemon.speed
pokemon.spattack
pokemon.spdefense

correct me if im wrong because i'd really like to know, besides all the other people asking about custom pokeballs. anyways, i know that's alot to read and answer, but i would love to hear some answers. this just might quell some n00bish questions also.

thanks in advance.

Check out my Super Gothic Bros hack here.
My ripped pokemon music in MP3 format can be found here.
My custom battle animations and whatnot can be found here.
Credit is expected, if used.