iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> Message font(solved), I need a script to replase fonts
jesse120
post Mar 25 2012, 02:57 AM
Post #1


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




Search number 10519195120X
I would like a script that allows you to change the font of the game with a $game_variable. The variable will count up the Font.default_name
array starting at 0. I have tried the message scripts and they are not what I am looking for. If you need more detail just ask.

This post has been edited by jesse120: May 3 2012, 09:51 PM


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
JeyMoore
post Mar 26 2012, 05:14 PM
Post #2



Group Icon


Type: Undisclosed




I'm not quite sure I understand but... are you trying to just change the font?

If so, use this code:

Font.default_name = ("Arial")

Just replace Arial with the font-face name you wish to use. There are other commands that make your font italic and / or bold. They are:

Font.default_bold = true / false (choose one)
Font.default_italic = true / false (again, choose one)

EDIT: After reading your post again I realize this isn't what you wanted. tongue.gif.

This post has been edited by JeyMoore: Mar 26 2012, 05:16 PM
Go to the top of the page
 
+Quote Post
   
jesse120
post Mar 26 2012, 11:32 PM
Post #3


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




That is along the lines of the way I am looking but for mine I want it to be an encrypted message that the player can decode at a high enough skill
the
Font.default_name command only sets fonts in an order of importance and draws from the front of the array first. If that is missing it draws the nexe
ex
Font.default_name = ("Arial", "Oblivion")
normally the font will be "Arial" but if "Arial" is missing then it will use "Oblivion"
but "Arial" has to be missing for that to happen



--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
jesse120
post Mar 29 2012, 10:57 PM
Post #4


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




bump


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
jesse120
post Apr 10 2012, 01:23 AM
Post #5


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




bump


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
Scompartimenty
post Apr 11 2012, 09:21 PM
Post #6


mikb89 ^^
Group Icon


Type: Coder
Alignment: Chaotic Neutral




Where do you want the font to be changed? Just in messages or elsewhere?
Because changing Font.default_whatever doesn't change font in already initialized bitmap, so you'll have to edit this.font and that.font.
Go to the top of the page
 
+Quote Post
   
jesse120
post Apr 11 2012, 11:39 PM
Post #7


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




I would like it to apply only to the message window and any other generated text (menu, special scenes, shop etc.)


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
Scompartimenty
post Apr 12 2012, 12:59 PM
Post #8


mikb89 ^^
Group Icon


Type: Coder
Alignment: Chaotic Neutral




Ok, try this:
CODE
# Adding option to reset message window in maps & battles
class Scene_Map
  def renew_message
    @message_window.dispose
    @message_window = Window_Message.new
  end
end

class Scene_Battle
  def renew_message
    @message_window.dispose
    @message_window = Window_BattleMessage.new
  end
end

# Adding code callable by events:
class Game_Interpreter
  ORIGINAL_FONT = Font.default_name

  # change_font() let you change the font by passing font name as usual. Ex: change_font("Arial Narrow") or change_font(["Arial Narrow","Tahoma"])
  def change_font(font)
    Font.default_name = font # set the font
    $scene.renew_message if $scene.is_a?(Scene_Map) || $scene.is_a?(Scene_Battle) # reset the message window
  end

  # restore_font let you restore the original font once you changed it by change_font()
  def restore_font
    change_font ORIGINAL_FONT # calls change_font by passing the original font
  end
end

Insert in a new script under Materials.
To change font write in a call script "change_font("X")" where X is the font name (Ex: "Arial Narrow") or the font name array (Ex: ["Arial Narrow","Tahoma"]).
To restore the original font you can just call "restore_font".

This post has been edited by Scompartimenty: Apr 13 2012, 09:48 AM
Go to the top of the page
 
+Quote Post
   
jesse120
post Apr 12 2012, 09:33 PM
Post #9


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




I was trying to use your script but I couldn't get it to work. Could you add a few comments to the script and maybe more specific instructions like exactly where do I put the call for it and what do I change s it will change fonts?


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
Scompartimenty
post Apr 13 2012, 09:52 AM
Post #10


mikb89 ^^
Group Icon


Type: Coder
Alignment: Chaotic Neutral




I noticed that the code posted before didn't change the font in battle messages, so copy this:
CODE
# Adding option to reset message window in maps & battles
class Scene_Map
  def renew_message
    @message_window.dispose
    @message_window = Window_Message.new
  end
end

class Scene_Battle
  def renew_message
    @message_window.dispose
    @message_window = Window_BattleMessage.new
  end
end

# Adding code callable by events:
class Game_Interpreter
  ORIGINAL_FONT = Font.default_name

  # change_font() let you change the font by passing font name as usual. Ex: change_font("Arial Narrow") or change_font(["Arial Narrow","Tahoma"])
  def change_font(font)
    Font.default_name = font # set the font
    $scene.renew_message if $scene.is_a?(Scene_Map) || $scene.is_a?(Scene_Battle) # reset the message window
  end

  # restore_font let you restore the original font once you changed it by change_font()
  def restore_font
    change_font ORIGINAL_FONT # calls change_font by passing the original font
  end
end

Well, I commented out everything, but you really don't need to know what the script does in order to get it working (:
I also edited the message above with this code.

For how to use it, I hope the event list image speaks more than thousand words ^^

You have just to use the "Call script" command, third page of the event commands, the only one in the "Script" group.

If with doing this, it won't work: are you using other messages script? If so, what script?
Go to the top of the page
 
+Quote Post
   
jesse120
post Apr 17 2012, 01:50 PM
Post #11


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




so if I want to call the font Oblivion my script would be
CODE
# Adding option to reset message window in maps & battles
class Scene_Map
  def renew_message
    @message_window.dispose
    @message_window = Window_Message.new
  end
end

class Scene_Battle
  def renew_message
    @message_window.dispose
    @message_window = Window_BattleMessage.new
  end
end

# Adding code callable by events:
class Game_Interpreter
  ORIGINAL_FONT = Font.default_name

  # change_font() let you change the font by passing font name as usual. Ex: change_font("Arial Narrow") or change_font(["Arial Narrow","Tahoma"])
  def change_font(font)
    Font.default_name = "oblivion" # set the font
    $scene.renew_message if $scene.is_a?(Scene_Map) || $scene.is_a?(Scene_Battle) # reset the message window
  end

  # restore_font let you restore the original font once you changed it by change_font()
  def restore_font
    change_font ORIGINAL_FONT # calls change_font by passing the original font
  end
end

and my call would be
CODE
change_font(font)

and when I am done I would call
CODE
restore_font

Right?


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   
Scompartimenty
post Apr 17 2012, 03:23 PM
Post #12


mikb89 ^^
Group Icon


Type: Coder
Alignment: Chaotic Neutral




No, you don't have to change the script, just paste as is in a new voice under the "Materials" one ^^

Then, in the event when you want to use "Oblivion" just insert a call script with:
CODE
change_font("Oblivion")


Remember, if you don't know, to also insert this font in the "Fonts" folder created where Game.exe is ^^
Go to the top of the page
 
+Quote Post
   
jesse120
post Apr 17 2012, 10:02 PM
Post #13


Master Eventer, Novice scripter, pathetic spriter
Group Icon


Type: Designer
Alignment: Chaotic Good




Thank you, I don't think I would have got that to work I appreciate your effort.


--------------------
I might not post anything for a while, but I am still here, watching. You may not see me, but I see you.
Still taking event requests. Still watching topics. I will see comments to my posts and respond.
I will probably not update any of my scripts for a while.

I have not gone!!!

Spoiler:

Master eventer
Need an unusual event call me and i might be able to make it
ex vehicle, pet
search number
I do take event requests
search number 10519195120
Please don't put this number on any of your own posts or topics
note: the search number will be on any post I make to aid in searching by author. If I forget to put it on a topic please notify me.

I will try to check any posts/PMs around 7:30 AM, 3:00 PM, and after 6 PM most days (time in Pacific Time)

The ultimate video game

Legend of, Elder, Fear, of Fabled, Fallout, Call, of Modern, Gears, of Halo, Metal, Ghost, Assassin, Mass, Homicide, Fantasy, 5
That stands for
Legend of Zelda, Elder Scrolls, ?????, Fable, Fallout, Call of Duty, Modern Warfare, Gears of War, Halo, Metal Gears, Ghost Recon, Assassin's Creed, Mass Effect, Auto Homicide, Final Fantasy, 5
Let me know if you want a game added to the list

If you are a believer of Jesus Christ, believe he is the only way to heaven, and are 100% proud of it, put this in your sig.
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st August 2014 - 11:14 AM

RPGMakerVX.net is an Privacy Policy, Legal.