Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Ring Menu ! For everywhere!

@trebor: Not really, seemed kinda random to me... either way, I think I noticed something like everytime I chose an option, it'd return to the 'move' option being highlighted... and well, all of a sudden, it turned to the disabled option... (I probably should've checked if it'D skip another option now and therefor shift the displayed items or something...)
I suppose it's got something to do with two menues being activated at the same time, along with like a single exchangd number or leter in the script noone ever notices while scripting ^^ (I know that...)

If I got time to test this a little more in-depth, I'll give it a shot...
 
Wow, this looks SO amazing! Too bad i dont have very much scripting knowledge--tried but, cant even put it into something as simple as the title screen-- otherwise, i would add it to everything!
 

Nolund

Sponsor

Wow! This looks absolutely incredible!

I've been looking for something I can use to spice up my game a bit, and I think this is just what I've been looking for. This will go really well in my battle system.

Trebor, you're a beast.
 
I wish I could script...
But I can't :(

No fair, now I can't put this in my battles ;(

Maybe you could upload a demo where it is implied in the battle system?
Would be appriciated by, I guess, alot of people.
 
@Trebor: I haven't been able to reproduce the bug, but it all seems to be originated at one being able to scroll through the options and ending up at different options than "move/stop" by doing that at just the right moment. Your code looks fine too (well, it's not exactly good style, but it looks flawless from a more quicker glance), so I guess if you just prevent the player from scrolling through the options while movement is still executed and therefore switching options, that shoudl settle it.
I should probably mention that what I tested was the VX version.

@gast: There are detailed instructions in the first post which really are pretty easy to follow... maybe the reason you can't script is because you never wanted to work for it, eh? ;)
That aside, why would you want something in your game everyone else has as well, getting it directly from a pre-made battle script? Just use the defaults then...
 
Hello Trebor~ I found a bug D=
I asked my friends to figure out how to use your ring menu and it worked pretty sweetly~ but there's a problem

ringmenubug.png


In case you are curious on what we did~
Code:
 

class Scene_Battle

  

  alias create_info_viewport_old create_info_viewport unless $@

  def create_info_viewport

    create_info_viewport_old

    @actor_command_window.dispose

    @actor_command_window = nil

#~  @actor_command_window.visible = false

  end

 

  def create_options

    # Create empty options with no graphics, with just block of instructions

    @command_name = Sprite.new

    opt = [

    RMenu_Option.new("Attack", 1)  , # Bitmap.new("Graphics\Whatever\Filename")

    RMenu_Option.new("Skill", 100)  ,

    RMenu_Option. new("Guard", 52)  ,

    RMenu_Option.new("Item", 64)  ,

    ]

  end

  

  alias old_terminate terminate unless $@

  def terminate

    old_terminate

    @actor_command_window.dispose

  end

  #-----------------------------------------------

  alias old_update update unless $@

  def update

    old_update

    

    animate_menu if @animate

    

    #@actor_command_window.update

    @actor_command_window.selected.call if Input.trigger? Input::C

  end

  #-----------------------------------------------

  def animate_menu

     if Graphics.frame_count < 120 

      @actor_command_window.x +=2

      @actor_command_window.y -=1

      @actor_command_window.z = self.z - 1

    end

    if Graphics.frame_count.between?(120,240)

      @actor_command_window.x -= 2

      @actor_command_window.y +=1      

      @actor_command_window.z = self.z - 1

    end

    

    if Graphics.frame_count.between?(400,500)

      @actor_command_window.opacity -=2

    else

      @actor_command_window.opacity +=2

    end

    

    Graphics.frame_count %= 500

  end

  #                   ID      Battler 1   Battler 2   Battler 3   Battler 4

  ABATVX_FORMATION = { 0 => [ [350, 200], [395, 235], [440, 270], [485, 305] ],

                       1 => [ [485, 200], [440, 235], [395, 270], [350, 305] ] }

 

  def start_actor_command_selection

    @actor_command_window = Ring_Menu.new(30,10,[Graphics.width/2,Graphics.height/2-60], create_options)

    @actor_command_window.visible = false

    @actor_command_window.x = @active_battler.screen_x - 0

    @actor_command_window.y = @active_battler.screen_y - 65

    @party_command_window.active = false

    #@actor_command_window.setup(@active_battler)

    @actor_command_window.visible = true

    @actor_command_window.active = true

    @actor_command_window.index = 0

    @active_battler.action.basic = 3 if @active_battler.action.basic == 1

  end

  

  def start_skill_selection

    @help_window = Window_HelpArcheia.new

    @skill_window = Window_SkillArcheia.new(-3, 135, 530, 80, @active_battler)

    @skill_window.help_window = @help_window

    @actor_command_window.active = false

    @actor_command_window.visible = false

  end

    def end_skill_selection

    if @skill_window != nil

      @skill_window.dispose

      @skill_window = nil

      @help_window.dispose

      @help_window = nil

    end

    @actor_command_window.active = true

    @actor_command_window.visible = true

  end

   def start_item_selection

    @help_window = Window_HelpArcheia.new

    @item_window = Window_ItemArcheia.new(-3, 135, 530, 80)

    @item_window.help_window = @help_window

    @actor_command_window.active = false

    @actor_command_window.visible = false

  end

 

  def end_item_selection

    if @item_window != nil

      @item_window.dispose

      @item_window = nil

      @help_window.dispose

      @help_window = nil

    end

    @actor_command_window.active = true

    @actor_command_window.visible = true

  end

  def start_party_command_selection(skip = false)

    if skip

      if $game_temp.in_battle

        @status_window.refresh

        @status_window.index = @actor_index = -1

        @active_battler = nil

        @info_viewport.visible = true

        @message_window.visible = false

        @party_command_window.active = false

        @party_command_window.index = 0

        #@actor_command_window.active = false

        $game_party.clear_actions

        if $game_troop.surprise or not $game_party.inputable?

          start_main

        end

        @status_window.index = @actor_index = -1

        next_actor

      end

    else

      #Process the original 

      vxctb_start_party_command_selection

    end

  end

 

def update_info_viewport

    @party_command_window.update

    @actor_command_window.update if @actor_command_window != nil

    @status_window.update

  end

end  

 
 
sorry for the late answer...
I think it's because you're recreating a new ring menu each time, when it is the actor's turn... I'm sorry , i don't really remember how things are in rm, lol haven't touch it in month, even more on the default rgss script themselves.
So yeah, i'm not sure, but that could explain, the previous menu being still here and not disposed when displaying the new one. the ring menu, like the original command window(if my memories are correct, should be created in the initialize method of the scene_battle.
and then simply moved to the correct place ( like you do on line 66-67 ) in start_actor_command_selection.

Basically ring_menu act as a window ( you'll see that both classes share similar methods ). So
1st -> replace the original window where it's created.
2nd -> just adapt code from the way you can access current option from the menu ( which doesn't seem to be the problem here anyway )
3rd -> ENjoy!
 
Bump

1st Post updated, due to Newer version :)
Demos updated as well,
New stuff is :
.Better and Simpler code structure, Menu_Options now Inherits from Sprite, less redondant code
.More comments, explaning what does what
.Move Command: @menu.move(x,y)
.Doesn't block other graphics update
.Introduction of Refresh Delay: Menu is only update every "delay" frame, by default delay is 1, so it's updated every frame.
.For options, name is now independant, and doesn't not setup the icon->
in VX: if the icon parameter is a number, it'll look in the iconset, but if it's a string, it'll look in the icon folder, as it would happen in XP
in XP: the icon parameter is a string, to look for a file in the icon folder.

about Move: => So you can "animate" the menu while it's being used, see the demo
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top