RMParadise

It seems you either have yet to login or are not a member of RMP. If you are not yet a member, please feel free to sign up so that you can unlock every feature our forums have to offer. If you have yet to login, please do so soon.

A Paradise for RPGMakers.

Welcome everyone to RMP, your very own RPGMaker Paradise.
If you are reading this, that means that you are one of the select few who have been invited to experience our site as a Beta User.
Being a Beta User only requires that you report any bugs and/or problems upon finding them.
You get the chance to have free roam over the boards before they are public and are further up in line for promotions (which will be happening very soon, so stay on your best behavior).
Check out the thread for the RMP Beta Contest. Lets get some new content rolling.
Chat
Back to Top

    Version/Build Number

    Share
    avatar
    Vlue
    I'm a new member :)
    I'm a new member :)

    Registered on Registered on : 2012-05-28
    Posts Posts : 30
    Rep. Points Rep. Points : 13

    Version/Build Number

    Post by Vlue on Tue Jun 05, 2012 2:06 am

    Version/Build Number v1.1
    By V.M.


    Introduction
    Lets you have a unfancy little window on your title screen that displays the version and current build!
    (Build is an arbitrary number that basically is how many times the game has been run)

    Screenshots
    Oh, something I can screenshot!


    How to Use
    Plug and play and customize, notes in script as usual.

    Script
    Code:
    #Version/Build Number
    #----------#
    #Features: Allows you to display what version your game is on and for purely
    #          special purposes what build as well (not fancy, just how many times
    #          game hs been started in unreleased)
    #
    #Usage:    Plug and play and customize
    #       
    #Customization: Set below, in comments.
    #----------#
    #-- Script by: V.M of D.T
    #--- Free to use in any project with credit given

    #FLAVORTEXT: Just any text before version number, not neccesary
    FLAVORTEXT  = "Game Name "
    #VERSION: The Version, however you want to display it
    VERSION      = "v1.0 "
    #VERSION_ONLY: Whether you want to show build number or not
    VERSION_ONLY = false
    #RELEASE: Set to true to prevent build from rising each time game is started
    RELEASE      = false
    #VFONT_SIZE, VWINDOW_X, VWINDOW_Y, the font size, x, and y position of window
    VFONT_SIZE  = 14
    VWINDOW_X    = -12
    VWINDOW_Y    = 384

    #NO TOUCHY!
    $build_number = 0

    module Version
      def self.init
        if File.exist?("System/Version.vmdt") then else Version.run_new end
        File.open("System/Version.vmdt", "rb") do |file|
          $build_number = Marshal.load(file)
        end
        $build_number += 1 if !RELEASE
        File.open("System/Version.vmdt", "wb") do |file|
          Marshal.dump($build_number, file)
        end
      end
      def self.run_new
        file = File.new("System/Version.vmdt", "wb")
        Marshal.dump($build_number, file)
        file.close
      end
    end

    class Scene_Title
      alias version_initialize start
      def start
        version_initialize
        @version_window = Window_Version.new
      end
    end

    class Window_Version < Window_Base
      def initialize
        super(VWINDOW_X, VWINDOW_Y, 200, fitting_height(1))
        self.opacity = 0
        refresh
      end
      def refresh
        self.contents.clear
        self.contents.font.size = VFONT_SIZE
        self.contents.draw_text(0,0,200,line_height,version)
      end
      def version
        return FLAVORTEXT + VERSION if VERSION_ONLY
        return FLAVORTEXT + VERSION + "Build: " + $build_number.to_s
      end
    end

    Version::init


    FAQ

    Q: I swallowed Drain Cleaner! What do I do!?
    A: Probably call Poison Control, I don't know. This area is for script questions only.

    Credit and Thanks
    - By V.M. of D.T.
    - Free to use in any project with credit given.

    History
    Version 1.1 - Fixed bug where game would crash when returning to title from load screen
    avatar
    Hyde
    Administrator
    Administrator

    Registered on Registered on : 2012-05-18
    Posts Posts : 101
    Rep. Points Rep. Points : 6

    Re: Version/Build Number

    Post by Hyde on Tue Jun 05, 2012 2:11 am

    Do you ever take a break? Lol.
    But in all seriousness now, very nice little script. This would be a cool feature specially when you have people for Beta Testing. I think I may use this.


    _________________

    avatar
    Nethaera
    Administrator
    Administrator

    Registered on Registered on : 2012-05-31
    Posts Posts : 67
    Rep. Points Rep. Points : 8

    Re: Version/Build Number

    Post by Nethaera on Tue Jun 05, 2012 2:16 am

    Are these actually from Vlue? Who is V.M. of D.T.?


    _________________
    avatar
    Hyde
    Administrator
    Administrator

    Registered on Registered on : 2012-05-18
    Posts Posts : 101
    Rep. Points Rep. Points : 6

    Re: Version/Build Number

    Post by Hyde on Tue Jun 05, 2012 2:37 am

    Well, I believe V.M. is Vlue due to him signing that on his script posts, but I am not sure what D.T. is.


    _________________

    avatar
    Nethaera
    Administrator
    Administrator

    Registered on Registered on : 2012-05-31
    Posts Posts : 67
    Rep. Points Rep. Points : 8

    Re: Version/Build Number

    Post by Nethaera on Tue Jun 05, 2012 2:59 am

    I did a background check, he created them, I don't get what the D.T. is either.


    _________________
    avatar
    Hyde
    Administrator
    Administrator

    Registered on Registered on : 2012-05-18
    Posts Posts : 101
    Rep. Points Rep. Points : 6

    Re: Version/Build Number

    Post by Hyde on Tue Jun 05, 2012 3:38 am

    That was a quick check. Good job.


    _________________

    avatar
    Sepulchrum
    I'm a new member :)
    I'm a new member :)

    Registered on Registered on : 2012-06-04
    Posts Posts : 11
    Rep. Points Rep. Points : 6

    Re: Version/Build Number

    Post by Sepulchrum on Tue Jun 05, 2012 5:24 am

    This is just what I needed. It gives the games that pro-feeling. Dat pro-feeling~

    Good job with this, Vlue. :)
    avatar
    Vlue
    I'm a new member :)
    I'm a new member :)

    Registered on Registered on : 2012-05-28
    Posts Posts : 30
    Rep. Points Rep. Points : 13

    Re: Version/Build Number

    Post by Vlue on Tue Jun 05, 2012 10:55 am

    I take a lot of breaks >.>
    V.M of D.T. (Vlue Maynara of Daimonious Tales)((Screen name, Business name)) :P
    avatar
    DawningStar
    I'm a new member :)
    I'm a new member :)

    Registered on Registered on : 2012-05-29
    Posts Posts : 65
    Rep. Points Rep. Points : 9

    Re: Version/Build Number

    Post by DawningStar on Tue Jun 05, 2012 10:59 am

    Very nice! I love the little script since it always seems to be so ahrd tof igure it out without one! Well, in any case thank you alot, my script solder is now 20% or so your scripts! XD

    Sponsored content

    Re: Version/Build Number

    Post by Sponsored content


      Current date/time is Wed Aug 15, 2018 10:26 am