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.

Two Questions!

First question is regarding VX.
Is it possible to access the information in the notes section in the data base with a script.
If so I was wonder if someone could share the command(s) to do so beause it seems like it
could be very handy.

The second question is regarding XP.
I was trying to make a character unable to choose attack when they have zero mp.
So I disabled the attack command in scene_battle1 like they do in scene_menu using
@actor_command_window.disable_item(0)
and that worked. My problem is disabling the command to attack only when the character has zero mp.
It seemed like it should be an easy condition to make but everytime I try something I usually get a NoMethod error.
 
2) In the phase3_setup_command_window method, replace the last statement

# Set index to 0
@actor_command_window.index = 0


with

if @active_battler.sp == 0
@actor_command_window.disable_item(0)
@actor_command_window.index = 2 # guard
else
@actor_command_window.index = 0
end
 
Didn't seem to work. =S
It made attack appear disabled (gray) and started the cursor on the defend command.
But you could still choose the attack command and the attack command appeared gray for
every character after the one with no sp.

I was able to use one of your lines to disable the ability to attack in a tidier way though. =)
So far this is what I have...
[Under: update_phase3_basic_command]
Code:
 

if Input.trigger?(Input::C)

      # Branch by actor command window cursor position

      case @actor_command_window.index

      when 0  # attack

        if @active_battler.sp == 0    

          $game_system.se_play($data_system.equip_se)

          return

        end

 

My problem now is trying to make an if statement similar to the ones in Scene_Menu
to make the attack appear disabled but for some reason I can't seem to get it to work...

EDIT: I believe it's fixed
I used my above method to prevent a character with 0sp from attacking and then I edited your idea to disable the option to attack.
To fix the problem I was having with the attack command being disabled for all characters after the one with 0 sp
I added @actor_command_window.refresh
so now I have this under @actor_command_window.index = 0
Code:
 

    if @active_battler.sp == 0

      @actor_command_window.disable_item(0)

    else

      @actor_command_window.refresh

    end

 
 
Cool. nice work.

It would be nice if the cursor didn't even go to the grayed out items in a menu, and instead skipped to the next active item. This would be a mod of 'update' & 'update_cursor_rect' in Window Selectable. And adding a property to track which items in a menu are active/disabled. I'll take a look at adding the mod if I have time. (not likely in the near future).

Be Well
 

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