• 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

Lonious

Master Mariner
Would it be possible to make Freeplay a little more unique by putting in particular starting locations, skills, officers, etc. for each model that's chosen?

Seeing Malcolm Hatcher talk to Cutler Beckett and him starting out with hardly any wealth, for example, is a little bit of a letdown. I've managed to make very minimal changes to certain models - for example, choosing Animists1 as the model now gives me "Dark Teacher" as the name, Frigate_Sat "Mefisto" as the starting ship complete with the animist flags, and SwordMaster as the starting perk, and a custom Storyline title and description, then adding custom items to the start, but that's about it.

Perhaps there could be a way to fix some of the Freeplay models, such that if I choose for example Beckett, I automatically get Admiral Norrington as an Officer and 1 million gold as my starting wealth (after all, I'm supposed to be leading the EITC!). It would also make sense that Beckett should start in Jamaica instead of the backwater that's Barbados.

To be very specific - I'd like to start out experimenting with Animists1. Is there a code that could be used to make him use the CustomStart, and then teleport directly to the animist cave in Isla Muelle after? Perhaps a line that makes the player automatically teleport to the cave if he has the animist amulet (which I managed to give to him)? That's besides finding a way to disable the Strange Things sidequest as a whole, if this is at all possible.

I would really like to find out ways to customise these things on Freeplay, and I've been trying to tamper around with some of the files like both_reaction.c, but to no avail. I keep trying and trying with no results. I hope others could help out with my ideas here, I could be able to produce something of interest if I succeed.
 
Last edited:
Beckett: already starts with a tier 1 ship. Now you want to give him 1 million in free gold plus a high level officer for free? That basically means he starts the game with everything, which means there's not much reason to FreePlay him. ;) There might be a case for having Cutler Beckett start with a lot of money and a small ship, and still start at Speightstown - that, after all, is exactly how you first meet him when you're Captain Jack Sparrow playing "Hoist the Colours". Perhaps then set up a NPC Admiral Norrington somewhere, whom you have to meet and recruit, and that's when you get his tier 1 ship if you take it over for yourself. Perhaps put Admiral Norrington in "Redmond Naval HQ" or "Head_of_Jamaica_Station". These make up the Royal Navy HQ in Port Royale, currently only used in the "Hornblower" storyline, so you may as well make some extra use of it.

Animist: Take a look at "PROGRAM\Storyline\FreePlay\StartStoryline.c", specifically this section:
Code:
        case PLAYER_TYPE_SWORD_MASTER:
            if (GetMySimpleName(PChar) == "Bohdan Aleskeevich Voronov" && iNation == PERSONAL_NATION)
            {
                if(ENABLE_WEAPONSMOD) PChar.start_weapon.blade = "blade41+3";
                else PChar.start_weapon.blade = "blade41";
            }
        break;
Just before the 'break', you could probably insert something like this:
Code:
if (PChar.model == "Animists1")
{
    ch = CharacterFromID("Malcolm Hatcher");
    ch.nation = iNation;
    ch.Dialog.Filename = "Robert Fletcher_dialog.c";
    ch.name = TranslateString("","Avergorex");
    ch.lastname = "";
    SetModelfromArray(ch, GetModelIndex("undeadmon"));
}
Next, you'd need to edit "PROGRAM\Storyline\FreePlay\DIALOGS\Robert Fletcher_dialog.c" and "PROGRAM\Storyline\FreePlay\DIALOGS\ENGLISH\Robert Fletcher_dialog.h". In "Robert Fletcher_dialog.c", case "start", add a section:
Code:
case PLAYER_TYPE_SWORD_MASTER:
    dialog.text = DLG_TEXT[283];
    link.l1 = DLG_TEXT[284];
    link.l1.go = "stormystart";
break;
In "Robert Fletcher_dialog.h", you'd need to add a couple of lines at the end, one for Avergorex to say something to you and one for you to reply.

Next, you need to edit "PROGRAM\Storyline\FreePlay\QUESTS\both_reaction.c", case "stormystart". Find this section:
Code:
            switch(CharPlayerType)
            {
                case PLAYER_TYPE_NAVAL_OFFICER:    CustomStart = true;    break;
                case PLAYER_TYPE_ROGUE:            CustomStart = true;    break;
                case PLAYER_TYPE_GAMBLER:        CustomStart = true;    break;
                case PLAYER_TYPE_AGENT:            CustomStart = true;    break;
                case PLAYER_TYPE_SMUGGLER:        CustomStart = true;    break;
                case PLAYER_TYPE_CURSED:        CustomStart = true;    break;
                case PLAYER_TYPE_CORSAIR:
                    if (NationNoIsland(GetCurrentFlag(), GetCurrentPeriod()))    CustomStart = true;
                break;
            }
Before the 'break;', add this:
Code:
case PLAYER_TYPE_SWORD_MASTER: if (PChar.model == "Animists1") CustomStart = true; break;
Further down, at case "Custom_Start", find the 'switch(CharPlayerType)' section. Add this:
Code:
                case PLAYER_TYPE_SWORD_MASTER:
                    iNation = PIRATE;
                    questRecord = "Animist_Continue";
                break;
Find this part:
Code:
                    case PIRATE:
                        loadPort = "QC_port";
                        gotoGroup = "reload";
                        rldLocator = "reload1";
                        break;
Change it to:
Code:
                    case PIRATE:
                        if (CharPlayerType == PLAYER_TYPE_SWORD_MASTER && PChar.model == "Animists1")
                        {
                            loadPort = "Muelle_shore_02";
                            gotoGroup = "reload";
                            rldLocator = "see";
                        }
                        else
                        {
                            loadPort = "QC_port";
                            gotoGroup = "reload";
                            rldLocator = "reload1";
                        }
                        break;

There are several quest cases for various types of custom start, e.g. case "Navy_Continue", case "Agent_Continue" etc. Add a new one:
Code:
case "Animist_Continue":
    Island_SetReloadEnableLocal("IslaMuelle", "reload_2", true);
    SetQuestHeader("Beginning_Animist");
   AddQuestRecord("Beginning_Animist", 1);
   CloseQuestHeader("Beginning_Animist");
break;
And finally, create "RESOURCE\INI\TEXTS\ENGLISH\Storyline\FreePlay\QUESTBOOK\Beginning_Animist.txt". You can have a look at some of the other files in that folder to see how they're laid out, then write your own starting questbook.

Warning: I haven't had time to test any of this. There are probably typos. Expect the game to crash. If it does, post "error.log".
 
Last edited:
Beckett: already starts with a tier 1 ship. Now you want to give him 1 million in free gold plus a high level officer for free? That basically means he starts the game with everything, which means there's not much reason to FreePlay him. ;) There might be a case for having Cutler Beckett start with a lot of money and a small ship, and still start at Speightstown - that, after all, is exactly how you first meet him when you're Captain Jack Sparrow playing "Hoist the Colours". Perhaps then set up a NPC Admiral Norrington somewhere, whom you have to meet and recruit, and that's when you get his tier 1 ship if you take it over for yourself. Perhaps put Admiral Norrington in "Redmond Naval HQ" or "Head_of_Jamaica_Station". These make up the Royal Navy HQ in Port Royale, currently only used in the "Hornblower" storyline, so you may as well make some extra use of it.

Animist: Take a look at "PROGRAM\Storyline\FreePlay\StartStoryline.c", specifically this section:
Code:
        case PLAYER_TYPE_SWORD_MASTER:
            if (GetMySimpleName(PChar) == "Bohdan Aleskeevich Voronov" && iNation == PERSONAL_NATION)
            {
                if(ENABLE_WEAPONSMOD) PChar.start_weapon.blade = "blade41+3";
                else PChar.start_weapon.blade = "blade41";
            }
        break;
Just before the 'break', you could probably insert something like this:
Code:
if (PChar.model == "Animists1")
{
    ch = CharacterFromID("Malcolm Hatcher");
    ch.nation = iNation;
    ch.Dialog.Filename = "Robert Fletcher_dialog.c";
    ch.name = TranslateString("","Avergorex");
    ch.lastname = "";
    SetModelfromArray(ch, GetModelIndex("undeadmon"));
}
Next, you'd need to edit "PROGRAM\Storyline\FreePlay\DIALOGS\Robert Fletcher_dialog.c" and "PROGRAM\Storyline\FreePlay\DIALOGS\ENGLISH\Robert Fletcher_dialog.h".  In "Robert Fletcher_dialog.c", case "start", add a section:[code]
case PLAYER_TYPE_SWORD_MASTER:
    dialog.text = DLG_TEXT[283];
    link.l1 = DLG_TEXT[284];
    link.l1.go = "stormystart";
break;
In "Robert Fletcher_dialog.h", you'd need to add a couple of lines at the end, one for Avergorex to say something to you and one for you to reply.

Next, you need to edit "PROGRAM\Storyline\FreePlay\QUESTS\both_reaction.c", case "stormystart". Find this section:
Code:
            switch(CharPlayerType)
            {
                case PLAYER_TYPE_NAVAL_OFFICER:    CustomStart = true;    break;
                case PLAYER_TYPE_ROGUE:            CustomStart = true;    break;
                case PLAYER_TYPE_GAMBLER:        CustomStart = true;    break;
                case PLAYER_TYPE_AGENT:            CustomStart = true;    break;
                case PLAYER_TYPE_SMUGGLER:        CustomStart = true;    break;
                case PLAYER_TYPE_CURSED:        CustomStart = true;    break;
                case PLAYER_TYPE_CORSAIR:
                    if (NationNoIsland(GetCurrentFlag(), GetCurrentPeriod()))    CustomStart = true;
                break;
            }
Before the 'break;', add this:
Code:
case PLAYER_TYPE_SWORD_MASTER: if (PChar.model == "Animists1") CustomStart = true; break;
Further down, at case "Custom_Start", find the 'switch(CharPlayerType)' section. Add this:
Code:
                case PLAYER_TYPE_SWORD_MASTER:
                    iNation = PIRATE;
                    questRecord = "Animist_Continue";
                break;
Find this part:
Code:
                    case PIRATE:
                        loadPort = "QC_port";
                        gotoGroup = "reload";
                        rldLocator = "reload1";
                        break;
Change it to:
Code:
                    case PIRATE:
                        if (CharPlayerType == PLAYER_TYPE_SWORD_MASTER && PChar.model == "Animists1")
                        {
                            loadPort = "Muelle_shore_02";
                            gotoGroup = "reload";
                            rldLocator = "see";
                        }
                        else
                        {
                            loadPort = "QC_port";
                            gotoGroup = "reload";
                            rldLocator = "reload1";
                        }
                        break;

There are several quest cases for various types of custom start, e.g. case "Navy_Continue", case "Agent_Continue" etc. Add a new one:
Code:
case "Animist_Continue":
    Island_SetReloadEnableLocal("IslaMuelle", "reload_2", true);
    SetQuestHeader("Beginning_Animist");
   AddQuestRecord("Beginning_Animist", 1);
   CloseQuestHeader("Beginning_Animist");
break;
And finally, create "RESOURCE\INI\TEXTS\ENGLISH\Storyline\FreePlay\QUESTBOOK\Beginning_Animist.txt". You can have a look at some of the other files in that folder to see how they're laid out, then write your own starting questbook.

Warning: I haven't had time to test any of this. There are probably typos. Expect the game to crash. If it does, post "error.log".

The Avergorex is working, though I needed to change the Dialog numbers to the correct one (265/6 I believe). And I switched undeadmon to animists2 since that model seems to be missing from my models file.

However, the starting shore seems to be at random, as if it's the Castaway storyline, and the Quest Book displays "We should not have left port while there was a storm raging" or something.

Here are the files, perhaps you could have a look.
 

Attachments

  • StartStoryline.c
    55 KB · Views: 88
  • Robert Fletcher_dialog.c
    37.8 KB · Views: 95
  • Robert Fletcher_dialog.h
    35.7 KB · Views: 84
  • both_reaction.c
    149.6 KB · Views: 80
You're probably using an obsolete version of the game. Get the current version, along with the latest update, here:
Mod Release - Build 14 Gamma Version [Last update: 28th February 2022]

Avergorex is a demonic character model added by @Jacob which you'll see if you install the newer version. My idea was that he's your master, he's the reason for the temple. If you want the briefing officer to be your underling who has been building a temple for you, perhaps change his name and keep the "Animists2" model.

I see what I did wrong in "both_reaction.c":
Before the 'break;', add this:
Code:
case PLAYER_TYPE_SWORD_MASTER: if (PChar.model == "Animists1") CustomStart = true; break;
That should go after the 'break;'.
 

Attachments

  • both_reaction.c
    149.6 KB · Views: 79
Great. This seems like a good start. Hopefully I can expand to other characters later on. But first things first...

You're probably using an obsolete version of the game. Get the current version, along with the latest update, here:
Mod Release - Build 14 Gamma Version [Last update: 28th February 2022]

If I install this latest version, would it mean that the various files I've edited no longer apply? For example, I did a ton of changes to ships.init, among other things (like making the battle simulator I posted about earlier).
Mod Release - Build 14 Gamma Version [Last update: 28th February 2022]
Avergorex is a demonic character model added by @Jacob which you'll see if you install the newer version. My idea was that he's your master, he's the reason for the temple. If you want the briefing officer to be your underling who has been building a temple for you, perhaps change his name and keep the "Animists2" model.
Interesting character.

So was there a quest made for Avergorex? What does La Marianna have to do with him? In fact, what was La Marianna built for? Does she have some backstory?

I read about a plan earlier to re-do the Tales of a Sea Hawk storyline and remove all traces to the POTC films. That included replacing the Black Pearl with some cursed Mayan ship. That sounded so cool. Was the La Marianna the intended replacement? I can easily see Avergorex being the ghost of Cortes himself, and the La Marianna his ship...or Avergorex being some Mayan demon. Would've been an excellent replacement for the final boss of the standard storyline imo. Plus he could even serve as some link to the animists, thus connecting the two quests to each other. Maybe he is Cortes, or the demon who placed that curse on the coins for all we know.

I see what I did wrong in "both_reaction.c":

That should go after the 'break;'.

Okay, I managed to teleport now to the cave itself. Cool! But the next step is, to get rid of Dark Teacher, and the quest that involves him, if that is at all possible. And to change the animists walking around to stop saying "Leave us" and say something else. Because the moment I got in the cave, I ended up dueling him, weird.

I tried to modify the Animist dialogs, but now nothing appears in the dialog box. after talking to them. Here they are.

I also want to change the sound of the tutorial guy if that is possible, but have failed:

if (PChar.model == "Animists1")
{
ch = CharacterFromID("Malcolm Hatcher");
ch.nation = iNation;
ch.Dialog.Filename = "Robert Fletcher_dialog.c";
ch.name = TranslateString("","Dark");
ch.lastname = "Disciple";
ch.sound_type = "priest";
SetModelfromArray(ch, GetModelIndex("animists2"));
}
break;
 

Attachments

  • Quest_ANIMISTS_dialog.c
    7.4 KB · Views: 106
  • Quest_ANIMISTS_dialog.h
    3.9 KB · Views: 94
Last edited:
If I install this latest version, would it mean that the various files I've edited no longer apply? For example, I did a ton of changes to ships.init, among other things (like making the battle simulator I posted about earlier).
Yes, the latest version has a newer version of "Ships_init.c", adding some new ships; and the zip update includes some more. On the other hand, if you use the 'GiveShip2Character' commands in "console.c", you don't need to modify any ships to appear at Vanderdecken's shipyard, which means you don't need those changes to "Ships_init.c". But you will need to put all your other changes into newer versions of files because there are new sidequests, new characters and new FreePlay quests. So you'd probably be best to get the updated version now, before you do even more work!

Interesting character.

So was there a quest made for Avergorex? What does La Marianna have to do with him? In fact, what was La Marianna built for? Does she have some backstory?
There is no quest for Avergorex, though there is another character model from @Jacob, "Devillady", alias Dervia.

La Marianna has nothing to do with these characters. It's the work of @GhostOfDeath91, who has some ideas for a backstory involving a character named Ricardo Orellana. He's in the new version as a playable FreePlay character, and he's why you'll need the new version of "Robert Fletcher_dialog.c" and "Robert Fletcher_dialog.h" - Ricardo Orellana also has a custom start.

Okay, I managed to teleport now to the cave itself. Cool! But the next step is, to get rid of Dark Teacher, and the quest that involves him, if that is at all possible. And to change the animists walking around to stop saying "Leave us" and say something else. Because the moment I got in the cave, I ended up dueling him, weird.
The best place to do that would probably be "both_reaction.c", case "Animist_Continue". To remove Dark Teacher, add this:
Code:
ChangeCharacterAddressGroup(CharacterFromID("Dark Teacher"), "none", "", "");
To remove the animists, look through "PROGRAM\Characters\init\SideQuest.c", find anyone whose location is "Muelle_ANIMISTS", and add another 'ChangeCharacterAddressGroup' line into "both_reaction.c", case "Animist_Continue". And to disable the quest, add yet more 'ChangeCharacterAddressGroup' lines for each of the women at the top of "SideQuest.c". You can probably add one for Gheraed Drabbe as well. He's the captain you meet in Kralendijk tavern right after accepting the quest and probably won't say anything significant unless the quest has already been activated, but he serves no other purpose and is just taking up a seat.
 
Yes, the latest version has a newer version of "Ships_init.c", adding some new ships; and the zip update includes some more. On the other hand, if you use the 'GiveShip2Character' commands in "console.c", you don't need to modify any ships to appear at Vanderdecken's shipyard, which means you don't need those changes to "Ships_init.c". But you will need to put all your other changes into newer versions of files because there are new sidequests, new characters and new FreePlay quests. So you'd probably be best to get the updated version now, before you do even more work!


There is no quest for Avergorex, though there is another character model from @Jacob, "Devillady", alias Dervia.

La Marianna has nothing to do with these characters. It's the work of @GhostOfDeath91, who has some ideas for a backstory involving a character named Ricardo Orellana. He's in the new version as a playable FreePlay character, and he's why you'll need the new version of "Robert Fletcher_dialog.c" and "Robert Fletcher_dialog.h" - Ricardo Orellana also has a custom start.


The best place to do that would probably be "both_reaction.c", case "Animist_Continue". To remove Dark Teacher, add this:
Code:
ChangeCharacterAddressGroup(CharacterFromID("Dark Teacher"), "none", "", "");
To remove the animists, look through "PROGRAM\Characters\init\SideQuest.c", find anyone whose location is "Muelle_ANIMISTS", and add another 'ChangeCharacterAddressGroup' line into "both_reaction.c", case "Animist_Continue". And to disable the quest, add yet more 'ChangeCharacterAddressGroup' lines for each of the women at the top of "SideQuest.c". You can probably add one for Gheraed Drabbe as well. He's the captain you meet in Kralendijk tavern right after accepting the quest and probably won't say anything significant unless the quest has already been activated, but he serves no other purpose and is just taking up a seat.
Ok will check this.

By the way, I'd rather the animists in the cave stay except for the Teacher. I just tried to add 2 new lines (Lines 57 and 58) in the Dialog.h files but after editing their Dialog.c, now it just shows a blank dialog box.

Is if (Player_Type_Sword_Master && Player.Model == "Animists1") a valid code?
 
Ok will check this.

By the way, I'd rather the animists in the cave stay except for the Teacher. I just tried to add 2 new lines (Lines 57 and 58) in the Dialog.h files but after editing their Dialog.c, now it just shows a blank dialog box.
At the top of "Quest_ANIMISTS_dialog.h" is this line"
Code:
string DLG_TEXT[57] = {
Change the 57 to 59. It's declaring an array of 57 strings. "Quest_ANIMISTS_dialog.c" starts counting from 0, so the 57th line is DLG_TEXT[56], and your DLG_TEXT[58] is actually the 59th line. (You didn't need to do that for "Robert Fletcher_dialog.h" because it starts with 'string DLG_TEXT[340] = {', and there are a lot less than 340 lines of text at the moment - someone evidently left room for expansion.)

Is if (Player_Type_Sword_Master && Player.Model == "Animists1") a valid code?
No. Where are you trying to use it? If it's in "Quest_ANIMISTS_dialog.c" then the player character is defined as PChar near the top of the file. And 'CharPlayerType' is a global variable which can be used anywhere. So what you probably want is:
Code:
if (CharPlayerType == PLAYER_TYPE_SWORD_MASTER && PChar.model == "Animists1")
 
At the top of "Quest_ANIMISTS_dialog.h" is this line"
Code:
string DLG_TEXT[57] = {
Change the 57 to 59. It's declaring an array of 57 strings. "Quest_ANIMISTS_dialog.c" starts counting from 0, so the 57th line is DLG_TEXT[56], and your DLG_TEXT[58] is actually the 59th line. (You didn't need to do that for "Robert Fletcher_dialog.h" because it starts with 'string DLG_TEXT[340] = {', and there are a lot less than 340 lines of text at the moment - someone evidently left room for expansion.)


No. Where are you trying to use it? If it's in "Quest_ANIMISTS_dialog.c" then the player character is defined as PChar near the top of the file. And 'CharPlayerType' is a global variable which can be used anywhere. So what you probably want is:
Code:
if (CharPlayerType == PLAYER_TYPE_SWORD_MASTER && PChar.model == "Animists1")

I've managed to put in custom level, skills, HP, rep, and money to animist_continue. All nations are set to hostile. The cave animists also are now immortal and set to neutral so they don't fight me when I attack them.

I think I'm almost done here, but I still want to add in some Officers: Dark Captain, Father Gareth, and Jordano. To do this I made "clones" of them in Freeplay/characters/Officers.init. However, despite giving them unique IDs and having animists_continue add them as Passengers, the game says "missing character ID".

DarkCaptainFP has the same stats as the sidequest Dark Captain, is there a way I can assign to him a certain officer type in a way that I gain from all his additional skill bonuses? In the sense that I start with Sailing, Grappling, Cannons, Accuracy, etc. stats as only 1 but he has very high stats for those, and I gain from all those stats of his, not just separately.

Another issue here is that the Mefisto doesn't appear in the bay next to the cave. Rather, it's actually moored in the main Isla Muelle port, which ends in me getting fired at. This is despite my attempt at putting setCharacterShipLocation(PChar, "IslaMuelle_shore_02"); in both.reaction.c

If possible, I'd also like to have the men that appear on ship deck to be animists2 (I managed to make my boardermodels animists, I'm talking about the ones that appear on the regular ship deck).

Finally, the questbook has this strange typo at the end, but I don't recall putting anything funny in Beginning_Animist.txt.
 

Attachments

  • Screenshot (1630).png
    Screenshot (1630).png
    1.1 MB · Views: 132
  • Beginning_Animist.txt
    176 bytes · Views: 89
  • Officers.c
    18.1 KB · Views: 93
  • both_reaction.c
    164.9 KB · Views: 75
  • Screenshot (1631).png
    Screenshot (1631).png
    1.4 MB · Views: 104
Last edited:
Did you add those new characters while you had a game in progress? Try starting a new game so that the new characters are set up.

Once you have a character as an officer, you can change his position by pressing F2 and going to "Passengers". The character's default officer type is set by the 'ch.quest.officertype' line. For example, "DarkCaptainFP" has:
Code:
    ch.quest.officertype = OFFIC_TYPE_GUARD;
    LAi_SetMerchantType(ch);
    LAi_SetLoginTime(ch, 0.0, 24.0);
    LAi_SetHP(ch, 80.0, 80.0);
    ch.HPBonus = 100;        // KevAtl 08-26-2007 to correct for game giving low HP
    LAi_NoRebirthEnable(ch);
    ch.isOfficer = true;
    ch.quest.officertype = OFFIC_TYPE_GUARD; // Levis
He doesn't have a 'ch.questchar = true;' line which means the levelling system is going to scramble his skills. "GarethFP" does have 'ch.questchar = true;' but it's commented out, apparently by me, which probably means you copied that line from one of the women outside Kralendijk town hall. (I commented out the line there so that, if you're playing in "Early Explorers" period and the town is Spanish, the women all get replacement Spanish names.)

You can find a full list of officer types in "PROGRAM\Characters\officers.c" (not to be confused with "PROGRAM\Characters\init\Officers.c", which is character definitions). "DarkCaptainFP" is supposed to be a sea captain, so try changing his line to:
Code:
ch.quest.officertype = OFFIC_TYPE_CAPPIRATE;
You only need one 'ch.quest.officertype' for the character, but "DarkCaptainFP" has two of them - delete one!

The line 'setCharacterShipLocation(PChar, "IslaMuelle_shore_02");' in "both_reaction.c", case "Animist_Continue", won't do what you want and is too late - you've already been sent to San Juan port by case "Custom_Start" before it triggers "Animist_Continue". The real question is, why is it sending you to San Juan? It should only do that if you're Spanish, and if you've chosen to be Spanish then earlier code which is supposed to send you to the Animists' island won't activate. It's only set to recognise you as an Animist if you're a pirate.

Add a blank line at the end of "Beginning_Animist.txt". You should find that all other questbooks have a blank line at the end - we found some time ago that questbooks often had random junk at the end, and that adding a blank line to the end of the questbook prevented the junk.
 
Did you add those new characters while you had a game in progress? Try starting a new game so that the new characters are set up.

No, I always start a New Game when testing it.
Once you have a character as an officer, you can change his position by pressing F2 and going to "Passengers". The character's default officer type is set by the 'ch.quest.officertype' line. For example, "DarkCaptainFP" has:
Code:
    ch.quest.officertype = OFFIC_TYPE_GUARD;
    LAi_SetMerchantType(ch);
    LAi_SetLoginTime(ch, 0.0, 24.0);
    LAi_SetHP(ch, 80.0, 80.0);
    ch.HPBonus = 100;        // KevAtl 08-26-2007 to correct for game giving low HP
    LAi_NoRebirthEnable(ch);
    ch.isOfficer = true;
    ch.quest.officertype = OFFIC_TYPE_GUARD; // Levis
He doesn't have a 'ch.questchar = true;' line which means the levelling system is going to scramble his skills. "GarethFP" does have 'ch.questchar = true;' but it's commented out, apparently by me, which probably means you copied that line from one of the women outside Kralendijk town hall. (I commented out the line there so that, if you're playing in "Early Explorers" period and the town is Spanish, the women all get replacement Spanish names.)

You can find a full list of officer types in "PROGRAM\Characters\officers.c" (not to be confused with "PROGRAM\Characters\init\Officers.c", which is character definitions). "DarkCaptainFP" is supposed to be a sea captain, so try changing his line to:
Code:
ch.quest.officertype = OFFIC_TYPE_CAPPIRATE;
You only need one 'ch.quest.officertype' for the character, but "DarkCaptainFP" has two of them - delete one!
So I changed it to OFFIC_TYPE_CAPPIRATE and removed the extra ch.quest.officertype. However, there's been no change. It's still "missing character ID"?

By the way, this is the Officers.c in the Freeplay folder, not in the main characters/init folder.

Here's the current entry:

// Dark Captain
ch.old.name = "Dark";
ch.old.lastname = "Captain";
ch.name = TranslateString("","Dark");
ch.lastname = TranslateString("","Captain");
ch.id = "DarkCaptainFP";
ch.model = "animists2";
ch.sex = "man";
ch.loyality = 10;
ch.nation = PIRATE;
ch.alignment = "good";
ch.sound_type = "pirate";
GiveItem2Character(ch, "blade10");
ch.equip.blade = "blade10";
ch.location = "none";
ch.location.group = "none";
ch.location.locator = "none";
ch.Dialog.Filename = "Enc_Officer_dialog.c";
ch.greeting = "Gr_Jaoquin de masse";
ch.nation = PIRATE;
ch.rank = 8;
ch.reputation = "22";
TakeNItems(ch,"medical1", Rand(4)+1);
ch.experience = CalculateExperienceFromRank(8)+ (CalculateExperienceFromRank(8)/10 + rand(8000));
ch.skill.Leadership = "8";
ch.skill.Fencing = "10";
ch.skill.Sailing = "9";
ch.skill.Accuracy = "8";
ch.skill.Cannons = "9";
ch.skill.Grappling = "3";
ch.skill.Repair = "1";
ch.skill.Defence = "4";
ch.skill.Commerce = "1";
ch.skill.Sneak = "8";
ch.money = "0";
ch.quest.meeting = "0";
LAi_SetMerchantType(ch);
LAi_SetLoginTime(ch, 0.0, 24.0);
LAi_SetHP(ch, 80.0, 80.0);
ch.HPBonus = 100; // KevAtl 08-26-2007 to correct for game giving low HP
LAi_NoRebirthEnable(ch);
ch.isOfficer = true;
ch.quest.officertype = OFFIC_TYPE_CAPPIRATE;
ch.questchar = true;
AddGameCharacter(n, ch);

The line 'setCharacterShipLocation(PChar, "IslaMuelle_shore_02");' in "both_reaction.c", case "Animist_Continue", won't do what you want and is too late - you've already been sent to San Juan port by case "Custom_Start" before it triggers "Animist_Continue". The real question is, why is it sending you to San Juan? It should only do that if you're Spanish, and if you've chosen to be Spanish then earlier code which is supposed to send you to the Animists' island won't activate. It's only set to recognise you as an Animist if you're a pirate.

My only guess is that because the "reload location" is the Isla Muelle cave, then the game automatically places the ship in the island's default port. But there has to be something I can do to put the ship by the cave's shore, not the main port - after all, setCharacterShipLocation is used several times in the main storylines, and they certainly don't put your ship in the main port. :(

Another thing - I've tried to put a custom starting shiplog for animists1, but the game won't recognise it. It still shows the default Swordmaster starting shiplog. However, it did give me the Katana and animists amulet, which were put in the same entry:

case PLAYER_TYPE_SWORD_MASTER:
if (GetMySimpleOldName(ch) == "Dark Teacher" && ch.model == "animists1")//MAXIMUS 08.05.2019: GetMySimpleName will return TRANSLATED name, so - for other langs this code will not work.
{
ch.shiplog.Entry.log0 = "A new beginning awaits us. The Prince of Darkness is not appeased with our previous failure, but he has granted us one last chance if we can perform a sacrifice to appease him. And then he shall reward us with power beyond measure!";
GiveItem2Character(ch, "bladeC36");
GiveItem2Character(ch, "animists_amulet");
}
 
Last edited:
Try replacing:
Code:
loadPort = "Muelle_ANIMISTS";
gotoGroup = "goto";
rldLocator = "goto28";
with:
Code:
loadPort = "Muelle_shore_02";
gotoGroup = "reload";
rldLocator = "see";
 
Try replacing:
Code:
loadPort = "Muelle_ANIMISTS";
gotoGroup = "goto";
rldLocator = "goto28";
with:
Code:
loadPort = "Muelle_shore_02";
gotoGroup = "reload";
rldLocator = "see";
Ah, looks like all I needed was to use Muelle_shore02 instead of IslaMuelle_shore02.

Any findings as to the other issues?

EDIT: It looks like I needed to put the entry in the main Officers.c in the characters folder as well. Dark Captain now shows up. What puzzles me, though, is "Dark Teacher" - me myself - shows up as an available officer. And I can put him in ALL slots, but he doesn't show up?
 

Attachments

  • Screenshot (1632).png
    Screenshot (1632).png
    1.3 MB · Views: 107
Last edited:
No, what you needed to do was use "Muelle_shore02" instead of "Muelle_ANIMISTS".


See post #10.

So far things seem to be going well, thankfully. If I could just get 2 more things right: firstly, the voice of my my officers Gareth and Dark Captain just use "Oi laddie, ya got me 'ere" file. Is there anyway to change this?

Also, I'd like to change the models of the crewmembers on deck, if possible (not the boardermodels, I already managed to set that to animists). I'd imagine this needs to be changed as well for Barbossa and Davy Jones.
 
So far things seem to be going well, thankfully. If I could just get 2 more things right: firstly, the voice of my my officers Gareth and Dark Captain just use "Oi laddie, ya got me 'ere" file. Is there anyway to change this?
Both characters appear to have valid "ch.greeting" lines. But they're also set to use dialog file "Enc_Officer_dialog.c", which is really intended for randomly encountered officers such as those hired in taverns or captains from captured ships whom you hire. So the file automatically assigns a new greeting based on the officer's nation. Looking at the code in the file, it may be possible to prevent it from doing this. In the definitions for Father Gareth and Dark Captain, add this line:
Code:
ch.grsex = "man";
Does Jordano not have the same problem?

Also, I'd like to change the models of the crewmembers on deck, if possible (not the boardermodels, I already managed to set that to animists). I'd imagine this needs to be changed as well for Barbossa and Davy Jones.
I don't think this is possible. As far as I know, those models are built into the game engine. The cursed Black Pearl has a special mechanism so that it shows skeletons, again built into the game engine. Every other ship uses the standard deck crew models. (Look closely at them. They're not normal character models. Normal character models have noses.)
 
Both characters appear to have valid "ch.greeting" lines. But they're also set to use dialog file "Enc_Officer_dialog.c", which is really intended for randomly encountered officers such as those hired in taverns or captains from captured ships whom you hire. So the file automatically assigns a new greeting based on the officer's nation. Looking at the code in the file, it may be possible to prevent it from doing this. In the definitions for Father Gareth and Dark Captain, add this line:
Code:
ch.grsex = "man";
Does Jordano not have the same problem?
Will try this.
I don't think this is possible. As far as I know, those models are built into the game engine. The cursed Black Pearl has a special mechanism so that it shows skeletons, again built into the game engine. Every other ship uses the standard deck crew models. (Look closely at them. They're not normal character models. Normal character models have noses.)
I wasn't talking about the ones you see from the sea, but the ones walking around deck when you enter your ship, and those you'll see in the crew's quarters. Is it possible to modify their models, turn them into animists or skeletons for example?
 
Both characters appear to have valid "ch.greeting" lines. But they're also set to use dialog file "Enc_Officer_dialog.c", which is really intended for randomly encountered officers such as those hired in taverns or captains from captured ships whom you hire. So the file automatically assigns a new greeting based on the officer's nation. Looking at the code in the file, it may be possible to prevent it from doing this. In the definitions for Father Gareth and Dark Captain, add this line:
Code:
ch.grsex = "man";
Does Jordano not have the same problem?
Jordano uses sound type "male_citizen" while both Gareth and Dark Captain use "priest" in their files in characters/init/Officers.c. However, after changing Gareth's to "male_citizen" and Dark Captain's to "female_citizen" and assigning them both ch.grsex="man" in the Officers file, they both say "Si, Senor" always. This is whether or not their sound types are set to "male_citizen" or "female_citizen" or "priest" - nothing changes. Jordano says "Ola captian, so good to see you" always. This is quite puzzling, what's behind all this? Why won't their sound change?

While trying to wrap my head around this, I've tried to start making another custom Freeplay start - Robert Silehard. If I am able to accomplish this properly, then perhaps I could make a few "governor" Freeplays. As it is though, I'm confused as to how to make it work:

1 - I want to make the starting officer in the cabin Arabella Silehard, so I've put this entry in StartStoryline:

case PLAYER_TYPE_SOCIAL_CLIMBER:
if (GetMySimpleOldName(PChar) == "Robert Christopher Silehard" && PChar.model == "huber_eng")
{
ch = CharacterFromID("Malcolm Hatcher");
ch.nation = iNation;
ch.Dialog.Filename = "Robert Fletcher_dialog.c";
ch.name = TranslateString("","Arabella");
ch.lastname = "Silehard";
ch.sex = "woman";
ch.grsex = "woman";
SetModelfromArray(ch, GetModelIndex("towngirl1"));
}
break;

However, "Malcolm Hatcher" continues to speak in his original male voice. Additionally, I'd like to remove his sword, but what is the code to do this?

2 - I tried to make myself teleport to the governor's residence instantly. However, as in the earlier animists version, rain appears inside the building. Would there be a way to disable this from occurring, or to simply stop the weather being set to rainy?

3 - The fundamental part, is to actually make myself the governor. I tried to add this to case hubereng_continue:

CaptureColony("Redmond", PERSONAL_NATION);
CaptureColony("Greenford", PERSONAL_NATION);
CaptureColony("Oxbay", PERSONAL_NATION);

But what this does, is it gives the soldiers the "Personal Soldier" uniforms and they call me "Senor". Of course, this doesn't make sense as they should be wearing English uniforms, and calling my character "Sir".

This is in addition to leveling me up and notifying me that I've "captured" those towns - I don't want this to occur, I want them to be my colonies, but I don't want to make it look like I captured them (this actually sets my relation to England to -116).
 

Attachments

  • StartStoryline.c
    59.7 KB · Views: 84
  • both_reaction.c
    167.2 KB · Views: 79
Last edited:
I wasn't talking about the ones you see from the sea, but the ones walking around deck when you enter your ship, and those you'll see in the crew's quarters. Is it possible to modify their models, turn them into animists or skeletons for example?
I've been doing some investigating of this. There are two types of crewmember. Some are actual characters defined in "PROGRAM\Characters\init\Ship.c". And some are randomly generated when you go to the deck or crew quarters.

To change the permanent characters into Animists, put this into "both_reaction.c", case "Animist_continue":
Code:
DeleteAttribute(PChar, "boardingmodels");
PChar.boardingmodels = "Animists";
for (i = 1; i <= 5; i++)
{
    NPChar = CharacterFromID("Crewmember_0" + i);
    SetModelFromID(NPChar, GetRandomModelForType(true, "Animists"));
}
for (i = 1; i <= 10; i++)
{
    NPChar = CharacterFromID("Treas_Crewmember_" + i);
    SetModelFromID(NPChar, GetRandomModelForType(true, "Animists"));
}

For the randomly generated crew, put the attached file into "PROGRAM\LandEncounters". If you are wearing either the "Animists1" or "Animists2" outfits, the random crew should also become Animists. If you choose to switch to plain clothes, you'll see regular crewmembers next time you're on deck or in the cabin. But switching outfit won't restore the permanent crew.

Having figured out how to do that, I then had a go at Davy Jones. If you're the genuine cursed Davy Jones, rather than having bought Davy Jones' face from a pirate tailor, then you're carrying Davy Jones' chest, and that's what I check in "LEnc_monsters.c". And so:
davycrew.jpg
Snag 1 is I haven't got round to changing Davy Jones' permanent crew, which is why the guy walking at the back isn't a weedy skeleton. Snag 2 is that the new models such as "Penrod" are currently assigned to type "Davycrew", the same as the weedy skeletons, which is why Penrod is sitting there, and could also lead to several Penrods appearing randomly. I may remove the 'AssignModelType' line from each of the special characters, so random "Davycrew" will only be weedy skeletons, while Penrod, Hadras etc. can be used for special characters when needed - Davy Jones' FreePlay briefing officer, attackers in the "Elizabeth Shaw's Disappearance" quest, and for some of the permanent crew.
 

Attachments

  • LEnc_monsters.c
    72.7 KB · Views: 97
Jordano uses sound type "male_citizen" while both Gareth and Dark Captain use "priest" in their files in characters/init/Officers.c. However, after changing Gareth's to "male_citizen" and Dark Captain's to "female_citizen" and assigning them both ch.grsex="man" in the Officers file, they both say "Si, Senor" always. This is whether or not their sound types are set to "male_citizen" or "female_citizen" or "priest" - nothing changes. Jordano says "Ola captian, so good to see you" always. This is quite puzzling, what's behind all this? Why won't their sound change
I'm not sure. Try creating new dialog files for them rather than relying on "Enc_Officer_dialog.c".

While trying to wrap my head around this, I've tried to start making another custom Freeplay start - Robert Silehard. If I am able to accomplish this properly, then perhaps I could make a few "governor" Freeplays. As it is though, I'm confused as to how to make it work:

1 - I want to make the starting officer in the cabin Arabella Silehard, so I've put this entry in StartStoryline:

However, "Malcolm Hatcher" continues to speak in his original male voice. Additionally, I'd like to remove his sword, but what is the code to do this?
Why would Governor Silehard make his daughter an officer? She's not a sailor, and in any case is romantically involved with a Spanish officer and liable to leave home. Silehard's main naval officer in "Tales of a Sea Hawk" is Waulter Tomlison, though he has a ship of his own. Otherwise just make "Malcolm Hatcher" a regular naval officer, the same as if you FreePlay as a naval officer. The male voice and sword will no longer be a problem.

2 - I tried to make myself teleport to the governor's residence instantly. However, as in the earlier animists version, rain appears inside the building. Would there be a way to disable this from occurring, or to simply stop the weather being set to rainy?
I'm not sure. The best move is not to teleport to the governor's residence. If you start on board your ship then you'll come ashore in the port, after which you can walk to the residence. (Presumably you've removed "John Clifford Brin", the default governor character in Port Royale residence?)

3 - The fundamental part, is to actually make myself the governor. I tried to add this to case hubereng_continue:



But what this does, is it gives the soldiers the "Personal Soldier" uniforms and they call me "Senor". Of course, this doesn't make sense as they should be wearing English uniforms, and calling my character "Sir".

This is in addition to leveling me up and notifying me that I've "captured" those towns - I don't want this to occur, I want them to be my colonies, but I don't want to make it look like I captured them (this actually sets my relation to England to -116).
That is to be expected. You have captured the colonies for yourself rather than leaving them as British colonies. This is not entirely unreasonable as Silehard is corrupt, and as Nathaniel Hawk in "Tales of a Sea Hawk", you eventually bring him to justice in front of the replacement governor. So, if you want to be the corrupt Silehard, face the consequences - Britain wants you to hang!
 
Back
Top