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
> Enable Single Icon Usage, use a single icon graphic instead of using the iconset
snstar2006
post Mar 6 2008, 01:56 PM
Post #1


Level 3
Group Icon

Group: Member
Posts: 34
Type: Scripter
RM Skill: Skilled




CODE
class Window_Base
  def draw_icon2(icon_file, x, y, enabled = true)
    bitmap = Cache.load_bitmap("Graphics/Icons/", icon_file)
    rect = Rect.new(0, 0, 24, 24)
    self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  end
  
  def draw_item_name(item, x, y, enabled = true)
    if item != nil
      if item.get_icon
        draw_icon2(item.get_icon.to_s, x, y, enabled)
      else
        draw_icon(item.icon_index, x, y, enabled)
      end
      self.contents.font.color = normal_color
      self.contents.font.color.alpha = enabled ? 255 : 128
      self.contents.draw_text(x + 24, y, 172, WLH, item.name)
    end
  end
end

module Item
  ICON = /<ICON*(.*)>/i
end

class RPG::BaseItem
  def get_icon
    self.note.split(/[\r\n]+/).each { |line|
      if line =~ Item::ICON
        a = line.split(/ /)[1]
        d = ""
        while ((c = a.slice!(/./m)) != nil)
          d += c if c != ">"
        end
        return d
      end
    }
    return nil
  end
end


in the meno of skill, item, armor or weapon, write:

<ICON filename>

create a new folder and call it "Icons"
put the icon files in the folder

if nothing is written in the memo, then the original icon set from the iconset is used
Go to the top of the page
 
+Quote Post
   
ERZENGEL
post Mar 7 2008, 08:54 AM
Post #2


Level 8
Group Icon

Group: Revolutionary
Posts: 127
Type: None
RM Skill: Undisclosed




Wooow! I can't code such a script and I don't know why this wasn't answered. Maybe this is useful for someone but not for me at the moment. Very good work.
Go to the top of the page
 
+Quote Post
   
woratana
post Mar 7 2008, 02:08 PM
Post #3


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




Sweet! >_</

I always have a problem when counting Icon Index tongue.gif This will help a lot smile.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
Hisakata
post Jul 16 2008, 03:50 PM
Post #4


Level 1
Group Icon

Group: Member
Posts: 12
Type: Artist
RM Skill: Beginner




Ok, since I'm a newb at this....can you tell me what you mean by writing <ICON filename> in the meno - or where the nemo is located

thank you
Go to the top of the page
 
+Quote Post
   
Netto
post Jul 16 2008, 03:57 PM
Post #5


芸術家
Group Icon

Group: Revolutionary
Posts: 708
Type: None
RM Skill: Skilled




QUOTE (Hisakata @ Jul 16 2008, 04:12 PM) *
Ok, since I'm a newb at this....can you tell me what you mean by writing <ICON filename> in the meno - or where the nemo is located

thank you

I think he means the notes section in the database when you click on an item/armor/weapon.


__________________________
Current Project[RC]: Twilight Realm 3DMMORPG w/dx9, and char creation through mysql after I get a server, now C++ scripting
Current Project[VX]: Obsidian Trilogy just started 08/12/2008
Current Project[XP&RM2K3]: none
Go to the top of the page
 
+Quote Post
   
Hisakata
post Jul 16 2008, 05:06 PM
Post #6


Level 1
Group Icon

Group: Member
Posts: 12
Type: Artist
RM Skill: Beginner




QUOTE (Netto @ Jul 16 2008, 04:19 PM) *
QUOTE (Hisakata @ Jul 16 2008, 04:12 PM) *
Ok, since I'm a newb at this....can you tell me what you mean by writing <ICON filename> in the meno - or where the nemo is located

thank you

I think he means the notes section in the database when you click on an item/armor/weapon.



Thank you, That helped
Go to the top of the page
 
+Quote Post
   
dark-kaineru
post Jul 17 2008, 02:00 AM
Post #7


Level 3
Group Icon

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




This plus SRC weapon Icons is equal to.... HEHEHEHEHEHEHEHE


__________________________



My pet... he's no prinny though.
Go to the top of the page
 
+Quote Post
   
RoxasXIII
post Jul 19 2008, 09:55 PM
Post #8


No. XIII
Group Icon

Group: Revolutionary
Posts: 281
Type: None
RM Skill: Advanced




Wow...I've wanted this since I was a newb...Don't mind my un-enthusiastic attitude... Wooo Hooo!!! Yay! Im gonna virtually party!!!
I'm probably gonna get warn for this, but o well...


__________________________
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: 25th May 2013 - 09:53 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker