Jump to content
Tsukihime

Icon Event Graphics

Recommended Posts

This script is no longer supported

If you need to use icons as event graphics, simply create a "character" sheet with your icons and set that as your event graphic.

 

Icon Event Graphics

-Tsukihime

 

note_icon_event_graphics.jpg

 

This script allows you to set icons as an event graphic.

It uses event page note tags. See below for more instructions.

 

Download

 

Demo: http://db.tt/HiPJ4J55

Script: http://db.tt/dUJkDOTk

Required: Note Manager

 

Usage

 

Tag the event page note with

<icon_index: x>
For some icon index x.

 

If you have never used the Note Manager before, first paste the script into your project, and then test play the game. You should see a new Notes folder inside your data folder.

 

To check which note file you need to edit, you will need three things

 

-the map ID

-the event ID

-the page number

 

Then go into the following folder: Data -> Notes -> Maps -> map_ID

 

Look for the file named event(ID)_page(ID).txt, and that's where you would add it.

Look at the demo for an example.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

Wow neato, this is something I was thinking of doing as well. :3 I will probably convert it to use comments though... I know you don't really like them so much but...

 

I really should experiment with self-deleteing comments. :P

Share this post


Link to post
Share on other sites

The note manager was designed so that data is separated from input.

As long as you load stuff into an attribute called "note" it will work. So you just need to add a method for parsing event comments.

Edited by Tsukihime

Share this post


Link to post
Share on other sites

You know, you might want to think about using hashes instead of aliasing load_notetag for each script. I just loooove hashes <3 Like for each line you could do something like:

 

if line =~ /\A[^#]<([^\s:]*):\s*(.*)>/

hash[$1.to_sym] = eval($2) rescue $2

end

 

Er... anyway... I also made this and stuck it at the end of my script list:

 

class Game_Event < Game_Character

 

alias_method :setup_page_delete_base, :setup_page

def setup_page(new_page)

setup_page_delete_base(new_page)

unless @page.nil?

@page.list.delete_if do |item|

item.code == 108 || item.code == 408

end

end

end

 

end

 

Seems to work well so far :3 Though this is more related to your note script then this one so, I guess I shouldn't say anymore about it.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

I could provide a "register" function just like all my other plugin scripts...

 

load_notetag_YOUR_IDSTRING

Share this post


Link to post
Share on other sites

I followed everything in the instructions.

 

But when i play test it, the graphic that should display an icon image turns out to be blank instead (nothing there).

 

Please help. 

 

Thanks!

Share this post


Link to post
Share on other sites

Consider just cropping your icon set into a character sprite and using that.

It makes...much more sense.

Share this post


Link to post
Share on other sites

I am not sure if this is related to the problem of no sprite appearing, but thew way the sprite is blitted into a new bitmap bitmap constantly and the bitmap source rect is not updated right doesn't seem like a good idea. I think the icon vanishes because the sprite src_rect get's overwriten in update_src_rect and memory fills up with new small bitmaps that are never disposed. Though I got a pm a little while ago asking me to make it use event comments instead, so I made one for use for this script. Here it is if you want to see how I set the bitmap/src_rect:

 

class Sprite_Character
  
  alias_method :update_bitmap_icon_base, :update_bitmap
  def update_bitmap
    if @character.icon_index > -1
      set_icon_bitmap
    else
      update_bitmap_icon_base 
    end
  end
  
  def set_icon_bitmap
    self.bitmap = Cache.system("Iconset")
    self.ox = 12
    self.oy = 28
  end
  
  alias_method :update_src_rect_icon_base, :update_src_rect
  def update_src_rect
    if @character.icon_index > -1
      self.src_rect = Rect.new(@character.icon_index % 16 * 24, @character.icon_index / 16 * 24, 24, 24)
    else
      update_src_rect_icon_base
    end
  end
  
end

class Game_Character
  
  attr_writer :icon_index

  def icon_index
    @icon_index ||= -1
  end

end

class Game_Event < Game_Character

  alias_method :setup_page_icon_base, :setup_page
  def setup_page(new_page)
    setup_page_icon_base(new_page)
    @icon_index = self.note_field[:icon_index] || -1
  end

end
Edited by KilloZapit

Share this post


Link to post
Share on other sites

Going to have this topic closed to avoid people trying to use this script.

Will keep it there for reference purposes (like what you should not do)

Edited by Tsukihime

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×