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

Pretty sure you don't need a script, just a map and events to check pressed keys and move the player.
These are controlled movements. I tried doing this on maps and events but clearly didn't get me to the result I want. The movement of the sprite whenever you press the keys are programmed to be fixed and goes according to the path it makes. The reason why I am scripting 80% of this system is because I have Tent, Location Checkpoint and Visual Map Effects script added into it, the only problem I stumbled upon is how to actually do those lines and let the sprite follow it.
I would recommend starting a topic in Learning Ruby and RGSS, as this is beginning to break out of the scope of this topic; that way, we can talk all day about the system, and come to a conclusion without cluttering up this topic.


Sound good? I'll respond to it when you do 🙂
Absolutely, this is no longer something that doesn't deserve its own thread. I thought you were just talking about a menu change.


If you want to do it yourself, post a new thread in either Learning Ruby and RGSS (or probably more appropriately RGSSx Script Support). If you just want someone to do it for you, head to RGSS3 Script Requests.
I would recommend starting a topic in Learning Ruby and RGSS, as this is beginning to break out of the scope of this topic; that way, we can talk all day about the system, and come to a conclusion without cluttering up this topic.

Sound good? I'll respond to it when you do 🙂
Here's the thread: http://forums.rpgmakerweb.com/index.php?/topic/30334-path-vs-moveto-and-separable-commands/

Thanks 😀
Quick question... Is there a simple expression that can be used to evaluate the number of alive/appeared enemies?

I'd like to use Yanfly's Skill Restriction to restrict a skill from use if only one enemy is alive. The below statement is obviously incorrect, but just as an example:

<restrict eval>$game.troop.size == 1</restrict eval>Thanks in advance.

Edit: Never mind. Turns out I wasn't too far off. The correct statement is:

Code:
<restrict eval>$game_troop.alive_members.size == 1</restrict eval>
Hi, I'm new to this community and developing a game. I'm attempting to use Victor Sant's scripts with my game specifically the multi frames and character control scripts. Is there a way to have the idle animation in these scripts activate only after a period of time say 60 frames have passed? And if so how do I go about doing this.
If you need help with custom scripts, please start a new thread in the RGSSx Script Support forum, and include a link to the script you're using.


With Victor's, as his site appears to be down, you might need to actually copy and paste the whole script into your post. In that case, put it into code tags, and put the whole lot into spoiler tags.
Can I show pictures using a variable, without having to manually label what picture each number refers to? Basically, I want to be able to name my pictures 01.jpg, 02.jpg, etc., and then use a variable as the filename. Something like:

picture_shown = 5screen.pictures[1].show(picture_shown, 0, pictureX, pictureY, 100, 100, 255, 0)Obviously, this code doesn't actually work. I've seen this done in Moghunter's Picture Gallery script, but can't for the life of me figure out how it's done. The link's here: http://www.atelier-rgss.com/RGSS/System/ACE_SYS01.html

And on that note, is it possible to use differentiating headers, like f01.jpg, f02.jpg, s01.jpg, s02.jpg, and still be able to make the above work with it?

Please and thank you in advance!
picture_shown = 5prefix = 'f'name = sprintf('%c%02d.jpg', prefix, picture_shown)screen.pictures[1].show(name, 0, pictureX, pictureY, 100, 100, 255, 0)That'll do it. A sprintf documentation can be found in the help file. But I'm note sure how helpful my post is to you, so ask if you still have questions.

You want to do this via Script... event commands, don't you? You might want to define a method for that then. For example:

class Game_Interpreter def neok_show_picture(id, number, x, y, prefix = '') name = sprintf('%s%02d.jpg', prefix, number) screen.pictures[id].show(name, 0, x, y, 100, 100, 255, 0) endendThen you can write this:

Code:
neok_show_picture(1, picture_shown, pictureX, pictureY, 'f')neok_show_picture(1, picture_shown, pictureX, pictureY, 's')neok_show_picture(1, picture_shown, pictureX, pictureY)  # no prefix
Thanks cremnophobia! That's exactly what I was looking for. Needed to get rid of 02 between % and d, and now it works solidly.

What I actually want to do is modify the default message system, so that it automatically displays a picture (a character portrait) if I set the variable to a non-zero number (and no portrait if equal to zero). That way, I don't have to call a script or common event every time I want to change the displayed picture.

Which brings me to a new problem: How to call show picture from within the default scripts. From what I can tell from other people's scripts, it's done in class Window_Message < Window_Base, so I bumbled together this code based loosely on Galv’s Message Background script (http://galvs-scripts.com/galvs-message-background/):

class Window_Message < Window_Base alias nk_msg_portrait create_back_bitmap def create_back_bitmap screen.pictures[25].show("por1.png", 0, 0, 0, 100, 100, 255, 0) nk_msg_portrait endendWhich of course, doesn't work, because I only have the slightest of ideas as to what I'm doing here. The current error it gives me is that screen is a local variable that isn't defined. Any ideas on how to get that working, and/or where I should really be putting this code to not bork everything up?

If I can at least get a picture to show automatically when displaying a message box, then I can hopefully figure out the rest.
Needed to get rid of 02 between % and d, and now it works solidly.
That was an assumption by me based on your examples.

Which brings me to a new problem: How to call show picture from within the default scripts.
Do you mean pictures as the 20 or 50 you can use with event commands? If you do, then write $game_screen instead of screen. Otherwise you probably should create a thread or read some tutorial(s) as this isn't easy to explain (at least for me).
Look here for that. If you'd done a search first, you would have found this already.
So many issues can be solved by simple searches...

I remember someone posted a code that allowed you to search all RPGMWeb forum pages (from google). Anyone happen to know what that code could have been?
From what I understand, you simply put the code into google box as a search and it would only load RPGMWeb pages matching criteria.
Sounds like a basic site search. Just add

site:forums.rpgmakerweb.cominto the box along with whatever you're searching for. You can replace the `forums.rpgmakerweb.com` bit with any site name, really.
So many issues can be solved by simple searches...

I remember someone posted a code that allowed you to search all RPGMWeb forum pages (from google). Anyone happen to know what that code could have been?

From what I understand, you simply put the code into google box as a search and it would only load RPGMWeb pages matching criteria.
site:forums.rpgmakerweb.com your search here

ex:

site:forums.rpgmakerweb.com d13x
Thats as cool as sh*t !

I would assume that doing this is basically running some code through google search rather than normal English...
Would it also be correct to assume that it would enhance the speed at which google completes the search ?
 
using site search for d13x vs just regular search for d13x shows a 0.02 second faster speed (site search is faster, in this single test)
lmfao wth - did you 'require benchmark' into the google box or something ?
What crazy ass programs do you have that can measure such a small speed difference on a 3rd party application ? - or is it some kinda firefox plugin perhaps.... hmm...
No, Google just tells you how long it took to complete a search. Look under the search bar after entering a search.
omg... :headshake: 🤣

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