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

Descendant of Orr

Member
  • Content Count

    34
  • Joined

  • Last visited

About Descendant of Orr

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location
    US
  • Interests
    Video Games/Music/Programming

Engines

  • Prefered Engine
    RPG Maker VX Ace
  • Engine Level
    Expert
  • Class Title
    Programmer / Scripter
  • Other Skills
    Mapper, Eventer, Writer
  • Project(s)
    Young Tyria
  1. I agree with kellessdee, not a big fan of the SDK. Also, I will jump in and help if you are still having issues after trying kellessdee's code. I do have a request though: could you please use the code tags from now on when inserting code into a thread. It makes it easier to read online, and after copying and pasting into RMXP!
  2. I agree with Polraudio! Much nicer than the default!
  3. I was accepted into GAs ACCEL program, so I went to college my senior year instead of high school. It is, to this day, one of my biggest regrets. Enjoy your time there while it lasts, man. Oh, and welcome to the forums!
  4. This may be a month late, but yes - you are correct. Subclass < Class < Superclass shows proper inheritance
  5. Here is version 1.1. It grays out all pieces of equipment that do not have their requirements met. It also fixes a bug that would have been inadvertently caused by Accessories using the same IDs as Armors (since I thought they were different for some reason -.-) Please report all bugs:
  6. See if this works for you. Just make sure you fill the arrays to completion for each armor, weapon, accessory you have. If you have any issues, please let me know. NOTE: All numbers are random except for the first one, which should be left as one, or lower. #=============================================================================== # Equipment Level Requirements # By Descendant of Orr # Version 1.0 #------------------------------------------------------------------------------- # This script adds the ability to give weapons, armors. and accessories a level # requirement. It rewrites Scene_Equip's update_item method. If another script # you use calls this method, there may be compatibility issues. #------------------------------------------------------------------------------- # This script is free to publish, repurpose, reuse, and change, but please give # credit when due #------------------------------------------------------------------------------- # Begin Scene_Equip #------------------------------------------------------------------------------- class Scene_Equip #----------------------------------------------------------------------------- #FINAL VARIABLES # Requirements for weapons/armors/accessories #----------------------------------------------------------------------------- WEAPON_REQ = [ 1, # LEVEL REQUIREMENT TO UNEQUIP - LEAVE AS IS 10, # LEVEL REQUIREMENT FOR WEAPON ID 1 5, # LEVEL REQUIREMENT FOR WEAPON ID 2 6, # LEVEL REQUIREMENT FOR WEAPON ID 3 5 # ETC ] ARMOR_REQ = [ 1, # LEVEL REQUIREMENT TO UNEQUIP - LEAVE AS IS 1, # LEVEL REQUIREMENT FOR ARMOR ID 1 5, # LEVEL REQUIREMENT FOR ARMOR ID 2 6, # LEVEL REQUIREMENT FOR ARMOR ID 3 5 # ETC ] ACC_REQ = [ 1, # LEVEL REQUIREMENT TO UNEQUIP - LEAVE AS IS 3, # ETC 7, 6, 9 ] #--------------------------------------------------------------------------- # Scene_Equip.update_item #--------------------------------------------------------------------------- # As update_item from the default scene equip, except compares selected # actors level to the requirements set in the variables above #--------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 return end # If C button was pressed if Input.trigger?(Input::C) # Get currently selected data on the item window item = @item_window.item # Compares actor level to requirement returned by get_req if @actor.level < get_req(@right_window.index, item == nil ? 0 : item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play equip SE $game_system.se_play($data_system.equip_se) # Change equipment @actor.equip(@right_window.index, item == nil ? 0 : item.id) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 # Remake right window and item window contents @right_window.refresh @item_window.refresh return end #--------------------------------------------------------------------------- # get_req(equipment_type, equipment_id #--------------------------------------------------------------------------- # Returns level requirement from given id's respective array #--------------------------------------------------------------------------- def get_req(equip_type, id) case equip_type when 0 # Weapon if id == 0 or $game_party.weapon_number(id) > 0 return (WEAPON_REQ[id] == nil) ? 1 : WEAPON_REQ[id] end when 1 # Shield if id == 0 or $game_party.armor_number(id) > 0 return (ARMOR_REQ[id] == nil) ? 1 : ARMOR_REQ[id] end when 2 # Head if id == 0 or $game_party.armor_number(id) > 0 return (ARMOR_REQ[id] == nil) ? 1 : ARMOR_REQ[id] end when 3 # Body if id == 0 or $game_party.armor_number(id) > 0 return (ARMOR_REQ[id] == nil) ? 1 : ARMOR_REQ[id] end when 4 # Accessory if id == 0 or $game_party.armor_number(id) > 0 return (ACC_REQ[id] == nil) ? 1 : ACC_REQ[id] end end end end end #------------------------------------------------------------------------------- # End Scene_Equip #------------------------------------------------------------------------------- EDIT: I changed the code so that if you do not define a level requirement for any given piece of equipment, instead of receiving ARRAY_INDEX_OUT_OF_BOUNDS, the script assumes a level requirement of 1
  7. Ok, so - I have a couple of questions about what you need. 1) Will you earn 1 TP after EVERY BATTLE in the game? Will some battle award none, will bosses award more? 2) Is TP a party wide shared currency, like gold? If your answers to 1a and 2 are yes then the following should work for you: class Window_BattleResult TP = 1 alias battleRefresh refresh def refresh battleRefresh x = contents.text_size(@exp.to_s + "EXP" + @gold.to_s + $data_system.words.gold).width + 44 self.contents.font.color = normal_color cx = contents.text_size(TP.to_s).width self.contents.draw_text(x, 0, cx, 32, TP.to_s) x += cx + 4 self.contents.font.color = system_color cx = contents.text_size("TP").width self.contents.draw_text(x, 0, cx, 32, "TP") $game_variables[1] += 1 end end class Window_Steps < Window_Base def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 44, 32, "TP") self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_variables[1].to_s, 2) end end Just note that this is code would not fall under best program practices...it would be more like fewest lines possible. I would not recommend overwriting Windows_Steps if you are changing its purpose, I would simply create a new class. I also would not put any calculation in the Window class like I did. However, not knowing what battle system you are using, and if you are using a custom menu system or not, I did not want to inadvertently hose both of those! Also, I will look at the script you linked and get back to you!
  8. Yes - I love everything about Win7. I have been using it since its RTM version. I am a system administrator, and dislike all of our WinXP system now. Easier to use, higher security, prettier XD Homegroups are a plus as well
  9. Sorry for double post, but yeah, what kellessdee said too!
  10. That's exactly what it is!!! My initialize never gets called because my script is above the Caterpillar one! I alias Spriteset_Map's intialize, but then mine doesn't get called so @light_effects is never created. Because of that there is no each (for the effects) on line 71 for the nil class @light_effects(because it doesn't exist).
  11. That's the reason I asked you to open the script editor and tell me what Script it was on after the error. That will tell you if it is my script causing the error or not. This is a standalone script that doesn't overwrite any default class. Unless you have another script that completely reworks Spriteset_Map, I doubt it is a compatibility issue! Also, yeah - I should have probably put SIZE, BRIGHTNESS, etc. as parts of my Light object class...don't know what I was thinking :)
  12. By all means, play with it, change it, use it, I don't care. Tenoukii, would you be willing to put this script in a brand new game and see if it works? If it doesn't, could you package that game, unencrypted, and send it to me?
  13. It makes it seem like @light_effects isn't defined in your instance of the script, which is strange. Try this new version. It flickers automatically (contracts/expands). I need to work on the speed/amount, and add it to commenting as well. I need to re-comment some other parts, and the coding is sloppy, but I'm still at work...I should probably get some work done ;D EDIT: Changed the expand rate and iterations to make it smoother. Play around with the numbers to find what you like best
  14. Line 71 doesn't have any methods in it...Can you attempt to run the game again, and then when it fails open up the script editor - then tell me what line it stopped on and of what script. See, I learn something I didn't know. I have always included file extensions in my scripts. I will attempt an expanding/contracting effect and see how it looks. And I don't mind you dissecting my code at all! Feel free to do so whenever!
×
×
  • Create New...