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

SoulPour777

Crownless King
Veteran
Joined
Aug 15, 2012
Messages
1,093
Reaction score
104
First Language
English
Primarily Uses
N/A
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.
 

FenixFyreX

Fire Deity
Veteran
Joined
Mar 1, 2012
Messages
434
Reaction score
310
First Language
English
Primarily Uses
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 :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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.
 

SoulPour777

Crownless King
Veteran
Joined
Aug 15, 2012
Messages
1,093
Reaction score
104
First Language
English
Primarily Uses
N/A

Kenen

Veteran
Veteran
Joined
Apr 3, 2012
Messages
262
Reaction score
155
First Language
English
Primarily Uses
RMMV
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>
 
Last edited by a moderator:

chaosvine

Villager
Member
Joined
Jul 28, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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.
 

Neok

Veteran
Veteran
Joined
Jul 31, 2014
Messages
45
Reaction score
15
First Language
English
Primarily Uses
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!
 
Last edited by a moderator:

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
216
Reaction score
97
Primarily Uses
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
 
Last edited by a moderator:

Neok

Veteran
Veteran
Joined
Jul 31, 2014
Messages
45
Reaction score
15
First Language
English
Primarily Uses
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.
 

cremnophobia

Veteran
Veteran
Joined
Dec 10, 2013
Messages
216
Reaction score
97
Primarily Uses
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).
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
Look here for that. If you'd done a search first, you would have found this already.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,517
Reaction score
3,221
First Language
Binary
Primarily Uses
RMMZ
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.
 

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
139
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
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
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,517
Reaction score
3,221
First Language
Binary
Primarily Uses
RMMZ
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 ?
 
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
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)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,517
Reaction score
3,221
First Language
Binary
Primarily Uses
RMMZ
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...
 

Enelvon

Slumbering Goddess
Veteran
Joined
Nov 29, 2012
Messages
240
Reaction score
139
First Language
English
Primarily Uses
No, Google just tells you how long it took to complete a search. Look under the search bar after entering a search.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,517
Reaction score
3,221
First Language
Binary
Primarily Uses
RMMZ

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,467
Members
137,821
Latest member
Capterson
Top