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

POTC! Character Creation!!!

<!--quoteo(post=242679:date=Mar 3 2008, 02:31 AM:name=Estharos)--><div class='quotetop'>QUOTE (Estharos @ Mar 3 2008, 02:31 AM) <a href="index.php?act=findpost&pid=242679"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I want Jean LeLoup, Lorenzo and Dianna to never surrender, also I want Jean LeLoup to be board able only not Lorenzo and Dianna. So did I write the code right??<!--QuoteEnd--></div><!--QuoteEEnd-->Looks good to me. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />

<!--quoteo(post=242910:date=Mar 4 2008, 06:55 PM:name=Estharos)--><div class='quotetop'>QUOTE (Estharos @ Mar 4 2008, 06:55 PM) <a href="index.php?act=findpost&pid=242910"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Also what those code do?[/code]<!--QuoteEnd--></div><!--QuoteEEnd-->Good question. I'm not sure. I think the bQuestDisableMapEnter might have something to do with disabeling you to enter the map until the enemy is dealt with appropriately. Normally you can escape, but I think this will force you to either sink or capture him before being able to go to the map. Of course setting it to <i>false</i> is what you do <i>after</i> the sink/capture. Not at all sure on the <i>Group_DelCharacter</i> thing. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
Thanks, again Pieter, I didn't realyse until yesterday how it's complicated to create a battle and make sure that all possibility are cover. For the battle a create Hornblower and bush help you fight Jean LeLoup fleet and I got 4 possibilities(4 route) that the player will have to take after the Fleet is dead. Here are those route;

1. What happen after Jean LeLoup and companion die but Bush die and Hornblower leaves. (route1)

2. What happen after Jean LeLoup and companion die but Hornblower die and Bush leaves. (route2)

3. What happen after Jean LeLoup and companion die but Bush and Hornblower die. (route3)

4. What happen after Jean LeLoup and companion die but no casualties on your side. (route4)

I'm trying to separate them with the <i>if</i> command but don't know how to start it. Route4 is quite easy to do but 1, 2 and 3 it's different.

So, for those routes how I should complete the <i>if</i> command:


1. <i>if</i> Bush died go to this <i>case</i>

2. <i>if</i> Hornblower died go to this <i>case</i>

3. <i>if</i> Hornblower and Bush died go to this <i>case</i>

4. <i>else</i> go to this <i>case</i>

I see what I can do, if you guys can give me a hint where to look for this I will appreciated.

<b>Also is it possible to:</b>

1. set a characters ship to be indestructible, ei: Set Bush brig to be indestructible. Just in case I can't work out the other routes so I have a walk around for the moment.

2. set the quest that if you got officer already assign as companion the quest won't start. This is to avoid the character to lose is current escort because in quest they will assign him ship escort.

Thanks.



<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Would something like this work?<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if(!LAi_IsDead(characterFromID("William Bush")) && !LAi_IsDead(characterFromID("Horatio Hornblower")))
{
    // do something
}
else
{
    if(LAi_IsDead(characterFromID("William Bush")))
    {
        // do something else 1
    }
    if(LAi_IsDead(characterFromID("Horatio Hornblower")))
    {
        //do something else 2
    }
}<!--c2--></div><!--ec2-->
Also you can set characters to be immortal with:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->LAi_SetImmortal(characterFromID("William Bush"), true);<!--c2--></div><!--ec2-->
Perhaps something like this would work for preventing the quest if you already have companions?<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (SetCompanionIndex(pchar, -1, GetCharacterIndex(npchar.id)) == GetCharacterIndex(npchar.id) && FindFellowtravellers(PChar, NPChar) == FELLOWTRAVEL_NO)<!--c2--></div><!--ec2-->That comes from the Danielle dialog; not entirely sure how it works. Perhaps you can figure it out.
 
Thank again Pieter, you rock. <img src="style_emoticons/<#EMO_DIR#>/monkeydance.gif" style="vertical-align:middle" emoid=":mi" border="0" alt="monkeydance.gif" />


<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Always happy to help if I can. <img src="style_emoticons/<#EMO_DIR#>/doff.gif" style="vertical-align:middle" emoid=":doff" border="0" alt="doff.gif" />
 
Ready for another one, <img src="style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid="xD:" border="0" alt="laugh.gif" />. Ok now the problem I got is that when you talk to the admiral, he give you Hornblower and Bush as escort, Hornblower his commanding the 'Marguerite' and Bush the 'Hotspur'. I put the command you mention and here's the result.

After spending time to the tavern I fill up my companion slot, so I got 3 Captain with me with a ship assign to them. When I talk to the Admiral he inform me that my crew is to big and to reduce it, so I remove 1 captain and talk to the admiral again. At the end of the conversation I receive Hornblower and Bush as Captain but I lost my second captain since it need the place for Bush. I use this command.

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (SetCompanionIndex(pchar, -1, GetCharacterIndex(npchar.id)) == GetCharacterIndex(npchar.id) && FindFellowtravellers(PChar, NPChar) == FELLOWTRAVEL_NO)<!--c2--></div><!--ec2-->

I think this command is to make sure there's 1 slot open for Captain but how I change it so it make sure there's 2 slot available?

I look at Danielle_Dialog.c and found nothing to help me. I thought that since you recruit her and the researcher I would found something but nada. His there a quest where you get 2 or more captain. I could check them and see if it will help me?


Cheers, <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
I don't really have any thoughts on that one at the moment. Should be possible though. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
Perhaps something like this would help?<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->if (GetCompanionIndex(pchar,1) != -1 && GetCompanionIndex(pchar,2) != -1 && GetCompanionIndex(pchar,3) != -1)<!--c2--></div><!--ec2-->
It looks like this particular code checks if you have three companions, so you probably need to rewrite this for two companions. Of course that makes things a lot more complicated, because Bush and Hornblower might be assigned to slots 1&2, 1&3 or 2&3 and you need to cover all three cases. <img src="style_emoticons/<#EMO_DIR#>/icon_confused.gif" style="vertical-align:middle" emoid=":?" border="0" alt="icon_confused.gif" />
 
Well actually it's maybe better, if for the quest you must capture a ship at least you got the extra slot needed for that.


<b>Cheers,</b> <img src="style_emoticons/<#EMO_DIR#>/par-ty.gif" style="vertical-align:middle" emoid=":cheers" border="0" alt="par-ty.gif" />
 
Back
Top