[ACE] Images Behind All Menus - A Request

Discussion in 'RGSS3 Script Requests' started by DoctorArtist, Nov 16, 2018.

  1. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'm looking for a script that can show images behind menu scenes. But it isn't as simple as it sounds.

    I've come here to post as a last resort.

    I've tried to work with Luna, but it makes a lot of my scripts incompatible, or certain things just didn't work right alongside Luna, and considering I'd only be using that for main/pause/camp menus and not battle, it really was a LOT more than I needed. The complexity of the enormous set of scripts and the preknowledge of coding and syntax isn't something I'm looking for, nor do I have the time to learn, being how I'm already extremely past my deadline.

    I would have LOVED to work with the Monogatari menu script from Moghunter, especially with that totally awesome ESC/pause/camp menu, but I had issues with adding some custom scenes to the menu, not to mention the item menu, which unfortunately limited my options to one long list, rather than the categorized item list that is Yanfly's. Same goes to the Skill Menu, which is also categorized.

    I tried Galv's Menu Theme script, and I couldn't figure out how to add new scenes to the options of applicable backgrounds, instead of just what came with the engine, like the base item scene or the base skills scene. Maybe I was too tired, I can't remember. There's also an issue with a custom time script suddenly disappearing once that script was installed.

    There's more that I've tried, I just can't remember most of them. I usually delete them right after I've realized they won't work out for me personally.

    I'm not looking to work just with the base engine's menus/scenes. I'm looking for compatibility with custom scripts out there. CSCA scripts, specifically Achievements and Crafting. Yanfly's Settings menu. As of right now, I'm pretty certain those are the only "custom" things I need to work with, most of Moghunter's scripts have the custom image background option already built in...
    (edited for links to the above scripts, as well as removing Venka's Bestiary from the list. I forgot there was options for background images as well as turning down the opacity on the windowskin, probably out of exhaustion I forgot about that, and I wanted to own up to it instead of simply deleting that bit out.)

    Windowskins can only do so much for me. I want to give my game a full attention to detail. I've done up everything else, from the battle menus to the quest journal, music players, choice menus, and so much more. I don't want the game's designs to look like I gave up halfway through, you know? Windowskins can sometimes look almost copy-and-paste, and it ends up repetitive after a while.

    After spending, on and off, a few days looking myself for something that could work out in my favor, I've come up rather...well...not empty handed, just, handfuls of scripts I can only half use, or will be what I want but will alter something I don't want, or work up to a certain point...so I've come to the Great Forums of RPG Maker, to hopefully gain some peace of mind knowing that there is a ray of hope out there for me and my project.

    Just for kicks, by the way, here's some of the stuff I've done for the game. You might see why using Windowskins won't really work for too long with this project.

    NewChoiceMenu2018.png WilfordWarfstacheReportsLIVE.png Description1.png
    (please ignore that floating egg, btw.)
    Description3.png
     
    Last edited: Nov 16, 2018
    #1
  2. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,321
    Likes Received:
    3,959
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #2
  3. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,668
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    It might be simple than you thought. And since you're requesting such compatibility with many scripts, it also might be better if you link all those scripts all together in your thread. And a mockup on what you want to do. I know, you posted some screenshots, but it doesn't tell what you want to do, it's just screenshot of your game (awesome screenshot btw).

    Have you tried to learn a bit of scripting?
    Injecting a new image into a scene is as simple as
    Code:
    class Scene_MenuBase
      alias scene_menubase_start start
      def start 
        scene_menubase_start
        @background = Sprite.new
        @background.z = 100
        @background.bitmap = Cache.title1('Castle') # <-- this need to change
      end
      
      alias scene_menubase_term terminate
      def terminate
        scene_menubase_term
        @background.dispose
      end
    end
    A quick preview I did in my game
    Screenshot_243.jpg
    If you want a different background for each menu, you gonna need to change the "Scene_MenuBase" with something else.
    Or if this isn't what you want, then what else?
     
    #3
  4. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    There we are, I edited the original post, there are now links to each one I listed hoping for compatibility for. :)

    This one shouldn't take me a LONG time, something simple could be made for it within half an hour. Basically the same way you're going on your screenshot, which is also really cool by the way. Image in the background, but mine will be more of a "Custom Windowskin to just show when something's been selected or gone over, image in the background will be a layout for any/every box on the screen" kind of thing.

    I know bits and pieces of code, and I think I did come across something vaguely CLOSE to the code you gave me, but it was someone looking to place a background image behind just the text for names in the status menu. I tried fooling around with it, but unfortunately it was close to a very tired end of the night, and I probably botched it up more than anything. Heh.

    So, replacing the Scene_MenuBase with "something else"...like...an alias code?

    As for the mockup, this is what I can do for this late at night/early in the morning (I've been up since 10am yesterday working on the game, it is now 6:11am the following day). This would be the beginning work-in-progress for the main menu's background.
    The grassy area you see behind the menu IS the playable map. So parts of the menus will be slightly opaque to let the map through. Just a tiny bit. And this is a really quick mockup, nothing close to what I'd use for the final draft.
    MainMenuWIP2.png
     
    Last edited: Nov 16, 2018
    #4
  5. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,668
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Depends on the code, and I can't say it universally. A different script, different name. For example. in this script, it will be CSCA_Scene_Achievements

    Anyway, I wrote a crude universal "display background image for this particular window" script (because I'm bored). However, you need to be able to help yourself. By identifying the window name you want to display the background.
    Code:
    module Theo
      #----------------------------------------------------------------------------
      # To identify window name. Only use to debug. Set to false if not used.
      # Because extra sprite adds up an extra process.
      #----------------------------------------------------------------------------
        DisplayWindowName = true
      #----------------------------------------------------------------------------
     
      #----------------------------------------------------------------------------
      # Record all windows name here that you wish to display a background image
      # The format goes like:
      #
      # Window_ClassName => 'image name'
      # The image name must be located in Graphics/system
      #----------------------------------------------------------------------------
      WindowList = {
        Window_MenuStatus => 'iconset',
      
      } # <-- Don't remove this
      #----------------------------------------------------------------------------
    end
    
    class Window_Base
     
      alias background_init initialize
      def initialize(*args)
        background_init(*args)
        text = self.class.to_s
        size = text_size(text)
        if Theo::DisplayWindowName
          @name_text = Sprite.new
          @name_text.bitmap = Bitmap.new(size.width+2, size.height)
          @name_text.bitmap.font.size = 19
          @name_text.bitmap.fill_rect(@name_text.bitmap.rect, Color.new(0,0,0,128))
          @name_text.bitmap.draw_text(@name_text.bitmap.rect, text)
        end
        if Theo::WindowList[self.class]
          @back_img = Sprite.new
          @back_img.bitmap = Cache.system(Theo::WindowList[self.class])
        end
        update_extra
      end
     
      alias bg_update update
      def update
        bg_update
        update_extra
      end
     
      def update_extra
        if @name_text
          @name_text.viewport = self.viewport
          @name_text.x = self.x
          @name_text.y = self.y
          @name_text.z = self.z + 1
          @name_text.visible = self.visible
        end
        if @back_img
          @back_img.viewport = self.viewport
          @back_img.x = self.x
          @back_img.y = self.y
          @back_img.z = self.z - 1
          @back_img.opacity = self.openness
          @back_img.visible = self.visible
        end
      end
     
      alias bg_dispose dispose
      def dispose
        bg_dispose
        dispose_extra
      end
     
      def dispose_extra
        @name_text.dispose if @name_text
        @back_img.dispose if @back_img
      end
     
    end
    
    Because I don't have an image to test, I'd just display my iconset on my Window_MenuStatus as an example. So here's how it looks like
    Screenshot_244.jpg
    Is this what you want?
     
    #5
  6. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    This IS what I wanted, oh holy jesums, thank you!

    I edited my last post just a little bit too late, haha. I have a mockup image for the main menu added to the comment before this one.

    The script that shows which scene is showing, I do have a version of that, which was included in the LUNA scripts. Also, I JUST realized who you are, good sir, I actually had you listed in the credits of my demo as a special thanks, through the latest two years to current date. ^^

    Thank you for your help, I won't mark this as solved JUST yet, as I can't test it tonight. I've GOT to get some sleep here. But I will message again and show you the end result. It will be a combination of partially-opaque sections of custom windowskins, background images, and your script of course.

    Thank you again for taking the time out of your day to reply to this plea for help. :)
     
    #6
  7. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,668
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Sure thing, I will leave my post here so that you won't get scolded for double posting since editing your post may or may not give a notification to me, neither bump your post for more attention.

    I do recall Luna Engine has its own version of displaying window name but I wasn't sure so I made my own (and maybe can help ppl who don't bother to buy Luna just for that).
     
    #7
  8. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    Alright. So, for this code, I'm not sure how to use this. When I put it in the script list, it crashes the game no matter what I do with it. Something about this particular part:
    Code:
    class Scene_MenuBase
      alias scene_menubase_start start
      def start 
    It crashes because of something having to do with the "start start" part? I don't know why. And I'm not even sure WHERE to put this...I've put it on top of all scripts, on the bottom, inside scripts...It looks and seems simple, it just...crashes.

    As for the "universal "display background image for this particular window" script", for some reason it crashes any time I've opened a text box. It works very well for what I need, as there are some scenes I want to work on JUST certain windows and not the background, but it strangely crashes for textboxes. Not choices, strangely, or any other menu, just whenever that happens. Maybe its because of a script I have that changes text box images? I don't know.

    I'm still experimenting on this though, and I'm trying out new ideas in the meantime. I just wanted to update you on some of the stuff I found when it came to those two scripts. I'm REALLY not trying to sound like a complete idiot, I'm really not, I've been working on this for two-ish years and only just recently I started needing help in certain parts of it, but for the most part I've been fine. I'm sorry if I end up irritating you due to how it just kind of seems like I'm not getting it
     
    #8
  9. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,668
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    When you said "crash", always be sure to post the screenshot of the crash. We don't know anything without it.
    If it's stack level too deep, change the alias name into something else. For example.
    Code:
    class Scene_MenuBase
      alias whatever_you_name_the_alias start
      def start
       whatever_you_name_the_alias
       @background = Sprite.new
       @background.z = 100
       @background.bitmap = Cache.title1('Castle') # <-- this need to change
      end
    
      alias seriously_just_name_anything terminate
      def terminate
       seriously_just_name_anything
       @background.dispose
      end
    end
     
    #9
  10. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    No no, it was never a stack level error. I do know those ones, as I've accidentally run into them a few times.

    Sorry for how long it takes to message back, I work full time, so its a bit difficult for me to get on here and such.
    I can't replicate the exact same error I was having before about the menubase_start start bit a couple days ago, but I do have a new one now.

    LunaError1.png LunaError2.png

    Not sure what's going on here, but like I said before, it works fine for every other part of the game. Its just when I bring up a dialogue box that it has issues. I've put it on top of all scripts, on the bottom, etc. Not sure what to do with it.

    Now, I have found another script that does the deed well without crashes, but I don't want to close this post just yet, because I'd like to see if I can get this script that you took the time to make to work properly on my end, just in case someone else comes along this post and wants to use it.

    (character art were the results of a low-quality art skill from almost two years ago, don't mind how bad it looks.)
    2018 Main Menu.png 2018 Skill Menu.png 2018 System Menu.png
     
    Last edited: Nov 23, 2018
    #10
  11. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,668
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Yeah and what is in the debug console?
    The error still doesn't tell me anything.

    I mean, this is why we're losing scripters
     
    #11
  12. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    From the Console:

    ConsoleError.png

    Also, what did you mean by this is why you're losing scripters, exactly?
     
    #12
  13. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,594
    Likes Received:
    348
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    What is that script which has no name?
     
    #13
  14. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    (edited original reply due to looking back at the list)
    The blank is the script Theo provided me with in the first place.
     
    #14
  15. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,594
    Likes Received:
    348
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    nope that's not it. The last script to be mentioned in the error is blank. The effectus is down the list.
     
    #15
  16. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    At first I thought you meant Effectus, which I have corrected in the original reply. Second time, before seeing your reply, I thought you meant the FIRST blank script, which was the script Theo wrote.

    Looking back now, the very last one was something I had forgot to remove, that was actually a note for scripting, that I left for myself upon saving the project for later, which sometimes I do if I'm in a hurry and don't have enough time to type it in notepad and save it (computer is slow and I'm almost always in a rush to leave for work), forgot to erase it.
    That's my bad, BUT...upon removing it, the error persists. So it isn't that mistakenly-kept last entry that was creating the issue.
     
    #16
  17. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,594
    Likes Received:
    348
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    The error may persist, but it would be different now since it's no longer pointing at that blank script.
     
    #17
  18. DoctorArtist

    DoctorArtist Time Splicer Veteran

    Messages:
    79
    Likes Received:
    5
    Location:
    The Portum Gates
    First Language:
    English
    Primarily Uses:
    RMVXA
    Whelp. I've got nothing now. Long story short, I literally ONLY have time to work on this project when I'm back from work and exhausted. And it was Pre-Black Friday sales today, so I'm even more exhausted at this point. Please don't get upset at me for being a dunce and for not realizing certain points or getting to the point quicker, BUT...THAT BEING SAID...

    I was somehow magically under the impression that "Main" and the little green divider title of "▼ Main Process" under the rest of the scripts were the same. So, I had a note written under the Main Process, and forgot to actually check "Main", and oh boy. Don't know WHAT the heck happened here.

    The problem with exhaustion, lack of sleep, being drained, whatever you want to call it...is that you just can't remember things well. So I bring you a monster, and very well the issue at hand. Don't remember what this at ALL was for, but its here. In the Main script. Don't remember why.

    ICompletelyForgot.png
    I've no idea what to even say at this point. I don't have any memory of even putting this into the Main, or what it was supposed to help with.

    EDIT: if I hazard a guess, it was probably part of some fix someone in the forums suggested for me to put in there to fix ANOTHER issue, but otherwise, I'm just not smart enough to write this in, myself.
     
    Last edited: Nov 23, 2018
    #18
  19. Roninator2

    Roninator2 Gamer Veteran

    Messages:
    1,594
    Likes Received:
    348
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMVXA
    That is a backtracer script.
    It's there to give you the detail results in the console window that you see.
     
    #19
  20. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,212
    Likes Received:
    4,668
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    It looks like it just someone's is using the same variable name, and I'm guessing it's Rhyme's window identifier.
    Anyway, it isn't a big deal. Just try to change the name. CTRL + H --> Replace @name_text to @windowname_text
    See if it works.

    And @DoctorArtist all you need to do is just correctly report an error. The problem won't be much this long if you brought up the error notice. Always, if you have script error, tell what's the error notice. Don't say "it's error" and brought nothing. I mean, you're not the only one who exhausted and maybe also having a bad day.
     
    #20

Share This Page