Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
FleshRenderStudios

1st ever script, Need somer help (RGSS3)

Question

latest problem (original post deleted):-

 

Hey guys just cleaned the code up quite a bit so it look's more readable but for some reason none of my scene's will not start e.g clicking on an option in my arena scene does nothing  :)

 

 

 

module Flesh_Render_Studios
      module Arena_Scene_Module
        
        #////////////////////////////////////////////////////////////////#
        # Menu Command Names (Editable) - Only edit stuff inside the " " #
        #////////////////////////////////////////////////////////////////#
        
        MenuCommandText = "Arena"
        Select_Opponent = "Enter Arena"
        Arena_Status    = "Check Your Status"
        Arena_Shop      = "Enter Exchange Kiosk"
        
      end
     
      module Select_Opponent_Module
        
        #////////////////////////////////////////////////////////////////#
        # Menu Command Names (Editable) - Only edit stuff inside the " " #
        #////////////////////////////////////////////////////////////////#
        
        
        #///////////////////////////////////////////////////////////////#
        # Opponent Setup - Setup enemy data here for each enemy battler #   
        #///////////////////////////////////////////////////////////////#
        
        Opponents = {
        
        "Slime"                     =>
        {
        :Display_Name               => "Slimey", # Set opponent name here
        :Battler_HP                 => 100,      # Set opponent health points here
        :Battler_MP                 => 20,       # Set opponent magic points here
        :Battler_ATK                => 2,        # Set opponent attack here
        :Battler_DEF                => 5,        # Set opponent defence here
        :Battler_MAT                => 2,        # Set opponent magic attack here
        :Battler_MDF                => 1,        # Set opponent magic defence here
        :Battler_AGI                => 1,        # Set opponent agility here
        :Battler_LUK                => 0,        # Set opponent luck here      
        #:Currency_Drop_Type         =>  #currency_array[1]
        #:Currency_Drop_Amount       =>  #$game_variable[1]
        #:Conditional_Switch         =>  #$game_switch[1]
         },
         
         "Monster 2"                         =>
         {
         :Display_Name               => "Monster 2", # Set opponent name here
         :Battler_HP                 => 100,      # Set opponent health points here
         :Battler_MP                 => 20,       # Set opponent magic points here
         :Battler_ATK                => 2,        # Set opponent attack here
         :Battler_DEF                => 5,        # Set opponent defence here
         :Battler_MAT                => 2,        # Set opponent magic attack here
         :Battler_MDF                => 1,        # Set opponent magic defence here
         :Battler_AGI                => 1,        # Set opponent agility here
         :Battler_LUK                => 0,        # Set opponent luck here      
         #:Currency_Drop_Type         =>  #currency_array[1]
         #:Currency_Drop_Amount       =>  #$game_variable[1]
         #:Conditional_Switch         =>  #$game_switch[1]
         },
         
        }
        
        #//////////////////////#
        # Opponent Setup - end #   
        #//////////////////////#
        end
     
      module Arena_Status_Module
        
        A = "Check your Status"
        B = "Check you Rank"
        C = "Check your Missions"
     
      end
     
      module Arena_Shop_Module
        
        D = "Buy Item"
        E = "Sell Item"
        F = "Exchange Item"  
     
      end
     
    end
     
    ################################################################################
     
    class Arena_Scene < Scene_Base
     
      include Flesh_Render_Studios::Arena_Scene_Module
     
    #==================================#
    # Arena Scene Setup and Processing #                                                 
    #==================================#
     
      def start
        super()
        @Arena_Command_List = Arena_Menu_Command.new(0, 0)
        @Arena_Command_List.width = 160
        @Arena_Command_List.height = 96
        
        @custom_sprite = Sprite.new()
        @custom_sprite.bitmap = Cache.picture("Arena_Background")
        @custom_sprite.x = 0
        @custom_sprite.y = 0
        @custom_sprite.opacity = 155
      end
     
      def post_start
        super()
      end
     
      def update
        super()
        return_scene() if Input.trigger?(:B)
      end
     
      def pre_terminate
        super()
      end
     
      def terminate
       super()
      end
     
    end # Arena Scene Setup
     
    #=================================#
    # Add Custom Command to game menu #
    #=================================#
     
    class Window_MenuCommand < Window_Command
      alias frs_add_original_commands_5vr67                   add_original_commands
      def add_original_commands
        frs_add_original_commands_5vr67()
        add_command(Flesh_Render_Studios::Arena_Scene_Module::MenuCommandText, :Arena_Scene)
      end
    end
     
    #==================================#
    # Make Command List - Inside Arena #
    #==================================#
     
    class Arena_Menu_Command < Window_Command
     
      include Flesh_Render_Studios::Arena_Scene_Module
     
      def make_command_list
        add_command(Flesh_Render_Studios::Arena_Scene_Module::Select_Opponent, :select_opponent)
        add_command(Flesh_Render_Studios::Arena_Scene_Module::Arena_Status,    :arena_status)
        add_command(Flesh_Render_Studios::Arena_Scene_Module::Arena_Shop,      :arena_shop)
      end
     
    end
     
    #=============================#
    # Call Arena Method and Scene #
    #=============================#
     
    class Scene_Menu < Scene_MenuBase
     
      include Flesh_Render_Studios::Arena_Scene_Module
     
      alias frs_create_command_window_5vr67                create_command_window
      def create_command_window
        frs_create_command_window_5vr67() # Call Original Method
        @command_window.set_handler(:Arena_Scene,    method(:arena_scene_method))
      end
     
      def arena_scene_method
        SceneManager.call(Arena_Scene)
      end
     
    end
       
    ################################################################################
     
    class Select_Opponent < Scene_Base
     
      include Flesh_Render_Studios::Select_Opponent_Module
     
    #==================================================#
    # Arena Select Opponent Scene Setup and Processing #                                                 
    #==================================================#
     
      def start
        super()
        @Arena_Command_List = Select_Opponent_Menu_Command.new(0, 0)
        @Arena_Command_List.width = 160
        @Arena_Command_List.height = Graphics.height
      end
     
      def post_start
        super()
      end
     
      def update
        super()
        return_scene() if Input.trigger?(:B)
      end
     
      def pre_terminate
        super()
      end
     
      def terminate
       super()
      end
     
    end # Select Opponent Scene Setup
     
    #==========================================#
    # Make Command List inside Select Opponent #    
    #==========================================#
     
    class Select_Opponent_Menu_Command < Window_Command
     
      include Flesh_Render_Studios::Select_Opponent_Module
     
       def make_command_list
        add_command(Flesh_Render_Studios::Select_Opponent_Module::Opponents, :Select_Opponent)
      end
     
    end
    #=======================================#
    # Call Select Opponent Method and Scene #
    #=======================================#
     
    class Scene_Menu < Scene_MenuBase
     
      include Flesh_Render_Studios::Select_Opponent_Module
       
      alias Select_Opponent_Menu_Command_87gf78            create_command_window
      def create_command_window
        Select_Opponent_Menu_Command_87gf78() # Call Original Method
        @command_window.set_handler(:Select_Opponent,    method(:select_opponent_method))
      end
     
      def select_opponent_method
         SceneManager.call(Select_Opponent)
      end
     
    end
     
    ################################################################################
     
    class Arena_Status_Scene < Scene_Base
     
      include Flesh_Render_Studios::Arena_Status_Module
     
    #=========================================#
    # Arena Status Scene Setup and Processing #                                                 
    #=========================================#
     
      def start
        super()
        @Arena_Command_List = Arena_Status_Menu_Command.new(0, 0)
        @Arena_Command_List.width = 160
        @Arena_Command_List.height = Graphics.height
      end
     
      def post_start
        super()
      end
     
      def update
        super()
        return_scene() if Input.trigger?(:B)
      end
     
      def pre_terminate
        super()
      end
     
      def terminate
       super()
      end
     
    end # Arena Status Scene Setup
     
    #==========================================#
    # Make Command List inside Arena Status    #    
    #==========================================#
     
    class Arena_Status_Menu_Command < Window_Command
     
      include Flesh_Render_Studios::Arena_Status_Module
     
       def make_command_list
        add_command(Flesh_Render_Studios::Arena_Status_Module::A, :Arena_Status)
        add_command(Flesh_Render_Studios::Arena_Status_Module::B, :Arena_Status)
        add_command(Flesh_Render_Studios::Arena_Status_Module::C, :Arena_Status)
      end
     
    end  
    #=======================================#
    # Call Arena Status Method and Scene    #
    #=======================================#
     
    class Scene_Menu < Scene_MenuBase
     
      include Flesh_Render_Studios::Arena_Status_Module
       
      alias arena_status_menu_command_th49gi               create_command_window
      def create_command_window
        arena_status_menu_command_th49gi() # Call Original Method
        @command_window.set_handler(:Arena_Status,    method(:arena_status_method))
      end
     
      def arena_status_method
          SceneManager.call(Arena_Status_Scene)
      end
     
    end    
     
        
     
    ################################################################################
     
    class Arena_Shop_Scene < Scene_Base
     
      include Flesh_Render_Studios::Arena_Shop_Module
     
    #============================#
    # Scene Setup and Processing #                                                 
    #============================#
     
      def start
        super()
        @Arena_Command_List = Arena_Shop_Menu_Command.new(0, 0)
        @Arena_Command_List.width = 160
        @Arena_Command_List.height = 128
        p("called Arena_Shop_Menu_Command")
      end
     
      def post_start
        super()
      end
     
      def update
        super()
        return_scene() if Input.trigger?(:B)
      end
     
      def pre_terminate
        super()
      end
     
      def terminate
       super()
      end
     
    end # Arena Shop Scene Setup
     
    #==========================================#
    # Make Command List inside Arena Shop      #    
    #==========================================#
     
    class Arena_Shop_Menu_Command < Window_Command
     
      include Flesh_Render_Studios::Arena_Shop_Module
     
       def make_command_list
        add_command(Flesh_Render_Studios::Arena_Shop_Module::D, :arena_shop)
        add_command(Flesh_Render_Studios::Arena_Shop_Module::E, :arena_shop)
        add_command(Flesh_Render_Studios::Arena_Shop_Module::F, :arena_shop)
      end
     
    end   
    #=======================================#
    # Call Arena Shop Method and Scene      #
    #=======================================#
     
    class Scene_Menu < Scene_MenuBase
     
      include Flesh_Render_Studios::Arena_Shop_Module
       
      alias arena_shop_menu_command_65dc6                  create_command_window
      def create_command_window
        arena_shop_menu_command_65dc6() # Call Original Method
        @command_window.set_handler(:arena_shop,    method(:arena_shop_method))
      end
     
      def arena_shop_method
          SceneManager.call(Arena_Shop_Scene)
        end
     
    end
     
    ################################################################################

 

 

 

As far as I can tell I'm notdoing anything wrong, but my eye's hurt now so I probablly missed something very simple :s

 

As advised by BigAce I have renamed all the method's, module's and call's differently so that they cannot conflict with one another.

post-24426-0-74527600-1392050236_thumb.png

post-24426-0-79200000-1392209458_thumb.png

post-24426-0-56432400-1392209474_thumb.png

Edited by FleshRenderStudios

Share this post


Link to post
Share on other sites

25 answers to this question

Recommended Posts

  • 0

First off please make your topic title more professional, no offense but it looks like a 12 year old wrote it.

 

Second I'll take a better look at in 4 hours as I have stuff to finish today. However, for now take a look at this for notes: http://bigaceworld.wordpress.com/rgss/custom-scenes/battle-arena-rmxp/

 

study that and see what you can get out of that.

Share this post


Link to post
Share on other sites
  • 0

The same way you edit the post. Just edit the OP, then click full edit and you then be able to edit the title.

Share this post


Link to post
Share on other sites
  • 0

First off please make your topic title more professional, no offense but it looks like a 12 year old wrote it.

 

Hey man. Don't be harsh with him.

Last time I remember mods are suppose to be nice to members, not offend them?

 

Anyway back to business.

Share this post


Link to post
Share on other sites
  • 0

I've never used any RGSS until ace tbh although I did dabbleslightly in RGSS2 but ace was released about a year after I started using vx so the transition wasn't toopainful :P I think I know how to solve my problem but I'm gonna attempt it now :) at 4am with a hangover :P wish me luck lol

Edited by FleshRenderStudios

Share this post


Link to post
Share on other sites
  • 0

 Sorry F.R.S., I kind of forgot to come back to the site yesterday.  :sweat:

Hey man. Don't be harsh with him.
Last time I remember mods are suppose to be nice to members, not offend them?

Anyway back to business.

Chill dawg, :ok:  It's kind of annoying seeing "HELP ME PLEASE!!!" threads. I know Sorry if I offended F.R.S., just thought it need to be said as I know he's grown so he can understand. I'll just leave at that as this is OT and didn't need to be said. End of conversation.

 

updated OP with improved readable code, But with one error that the main arena scene will not start when I click on it in the main menu :s

I found the issue, i think, why are some of your methods outside of their classes.  :huh2:

Share this post


Link to post
Share on other sites
  • 0

I really don't know why some of them are lol I have no idea of proper structure lol just pieced it together bit by bit form reading default script's and it worked at first lol, Fancy pointing them out for me bud?

 

oh btw don't worry you didn't offend me lol I can take a bit of criticism lol :p I have a thick skin haha

Share this post


Link to post
Share on other sites
  • 0

Wait did that work or is still a problem as I have never tested the script.

Share this post


Link to post
Share on other sites
  • 0

no there is still a problem mate the scene still doesn't call, It used to before I saterted adding the options in for the select_opponent, arena_status and arena_shop. I don't know why it has stopped working :s would you mind testing it for me? I tried debugging it but it look's like everything work's (everything is being called in order except for the scene's they just won't call for some reaon :s), Will upload my new configuration of it.

Share this post


Link to post
Share on other sites
  • 0

Had to do irl stuff. Anyways found the issue, on line 166 you have a random method called :Call_Arena_Scene. Then on line 135 you have a method called :Arena_Scene. You have to choose one of the names or the game doesn't know what you're calling. 

Share this post


Link to post
Share on other sites
  • 0

Thanks a ton Ace :) that allowed the arena scene to be called again :)

 

now I'm having trouble with select opponent though as that is not calling for some reason :s all the method's and call's seem to be appropriately named however :s


class Select_Opponent_Scene < Scene_Base
  
  include Flesh_Render_Studios::Select_Opponent_Scene
  
#==================================================#
# Arena Select Opponent Scene Setup and Processing #                                                 
#==================================================#
  
  def start
    super()
    @Arena_Command_List = Select_opponent_menu_command.new(0, 0)
    @Arena_Command_List.width = 160
    @Arena_Command_List.height = Graphics.height
    
    @custom_sprite = Sprite.new()
    @custom_sprite.bitmap = Cache.picture("Select_Opponent_Scene")
    @custom_sprite.x = 0
    @custom_sprite.y = 0
    @custom_sprite.opacity = 155
  end
  
  def post_start
    super()
  end
  
  def update
    super()
    return_scene() if Input.trigger?(:B)
  end
  
  def pre_terminate
    super()
  end
  
  def terminate
   super()
  end
  
end # Select Opponent Scene Setup

#==========================================#
# Make Command List inside Select Opponent #    
#==========================================#

class Select_opponent_menu_command < Window_Command
  
  include Flesh_Render_Studios::Select_Opponent_Scene
  
   def make_command_list
    add_command(Flesh_Render_Studios::Select_Opponent_Scene::Opponent, :Select_Opponent_Scene)
  end
  
end 
#=======================================#
# Call Select Opponent Method and Scene # 
#=======================================#

class Scene_Menu < Scene_MenuBase
  
  include Flesh_Render_Studios::Select_Opponent_Scene
   
  alias Select_opponent_menu_command_s45ytf67              create_command_window
  def create_command_window
    Select_opponent_menu_command_s45ytf67() # Call Original Method
    @command_window.set_handler(:Select_Opponent_Scene,    method(:Select_Opponent_Scene))
  end
  
  def Select_Opponent_Scene
     SceneManager.call(Select_Opponent_Scene)
  end
  
end

Share this post


Link to post
Share on other sites
  • 0

make sure all your method calls are lower case and are not the same as your class name. Then tell me if that did anything.

Share this post


Link to post
Share on other sites
  • 0

Hey BigAce :) It did not solve my issues unfortunately but I did rename each of the method's, call's, class name's and modules so that they could no longer conflict with each other and also made the method's in "little_text" just like you said to. Updated code is in OP :)

Share this post


Link to post
Share on other sites
  • 0

Quotes aren't methods or classes, those are just objects. They aren't affected by what I told you lol :ok: . I'll take another look at it in a minute.

Share this post


Link to post
Share on other sites
  • 0

Sorry for being gone for so long had some family stuff to attend too. :sweat: Anyways why do you have several classes instead of just one arena, also the reason why you probably cannot click anything is because all of your commands are in scene menu and not the arena scene.

Share this post


Link to post
Share on other sites
  • 0

No worries bud :) I split them into seperate classes so each section was easier to edit or rewrite if necessary, Can you only have one class in a script? as for the 2nd part I thought each scene had to be separate from the arena scene as each one has different controls, backgrounds, foregrounds,music etc. didn't realise that could all be handled in the same section :s

Share this post


Link to post
Share on other sites
  • 0

Nope it can be in the same scene matter of a fact, you can put the whole menu system in one scene if you code it correctly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...