TRIHAN'S "MAKE ME A SCRIPT" TOPIC!
Posts
The client I'm currently scripting for is starting to near the end of his requirements (aside from tweaking and optimising the ones I've already done) and since I'm currently between jobs I'm not doing much right now, so I thought I would take this opportunity to give a little back to the community that's kept me going for the past 12 years.
If anyone has a script they wanted for RMXP, VX or VX Ace, but didn't have a scripter or the knowledge to do it themselves, here's your chance! Let me know what you need and I'll script it for you.
Also, if you're a novice scripter and need help fixing/improving scripts you're writing yourself, feel free to post them here and I'll see what I can do. Thanks to Isrieri for the suggestion!
Please note that this doesn't mean I won't be finishing my own scripts people were waiting for. ^_^
Requests will be dealt with on a first-come-first-served basis. I will do smaller scripts, like utility and simple features, for free, but please be aware that if you want a more complex system I will have to charge you. I'm not doing a full TBS for free. :P
If anyone has a script they wanted for RMXP, VX or VX Ace, but didn't have a scripter or the knowledge to do it themselves, here's your chance! Let me know what you need and I'll script it for you.
Also, if you're a novice scripter and need help fixing/improving scripts you're writing yourself, feel free to post them here and I'll see what I can do. Thanks to Isrieri for the suggestion!
Please note that this doesn't mean I won't be finishing my own scripts people were waiting for. ^_^
Requests will be dealt with on a first-come-first-served basis. I will do smaller scripts, like utility and simple features, for free, but please be aware that if you want a more complex system I will have to charge you. I'm not doing a full TBS for free. :P
Can you teach me how to make a custom window with an image and descriptive text, and then change the content of said window when the player presses the left or right keys? (Have you played Hero's Realm? I am thinking of the class selection system I made using RM2k3 and images - basically I want functionality like that except I am NOT wanting to do it with events this time )
Also,
Can you give this a semi-transparent background window??
Also,
Can you give this a semi-transparent background window??
module Fomar X = 0 Y = 0 end class Game_Map #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :hud_vars attr_accessor :show_hud #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias var_hud_initialize initialize def initialize var_hud_initialize @hud_vars = [[],[],[],[],[],[],[],[]] @show_hud = false end end class Window_VarHud < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(Fomar::X, Fomar::Y, window_width, window_height) self.opacity = 0 @hud_vars = [] refresh end #-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 208 end #-------------------------------------------------------------------------- # * Get Window Height #-------------------------------------------------------------------------- def window_height fitting_height(visible_line_number) end #-------------------------------------------------------------------------- # * Get Number of Lines to Show #-------------------------------------------------------------------------- def visible_line_number return 8 end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- def update super ref = false for i in 0..$game_map.hud_vars.size - 1 next if $game_map.hud_vars[i] == [] if $game_variables[$game_map.hud_vars[i][1]] != @hud_vars[i] ref = true @hud_vars[i] = $game_variables[$game_map.hud_vars[i][1]] end end refresh if ref end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear i = 0 for var in $game_map.hud_vars next if var == [] draw_text(0,i * line_height,contents.width, line_height, var[0] + ": " + $game_variables[var[1]].to_s) i += 1 end end end class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- alias var_hud_start start def start var_hud_start if $game_map.show_hud @var_hud = Window_VarHud.new end end #-------------------------------------------------------------------------- # * Update #-------------------------------------------------------------------------- alias var_hud_update update def update var_hud_update if $game_map.show_hud and !@var_hud @var_hud = Window_VarHud.new end if !$game_map.show_hud and @var_hud @var_hud.dispose @var_hud = nil end end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias var_hud_terminate terminate def terminate var_hud_terminate @var_hud.dispose if @var_hud end end
I totally thought this was going to be a topic where you have novice scripters submit scripts they're working on and you help them to make theirs better. And I was going to be all "That's such a good idea for a topic."
This is a good topic too, though.
This is a good topic too, though.
That's not a half-bad idea, Isrieri. I might edit the topic to include that.
kentona, I'll take a look at that and see if I can help you.
Edit: Which version of RGSS do you need the code in?
kentona, I'll take a look at that and see if I can help you.
Edit: Which version of RGSS do you need the code in?
RGSS3 it is.
For your custom window, is this something you want displayed on the map directly or would you rather have it as a custom scene that still has the blurred map as its background like the menu does?
Edit: As for the HUD thing, I'm not sure what it's meant to do or how you're supposed to set it up since you didn't provide any documentation with it, but if you can explain how it works I'll tell you how to make it semi-transparent.
For your custom window, is this something you want displayed on the map directly or would you rather have it as a custom scene that still has the blurred map as its background like the menu does?
Edit: As for the HUD thing, I'm not sure what it's meant to do or how you're supposed to set it up since you didn't provide any documentation with it, but if you can explain how it works I'll tell you how to make it semi-transparent.
Can you make a script for VX Ace that can display map name with a background picture? I found two scripts, but they display the name so slow and the effects aren't worth the wait. :D
Sure. When you say display map name "with" a background picture, do you mean kind of like the way Kingdom Hearts does it? Like having an actual image for the map name?
author=Trihan
Sure. When you say display map name "with" a background picture, do you mean kind of like the way Kingdom Hearts does it? Like having an actual image for the map name?
I never played Kingdom Hearts, but yes, it is kinda like what you described. The background image doesn't include the map name, though. :P
What size are the images? Or do you need that to be variable from map to map?
It doesn't have to be variable. The image shouldn't be too big, so that it could fit in the top left corner. I don't the what the appropriate size should be, but I going to guess 200 X 60 is about right. :D
Okay, I'll see what I can do. I've been working on this one on-and-off all day since kentona hasn't answered my questions yet, but I'm having some annoying errors with it that I'm trying to pinpoint the cause of.
author=Trihanyou can see it in action in BQ6!
RGSS3 it is.
For your custom window, is this something you want displayed on the map directly or would you rather have it as a custom scene that still has the blurred map as its background like the menu does?
Edit: As for the HUD thing, I'm not sure what it's meant to do or how you're supposed to set it up since you didn't provide any documentation with it, but if you can explain how it works I'll tell you how to make it semi-transparent.

As for the custom window - blurred map plz!
So do you want to make the text semi-transparent or what?
author=TrihanI want a window behind it (that is semi-transparent) so that the text is easier to read against the map.
So do you want to make the text semi-transparent or what?
As far as I can tell all you need to do is change the opacity in line 33 to a non-zero value; I found that 128 works quite well for semi-transparency but you might want to go with something lower for more visibility.
As for your custom window, do you want me to tell you HOW to do it, or do you simply want me to write it for you?
As for your custom window, do you want me to tell you HOW to do it, or do you simply want me to write it for you?
Okay!
To create the window itself, you just need to create a new class that inherits from Window_Base, like so:
Note that since you need the window contents to update when you press left/right, you need to have an index variable, a data structure containing your class data, and a reference to the index in the refresh method.
Then you'd need to create a new scene that could be called when you need to select a class, like so:
You would also need an update method in the scene that adds to/subtracts from the index when left or right are pressed.
I've been intentionally vague about some of the steps here since you can tell how to do them from looking at the default system scripts and it'll help you to learn if I don't explicitly tell you what to do, but if you don't understand any of that or need more specific help let me know.
Note that when I refer to x, y, width and height in the scene class, you need to actually put in the values you want for those things, whereas in the window they're written as-is as these are arguments rather than values.
To create the window itself, you just need to create a new class that inherits from Window_Base, like so:
class Window_ClassSelect < Window_Base
def initialize(x, y, width, height)
super(x, y, width, height)
refresh
end
def refresh
code that shows your images and stuff
end
end
Note that since you need the window contents to update when you press left/right, you need to have an index variable, a data structure containing your class data, and a reference to the index in the refresh method.
Then you'd need to create a new scene that could be called when you need to select a class, like so:
class Scene_ClassSelect < Scene_Base
def start
super
@select_window = Window_ClassSelect.new(x, y, width, height)
end
end
You would also need an update method in the scene that adds to/subtracts from the index when left or right are pressed.
I've been intentionally vague about some of the steps here since you can tell how to do them from looking at the default system scripts and it'll help you to learn if I don't explicitly tell you what to do, but if you don't understand any of that or need more specific help let me know.
Note that when I refer to x, y, width and height in the scene class, you need to actually put in the values you want for those things, whereas in the window they're written as-is as these are arguments rather than values.
Still working on it! I've had some frustrating issues I'm trying to work around, mainly that I'd rather show the image inside the existing map name window than suppress the default. If need be I'll just replace the whole thing, but I'm trying to do it as unobtrusively as possible.

















