Ruby/RGSSx questions that don't deserve their own thread

It is better that way. IIRC item_test is also used in Scene_Item/Skill as well. You wouldn't want to add a state there from the menu.
That helped. Thanks. Then processing the check in scene battle is better.
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Pre attack state             ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║   Add a state to the battler        ╠════════════════════╣
# ║   before the attack is calculated   ║    25 Nov 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Requires: nil                                            ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Add state before attack is calculated                    ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:                                            ║
# ║   put in the skill note box                              ║
# ║   <preatkstapply: X>                                     ║
# ║   preatkstapply = pre attack state apply                 ║
# ║   X = the state id                                       ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║ 1.00 - 25 Nov 2023 - Script finished                     ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker except nudity             ║
# ╚══════════════════════════════════════════════════════════╝

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Execute Battle Actions
  #--------------------------------------------------------------------------
  alias r2_item_apply_state_action    execute_action
  def execute_action
    if @subject.is_a?(Game_Actor)
      item = @subject.current_action.item
      item.note.split(/[\r\n]+/).each { |line|
        case line
        when /<preatkstapply:[ -_](\d+)>/i
          @subject.add_state($1.to_i)
          refresh_status
        end
      }
    end
    r2_item_apply_state_action
  end
end
Thank you! I'll definitely try this out.
Hello. Is it possible to reassign the spacebar to another function (for example, not opening a menu or confirming, but something else), how to do this?
Hello. Is it possible to reassign the spacebar to another function (for example, not opening a menu or confirming, but something else), how to do this?
Can only be done with a script. AFAIK.
Usually people will implement a keyboard script to do such things.
I don't believe the F1 menu will let you change the space bar assignment.
You'd need to implement a full keyboard script in this case.
Is there a way to remove character selection when using an item? I need when an item is used, there was no choice of character from the party at all. I use it for everyone without exception.
So you don't wanna see any cursor box blinking on screen, right?
So you don't wanna see any cursor box blinking on screen, right?
No faces, no names, no boxes at all with selecting a character from the party, just click on use the item and it is immediately used without selecting a character, that’s what i want.
Ruby:
# * Items For All ACE * #
#   2023-12-12

class Scene_Item
  def item_target_actors
    $game_party.members
  end

  def determine_item
    use_item
    activate_item_window
  end
end
VX Ace.

Is there a way to limit YEARepo's "Active Chain Skills" script to a specified number of skills? Say for example that I want to limit the chain to a length of five skills.

I've tried workarounds using the "Lunatic" series of scripts, but they haven't worked out. I must admit, I'm flummoxed. I feel I have no other recourse at this time but to ask for assistance from people far more skilled with coding than I.
I'm using Basic Options Menu v1.1 By Vlue in my VXA game and I have this snippet to play BGS during title screen.

Ruby:
class Scene_Title < Scene_Base
  def play_title_music
    $data_system.title_bgm.play
    RPG::BGS.new("Sea", 80, 100).play
    RPG::ME.stop
  end
end

However, the BGS volume doesn't get affected by the volume settings in the options menu. Even if I set the master volume to 0, the volume of the BGS is still unchanged. So I tried to make the BGS dependend on what SE-volume I set.

Ruby:
class Scene_Title < Scene_Base
  def play_title_music
    $data_system.title_bgm.play
    RPG::BGS.new("Sea", 80 * $game_options.se_volume, 100).play
    RPG::ME.stop
  end
end

For other scripts, it works just fine like that, however, the BGS volume is still not adjusted properly. Can someone help me here?
I had made a script for options in the title screen.
Something like that would need to be used if you wanted to adjust it from those setting, because you could go to options and change the value. As is unless the script has se_volume set low by default it would not change anything. and the $game_options probably doesn't exist when you start the game as the scene has never been called and is not called from the save game when on the title screen.
So as you can see this question can easily be it's own thread.
I've got a problem with the Heretic's Dynamic Lights -script. I'm pretty sure I installed it correctly,(I have the TransformBitmap.dll in my game folder, and I've got the light graphics in graphics/lights, and the script in the script editor) and I've tried setting an event do be a light source but it isn't working. The game runs fine, but no light is being produced.

Here's the event:

1711374882126.png
Hey all! I found this interesting scriptlet called RPG::ME Extended but I'm not sure how to make it work. I'm getting an error on start up.


1714864778578.png


I'm thinking it has to do with the location I placed the script. I placed it below materials but maybe the code does into a module? Any help would be appreciated. Thanks!
I would have just asked Kyonides
I modified it recently so go copy the script available there once again and that's it.
The error was caused by an issue with how I had defined the module / class scope there.

@Roninator2 I guess he didn't do that because he had no active account on that forum. :eswt:

@matiaskonkonen The reason why it isn't working is simple: you left a space between \light and [LightFlame.png]
Even if the instructions might say or suggest you can leave that space in-between, you shouldn't.
@Roninator2 Derp. That was the next step actually 😉

@kyonides Woo-hoo! Thank you for the update! 😂
You need to load the map data.

map_data = load_data(map_filename)
map_data.display_name
Back to this answer, how do I check custom variables from another map? This one only returns what is specified in RPG::Map
I mean any variable that is added in the script editor, for example:
Ruby:
class Game_Map
  attr_accessor :visit
  alias vis_initialize initialize
  def initialize
    vis_initialize
    @visit = false
  end
end
For example, in this code, if i type $game_map.visit I can get the intended value, but I can't figure out how to get the value from a map the player is not in
I'm trying to have a custom skill restrict evaluation using Yanfly's Skill restrictions script. I want it to allow a skill to be usable only if the actor has a certain state applied. I think this is how I check if the actor using the skill has the state, but it's missing the rest of it. How do I make this?

Code:
<restrict eval>
self.state?(263)
</restrict eval>
@Ninjakillzu This should work.

Code:
<restrict eval>
!state?(263)
</restrict eval>

Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/