• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

New Horizons Adding Readable Books

  • Views Views: 1,113
  • Last updated Last updated:

Navigation

      Capturing Colonies
         A girl won in a card game
         Artois Voysey (Quest)
         Cargo for Thomas O'Reily
         Church Protection
         Edgar Attwood Adventures
         Escort Vigila Mendes Ship
         Hard Labors of an Assassin
         Help The Boatswain
         Help the Church
         Help the Lady
         Hire A Sailor - Rys Bloom
         Nigel Blythe (Quest)
         Patric and the Idols
         Rescue Peter Bloods Crew
         Sabine Matton
         Saga of the Blacque Family
         Saving Toff's Daughter
         Search for Peter Bloods Ship
         Silver for Cartagena
         Sink the Pirate Corvette
         Sinking The Vogelstruijs
         Smuggling for Thomas O'Reily
         The Silver Train
         Zaid Murro's Problems
      Smuggling
      Treasure Quests
         Lost Treasure on Cuba
         Lost Treasure on Guadeloupe
  • 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");
Back
Top