Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

Leon

Legend
  • Content Count

    1,713
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by Leon

  1. Will we be doing this anymore? I mean, a lot of people didnt enter simply because of the tileset used. Either way, i'd like to see this continue.
  2. Thanks for everyone's critique. I do appreciate it. I see some aren't enthused, but it is the best I could get whipped up in teh last two days. I just wanted to see how it'd look. *bump* hate to double post, but i wanted to let everyone know i updated the title picture.
  3. Leon

    5000Th Post

    Yes, I have 50 left, but it don't matter to me. It isn't how often you speak, but what you say.
  4. I normally dont like doing polls or crap like that, but this one I am trying to perfect. Can you please tell me your HONEST opinion on this title screen? I what true blue critisizm and honest votes. I won't get mad in the least.
  5. All im saying, Nis, is if parents taught about sex, rather than teach that it is 'bad', teens wouldnt use it as a form of rebellion, and actually hold respect for it. Hell, i'd rather my kids watch a filmstrip of a happy married couple doin it than a warzone scene. Sex is something that happens naturally in nature. today, it is being abused, but if it was taught to be a natural thing used to express the ultimate for of love, then it would still hold meaning.
  6. Leon

    5000Th Post

    -mimicking red forman- Yeah, my foot in your ass.
  7. you know, stories are so babied now a days, it sickens me. if link were to stab ganon, i'm sure there'd be mature content. Or him an zelda gettin a lill... frishkey.
  8. Funny thing about swearing. the 'F' word,, for example simply stands for (and this is no joke) Fornication Under the Consent of the King. Warning: Contains swearing! swearing Bitch originates from the old english meaning of female dog. So calling a woman a real dog is an insult, so bitch was used to be nicer about it. Come today, it is worse. Damn - To condemn. So when you say 'damn you', you are basically passing judgment, something against the Good Book. 'Ass' - Donkey. 'nough said. 'Shit' - the most versitle word in the english language. Dont know where it originates, but it is there. Now, as for if they are necessary, well, is the word 'ovum' needed? What about 'isle' as opposed to 'island'? You also have 'couch' and 'sofa' or 'car' and 'automobile'. Isn't english fun?! Essentially, no, it isn't needed. However, it is merely another (and overused) way of stating something, and usually easier to do that writing out an entire sentence. For instance 'Go fuck yourself'. my way of saying 'you've done pissed me off, now get out of my way before i put my size 12 up your ass'. I do apologize for such language, i normally dont in the presence of a lady; but i thought i'd just point out my perspective. "A rose by any other name, would smell as sweet"
  9. Sex is a taboo topic here in back-water utah. it is so... forbidden that we have the highest teen pregnancy rating (and oddly, the highest teen suicide rating). Simply put, sex is sex. its natural. don't abuse it, just use it. :alright:
  10. Did you try dressing in drag while bathing in a moonlit pond at midnight during a full moon?
  11. IMO, if Texas Seceeded, Mexico, particularly the AK toting drug lords, could easily take Texas. I mean, do you realy think of Texas insulted the US by seceeding, that they'd continue to guard the border between texas and mexico? Further, the only thing that would be Texas' saving grace is Chuck Norris.
  12. it were moved there by special ninjas. :ph34r:
  13. Much like with Tint, Fog is another one of those things you must constantly 'replay' to get just right. Well, this script should cut the replays out of the equation. Simply put this script above main, but below all other scripts, and press 'F6' in Debug mode to pull up a fog display mode. It will allow you to manipulate the fog in ANY way for ANY purpose. Please, enjoy. Also, there is more information in the script's header. screenshot fogdebug #=============================================================================== # Leon_Westbrooke's Fog Debug Menu (a.k.a. Leon) #------------------------------------------------------------------------------- # Release: July 1st, 2009 # version: 1.0 #------------------------------------------------------------------------------- # Instructions: # Place above Main, but below all other default scripts. # Any imported fogs must be added to the 'Names' array in the 'Fogs' module. # Press F6 in Debug mode to call up this menu. # Use the various controls to set your fog. #------------------------------------------------------------------------------- # Features: # Allows you to choose a fog for your current map, and set the following # parameters: # Hue # Opacity # Blending # Starting Location (x and y) # Speed of Fog Scrolling (x and y) # Zoom # Tone # # This will only give you the values. You MUST set these values up in an # event to get the effect of them. So, in essence, this to keep from having # to test over and again. #------------------------------------------------------------------------------- # Notes: # The Starting Locations (ox and oy) will go haywire if you set the speed # scroll options. This is normal as it is just showing its current x and y # of the upper left corner of the original fog graphic. #------------------------------------------------------------------------------- # Credits: # Credits go to Leon/Leon_Westbrooke for this one. It is really the same # person. I just added the '_Westbrooke' to I.D. myself better. #------------------------------------------------------------------------------- #=============================================================================== # * module Fogs #=============================================================================== module Fogs #------------------------------------------------------------ # Add any imported fogs to this list. #------------------------------------------------------------ Names = [ '', '001-Fog01', '002-Clouds01', '003-Shade01', '004-Shade02', '005-Sandstorm01', '006-Sandstorm02', '007-Water01', '008-Water02', '009-Water03', '010-Water04'] end #=============================================================================== # * END Module #=============================================================================== #=============================================================================== # * Game_Map #=============================================================================== class Game_Map attr_accessor :fog_ox attr_accessor :fog_oy attr_accessor :fog_tone end #=============================================================================== # END Game_Map #=============================================================================== #=============================================================================== # * Scene_Map #=============================================================================== class Scene_Map alias leon_fogdebug_scenemap_update update def update leon_fogdebug_scenemap_update if $DEBUG and Input.press?(Input::F6) $scene = Scene_FogChange.new end end end #=============================================================================== # END Scene_Map #=============================================================================== #=============================================================================== # * Window_FogNames #=============================================================================== class Window_FogNames < Window_Selectable def initialize super(0, 0, 192, 160) self.contents = Bitmap.new(width - 32, height - 32) @item_max = Fogs::Names.size @index = 0 @active = true self.opacity = 96 refresh end def item return @data[index] end def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 0...Fogs::Names.size @data.push(Fogs::Names[i]) end @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end def draw_item(index) item = @data[index] x = 4 y = index * 32 self.contents.draw_text(x, y, 160, 32, item) end end #=============================================================================== # END Window_FogNames #=============================================================================== #=============================================================================== # * Window_FogSettings #=============================================================================== class Window_FogSettings < Window_Selectable def initialize super(0, 160, 192, 288) self.contents = Bitmap.new(width - 32, height - 32) @item_max = 8 self.index = -1 self.active = false self.opacity = 96 refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, 0, 128, 32, "Hue:") self.contents.draw_text(0, 32, 128, 32, "Opacity:") self.contents.draw_text(0, 64, 128, 32, "Blending:") self.contents.draw_text(0, 96, 128, 32, "Starting X:") self.contents.draw_text(0, 128, 128, 32, "Starting Y:") self.contents.draw_text(0, 160, 128, 32, "Move X:") self.contents.draw_text(0, 192, 128, 32, "Move Y:") self.contents.draw_text(0, 224, 128, 32, "Zoom:") self.contents.font.color = normal_color self.contents.draw_text(0, 0, 160, 32, $game_map.fog_hue.to_s, 2) self.contents.draw_text(0, 32, 160, 32, $game_map.fog_opacity.to_s, 2) self.contents.draw_text(0, 64, 160, 32, $game_map.fog_blend_type.to_s, 2) self.contents.draw_text(0, 96, 160, 32, $game_map.fog_ox.to_s, 2) self.contents.draw_text(0, 128, 160, 32, $game_map.fog_oy.to_s, 2) self.contents.draw_text(0, 160, 160, 32, $game_map.fog_sx.to_s, 2) self.contents.draw_text(0, 192, 160, 32, $game_map.fog_sy.to_s, 2) self.contents.draw_text(0, 224, 160, 32, $game_map.fog_zoom.to_s, 2) end def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(100, @index * 32, 64, 32) end end end #=============================================================================== # END Window_FogSettings #=============================================================================== #=============================================================================== # * Window_FogTint #=============================================================================== class Window_FogTint < Window_Selectable def initialize super(192, 0, 192, 160) self.contents = Bitmap.new(width - 32, height - 32) @item_max = 4 self.index = -1 self.active = false self.opacity = 96 refresh end def refresh self.contents.clear self.contents.draw_text(4, 0, 160, 32, "Red") self.contents.draw_text(4, 32, 160, 32, "Green") self.contents.draw_text(4, 64, 160, 32, "Blue") self.contents.draw_text(4, 96, 160, 32, "Gray") self.contents.draw_text(-4, 0, 160, 32, $game_map.fog_tone.red.to_i.to_s, 2) self.contents.draw_text(-4, 32, 160, 32, $game_map.fog_tone.green.to_i.to_s, 2) self.contents.draw_text(-4, 64, 160, 32, $game_map.fog_tone.blue.to_i.to_s, 2) self.contents.draw_text(-4, 96, 160, 32, $game_map.fog_tone.gray.to_i.to_s, 2) end end #=============================================================================== # END Window_FogTint #=============================================================================== #=============================================================================== # * Scene_FogChange #=============================================================================== class Scene_FogChange def main @spriteset = Spriteset_Map.new @name_window = Window_FogNames.new @settings_window = Window_FogSettings.new @tint_window = Window_FogTint.new Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @name_window.dispose @settings_window.dispose @spriteset.dispose @tint_window.dispose end def update $game_map.update @spriteset.update if @name_window.active update_name return end if @settings_window.active update_settings return end if @tint_window.active update_tint return end end def update_name @name_window.update if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN) or Input.repeat?(Input::DOWN) or Input.repeat?(Input::UP) $game_map.fog_name = @name_window.item end if Input.trigger?(Input::C) @name_window.active = false @settings_window.active = true @settings_window.index = 0 end if Input.trigger?(Input::B) $game_system.se_play($data_system.decision_se) $scene = Scene_Map.new end end def update_settings @settings_window.update case @settings_window.index when 0 if Input.trigger?(Input::RIGHT) $game_map.fog_hue += 1 if $game_map.fog_hue >= 360 $game_map.fog_hue = 360 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_hue -= 1 if $game_map.fog_hue <= 0 $game_map.fog_hue = 0 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_hue += 5 if $game_map.fog_hue >= 360 $game_map.fog_hue = 360 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_hue -= 5 if $game_map.fog_hue <= 0 $game_map.fog_hue = 0 end @settings_window.refresh end when 1 if Input.trigger?(Input::RIGHT) $game_map.fog_opacity += 1 if $game_map.fog_opacity >= 255 $game_map.fog_opacity = 255 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_opacity -= 1 if $game_map.fog_opacity <= 0 $game_map.fog_opacity = 0 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_opacity += 5 if $game_map.fog_opacity >= 255 $game_map.fog_opacity = 255 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_opacity -= 5 if $game_map.fog_opacity <= 0 $game_map.fog_opacity = 0 end @settings_window.refresh end when 2 if Input.trigger?(Input::RIGHT) $game_map.fog_blend_type += 1 if $game_map.fog_blend_type >= 2 $game_map.fog_blend_type = 2 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_blend_type -= 1 if $game_map.fog_blend_type <= 0 $game_map.fog_blend_type = 0 end @settings_window.refresh end when 3 if Input.trigger?(Input::RIGHT) $game_map.fog_ox += 0.1 if $game_map.fog_ox >= 640 $game_map.fog_ox = 640 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_ox -= 0.1 if $game_map.fog_ox <= -640 $game_map.fog_ox = -640 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_ox += 0.5 if $game_map.fog_ox >= 640 $game_map.fog_ox = 640 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_ox -= 0.5 if $game_map.fog_ox <= -640 $game_map.fog_ox = -640 end @settings_window.refresh end when 4 if Input.trigger?(Input::RIGHT) $game_map.fog_oy += 0.1 if $game_map.fog_oy >= 640 $game_map.fog_oy = 640 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_oy -= 0.1 if $game_map.fog_oy <= -640 $game_map.fog_oy = -640 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_oy += 0.5 if $game_map.fog_oy >= 640 $game_map.fog_oy = 640 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_oy -= 0.5 if $game_map.fog_oy <= -640 $game_map.fog_oy = -640 end @settings_window.refresh end when 5 if Input.trigger?(Input::RIGHT) $game_map.fog_sx += 1 if $game_map.fog_sx >= 256 $game_map.fog_sx = 256 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_sx -= 1 if $game_map.fog_sx <= -256 $game_map.fog_sx = -256 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_sx += 5 if $game_map.fog_sx >= 256 $game_map.fog_sx = 256 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_sx -= 5 if $game_map.fog_sx <= -256 $game_map.fog_sx = -256 end @settings_window.refresh end when 6 if Input.trigger?(Input::RIGHT) $game_map.fog_sy += 1 if $game_map.fog_sy >= 256 $game_map.fog_sy = 256 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_sy -= 1 if $game_map.fog_sy <= -256 $game_map.fog_sy = -256 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_sy += 5 if $game_map.fog_sy >= 256 $game_map.fog_sy = 256 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_sy -= 5 if $game_map.fog_sy <= -256 $game_map.fog_sy = -256 end @settings_window.refresh end when 7 if Input.trigger?(Input::RIGHT) $game_map.fog_zoom += 1 if $game_map.fog_zoom >= 800 $game_map.fog_zoom = 800 end @settings_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_zoom -= 1 if $game_map.fog_zoom <= 100 $game_map.fog_zoom = 100 end @settings_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_zoom += 5 if $game_map.fog_zoom >= 800 $game_map.fog_zoom = 800 end @settings_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_zoom -= 5 if $game_map.fog_zoom <= 100 $game_map.fog_zoom = 100 end @settings_window.refresh end end if Input.trigger?(Input::C) @settings_window.index = -1 @settings_window.active = false @tint_window.active = true @tint_window.index = 0 end if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @name_window.active = true @settings_window.index = -1 @settings_window.active = false end end def update_tint @tint_window.update case @tint_window.index when 0 if Input.trigger?(Input::RIGHT) $game_map.fog_tone.red += 1 if $game_map.fog_tone.red >= 255 $game_map.fog_tone.red = 255 end @tint_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_tone.red -= 1 if $game_map.fog_tone.red <= -255 $game_map.fog_tone.red = -255 end @tint_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_tone.red += 5 if $game_map.fog_tone.red >= 255 $game_map.fog_tone.red = 255 end @tint_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_tone.red -= 5 if $game_map.fog_tone.red <= -255 $game_map.fog_tone.red = -255 end @tint_window.refresh end when 1 if Input.trigger?(Input::RIGHT) $game_map.fog_tone.green += 1 if $game_map.fog_tone.green >= 255 $game_map.fog_tone.green = 255 end @tint_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_tone.green -= 1 if $game_map.fog_tone.green <= -255 $game_map.fog_tone.green = -255 end @tint_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_tone.green += 5 if $game_map.fog_tone.green >= 255 $game_map.fog_tone.green = 255 end @tint_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_tone.green -= 5 if $game_map.fog_tone.green <= -255 $game_map.fog_tone.green = -255 end @tint_window.refresh end when 2 if Input.trigger?(Input::RIGHT) $game_map.fog_tone.blue += 1 if $game_map.fog_tone.blue >= 255 $game_map.fog_tone.blue = 255 end @tint_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_tone.blue -= 1 if $game_map.fog_tone.blue <= -255 $game_map.fog_tone.blue = -255 end @tint_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_tone.blue += 5 if $game_map.fog_tone.blue >= 255 $game_map.fog_tone.blue = 255 end @tint_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_tone.blue -= 5 if $game_map.fog_tone.blue <= -255 $game_map.fog_tone.blue = -255 end @tint_window.refresh end when 3 if Input.trigger?(Input::RIGHT) $game_map.fog_tone.gray += 1 if $game_map.fog_tone.gray >= 255 $game_map.fog_tone.gray = 255 end @tint_window.refresh elsif Input.trigger?(Input::LEFT) $game_map.fog_tone.gray -= 1 if $game_map.fog_tone.gray <= -255 $game_map.fog_tone.gray = -255 end @tint_window.refresh elsif Input.repeat?(Input::RIGHT) $game_map.fog_tone.gray += 5 if $game_map.fog_tone.gray >= 255 $game_map.fog_tone.gray = 255 end @tint_window.refresh elsif Input.repeat?(Input::LEFT) $game_map.fog_tone.gray -= 5 if $game_map.fog_tone.gray <= -255 $game_map.fog_tone.gray = -255 end @tint_window.refresh end end if Input.trigger?(Input::C) $game_system.se_play($data_system.decision_se) $scene = Scene_Map.new end if Input.trigger?(Input::B) @tint_window.active = false @tint_window.index = -1 @settings_window.active = true @settings_window.index = 0 end end end #=============================================================================== # END Scene_FogChange #===============================================================================
  14. Welcome, Mr. The Duck. may our knowledge leech out and benefit you.
  15. If communist Korea is in fact testing missiles, and nukes, you can guarentee they have a ready to fly fighting force. Once they hit the U.S., unless they hit as far in as Utah, they will have a hell of a firefight. But if they were to hit the naval base in Hawaii, the one(s) in cali (forgot how many) and the airforce bases in both Nevada and utah, that would seriously cripple our defenses and take a good amount of time to rally a defense.
  16. Leon

    Does "Fate" Exist?

    In essence, Tomo, numerology.
  17. Leon

    Does "Fate" Exist?

    *In a slightly raspy and old voice* "My, God, Marty! We've cause a time paraddox!" Fate is a funny thing. Much like the theory of a time travel paraddox. Honestly, I think we do have say in the menial things in life, but the inevitable conclusion is always the same. From the moment you are born, it is said when you will die. Now yes, you can change that fact, but in doing so, does this set off another random tangent of what the future will hold? Butterfly effect, man. What would have happened if Peter married Molly Ringwald instead of Lois? What would have happened if Hillary beat Barrack? Only one way to know, and it skews us into a whole 'nother world of debate. For those of us who really want to get hard core on this subject, we must start work on a flux capcitor.
  18. After Obama's rally on how war is bad, he has the main populous against fighting, and thus, many would deny the draft, flee the country, or end up in prison. Trust me, most of america's 20 and 30 year olds wouldn't want to go, and even if they did, a good number of them are way out of shape. They wouldn't stand a chance against a veteran fighting force.
  19. Let's look at the political side of this from another country: Texas seceding is a sign of the US not being able to keep it together, an thus, a sign of weakness. Because of this, there is a good chance that another country that has even slightly hostle toward the U.S. could move upon this and take advantage of such a position. Among the countries who could see this as a weakness and plot against it: N. Korea For those who have not kept up with the news, they have been testing long range nukes. In fact, they can quite possibly hit the west coast of the US. If this happens, we'll have 2 options as a country: Recall the troops from Iraq and use them in a new war, or start up the draft for said new war. If a nuke is aimed at the US, and US is invaded and possibly taken; Texas would be an EASY target, along with Canada. Yes, seceding may be in Texas' best interest, but for how long?
  20. A thousand. Huh... hard to believe it has been THAT long.
  21. Leon

    Everything o.ö

    You know, darlin, you can post in other forums. You aren't limited to just here. ;). Also, feel free to IM me again anytime. Sometimes I am set to invisible, likenow, however.
  22. Okay, here lately, I have had some issues that has kept me from doing a tutorial in a while. anyway, I think I will make this one short and quick. By now, you should know how to use a good number of functions in RGSS: How to build different types of variables. How to build a class and methods. How to build Windows, both basic and selectable. How to build a scene. How to use numbers. How to use and manipulate pictures. Now, before you go off thinking you can build a custom system from this, you may want to read this topic. Here, we will discuss the potential of arrays, hashes, and modules; all of which I find crucial in my scripts for intricate systems. First, we'll start with the easiest of this trio: array. An array is a pretty cool thing. Let's use this old Gump analagy: A variable is, say, a box for a single piece of chocolate. No matter what, it will always hold that one piece. An array is a box that can not only hold any number of chocolates, but you can do things with these! Sort them, take and dispose of them, use them for indexing... I know, not what you'd REALLY do with chocolates, but this is just an example. The way this works is where a variable says : @variable = x, an array is simply @array = []. The brackets are important here. This basically says we have an array that we can add any number of items to. But, what exactly can you do with an array, how do you set it, and how does it work? This is where we have fun. @array = [1, 2, 3, 4, 5] There is our array for our purposes. I just feel sorry for President Screwb, cuz that is the combo for his luggage. But, here is also a list of different, and most commonly used commands: .include? .sort - Creates a new array of the array you want sorted, and returns it sorted. .sort! - Destructively sorts the array, and returns itself. .size - Returns the size of the array. [x] - Returns what is at position 'x' in the array. (if outside the array's specs, it returns nil.) Probably doesn;t mean much without an example, but that's what i'm here for! @array = [1, 2, 3, 4, 5] @array.include?(1) #returns true, because i is in the array. @array.include?(6) #returns false, there is no 6 in the array. include? is self explainatory. Just asks if that is included in the array. @array = [5, 3, 1, 2, 4] @array.sort #returns (in a new array) 1, 2, 3, 4, 5 @array.sort! #returns (and changes @array to) 1, 2, 3, 4, 5 [code] THere's sort and sort! for you. [code] @array = [1, 2, 3, 4, 5] @array.size #returns 5 That size was simple. the array has 5 spots, so it returns the value of 5. @array = [1, 2, 3, 4, 5] return @array[5] #returns fi-... wait, returns nil! Okay... can anyone tell me why when we tried to call the '[5]'th spot in the array we got nil? No? Well, here's why. An array always starts counting at 0. So, although our arrray has 5 spots, the spots are number 0 through 4. A little hard to grasp at first, but just think of a number line. 0 is a number, and the most important one. So, in that previous example, to get the last number called, we'd use the number 4, not 5 in the brackets. All of this may seem superfluous at first, but let's try something more real-scripted. Like a 'for' statement (from lesson2.2) @array = [1, 2, 3, 4, 5] for i in 0...@array.size @array[i] += 1 end p @array # Returns [2, 3, 4, 5, 6] Now, the for statement, iin more detail works like this: for - starts the loop i - will be the number of times it goes through. 0 - the number 'i' starts at. ...@array.size - will go through however long the array is. then, you can do whatever you want to the array by using @array. It will do it to EVERY item in the array. For more information, check the RPG Maker help file under 'Array'. If you have more questions, please, ask. For now, let's move to Hash. Hash is a fun key word. A personal favorite. It will make any one thing another. First, you set it up using curly brackets rather than square ones {} <- those ones, right there. It is defined as @hash = {key => definition} Now, another difference is every item leads to another, using the symbol: => Let me show you: @hash = { 1 => 'one'} This basically means in the hash, whenever you call up @hash[1], you will get the word 'one'. You are probably asking 'what the hell. why use this?' Well, let's say you are building a mission script, and each mission has an id. you would use a hash to take the id, and identify different parts. so, let's say 1 is Missing Cat. You would have an array of all the names of the missions and the first one (number 0) would be missing cat. Now, in your selectable window, you have the names, and the cursor is on that first one. How would you get the data for the second window to tell about the mission? Use a hash. In the script, use the index of what it is on, call up the hash, and have that information with the same tag appear in the second window. Complex? yes. So here is an example: @array = ["Missing Cat", "Lost Sword"] @hash = {"Missing Cat" => "A little girl's cat has gone missing, and you must find it.", "Lost Sword" => "An old soldier lost his prized sword. You need to find it for him."} [Curosr is set to the mission that says missing cat in one window, once you code your scene, you can have the cursor call up the information for the Missing Cat in another window using this.] I know, extremely complex, but you'll get it. Now, all the fun stuff you can do with a hash? .has_key?(x) .keys These two are the most common. .has_key?(x) asks if the hash has the key 'x'; x meaning anything from a string to a number. Then, .keys just calls up an array of all the keys. For more methods for hashes, look in the instruction manual under 'Hash'. The final thing we will cover today is modules. A module is nothing more than a scripted database, and this will be VERY easy to explain. You put a method OUTSIDE of classes. These actually stand alone in code. To show you an example, it is like this: module Example #you always define a module with the keyword module. Then give it a name. #Insert your variables, arrays, hashes end This is basically a place to store information. The point? Great for custom systems. Now, with this, you store everything as Constant variables. Then, to call them, you use: Module_Name::Variable_Name Yes, you use two colons. Now, for the best example on how to use a module, array, and hash, I am going to redirect you all to my first script, Mission/Quest Script. It has all the elements we have discussed this far. If you cannot understand or read part of the script, I recommend re-reading the tutorial that covers it, and if you cannot get it then; ASK ME. Now, until then, Take care. (I'll also post another tutorial as soon as i know people have READ and UNDERSTOOD this one.)
  23. Leon

    Enrollment

    Arrays and Hashes? I thought i did one on those... hmm... **EDIT Apparently Not... damn... thought i did. Well, that is a very important part, arrays and hashes. Very good for storing info, especially in modules. I'll cover that at the same time.
  24. Simple, you select a fog, the speed it moves, its opacity, and let it get triggered. Just tinker with it, best way to learn.
  25. okay, here is a basic one: code #=============================================================================== # * Genji Equipment by Leon_Westbrooke #------------------------------------------------------------------------------- # Instructions: # Place script above 'Main' and below the other default scripts. # Where it says 'Genji_Weapons', inside the array, put every id of the weapons # that will be affected by gold [1, 2..etc] # Where it says Genji_Armors, specify by using: id => 'type',..etc like this: # 1 => 'pdef', 2 => 'mdef',...etc # # The Atk_Percent, PDef_Percent, MDef_Percent, and Eva_Percent regulate how # much the gold affects it. 1.0 = for every 1 gold, 1 point is added, so if # you want ten percent, you put in the value: 0.1. Change these as needed. # # #=============================================================================== module Genji #----------------------------------------------------------------------------- # Genji_Weapons = (id => 'atk' #----------------------------------------------------------------------------- Genji_Weapons = [1] #----------------------------------------------------------------------------- # Genji_Armors = (id => stat} # stat = 'pdef'. 'mdef', 'eva' #----------------------------------------------------------------------------- Genji_Armors = {1 => 'pdef'} Atk_Percent = 1.0 PDef_Percent = 1.0 MDef_Percent = 1.0 Eva_Percent = 1.0 end class Game_Actor alias leon_genji_ga_batk base_atk alias leon_genji_ga_bpdef base_pdef alias leon_genji_ga_bmdef base_mdef alias leon_genji_ga_beva base_eva def base_atk n = leon_genji_ga_batk if Genji::Genji_Weapons.include?(weapon_id) n += ($game_party.gold * Genji::Atk_Percent) end return n end def base_pdef n = leon_genji_ga_bpdef gj = Genji if gj::Genji_Armors[@armor1_id] != nil and gj::Genji_Armors[@armor1_id] == 'pdef' n += ($game_party.gold * Genji::PDef_Percent) end if gj::Genji_Armors[@armor2_id] != nil and gj::Genji_Armors[@armor1_id] == 'pdef' n += ($game_party.gold * Genji::PDef_Percent) end if gj::Genji_Armors[@armor3_id] != nil and gj::Genji_Armors[@armor1_id] == 'pdef' n += ($game_party.gold * Genji::PDef_Percent) end if gj::Genji_Armors[@armor4_id] != nil and gj::Genji_Armors[@armor1_id] == 'pdef' n += ($game_party.gold * Genji::PDef_Percent) end return n end def base_mdef n = leon_genji_ga_bmdef gj = Genji if gj::Genji_Armors[@armor1_id] != nil and gj::Genji_Armors[@armor1_id] == 'mdef' n += ($game_party.gold * Genji::MDef_Percent) end if gj::Genji_Armors[@armor2_id] != nil and gj::Genji_Armors[@armor1_id] == 'mdef' n += ($game_party.gold * Genji::MDef_Percent) end if gj::Genji_Armors[@armor3_id] != nil and gj::Genji_Armors[@armor1_id] == 'mdef' n += ($game_party.gold * Genji::MDef_Percent) end if gj::Genji_Armors[@armor4_id] != nil and gj::Genji_Armors[@armor1_id] == 'mdef' n += ($game_party.gold * Genji::MDef_Percent) end return n end def base_eva n = leon_genji_ga_beva gj = Genji if gj::Genji_Armors[@armor1_id] != nil and gj::Genji_Armors[@armor1_id] == 'eva' n += ($game_party.gold * Genji::Eva_Percent) end if gj::Genji_Armors[@armor2_id] != nil and gj::Genji_Armors[@armor1_id] == 'eva' n += ($game_party.gold * Genji::Eva_Percent) end if gj::Genji_Armors[@armor3_id] != nil and gj::Genji_Armors[@armor1_id] == 'eva' n += ($game_party.gold * Genji::Eva_Percent) end if gj::Genji_Armors[@armor4_id] != nil and gj::Genji_Armors[@armor1_id] == 'eva' n += ($game_party.gold * Genji::Eva_Percent) end return n end end Now, making multiple sets, that gets complicated, but do-able. This right here is what you first asked for. If i am feeling well enough to do the other later, I will. Until then, later.
×
×
  • Create New...