Script to change window file and font with switch

● ARCHIVED · READ-ONLY
Started by RPGVeir 9 posts View original ↗
  1. Good morning! I am in need of a script that would let me switch window styles with a switch. It would be amazing if same thing could be done with font. I just need to swap between window and font styles for one moment in my game, then swap back later.

    Or is there any existing script that would let me achieve that?

    By window i mean this: upload_2018-9-26_9-25-30.png
  2. I have a private script which would let you change the window skin (and back again) with a script call, so not a switch, but functionally that is the same. I used it in my game 'A Timely Intervention' when I was switching back and forth between 2 separate parties.

    It doesn't, however, change the font.
  3. That sounds fair enough. D:
  4. I'll pm you.

    Someone else may come up with a font change script.
  5. Thank You a lot!
  6. you don't need a whole script to change the window skin, ... the window skin is a property of windows, so you can change it the same way you change tone, width or position.

    you *will* need, however, a refresh after changing it, so try to put it in between updates.
  7. RPGVeir said:
    It would be amazing if same thing could be done with font.

    The ease of this depends on whether you want the font changed for only select windows (i.e. message window but not main menu windows, shop window but not save menu, battle windows but not title screen window) or for every single window at once and whether you need it done mid-message.

    If you want it done for every window and don't need it changed in the middle of a message, you can just use the script call:
    Code:
    Font.default_name = "fontname"
    Where 'fontname' is the name of your desired font (it must be put in quotation marks). The capital F on Font matters too, as it refers to the module. Font.default_size can also be used to change its size. This will affect all fonts in the game for the point of the call onwards.

    However the new font name/size won't be remembered in any save files created or loaded. One way to tackle that is to store the name of it in a game variable I.E.
    Code:
    Font.default_name = $game_variables[1]
    Where variable 0001 in the database has been set to the name of your font (either through a script call or Control Variables > Script > "fontname"). Game variables do get remembered in save files - however, you will still have to run to the script call again after loading a save game in order to set the font to it, because the Font module is reset every time the game is started.

    On the other hand, if it only want it changed for select windows or mid-message you will need a more in-depth script to provide that functionality.
  8. Actually I need it just to change the default like You said, thank You very much!