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

VegaKotes

Veteran
Veteran
Joined
Jun 25, 2013
Messages
96
Reaction score
3
First Language
English
Primarily Uses
I was wondering how to move the Show Choice window from the right side to either the middle or the left.

Preferably the middle.

edit: Ah, should mention this is for Vx Ace.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,969
Reaction score
13,603
First Language
English
Primarily Uses
RMMV
Does anyone know how to make items teach skills to classes directly instead of actors? I can't find the command within any of the default scripts. Once I do, I can change it, somehow.
 
There isn't a way to add skills to a class outside the editor by default (ie - you can't do it through an event command, so there's also not an easy way to do it through script). If you really want to do this, you will have to figure out how to add a skill to a class via the features list, AND you would have to make your game include $data_classes in the player's save file, otherwise once the game was closed, all your new skills would be lost.

I was wondering how to move the Show Choice window from the right side to either the middle or the left.


Preferably the middle.


edit: Ah, should mention this is for Vx Ace.
In your Window_ChoiceList script, find the update_placement method. Replace this:

Code:
self.x = Graphics.width - width
with this:
Code:
self.x = (Graphics.width - width) / 2
 
Last edited by a moderator:

dabum

Veteran
Veteran
Joined
Jun 19, 2013
Messages
55
Reaction score
7
Primarily Uses
How can i make it so that you can move up and down between the actors listed on the scene? Right now when I call the scene it loads it but none of the names are selectable, nor can i exit when i hit the key assigned to the B button

Code:
class Window_ActorList < Window_Selectable    def initialize    super(0, 56, Graphics.width / 2, Graphics.height / 2)    refresh    self.index = 0  end   def refresh(main = -1, sub = -1)    self.contents.clear    @item_max = $game_party.members.size    for actor in $game_party.members      y = actor.index * line_height      if sub == -1        self.contents.font.color.alpha = main == actor.index ? 128 : 255      elsif sub > -1        self.contents.font.color.alpha = main == actor.index ? 128 : sub == actor.index ? 128 : 255      end      self.contents.draw_text(x, y, 108, line_height, actor.name)    end  endend#============================================================================#============================================================================class Scene_List < Scene_Base   def start    super    @background_sprite = Sprite.new    @background_sprite.bitmap = SceneManager.background_bitmap    @background_sprite.color.set(16, 16, 16, 128)        @actorlist = Window_ActorList.new    @index = @actorlist.index    @main = -1    @sub = -1    @counter = 0  end   def update    super    @background_sprite.update    @actorlist.update  end   def terminate    super    @background_sprite.dispose    @actorlist.dispose  end   def return_scene    $scene = Scene_Map.new  endend
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,969
Reaction score
13,603
First Language
English
Primarily Uses
RMMV
What scene? Is this a default script or one of your own? If one of your own, please start your own thread about it.
 

dabum

Veteran
Veteran
Joined
Jun 19, 2013
Messages
55
Reaction score
7
Primarily Uses
anyone know the snippet of code to retrieve class of a character?, I tried $game_party.battle_members[0].class, but that didnt work. (This should give back the class of character 1 in the battle party.)
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,839
First Language
English
If it didn't work what happened? Cause that should work.
 
Last edited by a moderator:

Yanen

Villager
Member
Joined
Jun 28, 2013
Messages
12
Reaction score
1
Primarily Uses
Is there a way to tell the map that an actor was on before they went into battle? I'm creating a system with events that applies different states to actors based on the map they were on when they entered battle (and i'm also using the SwitchPlayers script, so it's possible people may be on different maps), and i need to put something in a Conditional Branch that lets me tell what the map is when the battle occurs
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,969
Reaction score
13,603
First Language
English
Primarily Uses
RMMV
@Yanen, is your system IN the battle system - set up in troops tab or something? You can still use $game_map.map_id to see what map the player is on, even if you're not ON a map screen at the time.
 

Yanen

Villager
Member
Joined
Jun 28, 2013
Messages
12
Reaction score
1
Primarily Uses
@Yanen, is your system IN the battle system - set up in troops tab or something? You can still use $game_map.map_id to see what map the player is on, even if you're not ON a map screen at the time.
Hey, thanks for the reply.  Figured that out just a little while after i posted =P
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
934
First Language
English
Primarily Uses
N/A
So, for the script I'm currently working on, I have a loop that will run until a condition is either true or false, just like most loops, but this one isn't a 'while' or a 'for' it's just loop do stuff end. In the loop calls my scene's update method, which in turn calls super for Scene_Base's update method. Now, when I have this loop running, everything freezes. The screen won't update, but it should, update is called every time the loop goes around. Input works fine, though, it's just that the screen freezes.

There's a part that uses a fiber what pauses a few times (like the wait command on events).

So does anyone know why the screen doesn't update but input does, and how I can get it to update the screen?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,839
First Language
English
Post some code it is strange that your graphics are not updating but your input is.
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
934
First Language
English
Primarily Uses
N/A
It's for a password system for a part of a script I'm trying to implement. The loop itself is very simple, update (calls a method to get input), check if the player is done entering text.

I put the Graphics.update in there to try to fix it, but nothing updates it.

The loop

loop do update Graphics.update if @pass_accepted != nil break endendUpdate

def update super if @fiber @fiber.resume else @fiber = Fiber.new {get_input} @fiber.resume end if ZKey.trigger?(ZKey::VK_ESC) shutdown end if !ZKey.trigger?(ZKey::VK_ALT) && @alt != "0x" @text.insert(@cursor, [@alt.to_i(16)].pack("U*")) @alt = "0x" @cursor += 1 end update_cmd update_scroll update_window update_cursorendGet Input

Code:
def get_input  keys = ZKey::Keys.keys  keys.each { |button|    if ZKey.trigger?(button)      shift = ZKey.trigger?(ZKey::VK_SHIFT)      caps  = ZKey.toggle?(ZKey::VK_CAPITAL)      process_key(ZKey::Keys[button], button, (shift && !caps || !shift && caps), (shift) )    end    }  wait(@update_speed)  @fiber = nilend
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,839
First Language
English
I am not sure how to reproduce the issue with the provided code snippets. Maybe you can provide working scene code?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
934
First Language
English
Primarily Uses
N/A
erg, I was trying to avoid that, but fine, here it is, I'll just remove it later.

*snip*

Fixed it! :D .   To anyone having a similar issue, perhaps try using Graphics.transition, worked for me :)
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,477
Reaction score
3,070
First Language
Binary
Primarily Uses
RMMZ
sorry, but i dont understand how thee transition was affecting a loop that i would assume is triggered during the scene, ie after the initial transition..

could you elaborate please?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
934
First Language
English
Primarily Uses
N/A
What I think was happening was:

  • Called my scene that has the loop.
  • Scene_Base stops updating the old one, and terminates it (deletes everything, etc), freezes the screen.
  • Scene_Base runs the 'start' method to make the main viewport for everything to be displayed in.
  • SceneManager begins to run my scene.
  • My scene runs a loop that calls the update method, which in turn calls Scene_Base's update method.
  • It keeps looping, only ever calling update.
  • Scene_Base didn't get a chance to run post_start since my scene jumped into a loop almost instantly.
  • Because post_start performs the Graphics.transition, the screen remains frozen, so Graphics.update does nothing.
  • Call Graphics.transition before my loop to unfreeze everything.
  • All updates as it should.

Once the loop was over, before I added the Graphics.transition, Scene_Base was given the chance to run post_start to unfreeze the screen, so everything would run normally after my loop finished, but not during. Adding Graphics.transition before it to unfreeze the screen fixed all.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,477
Reaction score
3,070
First Language
Binary
Primarily Uses
RMMZ
ok i see what you meant now. thanks for clearing that up as i was a little confused lol
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
934
First Language
English
Primarily Uses
N/A
No problem, I wasn't quite sure at first, but now it makes sense that it happens that way.
 

doubledee1986

Warper
Member
Joined
Jul 18, 2013
Messages
1
Reaction score
0
First Language
English
Primarily Uses
If you can't tell by my profile or the question I'm about to ask, I am very new to this.

I am trying to implement the scripts from the DSResource pack and one of them isn't clear on how to install it, specifically the 1-5 Member Party Status Huds by Fomar0153. It tells me to follow the instructions in the membersplus module. However I don't have that, and don't know how to get that. If it helps, I am using RPGMakerVXAce steam version. Any help would be appreciated

Nevermind, I figured it out. Seems you don't do anything differently with the script. I thought that maybe you needed something downloaded from

member+ to use it, but I thought wrong.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Is there anyone who would like to resize some of sprites I've got and put them into MV sheet? I'm bad at that kind of things. I want to make a game, but I lack in resources and I'm bad at recolouring them, so my only option was to use a sprite maker from one game (Ive got permission to use it) but these are sprites from VX Ace and I only have MV. So, is there anyone interested in helping me?
Wow! This game looks great! Streaming now :D
Working on a system that allows you to define events in an easy to use text file format!!! Would you use such a thing? 0o
Have my fingers crossed, waiting for a discount sale on MZ on Steam.. Its normally around the corner during Halloween or x-mas season on Steam, if i remember right..

Forum statistics

Threads
104,479
Messages
1,006,607
Members
135,983
Latest member
phaze213
Top