1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

PA course on C

Discussion in 'Tutorials' started by Diomed, Jan 1, 2004.

  1. Thomas the Terror

    Thomas the Terror Mad Pirate Staff Member

    Joined:
    Jun 24, 2005
    Messages:
    4,436
    Gender:
    Male
    Location:
    In me Cabin
    Maybe you want to use Deringers skins. He has made some Norrington skins. Very nice ones, they are on the POTC ftp, under assorted characters and ship skins. From lieutenant to commodore.
     
  2. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    <!--quoteo(post=188369:date=Apr 7 2007, 01:53 PM:name=Thomas the Terror)--><div class='quotetop'>QUOTE(Thomas the Terror @ Apr 7 2007, 01:53 PM) [snapback]188369[/snapback]</div><div class='quotemain'><!--quotec-->Maybe you want to use Deringers skins. He has made some Norrington skins. Very nice ones, they are on the POTC ftp, under assorted characters and ship skins. From lieutenant to commodore.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks for that, I'll have a look. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

    But I need a midshipman first. (hint, hint ... I wonder if Deringer could ... hopeful hint)
     
  3. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    I have included a section where Cutler Beckett gives Jack the chance to join the East India Company.
    (I did this primarily for those who wanted to follow this story line as a change from the Main Quest)
    I had a thought that perhaps Khaol Roa could be re-named Saint Helena (The atlantic island of the East India Company) as the base for their activities.
    Geographically it is too near the other islands, but, I think we have already agreed that geographic issues must be accepted for what we have.
    QUESTION:
    Is it possible to change the island name WITHIN the program IF the player selects this option, maintaining the original name if they don't ? (I think it is unlikely to be do-able, but I thought I'd ask.)

    I realise that text issues would arise if the player "tripped" an action relating to the original quest (as I am using some of the original trade runs) but I am trying to minimise that likelyhood.

    (Obviously any island could be selected for the purpose of the game - I just used this one as an example)
     
  4. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    What does the LAi_QuestDelay part of this line do?

    if (CheckQuestAttribute("StartAdventure", "complete")) LAi_QuestDelay("Story_leavingOxbay", 0.0);
     
  5. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    It starts the quest "Story_leavingOxbay" after a "delay" of 0.0 seconds.

    A 0 delay doesn't make much sense of course, so in this form it immediately starts the next quest if the "StartAdventure" quest is complete.
     
  6. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    <!--quoteo(post=188461:date=Apr 8 2007, 01:56 AM:name=Short Jack Gold)--><div class='quotetop'>QUOTE(Short Jack Gold @ Apr 8 2007, 01:56 AM) [snapback]188461[/snapback]</div><div class='quotemain'><!--quotec--><!--quoteo(post=188369:date=Apr 7 2007, 01:53 PM:name=Thomas the Terror)--><div class='quotetop'>QUOTE(Thomas the Terror @ Apr 7 2007, 01:53 PM) [snapback]188369[/snapback]</div><div class='quotemain'><!--quotec-->Maybe you want to use Deringers skins. He has made some Norrington skins. Very nice ones, they are on the POTC ftp, under assorted characters and ship skins. From lieutenant to commodore.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks for that, I'll have a look. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

    But I need a midshipman first. (hint, hint ... I wonder if Deringer could ... hopeful hint)
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    There are some charactermodels which start with "RN", like rn_mdshp18_1.gm , which have Royal Navy uniforms.
     
  7. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    [/quote]
    There are some charactermodels which start with "RN", like rn_mdshp18_1.gm , which have Royal Navy uniforms.
    [/quote]

    Funny you should say that ... He's the one I'm using. Thanks.


    P.S. what does "vcskip" mean?
     
  8. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    I have an LAi-character who has finished his part of the quest on Oxbay so the program has exited the dialog file.

    case "originalOxbay_exit":
    Diag.CurrentNode = Diag.TempNode;
    DialogExit();
    AddDialogExitQuest("Beckett_Leaves_Oxbay");
    break;

    I need to re-enter the dialog at:
    case "Redmond_deliver_gold":

    In quest_reaction.c I need to "point" to: Beckett_Redmond_start (this sets up the character etc and points to Redmond_deliver_gold) (to put the character on Redmond)
    However in the same section (previously) I have Beckett_Oxbay_start with "delete start check"
    as I thought this would clear the way for Redmond. (if you see what I mean).

    The program runs - but when I get to Redmond - no Beckett.
    I have been look at the Edgar Attwod quest files and notice:
    characters(getcharacterindex("Edgar Attwood")).dialog.currentnode ="Setup1"
    is this resetting the program?
    The error message I get in the error log is: Quest reaction.c "Missing Array Index"

    I do not seem to be activating Beckett_Redmond _start. What am I doing wrong?

    also is there any difference between these:
    LAi_ActorWaitDialog(PChar,characterFromID("LAi's name"))
    LAi_ActorWaitDialog(characterFromID("LAi's name"), Pchar)
    I have seen it in both forms in quest reaction.c
    Thanks in advance.
     
  9. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    The command

    characters(getcharacterindex("Edgar Attwood")).dialog.currentnode ="Setup1"

    only lets the next dialog with Edgar start with the case "Setup1", so that the dialog doesn't start always with the same intro. You can also set the next-dialog-startcase at the end of an dialog, if you use

    case "originalOxbay_exit":
    Diag.CurrentNode = "Redmond_deliver_gold";
    DialogExit();

    instead of Diag.CurrentNode = Diag.TempNode



    You can also put the code that shall move Becket to Redmond directly into the dialog's exit case, like this

    case "originalOxbay_exit":
    Diag.CurrentNode = "Redmond_deliver_gold";
    DialogExit();
    ChangeCharacterAddressGroup(NPChar, "Redmond_port", "goto", "goto1");
    break;

    That would spare you all the trouble with the questcode. (Provided that Becket is the NPChar you are talking to, and he shall move right after the dialog)
     
  10. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    <!--quoteo(post=190259:date=Apr 18 2007, 09:38 PM:name=Short Jack Gold)--><div class='quotetop'>QUOTE(Short Jack Gold @ Apr 18 2007, 09:38 PM) [snapback]190259[/snapback]</div><div class='quotemain'><!--quotec-->P.S. what does "vcskip" mean?<!--QuoteEnd--></div><!--QuoteEEnd-->
    VC stands for Vice City, an ancient mod that generates all those random characters. During certain quests this is being disabled, cause it might break a quest if random bandits interfere with a questmeeting.

    That is being done by setting the location attribute vcskip to true for certain locations:

    Locations[FindLocation("Oxbay_town")].vcskip = true;

    sets random NPCs off for Oxbay town;

    Locations[FindLocation("Oxbay_town")].vcskip = false;

    reenables them.
     
  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    You might want to use <i>DeleteAttribute(&Locations[FindLocation("Oxbay_town")],"vcskip");</i> instead of <i>Locations[FindLocation("Oxbay_town")].vcskip = false;</i> . That is the way the re-enabeling of the VC mod is handled usually in the game code. I'm not sure how the code works, but if it just does a CheckAttribute(&Locations[FindLocation("Oxbay_town")],"vcskip"), then <i>Locations[FindLocation("Oxbay_town")].vcskip = false;</i> would NOT re-enable the VC mod, because the attribute would still be present. However, since CCC was the one who coded the VC mod, I dare say that what he says is, in fact, correct and setting the attribute to false would also work. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />

    BTW: Terry Rossio said that Captain Teague is NOT referred to as Jack's father anywhere in the script of At World's End.
     
  12. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    Thanks for that information guys.

    Re Father's name - I just refer to him as "your Father" right now so the specific name is not an issue.
     
  13. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    <!--quoteo(post=190682:date=Apr 21 2007, 10:04 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE(Pieter Boelen @ Apr 21 2007, 10:04 PM) [snapback]190682[/snapback]</div><div class='quotemain'><!--quotec-->You might want to use <i>DeleteAttribute(&Locations[FindLocation("Oxbay_town")],"vcskip");</i> instead of <i>Locations[FindLocation("Oxbay_town")].vcskip = false;</i> . That is the way the re-enabeling of the VC mod is handled usually in the game code. I'm not sure how the code works, but if it just does a CheckAttribute(&Locations[FindLocation("Oxbay_town")],"vcskip"), then <i>Locations[FindLocation("Oxbay_town")].vcskip = false;</i> would NOT re-enable the VC mod, because the attribute would still be present.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Absoletely right, deleting the whole attribute is safer, and clears an unneccessary variable. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
    BTW, the sophisticated parts of VC, including the check for quest interferences, were done by Nathan Kell <img src="style_emoticons/<#EMO_DIR#>/whistling.gif" style="vertical-align:middle" emoid=":wp" border="0" alt="whistling.gif" />
     
  14. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    Thanks again.

    Can items be given & taken to/from LAi players within the Dialog ?
    Such as swords etc.

    Also when an LAi character with follow mode is far away from Pchar I notice he runs to him.
    Can he be slowed down? or should I just move him nearer?
     
  15. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,628
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Just use a GiveItem2Character line with the proper character reference and you can give and item to any character in the game. Same for TakeItemFromCharacter.
     
  16. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    You can put every command that PotC uses into a dialogfile.
    It will be executed when you use the dialogoption that leads to the "case" containing the code.

    Or after ending the dialog, if you put it in a case containing the DialogExit(); command.


    About the running NPC, I ASSUME! that behaviour is coded somewhere in the LAI_follow file. But I wouldn't touch those if it isn't absolutely necessary.
     
  17. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    A question on locations.

    I have been finding them by trial and error (looking at existing characters data) - looking up their location and then using the ones that were appropriate or near to.

    However, I am sure that there must be a better way of finding locations in a given area, is there?

    My specific problem right now:
    I would like to put a character in the room above the Tailors Shop in Redmond.
    I can get the character into the tailors shop (Redmond_town04) using:
    "Redmond_TailorsShop", "sit", "sit1"
    but that puts him ontop of the Tailor (quite funny) he does "talk to me" so the dialog is O.K. but I cant find any other location in the shop (I have tried sit2 thro 5 and also goto goto1 through 5 with no result). I am wasting a lot of time on this, and I would PREFER the room upstairs anyway. (subject to footnote below)
    The room is locked - how do I unlock it? and what is/are the location code(s) in the room?
    or - how do I find them?
    Footnote:
    I do notice in Redmond tailors shop location there does not appear to be an upstairs.
    So if I'm correct here - can I uses, say, the building on the right as you enter the main town from the port? If so same questions. (open it and location numbers).
    If that also doesn't exist - can I make it? (inside that is).
    Thanks.
     
  18. CouchcaptainCharles

    CouchcaptainCharles COO (Chief Oddity Officer) Staff Member

    Joined:
    Jan 1, 1970
    Messages:
    1,410
    At the end of program\Internalsettings.h is some setting to make locators visible. Set it on and the locatorlabels will then be displayed in the game.

    The Location Cloning Tutorial in the PotC WIKI should tell you all you want to know about locations <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
     
  19. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    <!--quoteo(post=191804:date=Apr 27 2007, 05:00 PM:name=CouchcaptainCharles)--><div class='quotetop'>QUOTE(CouchcaptainCharles @ Apr 27 2007, 05:00 PM) [snapback]191804[/snapback]</div><div class='quotemain'><!--quotec-->At the end of program\Internalsettings.h is some setting to make locators visible. Set it on and the locatorlabels will then be displayed in the game.

    The Location Cloning Tutorial in the PotC WIKI should tell you all you want to know about locations <img src="style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks for the ".h" file info - REAL useful <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

    The cloning will take a little longer <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> <img src="style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" />
    I need to finish the story first.
     
  20. Short Jack Gold

    Short Jack Gold Very ancient mariner Storm Modeller

    Joined:
    Dec 5, 2006
    Messages:
    1,181
    Gender:
    Male
    Location:
    Florida USA
    Technical query: (name changed to protect the innocent)
    Finished chatting with an LAi - LAi_ActorGoToLocator(characterFromID("CCC"), "reload", "reload1", "CCC_fades2", 10.0)
    then
    case CCC fades2
    ChangeCharacterAddress(characterFromID("CCC"), "None", "");
    Character disappears in front of me.
    I changed it to:
    LAi_ActorGoToLocator(characterFromID("CCC"), "goto", "goto_40", "CCC_fades2", 10.0)
    then case CCC Fades etc.
    character walked away nicely, but, when I tried to enter the next part of the quest the program after SetEnterLocationQuest etc.
    then
    ChangeCharacterAddressGroup(CharacterFromID("CCC"),"Redmond_TailorsShop", "goto", "locator7");
    he failed to appear (didn't crash) just - nothing!
    Changed it back - to reload etc. - and he was there.
    It seems reload has something to do with it.
    Can you enlighten me? (pretty please!)
     

Share This Page