• 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!

Included in Build Perks Mod V2.6 Unlockable Perks! (READABLE BOOKS!)

Like I said it can be done yes.
boekje.png

Need to improve it a bit and give its his own ini file (now uses the questbook) and need to change the header on top.
Then a system needs to be made for the content. But as you see I can generate a interface for the book which can be openend from the inventory interface :).
 
There is this also the possibility to make the books DOCUMENT_ITEM_TYPE. This enables the "examine" button. Like for maps.
 
There is this also the possibility to make the books DOCUMENT_ITEM_TYPE. This enables the "examine" button. Like for maps.
I made a new BOOK_ITEM_TYPE for these :).

Pieter i dont know, doest look like that ingame.
 
Tomorrow, I'll see if I can look up those GoF book textures with who did them.
I'd definitely like seeing those again! :cheers
As promised, you can find the files here: http://piratesahoy.net/build/coas/Books.7z
There are three different levels for each book subject, ranging from "really silly stuff" to "expert knowledge".
This was originally done by @Darkhymn, @FireBat and @Thagarr for Age of Pirates 2: Gentlemen of Fortune.

See here for an example of the low-level navigation book, which was written mainly for entertainment purposes:
booknavigation_1.jpg
 
OHYEAH :D

it's working

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,   1, 0, 1,   0,  0,  0,  0,  0,  0, +1,  0,  0,  0,  0,  1,  0,  0);// New Book

Also add a line for the groupID
Code:
case "book16": genitm.groupID = BOOK_ITEM_TYPE; break;    // New readable book
Make sure you select BOOK_ITEM_TYPE as type.

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 the book to be a skillbook then the only thing you have to add also is:
Go to C:\POTC\PROGRAM\INTERFACE\Perks\Perks.c
search for the function "string GetSkillbookPerk(string itmName)"
add a case there like this:
Code:
case "book16":
            return "MyPerk";
        break;

Please test the mod. I think I've included all the files but please check if for me.
Now only the first skillbook has a text and its just some random text I got from the internet about sword fighting :p.
If you wanna test it use the following console code to get the book:
Code:
GiveItem2Character(pchar,"skillbook1");

Oh I also changed the Unlock function to a boolean function so it returns a true if the perks was unlocked and a false if it wasn't (in case it was already unlocked for example). This is used to show a message in the book if it unlocks a perk.
 

Attachments

  • LOCKED PERKS 2_61.zip
    639.2 KB · Views: 214
Last edited:
Definitely very cool! I wonder if anyone could be convinced to write the content for those buyable books.
I always wondered what kind of crazy stuff would be in "Boelen Algebra"! :rofl

Perhaps we can use text-based and picture-based books side-by-side?
One using BOOK_ITEM_TYPE and the other using DOCUMENT_ITEM_TYPE?
I like both approaches.

BTW: When you close the book interface, you don't return to your inventory, but straight back to the 3D world.
I had the same problem with the Archipelago Map for some strange reason.
This is how I "sorted" it:
Code:
void IDoExit(int exitCode)
{
   DelEventHandler("InterfaceBreak","ProcessCancelExit");
   DelEventHandler("exitCancel","ProcessCancelExit");
   DelEventHandler("ievnt_command","ProcessCommandExecute");
   DelEventHandler("frame","HideToolT");

   ref PChar = GetMainCharacter();
   if(CheckAttribute(PChar, "inventory"))
   {
     DeleteAttribute(GameInterface, "islandlist");
     DeleteAttribute(GameInterface, "maplist");
     PostEvent("LaunchIAfterFrame",1,"sl", "I_ITEMS", 2);
     InterfaceStack.SelectMenu_node = "I_ITEMS";
     interfaceResultCommand = exitCode;
     EndCancelInterface(false);
   }
   else
   {
     interfaceResultCommand = exitCode;
     EndCancelInterface(true);
   }
}
Plus this in items.c:
Code:
  // Why is this necessary? It works without it for regular maps
   if(CheckAttribute(pch, "inventory"))
   {
     ChangeSelectedScroll(MAP_ITEM_TYPE);  UpdateItemData();
     DeleteAttribute(pch, "inventory");
   }
   // PB: Return to Maps Tab <--
 
Last edited:
I've already send out a request to a friend of mine who want to work in a indie compagny as writer. I think she would like this challenge and I expect some witty books :p.
You can always use the document_item_type to ofc. I haven't looked into it enough to know what to do with it cause I liked this idea more cause its very easy to mod and I don't like to put text on textures (you see what I did there ;) ).
 
I've already send out a request to a friend of mine who want to work in a indie compagny as writer. I think she would like this challenge and I expect some witty books :p.
Exciting prospect! :dance

I haven't looked into it enough to know what to do with it cause I liked this idea more cause its very easy to mod and I don't like to put text on textures
You're perfectly right, of course. And moddability is ESPECIALLY welcome, as per usual.
Most of those AoP 2 books also contain pictures on the pages though. So that does add something as well.

(you see what I did there ;) ).
You just want "ures"? What are "ures"??? o_O
 
Did a little reupload to fix a sound issue.
Will take a look at the not going back to inventory later.
 
I tried it but the examine button gave me the notebook pling and only returned me to 3D?
Something missing? :confused:
 
Yesterday's version did that; but the latest one actually opens the book.

DO we want to be doing this?
Code:
TakeItemFromCharacter(GetMainCharacter(), book.id);
What if people like its content and want to look again some time?
 
Only if the perk is unlocked will it be taken else you keep it.
The perkbook is worth quite a lot so I figured if you use it to unlock the perk it should be removed. You will probally find another one.

@Jack Rackham try the newest version on this page and make sure you copy both the resources and program folder.
 
No no it's perfecly ok! I used an earlier version. And I like it. :yes
A new type I can combine with the document and outfit types!
But I agree with Pieter, isn't it more logical to keep the book. :readYou can sell it later.
 
No no it's perfecly ok! I used an earlier version. And I like it. :yes
A new type I can combine with the document and outfit types!
But I agree with Pieter, isn't it more logical to keep the book. :readYou can sell it later.
I can remove it again but like I said it will only remove the book if it's used to unlock a perk else you will keep it ;).
 
That does mean you can read it only once. Or you have to buy it again.
If you are afraid of the monetary complexity of selling it again after getting the perk, perhaps it can be set to not be sell-able?
 
That does mean you can read it only once. Or you have to buy it again.
If you are afraid of the monetary complexity of selling it again after getting the perk, perhaps it can be set to not be sell-able?

I think I know something already.
The price is just stored for the item so I can just lower the price. Or just keep it. If you buy it and sell it you have a loss already and indeed I think its better if you do keep it.
Will remove it in the next update.
 
Are you going to use existing books or new ones?
If new I've got a minor collection of book pictures if you want to check them.
 
There are still some unused book textures and some of them I like, but if you got new textures you can always post them here if there is one I like we can include it ofcourse :).
 
Back
Top