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

Not a Bug Problem in ship hunting quest

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
@Pieter Boelen
This is what is says in governor.c
Code:
case "kill_pirate_completed":
            if(AUTO_SKILL_SYSTEM)
            {
                AddPartyExpChar(pchar, "Leadership", 1500);
                AddPartyExpChar(pchar, "Sneak", 15);
            }
            else { AddPartyExp(pchar, 1500); }
           PlayStereoSound("INTERFACE\took_item.wav");
            AddMoneyToCharacter(pchar, makeint(pchar.quest.generate_kill_quest.money));
            AddDialogExitQuest("kill_pirate_refused_2");
            ChangeCharacterReputation(pchar, 1);
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
            pchar.quest.generate_kill_quest = "wait_timer";
        break;

But shouldn't the quest be "kill_pirate_completed".

Btw what code do I need to run to make you gain some points for promotion?
 
@Pieter Boelen
This is what is says in governor.c
Code:
case "kill_pirate_completed":
            if(AUTO_SKILL_SYSTEM)
            {
                AddPartyExpChar(pchar, "Leadership", 1500);
                AddPartyExpChar(pchar, "Sneak", 15);
            }
            else { AddPartyExp(pchar, 1500); }
           PlayStereoSound("INTERFACE\took_item.wav");
            AddMoneyToCharacter(pchar, makeint(pchar.quest.generate_kill_quest.money));
            AddDialogExitQuest("kill_pirate_refused_2");
            ChangeCharacterReputation(pchar, 1);
            DialogExit();
            NextDiag.CurrentNode = NextDiag.TempNode;
            pchar.quest.generate_kill_quest = "wait_timer";
        break;
But shouldn't the quest be "kill_pirate_completed".
I know it looks weird and it confused me in the past as well, but it is actually correct.
"kill_pirate_complete" is triggered when you actually kill the pirate.
"kill_pirate_refused_2" just starts a timer that resets the quest, removes the questbook entry and allows you to get another one.

Not sure why it is called that, but it works, so I never bothered renaming it the few times I worked with that code.

Btw what code do I need to run to make you gain some points for promotion?
Depends on what you want to do. If is points being added after completing a certain quest, you might want to consider:
Code:
float UpdateRMRelation(ref char, int iNation, float fPoints)
Where char is the player.
This is the same function that is triggered when you sink/capture a ship and affects relations to all applicable nations.

If you don't want all that fancy behaviour, this is the function that simply adds some points and which is normally called as part of the UpdateRMRelation process:
Code:
float ChangeRMRelation(ref char, int iNation, float relch)

If you want to force an instant promotion, there is also this function:
Code:
void Promote_Cheat(ref rCharacter, int iNation)

Or this for the simplified approach:
Code:
SetRank(char, iNation, GetRank(char, iNation)+1);

Perhaps you'd like to give the player all the points for the next promotion, but leave the actual promotion with the governor:
Code:
SetRMRelation(char, iNation, RequiredNextRankDirect(GetRank(char, iNation)+1) );

Plenty options.... :wp
 
Back
Top