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

Since I didn't found any guide for my problem I'm gonna try my luck here now.

I want to have a script to be executed when I enter a certain Notetag inside a comment in an event.

For example: Notetag: <random_var_change>

What should be executed: $game_variables[1] = 435345

I would be very happy if anyone could put this into a short example.

Edit: RGSS3 Script
Why can't you just use event commands?
The thing I posted was just an example ^^. The "$game_variables[1] = 435345" was just an easy example on the part I'm gonna change into the part that is currently inside an event.

I got everything I need inside an event atm but I want to turn it into a script so I'm able to change the variables that are used much faster then changing it inside every single conditional branch and anywhere else I used them. Changing the 24 variables inside the event would take too long (192 edits would be needed). Inside a script I would just choose the variables to be used before I start with the part that is used inside the event atm.
It's not really a question suited to this thread then.  I suggest you post a new thread, explain what you're trying to do (give details, not ambiguous examples), and we'll help you set it up.  I imagine, without still knowing very much about what you're trying to achieve, that it could be done quite easily using a script call that contains a loop.  What you are asking here is how to change the interpreter to execute something you've got in comments as a command, which would also certainly be something deserving of its own thread (I'm just suggesting you create a dedicated topic because I anticipate a lot of back and forth trying to help you get it working, and I don't want to clutter up a thread that's usually just full of simple question and quick answer posts, or to lose posts in among other people's unrelated Q&A).

Having said that, if you DO post a new thread, I will look at it and try to help you out, but I've just got to duck out for an appointment now, so it'll take me an hour or so to get back to you.  Of course, someone else could come along and solve it in the meantime 🙂
i was just wondering what these do exactly

 ||= |=
examples can be found in Game_Switches / variables classes.
I don't know what |= does but I do know that

Code:
a ||= 1
Is a = 1 if a is nil or false
|| is the logical OR operator.

It will return whatever evaluates to True first

a = nil || 2It will assign 2 to a

a ||= 2is just shorthand and nothing special

a = a || 2| is the binary OR operator.

So like in binary

101 is 5

110 is 6

a = 5 | 6Then print out the value of a and it will be 7.

|= is just short-hand. Again, nothing special. It's as common as += or -=
epic, thanks for that one ^_^

not too sure what i would use the binary one for, but checking for nil or X is definetly handy.. mind you i usually have a condition if nil... but still.. thanks ^_^
Is there a way to change the rate at which menu cursors blinks?

The only way I could think of doing it was by updating the window less than once per frame, but that causes all sorts of other problems. 
From what I can tell, the update method in class Window only updates the cursor blink.

If you overwrite it to have nothing, everything seems to work fine with the cursor not blinking at all.

This is just guesswork as I am definitely not pro and have no clue how to actually see the methods in class Window... but in tests, I have no problems in menus when I use this to slow cursor blink down:

Spoiler
Code:
class Window  alias galv_window_cursor_initialize initialize  def initialize(x, y, width, height)      galv_window_cursor_initialize(x, y, width, height)      @tick = 0  end    alias galv_window_cursor_update update  def update    @tick -= 1    return if @tick > 0    galv_window_cursor_update    @tick = 3   # Higher number slows down cursor blink  endend
You have to take out the return statement so the code doesn't skip the derived class update code, but that's basically what I did.

   alias kdea_window_update update  def update    @frames += 1    if @frames >= frames_per_update      @frames = 0      kdea_window_update    end  end 

Still doesn't quite work though, that slows down the input handling (and I can't quite figure out why, since I thought that happened inside Window_Selectable).

Edit: Actually, that might be working. I'm only getting a little lag on one specific menu. That might just be new code I added causing it to take longer than usual to load. Looks like it's working fine on other menus  🙂
I was actually thinking differently but yeah I guess it would cause issues with that. I wonder if it's possible to see the methods in class Window.

EDIT: Hmm... maybe. Now I am not sure. Returning the update in class Window completely and all scenes work fine, it just stops the blink. So this should work, right?
Hello, I can't find the script call for removing a weapon from the party's inventory. I want to remove the weapon even though it's equipped...

Doesn't seem to work when I use an event call to do it. Help please! 🙂
It should work if you tick "Include Equipment" in a "Change Weapon" event call.


The script call would be:

$game_party.gain_item($data_weapons[1], -1, true)
Where true means "include equipment" is ticked.
@Galv Yeah, it's working so far without any problems. I guess I was just overthinking it

Also, technically not a question, but something most people in this thread should be able to appreciate:

http://www.youtube.com/watch?v=D0EIZa5e9q4
was just wondering.

Is there any difference (other than efficiency) between these two peices of code ?

Code:
Ary    = [1,2,3,4,5]Ary_ii = [10,20,30,40,50]Ary_ii.each do |a|  Ary.push(a)end
Code:
Ary    = [1,2,3,4,5]Ary_ii = [10,20,30,40,50]Ary.concat(Ary_ii)
Is there a way to increase an actor's ex and sp param rates through script calls? 
yes you add a feature to the actor. 

something like this ( probably not exactly right as i dont have  ace with me atm)

$game_actors[id].features.push( RPG::Feature.new(code,id,value)
code for x param is 22 i think and s param is 23 ( check gamebattlerbase to be sure )

id is the id for the param ie hit = 0 cri = 2 ( x params )

and value is a number to increase the stat by, ie 0.10 will increase it by 10% 

Edit, forget that, i wasnt thinking right, it would have to be $data_actors[id] and it would basically overwrite the database settings for your actor (for all save files) so probly best to not do that... sorry 😛
I want to know before I make a request:

Is there a script that allows to cycle through every weapon in the inventory by pressing buttons?

For example, if you press R it would equip the next weapon on the list and if you press L it would equip the previous one.
Not that I'm aware of. Did you check the Master Script List? I suspect you'd have to make a script request for that one.

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