For example, Say i need to pick up a flashlight item, i want it to display the icon as the event graphic.
Btw i want something easier then this script : http://forums.rpgmakerweb.com/index.php?/topic/5866-icon-event-graphics/
EDIT : How do you make a charsheet with icons?
I need a simple script that will display icons for events.
● ARCHIVED · READ-ONLY
-
-
You want the event graphic to be the icon? Why don't you just create a characterset full of the icons that you want to use?
-
You want the event graphic to be the icon? Why don't you just create a characterset full of the icons that you want to use?
Where should i start doing this? -
1. Open up either Gimp or Photoshop (or any other image editor in that style; it depends on which one you're comfortable with or happen to be able to use)
2. Open your iconset
3. Open/start a character sheet (personally, I'd use !Other3 as a base unless you don't need that many)
Also, another good tip to remember is that iconsets and character sheets have two different sizes (icons are 24 pixels in size whereas character sheets are based around a 32 pixel size)
4. Start copying the icons you need over to the character sheet (and make sure to move them to the right spots; since they're icons none of them should need their own sheet, just remember to check the "Direction Fix" box in the event so it stays as the icon you want)
I hope that's helpful... It's the only way I can think of going about it. -
Create a comment in a event page and put this:
ICON:148
(change 148 with the id of the icon that you want to use)
# Icon_Character# - by 허걱## 케릭터의 그림을 아이콘으로 표시해주는 스크립트 입니다.## Main 섹션 위쪽에 스크립트를 복사한 후# 이벤트의 주석으로 ICON:n 을 적어주면# n번 아이콘으로 설정됩니다.## 이벤트의 이동경로의 설정에서 '이 이벤트'로 정하고# 스크립트를 선택해서 @icon_id = n 을 적을경우# 이벤트 진행 도중 n번 아이콘으로 변경할 수 있습니다.#==============================================================================# ■ Game_CharacterBase#==============================================================================class Game_CharacterBase #-------------------------------------------------------------------------- # ● 공개 인스턴스 변수 #-------------------------------------------------------------------------- attr_reader :icon_id #-------------------------------------------------------------------------- # ● 공개 멤버변수 초기화 #-------------------------------------------------------------------------- alias icon_chara_init_public_members init_public_members def init_public_members @icon_id = 0 icon_chara_init_public_members end #-------------------------------------------------------------------------- # ● 오브젝트 케릭터 판정 #-------------------------------------------------------------------------- alias icon_chara_object_character? object_character? def object_character? @icon_id > 0 || icon_chara_object_character? end #-------------------------------------------------------------------------- # ● 그래픽 변경 #-------------------------------------------------------------------------- alias icon_chara_set_graphic set_graphic def set_graphic(character_name, character_index) @icon_id = 0 icon_chara_set_graphic(character_name, character_index) endend#==============================================================================# ■ Game_Event#==============================================================================class Game_Event < Game_Character #-------------------------------------------------------------------------- # ● 이벤트 페이지의 설정을 초기화 #-------------------------------------------------------------------------- alias icon_chara_clear_page_settings clear_page_settings def clear_page_settings @icon_id = 0 icon_chara_clear_page_settings end #-------------------------------------------------------------------------- # ● 이벤트 페이지 설정 #-------------------------------------------------------------------------- alias icon_chara_setup_page_settings setup_page_settings def setup_page_settings @icon_id = 0 icon_chara_setup_page_settings setup_icon_page_settings end #-------------------------------------------------------------------------- # ● 이벤트 페이지의 아이콘 설정 #-------------------------------------------------------------------------- def setup_icon_page_settings @list.each {|item| if item.code == 108 or item.code == 408 @icon_id = $1.to_i if item.parameters[0] =~ /ICON:(\d+)/i end } endend#==============================================================================# ■ Sprite_Character#==============================================================================class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 그래픽 갱신 #-------------------------------------------------------------------------- def update_bitmap if graphic_changed? @icon_id = @character.icon_id @tile_id = @character.tile_id @character_name = @character.character_name @character_index = @character.character_index if @icon_id > 0 set_icon_bitmap elsif @tile_id > 0 set_tile_bitmap else set_character_bitmap end end end #-------------------------------------------------------------------------- # ● 그래픽 변경 판정 #-------------------------------------------------------------------------- def graphic_changed? @icon_id != @character.icon_id || @tile_id != @character.tile_id || @character_name != @character.character_name || @character_index != @character.character_index end #-------------------------------------------------------------------------- # ● 아이콘 그래픽 설정 #-------------------------------------------------------------------------- def set_icon_bitmap self.bitmap = Cache.system("Iconset") self.src_rect.set(@icon_id % 16 * 24, @icon_id / 16 * 24, 24, 24) self.ox = 12 self.oy = 24 end #-------------------------------------------------------------------------- # ● 그래픽 표시부분 (RECT) 설정 #-------------------------------------------------------------------------- alias icon_chara_update_src_rect update_src_rect def update_src_rect icon_chara_update_src_rect if @icon_id == 0 endend# presented by 허걱 -
Can someone please fix this code?Create a comment in a event page and put this:
ICON:148
(change 148 with the id of the icon that you want to use)
# Icon_Character# - by 허걱## 케릭터의 그림을 아이콘으로 표시해주는 스크립트 입니다.## Main 섹션 위쪽에 스크립트를 복사한 후# 이벤트의 주석으로 ICON:n 을 적어주면# n번 아이콘으로 설정됩니다.## 이벤트의 이동경로의 설정에서 '이 이벤트'로 정하고# 스크립트를 선택해서 @icon_id = n 을 적을경우# 이벤트 진행 도중 n번 아이콘으로 변경할 수 있습니다.#==============================================================================# ■ Game_CharacterBase#==============================================================================class Game_CharacterBase #-------------------------------------------------------------------------- # ● 공개 인스턴스 변수 #-------------------------------------------------------------------------- attr_reader :icon_id #-------------------------------------------------------------------------- # ● 공개 멤버변수 초기화 #-------------------------------------------------------------------------- alias icon_chara_init_public_members init_public_members def init_public_members @icon_id = 0 icon_chara_init_public_members end #-------------------------------------------------------------------------- # ● 오브젝트 케릭터 판정 #-------------------------------------------------------------------------- alias icon_chara_object_character? object_character? def object_character? @icon_id > 0 || icon_chara_object_character? end #-------------------------------------------------------------------------- # ● 그래픽 변경 #-------------------------------------------------------------------------- alias icon_chara_set_graphic set_graphic def set_graphic(character_name, character_index) @icon_id = 0 icon_chara_set_graphic(character_name, character_index) endend#==============================================================================# ■ Game_Event#==============================================================================class Game_Event < Game_Character #-------------------------------------------------------------------------- # ● 이벤트 페이지의 설정을 초기화 #-------------------------------------------------------------------------- alias icon_chara_clear_page_settings clear_page_settings def clear_page_settings @icon_id = 0 icon_chara_clear_page_settings end #-------------------------------------------------------------------------- # ● 이벤트 페이지 설정 #-------------------------------------------------------------------------- alias icon_chara_setup_page_settings setup_page_settings def setup_page_settings @icon_id = 0 icon_chara_setup_page_settings setup_icon_page_settings end #-------------------------------------------------------------------------- # ● 이벤트 페이지의 아이콘 설정 #-------------------------------------------------------------------------- def setup_icon_page_settings @list.each {|item| if item.code == 108 or item.code == 408 @icon_id = $1.to_i if item.parameters[0] =~ /ICON:(\d+)/i end } endend#==============================================================================# ■ Sprite_Character#==============================================================================class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 그래픽 갱신 #-------------------------------------------------------------------------- def update_bitmap if graphic_changed? @icon_id = @character.icon_id @tile_id = @character.tile_id @character_name = @character.character_name @character_index = @character.character_index if @icon_id > 0 set_icon_bitmap elsif @tile_id > 0 set_tile_bitmap else set_character_bitmap end end end #-------------------------------------------------------------------------- # ● 그래픽 변경 판정 #-------------------------------------------------------------------------- def graphic_changed? @icon_id != @character.icon_id || @tile_id != @character.tile_id || @character_name != @character.character_name || @character_index != @character.character_index end #-------------------------------------------------------------------------- # ● 아이콘 그래픽 설정 #-------------------------------------------------------------------------- def set_icon_bitmap self.bitmap = Cache.system("Iconset") self.src_rect.set(@icon_id % 16 * 24, @icon_id / 16 * 24, 24, 24) self.ox = 12 self.oy = 24 end #-------------------------------------------------------------------------- # ● 그래픽 표시부분 (RECT) 설정 #-------------------------------------------------------------------------- alias icon_chara_update_src_rect update_src_rect def update_src_rect icon_chara_update_src_rect if @icon_id == 0 endend# presented by 허걱 -
fix this code?Ruby:
# Icon_Character # - by 허걱 / gasp # # 케릭터의 그림을 아이콘으로 표시해주는 스크립트 입니다. # This is a script that displays a character's picture as an icon. # # Main 섹션 위쪽에 스크립트를 복사한 후 # 이벤트의 주석으로 ICON:n 을 적어주면 # n번 아이콘으로 설정됩니다. # After copying the script above the Main section # If you write ICON:n as an event comment # Set to the nth icon. # # 이벤트의 이동경로의 설정에서 '이 이벤트'로 정하고 # 스크립트를 선택해서 @icon_id = n 을 적을경우 # 이벤트 진행 도중 n번 아이콘으로 변경할 수 있습니다. # Set as 'this event' in the event movement path settings # When selecting a script and writing @icon_id = n # You can change to icon n during the event. #============================================================================== # ■ Game_CharacterBase #============================================================================== class Game_CharacterBase #-------------------------------------------------------------------------- # ● 공개 인스턴스 변수 #-------------------------------------------------------------------------- attr_reader :icon_id #-------------------------------------------------------------------------- # ● 공개 멤버변수 초기화 #-------------------------------------------------------------------------- alias icon_chara_init_public_members init_public_members def init_public_members @icon_id = 0 icon_chara_init_public_members end #-------------------------------------------------------------------------- # ● 오브젝트 케릭터 판정 #-------------------------------------------------------------------------- alias icon_chara_object_character? object_character? def object_character? @icon_id > 0 || icon_chara_object_character? end #-------------------------------------------------------------------------- # ● 그래픽 변경 #-------------------------------------------------------------------------- alias icon_chara_set_graphic set_graphic def set_graphic(character_name, character_index) @icon_id = 0 icon_chara_set_graphic(character_name, character_index) end end #============================================================================== # ■ Game_Event #============================================================================== class Game_Event < Game_Character #-------------------------------------------------------------------------- # ● 이벤트 페이지의 설정을 초기화 #-------------------------------------------------------------------------- alias icon_chara_clear_page_settings clear_page_settings def clear_page_settings @icon_id = 0 icon_chara_clear_page_settings end #-------------------------------------------------------------------------- # ● 이벤트 페이지 설정 #-------------------------------------------------------------------------- alias icon_chara_setup_page_settings setup_page_settings def setup_page_settings @icon_id = 0 icon_chara_setup_page_settings setup_icon_page_settings end #-------------------------------------------------------------------------- # ● 이벤트 페이지의 아이콘 설정 #-------------------------------------------------------------------------- def setup_icon_page_settings @list.each { |item| if item.code == 108 or item.code == 408 @icon_id = $1.to_i if item.parameters[0] =~ /ICON:(\d+)/i end } end end #============================================================================== # ■ Sprite_Character #============================================================================== class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # ● 그래픽 갱신 #-------------------------------------------------------------------------- def update_bitmap if graphic_changed? @icon_id = @character.icon_id @tile_id = @character.tile_id @character_name = @character.character_name @character_index = @character.character_index if @icon_id > 0 set_icon_bitmap elsif @tile_id > 0 set_tile_bitmap else set_character_bitmap end end end #-------------------------------------------------------------------------- # ● 그래픽 변경 판정 #-------------------------------------------------------------------------- def graphic_changed? @icon_id != @character.icon_id || @tile_id != @character.tile_id || @character_name != @character.character_name || @character_index != @character.character_index end #-------------------------------------------------------------------------- # ● 아이콘 그래픽 설정 #-------------------------------------------------------------------------- def set_icon_bitmap self.bitmap = Cache.system("Iconset") self.src_rect.set(@icon_id % 16 * 24, @icon_id / 16 * 24, 24, 24) self.ox = 12 self.oy = 24 end #-------------------------------------------------------------------------- # ● 그래픽 표시부분 (RECT) 설정 #-------------------------------------------------------------------------- alias icon_chara_update_src_rect update_src_rect def update_src_rect icon_chara_update_src_rect if @icon_id == 0 end end # presented by 허걱 / gasp -
Thank you very much @Roninator2 !!!
Also, it does work fine! i was looking for a script like this so long..