1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

new-horizons-Adding-Readable-Books

Jan 10, 2015
new-horizons-Adding-Readable-Books
  • Adding Readable Books
    Go back to modding

    To add a readable book:
    Go to items_init and add a book with a line like this (search where the other books are then the line will make sense):
    Code:

    n = InitItem(n,"book16", "", 13, 12, 0.10, 3, 1306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);// New Book
    Also add a line for the groupID
    Code:

    case "book16": genitm.groupID = BOOK_ITEM_TYPE; genitm.text = "book16"; break; // New readable book
    Make sure you select BOOK_ITEM_TYPE as type.
    And make sure the text attribute is set to the name of the file with the content. If this is not set it will try to use the id of the item, so in this case it would still work.

    Go to C:\POTC\RESOURCE\INI\TEXTS\ENGLISH\ItemsDescribe.ini
    and add the following lines:
    Code:

    itmname_book16 {Foo Book}
    itmdescr_book16
    {
    Bar Page
    }
    Change the "book1" into your bookid (so in this case book16) and change the descriptions.

    This is what you had to do before already to add a book (except an other Item Type) Now if you want to add text go to:
    C:\POTC\RESOURCE\INI\TEXTS\ENGLISH\BOOKS
    And add a textfile named after the book id, so in this case book16
    inside there use the following code
    Code:

    TEXT {
    Here you can tell your story
    }
    Easier then this I couldn't make it.

    If you want to have dynamic text in your book you can add it the same way as with questtext.
    Say you want to have and islandname in the text somewhere you can add it like this:

    Code:

    #sisland#
    The game will now look for a attribute set to the book which is called island and display this as a string (hence the s in front).
    So at the iteminit you need to add the folowing line to make it work:
    Code:

    genitm.island = "Monkey Island";
    Now the #sisland# will be replaced with Monkey Island in the book.

    If you want the book to be a skillbook then the only thing you have to add at iteminit is the following piece of code:
    Code:

    genitm.UnlockedPerk = "PerkName";
    If you want the book to trigger a certain questcase after readed then add this attribute:
    Code:

    genitm.QuestName = "Foobar the Foobar";
    If you wanna test it use the following console code to get the book:
    Code:

    GiveItem2Character(pchar,"book16");

Share This Page