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

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.
5
Posts
14
Years
  • Seen Jul 7, 2010
Very big thank you to both of you, this helped and I found my values. =)

It appears, that Charmander is too high now. The Y-Coord in the pokemon.txt file is right, it pops out at the right point but when I chose my command, it hops to a higher place...
 
Last edited:

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
Very big thank you to both of you, this helped and I found my values. =)

It appears, that Charmander is too high now. The Y-Coord in the pokemon.txt file is right, it pops out at the right point but when I chose my command, it hops to a higher place...

Can you provide another screenie? I edited my code with some changes i didnt give you, but if you give me a idea of your problem i can give you a fix. Also post your script please.
 
5
Posts
14
Years
  • Seen Jul 7, 2010
(I watched, that most Poke like Piplup and Chelast don't have this problem. Pikachu is about 2 point too high and Shiggy/Charmander are way too high... I'm confused.)

Here are 2 screens. When battle begins and the Poke comes out its ball, it's at the right place. As soon as I can command, it switches to the high position (where it bumps up and down as it should). When I am about to switch it out, the pic is shortly shown at the starting (right) position.

Screen 1 - calling Charmander out:
h ttp://poketeam.square7.ch/charmander1.png

Screen 2 - choose command
h ttp://poketeam.square7.ch/charmander2.png

Part of the script (I copied a bigger part, maybe it helps)

Code:
class PokemonBattlerSprite < RPG::Sprite
 attr_accessor :selected
 def initialize(doublebattle,index,viewport=nil)
  super(viewport)
  @selected=0
  @frame=0
  @index=index
  @updating=false
  @doublebattle=doublebattle
  @index=index
  @spriteX=0
  @spriteY=0
  @spriteYExtra=0
  @spriteVisible=false
  @_iconbitmap=nil
  self.visible=false
 end
 def selected=(value)
  if @selected==1 && value!=1 && @spriteYExtra>0
   self.y=@spriteY-@spriteYExtra
   @spriteYExtra=0
  end
  @selected=value
 end
 def visible=(value)
  @spriteVisible=value if !@updating
  super
 end
 def x=(value)
  @spriteX=value if !@updating
  super
 end
 def y=(value)
  @spriteY=value if !@updating
  super
 end
 def update
  @frame+=1
  @updating=true
  if ((@frame/9).floor&1)==1 && @selected==1 # When choosing commands for this Pokémon
   @spriteYExtra=2
  else
   @spriteYExtra=0
  end
[COLOR=Green]if ((@frame/9).floor&1)==1 && @selected==1 # When choosing commands for this Pokémon
   self.x=@spriteX
   self.y=108
   self.visible=@spriteVisible
   elsif @selected==1
   self.x=@spriteX
   self.y=110
   self.visible=@spriteVisible
  elsif @selected==2 # When targeted or damaged
   self.x=@spriteX
   self.y=@spriteY
   self.visible=(@frame%10<7)
  elsif 
   self.x=@spriteX
   self.y=@spriteY
   self.visible=@spriteVisible
  end[/COLOR]
  if @_iconbitmap
   @_iconbitmap.update
   self.bitmap=@_iconbitmap.bitmap
  end
  @updating=false
 end
 def dispose
  @_iconbitmap.dispose if @_iconbitmap
  @_iconbitmap=nil
  self.bitmap=nil if !self.disposed?
  super
 end
 def setPokemonBitmap(pokemon,back=false)
  @_iconbitmap.dispose if @_iconbitmap
  @_iconbitmap=pbLoadPokemonBitmap(pokemon,back)
  self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
 end
 def setPokemonBitmapSpecies(pokemon,species,back=false)
  @_iconbitmap.dispose if @_iconbitmap
  @_iconbitmap=pbLoadPokemonBitmapSpecies(pokemon,species,back)
  self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
 end
end
 

Yusshin

♪ Yggdrasil ♪
2,414
Posts
14
Years
Hi, hi! I'm very appreciative for this starter kit! but I have a question; all the sprites are positioned correctly in wild battles, but when a trainer sends out a Pokemon, the opponent's Pokemon is way too far up, and sometimes, it cuts the sprite in 1/2.

Is that a known bug or is that just me? I haven't touched any scripts; I'm paranoid about touching the scripts.

This happens with ALL Pokemon sent out by trainers; not just a few.
 
20
Posts
14
Years
  • Seen Jul 2, 2013
Hey, I wanted to use an animated title screen, and the notes say to use an animated gif, however I've tried naming it "pic_1.gif", "pic_1.png", and even making it an animated png, but nothing works.

Alternatively, if someone could give me an example script on how to do a frame-by-frame animated title screen, that would also be swell.

Can anyone help me?
 

carmaniac

Where the pickle surprise at?
671
Posts
15
Years
Hey, I wanted to use an animated title screen, and the notes say to use an animated gif, however I've tried naming it "pic_1.gif", "pic_1.png", and even making it an animated png, but nothing works.

Alternatively, if someone could give me an example script on how to do a frame-by-frame animated title screen, that would also be swell.

Can anyone help me?

You don't need a script to do this; simply save your animation as a .gif but when saving it do it like this file name:

(insert name here).png so that way it's an gif file with a .png extension to it.

EDIT:
Didn't read your post properly, have you made sure it's spelt Pic_1 with a capital P?
 

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
(I watched, that most Poke like Piplup and Chelast don't have this problem. Pikachu is about 2 point too high and Shiggy/Charmander are way too high... I'm confused.)

Here are 2 screens. When battle begins and the Poke comes out its ball, it's at the right place. As soon as I can command, it switches to the high position (where it bumps up and down as it should). When I am about to switch it out, the pic is shortly shown at the starting (right) position.

Something is off then... the script is correct. Your values must be off then. try toying with the values

EDIT: I figured out your issue vi-black, for some reason your screen size is affecting the sprite position. I didnt search to find out why but i know what caused your bug now either you wait for someone to fix it I might if I get free time but its not a promise or adjust your screensize to fix your problem of course this can affect the type of game you want but its entirely up to you.
 
Last edited:
5
Posts
14
Years
  • Seen Jul 7, 2010
EDIT: I figured out your issue vi-black, for some reason your screen size is affecting the sprite position.

My Screen size?
1440*900 px? Do you mean this? But I can't change that.. if I do, everything looks just stupid -.-'
(When I change the screen size in the options menu of the kit, the window size changes, but the problem is still there)

Plan B:
What about changing the pictures? I looked at the sprites and noticed, that Charmander is really a space higher then piplup. If I changed all Poke to the same position in their pictures it would work, wouldn't it?
h ttp://poketeam.square7.ch/trick17.png

My (hopyfully) last question:
Imagine I would create a game with this and create the game file. I give it to someone and he/she installs the game, wants to play it. Will he/she see the game as I did?
Or does it again depend on his/her screensize/resolution? Because in that case, the picture work would be waste of time.
 
Last edited:
20
Posts
14
Years
  • Seen Jul 2, 2013
You don't need a script to do this; simply save your animation as a .gif but when saving it do it like this file name:

(insert name here).png so that way it's an gif file with a .png extension to it.

EDIT:
Didn't read your post properly, have you made sure it's spelt Pic_1 with a capital P?

Yeah, I have used capitals, just doesn't work. Opens the game, then proceeds to crash. The gif is about 17 seconds long; is it too long or something?
 

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
My Screen size?
1440*900 px? Do you mean this? But I can't change that.. if I do, everything looks just stupid -.-'
(When I change the screen size in the options menu of the kit, the window size changes, but the problem is still there)

Plan B:
What about changing the pictures? I looked at the sprites and noticed, that Charmander is really a space higher then piplup. If I changed all Poke to the same position in their pictures it would work, wouldn't it?
h ttp://poketeam.square7.ch/trick17.png

My (hopyfully) last question:
Imagine I would create a game with this and create the game file. I give it to someone and he/she installs the game, wants to play it. Will he/she see the game as I did?
Or does it again depend on his/her screensize/resolution? Because in that case, the picture work would be waste of time.

they will see what you let them. If you change the screensize then disable the option in the options menu so they cant change it. As for the graphice give it a shot. It never hurts to try.
 

Maruno

Lead Dev of Pokémon Essentials
5,285
Posts
16
Years
(I watched, that most Poke like Piplup and Chelast don't have this problem. Pikachu is about 2 point too high and Shiggy/Charmander are way too high... I'm confused.)

Here are 2 screens. When battle begins and the Poke comes out its ball, it's at the right place. As soon as I can command, it switches to the high position (where it bumps up and down as it should). When I am about to switch it out, the pic is shortly shown at the starting (right) position.

Screen 1 - calling Charmander out:
h ttp://poketeam.square7.ch/charmander1.png

Screen 2 - choose command
h ttp://poketeam.square7.ch/charmander2.png

Part of the script (I copied a bigger part, maybe it helps)

Code:
class PokemonBattlerSprite < RPG::Sprite
 attr_accessor :selected
 def initialize(doublebattle,index,viewport=nil)
  super(viewport)
  @selected=0
  @frame=0
  @index=index
  @updating=false
  @doublebattle=doublebattle
  @index=index
  @spriteX=0
  @spriteY=0
  @spriteYExtra=0
  @spriteVisible=false
  @_iconbitmap=nil
  self.visible=false
 end
 def selected=(value)
  if @selected==1 && value!=1 && @spriteYExtra>0
   self.y=@spriteY-@spriteYExtra
   @spriteYExtra=0
  end
  @selected=value
 end
 def visible=(value)
  @spriteVisible=value if !@updating
  super
 end
 def x=(value)
  @spriteX=value if !@updating
  super
 end
 def y=(value)
  @spriteY=value if !@updating
  super
 end
 def update
  @frame+=1
  @updating=true
  if ((@frame/9).floor&1)==1 && @selected==1 # When choosing commands for this Pokémon
   @spriteYExtra=2
  else
   @spriteYExtra=0
  end
[COLOR=Green]if ((@frame/9).floor&1)==1 && @selected==1 # When choosing commands for this Pokémon
   self.x=@spriteX
   self.y=108
   self.visible=@spriteVisible
   elsif @selected==1
   self.x=@spriteX
   self.y=110
   self.visible=@spriteVisible
  elsif @selected==2 # When targeted or damaged
   self.x=@spriteX
   self.y=@spriteY
   self.visible=(@frame%10<7)
  elsif 
   self.x=@spriteX
   self.y=@spriteY
   self.visible=@spriteVisible
  end[/COLOR]
  if @_iconbitmap
   @_iconbitmap.update
   self.bitmap=@_iconbitmap.bitmap
  end
  @updating=false
 end
 def dispose
  @_iconbitmap.dispose if @_iconbitmap
  @_iconbitmap=nil
  self.bitmap=nil if !self.disposed?
  super
 end
 def setPokemonBitmap(pokemon,back=false)
  @_iconbitmap.dispose if @_iconbitmap
  @_iconbitmap=pbLoadPokemonBitmap(pokemon,back)
  self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
 end
 def setPokemonBitmapSpecies(pokemon,species,back=false)
  @_iconbitmap.dispose if @_iconbitmap
  @_iconbitmap=pbLoadPokemonBitmapSpecies(pokemon,species,back)
  self.bitmap=@_iconbitmap ? @_iconbitmap.bitmap : nil
 end
end
The green part in your code (the bit you added) describes where the back sprites are when they're bobbing up and down. This is different to where the back sprite appears from the Poké Ball. Your problem here is that your 108 (in the green code) and the back sprite's "@spritey" are different.

Find where "@spritey" is set for the back sprites. You'll find this towards the top of "class PokeballPlayerSendOutAnimation". If I'm right, it's initially set to 96 but then is changed by a few other things (for me, it's +Graphics.height-320, +metrics*2, +128). Figure out what 96 + 128 comes to, and replace your 108 with "224+(Graphics.height-320)". Here we're assuming a metric of zero (steps 2 and 3 make this true). Your other number in green (110) is just the first number plus 2.

That's step one. Step two is to edit every back sprite picture so that it's sitting on the bottom of the picture (i.e. no gap at the bottom). Aside from it being tedious, there should be no problem here.

Step three is to edit pokemon.txt and set all "BattlerPlayerY" to zero. This means you don't have to worry about the metrics value in the calculation above.

This is by no means an explanation of what's going on. It's a description of what you should do. Note that this only works in theory - I haven't tried exactly this myself. If I'm right, it should work fine regardless of how big the game window is (so you can change the game's resolution in the Options menu without worrying about messing up the battle screen).

When KingCharizard mentioned "screen size", he meant how big the game's window is (default 320x240), not how big your monitor is.
 

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
The green part in your code (the bit you added) describes where the back sprites are when they're bobbing up and down. This is different to where the back sprite appears from the Poké Ball. Your problem here is that your 108 (in the green code) and the back sprite's "@spritey" are different.

Find where "@spritey" is set for the back sprites. You'll find this towards the top of "class PokeballPlayerSendOutAnimation". If I'm right, it's initially set to 96 but then is changed by a few other things (for me, it's +Graphics.height-320, +metrics*2, +128). Figure out what 96 + 128 comes to, and replace your 108 with "224+(Graphics.height-320)". Here we're assuming a metric of zero (steps 2 and 3 make this true). Your other number in green (110) is just the first number plus 2.

That's step one. Step two is to edit every back sprite picture so that it's sitting on the bottom of the picture (i.e. no gap at the bottom). Aside from it being tedious, there should be no problem here.

Step three is to edit pokemon.txt and set all "BattlerPlayerY" to zero. This means you don't have to worry about the metrics value in the calculation above.

This is by no means an explanation of what's going on. It's a description of what you should do. Note that this only works in theory - I haven't tried exactly this myself. If I'm right, it should work fine regardless of how big the game window is (so you can change the game's resolution in the Options menu without worrying about messing up the battle screen).

When KingCharizard mentioned "screen size", he meant how big the game's window is (default 320x240), not how big your monitor is.

That may work, He said its a theory and ideally it should work but I wouldn't go messing with too much if you dont know how. You do have a problem and it does need to be fixed but after you fix it I'd reccomend not messing with the scripts unless they need to be. Yeah i ment window size sorry about that shoulda been more clear.

@Ongekibou I think its a problem with the way the newer version of the kit handles gifs. I dunno why but it doesn't work right. I haven't worked on my title screen yet but when i do if i use a gif i'll post a fix if i need to make one. I know back in early 2009 the kit gifs worked fine. But i'd worry more about the game anyways because no one looks at the title screen for more than a minute and besides the animated title screen is an advanced feature not for the faint hearted, lol... If you really want the title screen though try to figure out the advanced feature Scenes in Pokemon Essentials
 
34
Posts
14
Years
  • Seen Dec 29, 2012
Is there any difference between the "Tall Grass" tag and the "Grass" tag?

Also, is it possible to use the Editor to put tags on autotiles? I've autotiled my ice, but the RPGXP terrain tag editor doesn't go high enough to put the Ice tag on it.
 

Cilerba

the hearts of lonely people
1,162
Posts
14
Years
Of course it's possible; how do you think the Mystery Gift function in Raptor works? :P

You should use a regular expression to find the text you need. For example, if your text doesn't contain the symbol '#', you could enclose the code in '#'s, like so: #XdQ8sK9X#
Then, use a regular expression to search for a string in between two '#'s:
Code:
string[/#(.*?)#/]
code=$1
The '/'s around a string mean the string is treated as a regular expression. In a regular expression, '.' stands for any character, '*' means repeat the previous character an arbitrary number of times, and '?' after the '*' means it stops as soon as it gets to the second '#' (without the '?', it would continue as '#' falls under 'any character'). The brackets around part of the regular expression in this case are used to save the contents of the brackets (the code) into a global variable ($1, as it's the first pair of brackets. If you had another pair, their contents would be in $2 and so on). After using the regular expression, it's a good idea to copy the contents of the $1 variable to your own variable, as next time you use a regular expression, the $1 variable is overwritten.

Thanks a lot! I am still confused where to put the codes though. What exactly would be the script to put. So sorry for being a pain :\

I still need help with what to use for a code.
 

KingCharizard

C++ Developer Extraordinaire
1,229
Posts
14
Years
I still need help with what to use for a code.

I'm curious why are you trying to add a feature to your project beyond your skill level? Why does everyone try to do this? If i cant figure a certain feature out i'd rather not bother to use it.

But anyways i'm going to try to help, but in order to do that I need to know exactly what your asking. Are you asking for the script? If you are unless some1 is gonna copy and paste theirs I believe your gonna have to write 1 yourself if you cant then i suggest you learn. If you dont wanna learn or cant learn then I suggest you forget about the feature.
 

Cilerba

the hearts of lonely people
1,162
Posts
14
Years
I'm curious why are you trying to add a feature to your project beyond your skill level? Why does everyone try to do this? If i cant figure a certain feature out i'd rather not bother to use it.

But anyways i'm going to try to help, but in order to do that I need to know exactly what your asking. Are you asking for the script? If you are unless some1 is gonna copy and paste theirs I believe your gonna have to write 1 yourself if you cant then i suggest you learn. If you dont wanna learn or cant learn then I suggest you forget about the feature.

I am trying to get better at scripting. If somebody tells me the code, and what certain parts mean (like Wichu did) then it helps me.

And what I am trying to do is implement a mystery gift feature into my game, similar to what Raptor does.
 
Status
Not open for further replies.
Back
Top