• 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?".
  • 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.

Simple mouse Starter selection

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
For what to use two scripts? Why? I made pretty nice and usefull how much times you want in game. Just use.

First three are species so bulba, charmander, squirtle and them graphics are next.
pbCallStarterSelect(1,4,7,"001","004","007")

if you want johto starters just use
pbCallStarterSelect(152,155,158,"152","155","158")

Just edit the values

and here is the modified code.
Code:
class PokemonStarterSelectScene

def update
pbUpdateSpriteHash(@sprites)
end

LEVEL=5#level ofstarters

def pbStartScene(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@select=0
@starter1=starter1
@starter2=starter2
@starter3=starter3
@graphic1=graphic1
@graphic2=graphic2
@graphic3=graphic3
pbSprite("bg","Graphics/Pictures/starterbg",0,0)
pbSprite("choose1","Graphics/Battlers/#{graphic1}",40,532,155)
pbSprite("choose2","Graphics/Battlers/#{graphic2}",180,532,155)
pbSprite("choose3","Graphics/Battlers/#{graphic3}",320,532,155)
pbFadeInAndShow(@sprites) { update }
end

def pbEndScene
pbFadeOutAndHide(@sprites) { update }
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end

def pbSprite(name,bitmap,x,y,opacity=255)
@sprites["#{name}"]=Sprite.new(@viewport)
@sprites["#{name}"].bitmap=BitmapCache.load_bitmap("#{bitmap}")
@sprites["#{name}"].x=x
@sprites["#{name}"].y=y
@sprites["#{name}"].opacity = opacity
end

def pbStarterSelect
loop do
Graphics.update
Input.update
self.update
case @select
when 0#choose1
@sprites["choose1"].opacity=255
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=155
when 1#choose2
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=255
@sprites["choose3"].opacity=155
when 3#choose2
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=255
when 2 #not selected
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=155
end
if not $mouse.pbMouseOver?(@sprites["choose1"]) or $mouse.pbMouseOver?(@sprites["choose2"]) or $mouse.pbMouseOver?(@sprites["choose3"])
@select=2
end
if $mouse.pbMouseOver?(@sprites["choose1"])
@select=0
end
if $mouse.pbMouseOver?(@sprites["choose2"])
@select=1
end
if $mouse.pbMouseOver?(@sprites["choose3"])
@select=3
end
if $mouse.pbMouseLeftClick?(@sprites["choose1"])
pbAddPokemon(@starter1,LEVEL)
$game_variables[7]=0
break
end
if $mouse.pbMouseLeftClick?(@sprites["choose2"])
pbAddPokemon(@starter2,LEVEL)
$game_variables[7]=1
break
end
if $mouse.pbMouseLeftClick?(@sprites["choose3"])
pbAddPokemon(@starter3,LEVEL)
$game_variables[7]=3
break
end
end
end

end

class PokemonStarterSelect

def initialize(scene)
@scene=scene
end

def pbStartScreen(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@scene.pbStartScene(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@scene.pbStarterSelect
@scene.pbEndScene
end

end

def pbCallStarterSelect(starter1=1,starter2=4,starter3=7,graphic1="001",graphic2="004",graphic3="007")
scene=PokemonStarterSelectScene.new
screen=PokemonStarterSelect.new(scene)
pbFadeOutIn(99999) { 
screen.pbStartScreen(starter1,starter2,starter3,graphic1,graphic2,graphic3)
}
end
 
Last edited:
63
Posts
11
Years
  • Seen Mar 17, 2015
For what to use two scripts? Why? I made pretty nice and usefull how much times you want in game. Just use.

First three are species so bulba, charmander, squirtle and them graphics are next.
pbCallStarterSelect(1,4,7,"001","004","007")

and here is the modified code.
Code:
class PokemonStarterSelectScene

def update
pbUpdateSpriteHash(@sprites)
end

LEVEL=5#level ofstarters

def pbStartScene(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@select=0
@starter1=starter1
@starter2=starter2
@starter3=starter3
@graphic1=graphic1
@graphic2=graphic2
@graphic3=graphic3
pbSprite("bg","Graphics/Pictures/starterbg",0,0)
pbSprite("choose1","Graphics/Battlers/#{graphic1}",40,532,155)
pbSprite("choose2","Graphics/Battlers/#{graphic2}",180,532,155)
pbSprite("choose3","Graphics/Battlers/#{graphic3}",320,532,155)
pbFadeInAndShow(@sprites) { update }
end

def pbEndScene
pbFadeOutAndHide(@sprites) { update }
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end

def pbSprite(name,bitmap,x,y,opacity=255)
@sprites["#{name}"]=Sprite.new(@viewport)
@sprites["#{name}"].bitmap=BitmapCache.load_bitmap("#{bitmap}")
@sprites["#{name}"].x=x
@sprites["#{name}"].y=y
@sprites["#{name}"].opacity = opacity
end

def pbStarterSelect
loop do
Graphics.update
Input.update
self.update
case @select
when 0#choose1
@sprites["choose1"].opacity=255
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=155
when 1#choose2
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=255
@sprites["choose3"].opacity=155
when 3#choose2
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=255
when 2 #not selected
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=155
end
if not $mouse.pbMouseOver?(@sprites["choose1"]) or $mouse.pbMouseOver?(@sprites["choose2"]) or $mouse.pbMouseOver?(@sprites["choose3"])
@select=2
end
if $mouse.pbMouseOver?(@sprites["choose1"])
@select=0
end
if $mouse.pbMouseOver?(@sprites["choose2"])
@select=1
end
if $mouse.pbMouseOver?(@sprites["choose3"])
@select=3
end
if $mouse.pbMouseLeftClick?(@sprites["choose1"])
pbAddPokemon(@starter1,LEVEL)
$game_variables[7]=0
break
end
if $mouse.pbMouseLeftClick?(@sprites["choose2"])
pbAddPokemon(@starter2,LEVEL)
$game_variables[7]=1
break
end
if $mouse.pbMouseLeftClick?(@sprites["choose3"])
pbAddPokemon(@starter3,LEVEL)
$game_variables[7]=3
break
end
end
end

end

class PokemonStarterSelect

def initialize(scene)
@scene=scene
end

def pbStartScreen(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@scene.pbStartScene(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@scene.pbStarterSelect
@scene.pbEndScene
end

end

def pbCallStarterSelect(starter1=1,starter2=4,starter3=7,graphic1="001",graphic2="004",graphic3="007")
scene=PokemonStarterSelectScene.new
screen=PokemonStarterSelect.new(scene)
pbFadeOutIn(99999) { 
screen.pbStartScreen(starter1,starter2,starter3,graphic1,graphic2,graphic3)
}
end

hhe wanted it with different pokemon and also he wanted soe other things i put i nfor him
 

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
Yeah but you could make it like mine, i t can be used multiple times 10 50 or whatever without making 50 scripts, just one.

Also script for users that not to want to use mouse. Just standard essentials

Code:
class PokemonStarterSelectScene

def update
pbUpdateSpriteHash(@sprites)
end

LEVEL=5#level ofstarters

def pbStartScene(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@select=0
@starter1=starter1
@starter2=starter2
@starter3=starter3
@graphic1=graphic1
@graphic2=graphic2
@graphic3=graphic3
pbSprite("bg","Graphics/Pictures/starterbg",0,0)
pbSprite("choose1","Graphics/Battlers/#{graphic1}",40,132,155)
pbSprite("choose2","Graphics/Battlers/#{graphic2}",180,132,155)
pbSprite("choose3","Graphics/Battlers/#{graphic3}",320,132,155)
pbFadeInAndShow(@sprites) { update }
end

def pbEndScene
pbFadeOutAndHide(@sprites) { update }
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end

def pbSprite(name,bitmap,x,y,opacity=255)
@sprites["#{name}"]=Sprite.new(@viewport)
@sprites["#{name}"].bitmap=BitmapCache.load_bitmap("#{bitmap}")
@sprites["#{name}"].x=x
@sprites["#{name}"].y=y
@sprites["#{name}"].opacity = opacity
end

def pbStarterSelect
loop do
Graphics.update
Input.update
self.update
case @select
when 0#choose1
@sprites["choose1"].opacity=255
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=155
when 1#choose2
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=255
@sprites["choose3"].opacity=155
when 2#choose2
@sprites["choose1"].opacity=155
@sprites["choose2"].opacity=155
@sprites["choose3"].opacity=255
end

if Input.trigger?(Input::LEFT) 
@select-=1 if not @select==0
end

if Input.trigger?(Input::RIGHT) 
@select+=1 if not @select==2
end

if Input.trigger?(Input::C) 
case @select
when 0#choose1
pbAddPokemon(@starter1,LEVEL)
$game_variables[7]=0
break
when 1#choose2
pbAddPokemon(@starter2,LEVEL)
$game_variables[7]=1
break
when 1#choose2
pbAddPokemon(@starter3,LEVEL)
$game_variables[7]=3
break
end
end
end

end

end

class PokemonStarterSelect

def initialize(scene)
@scene=scene
end

def pbStartScreen(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@scene.pbStartScene(starter1,starter2,starter3,graphic1,graphic2,graphic3)
@scene.pbStarterSelect
@scene.pbEndScene
end

end

def pbCallStarterSelect(starter1=1,starter2=4,starter3=7,graphic1="001",graphic2="004",graphic3="007")
scene=PokemonStarterSelectScene.new
screen=PokemonStarterSelect.new(scene)
pbFadeOutIn(99999) { 
screen.pbStartScreen(starter1,starter2,starter3,graphic1,graphic2,graphic3)
}
end
 
Last edited:

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
you don't need an script for you can make this very simple with an event

You don;t know that i mean?
I mean that you made a two copies of one script. And i made a modification of one the same script to use multiple times! So one script for much times you want.
 
378
Posts
10
Years
  • Seen Oct 18, 2017
With venom12's edits, I got this error:

Spoiler:
 

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
With venom12's edits, I got this error:

Spoiler:

Reading what your error says helps. Venom12's methods are not applicable to my regular mouse system made for regular Essentials. The names of the mouse functions have been renamed. The error report tells you that.
 
63
Posts
11
Years
  • Seen Mar 17, 2015
sorry vanom bu t dosent work
first i get aan sythex eror becouse it is imposible to but this in one line :
pbCallStarterSelect(1,4,7,"001","004","007")
Ok than i tried to make a conditional branch and this worked ,but no graphic is showen and nothing work
 
378
Posts
10
Years
  • Seen Oct 18, 2017
Luka says that venom12's script is for Essentials DS. Is there a way to port it to regular Essentials?
 

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
Luka says that venom12's script is for Essentials DS. Is there a way to port it to regular Essentials?

Yes. Look at my mouse system, look at the mouse system in Essentials DS (they are both mine anyway). Which functions (and their names) do the same thing? Rename things like "$mouse.pbMouseOver?" to just "$mouse.over?". That's not coding knowledge, it's just common sense.
 
Last edited:

Allgamesdude

The Creator of the WIP game, Pokémon Cosmic. Looki
283
Posts
11
Years
I realize that this is somewhat old. But how would I edit this script to work with non mouse essentials, as well as being able to support a choice of 6 starters at once? I have a male starter and female starter of each one of my starters with major differences. In fact, they are of their own species by themselves. How would I have six starters, maybe making it so that either the screen moves with the starter selector, or to have the player press the down key and it would go to a second row of starters which have the female starters?
 
63
Posts
11
Years
  • Seen Mar 17, 2015
With venom12's edits, I got this error:

Spoiler:

sorry for the late answering but hear is the script you need (venom12'sversion with the se and the other stuff you want).
Spoiler:
 
63
Posts
11
Years
  • Seen Mar 17, 2015
I realize that this is somewhat old. But how would I edit this script to work with non mouse essentials, as well as being able to support a choice of 6 starters at once? I have a male starter and female starter of each one of my starters with major differences. In fact, they are of their own species by themselves. How would I have six starters, maybe making it so that either the screen moves with the starter selector, or to have the player press the down key and it would go to a second row of starters which have the female starters?

it is posibal and i will look if i can make this for you .
but i'm not shure if i can make this.
 

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
I realize that this is somewhat old. But how would I edit this script to work with non mouse essentials, as well as being able to support a choice of 6 starters at once? I have a male starter and female starter of each one of my starters with major differences. In fact, they are of their own species by themselves. How would I have six starters, maybe making it so that either the screen moves with the starter selector, or to have the player press the down key and it would go to a second row of starters which have the female starters?

I posted version for non mouse. Just need to check first page.

http://www.pokecommunity.com/showpost.php?p=8171214&postcount=24
 

Allgamesdude

The Creator of the WIP game, Pokémon Cosmic. Looki
283
Posts
11
Years
Yeah I saw that, but its for two different sets of starters. In my game, you get three starters. One from the new region(fakemon) one from hoenn, and one from sinnoh. However in the new region, there are male and female forms of all starters. Such that:

Grass Starter (MALE)--Male Evolution---Male Final Stage
Grass Starter (FEMALE)--Female Evolution--Female Final Stage

Fire Starter(Male)--Male Evolution--Male FInal Stage
Fire Starter(FEMALE)--Female Evolution--Female FInal Stage

Water Starter(Male)--Male Evolution--Male Final Stage
Water Starter(Female)--Male Evolution--Male FINal Stage

You see, male and female are of a different species altogether. They not only have different stats, but they also have different
movepools and evolutions. The only thing male and female of a type share is the name.

Oh and just for clarity, the new starters will get picked first, and then hoenn, and then sinnoh. And no, all the other starters do not have new forms. Its just the new starters that are like the chart above. So, in a short and concise way of saying it...

The player chooses one of 6 starters of the region of Eros. They then get to pick one of the Hoenn starters. Finally, they get to pick one of the Sinnoh Starters.

If you need any more info lemme know. Thanks for your help so far everybody.
 

venom12

Pokemon Crystal Rain Relased
476
Posts
17
Years
  • Age 33
  • Seen Dec 28, 2023
Yeah I saw that, but its for two different sets of starters. In my game, you get three starters. One from the new region(fakemon) one from hoenn, and one from sinnoh. However in the new region, there are male and female forms of all starters. Such that:

Grass Starter (MALE)--Male Evolution---Male Final Stage
Grass Starter (FEMALE)--Female Evolution--Female Final Stage

Fire Starter(Male)--Male Evolution--Male FInal Stage
Fire Starter(FEMALE)--Female Evolution--Female FInal Stage

Water Starter(Male)--Male Evolution--Male Final Stage
Water Starter(Female)--Male Evolution--Male FINal Stage

You see, male and female are of a different species altogether. They not only have different stats, but they also have different
movepools and evolutions. The only thing male and female of a type share is the name.

Oh and just for clarity, the new starters will get picked first, and then hoenn, and then sinnoh. And no, all the other starters do not have new forms. Its just the new starters that are like the chart above. So, in a short and concise way of saying it...

The player chooses one of 6 starters of the region of Eros. They then get to pick one of the Hoenn starters. Finally, they get to pick one of the Sinnoh Starters.

If you need any more info lemme know. Thanks for your help so far everybody.

With that script yiu can even have 50 chosses of starters, so it is not limitation to two like you said. For rest you will need to script rest things myself if you wanna have choices for, gender, moves etc.
 
63
Posts
11
Years
  • Seen Mar 17, 2015
With that script yiu can even have 50 chosses of starters, so it is not limitation to two like you said. For rest you will need to script rest things myself if you wanna have choices for, gender, moves etc.
i think he mean all this 6 pokemon in one script
 
5
Posts
10
Years
  • Age 26
  • Seen Apr 19, 2015
I posted version for non mouse. Just need to check first page.



Hi, I tried your script, but I was unable to pick the last pokemon(Squirtle). I was only able to pick the two first pokemon(Bulbasaur, Charmander) I'm I doing something wrong? (Sorry, I had to delete the link since I haven't posted 15 times yet).
 
Back
Top