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

WIP Improvements to Smuggling.

the BuildOption switch seems to work fine! I struggled an embarrassingly long time with getting the xi_convertstring to show up, turns out I was editing a rogue common.ini that I had lying around and not the one the game used :facepalm since it was relatively quick work, I also went ahead and added the string to most relevant dialogs I found! the ones that were easy to find by searching for "SKILL_" in the dialogs folder at least :p I didnt add them to most bribes unless it made a lot of sense, and I didnt add them to a few other places where I couldnt follow or didnt quite understand the context, and also not in enc_rapersgirl because I hate that encounter with a passion. I havent tried them all since they are spread all over! but I dont see any reason they wouldnt work, except if I slipped on the keys and messed up the syntax somewhere :type1

I didnt include the guard dialog file in the .rar since that's still kinda under construction for the smuggling pack xD it's attached separately tho. it has the line switches and I also added a check so that the picnic line is the only one that shows up when relevant

EDIT: forgot literally the most important file in the rar. now added the BuildSettings.h :oops:
 

Attachments

  • random_guards_group_dialog.c
    18.5 KB · Views: 87
  • Persuasion System.rar
    93.6 KB · Views: 75
Last edited:
from what smuggling I've done I havent bumped into anything I thinks drastically unbalanced yet; the chance to get caught can still easily get very high on lower levels, and the check for the coast guard is still run every 5 seconds. but I often had a caught chance of 40-60% and still havent had the coastguard show up even when lingering. it's paused during conversation so that people can read the dialog without being stressed tho. the check could be run every 10-15 seconds, perhaps. after that I think it might get too easy, it's fun to get caught now and then after all and feel that you get better the more your char levels, as long as its obvious to the player that the repercussions arent always catastrophic.

one thing I have thought about tho is that the bribe at 500 gold is probably too cheap tho, even at low levels 500 coins is pretty much pocket change. as @Grey Roger said, the persuasion rn is just something to click past so you can pay the bribe, which is very true. why bother with persuasion or sending officers or trying to wait for a foggy night when you can toss a few coins at a guard and just get the time? :ninja making it more expensive and/or at some point maybe adding some risk, and trying to make sure the player knows there are other options, maybe it could lead to a more involving and fun smuggling quest? it should still not be too much of a bother ofc, optimally it shd be complicated and involving if you want it to, but easy enough that people who dont wanna dive into the nitty gritty still want to do it occasionally xD what would be a good bribe amount, and should it vary with skills and patrol level?
 
I've been playing a smuggling game recently as well. I've split the single, permanent "Smuggler's Life For Me" quest into three:
  • Tutorial which expires after a month or if you read the first book;
  • Smuggling for a governor, which is repeatable;
  • Opium smuggling, which should be unchanged apart from its questbook being split off.
The bribe of 500, which increases to 750 later, is sufficient. Persuasion fails most of the time, so raising the bribe cost to force the player to succeed at persuasion or sacrifice an officer would ruin smuggling, at least for me, just when I thought it was finally fun.

But as it is now, with the questbook separated into three parts, and with the random lines making the conversation with the soldier more interesting, smuggling is indeed fun and interesting, and although my current game was originally just to test the new system, I may keep it going. I've done a couple of side-quests which normally I wouldn't touch - "Smuggling for Thomas O'Reily" and "Nigel Blythe".
 
Sounds like you guys are on the right track :).
Nice to see people actually finding out the stuff I put into the smuggling system.
Splitting up the questbook was something I still wanted to do so props to Grey Roger for doing this.

I wont be able to work on this for at least 1,5 more weeks. but if there is a zipfile/installer with all the recent changes I might be able to look into it too and help to work on this too.
One thing which I still wished for smuggling to have is this:

When mooring a check is being done which is dependend on several things. If you have contraband and you don't have a merchants licence you might get a fine for the contraband you carry and it will be confiscated (unless you fight your way out of it). You could improve your chances by having a smugglers hold which you can have as a ship upgrade from the smuggles once they like you enough. To balance it out a bit this check probably shouldn't be done if you have less then X amount of smuggling goods with you, and it would also depend on the smuggling state. on lower states almost no checks will be done while on high states you will be checked always (in dutch we call it "steekproef").
Also I think the tradebook should be upgraded, once the smugglers like you enough you can get the "smugglersbook" or something like this, which will upgrade the tradebook interface with a new tab showing information about the islands and their smuggling states and patrol information you know and when it was last updated etc.

Now let's talk a little bit about the early game experience. If I remember right in the early game it's easier to get a patrol of only 1 or 2 guards instead of the full regiment. With the help of the smugglers you might be able to kill these guards to get the patrol schedule. This was one of the things build in to make it easier for the early game. Maybe we could hardcode that your first smuggling run will always be a success.
I also was planning on having the option that on your first smuggling run you where brought to the govenor instead of being killed etc. He would then ask your to start the spying quest for the smugglers. If you decline you will end up in jail where the smugglers will bust you out eventually. This would also mean the first time you get caught isn't that bad. But I didn't yet found a good way to determine which govenor you should be brought too because not every island (where you can smuggle) has a govenor.
 
Thanks for your responses, @Levis!
Always good to see you in these waters again. :cheers

I wont be able to work on this for at least 1,5 more weeks. but if there is a zipfile/installer with all the recent changes I might be able to look into it too and help to work on this too.
@Grey Roger and @Mad Jack Wolfe now work to keep the files linked to in my signature up-to-date. :doff
 
I've been playing a smuggling game recently as well. I've split the single, permanent "Smuggler's Life For Me" quest into three:
  • Tutorial which expires after a month or if you read the first book;
  • Smuggling for a governor, which is repeatable;
  • Opium smuggling, which should be unchanged apart from its questbook being split off.
Nice! xD looking forward to it!
The bribe of 500, which increases to 750 later, is sufficient. Persuasion fails most of the time, so raising the bribe cost to force the player to succeed at persuasion or sacrifice an officer would ruin smuggling, at least for me, just when I thought it was finally fun.

But as it is now, with the questbook separated into three parts, and with the random lines making the conversation with the soldier more interesting, smuggling is indeed fun and interesting, and although my current game was originally just to test the new system, I may keep it going. I've done a couple of side-quests which normally I wouldn't touch - "Smuggling for Thomas O'Reily" and "Nigel Blythe".
fair enough! I dont think sending an officer is a sacrifice anymore, part of me wanting to encourage use of it is I'm very proud that system :p but I get your point, I wasnt planning anything crazy, maybe 250 to 1500 gold depending, but I'm not gonna go to war about it :unsure glad its more fun than expected otherwise! :cheeky

Sounds like you guys are on the right track :).
Nice to see people actually finding out the stuff I put into the smuggling system.
Splitting up the questbook was something I still wanted to do so props to Grey Roger for doing this.

I wont be able to work on this for at least 1,5 more weeks. but if there is a zipfile/installer with all the recent changes I might be able to look into it too and help to work on this too.
One thing which I still wished for smuggling to have is this:

When mooring a check is being done which is dependend on several things. If you have contraband and you don't have a merchants licence you might get a fine for the contraband you carry and it will be confiscated (unless you fight your way out of it). You could improve your chances by having a smugglers hold which you can have as a ship upgrade from the smuggles once they like you enough. To balance it out a bit this check probably shouldn't be done if you have less then X amount of smuggling goods with you, and it would also depend on the smuggling state. on lower states almost no checks will be done while on high states you will be checked always (in dutch we call it "steekproef").
Also I think the tradebook should be upgraded, once the smugglers like you enough you can get the "smugglersbook" or something like this, which will upgrade the tradebook interface with a new tab showing information about the islands and their smuggling states and patrol information you know and when it was last updated etc.

Now let's talk a little bit about the early game experience. If I remember right in the early game it's easier to get a patrol of only 1 or 2 guards instead of the full regiment. With the help of the smugglers you might be able to kill these guards to get the patrol schedule. This was one of the things build in to make it easier for the early game. Maybe we could hardcode that your first smuggling run will always be a success.
I also was planning on having the option that on your first smuggling run you where brought to the govenor instead of being killed etc. He would then ask your to start the spying quest for the smugglers. If you decline you will end up in jail where the smugglers will bust you out eventually. This would also mean the first time you get caught isn't that bad. But I didn't yet found a good way to determine which govenor you should be brought too because not every island (where you can smuggle) has a govenor.

I'm super happy you like where its going! xD its such a cool system you done, its been fun trying to make it more accessible. I'll upload what I got so far since it seems to work alright, and @Grey Roger can look it over and merge if hes done any changes of his own :) then you can go wild when you get time! :type1
 

Attachments

  • Smuggling incl persuasion system 2017-11-12.rar
    163.5 KB · Views: 73
I wont be able to work on this for at least 1,5 more weeks. but if there is a zipfile/installer with all the recent changes I might be able to look into it too and help to work on this too.
I'm hoping to have a new update zip out fairly soon, preferably this week, with a lot of stuff in it including @DeathDaisy's and my work on smuggling.

One thing which I still wished for smuggling to have is this:

When mooring a check is being done which is dependend on several things. If you have contraband and you don't have a merchants licence you might get a fine for the contraband you carry and it will be confiscated (unless you fight your way out of it). You could improve your chances by having a smugglers hold which you can have as a ship upgrade from the smuggles once they like you enough. To balance it out a bit this check probably shouldn't be done if you have less then X amount of smuggling goods with you, and it would also depend on the smuggling state. on lower states almost no checks will be done while on high states you will be checked always (in dutch we call it "steekproef").
Suggestion: the merchant licence should be irrelevant, it's a ticket to honest trading. A LoM from the port's nation should make you exempt for two reasons. One is that a privateer may have brought in contraband seized from an enemy ship. The other is that originally, smuggling for a governor required you to have a LoM from the governor's nation, and I've kept that. If you're trying to investigate smuggling for the governor then you must bring contraband into this port.

The smuggler's hold would have to be small; if it is half the ship's entire capacity, any competent inspector will figure out that you have a hidden hold even if he can't find the entry point. So, the search either doesn't happen or automatically fails if you have less than X amount of contraband and you have a concealed hold. Anyway, a new ship upgrade is liable to mess up the ship upgrade interface, and if it's a choice between losing any of the existing upgrades or not having the concealed hold, I'd prefer to keep all existing upgrades.

Also I think the tradebook should be upgraded, once the smugglers like you enough you can get the "smugglersbook" or something like this, which will upgrade the tradebook interface with a new tab showing information about the islands and their smuggling states and patrol information you know and when it was last updated etc.
That should not need to depend on what the smugglers think of you as there are already two sources for that information - tavern news and soldiers when you ask for the patrol times. So, if you know the patrol state for a particular island, display it in the tradebook.
 
Suggestion: the merchant licence should be irrelevant, it's a ticket to honest trading. A LoM from the port's nation should make you exempt for two reasons. One is that a privateer may have brought in contraband seized from an enemy ship. The other is that originally, smuggling for a governor required you to have a LoM from the governor's nation, and I've kept that. If you're trying to investigate smuggling for the governor then you must bring contraband into this port.
Agreed.
One additional question: What about the "Trustworthy" ability?
I imagine if you have that, then carrying contraband should not be objectionable.
 
@Grey Roger can look it over and merge if hes done any changes of his own :) then you can go wild when you get time! :type1
Good job I did. Partly because of some other work that has been done on some the files, and not just by me - @pedrwyth did some fixing to "Arnaud Matton_dialog.c", for example, to fix some problems with the "Sabine Matton" sidequest. Also, someone noticed a problem with the time approximation entries in "common.ini", namely that the entry for "Dusk" was wrong. ;) The correction has not been applied in the version in "Smuggling incl persuasion system 2017-11-12".
 
Good job I did. Partly because of some other work that has been done on some the files, and not just by me - @pedrwyth did some fixing to "Arnaud Matton_dialog.c", for example, to fix some problems with the "Sabine Matton" sidequest. Also, someone noticed a problem with the time approximation entries in "common.ini", namely that the entry for "Dusk" was wrong. ;) The correction has not been applied in the version in "Smuggling incl persuasion system 2017-11-12".
omg how did that even happen :koI rly gotta clean up the mess my game and downloads folder has become. I think I have an arnaud file in my downloads, dunno if its the latest one or if its either old, wrong or I forgot to add it to my game.. :facepalm srsly huge thanks for keeping the mod working and tidy overall :flower:love

my connection in the house has went down, but it seems the common.ini version on my cloud drive is my latest one, so attaching it if its of use before @Grey Roger has put together the definitive version! :bird:

EDIT: my connection has returned, so I've updated arnauds file too with @pedrwyth s fixes :)
EDIT 2: also I discovered a way to include options for sweden that I think have less room for errors, so I'm adding that smuggling.c too!
 

Attachments

  • common.ini
    73 KB · Views: 67
  • Arnaud Matton_dialog.c
    42.5 KB · Views: 82
  • smuggling.c
    71.9 KB · Views: 83
Last edited:
I can see so many situations where the governors thugs take my cargo up to taking all of its cargo and then fine me that it isn't worth the time it takes to list them. This is a truly stupid idea.
 
I'd been giving this a bit more thought and came to a similar conclusion as @Hylie Pistof, though I wasn't going to be quite that harsh. Not quite. :D

If you don't have a LoM (or Merchant Licence, as per the original proposal), you are liable to have all your contraband cargo taken from you. So, if you've started the game as, say, a smuggler, who doesn't get either a LoM or Merchant Licence, why would you smuggle? Even allowing for @Pieter Boelen's suggestion that the "Trustworthy" perk makes you safe as well, it still doesn't work. When you don't have "Trustworthy", you're liable to lose your cargo, so why smuggle? If you do have "Trustworthy" then you can just sell the stuff at the store, so why smuggle?

Summary: if you really want to scupper smuggling and deter everyone from doing it, this is a great idea.

Perhaps limit it to the higher difficulty levels - "Swashbuckler" and possibly "Seadog". Because there is actually a way round this. You do what a real smuggler would do, which is you don't sail a ship full of contraband straight into port, you moor at a beach. Then you walk into town, meet the agent in the tavern, and walk back to the beach, where the smugglers will be waiting for you and your ship is already there. The main snag is that the two-way walk makes the whole smuggling process longer, plus there's the likelihood of running into random bandits or the rather frequent highwaymen. So those of us who just want to get the whole thing done quickly and simply so that we can get back to sea and do fun stuff are likely to once again give up smuggling entirely, which is a shame after all the recent work that has been done to make smuggling worth playing.

Another thought to try to encourage smuggling: if you sell contraband goods at the store using "Trustworthy", you get import rates rather than contraband rates. The game logic is that if you just want a quick sale and to get back to sea, that isn't necessarily a deterrent, whereas if you go to the effort of doing the smuggling, you get a higher price. The real world logic is that contraband is probably not illegal but it is heavily taxed. If you're trustworthy then you're honest enough to pay the tax which is why you get less profit.
 
Here's a revised version of @DeathDaisy's revised version of the smuggling book. Included are a few spelling and grammar corrections. (One of my pet grammar peeves is using "they", third person plural, as a gender-neutral singular pronoun. It's usually possible make the pronoun unnecessary with a bit of rephrasing, which is what I've done here. Failing that, female officers are rare, so either you don't have many of them or you went to a lot of effort to recruit them specifically, so look after them and don't send them on suicide missions. ;) The smuggler who supposedly wrote the book can thus reasonably assume that the expendable idiot - er, "brave hero" - you send on the mission is a man.)

The bit about not having to go to Europe to get your goods now loses the phrase "as the smugglers of old had to do". This is the age of sail - you are the smugglers of old! Especially if you're playing in "Early Explorers" or "Spanish Main". Any earlier than that, there wasn't any smuggling to the Caribbean because there were no colonies to smuggle to. xD

And there's a slight addition right at the end which @DeathDaisy might appreciate... ;)
 

Attachments

  • smugglingbook.txt
    6.1 KB · Views: 79
Here's a revised version of @DeathDaisy's revised version of the smuggling book. Included are a few spelling and grammar corrections. (One of my pet grammar peeves is using "they", third person plural, as a gender-neutral singular pronoun. It's usually possible make the pronoun unnecessary with a bit of rephrasing, which is what I've done here. Failing that, female officers are rare, so either you don't have many of them or you went to a lot of effort to recruit them specifically, so look after them and don't send them on suicide missions. ;) The smuggler who supposedly wrote the book can thus reasonably assume that the expendable idiot - er, "brave hero" - you send on the mission is a man.)

The bit about not having to go to Europe to get your goods now loses the phrase "as the smugglers of old had to do". This is the age of sail - you are the smugglers of old! Especially if you're playing in "Early Explorers" or "Spanish Main". Any earlier than that, there wasn't any smuggling to the Caribbean because there were no colonies to smuggle to. xD

And there's a slight addition right at the end which @DeathDaisy might appreciate... ;)
Looks good to me with one exception. Could you remove every mention of the "smugglers guild" from the book?
If I have time I still want to implement this guild properly. But I want it to be a kind of suprise for the player that the smugglers are that organised (and actually have a leader (that's actually where the signature on the end refers too ;) )).
 
If you don't have a LoM (or Merchant Licence, as per the original proposal), you are liable to have all your contraband cargo taken from you. So, if you've started the game as, say, a smuggler, who doesn't get either a LoM or Merchant Licence, why would you smuggle? Even allowing for @Pieter Boelen's suggestion that the "Trustworthy" perk makes you safe as well, it still doesn't work. When you don't have "Trustworthy", you're liable to lose your cargo, so why smuggle? If you do have "Trustworthy" then you can just sell the stuff at the store, so why smuggle?

Summary: if you really want to scupper smuggling and deter everyone from doing it, this is a great idea.

Perhaps limit it to the higher difficulty levels - "Swashbuckler" and possibly "Seadog". Because there is actually a way round this. You do what a real smuggler would do, which is you don't sail a ship full of contraband straight into port, you moor at a beach. Then you walk into town, meet the agent in the tavern, and walk back to the beach, where the smugglers will be waiting for you and your ship is already there. The main snag is that the two-way walk makes the whole smuggling process longer, plus there's the likelihood of running into random bandits or the rather frequent highwaymen. So those of us who just want to get the whole thing done quickly and simply so that we can get back to sea and do fun stuff are likely to once again give up smuggling entirely, which is a shame after all the recent work that has been done to make smuggling worth playing.

Hmmm you could be right it might discourage people from smuggling. Altough we could increase the pay-out more because the risk is getting higher, that might incentivice people again. Say if only 50% of your smuggling attemps actually work and it still turns a profit that might incentivise people to try better at this?
Once I have time again I will first work on the interfaces to make the information better acccesible.
Also I want to add a sidequest where you have a LOM and you can try to track down smugglers instead. This would offcourse make sure the smugglers like you less, but I think it would be nice to have a more land based mission also for characters to improve their standing with the govenor and try to increase their rank (altough the land based mission wont give that many points). For navy characters etc I think this would increase some immersion as you interact with a part of the game which you haven't interacted with much. The spying mission from the govenor was already intended for "good" characters to at least experience smuggling once. And I think helping tracking down smuggling deals might help to have a player try the other side also if he is playing a bad character.

Another thought to try to encourage smuggling: if you sell contraband goods at the store using "Trustworthy", you get import rates rather than contraband rates. The game logic is that if you just want a quick sale and to get back to sea, that isn't necessarily a deterrent, whereas if you go to the effort of doing the smuggling, you get a higher price. The real world logic is that contraband is probably not illegal but it is heavily taxed. If you're trustworthy then you're honest enough to pay the tax which is why you get less profit.

I agree with this. This hasn't been implemented yet? I tought I did so already in the past.
 
The existence of the smugglers' guild will come as no surprise to anybody who plays the "Smuggling for Thomas O'Reily" sidequest. They're the reason you are attacked when you go to collect the goods. ;) The location of a big house in La Grenade smugglers' lair named "House of Leader of smugglers" is also a bit of a giveaway, though the leader of the smugglers there is Desmond Ray Beltrop.

However, here's the guild-less smuggling handbook:
 

Attachments

  • smugglingbook.txt
    6.1 KB · Views: 76
Hmmm you could be right it might discourage people from smuggling. Altough we could increase the pay-out more because the risk is getting higher, that might incentivice people again. Say if only 50% of your smuggling attemps actually work and it still turns a profit that might incentivise people to try better at this?
Early in the game, you put all your money into a cargo of contraband. Several times. If you lose the whole lot just once, you're stuffed. I still say that random searches leading to you losing your cargo are a good way to ruin smuggling.
Once I have time again I will first work on the interfaces to make the information better acccesible.
Also I want to add a sidequest where you have a LOM and you can try to track down smugglers instead. This would offcourse make sure the smugglers like you less, but I think it would be nice to have a more land based mission also for characters to improve their standing with the govenor and try to increase their rank (altough the land based mission wont give that many points). For navy characters etc I think this would increase some immersion as you interact with a part of the game which you haven't interacted with much. The spying mission from the govenor was already intended for "good" characters to at least experience smuggling once. And I think helping tracking down smuggling deals might help to have a player try the other side also if he is playing a bad character.
Smuggling for the governor is now repeatable - it's basically the smuggling equivalent to ship-hunting. The difference is that you need a LoM to do it, whereas ship-hunting is effectively a one-shot LoM for anyone who doesn't have one.

A sidequest where you don't do any smuggling yourself but instead play an active role in arresting them could be more interesting, though. Otherwise smuggling for a governor is little more than basic smuggling with a "get out of jail free" card thrown in for when you meet the coastguard. (The coastguard now take the document from you, and so does the governor when you report back, so that at least you can't keep on using it as a "get out of jail free" card. If you want another document, you have to get another governor mission.)
 
Early in the game, you put all your money into a cargo of contraband. Several times. If you lose the whole lot just once, you're stuffed. I still say that random searches leading to you losing your cargo are a good way to ruin smuggling.

Ok I will think about it more :).
Smuggling for the governor is now repeatable - it's basically the smuggling equivalent to ship-hunting. The difference is that you need a LoM to do it, whereas ship-hunting is effectively a one-shot LoM for anyone who doesn't have one.

A sidequest where you don't do any smuggling yourself but instead play an active role in arresting them could be more interesting, though. Otherwise smuggling for a governor is little more than basic smuggling with a "get out of jail free" card thrown in for when you meet the coastguard. (The coastguard now take the document from you, and so does the governor when you report back, so that at least you can't keep on using it as a "get out of jail free" card. If you want another document, you have to get another governor mission.)
Ah okay. I will see what is possible with a more military kind of sidequest so this smuggling quest for the govenor can become a one time thing instead. I think that fit's better.
Found it in LAI_events, but I didn't quite manage to translate it to my case :eek: it was under "bool LAi_Character_CanDialog(aref chr, aref by)" which seems to check if the character is available for talking? I realised rn that probably that returns false when character is in dialog as they can't initiate another.. but oh well, making a note for later I guess

what I did instead was create a new function called PauseCoastGuardCheck
Code:
void CheckCoastGuard()
{
    ref PChar = GetMainCharacter();
    if(PChar.location == PChar.quest.contraband.CurrentPlace)
    {
        float chance_get_caught = GetEventData();
        if(Rand((100*SMUGGLING_TIME_CHANCE_MULT))<=chance_get_caught)
        {
            if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Coastguard found you!");
            Lai_QuestDelay("Rand_ContrabandInterruption",1.0);
            StopCoastGuardCheck();
        }
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING caught chance is "+chance_get_caught+" in "+(100*SMUGGLING_TIME_CHANCE_MULT));
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Evaded the Coastguard (for now)");
    }
    if(dialogRun || dialogSelf){
        SetEventHandler("PauseCoastGuardCheck","PauseCoastGuardCheck",1);
        PostEvent("PauseCoastGuardCheck",5000,"f",chance_get_caught);     
    }
    else PostEvent("CheckCoastGuard",5000,"f",chance_get_caught);
}

void PauseCoastGuardCheck()
{
    if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING paused during conversation");
    float chance_get_caught = GetEventData();
    if(!dialogRun && !dialogSelf) PostEvent("CheckCoastGuard",5000,"f",chance_get_caught);
    else PostEvent("PauseCoastGuardCheck",5000,"f",chance_get_caught);
}

it's called from CheckCoastGuard if dialogRun or dialogSelf (which is useless rn, but it's for future proofing I guess) is true. as you can see PauseCoastGuardCheck does nothing but save the caught chance and checks if the character is in dialog every 5 seconds. "spinning the disc", so to speak. when dialog ends it returns to CheckCoastGuard again. the event is deleted in StopCoastGuardCheck

I might have goofed as I don't quite know what I'm doing, but it seems to work so far!

Might I sugest you make this easier by just having the check in CheckCoastGuard:
Code:
if(PChar.location == PChar.quest.contraband.CurrentPlace)
    {
        float chance_get_caught = GetEventData();
        if(Rand((100*SMUGGLING_TIME_CHANCE_MULT))<=chance_get_caught)
        {
            if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Coastguard found you!");
            Lai_QuestDelay("Rand_ContrabandInterruption",1.0);
            StopCoastGuardCheck();
        }
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING caught chance is "+chance_get_caught+" in "+(100*SMUGGLING_TIME_CHANCE_MULT));
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Evaded the Coastguard (for now)");
    }
    if(dialogRun || dialogSelf){
        SetEventHandler("PauseCoastGuardCheck","PauseCoastGuardCheck",1);
        PostEvent("PauseCoastGuardCheck",5000,"f",chance_get_caught);     
    }
    else PostEvent("CheckCoastGuard",5000,"f",chance_get_caught);
and change it into this:
Code:
if(PChar.location == PChar.quest.contraband.CurrentPlace && (!dialogRun || !dialogSelf))
    {
        float chance_get_caught = GetEventData();
        if(Rand((100*SMUGGLING_TIME_CHANCE_MULT))<=chance_get_caught)
        {
            if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Coastguard found you!");
            Lai_QuestDelay("Rand_ContrabandInterruption",1.0);
            StopCoastGuardCheck();
        }
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING caught chance is "+chance_get_caught+" in "+(100*SMUGGLING_TIME_CHANCE_MULT));
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Evaded the Coastguard (for now)");
    }
    PostEvent("CheckCoastGuard",5000,"f",chance_get_caught);

alright, I've come up with a persuasion system that I hope could be fun! it's based on luck and leadership right now as I figure that is the most "charisma-like" score

Code:
           int pLeadership = CalcCharacterSkill(PChar,SKILL_LEADERSHIP);
           int pLuck = CalcCharacterSkill(PChar,SKILL_SNEAK);
           int PersuasionChance = 3+rand(pLuck)+pLeadership;
           if(CheckCharacterPerk(PChar,"Trustworthy")) PersuasionChance = PersuasionChance+1;
           if(CheckCharacterPerk(PChar,"IronWill")) PersuasionChance = PersuasionChance+1;
           //if(CheckCharacterPerk(PChar,"Charisma")) PersuasionChance = PersuasionChance+2;
           //if(CheckCharacterPerk(PChar,"WitCharm")) PersuasionChance = PersuasionChance+3;
           PersuasionChance = iClamp(4,16,PersuasionChance);
So, you get a persuasion chance between 4 and 16 depending on your stats and perks.

Code:
           int ThreeDice = ((rand(5)+1)+(rand(5)+1)+(rand(5)+1));

           if(ThreeDice <= PersuasionChance){
           trace("PersuasionChance: "+PersuasionChance+ "Dice: "+ ThreeDice + ". Persuasion Success!")
[...]

when you pick the dialog option, it rolls 3 6-sided dice for a number between 3 and 18. Why is this better than just one random number between 1-18? it creates a nice bell curve for odds of success! at a PersuasionChance of 5, you have a 4.6% chance of success, at 10 you have 50% and at 16+ you have a 98.9% chance of success. I'm all about the non-linear scales!

the chance is clamped at 4 and 16 so that there is always chance of success and always chance of failure. I've stolen this format directly and shamelessly from GURPS xD If anyone has any ideas for negative modifiers I think that could be fun too!

I'm quite pleased with the basics of it tbh, I'd love to use it in other dialog as well :p but I'm always open for the chance that I've messed up

since theres afaik theres no similar systems anywhere else in the game, I've been thinking about how to make the system more obvious
View attachment 31076
I've went the Divinity OS2 route and simply tell the player they succeeded or failed, so they get to know a check of some kind is run and that there is also a chance of success

anyway, I've added some random phrases too, with different answers for each. attaching the files!

The random number generator from POTC isn't that good with numbers under 10. The distribution isn't really random. I'd sugest multiplying your numbers a bit so instead of doing a D3 you do a D30, your changes will stay the same but the random number generator of potc will work better with numbers of 10 and higher.

lord knows I just want a reason to use these perk pics what I done :p
View attachment 31283View attachment 31284

also just realised the obvious solution to the picnic thing is to make sure the picnic line is the one that shows up if you have snogged. I still really dont like that event, but while its there anyway.. :p I can upload a new .c later after testing!

It's a good start for these perks, do check if you also assigned them for the right officerroles so officers can also have them ;).
But personally I prefer to have perks not serve a single purpose but have them expand more. But we can maybe find some more place where there is a attempt of persuation in sidequests etc, and add a check for this here :), I'll leave that up to you. One thing which comes mind is the haggling for the officer price. You can sometimes talk this down. Maybe this perk could help you here. Also Persuading a captain to give up instead of fight migth be a good place to add these perks.
Personally I would only add 1 perk but that's up to you :), altough I do think having 10% more leadership can cost you more than just 1 perk point ;).

I split this topic off from the other topic so it's more clear what we are talking about!
 
Might I sugest you make this easier by just having the check in CheckCoastGuard:
Code:
if(PChar.location == PChar.quest.contraband.CurrentPlace)
    {
        float chance_get_caught = GetEventData();
        if(Rand((100*SMUGGLING_TIME_CHANCE_MULT))<=chance_get_caught)
        {
            if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Coastguard found you!");
            Lai_QuestDelay("Rand_ContrabandInterruption",1.0);
            StopCoastGuardCheck();
        }
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING caught chance is "+chance_get_caught+" in "+(100*SMUGGLING_TIME_CHANCE_MULT));
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Evaded the Coastguard (for now)");
    }
    if(dialogRun || dialogSelf){
        SetEventHandler("PauseCoastGuardCheck","PauseCoastGuardCheck",1);
        PostEvent("PauseCoastGuardCheck",5000,"f",chance_get_caught);    
    }
    else PostEvent("CheckCoastGuard",5000,"f",chance_get_caught);
and change it into this:
Code:
if(PChar.location == PChar.quest.contraband.CurrentPlace && (!dialogRun || !dialogSelf))
    {
        float chance_get_caught = GetEventData();
        if(Rand((100*SMUGGLING_TIME_CHANCE_MULT))<=chance_get_caught)
        {
            if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Coastguard found you!");
            Lai_QuestDelay("Rand_ContrabandInterruption",1.0);
            StopCoastGuardCheck();
        }
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING caught chance is "+chance_get_caught+" in "+(100*SMUGGLING_TIME_CHANCE_MULT));
        if(DEBUG_SMUGGLING>1) TraceAndLog("SMUGGLING Evaded the Coastguard (for now)");
    }
    PostEvent("CheckCoastGuard",5000,"f",chance_get_caught);
That won't work. Partly because mixed || and && conditions don't work properly. And partly because !(condition 1 || condition 2) is not the same as !condition 1 || !condition 2. In fact, '!dialogRun || !dialogSelf' is always true - either you're not in a normal dialog or you're not in a self-dialog.

The correct condition would be:
Code:
if(PChar.location == PChar.quest.contraband.CurrentPlace && !dialogRun && !dialogSelf)
 
That won't work. Partly because mixed || and && conditions don't work properly. And partly because !(condition 1 || condition 2) is not the same as !condition 1 || !condition 2. In fact, '!dialogRun || !dialogSelf' is always true - either you're not in a normal dialog or you're not in a self-dialog.

The correct condition would be:
Code:
if(PChar.location == PChar.quest.contraband.CurrentPlace && !dialogRun && !dialogSelf)
yup true, I was confused for a moment there :).
Technically it shouldn't even check for dialogSelf, but always better to be sure for futureproofing.
 
Back
Top