Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Let's Try Messaging

Crase

Member

Ok, im new to RGSS but not new to coding in its entirety [I usually use GameMaker, so I know about most of the basic things]. I feel as if since I know coding pretty well, that if a learn the RGSS syntax, I can do pretty well with this thing. So I started playing around with RMXP, and it took quite some time to kind of get the feel for things [still, everything feels new and confusing at times] and I came up with this:
Screenshot
Scripting
[ruby] 
#This will draw the [first character in party]'s name
 
class Name < Window_Base
  def initialize
    super (0, 0, 200, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    char = $game_party.actors[0]
    self.opacity = 255
    self.contents.font.name = "Times New Roman"
    self.contents.font.color = text_color(3)
    self.contents.font.size = 20
    self.contents.draw_text(40, 0, 200, 32, char.name)
  end
end
 
# New page
#This will draw the character's face
 
class Face < Window_Base
  attr_accessor :battler_name
 
  def initialize
    super (0, 64, 200, 134)
    lv = $game_party.actors[0].level
    hp = $game_party.actors[0].hp
    maxhp = $game_party.actors[0].maxhp
    sp = $game_party.actors[0].sp
    maxsp = $game_party.actors[0].maxsp
    g = $game_party.gold
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.size = 14
    self.contents.draw_text(100, 0, 200, 32, "Level "+lv.to_s)
    self.contents.draw_text(100, 25, 200, 32, "HP "+hp.to_s+"/"+maxhp.to_s)
    self.contents.draw_text(100, 50, 200, 32, "SP "+sp.to_s+"/"+maxsp.to_s)
    self.contents.draw_text(100, 75, 200, 32, "Ruby "+g.to_s)
    draw_picture(0,0)
  end
 
  def draw_picture(x, y)
    graphic = $game_party.actors[0].battler_name
    image = Sprite.new
    image.bitmap = RPG::Cache.battler(graphic.to_s, 0)
    src_rect = Rect.new(0, 0, 96, 96)
    self.contents.blt(x, y, image.bitmap, src_rect)
  end
end
 
#New Page
#This handles
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top