You could edit the critical rate computation part of the scripts. There are also custom scripts that make it easier for you to do so.
Ruby/RGSSx questions that don't deserve their own thread
RGSSx Script Support[VX Ace]
I am making a skill called 'Sanctorum' that transfers the user of the skill to a map where they can develop their skills (a growth grid rather than gaining ability scores and hp/mp by level). I have the skill call a common event wherein I set a variable to: a) the current map, 😎 the current x coordinate, and c) the current y coordinate. I also want to set a variable to the actor who used the skill in order to set the player to that character and remove all the other actors (so they appear in the Sanctorum alone). I looked through the scripts to see what reference to make. I am not sure if the following is a correct reference when setting the variable:
$game_actor.actor_id[self]
I think my idea is correct, but I don't know if my syntax is.
I placed this here because it is script related.
I am making a skill called 'Sanctorum' that transfers the user of the skill to a map where they can develop their skills (a growth grid rather than gaining ability scores and hp/mp by level). I have the skill call a common event wherein I set a variable to: a) the current map, 😎 the current x coordinate, and c) the current y coordinate. I also want to set a variable to the actor who used the skill in order to set the player to that character and remove all the other actors (so they appear in the Sanctorum alone). I looked through the scripts to see what reference to make. I am not sure if the following is a correct reference when setting the variable:
$game_actor.actor_id[self]
I think my idea is correct, but I don't know if my syntax is.
I placed this here because it is script related.
Is this skill used from the menu or from battle? If the menu, it's $game_party.menu_actor_id
That JUST gives you the id of the actor you selected in the menu to use the skill.
That JUST gives you the id of the actor you selected in the menu to use the skill.
The skill is used from the menu. That reference should work then. I am familiar with Java and C++/C# but Ruby syntax is still new to me.
I want to use that reference and remove all other party members (their ids are stored to variables), setting the only party member too that actor. I need to add a script to the event but am also unsure of the syntax. My idea is the following:
$game_party.member_id[0] = $game_data.variables[n]
where n is equal to the user id (4 in my case). The event to add or remove party members only allows by direct reference. Maybe an:
$game_party.add_member.game_data.variables[4]
or something similar?
$game_party.members.each {|mbr| $game_party.remove_actor(mbr.id) if mbr.id != $game_party.menu_actor_id}Try that for a start.Since you're not in battle, this will look at ALL members in the party (not just the first 4), and remove anyone who isn't that member.
I imagine you would probably want to store the list somewhere so you could add them back again later? If that's the case, use this to get rid of them (use whatever variable number is available, and make sure to give it a name so you don't accidentally use it for something else):
$game_variables[15] = $game_party.members$game_party.members.each {|mbr| $game_party.remove_actor(mbr.id) if mbr.id != $game_party.menu_actor_id}Then when you're ready to add them back again:
I haven't tested this, but hopefully the syntax is right.
You could also search, because I know this sort of thing has been requested before and the correct answer provided.
I imagine you would probably want to store the list somewhere so you could add them back again later? If that's the case, use this to get rid of them (use whatever variable number is available, and make sure to give it a name so you don't accidentally use it for something else):
$game_variables[15] = $game_party.members$game_party.members.each {|mbr| $game_party.remove_actor(mbr.id) if mbr.id != $game_party.menu_actor_id}Then when you're ready to add them back again:
Code:
$game_party.remove_actor($game_party.leader.id)$game_variables[15].each {|mbr| $game_party.add_actor(mbr.id)}
You could also search, because I know this sort of thing has been requested before and the correct answer provided.
How do you check the movement and frames for dashing? I'd like to change the dash speed via switches.
Hello! Take a look at the following method in Game_CharacterBase:
Code:
#-------------------------------------------------------------------------- # * Get Move Speed (Account for Dash) #-------------------------------------------------------------------------- def real_move_speed @move_speed + (dash? ? 1 : 0) end
So i want to every monster with id 1 killed will add value to variable 1
$game_variables[2] += 1 if $game_enemies[1].perform_collapse_effect
But the script not work, i'm clueless.
$game_variables[2] += 1 if $game_enemies[1].perform_collapse_effect
But the script not work, i'm clueless.
Where are you even calling that line from? It might be the case of a correct line of code placed in the wrong place.
I don't think you can use that line for a condition check, because it will not return true nor false...
You can, however, do this by aliasing the 'die' method in Game_Enemy.
Since the 'die' method is a method which is not directly defined in Game_Enemy, but inherited from Game_Battler, an alias is not needed, unless some other custom scripts already defined a 'die' method in Game_Enemy. In any case, putting the following snippet into it's own slot at the TOP of your custom script list should do what you want:
You can, however, do this by aliasing the 'die' method in Game_Enemy.
Since the 'die' method is a method which is not directly defined in Game_Enemy, but inherited from Game_Battler, an alias is not needed, unless some other custom scripts already defined a 'die' method in Game_Enemy. In any case, putting the following snippet into it's own slot at the TOP of your custom script list should do what you want:
Code:
class Game_Enemy < Game_Battler def die super $game_variables[2] += 1 if @enemy_id == 1 endend
AFAIK, for non-booleans (true or false) as conditions, it will be read as "true" if it has a value...
Indeed it returns true all the time, just tested it.
Still, this means that the line he used can't be used anyway for any conditional checks, since it would be pointless to make a condition which is always true. 😛
Still, this means that the line he used can't be used anyway for any conditional checks, since it would be pointless to make a condition which is always true. 😛
hey there, one question: I tested how it is to play videos ingame... and if the window of the game is bigger as the video size, it looks a bit stupid. can I stretch the video to fit the window size or is this impossible?
I don't think you could do that using the engine, but you could always open the video on a video editor to resize or use a converter which allows resizing.
hm... it's not about resizing the video itself, it should just fit the screen. so I have to play different videos for different screen sizes... I think I'll stick with images. thanks =)
Ah so you could modify the game window size dynamically? Then yeah that would be a different case.
There is also no such thing as $game_enemies.
Just find the Game_Enemy.perform_collapse_effect script and add this to it:
Code:
$game_variables[2] += 1 if @enemy_id == 1
Okay, I'm back with my asinine script questions. I'm trying to use an 8-frame sprite for the first time ever and I'm, re-discovering why I haven't already done that.
I'm using FenixFyreX's Multi-Frame Sprites script for RMVXAce found here: http://forums.rpgmakerweb.com/index.php?/topic/1577-multiframe-sprites/
I think I get the gist of what I'm supposed to do, but it won't work, so I have to be missing something. I think I'm putting the right numbers in, but I don't think I'm putting them in the right place.
I've read comments that this script is really easy to use, well ha-ha to you, I'm just that incompetent with programming. 😛 Can anybody enlighten me as to what/where I have to edit to get the sprite to work right?
I'm using one of the 8-frame sprite templates from PVGames' Wild Steam pack. I've called it %RoyWalk.
So what line am I supposed to edit? I assume it's not line #30 of the script, since that seems to do nothing for me?
Any help is appreciated. Thank you.
~Rich
I'm using FenixFyreX's Multi-Frame Sprites script for RMVXAce found here: http://forums.rpgmakerweb.com/index.php?/topic/1577-multiframe-sprites/
I think I get the gist of what I'm supposed to do, but it won't work, so I have to be missing something. I think I'm putting the right numbers in, but I don't think I'm putting them in the right place.
I've read comments that this script is really easy to use, well ha-ha to you, I'm just that incompetent with programming. 😛 Can anybody enlighten me as to what/where I have to edit to get the sprite to work right?
I'm using one of the 8-frame sprite templates from PVGames' Wild Steam pack. I've called it %RoyWalk.
So what line am I supposed to edit? I assume it's not line #30 of the script, since that seems to do nothing for me?
Any help is appreciated. Thank you.
~Rich
If you need help with an existing script, please start a new thread for it.
there was a snippet kind of thread, and I am sorry if this belongs there.
Original thread: https://forums.rpgmakerweb.com/threads/ruby-rgssx-questions-that-dont-deserve-their-own-thread.150/