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.

XP text script request. Changing text.

Hello all.  Currently using RPG Maker XP and I have been searching for something like this however, I have been unsuccessful at finding it anywhere on the site.  I will do my best to explain what I need and if more information is needed PLEASe let me know so that I can add more.

I am creating a game where there is a second languange.  I want to be able to show a different font for a particular character other then the english font.  For example.  Character A shows his words in the standard character font while character B's text when speaking/writiing is in Japanese/chinese/Hylian... not a snndard font that is on everyone's pc. I want to be able to display this throughout the game when incountering these particular NPCs. 

Any and all assistance would be greatly appreciated.  Thank you in advance and again if I need more information then please let me know and I will do my best to answer. :smile:
 
Although this is such a wonderful script this is not exackly what I am requesting.  I want to be able to change the font itself.  Here is an example but I want to be able to use my own font and not what's standard in the program itself:

Character 1:
Text:  So you study what style of karate

Character 2:
text: 写真å
 

Atoa

Member

Whit UMS you *can change fonts*
You can even use two (or more) diferent fonts on the same message.

But remember that the font must be installed on the player's PC or he won't be able to see it.
 
I believe you I just didn't see it in the demo I found of it however this is the problem because the font that I want to use is not a standard font that is on everyone's pc and I am suter there is a way to add a special font to the program however I am not a scripter.  If anyone else has any suggestions as to how I can achieve this it would be greatly appreciated. :blush:
 

Atoa

Member

Use this script to Auto Install Fonts
Code:
#==============================================================================
# * Auto Instalar Fontes
#------------------------------------------------------------------------------
# Wachunga
# Version 1.0
# 2006-01-07
#------------------------------------------------------------------------------
module Fonts

# filenames of fonts to be in stalled
Filenames = ['Font Name.ttf']
# e.g. Filenames = ['carbono_pw.ttf','FUTRFW.TTF']

# names (not filenames) of fonts to be installed
Names = ['Font Name']
# e.g. Names = ['carbono', 'Futurist Fixed-width']

# whether to notify player (via pop-up message) that fonts were installed
Notify = false

# location of fonts (relative to game folder)
Source = 'Fonts/'

# location of fonts after installation
Dest = ENV['SystemRoot'] + 'Fonts'

end

class Scene_Title

AFR = Win32API.new('gdi32', 'AddFontResource', ['P'], 'L')
WPS = Win32API.new('kernel32', 'WriteProfileString', ['P'] * 3, 'L')
SM = Win32API.new('user32', 'SendMessage', ['L'] * 4, 'L')
WM_FONTCHANGE = 0x001D
HWND_BROADCAST = 0xffff

alias wachunga_autofontinstall_st_main main
def main
success = []

for i in 0...Fonts::Filenames.size
f = Fonts::Filenames[i]
# check if already installed...
if not FileTest.exists?(Fonts::Dest + f)

# check to ensure font is in specified location...
if FileTest.exists?(Fonts::Source + f)
# move file to fonts folder
File.rename(Fonts::Source + f, Fonts::Dest + f)
# add font resource
AFR.call(Fonts::Dest + f)
# add entry to win.ini/registry
WPS.call('Fonts', Fonts::Names[i] + ' (TrueType)', f)
SM.call(HWND_BROADCAST,WM_FONTCHANGE,0,0)
if FileTest.exists?(Fonts::Dest + f)
success.push(Fonts::Names[i])
else
p 'Instalação de fonte automatica: Erro ao instalar' + Fonts::Names[i] + '.'
end
else
p 'Instalação de fonte automatica: Fonte ' + f + ' não econtrada.'
end

end
end

if success != [] # one or more fonts successfully installed
if Fonts::Notify
fonts = ''
success.each do |f|
fonts << f << ', '
end
p 'Instalação de fonte automatica: instalação completa ' + fonts[0..-3]
end
# new fonts aren't recognized in RMXP until the program is
# restarted, so this is (unfortunately) necessary
a = Thread.new { system('Game') }
exit
end
wachunga_autofontinstall_st_main
end

end

You must create a new folder named "Fonts" on the folder of your projetc.
then you must edit the lines 11 and 15 to add the names of fonts.
 

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