The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Archive January 2006 to April 2008 (https://www.pokecommunity.com/forumdisplay.php?f=177)
-   -   Help & Request Thread (https://www.pokecommunity.com/showthread.php?t=80029)

WHALESDUDE March 28th, 2007 9:23 AM

Oh, my bad Dash. I'm using RMXP ;3 Hehe

The Dash March 28th, 2007 10:46 AM

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.

~Azura March 28th, 2007 7:14 PM

Quote:

Originally Posted by LegosJedi (Post 2425386)
Is there anyway to make variables created in a script available to events?

Yep. "Event variables" (the ones like 0001, 0043, etc...) are actually RGSS variables, so you can use the following to call them:

Code:

$game_variables[var_id]


So if you created this little code here:

Code:

@my_name = "Azura"


And want it to be available to your event, just make something like this:

Code:

$game_variables[1] = @my_name


Then, "event" variable 0001 will contain "@my_name"'s value. You can use any number, not only 1... but I guess you got it already.

~Azura.

RM2K3kid March 29th, 2007 8:46 AM

Quote:

Originally Posted by WHALESDUDE (Post 2417016)
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 (Post 2425561)
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.

LegosJedi March 30th, 2007 4:35 AM

Thanks, Azura! Now, is it possible to call the variables by their name? Like, if Event Variable is named var1, is it possible to call an event like $game_variable['var1'] instead of using the id number?

.-'Infernal Hylian'-. March 30th, 2007 6:34 AM

should be possable if you use call script...

~Azura March 30th, 2007 8:20 AM

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 March 31st, 2007 3:12 AM

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 March 31st, 2007 7:29 AM

I see... you could do it if the variables were stored in a hash, but not in an array.

Omega Latios March 31st, 2007 8:40 AM

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 March 31st, 2007 8:59 AM

Quote:

Originally Posted by Omega Latios (Post 2428214)
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.

Omega Latios March 31st, 2007 9:09 AM

But the cutscene doesn't show the hero, but the villain... does that work for it, too?

Shiny Umbreon March 31st, 2007 6:26 PM

Quote:

Originally Posted by Omega Latios (Post 2428255)
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 March 31st, 2007 7:38 PM

Quote:

Originally Posted by Omega Latios (Post 2428255)
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.


Quote:

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.

Shiny Umbreon April 1st, 2007 7:04 AM

Quote:

Originally Posted by ~Azura (Post 2428938)
Like, instead of having a 640x480 window, you'd have a 1280x960? Yes. If so, I'll post the script.

~Azura.

Kind of like that, but not just to make everything look bigger. I want the player to see more space that what he normally would.

Innagadadavida April 3rd, 2007 7:04 PM

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 April 3rd, 2007 7:23 PM

Try the Rom Hacking forums to ask about... rom hacks.

http://www.pkmncommunity.com/forumdisplay.php?f=37

:)

The Dash April 4th, 2007 4:20 AM

Quote:

Originally Posted by Shiny Umbreon (Post 2429530)
Kind of like that, but not just to make everything look bigger. I want the player to see more space that what he normally would.

I'm pretty sure that's what the script would do. Blizzy changed the size of the window in the Pokémon Starter Kit and all it did was restrict view space.

Shiny Umbreon April 4th, 2007 4:49 PM

Quote:

Originally Posted by The Dash (Post 2432707)
I'm pretty sure that's what the script would do. Blizzy changed the size of the window in the Pokémon Starter Kit and all it did was restrict view space.

Cool. So what's that script, please?

~Azura April 4th, 2007 7:15 PM

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 April 5th, 2007 1:58 PM

1 Attachment(s)
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 April 5th, 2007 3:30 PM

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.

Shiny Umbreon April 5th, 2007 8:52 PM

I had to make lots of fixes to the message window. Now it works perfectly and the title window too. Thanks for the script.

WHALESDUDE April 6th, 2007 6:19 AM

Quote:

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 April 6th, 2007 12:52 PM

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?


All times are GMT -8. The time now is 4:55 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.