Jump to content


Photo

Icon Event Graphics

note

  • This topic is locked This topic is locked
13 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 28 October 2012 - 03:07 PM

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, 02 March 2014 - 07:20 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 KilloZapit

KilloZapit

    FAIRY DUST! FAIRY DUST FOR EVERYONE! WHEE!

  • Ace Member
  • 2580 posts
  • LocationFairyland!
  • RM Skill - Coder

Posted 30 October 2012 - 10:56 AM

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

#3 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 30 October 2012 - 10:59 AM

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, 30 October 2012 - 10:59 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#4 KilloZapit

KilloZapit

    FAIRY DUST! FAIRY DUST FOR EVERYONE! WHEE!

  • Ace Member
  • 2580 posts
  • LocationFairyland!
  • RM Skill - Coder

Posted 30 October 2012 - 11:30 AM

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, 30 October 2012 - 11:33 AM.


#5 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 30 October 2012 - 12:03 PM

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

load_notetag_YOUR_IDSTRING

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#6 Milky

Milky

    Advanced Member

  • Ace Member
  • 91 posts

Posted 11 March 2013 - 05:34 PM

the third link labled required does not work.



#7 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 11 March 2013 - 06:17 PM

Should work now.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#8 Parthanandix

Parthanandix

    Member

  • Banned
  • 19 posts
  • LocationWhiterun (Skyrim)
  • RM Skill - Coder

Posted 18 March 2013 - 12:48 AM

Sweet now it's easier to make a Zelda type shop rather than purely eventing all of it

#9 johnnyistheman

johnnyistheman

    Member

  • Ace Member
  • 17 posts

Posted 05 January 2014 - 11:30 PM

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!



#10 Mattyp1992

Mattyp1992

    Newbie

  • Ace Member
  • 6 posts

Posted 01 March 2014 - 10:01 PM

I have also had the problem of no sprite appearing, I used the demo as a reference but I was not successful.



#11 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 01 March 2014 - 10:10 PM

Consider just cropping your icon set into a character sprite and using that.
It makes...much more sense.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#12 KilloZapit

KilloZapit

    FAIRY DUST! FAIRY DUST FOR EVERYONE! WHEE!

  • Ace Member
  • 2580 posts
  • LocationFairyland!
  • RM Skill - Coder

Posted 02 March 2014 - 06:34 AM

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, 02 March 2014 - 06:49 AM.


#13 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 02 March 2014 - 07:22 AM

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, 02 March 2014 - 07:23 AM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#14 Jonnie91

Jonnie91

    Advanced Member

  • Staff Manager/Global Mod
  • 1954 posts
  • LocationSommini Village
  • RM Skill - Musician

Awards Bar:

Users Awards

Posted 02 March 2014 - 07:26 AM

Locked as requested :) 


My Music

JSM-Signature-Support.png 

Projects I Support

gs-banner_zpsfc59b073.png SiggySupport_zpscbf4a070.png

6LOfEM3.png RCEko8r.png






Also tagged with one or more of these keywords: note

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users