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

But how does it exactly return whether a list of skill can be enabled regardless of their nature requirements through the script?

Here's the full script in question:

module RMW Pairs = { 1 => [1, 2], 2 => [3, 4], 3 => [5, 6] } Pairs_Function = { 1 => 7, 2 => 8, 3 => 9 }endclass Game_Battler < Game_BattlerBase alias :heartfire_rmw :item_apply #-------------------------------------------------------------------------- # * Apply Effect of Skill/Item #-------------------------------------------------------------------------- def item_apply(user, item) heartfire_rmw(user, item) if user.actor? and item.is_a?(RPG::Skill) and RMW:😛airs.has_key?(item.id) and RMW:😛airs[item.id].include?(user.id) puts "More Activation Process Here" end endendthe thing is, I wanted to make the skill greyed out when an game actor's id is not in any of the RMW:😛airs hash key value. So say for example the party members are:

Eric, Natalie and Terence...

and as Eric uses the skill, it should be greyed out when the required condition is that if any actor listed in 

1 => [1, 2],
2 => [3, 4],
3 => [5, 6]
}

does not exist currently in battle. Say for example, since Actors 4, 5, and 6 does not exist in battle, the skill should be still greyed out. If any of them is in battle can only be the skills used.
You already have another thread for this. I suggest you use that one for the whole of what you're trying to do, instead of repeat it in several threads. Especially because this is becoming quite complicated, and is really no longer a "question that doesn't deserve its own thread".
You already have another thread for this. I suggest you use that one for the whole of what you're trying to do, instead of repeat it in several threads. Especially because this is becoming quite complicated, and is really no longer a "question that doesn't deserve its own thread".
At least she gave me an idea for one of my scripts 🙂 Thanks Milena. I forgot you could map an array to a key.

Edit: The standard smiley on this forum is creeping me out XD
@Milena - Sorry, dunno what i was thinking lol. I meant "usable?" 😀

Its at line 692 of battlerbase 😛
Short question here...in RPGMaker, is there a way to know what states are on a battler? In other words, what command do I call if I want to know all of the states currently on the battler? I know you can use (state?) to see if a state is currently on there, but what if I just want the list of the state ids? Can that be done, or would it require a for loop where I check (state?) against all possible states and create my own hash to do this?
Short question here...in RPGMaker, is there a way to know what states are on a battler? In other words, what command do I call if I want to know all of the states currently on the battler? I know you can use (state?) to see if a state is currently on there, but what if I just want the list of the state ids? Can that be done, or would it require a for loop where I check (state?) against all possible states and create my own hash to do this?
There always method states(if I'm not wrong), to check them.

Say you want to check Eric states, here's what you want : $game_party.members[Eric index].states

That will return an array contains all Eric's current state.

Now I myself have a question, is that true if a Plane object is not disposed when we are in the save scene, then we can't save game? It happens to me.. For first, I don't really sure if the Plane was the problem, but when I do a serious debugging(almost took an hour), YEAH,  I have a Plane object that is not disposed when I in the Scene Save, and when I try to save game, it won't let me and just give me buzzer sound. More extreme is this bug is a sinister bug, I don't know but my save file one by one is lost!! Blast it! Well, it just a save file for test..

Okay, actually I have solved that Plane problem, but I just want to know if that is true Plane object that is not disposed won't let you save game(This is silly, but it happens on me!, really I'm not joking) wew..  :distrust:
can also do

$game_actors[ACTORID].state?(STATEID)to check for specific states.

Never had the not being able to save game thing. I think that would happen if your trying to save a plane in with the save data though.
I'd think the first thing to do here would be looking into the DataManager-Script and comment out the part that saves you from getting an error message (line 134ff.). Of course you may restore that part later:

#--------------------------------------------------------------------------# * Execute Save#--------------------------------------------------------------------------def self.save_game(index)  begin    save_game_without_rescue(index)#  rescue#    delete_save_file(index)#    false  endendI don't know how Planes behave internally but I can't imagine how an undisposed plane would keep you from saving... At least I can replace the background sprite by a plane without having any problems saving.

Edit: Dekita actually could really have a point here, didn't think of that possibility (and was too dumb to read obviously).

As a general rule you should not assign graphical objects to the $game_,.. - objects (when you do, beware of reassignments of those variables too).
Never had the not being able to save game thing. I think that would happen if your trying to save a plane in with the save data though.
I just didn't know that the game won't let me save a plane object. Thanks Dekita.

I don't know how Planes behave internally but I can't imagine how an undisposed plane would keep you from saving... At least I can replace the background sprite by a plane without having any problems saving.
Actually I already made a demo project about this matter including with the unfixed script which made me crazy, I send you the link of the demo from PM. No need to fix that, just want to show you that this can be happen.
Confirmed that Dekita was right. As stated, I didn't think of that possibility first, sorry...

As I said, you should avoid storing graphical objects within the $game_... - objects since they are made to preserve the games state separate from what is actually visible on the screen. Even though it might make sense in some cases (for example when implementing a listener pattern), when you actually create your plane everytime you enter Scene_Map and dispose it everytime you leave it, you might consider assigning it to the Spriteset - classes instead. 🙂

Vantages would be that you had access to the scenes viewports, that the plane would be disposed/created independently from what might happen to the $game_map instance and you won't have trouble saving (your current version might still clash with autosave-scripts for example).
Now that I think about it.. this might have been the issue on a save system I was working on ages ago and just gave up on it.
Confirmed that Dekita was right. As stated, I didn't think of that possibility first, sorry...

As I said, you should avoid storing graphical objects within the $game_... - objects since they are made to preserve the games state separate from what is actually visible on the screen. Even though it might make sense in some cases (for example when implementing a listener pattern), when you actually create your plane everytime you enter Scene_Map and dispose it everytime you leave it, you might consider assigning it to the Spriteset - classes instead. 🙂

Vantages would be that you had access to the scenes viewports, that the plane would be disposed/created independently from what might happen to the $game_map instance and you won't have trouble saving (your current version might still clash with autosave-scripts for example).
Wew, why I didn't know about this earlier..  Now I need to play with that script again -__-.

Anyway thanks for the explanation Another Fen, I appreciate it very much 🙂   (I totally forgot about autosave system)
I have a question about followers. Say, I wanted to add a distance to my followers. I do not want them to follow the leader in a cluttered manner, rather, I want some distance, maybe like some Sega games before, where the distance of the followers are a bit farther than how VX Ace does it. I found this particular part of the default script:

class Game_Follower < Game_Character #-------------------------------------------------------------------------- # * Pursue Preceding Character #-------------------------------------------------------------------------- def chase_preceding_character unless moving? sx = distance_x_from(@preceding_character.x) sy = distance_y_from(@preceding_character.y) if sx != 0 && sy != 0 move_diagonal(sx > 0 ? 4 : 6, sy > 0 ? 8 : 2) elsif sx != 0 move_straight(sx > 0 ? 4 : 6) elsif sy != 0 move_straight(sy > 0 ? 8 : 2) end end endendI tried to add + 9 on to the distance_x_from but it just made a weird movement for my followers.
describe "weird movement".


Distance is in tiles, not pixels, so adding 9 (I'm assuming you changed the result of sx) is going to make them ALWAYS move - I'd expect they'd start walking back and forth over each other and the leader?


I would consider changing the != 0 to != 1 or even > 1 wherever it occurs. Then you're telling them not to move immediately, but to allow the preceding character to get a little bit further away before moving.


Doing that might also end up with problems of followers not being able to move when you go around a corner or something - especially if you have 8-dir movement.
I am using a number of Yanfly's scripts as well as Yami's Battle Symphony, and I was wondering how I would go about doing the following:

When I want to have a boss-fight type thing, change the party alignment (from PARTY DIRECTION 6 to PARTY DIRECTION 2) and then change the actor locations.

Basically, the majority of the battles would be fought with a left-aligned party facing right. On occasion I'd like to shake that up, but I have no idea how.

I imagine it'd be something like this:

Common Event (BossFightStart) called. (This has a number of script calls that change the party direction & locations.)

BATTLE PROCESSING GOES HERE.

Common Event (BossFightsOver) called.  (This has script calls that undo the BossFightsStart's changes).

Any help would be appreciated!
That would not be a "question that does not deserve its own thread".


Please start a new thread in RGSSx Script Support and include links to the scripts.
That would not be a "question that does not deserve its own thread".

Please start a new thread in RGSSx Script Support and include links to the scripts.
My apologies!  I thought it'd just be a 2-or-3 step answer; my bad.
Depends on the script - some of them can get quite involved, especially if it takes a bit to figure out what you're trying to do and how you've gone about it. Hopefully it'll be nice and quick, but if it's not, by the time we find out, this thread will have detoured quite a bit and it'd be a bit messy trying to split out.


Generally, if you want help with a script you've downloaded and put into your game, a new topic of its own is preferable 🙂
I am currently using RPGmaker VXA.

I was wondering, how to change where a game save file is saved to? I need to do this with just one save file all the other save files are fine.

Anyway thanks for any information. 😉
Search for my Override Save Location script.

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