Adding a Notetag to Nicke's History Book

● ARCHIVED · READ-ONLY
Started by Ice Cluster 6 posts View original ↗
  1. Hello everyone,

    I'd like to have a small addon to the XS - History Book script by Nicke.

    http://forums.rpgmakerweb.com/index.php?/topic/7816-xs-history-book/

    What it should do:

    I want to be able to add Notetags to certain items (books), so that they call the History Book scene of this script, when you use them from the menu.

    Something like

    <xsbook: Bookname>

    The script call from the script is:

    SceneManager.call_ext(Scene_HistBook, :symbol)

    If anyone could provide me with a little addon like this, I'd be very happy.

    Thanks in advance

    Ice Cluster
  2. You are already able to do that. Just take the script call and put it in a Common Event. Then link the common event to the item. Then when the player uses the item, they activate the Common Event with the script call and it brings up the scene.
  3. Yes, I know, but with a lot of books, I would have to make plenty of common events, just for that issue.

    This would be a lot easier with notetags.
  4. Check this out:

    class RPG::Item def init_xs_book_notetags_evg @xs_book = false regex = /<xsbook: *(?<name>\w*) *>/i.match(@note) return unless regex @xs_book_name = regex[:name].to_sym @xs_book = true end def xs_book? return @xs_book end def xs_book_name return @xs_book_name end endmodule DataManager class << self alias :evg_dm_lnd_xsaddon :load_normal_database end def self.load_normal_database evg_dm_lnd_xsaddon $data_items.compact.each(&:init_xs_book_notetags_evg) endendclass Scene_ItemBase alias :evg_sib_cce_xsaddon :check_common_event def check_common_event evg_sib_cce_xsaddon open_xs_book if item && item.xs_book? end def open_xs_book SceneManager.call_ext(Scene_HistBook, item.xs_book_name) end endNotetag would be:

    <xsbook: Bookname>
  5. Thank you, this really works like a charm.
  6. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.