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.

FONTS

Star

Sponsor

How does one get new fonts in XP. I've tried typing in fonts that are stored on my computer onto a script that had Arial set as the font type. But nothing appears no matter which font I use
 

boon

Sponsor

This is a scripting issue right?

Okay, give me a few minutes, it's a line you put in the Main section that does it. (NOTE: When changing fonts, it must be a font that the user has/can install via a font folder.)

Edit: Just a second, this doesn't work on PKE. Are you using the legal version of RM maker? Font rendering is problematic on PKE.
 

Star

Sponsor

Boon":14b3ct2a said:
This is a scripting issue right?

Okay, give me a few minutes, it's a line you put in the Main section that does it. (NOTE: When changing fonts, it must be a font that the user has/can install via a font folder.)

Edit: Just a second, this doesn't work on PKE. Are you using the legal version of RM maker? Font rendering is problematic on PKE.
Yeah, I'm using a legal version of RPG maker XP. The script I was using was the TIMER script by Kain Nobel

#===============================================================================
# ~* Sprite_Timer (Critical) *~
#-------------------------------------------------------------------------------
# Written by: Kain Nobel
# Version: 0.5
# Last Update: 5/13/2008
# Date Created: 10/17/2008
#===============================================================================
TimerCriticalSwitch = 1
#===============================================================================
# INSTRUCTIONS:
# This is just an enhanced version of Sprite_Timer default class, with a few
# small changes I decided to make to it. Now it not only displays minutes and
# seconds in the string, but also milli-seconds... yes, a fraction of a second,
# and it updates in real time too! (Provided your computer isn't fucked!)
# Lastly, it detects the total set time vs current time, and sets a caution
# and critical color when the timer reaches a certain point, such as 1/2 or 3/4
# the set time.
#-------------------------------------------------------------------------------
class Sprite_Timer < Sprite
#------------------------
# * Object Initialization
#------------------------
def initialize
super
# Variable used to determine timer critical
@critical = -1
self.bitmap = Bitmap.new(120, 48)
self.bitmap.font.name = "Arial"
self.bitmap.font.size = 32
self.x = 380 - self.bitmap.width
self.y = 0
self.z = 500
update
end
#------------------------
# * Dispose
#------------------------
def dispose
if self.bitmap != nil
self.bitmap.dispose
end
super
end
#------------------------
# * Frame Update
#------------------------
def update
super
# Set Timer to visible if working
self.visible = $game_system.timer_working
# If Timer needs to be withdrawn
self.bitmap.clear
# Get @total_sec value
@total_sec = $game_system.timer / Graphics.frame_rate
frac = $game_system.timer % Graphics.frame_rate
sec_fraction = frac.to_f / Graphics.frame_rate.to_f
sec_fraction *= 100
min = @total_sec / 100
sec = @total_sec % 60
# Send min, sec, millisec info to a string.
text = sprintf("%02d:%02d", sec, sec_fraction)
# If Critical is equal or less than 0, set to @total_sec / 2
if $game_switches[TimerCriticalSwitch] == true
# Auto-Set critical time to 1/2 timer set time
if @critical == -1
@critical = (@total_sec / 2)
end
# If @total_sec is more than (Timer Setting / 2) ?
if @total_sec >= @critical
self.bitmap.font.color.set(204, 224, 240)
# If @total_sec is equal to or more than (Timer Setting / 4) ?
elsif @total_sec >= (@critical / 2)
self.bitmap.font.color.set(255, 200, 0)
else
# @total_sec is less than Timer Critcal Variable!
self.bitmap.font.color.set(255, 0, 0)
end
else
# Switch is off, automatically set to default color
self.bitmap.font.color.set(204, 224, 240)
end
# Draw the timer value from string 'text'
self.bitmap.draw_text(self.bitmap.rect, text, 1)
end
end

All I wanted to do was change it from Arial, to something else. And everytime I do, it doesn't show up. It works fine with Arial. I just don't know how to get Fonts into my RPG maker
 

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