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

So I've noticed that when a battler changes Sprites during death - it seems to vanish instantly? Anybody know what would cause that?

I know disabling the opacity with ctrl+Q in the collapse sprite effect scripts seems to have a direct relation to that - since I thought that maybe the sprite change changed the collapse effect to instant, though that doesn't seem to be it. So really my only guess left is maybe - it changes the @effect_duration?

-Edit-

I figured it out.

So apparently, when the actor is dead - it switches visible to off, for some reason - when the battler sprite was changed, it would count as the character being dead right off the bat. So I added in a check to the init_visibility, to check if the hit sprite wasn't active. So it was forced to wait a bit.

Though I'm still not sure why I needed the extra step for that.
I was wondering if there is a script or something that allows you to control enemies attacks for vx ace?
I was wondering if there is a script or something that allows you to control enemies attacks for vx ace?
Force Action You didn't elaborate much. Besides it may deserve their own thread. Go make one!
I wanted one of my characters to have a hypnotize ability. Where he could choose the enemy to attack only his allies. Unless confuse which they attack anybody.
@Tanarex Your questions are actually more asking for scripts and aren’t really suitable for this thread. I think it would be best if from now on you create a new thread (in either Script Requests or Script Support) and if we feel it needs to be here, we will merge it.
Hey guys I have a problem with rpg maker vx ace with the Yanfly ace shop options script i was trying for hours to rename teh default
shop commands like buy sell and equip because i make the game in a different language than english and it worked fine but the last command
cancel just seems not to work now i looked for like a hour deep in the script and figured out to rename it in the word i wanted to but now it dosent do anything if i press the button on the display

maybe someone had the same problem with the script or know a easy way to rename these commands ... help would be awsome

here is the script:
https://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-shop-options/
@Zino97 your question is better asked in a new thread for more visibility especially if it's asking support for certain script. Here we only answer a simple question regarding ruby syntax or how default script is structured. And not many people are looking at this thread.
ok i will do so thanks
Anyone know how I can check if a graphics file exists? I've tried using "FileTest.exist?(x)" but it wasn't really working out.
I'm trying to do a check during scripts where a sprite changes - but I want the game to check for the file first. It seems to always return as if it's false when I check it out so maybe I'm just not sure how to spell it out right.
Did you include the subfolder? For example
FileTest.exist?("Graphics/Battler/spritename.png")
Before you do that, note that these checks will not work in encrypted projects, unless the images you check for are in folders outside of the encrypted data.
I see. I think it might have something to with trying to insert a string into the file name look up.
Code:
 def change_battler_image
  battler_name = @battler_name + @battler_image_index
  @battler_name = battler_name if FileTest.exist?("Graphics/Battler/" + battler_name + ".png")
 end

Right now, I'm using a clean - new game, so I don't know if it's encrypted or not.
Assuming that @battler_name is a string and @battler_image_index is an integer number, you can't directly add them together.
You must first convert the integer to a string:
Code:
battler_name = @battler_name + @battler_image_index.to_s

No idea how and when you change the involved instance variables in your code (other than the method you shown here), but that method seems awfully prone to "unexpected" issues.
You base the @battler_name variable on the sum of the @battler_name and @battler_image_index, which means that you can end up with filenames of "battler_name2", than "battler_name24", "battler_name247", and so on. You add the index every time you run that method.

The game gets encrypted if you make the compressed data and enable the encryption option. It's what people usually do when they are ready to share their games.
Seeing that you want to check in the "Graphics/" folder of your project, that check won't work if you encrypt your game.
If you just do this for convenient testing, it's fine (I did this many times before too, now I just use Krosk's Skip File script instead), but if you plan to leave this check when you publish your game, be ready for the bug reports. 😀
Ok - the way @battler_image_index works, is that runs some methods that read notes off of things, mostly from item use, and it creates a string.

So attack has a <image_index:attack> in it's note box. So then when the item is used - it also plays that bit of code to change the battler_name to the current name, plus the "attack" string it drew out from the image_index note. So it does work - it's just not the prettiest right now, but I'm ok with it.
Spoiler
ckRzDqH.gif

sorry if it's an eye-sore just like a bunch of other tests going on.

But the file check is kind of more for testing purposes - and mostly to prevent possible bugs. Though I have tried adding in File tests for images that exist like Slime, Bat, and it still doesn't to be triggering anything, it just won't cause a sprite switch.
(For Galv’s Character Animations V.2.1 https://galvs-scripts.com/galvs-character-animations/ ) How would someone set up a custom (slower) speed for the idle animation? Currently, the idle animation plays at whatever speed is set for the player's movement.
@tv.ghost that better be a new thread if you want a support of someone's script. Here we answer script snippets and syntax, not someone's script or a request.
@tv.ghost that better be a new thread if you want a support of someone's script. Here we answer script snippets and syntax, not someone's script or a request.
Fair enough, I'll make a new thread. Thanks-
I'd like to display a picture by pressing a key but while a message is displayed.
I can handle most of it(*), except that the picture always appears after I validate the message window.
Is it possible to do anything once a message window is displayed that don't require the player to pass that message window in order to display the picture?
It looks like the engine doesn't allow this behavior.

(*) I've set up a Common event and call it by triggering a switch and setting it on Parallel, the other settings (Autorun and None) don't work.
@cabfe you mean displaying a pic while message window typing a text?
@TheoAllen I'm making a visual novel, so there is almost always a window_message displayed. I'm trying to add a functionality where you can display a picture while a window_message is displayed. But the player chooses when he wants to display the picture, so I cannot hardcode it in the text code.
The best I could get was that I had to press Enter to close the current window_message and display the picture.
What I'd like is to have this picture displayed, hiding the current window_message, then erase the picture and go back to the window_message like nothing happened.

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