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

Need Help Modifiyng Freeplay

When "hubguard1" walks up to you and fails to talk, quit the game and then post "compile.log" and "error.log".
Here are the files.

In "both_reaction.c", case "hubeng_traitor":
Code:
            ChangeCharacterAddressGroup(CharacterFromID("Hubwife7to9"), "none", "", "");
            ChangeCharacterAddressGroup(CharacterFromID("Hubwife9to10"), "none", "", "");

            ChangeCharacterAddressGroup(CharacterFromID("Hubwife10to12"), "none", "", "");
            ChangeCharacterAddressGroup(CharacterFromID("Hubwife12to13"), "none", "", "");

            ChangeCharacterAddressGroup(CharacterFromID("Hubwife13to18"), "none", "", "");
            ChangeCharacterAddressGroup(CharacterFromID("Hubwife18to19"), "none", "", "");

            ChangeCharacterAddressGroup(CharacterFromID("Hubwife19to20"), "none", "", "");
            ChangeCharacterAddressGroup(CharacterFromID("Hubwife20to7"), "none", "", "");
How many wives does this guy have? xD

Just one. :D Those are duplicates of her to show up in different rooms at different times of the day. I tried to put a few characters in the residence but as I'm unfamiliar with dialog writing they're currently mostly just for embellishment.
 

Attachments

  • guard compile.log
    25.3 KB · Views: 47
  • guard error.log
    2.7 KB · Views: 59
  • maid compile.log
    10.8 KB · Views: 54
  • maid error.log
    976 bytes · Views: 59
The problem with "FPHubMaidtest_dialog.c" is shown at the end of "maid_error.log":
Code:
COMPILE ERROR - file: dialogs\FPHubMaidtest_dialog.c; line: 62
Undeclared identifier: Diag
Line 62 is:
Code:
Diag.CurrentNode =  Diag.TempNode;
Presumably you copied that line from a different source than the declarations at the top of the file, including:
Code:
makearef(NextDiag, NPChar.Dialog);
Which means you don't have "Diag", you have "NextDiag". So line 62 should be:
Code:
NextDiag.CurrentNode =  NextDiag.TempNode;
So should lines 70 and 77.

I don't see anything in "guard_error.log" about dialogs. But there are complaints about "both_reaction", lines 3328, 3329 and 3330, which is odd because in the version of "both_reaction.c" which you posted this morning, line 3328 is blank. There are also a lot of complaints about "PROGRAM\Characters\characters_init.c", line 132, apparently missing a ')', again odd because in the version of "characters_init.c" which I have, line 132 is for a FreePlay Agent and gives the character an older style pistol in earlier periods. And I know that works because I tested my Agent FreePlay quest with Milady de Winter, who starts off in "Spanish Main" period and gets the pistol in question.

Could you upload your most recent versions of "both_reaction.c" and "characters_init.c"? Also, next time "hubguard1" fails to talk, post "system.log".
 
The problem with "FPHubMaidtest_dialog.c" is shown at the end of "maid_error.log":
Code:
COMPILE ERROR - file: dialogs\FPHubMaidtest_dialog.c; line: 62
Undeclared identifier: Diag
Line 62 is:
Code:
Diag.CurrentNode =  Diag.TempNode;
Presumably you copied that line from a different source than the declarations at the top of the file, including:
Code:
makearef(NextDiag, NPChar.Dialog);
Which means you don't have "Diag", you have "NextDiag". So line 62 should be:
Code:
NextDiag.CurrentNode =  NextDiag.TempNode;
So should lines 70 and 77.

I don't see anything in "guard_error.log" about dialogs. But there are complaints about "both_reaction", lines 3328, 3329 and 3330, which is odd because in the version of "both_reaction.c" which you posted this morning, line 3328 is blank. There are also a lot of complaints about "PROGRAM\Characters\characters_init.c", line 132, apparently missing a ')', again odd because in the version of "characters_init.c" which I have, line 132 is for a FreePlay Agent and gives the character an older style pistol in earlier periods. And I know that works because I tested my Agent FreePlay quest with Milady de Winter, who starts off in "Spanish Main" period and gets the pistol in question.

Could you upload your most recent versions of "both_reaction.c" and "characters_init.c"? Also, next time "hubguard1" fails to talk, post "system.log".

Before I look into that, I'd like to resolve first the dialog of the maid, since I can't for the life of me figure out what's wrong with it even after checking compile.log and error.log....perhaps I should take it step by step so the issues aren't too hard to identify...

Any ideas?
 

Attachments

  • FPHubMaid_dialog.c
    9.1 KB · Views: 56
  • FPHubMaid_dialog.h
    1.3 KB · Views: 49
  • compile.log
    11.1 KB · Views: 57
  • error.log
    1.3 KB · Views: 61
Before I look into that, I'd like to resolve first the dialog of the maid, since I can't for the life of me figure out what's wrong with it even after checking compile.log and error.log....perhaps I should take it step by step so the issues aren't too hard to identify...

Any ideas?
The problem with "FPHubMaidtest_dialog.c" is shown at the end of "maid_error.log":
Code:
COMPILE ERROR - file: dialogs\FPHubMaidtest_dialog.c; line: 62
Undeclared identifier: Diag
Line 62 is:
Code:
Diag.CurrentNode =  Diag.TempNode;
Presumably you copied that line from a different source than the declarations at the top of the file, including:
Code:
makearef(NextDiag, NPChar.Dialog);
Which means you don't have "Diag", you have "NextDiag". So line 62 should be:
Code:
NextDiag.CurrentNode =  NextDiag.TempNode;
So should lines 70 and 77.
;)
 
In this version, "error.log" is now complaining about "DIALOGS\English\FPHubMaid_dialog.h". That sort of error is difficult to track down because it usually means either a missing comma, a missing quote mark, a quote mark where it shouldn't be, or other such mistakes. And "error.log" doesn't say where in the file the error is. Looking at this one, "What do you need?" is missing the comma on the end.

About the rest of "FPHubMaid_dialog.c" and "FPHubMaid_dialog.h":
"FPHubMaid_dialog.h" is a declaration of an array of strings:
Code:
string DLG_TEXT[40] = {
What follows is a list of strings, separated by commas. The count starts at 0 so there can be up to 41 pieces of dialog text.

"FPHubMaid_dialog.c" is mostly references to that array. "dialog.text" is what the character says. "link.l1" is what you say in reply. "link.l1.go" is the next part of "FPHubMaid_dialog.c" which will show up after you say what is in "link.l1". If you want a choice of answers, they can be "link.l2", "link.l3", etc., each with a matching "link.l2.go", "link.l3.go" etc. to lead to the code for each answer. So:
Code:
dialog.text = DLG_TEXT[0];
means the character will say what is in the first line of text - which is actually line 2 in "FPHubMaid_dialog.h" because line 1 is the initial 'string DLG_TEXT' line. (If you use Notepad to edit "FPHubMaid_dialog.h", you can go to a line of text, press Ctrl-G, and it will show the line number. The 'DLG_TEXT' number will usually be 2 less than that.)

So "FPHubMaid_dialog.c", case "First time", has this:
Code:
            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "Exit";
            link.l2 = DLG_TEXT[2];
            link.l2.go = "room";
            link.l3 = DLG_TEXT[10];
            link.l3.go = "errands";
            link.l4 = DLG_TEXT[3];
            link.l4.go = "trade_1";
            link.l5 = DLG_TEXT[10];
            link.l5.go = "contactship";
It's fine up to the 'link.l3' part about errands. But 'link.l4' is set to DLG_TEXT[3], which is line 5 of "FPHubMaid_dialog.h", which is "For how long?" You probably want line 14, which is "Send me a list of items for purchase at the store." and which would be DLG_TEXT[12]. And 'link.l5' is set to DLG_TEXT[10], which means you'll probably have two answers saying "I need you to do certain errands for me." and one of them will actually lead to the shipyard. 'link.l5' should probably be line 15, "Contact the local shipwright.", which would be DLG_TEXT[13].

Except that the trade and shipyard parts won't work because they appear to be copied from a store owner and a shipyard owner. The maid is neither, so she probably won't have any goods or items for sale, nor will she have any ships. You'll just have to go to the store and shipyard yourself, just as you'll need to go to sea yourself if you want to use that ship and trade that cargo. :p
 
Last edited:
In this version, "error.log" is now complaining about "DIALOGS\English\FPHubMaid_dialog.h". That sort of error is difficult to track down because it usually means either a missing comma, a missing quote mark, a quote mark where it shouldn't be, or other such mistakes. And "error.log" doesn't say where in the file the error is. Looking at this one, "What do you need?" is missing the comma on the end.

Could you also upload "PROGRAM\Characters\characters_init.c"? There are messages about that in "error.log" which could indicate a more serious problem than a failing dialog.
 

Attachments

  • characters_init.c
    47.5 KB · Views: 58
Line 132 is this:
Code:
ch.equip.gun = (ch, "PiratesPistol");
That's wrong - it would be:
Code:
ch.equip.gun = "PiratesPistol";

Though that might not work either, and:
Code:
ch.equip.blade = "blade27";
might also not work. Better might be:
Code:
EquipCharacterByItem(PChar, "blade27");
EquipCharacterByItem(PChar, "PiratesPistol");
Having said that, you might not need to equip the weapons at all - none of the other characters have 'ch.equip' or 'EquipCharacterByItem' lines for their weapons.

Also:
Code:
GiveItem2Character(ch, "medical1");
GiveItem2Character(ch, "medical1");
GiveItem2Character(ch, "medical1");
GiveItem2Character(ch, "medical1");
... could be simplified to:
Code:
TakeNItems(ch, "medical1" , 4);
 
Line 132 is this:
Code:
ch.equip.gun = (ch, "PiratesPistol");
That's wrong - it would be:
Code:
ch.equip.gun = "PiratesPistol";

Though that might not work either, and:
Code:
ch.equip.blade = "blade27";
might also not work. Better might be:
Code:
EquipCharacterByItem(PChar, "blade27");
EquipCharacterByItem(PChar, "PiratesPistol");
Having said that, you might not need to equip the weapons at all - none of the other characters have 'ch.equip' or 'EquipCharacterByItem' lines for their weapons.

Also:
Code:
GiveItem2Character(ch, "medical1");
GiveItem2Character(ch, "medical1");
GiveItem2Character(ch, "medical1");
GiveItem2Character(ch, "medical1");
... could be simplified to:
Code:
TakeNItems(ch, "medical1" , 4);
So I think I'll just disable the guards' betrayal and simply try to trigger a mutiny if I decide to turn on England.

Current issue: the boarding models show up as "blaze"! Instead of using the uniforms of whatever flag I'm using. Ironically, using your code that I placed in the animists freeplay, I managed to get the random crewmen to show up as English soldiers. But the boarding models themselves, show up as Nathaniel Hawks.

To add to that, why are the mutineers' HP so low?

Also, I used this code from mutiny_map.c which I understand to be the event that occurs if you choose "I'm still captain, bastards!". However, if I'm on land, all it does is trigger some men to attack me. As I understand it, what should happen instead is for part of my crew to leave.

case "f***edup":
if(IsEntity(&worldMap)!=0)
{
DeleteAttribute(PChar,"ShipEnc");
// KK wdmReloadToSea();
// KK LAi_Fade("","");
PostEvent("Sea_StartMutiny", 0.0);
}
else
{
int tmpLangFileID = LanguageOpenFile("interface_strings.txt");
int crewOut = makeint(GetCrewQuantity(PChar)/3);
if(GetCrewQuantity(PChar)-crewOut<0) { crewOut = GetCrewQuantity(PChar); }
if(!bSeaActive && !CheckAttribute(PChar,"IsOnDeck"))
{
if(crewOut>0)
{
PChar.Ship.Crew.Quantity = GetCrewQuantity(PChar)-crewOut;
if(GetCrewQuantity(PChar)<=0) { PChar.Ship.Crew.Quantity = 0; }
switch(rand(1))
{
case 0: Log_SetStringToLog(crewOut + " " + LanguageConvertString(tmpLangFileID,"CrewMutinyLeavesShip")); break;
case 1: PostEvent("StartFight", 600.0); break;
}
DeleteAttribute(PChar,"Mutiny");
}
}
else
{
if(CheckAttribute(PChar,"IsOnDeck"))
{
if(crewOut>0)
{
PChar.Ship.Crew.Quantity = GetCrewQuantity(PChar)-crewOut;
if(GetCrewQuantity(PChar)<=0) { PChar.Ship.Crew.Quantity = 0; }
PostEvent("StartFight", 600.0);
DeleteAttribute(PChar,"Mutiny");
}
}
else { PostEvent("Sea_StartMutiny", 20); }
}
LanguageCloseFile(tmpLangFileID);
}
break;
 

Attachments

  • both_reaction.c
    212.9 KB · Views: 51
Last edited by a moderator:
Current issue: the boarding models show up as "blaze"! Instead of using the uniforms of whatever flag I'm using. Ironically, using your code that I placed in the animists freeplay, I managed to get the random crewmen to show up as English soldiers. But the boarding models themselves, show up as Nathaniel Hawks.
That happens when the game can't recognise the model you're trying to use. Can you show me the code where you assign the boarding models?

To add to that, why are the mutineers' HP so low?
Because the reason they mutiny is that their morale is low. HP is determined by morale, which is one reason why it's good to bombard an enemy ship with grapeshot before boarding - you reduce the enemy crew's size, and you also reduce their morale which reduces their HP.

Also, I used this code from mutiny_map.c which I understand to be the event that occurs if you choose "I'm still captain, bastards!". However, if I'm on land, all it does is trigger some men to attack me. As I understand it, what should happen instead is for part of my crew to leave.
I don't know the mutiny code in detail - in fact, I'm surprised it has any effect on land at all.
 
That happens when the game can't recognise the model you're trying to use. Can you show me the code where you assign the boarding models?

DeleteAttribute(PChar, "boardingmodels");
PChar.boardingmodels = GetRandomModelForType(true, "Soldiers");

I don't know the mutiny code in detail - in fact, I'm surprised it has any effect on land at all.

From what I've experienced, a mutiny typically triggers a screen where you can choose either "I'm still captain, bastards!" or pay them. If you choose the former, the mutiny fight on deck is triggered if you're at sea - if at land, the game just informs you that part of your crew left service.

Since this is so problematic, I might consider just sticking to decreasing the crew morale after the betrayal...
 
PChar.boardingmodels = GetRandomModelForType(true, "Soldiers");
Try:
Code:
PChar.boardingmodels = "Soldiers";
instead. That is what function 'JoinNavy' does.

From what I've experienced, a mutiny typically triggers a screen where you can choose either "I'm still captain, bastards!" or pay them. If you choose the former, the mutiny fight on deck is triggered if you're at sea - if at land, the game just informs you that part of your crew left service.
Whereas what you find is that you're attacked by some random men. Let that happen. Also do something like this:
Code:
PChar.Ship.crew.quantity = MakeInt(GetMaxCrewQuantity(PChar) * 3/5);
You can change the "3/5" to whatever you want. This is the line which reduces your crew at the start of "Tales of a Sea Hawk" or in some types of FreePlay so that you have to recruit some replacements. Alternatively:
Code:
SetSquadronCrewQuantityRatio(PChar, 0.6);
That should do the same, except that it also reduces the crew on your companion ships by the same amount. This is used when you switch crew payment by signing articles or reverting to salary and some of your crew desert. The actual code used there is:
Code:
SetSquadronCrewQuantityRatio(PChar, 0.2 * (1 + makefloat(CalcCharacterSkill(PChar, SKILL_LEADERSHIP))/3.0));
It's in "PROGRAM\Interface\kam_articles.c", function 'ProcessCommandExecute()', and the amount of crew who desert when you change payment depends on your "Leadership" skill.
 
Try:
Code:
PChar.boardingmodels = "Soldiers";
instead. That is what function 'JoinNavy' does.

That alone didn't seem to work. Fortunately I got it working by adding that other line from JoinNavy in NK.c.

Incidentally, I'd like to ask if there's a function I could use for cancelling a "case"? For the Barbossa2 freeplay I placed a case that would teleport Blackbeard to Cozumel and disable the world map if I entered. But this should stop happening if I don't enter in 10 days. However I don't know the code for it...
 
Incidentally, I'd like to ask if there's a function I could use for cancelling a "case"? For the Barbossa2 freeplay I placed a case that would teleport Blackbeard to Cozumel and disable the world map if I entered. But this should stop happening if I don't enter in 10 days. However I don't know the code for it...
Can you show the case which teleports to Cozumel and disables the worldmap? Also, how is this case triggered?
 
Can you show the case which teleports to Cozumel and disables the worldmap? Also, how is this case triggered?
Here's my entry for the Barbossa privateer freeplay.

case "Barb2FP_Continue":
SetQuestHeader("Beginning_FPBarb2");
AddQuestRecord("Beginning_FPBarb2", 1);
CloseQuestHeader("Beginning_FPBarb2");
AddQuestRecord("FPBarb2fightbeard", 1);

DeleteAttribute(PChar, "boardingmodels");
PChar.boardingmodels = "Soldiers";
for (i = 1; i <= 5; i++)
{
NPChar = CharacterFromID("Crewmember_0" + i);
SetModelFromID(NPChar, GetRandomModelForType(true, "Soldiers"));
}
for (i = 1; i <= 10; i++)
{
NPChar = CharacterFromID("Treas_Crewmember_" + i);
SetModelFromID(NPChar, GetRandomModelForType(true, "Soldiers"));
}

PChar.skill.Fencing = 8;
PChar.skill.Leadership = 10;
PChar.skill.Sailing = 7;
PChar.skill.Accuracy = 6;
PChar.skill.Cannons = 7;
PChar.skill.Grappling = 1;
PChar.skill.Commerce = 5;
PChar.rank = 30;
PChar.reputation = "36";
PChar.Perks.list.BasicDefence = true;
PChar.Perks.list.AdvancedDefence = true;
PChar.Perks.list.Toughness = true;
PChar.Perks.list.CriticalHit = true;
PChar.Perks.list.Gunman = true;
AddMoneyToCharacter(pchar, 10000);
//SetRank(PChar, PIRATE, 6);

//ChangeCharacterAddressGroup(CharacterFromID("John Clifford Brin"), "none", "", "");
//ChangeCharacterAddressGroup(CharacterFromID("WeatherbySwannFP"), "Redmond_Residence", "goto", "goto8");
//Towns[GetTownIndex("Redmond")].gov = "WeatherbySwannFP";
//characters[GetCharacterIndex("WillTurnerFP")].Dialog.Filename = "blacksmith4_dialog.c";
//ChangeCharacterAddressGroup(CharacterFromID("red_blacksmith"), "none", "", "");
//ChangeCharacterAddressGroup(CharacterFromID("WillTurnerFP"), "Red_blacksmith", "goto", "goto1");

Group_CreateGroup("EnemyGroup");
Group_AddCharacter("EnemyGroup", "BlackbeardBarb2FP");
Characters[GetCharacterIndex("BlackbeardBarb2FP")].recognized = true;
SetCharacterRelation(GetCharacterIndex("BlackbeardBarb2FP"),GetMainCharacterIndex(), RELATION_ENEMY);

Group_SetGroupCommander("EnemyGroup", "BlackbeardBarb2FP");
Group_SetAddress("EnemyGroup", "KhaelRoa", "Quest_ships", "Quest_Ship_4");

Pchar.quest.fightblackbeard.win_condition.l1 = "location";
Pchar.quest.fightblackbeard.win_condition.l1.location = "KhaelRoa";
Pchar.quest.fightblackbeard.win_condition = "fightblackbeard";

Pchar.quest.beardwin.win_condition.l1 = "NPC_Death";
Pchar.quest.beardwin.win_condition.l1.character = "BlackbeardBarb2FP";
pchar.quest.beardwin.win_condition.l2 = "location";
pchar.quest.beardwin.win_condition.l2.location = "KhaelRoa";
Pchar.quest.beardwin.win_condition = "beardwin";

pchar.quest.beardwin.fail_condition.l1 = "Timer";
pchar.quest.beardwin.fail_condition.l1.date.day = GetAddingDataDay (0, 0, 12);
pchar.quest.beardwin.fail_condition.l1.date.month = GetAddingDataMonth(0, 0, 12);
pchar.quest.beardwin.fail_condition.l1.date.year = GetAddingDataYear (0, 0, 12);
pchar.quest.beardwin.fail_condition = "beardlost";

break;

case "FightBlackbeard":

Group_SetPursuitGroup("EnemyGroup", PLAYER_GROUP);
Group_SetTaskAttack("EnemyGroup", PLAYER_GROUP, true);
Group_LockTask("EnemyGroup");

LAi_SetStayType(characterFromID("BlackbeardBarb2FP"));
bQuestDisableMapEnter = true;
Island_SetReloadEnableGlobal("KhaelRoa", false);
if(GetRMRelation(PChar, PIRATE) > REL_WAR) SetRMRelation(PChar, PIRATE, REL_WAR); // RM
LeaveService(PChar, PIRATE, false); // RM
UpdateRelations();
iForceDetectionFalseFlag = 1; // KK

break;

case "beardwin":
Island_SetReloadEnableGlobal("KhaelRoa", true);
bQuestDisableMapEnter = false;
RefreshBattleInterface(true);

//CloseQuestHeader("FPBarb2fightbeard");
AddQuestRecord("FPBarb2fightbeard",2);

//Pchar.quest.beardreward.win_condition.l1 = "location";
//Pchar.quest.beardreward.win_condition.l1.location = "KhaelRoa_port";
//Pchar.quest.beardreward.win_condition = "Story_LandedOnKhaelRoa";
break;

case "beardlost":
Group_SetAddress("EnemyGroup", "none", "", "");
bQuestDisableMapEnter = false;
CloseQuestHeader("FPBarb2fightbeard");
AddQuestRecord("FPBarb2fightbeard",4);
break;

The idea was that the player has the option to fight Blackbeard at the beginning and he's at Cozumel waiting for you for 12 days, otherwise he gets teleported out, the mission is failed, and you don't get a reward from the governor.
 

Attachments

  • both_reaction.c
    225.1 KB · Views: 46
This part:
Code:
Pchar.quest.fightblackbeard.win_condition.l1 = "location";
Pchar.quest.fightblackbeard.win_condition.l1.location = "KhaelRoa";
Pchar.quest.fightblackbeard.win_condition = "fightblackbeard";
... sets the trigger for the battle. This part:
Code:
pchar.quest.beardwin.fail_condition.l1 = "Timer";
pchar.quest.beardwin.fail_condition.l1.date.day   = GetAddingDataDay  (0, 0, 12);
pchar.quest.beardwin.fail_condition.l1.date.month = GetAddingDataMonth(0, 0, 12);
pchar.quest.beardwin.fail_condition.l1.date.year  = GetAddingDataYear (0, 0, 12);
pchar.quest.beardwin.fail_condition = "beardlost";
... sets the trigger for the 12 day timeout. But because it's "pchar.quest.beardwin.fail_condition", it's an alternative to "Pchar.quest.beardwin.win_condition", so it does not cancel the trigger for the battle, it only cancels the trigger for the end of the battle. After 12 days, you'll probably still fight Blackbeard but not get a reward for it. Change "pchar.quest.beardwin.fail_condition" to "Pchar.quest.fightblackbeard.fail_condition".

Perhaps it's significant that case "beardwin" includes this:
Code:
Island_SetReloadEnableGlobal("KhaelRoa", true);
... while case "beardlost" does not. At the very least, I'd expect that to mean that if you wait 12 days and then go to sea, you can never land back on Cozumel again.

You probably want to set 'iForceDetectionFalseFlag' to 0 at case "beardwin", otherwise no ship or fort will ever believe your false flags.
 
This part:
Code:
Pchar.quest.fightblackbeard.win_condition.l1 = "location";
Pchar.quest.fightblackbeard.win_condition.l1.location = "KhaelRoa";
Pchar.quest.fightblackbeard.win_condition = "fightblackbeard";
... sets the trigger for the battle. This part:
Code:
pchar.quest.beardwin.fail_condition.l1 = "Timer";
pchar.quest.beardwin.fail_condition.l1.date.day   = GetAddingDataDay  (0, 0, 12);
pchar.quest.beardwin.fail_condition.l1.date.month = GetAddingDataMonth(0, 0, 12);
pchar.quest.beardwin.fail_condition.l1.date.year  = GetAddingDataYear (0, 0, 12);
pchar.quest.beardwin.fail_condition = "beardlost";
... sets the trigger for the 12 day timeout. But because it's "pchar.quest.beardwin.fail_condition", it's an alternative to "Pchar.quest.beardwin.win_condition", so it does not cancel the trigger for the battle, it only cancels the trigger for the end of the battle. After 12 days, you'll probably still fight Blackbeard but not get a reward for it. Change "pchar.quest.beardwin.fail_condition" to "Pchar.quest.fightblackbeard.fail_condition".

Perhaps it's significant that case "beardwin" includes this:
Code:
Island_SetReloadEnableGlobal("KhaelRoa", true);
... while case "beardlost" does not. At the very least, I'd expect that to mean that if you wait 12 days and then go to sea, you can never land back on Cozumel again.

You probably want to set 'iForceDetectionFalseFlag' to 0 at case "beardwin", otherwise no ship or fort will ever believe your false flags.

Thanks for the advice.

How much XP do you think I should give for beating Blackbeard? Would 10 000 be sufficient? Level 40 is lategame, am I correct? I'm asking because I've decided to set Level 30 as the starting level for Barbossa2, and it astonished me that it takes like 1 million experience to get to Level 31.
 
If Barbossa2 is starting at level 30, which is a lot higher than any FreePlay character would normally start, then I have no idea what would be a suitable XP reward! By comparison, you don't get any XP reward for killing the regular Blackbeard on Isla de Muerte, your only reward is his magic sword. "BlackbeardBarb2FP" presumably has a special weapon and ship, which you'll get if you're allowed to board the ship and duel him in his cabin.

Did you make "BlackbeardBarb2FP" immortal like the regular Blackbeard? If so, you won't be able to harm his ship and you'll only be able to kill him with a poisoned weapon in a cabin duel.
 
If Barbossa2 is starting at level 30, which is a lot higher than any FreePlay character would normally start, then I have no idea what would be a suitable XP reward! By comparison, you don't get any XP reward for killing the regular Blackbeard on Isla de Muerte, your only reward is his magic sword. "BlackbeardBarb2FP" presumably has a special weapon and ship, which you'll get if you're allowed to board the ship and duel him in his cabin.

Did you make "BlackbeardBarb2FP" immortal like the regular Blackbeard? If so, you won't be able to harm his ship and you'll only be able to kill him with a poisoned weapon in a cabin duel.
I didn't make him immortal, but gave him high stats. He has the Sword of Triton if that's what you're referring to.

Maybe I should lower the starting level, but then he might be too hard to defeat due to the boarders' HP disparity.

I can't recall exactly what level constitutes lategame in this mod. In the stock game iirc level 20 was super late game, and I think levelling up's been made faster, so I assume level 40 to be the equivalent in the mod. The idea is that this Barbossa isn't a beginning character, but the Barbossa who's been through all 3 films.
 
But this is a starting character - it's the start of the game. ;) What rank is Barbossa supposed to be as a privateer? For comparison, some character models can start you off as a full naval admiral and they only set you to level 16. In general, you start FreePlay at level 5 and it's then up to you what you do with your life.

Instead of having Blackbeard attack right at the start of the game, how about setting it up to happen much later? Try something like this:
Code:
Pchar.quest.fightblackbeard.win_condition.l1 = "location";
Pchar.quest.fightblackbeard.win_condition.l1.location = "KhaelRoa";
Pchar.quest.fightblackbeard.win_condition.l2 = "Rank";
Pchar.quest.fightblackbeard.win_condition.l2.operation = ">=";
Pchar.quest.fightblackbeard.win_condition.l2.value = 30;
Pchar.quest.fightblackbeard.win_condition = "fightblackbeard";
I'm not sure whether this will work because I don't know if condition "Rank" has ever been used in the game before, but it's defined in "PROGRAM\QUESTS\quests_check.c". The idea is that if you return to Cozumel when you're high enough level (at least 30), then you'll fight Blackbeard. How you progress from starting level 5 up to level 30 is up to you, that's the "Free" part of "FreePlay". ;) You should be able to test it. Edit "InternalSettings.h", go to the bottom and enable cheatmode. Then start the game, sail away from Cozumel, press numeric keypad 4 which should level you up, keep pressing it until you hit level 30. Then sail back to Cozumel, where Blackbeard should be waiting for you.

If that doesn't work, there are other ways. One is to check your level whenever you arrive at Cozumel, if it's at least 30 then set up the battle, otherwise reset the check. Have a look at "quests_side.c", case "Blythe_gone_ship", which checks whether Nigel Blythe has at least a tier 7 ship and resets the check when you leave Puerto Rico waters if he hasn't. Another option, if a governor is offering a reward for defeating Blackbeard, is to do something with the governor's dialog. If you're at least level 30 then the governor can tell you to go to Cozumel to find Blackbeard.

By the way, there are now 5 films. You probably don't want to depict Barbossa as he was after film 5...
 
Back
Top