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

PTBR Translation

The way I did it initially, the code flow does not go through the "agree fetch" block (tailor.c/shipyard.c file etc.) so it does not configure the input characteristics in QB.
The entry is left without a title and without the first descriptive paragraph (text.t1 of fetch.txt).
The solution I adopted for my use is a new code block ("config the fetch") with the instructions from the "agree fetch" block. I didn't know how to make a block or routine without a dialog, so it's an adjusted code duplicate.
Better would probably to not have a questbook at all. You don't need to be told what to fetch, to where, by what date, if you already have the goods! In the version of "tailor.c" which I found in your zip file, if you have the goods already then the dialog proceeds straight to case "fetch quest complete". Copy that instead, and leave out these lines:
Code:
            questbookname = "fetch&number="+NPChar.fetch_quest.cargoid+NPChar.index; //Set a questname
            AddQuestRecord(questbookname, 3);
            CloseQuestHeader(questbookname);
Code:
            PChar.quest.(questbookname).over = "yes"; // GR: cancel quest fail timer

What I know about the syntax and functions of these scripts is very scarce so I have to use trial and error.
a_map.c items.c

This snippet looks to me like displaying details from the inventory.

View attachment 45095
The line in "a_map.c" is for when you are looking at the archipelago map and you click on an island, which brings up a map of the island provided you have a map of the island. The line in "items.c" is for when you examine a map in your inventory and is at the bottom of a long function called "I_ExamineItem()". An important pair of lines in both files, before the line you found, is:
Code:
    aref itmRef;
    if (Items_FindItem(itmName, &itmRef) >= 0 && CheckAttribute(itmRef, "index")) GameInterface.ItemIdx = itmRef.index;
You probably want to look more at the one in "a_map.c" because that is the one which checks that you have the map before trying to show it. "items.c" does not need to do that because you've been scrolling through your inventory - if you've found the map to examine then obviously you have it!

Here in my BNH game, the mission "Help the church", I entered the crypt labyrinth before taking on the mission, I picked up a cross, a rifle and a book.
And when I took on the mission, I couldn't finish it. I noticed that pchar.quest.telescope_quest.foundbook didn't assume the value true (although there is a fix for this in case you didn't take on the mission), I don't know if it's something I did or a code bug, if you want to check, send Sabegame immediately before picking up these items.
If I have time, I'll look into that, but again I have a couple of other projects in progress.
 
Better would probably to not have a questbook at all. You don't need to be told what to fetch, to where, by what date, if you already have the goods! In the version of "tailor.c" which I found in your
Good idea.
The line in "a_map.c" is for when you are looking at the archipelago map and you click on an island, which brings up a map of the island provided you have a map of the island. The line in "items.c" is for when you examine a map in your inventory and is at the bottom of a long function called "I_ExamineItem()". An important pair of lines in both files, before the line you found, is:
Yes, i see it.
But what would an instruction be like to open the cave map without accessing the inventory?
I already understood how to check if I'm in the cave before.
If I have time, I'll look into that, but again I have a couple of other projects in progress.
No stress.
 
Back
Top