• 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

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;
Awesome, that should work, though I might need to adjust it given how I accidentally had it set up, but thank you

Did you get the quest book to work, or is there still some weirdness with that?
Yeah, we cookin' with bacon grease now, and once I get Rex the way I want him to be, I plan to remove the debug stuff, I just have it as temporary measures to test things
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.
Screenshot 2.png
Screenshot 3.png


Here are the comparisons made by a website I asked to compare the texts, the formatting on some of them apparently got lost or screwed up in some manner, but it's the best I could do, given that I'm untrained in this dept., but I suppose the only way I'll know if it worked is to make the changes

And now I can confirm that these changes worked flawlessly! It also took me all of a little while to realize what changes were made, and in order of appearance given to me;
Adding a line in PROGRAM\INTERFACE\character.c
And commenting out a section of code in PROGRAM\INTERFACE\itemsbox.c

Alright, so found a bug, because Rex is not removable, I can't seem to re-assign him for unknown reasons, this occurs later down the story approximately after the parts where you're reunited with your ship and crew in Isla Muelle, I forget exactly WHEN, but I will try again with Rex being removable another time, currently late for me
 
Last edited:
Here are the comparisons made by a website I asked to compare the texts, the formatting on some of them apparently got lost or screwed up in some manner, but it's the best I could do, given that I'm untrained in this dept., but I suppose the only way I'll know if it worked is to make the changes

And now I can confirm that these changes worked flawlessly! It also took me all of a little while to realize what changes were made, and in order of appearance given to me;
Adding a line in PROGRAM\INTERFACE\character.c
And commenting out a section of code in PROGRAM\INTERFACE\itemsbox.c
Yes, in character.c inside the if and then again inside the else a line was commented out and a line was added:
Code:
            //if( cn>-1 && GetRemovable(GetCharacter(cn)) ) break;
            if( cn>-1 ) break;
And in itemsbox.c this part was commented out:
Code:
    /*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;
    }*/

Alright, so found a bug, because Rex is not removable, I can't seem to re-assign him for unknown reasons, this occurs later down the story approximately after the parts where you're reunited with your ship and crew in Isla Muelle, I forget exactly WHEN, but I will try again with Rex being removable another time, currently late for me
You will probably have to set him as removable at some point, and can set him as unremovable again later. Typically an officer should probably only be set as unremovable when it is important for the story that he is present, and otherwise be removable.
 
Yes, in character.c inside the if and then again inside the else a line was commented out and a line was added:
Code:
            //if( cn>-1 && GetRemovable(GetCharacter(cn)) ) break;
            if( cn>-1 ) break;
And in itemsbox.c this part was commented out:
Code:
    /*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;
    }*/


You will probably have to set him as removable at some point, and can set him as unremovable again later. Typically an officer should probably only be set as unremovable when it is important for the story that he is present, and otherwise be removable.
Understood, it's not really necessary to keep him as unremovable, given he's immortal anyway, and I plan to make it so he reacts to the story as necessary with the needed conversations, and maybe I'll even add some goofy bits of conversation, maybe abusing the RandSwear or RandPhrase bits of code (Okay, not really ABUSING like abusing? But just using them in general). And since we're nearing what I believe is the end of the coding journey, I'm open to more ideas to put into Rexy

Encountered a bug, I finished the game and cleared out my saves, and I enter combat when I'm otherwise not supposed to, such as when I first approach the French soldiers guarding the Oxbay gate, and when I was approaching Greenford and when I went INTO Greenford, I was like "Uhhh, this might be a game-breaking bug, especially if it impacts my relations with England..."

I encountered another bug, it seems that the game doesn't like me modifying the chances of encounters, to the point where the raiders (or so I believe they are) appear in the taverns, so far, I've only encountered them in the large taverns in both Oxbay and Redmond, even reverting the file back doesn't work to solve this One reload of the LandEnc_Init.c file later, and rebuild to where the English Soldier becomes a possible hire, it should be fixed now
 
Last edited:
Just to be clear, you can make a new post if a reasonable amount of time, such as a day, has passed since your previous post. It's making several posts right after each other in a short time, such as just minutes apart, that's a no.

I don't have any other particular ideas of what could be added to Rex. It seems you have a good idea of how you want him to be.

For the bug, do you mean that the guards attack you even though you haven't done anything to provoke that, or what is it that is happening?

You seem to have solved your other issue, but it should be possible to adjust the encounter chance without affecting where the different encounters appear.
 
Just to be clear, you can make a new post if a reasonable amount of time, such as a day, has passed since your previous post. It's making several posts right after each other in a short time, such as just minutes apart, that's a no.

I don't have any other particular ideas of what could be added to Rex. It seems you have a good idea of how you want him to be.

For the bug, do you mean that the guards attack you even though you haven't done anything to provoke that, or what is it that is happening?

You seem to have solved your other issue, but it should be possible to adjust the encounter chance without affecting where the different encounters appear.
Ahh, understood

And yes, the guards seemed to attack me without any kind of provocation, and I agree that I should be able to adjust encounter chances without causing other things to happen, or having a wrong-encounter-location situation happening, but it is what it is, I suppose
 
Back
Top