• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.
[PokeCommunity.com] [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Okay so really simple question, and I'd appreciate it if someone could help me, shouldn't take more than a few minutes to tell me :)
as you can see I'm messing with the designs of the HP bars and Text boxes and stuff, I want to change the font colour, at least on the HP boxes, because obviously isn't very clear right now. I want to change it to a white-ish colour, or just something more visible, I'm almost certain there is a colour setting in the script somewhere I just want to know where. :] any help is appreaciated.

That's easy peasy. Go to the script PokeBattle_ActualScene.
At lines 1001 and 1002, you should see:
Code:
BOXTEXTBASECOLOR=Color.new(64,64,64)
BOXTEXTSHADOWCOLOR=Color.new(216,208,176)

Replace those two lines with

Code:
BOXTEXTBASECOLOR=Color.new(248,248,248)
BOXTEXTSHADOWCOLOR=Color.new(104,88,112)
 
That's easy peasy. Go to the script PokeBattle_ActualScene.
At lines 1001 and 1002, you should see:
Code:
BOXTEXTBASECOLOR=Color.new(64,64,64)
BOXTEXTSHADOWCOLOR=Color.new(216,208,176)
Replace those two lines with

Code:
BOXTEXTBASECOLOR=Color.new(248,248,248)
BOXTEXTSHADOWCOLOR=Color.new(104,88,112)

Thank you very much :cer_boogie:
I knew it was something like that, I just wasn't sure exactly where it was -_-;
Okay, I've got one more question, and then I promise I'll go away :p
This one may not be so straight forward, and this time I've got no clue how to do it.
Okay so, when the player walks through grass, it shows a little grass puft animation, with it moving, what I want to know is how I could impliment like the original grass animation the one that stays over the player when standing still on the grass? I've seen many other games do it in a similar way, but I'm not sure how :S
Thanks for reading.

Lets just borrow a screenshot from Pokemon Uraniam, made be ~JV~. (I'm sorry if this bothers you, I needed an example) Below you'll see OWs Standing in the grass, covering their feet, this is a good example of what I mean.
[PokeCommunity.com] [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

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

and here is an example of my game with the character, creepily standing on the grass and not in it.
 
In the database, under the tilesets tab, beneath the priority button, you should see bush flag. Select bush flag, now select any tiles you want to have this effect. In your case and in most for that matter, this would be grass.
 
In the database, under the tilesets tab, beneath the priority button, you should see bush flag. Select bush flag, now select any tiles you want to have this effect. In your case and in most for that matter, this would be grass.

He also needs to set the Terrain tag to 2 for the leaf effect.
 
In the database, under the tilesets tab, beneath the priority button, you should see bush flag. Select bush flag, now select any tiles you want to have this effect. In your case and in most for that matter, this would be grass.

Thank you! :O
That's exactly what I was asking about ^.^
It works! :cer_boogie:

@Cilerba
Yes, I already knew about the terrain tags, :p and I'm a girl.

Thank you very much for all your help :cer_wink:
 
Thank you! :O
That's exactly what I was asking about ^.^
It works! :cer_boogie:

@Cilerba
Yes, I already knew about the terrain tags, :p and I'm a girl.

Thank you very much for all your help :cer_wink:

Y'know, I had that in mind while I was typing
"Hmm, maybe I shouldn't put 'he'."
Sorry about that :/
 
Y'know, I had that in mind while I was typing
"Hmm, maybe I shouldn't put 'he'."
Sorry about that :/

Nah it's okay :p I'm use to it over the internet, everyone thinks Zadow sounds so much like a guy's nickname. Anyways
I know I said I'd go away, but I've got another question *Pouts* Okay, so...Is there a reason why the bag in essentials is all messed up?
Details, right, uhm, Several pockets are missing images and Items going in the wrong pockets and the inability to alocate items for the last few pockets via PBS data? I'm not sure what version of essentials I'm using. Does the latest version have this problem? (I think the latest is 7th of something)
Sorry for all the questions but I asume here is the place to ask all these kinds of questions.
 
Nah it's okay :p I'm use to it over the internet, everyone thinks Zadow sounds so much like a guy's nickname. Anyways
I know I said I'd go away, but I've got another question *Pouts* Okay, so...Is there a reason why the bag in essentials is all messed up?
Details, right, uhm, Several pockets are missing images and Items going in the wrong pockets and the inability to alocate items for the last few pockets via PBS data? I'm not sure what version of essentials I'm using. Does the latest version have this problem? (I think the latest is 7th of something)
Sorry for all the questions but I asume here is the place to ask all these kinds of questions.

Well, would you mind showing us a screenshot of what's happening?
And have you changed anything script-wise? (Besides the HP text in the battle system)
 
The missing images is because Poccil's updated the bag screen to have multiple pockets similar to the 4th generation games. (Items, Berries, Medicine, Battle Items, PokeBalls, ect) while the game images themself come straight from emerald. There's no images for those pockets because those new pockets didn't exist in the 3rd generation. I'm using the April 12th version so I can't really help you that much more. The items may be going in the right pockets for the 4th generation though.
 
I haven't had any luck getting any other variation of Mode07 to work with this (MGCaladTogel's would have been ideal) so I'm just going to use the one included, however I can't seem to get things to stand up in 3D.

I've called setMapView(2) and it's all fine, but with other Mode07's I've been able to set terrain tags to make certain tiles 3D. Anything similar in this one?
 
Urgh, maybe, I let my older brother fiddle with some map and screen size related scripts but I don't think he reverted everything, but I doubt that would affect it, other than that, the only other script wise would be inserting Carmaniacs Menu script.

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


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



So is this problem unquie to me, should I just try and put my maps and data on a clean essentials or is this fixable some other way?
I can also probably produce to error upon startup I get by trying to allocate them to the right pocket by number of pockets in the PBS, because it just doesn't seem to think they exist but the berries in the TM case give me the options a TM does, and the Key items in the Berries Pocket give me the options Berries do :/

EDIT : Oh, well, I understand the image problem, with not having the images but, I don't get why it's put them in the wrong pockets, and not letting me alocate them to pockets beyond the original amount of pockets.
 
Last edited:
Urgh, maybe, I let my older brother fiddle with some map and screen size related scripts but I don't think he reverted everything, but I doubt that would affect it, other than that, the only other script wise would be inserting Carmaniacs Menu script.

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


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



So is this problem unquie to me, should I just try and put my maps and data on a clean essentials or is this fixable some other way?
I can also probably produce to error upon startup I get by trying to allocate them to the right pocket by number of pockets in the PBS, because it just doesn't seem to think they exist but the berries in the TM case give me the options a TM does, and the Key items in the Berries Pocket give me the options Berries do :/

EDIT : Oh, well, I understand the image problem, with not having the images but, I don't get why it's put them in the wrong pockets, and not letting me alocate them to pockets beyond the original amout of pockets.

I'm not sure. Try and replace PokemonBag with this script:
Code:
class Window_PokemonBag < Window_DrawableCommand
 attr_reader :pocket
 attr_reader :sortIndex
 def initialize(bag,pocket,x,y,width,height)
  @bag=bag
  @pocket=pocket
  @sortIndex=-1
  @adapter=PokemonMartAdapter.new
  super(x,y,width,height)
  self.windowskin=nil
 end
 def pocket=(value)
  @pocket=value
  [email protected][@pocket]
  @item_max=thispocket.length+1
  [email protected](@pocket)
  refresh
 end
 def sortIndex=(value)
  @sortIndex=value
  refresh
 end
 def item
  [email protected][self.pocket]
  item=thispocket[self.index]
  return item ? item[0] : 0
 end
 def itemCount
  return @bag.pockets[self.pocket].length+1
 end
 def drawItem(index,count,rect)
   textpos=[]
   rect=drawCursor(index,rect)
   ypos=rect.y
   if [email protected][self.pocket].length
    textpos.push([_INTL("CLOSE BAG"),
      rect.x,ypos,false,self.baseColor,self.shadowColor])
   else
    [email protected][self.pocket][index][0]
    [email protected](item)
    qty=_ISPRINTF("x{1: 2d}",@bag.pockets[self.pocket][index][1])
    sizeQty=self.contents.text_size(qty).width
    xQty=rect.x+rect.width-sizeQty-2
    baseColor=(index==@sortIndex) ? Color.new(248,24,24) : self.baseColor
    textpos.push([itemname,rect.x,ypos,false,self.baseColor,self.shadowColor])
    if $ItemData[item][ITEMPOCKET]!=5
     textpos.push([qty,xQty,ypos,false,baseColor,self.shadowColor])
    end
   end
   pbDrawTextPositions(self.contents,textpos)
   if [email protected][self.pocket].length
    if self.pocket==5 && @[email protected][self.pocket][index][0]
     pbDrawImagePositions(self.contents,[
      ["Graphics/Pictures/regitem",rect.x+rect.width-48,ypos,0,0,-1,-1]
     ])
    end
   end
 end
end

class Window_PokemonItemStorage < Window_DrawableCommand
 attr_reader :bag
 attr_reader :pocket
 attr_reader :sortIndex
 def sortIndex=(value)
  @sortIndex=value
  refresh
 end
 def initialize(bag,x,y,width,height)
  @bag=bag
  @sortIndex=-1
  @adapter=PokemonMartAdapter.new
  super(x,y,width,height)
  self.windowskin=nil
 end
 def item
  item=@bag[self.index]
  return item ? item[0] : 0
 end
 def itemCount
  return @bag.length+1
 end
 def drawItem(index,count,rect)
   textpos=[]
   rect=drawCursor(index,rect)
   ypos=rect.y
   if [email protected]
    textpos.push([_INTL("CANCEL"),
      rect.x,ypos,false,self.baseColor,self.shadowColor])
   else
    item=@bag[index][0]
    [email protected](item)
    qty=_ISPRINTF("x{1: 2d}",@bag[index][1])
    sizeQty=self.contents.text_size(qty).width
    xQty=rect.x+rect.width-sizeQty-2
    baseColor=(index==@sortIndex) ? Color.new(248,24,24) : self.baseColor
    textpos.push([itemname,rect.x,ypos,false,self.baseColor,self.shadowColor])
    if $ItemData[item][ITEMPOCKET]!=5
     textpos.push([qty,xQty,ypos,false,baseColor,self.shadowColor])
    end
   end
   pbDrawTextPositions(self.contents,textpos)
 end
end



######################################################

module UIHelper
# Common UI functions used in both the bag and item storage screens.
# Allows the user to choose a number.  The window _helpwindow_ will
# display the _helptext_.
def self.pbChooseNumber(helpwindow,helptext,maximum)
 oldvisible=helpwindow.visible
 helpwindow.visible=true
 helpwindow.text=helptext
 helpwindow.letterbyletter=false
 curnumber=1
 ret=0
 using(numwindow=Window_UnformattedTextPokemon.new(_INTL("x000"))){
   numwindow.viewport=helpwindow.viewport
   numwindow.letterbyletter=false
   numwindow.text=_ISPRINTF("x{1:03d}",curnumber)
   numwindow.resizeToFit(numwindow.text,480)
   pbBottomRight(numwindow) # Move number window to the bottom right
   helpwindow.resizeHeightToFit(helpwindow.text,480-numwindow.width)
   pbBottomLeft(helpwindow) # Move help window to the bottom left
   loop do
     Graphics.update
     Input.update
     numwindow.update
     block_given? ? yield : helpwindow.update
     if Input.repeat?(Input::LEFT)
      curnumber-=10
      curnumber=1 if curnumber<1
      numwindow.text=_ISPRINTF("x{1:03d}",curnumber)
      pbPlayCursorSE()
     elsif Input.repeat?(Input::RIGHT)
      curnumber+=10
      curnumber=maximum if curnumber>maximum
      numwindow.text=_ISPRINTF("x{1:03d}",curnumber)
      pbPlayCursorSE()
     elsif Input.repeat?(Input::UP)
      curnumber+=1
      curnumber=1 if curnumber>maximum
      numwindow.text=_ISPRINTF("x{1:03d}",curnumber)
      pbPlayCursorSE()
     elsif Input.repeat?(Input::DOWN)
      curnumber-=1
      curnumber=maximum if curnumber<1
      numwindow.text=_ISPRINTF("x{1:03d}",curnumber)
      pbPlayCursorSE()
     elsif Input.trigger?(Input::C)
      ret=curnumber
      pbPlayDecisionSE()
      break
     elsif Input.trigger?(Input::B)
      ret=0
      pbPlayCancelSE()
      break
     end
  end
 }
 helpwindow.visible=oldvisible
 return ret
end

def self.pbDisplayStatic(msgwindow,message)
   oldvisible=msgwindow.visible
   msgwindow.visible=true
   msgwindow.letterbyletter=false
   msgwindow.width=Graphics.width
   msgwindow.resizeHeightToFit(message,Graphics.width)
   msgwindow.text=message
   pbBottomRight(msgwindow)
   loop do
    Graphics.update
    Input.update
    if Input.trigger?(Input::B)
      break
    end
    if Input.trigger?(Input::C)
      break
    end
    block_given? ? yield : msgwindow.update
   end
   msgwindow.visible=oldvisible
   Input.update
end



# Letter by letter display of the message _msg_ 
# by the window _helpwindow_.
def self.pbDisplay(helpwindow,msg,brief)
 cw=helpwindow
 cw.letterbyletter=true
 cw.text=msg+"\1"
 pbBottomLeftLines(cw,2)
 oldvisible=cw.visible
 cw.visible=true
 loop do
  Graphics.update
  Input.update
  block_given? ? yield : cw.update
  if brief && !cw.busy?
   cw.visible=oldvisible
   return
  end
  if Input.trigger?(Input::C) && cw.resume && !cw.busy?
   cw.visible=oldvisible
   return
  end
 end
end

# Letter by letter display of the message _msg_ 
# by the window _helpwindow_, used to ask questions.
# Returns true if the user chose yes, false if no.
def self.pbConfirm(helpwindow,msg)
 dw=helpwindow
 oldvisible=dw.visible
 dw.letterbyletter=true
 dw.text=msg
 dw.visible=true
 pbBottomLeftLines(dw,2)
 commands=[_INTL("YES"),_INTL("NO")]
 cw = Window_CommandPokemon.new(commands)
 cw.viewport=helpwindow.viewport
 pbBottomRight(cw)
 cw.y-=dw.height
 cw.index=0
 loop do
  cw.visible=!dw.busy?
  Graphics.update
  Input.update
  cw.update
  block_given? ? yield : dw.update
  if Input.trigger?(Input::B) && dw.resume && !dw.busy?
   cw.dispose
   dw.visible=oldvisible
   pbPlayCancelSE()
   return false
  end
  if Input.trigger?(Input::C) && dw.resume && !dw.busy?
   cwIndex=cw.index
   cw.dispose
   dw.visible=oldvisible
   pbPlayDecisionSE()
   return (cwIndex==0)?true:false
  end
 end
end


def self.pbShowCommands(helpwindow,helptext,commands)
 ret=-1
 oldvisible=helpwindow.visible
 helpwindow.visible=helptext ? true : false
 helpwindow.letterbyletter=false
 helpwindow.text=helptext ? helptext : ""
 cmdwindow=Window_CommandPokemon.new(commands)
 begin
   cmdwindow.viewport=helpwindow.viewport
   pbBottomRight(cmdwindow)
   helpwindow.resizeHeightToFit(helpwindow.text,480-cmdwindow.width)
   pbBottomLeft(helpwindow)
   loop do
    Graphics.update
    Input.update
    yield
    cmdwindow.update
    if Input.trigger?(Input::B)
     ret=-1
     pbPlayCancelSE()
     break
    end
    if Input.trigger?(Input::C)
     ret=cmdwindow.index
     pbPlayDecisionSE()
     break
    end
   end
 ensure
   cmdwindow.dispose if cmdwindow
 end
 helpwindow.visible=oldvisible
 return ret
end

end


class PokemonBag_Scene

#################################
## Configuration
ITEMLISTBASECOLOR=Color.new(72,72,72)
ITEMLISTSHADOWCOLOR=Color.new(208,208,208)
ITEMTEXTBASECOLOR=Color.new(31*8,31*8,31*8)
ITEMTEXTSHADOWCOLOR=Color.new(12*8,12*8,12*8)
POCKETNAMEBASECOLOR=Color.new(31*8,31*8,31*8)
POCKETNAMESHADOWCOLOR=Color.new(12*8,12*8,12*8)
ITEMSVISIBLE=6

#################################
def update
 pbUpdateSpriteHash(@sprites)
end

def pbStartScene(bag)
  @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
  @viewport.z=99999
  @bag=bag
  @sprites={}
  [email protected]
  [email protected](lastpocket)
  @sprites["background"]=IconSprite.new(0,0,@viewport)
  @sprites["background"].setBitmap("Graphics/Pictures/bagscreen2")
  @sprites["leftarrow"]=AnimatedSprite.new("Graphics/Pictures/leftarrow",8,40,28,2,@viewport)
  @sprites["rightarrow"]=AnimatedSprite.new("Graphics/Pictures/rightarrow",8,40,28,2,@viewport)
  @sprites["leftarrow"].play
  @sprites["rightarrow"].play
  @sprites["bag"]=IconSprite.new(16,72,@viewport)
  @sprites["icon"]=IconSprite.new(16,248,@viewport)
  @sprites["itemwindow"]=Window_PokemonBag.new(@bag,lastpocket,160,0,304,32+ITEMSVISIBLE*32)
  @sprites["itemwindow"].viewport=@viewport
  @sprites["itemwindow"].pocket=lastpocket
  @sprites["itemwindow"].index=lastitem
  @sprites["itemwindow"].baseColor=ITEMLISTBASECOLOR
  @sprites["itemwindow"].shadowColor=ITEMLISTSHADOWCOLOR
  @sprites["itemwindow"].refresh
  @sprites["pocketwindow"]=BitmapSprite.new(176,64,@viewport)
  pbSetSystemFont(@sprites["pocketwindow"].bitmap)
  @sprites["itemtextwindow"]=Window_UnformattedTextPokemon.new("")
  @sprites["itemtextwindow"].x=64
  @sprites["itemtextwindow"].y=208
  @sprites["itemtextwindow"].width=Graphics.width-64
  @sprites["itemtextwindow"].height=128
  @sprites["itemtextwindow"].baseColor=ITEMTEXTBASECOLOR
  @sprites["itemtextwindow"].shadowColor=ITEMTEXTSHADOWCOLOR
  @sprites["itemtextwindow"].visible=true
  @sprites["itemtextwindow"].viewport=@viewport
  @sprites["itemtextwindow"].windowskin=nil
  @sprites["helpwindow"]=Window_UnformattedTextPokemon.new("")
  @sprites["helpwindow"].visible=false
  @sprites["helpwindow"].viewport=@viewport
  @sprites["msgwindow"]=Window_AdvancedTextPokemon.new("")
  @sprites["msgwindow"].visible=false
  @sprites["msgwindow"].viewport=@viewport
  pbBottomLeftLines(@sprites["helpwindow"],1)
  pbDeactivateWindows(@sprites)
  pbRefresh
  pbFadeInAndShow(@sprites)
end

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


def pbChooseNumber(helptext,maximum)
 return UIHelper.pbChooseNumber(
  @sprites["helpwindow"],helptext,maximum) { update }
end

def pbDisplay(msg,brief=false)
 UIHelper.pbDisplay(
  @sprites["msgwindow"],msg,brief) { update }
end

def pbConfirm(msg)
 UIHelper.pbConfirm(
  @sprites["msgwindow"],msg) { update }
end

def pbShowCommands(helptext,commands)
 return UIHelper.pbShowCommands(
   @sprites["helpwindow"],helptext,commands) { update }
end

def pbRefresh
 bm=@sprites["pocketwindow"].bitmap
 bm.clear
 name=PokemonBag.pocketNames()[@bag.lastpocket]
 # Set the bitmap for the currently selected bag
 @sprites["bag"].setBitmap("Graphics/Pictures/Bag#{@bag.lastpocket}")
 base=POCKETNAMEBASECOLOR
 shadow=POCKETNAMESHADOWCOLOR
 # Draw the pocket name on the upper left corner
 # of the screen
 pbDrawTextPositions(bm,[
   [name,bm.width/2,16,2,base,shadow]
 ])
 # Reset positions of left/right arrows around the bag
 @sprites["leftarrow"].x=-4
 @sprites["leftarrow"].y=128
 @sprites["rightarrow"].x=124
 @sprites["rightarrow"].y=128
 itemwindow=@sprites["itemwindow"]
 # Set the icon for the currently selected item
 filename=sprintf("Graphics/Icons/item%03d",itemwindow.item)
 @sprites["icon"].setBitmap(filename)
 # Display the item's description
 @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Close bag.") : 
      pbGetMessage(MessageTypes::ItemDescriptions,itemwindow.item)
 # Refresh the item window
 itemwindow.refresh
end

# Called when the item screen wants an item to be chosen
# from the screen
def pbChooseItem
 @sprites["helpwindow"].visible=false
 itemwindow=@sprites["itemwindow"]
 itemwindow.refresh
 sorting=false
 sortindex=-1
 pbActivateWindow(@sprites,"itemwindow"){
 loop do
  Graphics.update
  Input.update
  olditem=itemwindow.item
  oldindex=itemwindow.index
  self.update
  if itemwindow.item!=olditem
   # Update item icon and description
   filename=sprintf("Graphics/Icons/item%03d",itemwindow.item)
   @sprites["icon"].setBitmap(filename)
   @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Close bag.") :
      pbGetMessage(MessageTypes::ItemDescriptions,itemwindow.item)
  end
  if itemwindow.index!=oldindex
   # Update selected item for current pocket
   @bag.setChoice(itemwindow.pocket,itemwindow.index)
  end
  # Change pockets if Left/Right pressed
  numpockets=PokemonBag.numPockets
  if Input.trigger?(Input::LEFT)
   itemwindow.pocket=(itemwindow.pocket==1) ? numpockets : itemwindow.pocket-1
   @bag.lastpocket=itemwindow.pocket
   pbRefresh
  elsif Input.trigger?(Input::RIGHT)
   itemwindow.pocket=(itemwindow.pocket==numpockets) ? 1 : itemwindow.pocket+1
   @bag.lastpocket=itemwindow.pocket
   pbRefresh
  end
  # Select item for switching if A is pressed
  if Input.trigger?(Input::A)
   [email protected][itemwindow.pocket]
   if itemwindow.index<thispocket.length
    sortindex=itemwindow.index
    sorting=true
    @sprites["itemwindow"].sortIndex=sortindex
   else
    next
   end
  end
  # Cancel switching or cancel the item screen
  if Input.trigger?(Input::B)
   if sorting
    sorting=false
    @sprites["itemwindow"].sortIndex=-1
   else
    return 0
   end
  end
  # Confirm selection or item switch
  if Input.trigger?(Input::C)
   [email protected][itemwindow.pocket]
   if itemwindow.index<thispocket.length
    if sorting
     sorting=false
     tmp=thispocket[itemwindow.index]
     thispocket[itemwindow.index]=thispocket[sortindex]
     thispocket[sortindex]=tmp
     @sprites["itemwindow"].sortIndex=-1
     next
    else
     pbRefresh
     return thispocket[itemwindow.index][0]
    end
   else
    return 0
   end
  end
 end
 }
end


end


class ItemStorageScene


#################################
## Configuration
ITEMLISTBASECOLOR=Color.new(72,72,72)
ITEMLISTSHADOWCOLOR=Color.new(208,208,208)
ITEMTEXTBASECOLOR=Color.new(31*8,31*8,31*8)
ITEMTEXTSHADOWCOLOR=Color.new(12*8,12*8,12*8)
TITLEBASECOLOR=Color.new(31*8,31*8,31*8)
TITLESHADOWCOLOR=Color.new(12*8,12*8,12*8)
ITEMSVISIBLE=6

#################################

def initialize(title)
 @title=title
end

def update
 pbUpdateSpriteHash(@sprites)
end

def pbStartScene(bag)
  @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
  @viewport.z=99999
  @bag=bag
  @sprites={}
  @sprites["background"]=IconSprite.new(0,0,@viewport)
  @sprites["background"].setBitmap("Graphics/Pictures/pcitembg")
  @sprites["icon"]=IconSprite.new(16,248,@viewport)
  # Item list
  @sprites["itemwindow"]=Window_PokemonItemStorage.new(@bag,96,0,304,32+ITEMSVISIBLE*32)
  @sprites["itemwindow"].viewport=@viewport
  @sprites["itemwindow"].index=0
  @sprites["itemwindow"].baseColor=ITEMLISTBASECOLOR
  @sprites["itemwindow"].shadowColor=ITEMLISTSHADOWCOLOR
  @sprites["itemwindow"].refresh
  # Title
  @sprites["pocketwindow"]=BitmapSprite.new(88,64,@viewport)
  @sprites["pocketwindow"].x=16
  @sprites["pocketwindow"].y=16
  pbSetNarrowFont(@sprites["pocketwindow"].bitmap)
  # Item description  
  @sprites["itemtextwindow"]=Window_UnformattedTextPokemon.newWithSize("",64,208,480-64,128,@viewport)
  @sprites["itemtextwindow"].baseColor=ITEMTEXTBASECOLOR
  @sprites["itemtextwindow"].shadowColor=ITEMTEXTSHADOWCOLOR
  @sprites["itemtextwindow"].windowskin=nil
  @sprites["helpwindow"]=Window_UnformattedTextPokemon.new("")
  @sprites["helpwindow"].visible=false
  @sprites["helpwindow"].viewport=@viewport
  # Letter-by-letter message window
  @sprites["msgwindow"]=Window_AdvancedTextPokemon.new("")
  @sprites["msgwindow"].visible=false
  @sprites["msgwindow"].viewport=@viewport
  pbBottomLeftLines(@sprites["helpwindow"],1)
  pbDeactivateWindows(@sprites)
  pbRefresh
  pbFadeInAndShow(@sprites)
end

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

def pbRefresh
 bm=@sprites["pocketwindow"].bitmap
 # Draw title at upper left corner ("Toss Item/Withdraw Item")
 drawTextEx(bm,0,0,bm.width,2,@title,
    TITLEBASECOLOR,
    TITLESHADOWCOLOR
 )
 itemwindow=@sprites["itemwindow"]
 filename=sprintf("Graphics/Icons/item%03d",itemwindow.item)
 @sprites["icon"].setBitmap(filename)
 @sprites["itemtextwindow"].text=(itemwindow.item==0) ? _INTL("Close storage.") : 
      pbGetMessage(MessageTypes::ItemDescriptions,itemwindow.item)
 itemwindow.refresh
end

def pbChooseItem
 @sprites["helpwindow"].visible=false
 itemwindow=@sprites["itemwindow"]
 itemwindow.refresh
 pbActivateWindow(@sprites,"itemwindow"){
 loop do
  Graphics.update
  Input.update
  olditem=itemwindow.item
  self.update
  if itemwindow.item!=olditem
   self.pbRefresh
  end
  if Input.trigger?(Input::B)
   return 0
  end
  if Input.trigger?(Input::C)
   if itemwindow.index<@bag.length
    pbRefresh
    return @bag[itemwindow.index][0]
   else
    return 0
   end
  end
 end
 }
end
def pbChooseNumber(helptext,maximum)
 return UIHelper.pbChooseNumber(
  @sprites["helpwindow"],helptext,maximum) { update }
end

def pbDisplay(msg,brief=false)
 UIHelper.pbDisplay(
  @sprites["msgwindow"],msg,brief) { update }
end

def pbConfirm(msg)
 UIHelper.pbConfirm(
  @sprites["msgwindow"],msg) { update }
end

def pbShowCommands(helptext,commands)
 return UIHelper.pbShowCommands(
   @sprites["helpwindow"],helptext,commands) { update }
end


end


class WithdrawItemScene < ItemStorageScene
 def initialize
  super(_INTL("WITHDRAW\nITEM"))
 end
end

class TossItemScene < ItemStorageScene
 def initialize
  super(_INTL("TOSS\nITEM"))
 end
end




class PokemonBag
 attr_reader :registeredItem
 attr_accessor :lastpocket
 attr_reader :pockets
 def self.pocketNames()
  return ["",
   _INTL("Items"),_INTL("Pokeballs"),
   _INTL("TMs & HMs"),_INTL("Berries"),
   _INTL("Key Items")
  ]
 end
 def self.numPockets()
  return self.pocketNames().length-1
 end
 MAXPERSLOT=99 # Maximum number of items per item slot
 MAXPOCKETSIZE=[0,256,-1,-1,-1,-1] # Maximum size per pocket
 def initialize
  @lastpocket=1
  @pockets=[]
  @choices=[]
  # Initialize each pocket of the array
  for i in 0..PokemonBag.numPockets
   @pockets[i]=[]
   @choices[i]=0
  end
  @registeredItem=0
 end
 # Gets the index of the current selected item in the pocket
 def getChoice(pocket)
  if pocket<=0 || pocket>PokemonBag.numPockets
   raise ArgumentError.new(_INTL("Invalid pocket: {1}",pocket.inspect))
  end
  return @choices[pocket] || 0
 end
 # Clears the entire bag
 def clear
  for pocket in @pockets
   pocket.clear
  end
 end
 # Sets the index of the current selected item in the pocket
 def setChoice(pocket,value)
  if pocket<=0 || pocket>PokemonBag.numPockets
   raise ArgumentError.new(_INTL("Invalid pocket: {1}",pocket.inspect))
  end
  if value<@pockets[pocket].length
   @choices[pocket]=value
  end
 end
 # Registers the item as a key item.  Can be retrieved with $PokemonBag.registeredItem
 def pbRegisterKeyItem(item)
  if item!=@registeredItem
   @registeredItem=item
  else
   @registeredItem=0
  end
 end
 def pbQuantity(item)
  pocket=$ItemData[item][ITEMPOCKET]
  maxsize=MAXPOCKETSIZE[pocket]
  maxsize=@pockets[pocket].length if maxsize<0
  return ItemStorageHelper.pbQuantity(
    @pockets[pocket],maxsize,item)
 end
 def pbDeleteItem(item,qty=1)
  pocket=$ItemData[item][ITEMPOCKET]
  maxsize=MAXPOCKETSIZE[pocket]
  maxsize=@pockets[pocket].length if maxsize<0
  ret=ItemStorageHelper.pbDeleteItem(
    @pockets[pocket],maxsize,item,qty)
  if ret
   @registeredItem=0 if @registeredItem==item
  end
  return ret
 end
 def pbCanStore?(item,qty=1)
  pocket=$ItemData[item][ITEMPOCKET]
  maxsize=MAXPOCKETSIZE[pocket]
  maxsize=@pockets[pocket].length+1 if maxsize<0
  return ItemStorageHelper.pbCanStore?(
    @pockets[pocket],maxsize,MAXPERSLOT,item,qty)
 end
 def pbStoreItem(item,qty=1)
  pocket=$ItemData[item][ITEMPOCKET]
  maxsize=MAXPOCKETSIZE[pocket]
  maxsize=@pockets[pocket].length+1 if maxsize<0
  return ItemStorageHelper.pbStoreItem(
    @pockets[pocket],maxsize,MAXPERSLOT,item,qty)
 end
end


class PCItemStorage
 MAXSIZE=50
 MAXPERSLOT=999
 def initialize
  @items=[]
  # Start storage with a Potion
  if hasConst?(PBItems,:POTION)
   ItemStorageHelper.pbStoreItem(
    @items,MAXSIZE,MAXPERSLOT,getConst(PBItems,:POTION),1)
  end
 end
 def empty?
  return @items.length==0
 end
 def length
  @items.length
 end
 def [](i)
  @items[i]
 end
 def getItem(index)
  if index<0 || index>[email protected]
   return 0
  else
   return @items[index][0]
  end
 end
 def getCount(index)
  if index<0 || index>[email protected]
   return 0
  else
   return @items[index][1]
  end
 end
 def pbQuantity(item)
  return ItemStorageHelper.pbQuantity(
    @items,MAXSIZE,item)
 end
 def pbDeleteItem(item,qty=1)
  return ItemStorageHelper.pbDeleteItem(
    @items,MAXSIZE,item,qty)
 end
 def pbCanStore?(item,qty=1)
  return ItemStorageHelper.pbCanStore?(
    @items,MAXSIZE,MAXPERSLOT,item,qty)
 end
 def pbStoreItem(item,qty=1)
  return ItemStorageHelper.pbStoreItem(
    @items,MAXSIZE,MAXPERSLOT,item,qty)
 end
end

class PokemonBagScreen
 def initialize(scene,bag)
  @bag=bag
  @scene=scene
 end
 def pbDisplay(text)
  @scene.pbDisplay(text)
 end
 def pbConfirm(text)
  return @scene.pbConfirm(text)
 end
 # UI logic for the item screen when an item is to be held by a Pokémon.
 def pbGiveItemScreen
  @scene.pbStartScene(@bag)
  item=0
  loop do
   [email protected]
   break if item==0
   itemname=PBItems.getName(item)
   # Key items and hidden machines can't be held
   if pbIsImportantItem?(item)
    @scene.pbDisplay(_INTL("The {1} can't be held.",itemname))
    next
   else
    break
   end
  end
  @scene.pbEndScene
  return item
 end
 # UI logic for the item screen for choosing a Berry
 def pbChooseBerryScreen
  [email protected]
  @bag.lastpocket=4
  @scene.pbStartScene(@bag)
  item=0
  loop do
   [email protected]
   break if item==0
   itemname=PBItems.getName(item)
   if $ItemData[item][ITEMPOCKET]!=4
    @scene.pbDisplay(_INTL("That's not a Berry.",itemname))
    next
   else
    break
   end
  end
  @scene.pbEndScene
  @bag.lastpocket=oldlastpocket
  return item
 end
 # UI logic for tossing an item in the item screen.
 def pbTossItemScreen
  if !$PokemonGlobal.pcItemStorage
   $PokemonGlobal.pcItemStorage=PCItemStorage.new
  end
  storage=$PokemonGlobal.pcItemStorage
  @scene.pbStartScene(storage)
  loop do
   [email protected]
   break if item==0
   if pbIsImportantItem?(item)
    @scene.pbDisplay(_INTL("That's too important to toss out!"))
    next
   end
   qty=storage.pbQuantity(item)
   itemname=PBItems.getName(item)
   if qty>1
     [email protected](_INTL("Toss out how many {1}(s)?",itemname),qty)
   end
   if qty>0
     if pbConfirm(_INTL("Is it OK to throw away {1} {2}(s)?",qty,itemname))
       if !storage.pbDeleteItem(item,qty)
         raise "Can't delete items from storage"
       end
       pbDisplay(_INTL("Threw away {1} {2}(s).",qty,itemname))
     end
   end
  end
  @scene.pbEndScene
 end
 # UI logic for withdrawing an item in the item screen.
 def pbWithdrawItemScreen
  if !$PokemonGlobal.pcItemStorage
   $PokemonGlobal.pcItemStorage=PCItemStorage.new
  end
  storage=$PokemonGlobal.pcItemStorage
  @scene.pbStartScene(storage)
  loop do
   [email protected]
   break if item==0
   commands=[_INTL("WITHDRAW"),_INTL("GIVE"),_INTL("CANCEL")]
   itemname=PBItems.getName(item)
   [email protected](_INTL("{1} is selected.",itemname),commands)
   if command==0
    qty=storage.pbQuantity(item)
    if qty>1
     [email protected](_INTL("How many do you want to withdraw?"),qty)
    end
    if qty>0
     if [email protected]?(item,qty)
      pbDisplay(_INTL("There's no more room in the Bag."))
     else
      pbDisplay(_INTL("Withdrew {1} {2}(s).",qty,itemname))
      if !storage.pbDeleteItem(item,qty)
       raise "Can't delete items from storage"
      end
      if [email protected](item,qty)
       raise "Can't withdraw items from storage"
      end
     end
    end
   elsif command==1 # Give
    if $Trainer.pokemonCount==0
     @scene.pbDisplay(_INTL("There is no Pokémon."))
     return 0
    elsif pbIsImportantItem?(item)
     @scene.pbDisplay(_INTL("The {1} can't be held.",itemname))
    else
     pbFadeOutIn(99999){
      sscene=PokemonScreen_Scene.new
      sscreen=PokemonScreen.new(sscene,$Trainer.party)
      if sscreen.pbPokemonGiveScreen(item)
       # If the item was held, delete the item from storage
       if !storage.pbDeleteItem(item,1)
        raise "Can't delete item from storage"
       end
      end
      @scene.pbRefresh
     }
    end
   end
  end
  @scene.pbEndScene
 end
 # UI logic for depositing an item in the item screen.
 def pbDepositItemScreen
  @scene.pbStartScene(@bag)
  if !$PokemonGlobal.pcItemStorage
   $PokemonGlobal.pcItemStorage=PCItemStorage.new
  end
  storage=$PokemonGlobal.pcItemStorage
  item=0
  loop do
   [email protected]
   break if item==0
   [email protected](item)
   if qty>1
    [email protected](_INTL("How many do you want to deposit?"),qty)
   end
   if qty>0
     itemname=PBItems.getName(item)
     if !storage.pbCanStore?(item,qty)
      pbDisplay(_INTL("There's no room to store items."))
     else
      pbDisplay(_INTL("Deposited {1} {2}(s).",qty,itemname))
      if [email protected](item,qty)
       raise "Can't delete items from bag"
      end
      if !storage.pbStoreItem(item,qty)
       raise "Can't deposit items to storage"
      end
     end
   end
  end
  @scene.pbEndScene
 end
 def pbStartScreen
  @scene.pbStartScene(@bag)
  item=0
  loop do
   [email protected]
   break if item==0
   pocket=$ItemData[item][ITEMPOCKET]
   cmdUse=-1
   cmdTag=-1
   cmdRegister=-1
   cmdGive=-1
   cmdToss=-1
   cmdCheck=-1
   commands=[]
   # Generate command list depending on current pocket
   case pocket
    when 1 # Items
     if pbIsMail?(item)
      commands[cmdCheck=commands.length]=_INTL("CHECK")
      commands[cmdGive=commands.length]=_INTL("GIVE") if $Trainer.party.length>0
      commands[cmdToss=commands.length]=_INTL("TOSS")
      commands[commands.length]=_INTL("CANCEL")
     else
      commands[cmdUse=commands.length]=_INTL("USE")
      commands[cmdGive=commands.length]=_INTL("GIVE") if $Trainer.party.length>0
      commands[cmdToss=commands.length]=_INTL("TOSS")
      commands[commands.length]=_INTL("CANCEL")
     end
    when 2 # Balls
     commands[cmdGive=commands.length]=_INTL("GIVE") if $Trainer.party.length>0
     commands[cmdToss=commands.length]=_INTL("TOSS")
     commands[commands.length]=_INTL("CANCEL")
    when 3 # Machines
     commands[cmdUse=commands.length]=_INTL("USE")
     commands[cmdGive=commands.length]=_INTL("GIVE") if $Trainer.party.length>0
     commands[commands.length]=_INTL("CANCEL")
    when 4 # Berries
     commands[cmdTag=commands.length]=_INTL("CHECK TAG")
     commands[cmdUse=commands.length]=_INTL("USE")
     commands[cmdGive=commands.length]=_INTL("GIVE") if $Trainer.party.length>0
     commands[cmdToss=commands.length]=_INTL("TOSS")
     commands[commands.length]=_INTL("CANCEL")
    when 5 # Key Items
     commands[cmdUse=commands.length]=_INTL("USE")
     if @bag.registeredItem==item
      commands[cmdRegister=commands.length]=_INTL("DESELECT")
     else
      commands[cmdRegister=commands.length]=_INTL("REGISTER")
     end
     commands[commands.length]=_INTL("CANCEL")
   end
   # Show commands generated above
   itemname=PBItems.getName(item) # Get item name
   [email protected](_INTL("{1} is selected.",itemname),commands)
   if cmdUse>=0 && command==cmdUse
    ret=pbUseItem(@bag,item)
    # ret==0: Item wasn't used; ret==1: Item was used
    if ret==2 # End screen
     break
    end
    @scene.pbRefresh
    next
   elsif cmdCheck>=0 && command==cmdCheck
    pbFadeOutIn(99999){
     pbDisplayMail(PokemonMail.new(item,"",""))
    }
   elsif cmdTag>=0 && command==cmdTag # Berry tag
   elsif cmdRegister>=0 && command==cmdRegister # Register key item
    @bag.pbRegisterKeyItem(item)
    @scene.pbRefresh
   elsif cmdGive>=0 && command==cmdGive # Give item to Pokémon
    if $Trainer.pokemonCount==0
     @scene.pbDisplay(_INTL("There is no Pokémon."))
    elsif pbIsImportantItem?(item)
     @scene.pbDisplay(_INTL("The {1} can't be held.",itemname))
    else
     # Give item to a Pokémon
     pbFadeOutIn(99999){
      sscene=PokemonScreen_Scene.new
      sscreen=PokemonScreen.new(sscene,$Trainer.party)
      sscreen.pbPokemonGiveScreen(item)
      @scene.pbRefresh
     }
    end
   elsif cmdToss>=0 && command==cmdToss
    [email protected](item)
    helptext=_INTL("Toss out how many {1}(s)?",itemname)
    [email protected](helptext,qty)
    if qty>0
     if pbConfirm(_INTL("Is it OK to throw away {1} {2}(s)?",qty,itemname))
      pbDisplay(_INTL("Threw away {1} {2}(s).",qty,itemname))
      qty.times { @bag.pbDeleteItem(item) }      
     end
    end   
   end
  end
  @scene.pbEndScene
  return item
 end
end
 
Right, so this is the old bag?
Well, it works perfectly fine, and I've no complaints, don't need extra pockets really... :p
Thank you for the help Cilerba and Colbex ^.^
:cer_wink:
Oh I'm just full of questions aren't I? I promise I'll reward you *Shows you cookies*
[PokeCommunity.com] [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Okay, this isn't really from the base of essentials problem, it's just with Carmaniac's script
Everytime I'm near the edge of a map connection and I open this menu, the map next to it turns black, and when I close it, reverts to normal, any idea why? I could show you the script, but I'd prefer it was via PM I'd rather I didn't randomly have anyone steal it.
I understand perfectly if you can't help me with this one.
 
I have no clue, but considering it is Carmaniac's the best thing to do is to probably ask him. x_X
 
Right, so this is the old bag?
Well, it works perfectly fine, and I've no complaints, don't need extra pockets really... :p
Thank you for the help Cilerba and Colbex ^.^
:cer_wink:
Oh I'm just full of questions aren't I? I promise I'll reward you *Shows you cookies*
[PokeCommunity.com] [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Okay, this isn't really from the base of essentials problem, it's just with Carmaniac's script
Everytime I'm near the edge of a map connection and I open this menu, the map next to it turns black, and when I close it, reverts to normal, any idea why? I could show you the script, but I'd prefer it was via PM I'd rather I didn't randomly have anyone steal it.
I understand perfectly if you can't help me with this one.

I'll add you on MSN and we can chat there. Right now, we're cluttering the thread.
 
Ummm... Hello. I need 3 things that would be helpful.

1. Could someone tell me how to make an animated intro like all the other pokemon games? (The intro before the title.)

2.Could someone give me hg/ss and dpp sprites (character tile sets)?
I'm new to spriting and I don't know how, so if someone could help me, that would be great.

3.I want to put the move graphics, but I don't know how.

I know that this is a lot to ask for, but If someone could help me, I'd be very thankful.
 
Ummm... Hello. I need 3 things that would be helpful.

1. Could someone tell me how to make an animated intro like all the other pokemon games? (The intro before the title.)

2.Could someone give me hg/ss and dpp sprites (character tile sets)?
I'm new to spriting and I don't know how, so if someone could help me, that would be great.

3.I want to put the move graphics, but I don't know how.

I know that this is a lot to ask for, but If someone could help me, I'd be very thankful.

1) Read the notes.
2) Check the resource section.
3) I have no idea what you're talking about.
 
Bah, nobody helped. I'll forget about my doubt for now.
BUT, I have another issue: On the notes.html file, I read about the regional numbers of pokémon, which were a comma-separated list of numbers.
Like this:
RegionalNumbers=1,200,400
I guessed I could put them like that, since the first value is 0(which is the first region) and the second one is 1, and blah blah blah.
The problem is that when I go to another region and open the pokedex, an error pops up. I have not the exact stuff, but it's about the imposibility to compare a string with a number or something. So, is it impossible to have different numbers for each pokémon?
And also, my other question is: Is there any way to change the pokédex from National to Regional and viceversa with a buton? Like the one from the official games.
 
Status
Not open for further replies.
Back
Top