• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
BW Location Signposts (v19.1)

Resource BW Location Signposts (v19.1) 1.0.1

Shashu-Greninja

Novice
Member
Joined
Oct 22, 2020
Posts
43
Shashu-Greninja submitted a new resource:

BW Location Signposts (v19.1) - Mimics BW and B2W@ Location SIgnpost Splash...

Introduction
This script is an update of Shiney570's BW Location SIgnpost script to Essentials v19.1, with a lot of improvement and new features.

Compatibility
This script has been tested compatible with Pokemon Essentials v19.1 and the Generation 8 Project for Essentials v19.1. Any version lower than that isn't tested for compatibility with this Plugin.

Changes from Shiney570's version
1...

Read more about this resource...
 
This is really great! There's a small issue in the code where some locations were not properly labeled, but I really quickly fixed that. Other than that, I love this!

BW_SignPosts.rb:
Expand Collapse Copy
#===============================================================================
#BW signposts (original by Shiney570, updated by Shashu Greninja)
#===============================================================================
class LocationWindow

  def initialize(name)
    #Original BW, B2W2 Signposts
    newarr=[]
    for name in TOWN
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr.push(s)
      town=TOWN+newarr
    end
    newarr2=[]
    for name in CITY
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr2.push(s)
      city=CITY+newarr2
    end
    newarr3=[]
    for name in BRIDGE
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr3.push(s)
      bridge=BRIDGE+newarr3
    end
    newarr4=[]
    for name in ROUTE
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr4.push(s)
      route=ROUTE+newarr4
    end
    #Custom Signpost Initializations
    newarr5=[]
    for name in FOREST
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr5.push(s)
      forest=FOREST+newarr5
    end
    newarr6=[]
    for name in CAVE
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr6.push(s)
      cave=CAVE+newarr6
    end
    newarr7=[]
    for name in PORT
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr7.push(s)
      port=PORT+newarr7
    end
    newarr8=[]
    for name in DESERT
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr8.push(s)
      desert=DESERT+newarr8
    end

    @frames=0
    @currentmap=$game_map.map_id
    name=$game_map.name
    @window=Sprite.new
    @window.z=99999
    @overlay=BitmapSprite.new(Graphics.width,Graphics.height)
    @overlay.z= 99999
    @route_number_icons = AnimatedBitmap.new(_INTL("Graphics/Pictures/Location/icon_numbers"))

    if SHOW_SEASONS == true
        @season=Sprite.new
        if pbIsSpring # Jan, May, Sep
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Spring")
        elsif pbIsSummer # Feb, Jun, Oct
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Summer")
        elsif pbIsAutumn # Mar, Jul, Nov
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Autumn")
        elsif pbIsWinter # Apr, Aug, Dec
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Winter")
        end
        @season.y=Settings::SCREEN_HEIGHT
        @season.z=99999
    end

    for i in 0..town.length-1
      if $game_map.name.include?(town[i]) || @currentmap==TOWN[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","town")
      end
    end
    for i in 0..city.length-1
      if $game_map.name.include?(city[i]) || @currentmap==CITY[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","city")
      end
    end
    for i in 0..bridge.length-1
      if $game_map.name.include?(bridge[i]) || @currentmap==BRIDGE[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","bridge")
      end
    end
    for i in 0..route.length-1
      if $game_map.name.include?(route[i]) || @currentmap==ROUTE[i]
        @route_number=$game_map.name.gsub(/[^0-9]/, '')
        if @route_number.to_i >= 100 #Uses wider Route callout for 3-digit route numbers
          @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","route_extended")
          @extended_route = true
        else
          @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","route")
          @extended_route = false
        end
      end
    end
    for i in 0..forest.length-1
      if $game_map.name.include?(forest[i]) || @currentmap==FOREST[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","forest")
      end
    end
    for i in 0..cave.length-1
      if $game_map.name.include?(cave[i]) || @currentmap==CAVE[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","cave")
      end
    end
    for i in 0..port.length-1
      if $game_map.name.include?(port[i]) || @currentmap==PORT[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","port")
      end
    end
    for i in 0..desert.length-1
      if $game_map.name.include?(desert[i]) || @currentmap==DESERT[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","desert")
      end
    end
    if @window.bitmap.nil?
      @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","none")
    end
    @window.y  = -@window.bitmap.height - 4
    @overlay.y = @window.y
    overlay = @overlay.bitmap
    pbSetSystemFont(@overlay.bitmap)
    if @extended_route
      textos=[
      [name,59+14,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    else
      textos=[
      [name,59,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    end
    pbDrawTextPositions(overlay,textos)
    #Draws the route numbers as Graphics...
    if @route_number != nil
      if @route_number.to_i >= 100 #Different positions according to route number
       pbDrawRouteNumber(@route_number,@window.bitmap,24-16,8+2)
      elsif @route_number.to_i >= 10
       pbDrawRouteNumber(@route_number,@window.bitmap,24-16,8+2)
      else
       pbDrawRouteNumber(@route_number,@window.bitmap,24-6,8+2)
     end
    end
    pbDrawTextPositions(overlay,textos)
  end

  def pbDrawRouteNumber(number,btmp,startX,startY,align=0)
    n = number.to_i.digits.reverse
    charWidth  = @route_number_icons.width/10
    charHeight = @route_number_icons
    .height
    startX -= charWidth*n.length if align==1
    n.each do |i|
      btmp.blt(startX,startY,@route_number_icons.bitmap,Rect.new(i*charWidth,0,charWidth,charHeight))
      startX += charWidth
    end
  end

  def disposed?
   @window.disposed?
   @overlay.disposed?
   if SHOW_SEASONS
     @season.disposed? if @season
   end
  end

  def dispose
    @window.dispose
    @overlay.dispose
    @season.dispose if @season
  end

  def update
    if @currentmap != $game_map.map_id
      dispose
    end
    return if @window.disposed?
    @window.update
    @overlay.update
    if @frames<10
      @window.y+= (@window.bitmap.height+0.1)/10
      @overlay.y+= (@window.bitmap.height+0.1)/10
      @season.y-= @season.bitmap.height/10 if @season
    elsif @frames>=90 && @frames<=100
      @window.y-= (@window.bitmap.height+0.1)/10
      @overlay.y-= (@window.bitmap.height+0.1)/10
      @season.y+= @season.bitmap.height/10 if @season
    elsif @frames>101
      @window.dispose; @overlay.dispose
      @season.dispose if @season
    end
    @frames+=1
  end
end
 
This is really great! There's a small issue in the code where some locations were not properly labeled, but I really quickly fixed that. Other than that, I love this!

BW_SignPosts.rb:
Expand Collapse Copy
#===============================================================================
#BW signposts (original by Shiney570, updated by Shashu Greninja)
#===============================================================================
class LocationWindow

  def initialize(name)
    #Original BW, B2W2 Signposts
    newarr=[]
    for name in TOWN
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr.push(s)
      town=TOWN+newarr
    end
    newarr2=[]
    for name in CITY
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr2.push(s)
      city=CITY+newarr2
    end
    newarr3=[]
    for name in BRIDGE
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr3.push(s)
      bridge=BRIDGE+newarr3
    end
    newarr4=[]
    for name in ROUTE
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr4.push(s)
      route=ROUTE+newarr4
    end
    #Custom Signpost Initializations
    newarr5=[]
    for name in FOREST
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr5.push(s)
      forest=FOREST+newarr5
    end
    newarr6=[]
    for name in CAVE
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr6.push(s)
      cave=CAVE+newarr6
    end
    newarr7=[]
    for name in PORT
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr7.push(s)
      port=PORT+newarr7
    end
    newarr8=[]
    for name in DESERT
      next if !name.is_a?(String)
      s=name.gsub(/^./) { |m| m.upcase }
      newarr8.push(s)
      desert=DESERT+newarr8
    end

    @frames=0
    @currentmap=$game_map.map_id
    name=$game_map.name
    @window=Sprite.new
    @window.z=99999
    @overlay=BitmapSprite.new(Graphics.width,Graphics.height)
    @overlay.z= 99999
    @route_number_icons = AnimatedBitmap.new(_INTL("Graphics/Pictures/Location/icon_numbers"))

    if SHOW_SEASONS == true
        @season=Sprite.new
        if pbIsSpring # Jan, May, Sep
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Spring")
        elsif pbIsSummer # Feb, Jun, Oct
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Summer")
        elsif pbIsAutumn # Mar, Jul, Nov
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Autumn")
        elsif pbIsWinter # Apr, Aug, Dec
          @season.bitmap = RPG::Cache.load_bitmap("Graphics/Pictures/Location/","Winter")
        end
        @season.y=Settings::SCREEN_HEIGHT
        @season.z=99999
    end

    for i in 0..town.length-1
      if $game_map.name.include?(town[i]) || @currentmap==TOWN[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","town")
      end
    end
    for i in 0..city.length-1
      if $game_map.name.include?(city[i]) || @currentmap==CITY[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","city")
      end
    end
    for i in 0..bridge.length-1
      if $game_map.name.include?(bridge[i]) || @currentmap==BRIDGE[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","bridge")
      end
    end
    for i in 0..route.length-1
      if $game_map.name.include?(route[i]) || @currentmap==ROUTE[i]
        @route_number=$game_map.name.gsub(/[^0-9]/, '')
        if @route_number.to_i >= 100 #Uses wider Route callout for 3-digit route numbers
          @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","route_extended")
          @extended_route = true
        else
          @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","route")
          @extended_route = false
        end
      end
    end
    for i in 0..forest.length-1
      if $game_map.name.include?(forest[i]) || @currentmap==FOREST[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","forest")
      end
    end
    for i in 0..cave.length-1
      if $game_map.name.include?(cave[i]) || @currentmap==CAVE[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","cave")
      end
    end
    for i in 0..port.length-1
      if $game_map.name.include?(port[i]) || @currentmap==PORT[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","port")
      end
    end
    for i in 0..desert.length-1
      if $game_map.name.include?(desert[i]) || @currentmap==DESERT[i]
        @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","desert")
      end
    end
    if @window.bitmap.nil?
      @window.bitmap=RPG::Cache.load_bitmap("Graphics/Pictures/Location/","none")
    end
    @window.y  = -@window.bitmap.height - 4
    @overlay.y = @window.y
    overlay = @overlay.bitmap
    pbSetSystemFont(@overlay.bitmap)
    if @extended_route
      textos=[
      [name,59+14,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    else
      textos=[
      [name,59,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    end
    pbDrawTextPositions(overlay,textos)
    #Draws the route numbers as Graphics...
    if @route_number != nil
      if @route_number.to_i >= 100 #Different positions according to route number
       pbDrawRouteNumber(@route_number,@window.bitmap,24-16,8+2)
      elsif @route_number.to_i >= 10
       pbDrawRouteNumber(@route_number,@window.bitmap,24-16,8+2)
      else
       pbDrawRouteNumber(@route_number,@window.bitmap,24-6,8+2)
     end
    end
    pbDrawTextPositions(overlay,textos)
  end

  def pbDrawRouteNumber(number,btmp,startX,startY,align=0)
    n = number.to_i.digits.reverse
    charWidth  = @route_number_icons.width/10
    charHeight = @route_number_icons
    .height
    startX -= charWidth*n.length if align==1
    n.each do |i|
      btmp.blt(startX,startY,@route_number_icons.bitmap,Rect.new(i*charWidth,0,charWidth,charHeight))
      startX += charWidth
    end
  end

  def disposed?
   @window.disposed?
   @overlay.disposed?
   if SHOW_SEASONS
     @season.disposed? if @season
   end
  end

  def dispose
    @window.dispose
    @overlay.dispose
    @season.dispose if @season
  end

  def update
    if @currentmap != $game_map.map_id
      dispose
    end
    return if @window.disposed?
    @window.update
    @overlay.update
    if @frames<10
      @window.y+= (@window.bitmap.height+0.1)/10
      @overlay.y+= (@window.bitmap.height+0.1)/10
      @season.y-= @season.bitmap.height/10 if @season
    elsif @frames>=90 && @frames<=100
      @window.y-= (@window.bitmap.height+0.1)/10
      @overlay.y-= (@window.bitmap.height+0.1)/10
      @season.y+= @season.bitmap.height/10 if @season
    elsif @frames>101
      @window.dispose; @overlay.dispose
      @season.dispose if @season
    end
    @frames+=1
  end
end
Thanks both remarks and the bug, I will release the update soon enough!!
 
i dont know anything abaut scripting so i dont know if it would be dificult to add but could there be a way to show the time of day (morning, afternoon, evening, night) instead of the seasons?
 
Last edited:
This is a very nice plugin but when I made a new map and playtested it. It only put the none picture on it I'm not sure why that happens.
 
Nice pluging, by the way, i'm planning to change the graphics, so, can you tell me how to "push" for ex: the location words down a bit? So i can position the words better for the new graphics.
 
Nice pluging, by the way, i'm planning to change the graphics, so, can you tell me how to "push" for ex: the location words down a bit? So i can position the words better for the new graphics.
Thanks for the feedback, I haven't been in touch with this plugin for quite a while now, so I will let you know tomorrow....
 
Thanks for the feedback, I haven't been in touch with this plugin for quite a while now, so I will let you know tomorrow....
The script works well in essentials v20, but the location and seasons text need to be fixed. Please can you update it?
 
The script works well in essentials v20, but the location and seasons text need to be fixed. Please can you update it?
For the location text you mean that it is a bit higher than usual? You can easily fix that by going to the BW_Singpost.rb and in line 146 and 150 change the values of the Y

Ruby:
Expand Collapse Copy
if @extended_route
      textos=[
      [name,59+14,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    else
      textos=[
      [name,59,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    end

Replace the "8-12" for other value. I have it at "10-0" and seems to work well
 
For the location text you mean that it is a bit higher than usual? You can easily fix that by going to the BW_Singpost.rb and in line 146 and 150 change the values of the Y

Ruby:
Expand Collapse Copy
if @extended_route
      textos=[
      [name,59+14,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    else
      textos=[
      [name,59,8-12,0,Color.new(255,255,255),Color.new(115,115,115)],
      ]
    end

Replace the "8-12" for other value. I have it at "10-0" and seems to work well
That's exactly what i need to know. Thx.
 
Understood. Thank you.
Technically it does still work but you have to manually add it to the script editor - at least that's what I did. It isn't recognized as a plugin but it does work in the script editor.
[EDIT] Actually, I was wrong ,If you update the meta file to 20.1 it will work just fine no need to add it in the script editor manually. :)
 

Attachments

Last edited:
Back
Top