RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Zylos' Simplistic Single-Player CMS (VXA)

0 Members and 1 Guest are viewing this topic.

********
Furry Philosopher
Rep:
Level 94
Rawr?
2013 Best RPG Maker User (Creativity)Gold - GIAW 11 (Hard)Randomizer - GIAW 11Secret Santa 2013 ParticipantFor frequently finding and reporting spam and spam bots2012 Best RPG Maker User (Mapping)2012 Best RPG Maker User (Programming)Secret Santa 2012 ParticipantGold - GIAW 9Project of the Month winner for September 2008For taking a crack at the RMRK Wiki2011 Best RPG Maker User (Programming)2011 Best Veteran2011 Kindest Member2010 Most Deserving Of A Promotion2010 Best RPG Maker User (Events)
Simplistic Single-Player CMS (VXA)
Version: 1.0
Author: Zylos
Date: May 11, 2012


Description


This script replaces the default menu system with a much simpler menu designed for single player games (i.e. games with only one playable character rather than a full party), although it will function fully with multiple character parties as well if you use the page buttons to tab between characters. The menu simply tracks the player and places itself next to him on the map, removing the status window taking up the whole of the screen. Very simple, decent for non-traditional RPG's.

Features

  • Simplifies and removes the clutter of the default menu.
  • Optimizes the menu on the map for single player parties.
  • Displays the total playtime like it used to in previous RPG Makers.

Screenshots



Instructions

  • Place this script in the materials section, above Main.
  • ?
  • ?
  • Profit.


Script


Code: [Select]
#==============================================================================
#  Simplistic Single-Player CMS (VXA)
#  Version: 1.0
#  Author: Zylos (rmrk.net)
#  Date: May 11th, 2012
#------------------------------------------------------------------------------
#  Description:
#
#   This script replaces the default menu system with a much simpler menu
#   designed for single player games (i.e. games with only one playable
#   character rather than a full party). The menu simply tracks the player
#   and places itself next to him, removing the fullscreen status window.
#
#------------------------------------------------------------------------------
#  Instructions:

#     - Place this script in the materials section, above Main.
#     - ?
#     - ?
#     - Profit.
#
#==============================================================================


#==============================================================================
# ** Window_Gold_Time
#------------------------------------------------------------------------------
#  This window displays the party's gold and total play time.
#==============================================================================

class Window_GoldTime < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, window_width, fitting_height(1))
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 544
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_currency_value(value, currency_unit, 4, 0, 32)
    draw_text(4, 0, 500, line_height, $game_system.playtime_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Get Party Gold
  #--------------------------------------------------------------------------
  def value
    $game_party.gold
  end
  #--------------------------------------------------------------------------
  # Get Currency Unit
  #--------------------------------------------------------------------------
  def currency_unit
    Vocab::currency_unit
  end
  #--------------------------------------------------------------------------
  # * Open Window
  #--------------------------------------------------------------------------
  def open
    refresh
    super
  end
end


#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
#  This command window appears on the menu screen.
#==============================================================================

class Window_MenuCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Initialize Command Selection Position (Class Method)
  #--------------------------------------------------------------------------
  def self.init_command_position
    @@last_command_symbol = nil
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0)
    select_last
  end
  #--------------------------------------------------------------------------
  # * Get Window Width
  #--------------------------------------------------------------------------
  def window_width
    return 160
  end
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end
  #--------------------------------------------------------------------------
  # * Create Command List
  #--------------------------------------------------------------------------
  def make_command_list
    add_main_commands
    add_original_commands
    add_save_command
    add_game_end_command
  end
  #--------------------------------------------------------------------------
  # * Add Main Commands to List
  #--------------------------------------------------------------------------
  def add_main_commands
    add_command(Vocab::item,   :item,   main_commands_enabled)
    add_command(Vocab::skill,  :skill,  main_commands_enabled)
    add_command(Vocab::equip,  :equip,  main_commands_enabled)
    add_command(Vocab::status, :status, main_commands_enabled)
  end
  #--------------------------------------------------------------------------
  # * For Adding Original Commands
  #--------------------------------------------------------------------------
  def add_original_commands
  end
  #--------------------------------------------------------------------------
  # * Add Save to Command List
  #--------------------------------------------------------------------------
  def add_save_command
    add_command(Vocab::save, :save, save_enabled)
  end
  #--------------------------------------------------------------------------
  # * Add Exit Game to Command List
  #--------------------------------------------------------------------------
  def add_game_end_command
    add_command(Vocab::game_end, :game_end)
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Main Commands
  #--------------------------------------------------------------------------
  def main_commands_enabled
    $game_party.exists
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Formation
  #--------------------------------------------------------------------------
  def formation_enabled
    $game_party.members.size >= 2 && !$game_system.formation_disabled
  end
  #--------------------------------------------------------------------------
  # * Get Activation State of Save
  #--------------------------------------------------------------------------
  def save_enabled
    !$game_system.save_disabled
  end
  #--------------------------------------------------------------------------
  # * Processing When OK Button Is Pressed
  #--------------------------------------------------------------------------
  def process_ok
    @@last_command_symbol = current_symbol
    super
  end
  #--------------------------------------------------------------------------
  # * Restore Previous Selection Position
  #--------------------------------------------------------------------------
  def select_last
    select_symbol(@@last_command_symbol)
  end
end


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_player_sprite
    create_command_window
    create_goldtime_window
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_background
    @player_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_basic
    @gold_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Create Player Sprite
  #--------------------------------------------------------------------------
  def create_player_sprite
    @viewport_sprite = Viewport.new
    @player_sprite = Sprite_Character.new(@viewport_sprite, $game_player)
    @player_sprite.x = $game_player.screen_x
    @player_sprite.y = $game_player.screen_y
    @player_sprite.z = 1000
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    @command_window = Window_MenuCommand.new
    if $game_player.screen_x < @command_window.width
      @command_window.x = $game_player.screen_x + (@player_sprite.width/2)
    else
      @command_window.x = $game_player.screen_x - (@player_sprite.width/2) - @command_window.width
    end
    if $game_player.screen_y < @command_window.height
      @command_window.y = $game_player.screen_y - @player_sprite.height
    else
      @command_window.y = $game_player.screen_y-@command_window.height
    end
    @command_window.set_handler(:item,      method(:command_item))
    @command_window.set_handler(:skill,     method(:command_skill))
    @command_window.set_handler(:equip,     method(:command_equip))
    @command_window.set_handler(:status,    method(:command_status))
    @command_window.set_handler(:save,      method(:command_save))
    @command_window.set_handler(:game_end,  method(:command_game_end))
    @command_window.set_handler(:cancel,    method(:return_scene))
  end
  #--------------------------------------------------------------------------
  # * Create Gold_Time Window
  #--------------------------------------------------------------------------
  def create_goldtime_window
    @gold_window = Window_GoldTime.new
    @gold_window.x = 0
    if $game_player.screen_y < 336
      @gold_window.y = Graphics.height - @gold_window.height
    else
      @gold_window.y = 0
    end
  end
  #--------------------------------------------------------------------------
  # * [Item] Command
  #--------------------------------------------------------------------------
  def command_item
    SceneManager.call(Scene_Item)
  end
  #--------------------------------------------------------------------------
  # * [Skill] Command
  #--------------------------------------------------------------------------
  def command_skill
    SceneManager.call(Scene_Skill)
  end
  #--------------------------------------------------------------------------
  # * [Equipment] Command
  #--------------------------------------------------------------------------
  def command_equip
    SceneManager.call(Scene_Equip)
  end
  #--------------------------------------------------------------------------
  # * [Status] Command
  #--------------------------------------------------------------------------
  def command_status
    SceneManager.call(Scene_Status)
  end
  #--------------------------------------------------------------------------
  # * [Save] Command
  #--------------------------------------------------------------------------
  def command_save
    SceneManager.call(Scene_Save)
  end
  #--------------------------------------------------------------------------
  # * [Exit Game] Command
  #--------------------------------------------------------------------------
  def command_game_end
    SceneManager.call(Scene_End)
  end
end


Credit

  • Zylos




*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Favourite Staff Member2011 Most Mature Member2011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2010 Most Mature Member2010 Best Use Of Avatar And Signature Space
Sorry for not responding for so long, but this is a nifty script Zylos. Good job!

****
Rep:
Level 57
Miiiiaf =^+^=
GIAW 14: ParticipantParticipant - GIAW 11
Hey, I'm using this in my new project and I'd just want to know. If I were to use any script like quest-book or monster catalogue. How do I add another icon and make it go to that new scene?


As blonde as can be!!!
Doesn't mean I'm the dumb one...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Spoiler for supporting!:


*
Rep:
Level 72
~Few people understand the beauty of the night~
2014 Best Topic
I haven't looked through the script yet, so this will be you doing the actual work, but you simply look for the part in the script where it's drawing the menu items, and add an entry, and have it call the other script, more or less. Depending on this script, there might be more to it than that, but, that should give you somewhere to start. Now, take that with a grain of salt, seeing as though I'm a beginner scripter in RMXP not VXA.
Download http://a.tumblr.com/tumblr_lm5v281q6E1qde50fo1.mp3

****
Rep:
Level 57
Miiiiaf =^+^=
GIAW 14: ParticipantParticipant - GIAW 11
I haven't looked through the script yet, so this will be you doing the actual work, but you simply look for the part in the script where it's drawing the menu items, and add an entry, and have it call the other script, more or less. Depending on this script, there might be more to it than that, but, that should give you somewhere to start. Now, take that with a grain of salt, seeing as though I'm a beginner scripter in RMXP not VXA.
I thought it would be something like that, but if I don't know what to call or how, it will be a bit of a pain in the ass to figure it out...
Though, I might just find it out by doing it. Got to find a suitable quest-log first ;)


As blonde as can be!!!
Doesn't mean I'm the dumb one...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Spoiler for supporting!:


*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
If you can't figure it out yourself, just let me know once you've found a quest system you like and I can help you implement it.
it's like a metaphor or something i don't know

****
Rep:
Level 57
Miiiiaf =^+^=
GIAW 14: ParticipantParticipant - GIAW 11
If you can't figure it out yourself, just let me know once you've found a quest system you like and I can help you implement it.
Used MA's, it implements itself and it works fine with this script as well :D


As blonde as can be!!!
Doesn't mean I'm the dumb one...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Spoiler for supporting!:


****
Rep:
Level 57
Miiiiaf =^+^=
GIAW 14: ParticipantParticipant - GIAW 11
I did run into a small problem with this.. Visual-wise, that is.

I've implemented some other things that are pretty awesome and since my menu list is now so long, I need to get to the top of my map (so that my char is on top of my screen) before I can read what the last ones are. I'm going to check if it gets fixed with MA's ATS-pieces and if not, I'll update you...

EDIT: I thought I migh find a sollution in MA's ATS (even if I had to copy-paste something into this script... But I couldn't find anything!!
My problem is that the list is way too long and I'd like it to scroll down (like in MA's Choice Formatting) and only show 3 or 4 options at a time...
« Last Edit: December 28, 2013, 06:44:49 PM by Little Psycho »


As blonde as can be!!!
Doesn't mean I'm the dumb one...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Spoiler for supporting!:


*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Favourite Staff Member2011 Most Mature Member2011 Best Veteran2011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2010 Most Mature Member2010 Best Use Of Avatar And Signature Space
Around line 101 of this script, you will see this:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end

Change item_max to the number of lines you want shown. In other words:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    4
  end

That would make it so that 4 commands are shown and the player must scroll down to see the rest.

****
Rep:
Level 57
Miiiiaf =^+^=
GIAW 14: ParticipantParticipant - GIAW 11
Around line 101 of this script, you will see this:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    item_max
  end

Change item_max to the number of lines you want shown. In other words:

Code: [Select]
  #--------------------------------------------------------------------------
  # * Get Number of Lines to Show
  #--------------------------------------------------------------------------
  def visible_line_number
    4
  end

That would make it so that 4 commands are shown and the player must scroll down to see the rest.
Thanks!!! And now I'm feeling stupid for not seeing hat >_<


As blonde as can be!!!
Doesn't mean I'm the dumb one...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Spoiler for supporting!: