Ruby/RGSSx questions that don't deserve their own thread

Does anyone know if there's a script call to change fonts? Or some way to change the font used by YEA Ace Core Engine with System Options?

I found this in the Help window of RPGMaker:

Font.new([name[, size]])

Creates a Font object.

Font.exist?(name)

Returns true if the specified font exists on the system.

Maybe Font.new([name[, size]]) can be useful
look up Font in the help file. If you want to change fonts throughout the game, you just follow the instructions it gives there at the bottom. Put one or more of those lines immediately above the "main" slot in your scripts, and all your fonts will be changed. Remember the name is NOT the name of the file.
Well, you can do :

module TORQUS  module FONT    NAME = {      0 => ["Verdana"], # When the variable with iD of the NAME_VARIABLE is 0, font Verdana will be used.      1 => ["Courier New"], # And when it's 1, Courier New will be used.      # ...    }    NAME_VARIABLE = 10 # Variable iD that regulates the name    SIZE_VARIABLE = 11 # Variable iD that regulates the size. Bigger the variable, bigger the font. WARNING! THE SMALLEST FONT IS 4!!!  endendclass Scene_System < Scene_MenuBase # <== If it does not work,replace with Scene_Base  include TORQUS::FONT  def update_font    Font.default_name = NAME[$game_variables[NAME_VARIABLE]]    Font.default_size = $game_variables[SIZE_VARIABLE]  end  def return_scene    update_font    super  endendAnd then add the variables with iD's 10 and 11 to the System Options (in the CUSTOM_VARIABLES)

Of course, if you want just to change font with a script call, use

Font.default_size = <the font size>Font.default_name = ["Font name 1", "If font name 1 does not exist, use this name"]And so on, for more detailed explaination, go to :

1) Open Script Editor (F11)

2) Click Help

3) Find the Search box at the left (if it's not there, there should be a Show button at the top left, and then navigate to the tab "Search" in the toolbox that appears)

4) Search for Font.

5) Click on the result with name Font

6) There is a detailed page about Font properties, methods and so on...

At least I think so.
look up Font in the help file. If you want to change fonts throughout the game, you just follow the instructions it gives there at the bottom. Put one or more of those lines immediately above the "main" slot in your scripts, and all your fonts will be changed. Remember the name is NOT the name of the file.
Yes, that sets the font of the game, I already have that, but do you know how to change them while playing? A script call or something like that?
Well, you can do :

module TORQUS  module FONT    NAME = {      0 => ["Verdana"], # When the variable with iD of the NAME_VARIABLE is 0, font Verdana will be used.      1 => ["Courier New"], # And when it's 1, Courier New will be used.      # ...    }    NAME_VARIABLE = 10 # Variable iD that regulates the name    SIZE_VARIABLE = 11 # Variable iD that regulates the size. Bigger the variable, bigger the font. WARNING! THE SMALLEST FONT IS 4!!!  endendclass Scene_System < Scene_MenuBase # <== If it does not work,replace with Scene_Base  include TORQUS::FONT  def update_font    Font.default_name = NAME[$game_variables[NAME_VARIABLE]]    Font.default_size = $game_variables[SIZE_VARIABLE]  end  def return_scene    update_font    super  endendAnd then add the variables with iD's 10 and 11 to the System Options (in the CUSTOM_VARIABLES)

Of course, if you want just to change font with a script call, use

Font.default_size = <the font size>Font.default_name = ["Font name 1", "If font name 1 does not exist, use this name"]And so on, for more detailed explaination, go to :

1) Open Script Editor (F11)

2) Click Help

3) Find the Search box at the left (if it's not there, there should be a Show button at the top left, and then navigate to the tab "Search" in the toolbox that appears)

4) Search for Font.

5) Click on the result with name Font

6) There is a detailed page about Font properties, methods and so on...

At least I think so.
This is what I was looking for, thank you again Kocka.
Hello again,

QUESTION: how to create a window in battle scene? I'd like to draw text, numbers, gauges and other stuff in battle scene.  *properly*

EXAMPLE: Draw a text and variable next to it for example in the upper-right corner in battle scene.

WHAT I HAVE TRIED: I made a simple window like many others, but in battle scene the window is disposed IDK why when character's turn comes. Is there another more efficient way to do this?

Is there something to add here to prevent that or I need to make it completely in different way? If so, I think I'll create a thread for this.

Thank you in advance.
Maybe like this?

Code:
class Scene_Battle < Scene_Base  alias :rikifive_random_alias_create_all_windows_4C3n :create_all_windows  def create_all_windows    rikifive_random_alias_create_all_windows_4C3n    create_hud_window  end  def create_hud_window    viewport = Viewport.new    viewport.ox = Graphics.width - 100    viewport.z = 150    @hud_window = Window_RikifiveHUD.new    @hud_window.viewport = viewport    # And maybe add some set_handler's here if your window is selectable ...  endendclass Window_RikifiveHUD < Window_Base  def initialize    super(0, 0, 100, 100)    # And other things...  endend
This is DEFINITELY not a question that does not deserve its own thread. Please start a new thread with all the details in RGSSx Script Support or in Learning Ruby and RGSSx.
Maybe like this?

<scissors ran away from here>
kdZE0KB.png
  ☜( ͡° ͜ʖ ͡°) - - -{Oh you tricky bastud!)
Same thing happens. (window is disposed when character's turn comes)

That's what I wanted to know, I'll have to open a new thread.

Thanks!

This is DEFINITELY not a question that does not deserve its own thread. Please start a new thread with all the details in RGSSx Script Support or in Learning Ruby and RGSSx.
I know, but I wanted to ask first, because I thought I was simply missing something. But now I know, that there is bigger problem here.
You know, it's okay if you open a new thread for something that turns out to be a small issue 😉
Is there a way to determine which item I am currently selecting at in the Item scene? For example, I go to the menu and go to Items. How will I determine that the current item I am selecting with my cursor is item no. 1, etc?
Implementation depends on what you want to do. Maybe you want :

Code:
SceneManager.scene.item
Does anyone know how to assign a sprite to a walking character in Neon Black's State Graphics Script?

I want to use "character gfx["name" 3]" but the only clue I have is that it's a script call. Where and how should I implement that to change sprite when the actor dies? What is the index order in the spritesheet, I mean, where is 0 and where is 9? I couldn't find info about indexes for character sprites in the help window. The creator didn't make a step by step guide and the original thread seems to be dead.

I understood really complex scripts and changed them to my necessities but this one is killing me.
@Torqus

Those tags should be put in state notetags.

Character indexes are numbered 0-7, and you can check which is which when adding the face to the Show Text, it usually in the Event says something like

@> Show Text, 'Some actor', some index

: The text here.

Well, 'some index' is the index you are searching for.
Well, for some reason it didn't work before, I tested every possible way and one worked. I knew they should go in the status notetag but id didn't work the way I did it and then I saw it said "Script Call"... I got it working now at least. Thank you.
Ah, I'm struggling with it for some time.

Is it possible to make a Item List window in main menu?

In my main menu I only have one character and 3 commands : "Items", "Map" and "Options" and lots of free space.

What I would love to have is to draw that list in main menu and when I'd pick "Items" then I would be redirected to that window, where I could use items. (With no category selection - I only have ITEMS, no EQ/keys etc.) --> Just move item list window with its help window from Scene_Item to Scene_Menu.

Or at least disable category selection - > when picking "Items" command, you'll be redirected to Scene_Item but no categories - it instantly shows item list etc.

I really tried many things and I was kinda close to solution, but I can't... Any help appreciated.
It can be done.

Make a Window_Selectable.

Set item_max to $game_party.all_items.size

In draw_item do something like:

def draw_item(index) rect = item_rect(index) item = $game_party.all_items[index] draw_icon(item.icon_index, rect.x, rect.y) # I think you know what else...endAnd when creating a window, set the handlers like
Code:
def create_item_window  @item_window = Window_Items.new  @item_window.set_handler(:ok, method(:on_item_ok))  @item_window.set_handler(:cancel, method(:on_item_cancel))end
And then define two methods, on_item_ok and on_item_cancel and they should handle when user selects the item (and uses it) and when user goes back to MenuIf you think you can do such thing on your own, try it.

Else, I suggest you to open a new thread.
Else, I suggest you to open a new thread.
^^ this!
Yeah, yeah I know. =P

I'm working on this. =P

Done.

> Continue

> Exit Game
Sorry if it's wrong bringing this back.


But I still have problems with State Graphics Script. It does work, but I don't think I understand how.


If the note that goes in state is "character gfx["name" 5]", where "name" is the name of the file and 5 is the index, where does it tells what character is being changed?


What I mean is that I have in death:


character gfx["TEST1" 1]    - index 1 is the character dead


character gfx["TEST2" 1]


And the actors are called TEST1 and TEST2, also the sprites they use are in the same file as the states (they are 4-dir state sprites).


But when TEST1 dies it takes TEST2 sprite, all of the actors change to TEST2 when they die... why would you make a script where you can have only 1 graphic for all dead characters? :S


For reference, this is an example of the files I'm making ("TEST2" is the exact same but recolored):

Spoiler
[IMG]http://i1135.photobucket.com/albums/m639/Torqus7/bontest.png[/IMG]

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/