• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Help & Request Thread

Status
Not open for further replies.

~Azura

Alright, purple is good.
512
Posts
18
Years
  • Seen Jun 21, 2012
No, you can't, because $game_variables is an array, so it's indexed by numbers. But why do you want to call it by name?
 

LegosJedi

Amateur Video Game Maker
229
Posts
17
Years
Cause I think it would be easier, when coding, to give each variable in an array a key, and remember that key, instead of by number. I use PHP, and since you can do that in PHP, I was wondering if you could do that in Ruby, too. Oh well.
 

~Azura

Alright, purple is good.
512
Posts
18
Years
  • Seen Jun 21, 2012
I see... you could do it if the variables were stored in a hash, but not in an array.
 

Omega Latios

Whhheeee... *shot'd*
2,877
Posts
19
Years
Intro Help

I have to do an intro cutscene for my game before you start to move with the hero... but I don't know how to do it! Can someone help me?
 

Glitchfinder

Let's all get along, please?
477
Posts
17
Years
I have to do an intro cutscene for my game before you start to move with the hero... but I don't know how to do it! Can someone help me?

All you have to do is use autostart events. For example, you start with your hero in a certain map, and an autostart event (anywhere in the map, I use the top left corner) causes the hero to move (the Move Event... command[ 2nd page]), pops up messages (1st page), and causes events to interact with you. You can even make a battle cut scene using the Start Combat... and Forced Action... commands. (3rd page). Then, if you aren't ever ygoing to use the map again, just use the Erase Event command, or, if you are going to use it again, activate a local switch and make a new (blank) page on the event that is activated by the local switch.
 

Shiny Umbreon

光るブラッキー
3,657
Posts
19
Years
But the cutscene doesn't show the hero, but the villain... does that work for it, too?

Then you have two choices:
*Have your hero have the villain's sprite until you start playing.
*Make the villain an event and have your hero in a transparent sprite. It's better if it's on top of a block where you can't move.

I have a question:

Is it possible to change the window's size? I mean you see double what you would, not double the size of what you see.
 

~Azura

Alright, purple is good.
512
Posts
18
Years
  • Seen Jun 21, 2012
But the cutscene doesn't show the hero, but the villain... does that work for it, too?

You can move any event using Move Event command. Also, you can set visibility for hero (or any other event) On/Off anytime, specially useful for cutscenes.


Is it possible to change the window's size? I mean you see double what you would, not double the size of what you see.

Like, instead of having a 640x480 window, you'd have a 1280x960? Yes. If so, I'll post the script.

~Azura.
 
174
Posts
17
Years
  • Age 33
  • Seen Jan 21, 2024
I've been searching the forums and the net. I can't seem to find a program that allows me to change the Pokemon sprites in Red and Blue. I have pokemap, but that only allows for map editing. Does anybody know if said program even exists?
 

~Azura

Alright, purple is good.
512
Posts
18
Years
  • Seen Jun 21, 2012
Code:
#================================================================
#BEGIN CLASS
#================================================================
#Script made by Squall [email protected]
#================================================================
begin
class Win32API
  #==============================================================
  #CONSTANTS
  #==============================================================
  SCREEN_WIDTH = 640
  SCREEN_HEIGHT = 480
  GAME_INI_FILE = ".\\Game.ini"         # define "Game.ini" file
  HWND_TOPMOST = 0                      # window always active
  HWND_TOP = 0                         # window active when used only
  SWP_NOMOVE   = 0                      # window pos and sizes can be changed
  #==============================================================
  #Win32API.GetPrivateProfileString
  #==============================================================
  #Checks your game's title in Game.ini
  def Win32API.GetPrivateProfileString(section, key)
    val = "\0"*256
    gps = Win32API.new('kernel32', 'GetPrivateProfileString',%w(p p p p l p), 'l')
    gps.call(section, key, "", val, 256, GAME_INI_FILE)
    val.delete!("\0")
    return val
  end
  #==============================================================
  #Win32API.FindWindow
  #==============================================================
  #Finds the RGSS Window
  def Win32API.FindWindow(class_name, title)
    fw = Win32API.new('user32', 'FindWindow', %(p, p), 'i')
    hWnd = fw.call(class_name, title)
    return hWnd
  end
  #==============================================================
  #Win32API.SetWindowPos
  #==============================================================
  #Changes Window position and size
  def Win32API.SetWindowPos(w, h)
    title =  Win32API.GetPrivateProfileString("Game", "Title")
    hWnd = Win32API.FindWindow("RGSS Player", title)
    swp = Win32API.new('user32', 'SetWindowPos', %(l, l, i, i, i, i, i), 'i')
    win = swp.call(hWnd, HWND_TOP, 0, 0, w + 6, h + 32, 0)
    #the line below makes the window on top of all others
    win = swp.call(hWnd, HWND_TOPMOST, 0, 0, w + 6, h + 32, SWP_NOMOVE)
    return win
  end
  #==============================================================
  #Win32API.client_size
  #==============================================================
  #Checks the Window's width and height
  def Win32API.client_size
    title =  Win32API.GetPrivateProfileString("Game", "Title")
    hWnd = Win32API.FindWindow("RGSS Player", title)
    rect = [0, 0, 0, 0].pack('l4')
    Win32API.new('user32', 'GetClientRect', %w(l p), 'i').call(hWnd, rect)
    width, height = rect.unpack('l4')[2..3]
    return width, height
  end
#================================================================
#END CLASS
#================================================================
end

  #==============================================================
  #Win32API.client_size
  #==============================================================
  #The width and height variables set the screen size.
  win = Win32API.SetWindowPos(SCREEN_WIDTH, SCREEN_HEIGHT)
  if(win == 0)
    p "Size change has failed!"
  end
end

You may have to add the fixes for this script but I can't find them anymore. Anyway, it will work the way it is.

~Azura.
 

Shiny Umbreon

光るブラッキー
3,657
Posts
19
Years
OK. I used the script to change the size of the window to 960 x 720, and I changed the font to x1.5 as well, but the space between lines remains the same and looks bad, and I don't know how to change that. Please help me, it looks like this:
 

~Azura

Alright, purple is good.
512
Posts
18
Years
  • Seen Jun 21, 2012
You'll have many fixes to do with that script, but this will do the trick for the menu, I guess:

(Haven't tested)

In Window_Command, search for this line (or something close to this):

Code:
rect = Rect.new(12, 32 * index, self.contents.width - 8, 32)

The 32 * index is where you need to change. Specifically the 32. If you want the lines more separated, put a higher value, such as 40 or something.

Well, I forgot something that you'll need to edit too:

In Window_Selectable:

Code:
y = @index / @column_max * 32 - self.oy

Change that 32 for the same number you put in the other edit.

~Azura.
 

WHALESDUDE

I am me.
333
Posts
18
Years
Quote:
Originally Posted by WHALESDUDE View Post
Another Recouring problem x___x Just wondering how to get the text to appear. It's not showing up anymore o.o
Quote:
Originally Posted by The Dash View Post
What do you mean by the text isn't appearing? Is it just the Text or the text box as well? Check and see if you have any custom scripts that could be causing this. Also, does it occur in other RMXP games as well? If so then it could be a problem with your installation.
I think I know what he means.. is the background of your text box white? if so, then its simple. RMXP's default font is white.. it blends right in with the text box background.

Two ways of fixing it.
Without editing scripts just put \c[x] in front of the message. x is a number between 0 and 7. example '\c[3]Hello, welcome to my palace.' That would display a green tinted font and that is only if the colours haven't been edited in the scripts.

With editing the scripts, just go into the Script Editor (Press F11) then go to Window_Base. Now go to line 64 or the line that says..

Code:

def normal_color
return Color.new(255, 255, 255, 255)
end

and change it to something like this...

Code:

def normal_color
return Color.new(0, 0, 0, 255)
end

That would change the colour of your default font to black.

If its not to do with the text box background, please disregard all of that.
Oh, that's useful information on some other projects of mine actually x3, But um... I changed it but to no avail. It still won't funtion. I'm guessing it has something to do with the text file itself?
 

~Azura

Alright, purple is good.
512
Posts
18
Years
  • Seen Jun 21, 2012
To begin with, have you already tried to change the windowskin to check if the problem is the font color? Also, have you triple checked if you have the specified the correct name for the font? Have you check if you have the font file in your Fonts folder?
 
Status
Not open for further replies.
Back
Top