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

Various tech support stuff

Uninstall the game completely and then reinstall it, and make sure to not install it in any Program Files directory.
That would be my suggestion as well. If you installed the game into "Progam Files" or "Program Files (x86)", which is where it will want to go by default, you'll have all sorts of problems because Windows security does silly things there. In particular:

I guess it's also worth mentioning that my configurator for the game reports that options file and engine.ini are missing? (But they exist?)
That's the sort of thing Windows security can do - puts your custom files somewhere other than in "Program Files", then accesses them through a link which the game can't follow. So you can see your files but the game can't. I put my installation in "C:\Games\Pirates of the Caribbean".
 
Then it seems deleting and recreating the options file also wouldn't help, and something else also seems to be wrong with the installation.

One guy got it to work by reinstalling the game. We couldn't figure out why but it could be worth to try if you haven't already. Uninstall the game completely and then reinstall it, and make sure to not install it in any Program Files directory.

Here are also the files I uploaded in this thread, except for the UK engine.ini as further investigations have indicated that it makes no difference.
In addition two other files are also included - sea_patch.dll and vsync_patch.dll - and they are currently being evaluated as a solution to among other things the FPS and slowdowns problem. If you are limiting the FPS with the NVIDIA control panel or other program then remove those settings so only these files are in effect.
WILCO (will copy and comply), so to verify, do NOT install in Program Files or Program Files (x86) on ANY drive, F: or not, must have a dedicated directory, and I should delete and recreate the "options" file, and include the two patches

EDIT: Just read that it wouldn't make a difference, sometimes I'm blind, it seems, lol

EDIT 2: Graphics card changed a while ago to an NVIDIA RTX 3060 by MSI, still using Bandicam to limit the FPS, and SWEET MARY MOTHER OF JOSEPH, is it STABLE! The game just CRUISES along with little issue!

Alright, update, I am UNABLE to uninstall the game, via the Uninstall Programs program, or manually, it says I need permission from MYSELF to do so, which, I gave it permission on NUMEROUS occasions, but apparently the answer is "No", so I guess the game's perma-installed

EDIT: I guess Sublime was holding the folder up... Thanks, Sublime...

Another update: Even with the new files and a reinstall, buying ammo is still a no-go, not sure why...

EDIT: Slowdown was fixed though, not sure what did it, or how, but it wasn't Bandicam, given the request to not use it after the patches were put in
 
Last edited:
You got it up and running, but yes, do not install the game in either Program Files or Program Files (x86).

Slowdown was fixed though, not sure what did it, or how, but it wasn't Bandicam, given the request to not use it after the patches were put in
That would be vsync_patch.dll doing what it's supposed to do.

In any case, this is still strange. I can't reproduce the problem, and can buy cannon ammunition just fine - in both the US and UK versions.
Any chance you could put the game on another computer just to try if it works there?
 
You got it up and running, but yes, do not install the game in either Program Files or Program Files (x86).


That would be vsync_patch.dll doing what it's supposed to do.

In any case, this is still strange. I can't reproduce the problem, and can buy cannon ammunition just fine - in both the US and UK versions.
Any chance you could put the game on another computer just to try if it works there?
Negative, this is the ONLY computer I have

I take that back, does a Virtual Machine count?
 
Alright, update, I am UNABLE to uninstall the game, via the Uninstall Programs program, or manually, it says I need permission from MYSELF to do so, which, I gave it permission on NUMEROUS occasions, but apparently the answer is "No", so I guess the game's perma-installed
Folders "Program Files" and "Program Files (x86)" are probably owned by "System" or "Trusted Installer", or some other entity that is not you. If you have administrative rights on the PC, see if you can change their owner to you.

Failing that, you can have as many installations of the game as you like, drive space permitting. For reasons which have nothing to do with Windows stupidity, I have a couple of installations of the Build Mod plus an installation of the stock game. So you can ignore the one stuck in "Program Files (x86)", install the game again from CD, and this time tell the installer to put the game somewhere else.
 
Folders "Program Files" and "Program Files (x86)" are probably owned by "System" or "Trusted Installer", or some other entity that is not you. If you have administrative rights on the PC, see if you can change their owner to you.

Failing that, you can have as many installations of the game as you like, drive space permitting. For reasons which have nothing to do with Windows stupidity, I have a couple of installations of the Build Mod plus an installation of the stock game. So you can ignore the one stuck in "Program Files (x86)", install the game again from CD, and this time tell the installer to put the game somewhere else.
Way ahead of ya, I also found out that it was Sublime Text holding up the folder with the files being in-use

And I found the problem, turns out, one of the changes I made to one of the files is what did the game in, it decided it couldn't handle it, which change? Not a clue, could've been how much ammo I gave myself, could've been the money thing, hard to say
 
So it works now? At least that's good.

Also, please edit your posts instead of making several just minutes apart. I've merged them now, but please keep it in mind going forward.
 
Alright, new day, new wave of motivation! So back to getting Rex working, I went into both_reactions.c and added a section at the bottom for Rex, so I know where everything regarding him is, and for ease of access, I guess, but right now, he still just talks and the final line of dialog is as follows: "Let's go <Exit dialog, scripted teleport outside somewhere in the town, more dialog to imply sobering up>", of which is MY dialog selection, which just exits the dialog, could anyone get me up to speed on what I need to do to get him fully functional? Thanks in advance

UPDATE: I tried implementing the teleport and dialog scripting, and it works? But when the dialog is initiated, I get basically a broken UI and it says "<INVALID_TEXT>", the alternative method, using the win conditions thing also yielded no results, no teleport or anything, not sure why...
 
Last edited:
He should more properly have a section in quests_reaction.c and things regarding him would be an interplay between that file and his C and H files, and the file where he is defined - if you used Rys Bloom as a template I assume that is Officers.c. Speaking of which, here is a suggestion for his code block:
Code:
    makeref(ch,Characters[n]);            //Rex Hathaway
    ch.name     = "Rex";
    ch.lastname     = "Hathaway";
    ch.id        = "Rex Hathaway";
    ch.model    = "soldier_eng5";
    ch.sex = "man";
    ch.sound_type = "soldier";
    ch.location    = "Redmond_tavern";
    ch.location.group = "goto";
    ch.location.locator = "goto16";
    ch.Dialog.Filename = "Rex Hathaway_dialog.c";
    //ch.greeting = "Gr_Rex Hathaway";
    ch.rank     = 10;
    ch.reputation = "45";
    ch.experience = CalculateExperienceFromRank(10) + (CalculateExperienceFromRank(10)/10 + rand(10000));
    ch.skill.Leadership = "5";
    ch.skill.Fencing = "7";
    ch.skill.Sailing = "1";
    ch.skill.Accuracy = "1";
    ch.skill.Cannons = "1";
    ch.skill.Grappling = "1";
    ch.skill.Repair = "1";
    ch.skill.Defence = "1";
    ch.skill.Commerce = "1";
    ch.skill.Sneak = "1";
    ch.money = "0";
    LAi_SetHP(ch, LAI_DEFAULT_HP + (makeint(sti(ch.rank)-1)*5), LAI_DEFAULT_HP_MAX + (makeint(sti(ch.rank)-1)*5));
    ch.perks.list.BasicDefense = true;
    ch.perks.list.AdvancedDefense = true;
    ch.perks.list.CriticalHit = true;
    ch.perks.list.SwordplayProfessional = true;
    ch.perks.list.Gunman = true;
    ch.perks.list.GunProfessional = true;
    GiveItem2Character(ch, "blade1");
    ch.equip.blade = "blade1";
    GiveItem2Character(ch, "pistol2");
    ch.equip.gun = "pistol2";
    LAi_SetStayType(ch);
    n = n + 1;
You mentioned that he should be an elite soldier so it makes sense that he starts at a higher level and with a Melee skill of at least 7. Maybe his Leadership skill should be a bit higher than 1 as well. Accuracy only affects ship cannons, not pistols. Defense only affects ship combat, not melee combat. The other ship skills and the Commerce skill might not be relevant for him, and from your description of him he does not seem to be very lucky (Luck is "Sneak" in the code).

His HP is set to calculate according to his level.

As an elite soldier he should not only have a high Melee skill but also the Professional Fencer and Professional Gunman abilities, and thus their prerequisites. This gives him six abilities so his level should at least be 6 - I've set it to 10 here so per the game mechanic rules he could have four more but since no other abilities might be relevant for him the rules can be bent here a little so that he only has these. Maybe he could also have the Rush ability. You could also give him some other abilities or give him available ability points for the rest of the levels to assign in-game.

He has a standard Saber, and also a Long pistol as that might be appropriate for a soldier in this game. Remove the lines for the pistol if you don't want him to start with one.

This might be an appropriate code block for him. Adjust it to your liking.

For how to give him more functionality we can look at Rys Bloom as an example again. For example this in Rys Bloom_dialog.c:
Code:
        case "exit_hire":
            Diag.TempNode = "empty";
            Diag.CurrentNode = Diag.TempNode;
            DialogExit();
            AddDialogExitQuest("rys_becomes_officer");
        break;
Does this in quests_reaction.c:
Code:
        case "rys_becomes_officer":
            AddMoneyToCharacter(pchar, -500);
            AddPassenger(Pchar, characterFromID("Rys Bloom"), 0);
            LAi_SetOfficerType(characterFromID("Rys Bloom"));
            characters[getCharacterIndex("Rys bloom")].location = "none";
        break;
You would then add things to the dialog file and quest file as appropriate. For moving location and resuming the conversation it would look something like this in the files:
Code:
        case "somedialognode":
            Diag.CurrentNode = "someotherdialognode";
            DialogExit();
            AddDialogExitQuest("somequestcase");
        break;
Code:
        case "somequestcase":
            ChangeCharacterAddress(characterFromID("Rex Hathaway"), "somelocation", "somelocator");
            DoQuestReloadToLocation("somelocation", "somelocatorgroup", "somelocator", "someotherquestcase");
        break;

        case "someotherquestcase":
            LAi_ActorDialogNow(characterFromID("Rex Hathaway"), pchar, "anotherquestcase", -1);
        break;
You can look at existing cases to get an idea of what to do. It's been a while since I've done this so I might be forgetting something, but this should generally be how to make a character work.
 
He should more properly have a section in quests_reaction.c and things regarding him would be an interplay between that file and his C and H files, and the file where he is defined - if you used Rys Bloom as a template I assume that is Officers.c. Speaking of which, here is a suggestion for his code block:
Code:
    makeref(ch,Characters[n]);            //Rex Hathaway
    ch.name     = "Rex";
    ch.lastname     = "Hathaway";
    ch.id        = "Rex Hathaway";
    ch.model    = "soldier_eng5";
    ch.sex = "man";
    ch.sound_type = "soldier";
    ch.location    = "Redmond_tavern";
    ch.location.group = "goto";
    ch.location.locator = "goto16";
    ch.Dialog.Filename = "Rex Hathaway_dialog.c";
    //ch.greeting = "Gr_Rex Hathaway";
    ch.rank     = 10;
    ch.reputation = "45";
    ch.experience = CalculateExperienceFromRank(10) + (CalculateExperienceFromRank(10)/10 + rand(10000));
    ch.skill.Leadership = "5";
    ch.skill.Fencing = "7";
    ch.skill.Sailing = "1";
    ch.skill.Accuracy = "1";
    ch.skill.Cannons = "1";
    ch.skill.Grappling = "1";
    ch.skill.Repair = "1";
    ch.skill.Defence = "1";
    ch.skill.Commerce = "1";
    ch.skill.Sneak = "1";
    ch.money = "0";
    LAi_SetHP(ch, LAI_DEFAULT_HP + (makeint(sti(ch.rank)-1)*5), LAI_DEFAULT_HP_MAX + (makeint(sti(ch.rank)-1)*5));
    ch.perks.list.BasicDefense = true;
    ch.perks.list.AdvancedDefense = true;
    ch.perks.list.CriticalHit = true;
    ch.perks.list.SwordplayProfessional = true;
    ch.perks.list.Gunman = true;
    ch.perks.list.GunProfessional = true;
    GiveItem2Character(ch, "blade1");
    ch.equip.blade = "blade1";
    GiveItem2Character(ch, "pistol2");
    ch.equip.gun = "pistol2";
    LAi_SetStayType(ch);
    n = n + 1;
You mentioned that he should be an elite soldier so it makes sense that he starts at a higher level and with a Melee skill of at least 7. Maybe his Leadership skill should be a bit higher than 1 as well. Accuracy only affects ship cannons, not pistols. Defense only affects ship combat, not melee combat. The other ship skills and the Commerce skill might not be relevant for him, and from your description of him he does not seem to be very lucky (Luck is "Sneak" in the code).

His HP is set to calculate according to his level.

As an elite soldier he should not only have a high Melee skill but also the Professional Fencer and Professional Gunman abilities, and thus their prerequisites. This gives him six abilities so his level should at least be 6 - I've set it to 10 here so per the game mechanic rules he could have four more but since no other abilities might be relevant for him the rules can be bent here a little so that he only has these. Maybe he could also have the Rush ability. You could also give him some other abilities or give him available ability points for the rest of the levels to assign in-game.

He has a standard Saber, and also a Long pistol as that might be appropriate for a soldier in this game. Remove the lines for the pistol if you don't want him to start with one.

This might be an appropriate code block for him. Adjust it to your liking.

For how to give him more functionality we can look at Rys Bloom as an example again. For example this in Rys Bloom_dialog.c:
Code:
        case "exit_hire":
            Diag.TempNode = "empty";
            Diag.CurrentNode = Diag.TempNode;
            DialogExit();
            AddDialogExitQuest("rys_becomes_officer");
        break;
Does this in quests_reaction.c:
Code:
        case "rys_becomes_officer":
            AddMoneyToCharacter(pchar, -500);
            AddPassenger(Pchar, characterFromID("Rys Bloom"), 0);
            LAi_SetOfficerType(characterFromID("Rys Bloom"));
            characters[getCharacterIndex("Rys bloom")].location = "none";
        break;
You would then add things to the dialog file and quest file as appropriate. For moving location and resuming the conversation it would look something like this in the files:
Code:
        case "somedialognode":
            Diag.CurrentNode = "someotherdialognode";
            DialogExit();
            AddDialogExitQuest("somequestcase");
        break;
Code:
        case "somequestcase":
            ChangeCharacterAddress(characterFromID("Rex Hathaway"), "somelocation", "somelocator");
            DoQuestReloadToLocation("somelocation", "somelocatorgroup", "somelocator", "someotherquestcase");
        break;

        case "someotherquestcase":
            LAi_ActorDialogNow(characterFromID("Rex Hathaway"), pchar, "anotherquestcase", -1);
        break;
You can look at existing cases to get an idea of what to do. It's been a while since I've done this so I might be forgetting something, but this should generally be how to make a character work.
I implemented some of the suggested changes, figuring that it was helpful, as for the quest and dialog coding, I've implemented it and tried looking for what may help me within the existing files, and no teleport, the dialog.c for Rex is as follows:
Code:
#include "DIALOGS\Rex Hathaway_dialog.h"
void ProcessDialogEvent()
{
    ref NPChar;
    aref Link, Diag; //NextDiag;

    DeleteAttribute(&Dialog,"Links");

    makeref(NPChar,CharacterRef);
    makearef(Link, Dialog.Links);
    makearef(Diag, NPChar.Dialog);

    ref PChar;
    PChar = GetMainCharacter();
    
    switch(Dialog.CurrentNode)
    {
        case "exit":
            Diag.CurrentNode = Diag.TempNode; //"First time";
            DialogExit();
        break;

    
        case "First time":
            Dialog.defAni = "dialog_stay1";
            Dialog.defCam = "1";
            Dialog.defSnd = "dialogs\0\017";
            Dialog.defLinkAni = "dialog_1";
            Dialog.defLinkCam = "1";
            Dialog.defLinkSnd = "dialogs\woman\024";
            Dialog.ani = "dialog_stay2";
            Dialog.cam = "1";
            Dialog.snd = "dialogs\0\009";

            dialog.text = DLG_TEXT[0];
            link.l1 = DLG_TEXT[1];
            link.l1.go = "Node_2";
            link.l2 = DLG_TEXT[2];
            link.l2.go = "Exit";
        break;

        case "Node_2":
            dialog.text = DLG_TEXT[3];
            link.l1 = DLG_TEXT[4];
            link.l1.go = "Node_3a";
            link.l2 = DLG_TEXT[5];
            link.l2.go = "Node_3b";
            link.l3 = DLG_TEXT[6];
            link.l3.go = "Exit";
        break;

        case "Node_3a":
            dialog.text = DLG_TEXT[7];
            link.l1 = DLG_TEXT[8];
            link.l1.go = "Node_4";
        break;

        case "Node_3b":
            dialog.text = DLG_TEXT[9];
            link.l1 = DLG_TEXT[10];
            link.l1.go = "Exit";
            link.l2 = DLG_TEXT[11];
            link.l2.go = "Node_4";
        break;

        case "Node_4":
            dialog.text = DLG_TEXT[12];
            link.l1 = DLG_TEXT[13];
            link.l1.go = "Node_5";
        break;

        case "Node_5":
            dialog.text = DLG_TEXT[14];
            link.l1 = DLG_TEXT[15];
            link.l1.go = "exit_walk";
        break;

        case "exit_walk":
            Diag.CurrentNode = "After_Walk";
            DialogExit();
            AddDialogExitQuest("quest_afterWalk");
        break;

        case "After_Walk":
            dialog.text = DLG_TEXT[16];
            link.l1 = DLG_TEXT[17];
            link.l1.go = "Exit";
        break;

    }
}

Meanwhile the Rex-specific portion of the quest_reactions.c file is:
Code:
         case "quest_walk":
            ChangeCharacterAddress(characterFromID("Rex Hathaway"), "Redmond_town_04", "goto_7");
            DoQuestReloadToLocation("Redmond_town_04", "goto", "goto_38", "quest_afterWalk");
        break;

        case "quest_afterWalk":
            LAi_ActorDialogNow(characterFromID("Rex Hathaway"), pchar, "quest_addToCrew", -1);
        break;

        case "quest_addToCrew":
            characters[getCharacterIndex("Rex Hathaway")].dialog.currentnode="After_Walk";
        break;

It's VERY likely I'm doing something wrong, which wouldn't surprise me
 
Like I said it's been a while since I've done this so my recollection of how to do this might not be entirely accurate, but I think I see what is happening here.

Your AddDialogExitQuest calls a part that triggers a dialogue, but nothing else. Try something like this instead:
Code:
        case "exit_walk":
            Diag.CurrentNode = "After_Walk";
            DialogExit();
            AddDialogExitQuest("quest_walk");
        break;

        case "After_Walk":
            dialog.text = DLG_TEXT[16];
            link.l1 = DLG_TEXT[17];
            link.l1.go = "After_Walk_2";
        break;

        case "After_Walk_2":
            DialogExit();
            AddDialogExitQuest("quest_addToCrew");
        break;
Code:
        case "quest_walk":
            ChangeCharacterAddress(characterFromID("Rex Hathaway"), "Redmond_town_04", "goto_7");
            DoQuestReloadToLocation("Redmond_town_04", "goto", "goto_38", "quest_afterWalk");
        break;

        case "quest_afterWalk":
            LAi_ActorDialogNow(characterFromID("Rex Hathaway"), pchar, "", -1);
        break;

        case "quest_addToCrew":
            AddPassenger(Pchar, characterFromID("Rex Hathaway"), 0);
            LAi_SetOfficerType(characterFromID("Rex Hathaway"));
            characters[getCharacterIndex("Rex Hathaway")].location = "none";
        break;
That should - if I didn't mess up - reload you to another location, trigger a dialogue, and then add him to your crew, as I assume it is at this point that he is supposed to become your officer. It also seems he will need some more dialogue or else this will just repeat when talking to him again. He needs "idle" dialogue, for when he has nothing else to say, like here for Rys Bloom:

RysBloomidledialogue.jpg
 
Almost, it DOES reload him and I to another location, but doesn't trigger the dialogue, and I plan to add some more dialogue soon, just need to get this to work
 
This might work better:
Code:
        case "quest_afterWalk":
            LAi_SetActorType(characterFromID("Rex Hathaway"));
            LAi_ActorDialogNow(characterFromID("Rex Hathaway"), pchar, "", -1);
        break;
 
It workeded! Now to modify/add dialog according to the story, want me to do a video on the progress update?

Hit a block with the portraits, TX Converter keeps saying that there's an error opening the file...

Nevermind, I exported it with compression (and learned the hard way TO NOT TO)

Moar Progress
 
Last edited:
Seems you're making good progress! Though he should probably be added to the party as well:
Code:
        case "quest_addToCrew":
            AddPassenger(Pchar, characterFromID("Rex Hathaway"), 0);
            SetOfficersIndex(Pchar, -1, GetCharacterIndex("Rex Hathaway"));
            characters[getCharacterIndex("Rex Hathaway")].location = "none";
        break;
If the icon display doesn't update, use this:
Code:
        case "quest_addToCrew":
            AddPassenger(Pchar, characterFromID("Rex Hathaway"), 0);
            SetOfficersIndex(Pchar, -1, GetCharacterIndex("Rex Hathaway"));
            characters[getCharacterIndex("Rex Hathaway")].location = "none";
            PostEvent(EVENT_CHANGE_OFFICERS, 500);
        break;

Also, add this file in PROGRAM\INTERFACE to make the character icon display properly according to the set resolution.
 

Attachments

  • interface.zip
    7 KB · Views: 7
Seems you're making good progress! Though he should probably be added to the party as well:
Code:
        case "quest_addToCrew":
            AddPassenger(Pchar, characterFromID("Rex Hathaway"), 0);
            SetOfficersIndex(Pchar, -1, GetCharacterIndex("Rex Hathaway"));
            characters[getCharacterIndex("Rex Hathaway")].location = "none";
        break;
If the icon display doesn't update, use this:
Code:
        case "quest_addToCrew":
            AddPassenger(Pchar, characterFromID("Rex Hathaway"), 0);
            SetOfficersIndex(Pchar, -1, GetCharacterIndex("Rex Hathaway"));
            characters[getCharacterIndex("Rex Hathaway")].location = "none";
            PostEvent(EVENT_CHANGE_OFFICERS, 500);
        break;

Also, add this file in PROGRAM\INTERFACE to make the character icon display properly according to the set resolution.
The adding to the officer thing worked, but the interface is NOT working, not sure why...

Actually, I know why, editing characters_init.c requires a new game, so... yeah, oopsie on my end

Screenshot.png

Well, the icon is changed, had to start a new game, of course, but needless to say, it works, though my idea of using transparency didn't QUITE work according to plan, ah well

Anyway, it's good, trouble is, is I can't go into his stats thingy like I can a random officer, or any officer that I recruit, nor can I seem to give him any items, like a pistol if I so wish to, while, yes, I COULD just have him equipped with one from the start, I wanna be able to hand him one of mine instead
 
Last edited:
To be clear, the change in PROGRAM\INTERFACE\interface.c shouldn't require starting a new game and makes interface elements such as the character icon in the bottom-left corner display properly:

icondisplay.jpg


For Rex, you mean that even when he is in your party, you cannot view him on the Character screen and cannot use the "Exchange" command when standing in front of him? That's weird in that case. I can't think of any reason for why that wouldn't work. That should be possible once a character is actively set as an officer.
 
To be clear, the change in PROGRAM\INTERFACE\interface.c shouldn't require starting a new game and makes interface elements such as the character icon in the bottom-left corner display properly:

View attachment 44726

For Rex, you mean that even when he is in your party, you cannot view him on the Character screen and cannot use the "Exchange" command when standing in front of him? That's weird in that case. I can't think of any reason for why that wouldn't work. That should be possible once a character is actively set as an officer.
That seems to be the size of it, the "Exchange" menu opens, I just can't give him anything, which is odd... also that would explain why the icons resolutions are different, still pretty cool though

Additionally, the text doesn't start sticking to the "empty" node that I have set up now, it goes back to the "After_Walk" node (and onward), I'll look into Rys's code to see if I can pull anything that might help (Update: Got it, had to set the temp node and whatnot, easy peasy)

Oh yes, just thought to point out; I meant the icon for Rexy changed, which is what required a new game, because it required modification of the characters_init.c file

Alright, rate my code by how bad it is:
Code:
case "DEBUG_NODE_1":
            dialog.text = DLG_TEXT[50];
            link.l1 = DLG_TEXT[51];
            link.l1.go = "DEBUG_EXIT";
            link.l2 = DLG_TEXT[52];
            link.l2.go = "DEBUG_QUEST";
            if (NPChar.LAi_SetImmortal(ch) == false)
            {
                link.l3 = DLG_TEXT[53];
                link.l3.go = "DEBUG_IMM_FALSE";
            }
            else
            {
                link.l3 = DLG_TEXT[54];
                link.l3.go = "DEBUG_IMM_TRUE";
            }
            if (NPChar.SetCharacterRemovable(ch) == false)
            {
                link.l4 = DLG_TEXT[55];
                link.l4.go = "DEBUG_SCR_FALSE";
            }
            else
            {
                link.l4 = DLG_TEXT[56];
                link.l4.go = "DEBUG_SCR_TRUE";
            }
            link.l5 = DLG_TEXT[57];
            link.l5.go = "DEBUG_EXIT_DLG";
        break;
For context, I'm creating a debug menu because I want there to be a questline for Rex that actually runs in conjunction with the storyline, and I got it to go "ding", but the quest doesn't show in the quest book, even though I made the needed changes to the quests_texts.txt file, not sure what else is missing, because I did SetQuestHeader("rex_questline"); and AddQuestrecord("rex_questline", "1"); in the quests_reaction.c file and whatnot, so I guess I need one for when the quest is finished

I guess having a CloseQuest thingy fixed it (Ish)

So I guess Rexy being unremovable means that his profile can't be viewed? Bug in the game? Should he be removable while immortal? AND his inventory works as removable?! I'm confused!
 
Last edited:
There's some weirdness here. This ought to work better:
Code:
        case "DEBUG_NODE_1":
            dialog.text = DLG_TEXT[50];
            link.l1 = DLG_TEXT[51];
            link.l1.go = "DEBUG_EXIT";
            link.l2 = DLG_TEXT[52];
            link.l2.go = "DEBUG_QUEST";
            if (LAi_IsImmortal(NPChar) == false)
            {
                link.l3 = DLG_TEXT[53];
                link.l3.go = "DEBUG_IMM_FALSE";
            }
            else
            {
                link.l3 = DLG_TEXT[54];
                link.l3.go = "DEBUG_IMM_TRUE";
            }
            if (GetRemovable(NPChar) == false)
            {
                link.l4 = DLG_TEXT[55];
                link.l4.go = "DEBUG_SCR_FALSE";
            }
            else
            {
                link.l4 = DLG_TEXT[56];
                link.l4.go = "DEBUG_SCR_TRUE";
            }
            link.l5 = DLG_TEXT[57];
            link.l5.go = "DEBUG_EXIT_DLG";
        break;

Did you get the quest book to work, or is there still some weirdness with that?

So I guess Rexy being unremovable means that his profile can't be viewed? Bug in the game? Should he be removable while immortal? AND his inventory works as removable?! I'm confused!
Ah, yes, that's right, a character being unremovable means that they can't be viewed on the Character screen and that it's not possible to exchange items with them.

In PROGRAM\INTERFACE\character.c:
Code:
void SetNextParty(bool bRight)
{
    int i,cn;
    if(bRight)
    {
        curOfficer++;
        for(i=curOfficer; i<7; i++)
        {
            if(i<4)    {cn = GetOfficersIndex(xi_refMainChar,i);}
            else {cn = GetCompanionIndex(xi_refMainChar,i-3);}
            //if( cn>-1 && GetRemovable(GetCharacter(cn)) ) break;
            if( cn>-1 ) break;
        }
        if(i<7)
        {
            xi_refCharacter = GetCharacter(cn);
            curOfficer = i;
        }
        else
        {
            xi_refCharacter = xi_refMainChar;
            curOfficer = 0;
        }
    }
    else
    {
        curOfficer--;
        if(curOfficer<0) curOfficer=6;
        for(i=curOfficer; i>0; i--)
        {
            if(i<4)    {cn = GetOfficersIndex(xi_refMainChar,i);}
            else {cn = GetCompanionIndex(xi_refMainChar,i-3);}
            //if( cn>-1 && GetRemovable(GetCharacter(cn)) ) break;
            if( cn>-1 ) break;
        }
        if(i>0)    {xi_refCharacter = GetCharacter(cn);}
        else {xi_refCharacter = xi_refMainChar;}
        curOfficer = i;
    }
    AddCharacterExp(xi_refCharacter,0);
}

In PROGRAM\INTERFACE\itemsbox.c:
Code:
void ThatOneAndEquiped(string itmName1, string itmName2)
{
    /*if( !GetRemovable(g_refItems) )
    {
        SetSelectable("ONEDOWN_BUTTON",false);
        SetSelectable("ALLDOWN_BUTTON",false);
        SetSelectable("SWAP_BUTTON",false);
        SetSelectable("ONEUP_BUTTON",false);
        SetSelectable("ALLUP_BUTTON",false);
        return;
    }*/

    if( IsEquipCharacterByItem(GetMainCharacter(),itmName1) )
    {
        if( GetCharacterItem(GetMainCharacter(),itmName1)<=1 )
        {
            SetSelectable("ONEDOWN_BUTTON",false);
        }
        SetSelectable("ALLDOWN_BUTTON",false);
        SetSelectable("SWAP_BUTTON",false);
    }

    if( IsEquipCharacterByItem(g_refItems,itmName2) )
    {
        if( GetCharacterItem(g_refItems,itmName2)<=1 )
        {
            SetSelectable("ONEUP_BUTTON",false);
        }
        SetSelectable("ALLUP_BUTTON",false);
        SetSelectable("SWAP_BUTTON",false);
    }
}

Compare this to your own files and make the changes as shown to remove that limitation.
 
Back
Top