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

Information aboute The New Pirate Age - Update! [WIP]

Yes, we've got a dialogue asset in the project, so we'll add some sort of demo for that in the next release.
There won't be a full-fledged quest system for a while yet, but once we get that far, we'll explain how to start porting quests.
Ok but.
Will there be a Quest System?
As has already been said, not for a while. But there will be a quest system later. And then we will be told how to use it.

Until then, there's still Build 14.
 
The thing is, doing a Windows search for "LAI_MONSTERS_GROUP" turns up a few hits in "PROGRAM\Loc_ai". Searching for "monsters" gets a lot more hits, most referring to the locator group rather than the LAi group. The one time I found something actively being assigned, it was in "quests_reactions.c" for "standard", case "monster_generate_in_alcove":
Code:
       case "monster_generate_in_alcove":
           //ChangeCharacterAddressGroup(pchar, "Treasure_alcove", "teleport", "teleport0");

           LAi_group_SetLookRadius("monsters", 30.0);
           /*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "mummy", "goto", "monster1");
           LAi_group_MoveCharacter(sld, "monsters");

           /*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "mummy", "goto", "monster2");
           LAi_group_MoveCharacter(sld, "monsters");

           /*NK*/ sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, "mummy", "goto", "monster3");
           //LAi_SetMonkeyType(sld);
           LAi_group_MoveCharacter(sld, "monsters");
           LAi_group_FightGroups("monsters", LAI_GROUP_PLAYER, true);
       break;
In fact, I wasn't sure what the group name was either, at first, so I searched for keyword "monsters", ignored everything that referred to the locators, found that piece of code, and that's why I thought 'LAi_group_MoveCharacter(ch, "monsters");' would be right - someone has already used it. :confused:

@Grey Roger should I also put this code in me quest_reaction.c file?
 
That code comes from the "Tales of a Sea Hawk" storyline and is where some zombie Aztecs appear in the temple near the end of the storyline. I quoted it to show @Pieter Boelen how group "monsters" was being used in the game. He told me to change it to "LAi_monsters_group", so I did.

If you do not intend to create zombie Aztecs to attack the player, don't copy that code.

The conversation between @Pieter Boelen and me about "monsters" and "LAi_monsters_group" started after I suggested how you could put your DoFlamingo gang into the monster group so that they would attack the player. To repeat what I originally said, modified to use the correct group:

To place one of the DoFlamingo family members in Pirate Fort for example, add this to his character definition:
Code:
   ch.location    = "Pirate_Fort";
   ch.location.group = "goto";
   ch.location.locator = "goto1";
   LAi_group_MoveCharacter(ch, LAi_monsters_group);

Replace "goto" and "goto1" with the locator you want to use. When you start a new game and walk into Pirate Fort, he should now be standing there. Being in group "monsters", he might automatically attack you. If not, we can figure out some code to make it happen.
 
Ok I add this in the character definition.
For the lighthouse Pirates.

But they dont attack me, they fight again only i take me sword and fight!
 
Alright, then you'll need to add something to "quests_reaction.c" to detect when you get to the lighthouse, then make the pirates attack you when you are there.

Could you upload your current version of "quests_reaction.c"? Then I can see what progress you have made so far, and based on that, figure out what you need to do.
 
First off, let's correct what is already there. This bit is fine:
Code:
        case "Start":
          Pchar.quest.Trafalgar_joins.win_condition.l1 = "location";
           Pchar.quest.Trafalgar_joins.win_condition.l1.location = "Alice_tavern";
           Pchar.quest.Trafalgar_joins.win_condition = "Trafalgar_Law_joins";
              Pchar.quest.Redhair_joins.win_condition.l1 = "location";
           Pchar.quest.Redhair_joins.win_condition.l1.location = "Turks_Tavern";
           Pchar.quest.Redhair_joins.win_condition = "Redhair_joins";

        break;
So, when you go to Alice Town tavern, it will trigger case "Trafalgar_Law_joins". The problem is that you don't have case "Trafalgar_Law_joins". What you have is:
Code:
       case "Trafalgar D. Water Law":
           SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar_Law"));
       break;
The case name must match what you have in the "win_condition =" line. Change the case line to:
Code:
case "Trafalgar_Law_joins":
Likewise, change this line:
Code:
case "Red-Hair Shanks":
Replace "Red-Hair Shanks" with "Redhair_joins", because that is the name you used in the 'Pchar.quest.Redhair_joins.win_condition' line.

Case "Salazar Quest" is supposed to put a character called "Navigator" into Turks Island port, but it is not triggered anywhere. When is he supposed to go there?

Now, for making the DoFlamingo gang attack you - you now know from case "Start" how to make something happen when you go to a location. See if you can write another three lines, similar to the "Pchar.quest.Trafalgar_joins" ones. In these new lines, change "Trafalgar_joins" to something else. Change "Alice_tavern" to the lighthouse location. Change "Trafalgar_Law_joins" to something else. Then add this to "quests_reaction.c":
Code:
case "whatever you changed Trafalgar_Law_joins to":
    LAi_group_FightGroups(LAi_monsters_group, LAI_GROUP_PLAYER, true);
break;
If you've done it correctly then, when you arrive at the lighthouse, anything which is in group "LAi_monsters_group" should attack you. The pirates should be in that group, so they should obey that line.
 
That looks good so far. You have defined case "DoFlamingo_Attack" and case "Lighthouse_Pirates". Now you just need to trigger them.

Remember how, in case "start", you have this:
Code:
           Pchar.quest.Trafalgar_joins.win_condition.l1 = "location";
           Pchar.quest.Trafalgar_joins.win_condition.l1.location = "Alice_tavern";
           Pchar.quest.Trafalgar_joins.win_condition = "Trafalgar_Law_joins";
The first line says you are setting up a trigger when you go to a location. The second line says which location that is. The third line says which quest case is being triggered.

Now you need to add a similar set of three lines. Copy the three lines about "Trafalgar_joins". In this copy, replace "Trafalgar_joins" with something else - it doesn't matter what that is, as long as it is the same in all three lines. Replace "Alice_tavern" with the place you want to use. Replace "Trafalgar_Law_joins", at the end of the third line, with the name of the quest case you want to trigger. (Hint: in "TempQuestEnemy.c", you have set up some characters at "Oxbay_Lighthouse". You make them attack you in quest case "Lighthouse_Pirates".)
 
Ah ok fine.

Yes the Lighthouse Pirates Group are on the Oxbay_ Lighthouse.

Now i have uploadet it, placse Check it
 

Attachments

  • quests_reaction.c
    2.9 KB · Views: 52
Last edited:
In "quests_reaction.c":
Code:
          Pchar.quest.Trafalgar_joins.win_condition.l1 = "location";
        
           Pchar.quest.Trafalgar_joins.win_condition.l1.location = "Smugglers_Lair";
           Pchar.quest.Trafalgar_joins.win_condition = "DoFlamingo_Attack";
          Pchar.quest.Trafalgar_joins.win_condition.l1 = "location";
           Pchar.quest.Trafalgar_joins.win_condition.l1.location = "Oxbay_Lighthouse";
           Pchar.quest.Trafalgar_joins.win_condition = "Lighthouse_Pirates";
You can not use "Pchar.quest.Trafalgar_joins". You have already used that for this bit:
Code:
          Pchar.quest.Trafalgar_joins.win_condition.l1 = "location";
           Pchar.quest.Trafalgar_joins.win_condition.l1.location = "Alice_tavern";
           Pchar.quest.Trafalgar_joins.win_condition = "Trafalgar_Law_joins";
In the new parts, replace "Trafalgar_joins" with something else. All three lines which set the trigger for a quest case must have the same name, and it must not be the same as any previous trigger, or else it will replace that trigger. Here, because you have used "Trafalgar_joins" for both the new triggers as well as for Trafalgar Law joining you in Alice Tavern, only the last trigger will work. Nothing will happen when you go to Alice Tavern because its trigger has been replaced. Nothing will happen in Smugglers Lair because its trigger has been replaced.

Personally, I normally make the name for "Pchar.quest" the same as the quest name which is being triggered. That way I know I'm not using the same name as another trigger. And it is clear which lines are involved in triggering which quest case. So, for the first of the new triggers, I'd have:
Code:
           Pchar.quest.DoFlamingo_Attack.win_condition.l1 = "location";        
           Pchar.quest.DoFlamingo_Attack.win_condition.l1.location = "Smugglers_Lair";
           Pchar.quest.DoFlamingo_Attack.win_condition = "DoFlamingo_Attack";
See how the "Pchar.quest" name matches the quest case name? Do the same for the trigger for "Lighthouse_Pirates".
 
In "TempQuest.c" (and, for that matter, probably in "Story.c"), there is no such group as "BRITAIN_CITIZENS". Use "ENGLAND_CITIZENS" instead.
Code:
    ch.id        = "Trafalgar_Law";
    ch.model    = "Trafalgar_Law";
Code:
    ch.id        = "RedHair_Shanks";
    ch.model    = "RedHair_Shanks";
Code:
    ch.id        = "Silvers_Rayleigh";
    ch.model    = "Silvers_Rayleigh";
Code:
    ch.old.name = "Navigator";
    ch.old.lastname = "Navigator";
    ch.name = TranslateString("","Navigator");
    ch.lastname = TranslateString("","");
    ch.id        = "9S_Nav_b";
    ch.model    = "9S_Nav_b";
Code:
    ch.old.name = "The Smuggler";
    ch.old.lastname = "";
    ch.name = TranslateString("The Smuggler","");
    ch.lastname = TranslateString("The Smuggler","");
    ch.id        = "Dealer";
    ch.model    = "Dealer";
"ch.id" and "ch.model" do not need to be the same. In fact, if you look at other character files in other storylines, you'll find that they are very rarely the same. "ch.id" is a label which you'll use whenever you want to do something with the character. For example:
Code:
SetCompanionIndex(PChar, -1, GetCharacterIndex("Trafalgar_Law"));
That's using the "ch.id" for Trafalgar Law. "ch.id" is more likely to be the same as the character's name, rather than the character's model.

"ch.old.name" and "ch.name" are the character's first name. "ch.old.lastname" and "ch.lastname" are the character's last name. I'm not sure when the "ch.old" names are used, but "ch.name" and "ch.lastname" will give the character's name when you talk to him. So "Navigator" will probably work, but you're going to meet someone called "The Smuggler The Smuggler" because you've made both his first name and his last name to be "The Smuggler".

"ch.model" must match one of the character models in "RESOURCE\MODELS\Characters". If you have created your own character models for Trafalgar Law, Redhair Shanks and Silvers Rayleigh then their "ch.model" lines will work. 'ch.model = "Dealer";' will not work unless you have also created a new character model "Dealer.gm", which you probably don't need to do for someone who only appears once to tell you about Salazar. Pick one of the character models already defined, then change that 'ch.model' line to use it. As for Navigator, you probably want to change his 'ch.id' line, perhaps to ch.id = "Navigator"; Have you created a new model "9S_Nav_b"? If not, change his model to ch.model = "9S_Nav"; because model "9S_Nav" certainly exists.

In "quests_reaction.c": you have added a new quest case, "Dark_Assassin_Quest", and set up a trigger for it. Good! Now you just need to add another trigger for case "Lighthouse_Pirates", otherwise the gang at the lighthouse will still not attack.
 
Ah ok.

Yes I have created some New Models and maybe one more Model for a Information comes later(for the 7 Secrets of the Caribbean Sea ) for this Quest I need a later a Quest Book entry.

PS: On me Homepage you can see all what I Plan to make for New Horizon-Remastered - Update!
 
Last edited:
Probably because of their definitions in "TempQuestEnemy.c":
Code:
    ch.nation = PIRATE;
   ch.old.name = "Kuro";
    ch.name = TranslateString("","Kuro");
    ch.lastname = TranslateString("Kuro","");
    ch.id        = "Kuro";
    ch.model    = "Kuro";
    ch.sex = "man";
    ch.loyality = 15;
    ch.alignment = "good";
    ch.sound_type = "seaman";
    GiveItem2Character(ch, "blade4");
    ch.equip.blade = "blade4";
   GiveItem2Character(ch, "PiratesPistol");
   ch.equip.gun = "PiratesPistol";
    ch.location    = "Oxbay_Lighthouse";
    ch.location.group = "goto";
    ch.location.locator = "goto19";
   LAi_group_MoveCharacter(ch, LAi_monsters_group);
   ch.dialog.CurrentNode = "Node_1";  
    ch.greeting = "Gr_Officer_m common";
    ch.rank     = 1;
    ch.reputation = "45";
    ch.money = "10000";
    ch.quest.help = "0";
    ch.quest.dialog = "0";
    ch.questchar = true;
    LAi_SetCitizenType(ch);
   LAi_group_MoveCharacter(ch, "BRITAIN_CITIZENS");
   LAi_SetLoginTime(ch, 0.0, 24.0);
    ch.HPBonus = 100;        // KevAtl 08-26-2007 to correct for game giving low HP
    AddGameCharacter(n, ch);
First you put him in LAi_monsters_group:
Code:
LAi_group_MoveCharacter(ch, LAi_monsters_group);
And then you put him in group "BRITAIN_CITIZENS":
Code:
LAi_group_MoveCharacter(ch, "BRITAIN_CITIZENS");
So he is no longer in LAi_monsters_group. And that means, when you set LAi_monsters_group to attack, he ignores it. Remove the line for each lighthouse character which puts him in "BRITAIN_CITIZENS".

Did the gang in Smugglers Lair attack you? What about the enemy in the canyon?
 
Back
Top