Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Equipaments On Screen, My Second Script^^
Rafidelis
post Sep 30 2008, 06:32 AM
Post #1


Level 5
Group Icon

Group: Member
Posts: 71
Type: Scripter
RM Skill: Beginner




Equipment on Screen
By : Rafidelis By: Rafidelis [/b]


[b]About the script:


This script shows their equipment on the screen, you can choose between using and not using an image of substance.
The 3 types available for use, you must TYPE in the mo0dificar variable, you must use from 1 to 3 (see the pictures and to learn how each type)






Features:


You can show the 5 equipment (gun, shield, helmet, armor and accessories) to show some and not so follow the instructions in the Script
You may or may not use images if you want you can use one of the 3 images below, or create your custom.
And remembering that already own script turns the image if you choose the type 2 ^ ^

ScreenShots


TYPE 1



TYPE 2



TYPE 3


CODE
module Rafidelis_Equipamentos  
#==============================================================================|
#                        S T A R T   O F  C O N F I G U R A T I O N S                   |                          
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|


# Leave at True to show the icon Equipment | False not to Show |
    MOSTRAR_ARMA = true
# Leave at True to show the icon of the Shield | False not to Show |
    MOSTRAR_ESCUDO = true
# Leave at True to show the icon of the helmet | False not to Show |
    MOSTRAR_ELMO = true
# Leave at True to show the icon of Armor | False not to Show |
    MOSTRAR_ARMADURA = true
# Usar Imagem de fundo?
  # Leave at True to show the icon of Acessories| False not to Show |
    MOSTRAR_ACESSORIO = true
# Opacity of Windows that will show the icons of Equipment
    OPACIDADE = 0
# Use background image?
    USAR_IMG = true
# If above is true, what is the name of the image being used?
    IMG_NOME = "Equip2"
    
#==============================================================================|
#                     D I S P L A Y  T Y P E                |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
# 1 to display the icons horizontally on top of the SCREEN |
#------------------------------------------------- -----------------------------|
# 2 To view the icons at the left corner of VERTICAL SCREEN |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
# 3 To view the icons horizontally in the bottom of the SCREEN |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
# IF YOU ARE NOT USING A number 1 or 2 or 3 The script will generate an error
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
    TIPO = 2                                
  end  
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|  

class Rafidelis_Equip_Window < Window_Base  
  def initialize(x,y,n)    
    @n = n  
    @x = x
    @y = y
    super(x,y,56,56)    
    refresh
  end
end
#==============================================================================|
#                             R E F R E S H
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
def refresh
  self.contents.clear
  @actor = $game_party.members[0]
  draw_item_name(@actor.equips[@n], 0, 0)
end
#==============================================================================|
#            S T A R T    O F   C L A S S    S C E N E   M A P              |
#------------------------------------------------------------------------------|

class Scene_Map
  include Rafidelis_Equipamentos        
  alias rafidelis_start start
  alias rafidelis_terminate terminate
  alias rafidelis_update update
  
  def start
#-------------------------------------------------------------------------------
   @Window_Equip = nil
    if TIPO == 1      
      @Window_Equip = Rafidelis_Equip_Window.new(0,0,0)
    elsif TIPO == 2      
      @Window_Equip = Rafidelis_Equip_Window.new(0,0,0)
    elsif TIPO == 3    
      @Window_Equip = Rafidelis_Equip_Window.new(0,360,0)    
    end
    if MOSTRAR_ARMA == true
      @Window_Equip.visible = true
    else
      @Window_Equip.visible = false
    end
     @Window_Equip.opacity = OPACIDADE
#-------------------------------------------------------------------------------
    @Window_Equip2 = nil
    if TIPO == 1      
      @Window_Equip2 = Rafidelis_Equip_Window.new(56,0,1)
    elsif TIPO == 2      
      @Window_Equip2 = Rafidelis_Equip_Window.new(0,56,1)
      elsif TIPO == 3    
      @Window_Equip2 = Rafidelis_Equip_Window.new(56,360,1)  
    end
    if MOSTRAR_ESCUDO == true
      @Window_Equip2.visible = true
    else
      @Window_Equip2.visible = false
    end
    @Window_Equip2.opacity = OPACIDADE
#-------------------------------------------------------------------------------
    @Window_Equip3 = nil
    if TIPO == 1      
      @Window_Equip3 = Rafidelis_Equip_Window.new(56*2,0,2)
    elsif TIPO == 2      
      @Window_Equip3 = Rafidelis_Equip_Window.new(0,56*2,2)
      elsif TIPO == 3    
      @Window_Equip3 = Rafidelis_Equip_Window.new(56*2,360,2)  
    end      
    if MOSTRAR_ELMO == true
      @Window_Equip3.visible = true
    else
      @Window_Equip3.visible = false
    end
    @Window_Equip3.opacity = OPACIDADE
#-------------------------------------------------------------------------------
    @Window_Equip4 = nil
    if TIPO == 1      
      @Window_Equip4 = Rafidelis_Equip_Window.new(56*3,0,3)
    elsif TIPO == 2      
      @Window_Equip4 = Rafidelis_Equip_Window.new(0,56*3,3)
      elsif TIPO == 3    
      @Window_Equip4 = Rafidelis_Equip_Window.new(56*3,360,3)  
    end    
    if MOSTRAR_ARMADURA == true
      @Window_Equip4.visible = true
    else
      @Window_Equip4.visible = false
    end
    @Window_Equip4.opacity = OPACIDADE
#-------------------------------------------------------------------------------
    @Window_Equip5 = nil    
    if TIPO == 1      
      @Window_Equip5 = Rafidelis_Equip_Window.new(56*4,0,4)
    elsif TIPO == 2      
      @Window_Equip5 = Rafidelis_Equip_Window.new(0,56*4,4)
      elsif TIPO == 3    
      @Window_Equip5 = Rafidelis_Equip_Window.new(56*4,360,4)  
    end    
    if MOSTRAR_ACESSORIO == true
      @Window_Equip5.visible = true
    else
      @Window_Equip5.visible = false
    end
    @Window_Equip5.opacity = OPACIDADE
    if USAR_IMG
      if TIPO == 1
        @bg = Sprite.new
        @bg.bitmap = Cache.picture(IMG_NOME)
        @bg.x = 1
        @bg.y = 1        
        end                
      end
      if TIPO == 2
        @bg = Sprite.new
        @bg.bitmap = Cache.picture(IMG_NOME)
        @bg.x = 54
        @bg.y = 1
        @bg.angle = 270.5
      end
      if TIPO == 3
        @bg = Sprite.new
        @bg.bitmap = Cache.picture(IMG_NOME)
        @bg.x = 3
        @bg.y = 360  
    end
#-------------------------------------------------------------------------------
    rafidelis_start
  end
  
  def terminate
    @Window_Equip.dispose
    @Window_Equip2.dispose
    @Window_Equip3.dispose
    @Window_Equip4.dispose
    @Window_Equip5.dispose
    rafidelis_terminate
  end
  
    def update
    @Window_Equip.update
    @Window_Equip2.update
    @Window_Equip3.update
    @Window_Equip4.update
    @Window_Equip5.update
    rafidelis_update
  end
end
#=================================================================
# www.ReinoRpg.com
#=================================================================



Credits:

www.ReinoRpg.com
Brazilian site where I "create" in rpgMaker ^ ^


__________________________
Nothing Special Today!
Go to the top of the page
 
+Quote Post
   
Ken Shiro X
post Sep 30 2008, 07:22 AM
Post #2


Level 3
Group Icon

Group: Member
Posts: 36
Type: None
RM Skill: Skilled




I got this error : * Unable to find grafic *equip2*
Go to the top of the page
 
+Quote Post
   
Inigma
post Sep 30 2008, 09:02 AM
Post #3


Level 1
Group Icon

Group: Member
Posts: 12
Type: Event Designer
RM Skill: Skilled




Save the 3 images at the top of the post into your Graphics/Pictures folder then try.

Great Script Looks nice, easy to customize and use. Well Done. =]


__________________________
Go to the top of the page
 
+Quote Post
   
Rafidelis
post Oct 1 2008, 12:53 PM
Post #4


Level 5
Group Icon

Group: Member
Posts: 71
Type: Scripter
RM Skill: Beginner




Thanks for helping friend ^ ^
And as he said is so you save some of the 3 images in the picture above, then you go on that line and renames the file (name it puts you saved one of the images of the above)

# Use background image?
USAR_IMG = true
# If above is true, what is the name of the image being used?
IMG_NOME = "Equip2"


__________________________
Nothing Special Today!
Go to the top of the page
 
+Quote Post
   
Omegha
post Feb 14 2009, 05:14 AM
Post #5


Level 6
Group Icon

Group: Member
Posts: 85
Type: None
RM Skill: Undisclosed




Is it possible to hide image during a battle?


__________________________
Huh?
Go to the top of the page
 
+Quote Post
   
SojaBird
post Feb 14 2009, 05:43 AM
Post #6


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Hey,

Very nice done smile.gif
Love picture scripts wink.gif


Greatzz,
SojaBird.


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd May 2013 - 11:33 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker