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

Fixed Opium Smuggling: Clarifying Behaviour for Players

Talisman

Smuggler
Storm Modder
The Opium smuggling now works. :yes


1 - Buyers List is now OK :onya

2- Fast Travel - disabled when player carrying Opium - & Re-enabled when Opium got rid of ( need to go to next location for re-enable to happen) :onya

3 - Opium can only be got rid of by selling to Buyer on Buyer's list - or by using it:sick - or having it confiscated by a soldier - ( can't give to Officers - sell it - or put it in a chest ) :onya


Small cosmetic problem :- Quest Book

When play as Jean Lafitte - given Opium at start - Quest book has entry

PotC_B14Beta4_1_FindOpium.jpg


text.t4=Hey, I've found an Opium Den and bought some opium! Maybe the smugglers have interest in that too?


The same quest Book entry is also used when you find Opium on the body of a dead smuggler on the Beach.

I think this does not make sense since the player does not know where the Opium Den is yet, ( I think it should only be used if you buy Opium in the Opium Den ) - so I think a different text should be used in both situations e.g.

text.t16=Ah, I've acquired some Opium. I will have to ask the smugglers about this.


I have added this to the quest book file attached.

I have looked in the code but cannot find the place where the code is to put this entry in the quest book, for both the Lafitte Start, and finding the Opium on a dead smuggler. :read:(

Attached is a Save - just about to meet smugglers on the beach - get caught by coastguard - let them kill smugglers & then loot smugglers bodies for Opium.

Logs for this are also attached - even using these I can't work out where in the code the quest book entry is :(


:cheers
 

Attachments

  • -=Player=- Cuba.7z
    563.8 KB · Views: 90
  • error.log
    107 bytes · Views: 96
  • compile.log
    4.5 KB · Views: 91
  • system.log
    728 bytes · Views: 115
  • smuggleguild.txt
    2.1 KB · Views: 121
Last edited:
Thanks for confirming! Seems we're getting there in the end. :cheers

Is that questbook entry not just in the RESOURCE\INI\TEXTS\QUESTBOOK folder?
You can use trick #3 from Tutorial - Modding Tips & Tricks | PiratesAhoy! to search for that text itself and you should find it.

If that doesn't work, I'll modify it myself. Should be a quick job.
I did indeed notice that before, but couldn't be bothered to do anything about it.... :wp
 
Thanks for confirming! Seems we're getting there in the end. :cheers

Is that questbook entry not just in the RESOURCE\INI\TEXTS\QUESTBOOK folder?
You can use trick #3 from Tutorial - Modding Tips & Tricks | PiratesAhoy! to search for that text itself and you should find it.

If that doesn't work, I'll modify it myself. Should be a quick job.
I did indeed notice that before, but couldn't be bothered to do anything about it.... :wp


:yes

I tried a Windows Search - for AddQuestRecord("smuggleguild", 4);

the only reference in the code it found was in - quests_side.c

Code:
case "Smugglers Opium Discovery":
       if(!CheckAttribute(pchar,"quest.smuggling_guild.have_met"))
       {
         SetQuestHeader("smuggleguild");
         AddQuestRecord("smuggleguild", 1);
         pchar.quest.smuggling_guild.have_met = true;
       }
       if(!CheckAttribute(pchar,"quest.smuggling_guild.opium_explain"))
       {
         AddQuestRecord("smuggleguild", 4);
       }
     break;


- and I don't understand it :( since it uses attributes - it looks like it gives the player the text

text.t4=Hey, I've found an Opium Den and bought some opium! Maybe the smugglers have interest in that too?

whenever they get up Opium ( buying from the den or finding on a corpse ) - so it would somehow need to be changed to distinguish between buying Opium in the Den and finding it on a smugglers corpse ( or being given it at the start of a game )

However it is not really that important - since it does not break anything. :razz



:drunk
 
The "quest.smuggling_guild.opium_explain" attribute prevents the questbook entry from appearing twice, I think.
A generic one would be best, since "getting opium" and "asking about it" both execute the same code.

Does there need to be a questbook entry there at all? The Opium item description could be used for that.
Alternatively, add one questbook entry when you get the explanation and a completely different one when you carry opium the first time.
 
Does there need to be a questbook entry there at all? The Opium item description could be used for that.
Alternatively, add one questbook entry when you get the explanation and a completely different one when you carry opium the first time.

I don't really know :shrug

I think the quest book entries are there to draw the players attention to the opium - which is a good thing since otherwise they might think the game has broken when Fast Travel suddenly disappears :yes - although neither the quest book or the the item text mention that ( I think )

This really needs some careful thought :checklist


:cheers
 
If you could do the "careful thought" and let me know what texts should appear at what stages, I can probably implement that.
I think there are three things you can play with:
1. Opium Item Description
2. Questbook entry added after the "Smuggler Opium Explanation"
3. Questbook entry added when you first get an Opium Item

Not sure what kind of ingame explanation could be given for fast travel being disabled.
The reason is so that you cannot too easily avoid the town guards, which would be a bit of an exploit if you could.
But that is a game design reason, not an ingame reason.
 
1. Opium Item Description

"A strange substance. Which is said to affect your ability to travel. Among other things.
This is considered contraband, so I am in danger of being caught by the town guards as long as I am carrying this. "

I am not sure – I think this is OK. But maybe add the bit in RED perhaps change “travel” to “walk and run”. But that might be confusing.

I am afraid I just don’t know :shrug



2. Questbook entry added after the "Smuggler Opium Explanation"

text.t7=The smugglers told me about opium smuggling. I've got a list of clients in the Caribbean and they gave me a book to explain how it works.

I think this is OK. Since the smugglers in the taverns will only talk to you about opium if you are carrying some



3. Questbook entry added when you first get an Opium Item.

text.t4=Hey, I've found an Opium Den and bought some opium! Maybe the smugglers have interest in that too?

This I think needs changing - it is currently used

A - when you loot opium from a dead beach smuggler

B - for the Jean Lafitte start -where you start with Opium

C - when you buy Opium in the Opium Den

I think it should only be used in C

For A & B :-

text.t16=Ah, I've acquired some Opium. I will have to ask the smugglers about this.


In 3 C above ( buying Opium in the Opium Den ) - text.t4=Hey, I've found an Opium Den and bought some opium! Maybe the smugglers have interest in that too? ---- I think this should only be used if the player has not yet talked to the Smuggler in the tavern about Opium.

If you are buying Opium in the Opium Den because you are getting some for a Opium Buyer then there is an entry under -- Smuggling Opium for #sbuyer# header. ---- i.e. text.t2=I got the opium in #splace#! Now let's head back to the client.

:rumgone
 
Point 3 gets triggered as soon as you get an opium item, regardless of how you got it.
The game has no clue if it is option a, b or c there.

It technically doesn't make so much sense for opium to affect you if you didn't deliberately use it.
So I'm not sure what excuse to come up with to disable Fast Travel.
Most correct would be to have an onscreen log message stating "You can't avoid thosec guards checking for opium that easily!"
But that requires changing the way that disabling works in the first place and I don't intend to make large changes.

I added that "in danger of being caught by the town guards" note to explain that fast travel thing.
But I doubt that will register with people.
 
Just have to see how many people post saying : "Hey my fast travel is no longer working - is this a bug? Please help me, what do I do." :rofl


-- to judge how big a problem it is. :yes


:drunk
 
Maybe I'll have a hard time evading the town guards while carrying this".
Then they have to interpret that this means fast travel is unavailable.
 
Sounds good.

Generally most people should manage to figure out that it is something to do with having Opium.

Since when you have Opium the only icon to Appear on the Fast Travel/ Use Item icons ( bottom left ) is Use Item

PotC_B14Beta4_1_Opium1.jpg


Which when selected just gives you Opium - instead of all the usual Medical items

PotC_B14Beta4_1_Opium2.jpg



:drunk
 
"A strange substance. Which is said to affect your ability to travel. Among other things.
This is considered contraband, so I am in danger of being caught by the town guards as long as I am carrying this. "
Item description will be:
"A strange substance.
This is considered contraband, so I'll have a hard time evading the town guards while carrying this."


If you acquire opium in any way without asking the smugglers about it first:
"I have acquired some opium. Good chance the smugglers will be interested in this. I should ask them about it."

And once you ask the smugglers about it:
"The smugglers told me this opium has some weird effects. If I want to learn more about it, I should ask someone who knows a lot about medicine"

That at least get rid of the "I found an Opium Den" text when you didn't.

It doesn't mention the "hard time evading the guards" in the Questbook, but the item description does cover that.
We'll see how this goes. :shrug
 
Back
Top