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

Revival locations for new islands

CouchcaptainCharles

COO (Chief Oddity Officer)
Storm Modder
Pirate Legend
(Read a question about this somewhere, but can't find the thread again, so made a new one)

Re: Awakening on QC after "almost" dying on new islands: QC is the default resurrection point for all locations which are not near one of the original taverns. Reasoning: QC as piratehideout is just the safe place where your mates would take you heal your "almost" fatal wounds.
But you can easily define other "casualty clearing stations" for the new islands. The code for that is at the bottom of program\seadogs.c :


switch(islandID)
{
case "FalaiseDeFleur":
loc = "Falaise_de_fleur_Tavern_upstairs";
chr = characterFromID("Falaise_de_fleur_officiant");
break;

....

case "IslaMuelle":
loc = "Muelle_Tavern_upstairs";
chr = characterFromID("Muelle_officiant");
break;

//default: // scheffnow - bfd
loc = "QC_Tavern_upstairs";
chr = characterFromID("QC_officiant");
setCharacterShipLocation(mc, "QC_port");
}

There is a "case" for each old island. You simply have to add new cases for new islands before the default QC section.

Details:

case is the ID of the island where you "almost" die, as defined in islands\islands_init.c

loc is the id of the location where you regain consciousness, choose any location you like from locations\init\....c

chr is the taverngirl which nurses you back to life. I'd simply skip that for the new islands, that saves a lot of work and you have probably heard the tale of your healing often enough. Instead add a marker attribute that we'll use later to skip the whole "Ah, you have survived..." bedroomscene.

So a case for the island of Saint Martin which lets you wake up in the mansion bedroom at Marigot would look like this:

case "SaintMartin":
loc = "Marigot_mansion_bedroom";
mc.notaverngirl = 1;
break;


The bedroomscene is being triggered by this section:

//start bedroomscene
WaitDate("", 0,0,4,0,0);
ChangeCharacterAddress(chr, loc, "goto3");
DoReloadCharacterToLocation(loc, "goto", "goto2");
Locations[FindLocation(loc)].reload.l1.disable = 0;
Log_SetStringToLog(LanguageConvertString(tmpLangFileID,"You regain consciousness after a long feverish sleep"));
PlaySound("AMBIENT\SHOP\sigh2.wav");
Lai_SetActorType(chr);
LAi_ActorTurnToCharacter(chr, mc);
LAi_ActorDialog(chr,mc, "", 4.0, 1.0);


Put a check for our marker attribute before that so that the scene runs only for the old islands:

if(CheckAttribute(mc,"notaverngirl")
{
//no bedroomscene, only teleport
DoReloadCharacterToLocation(loc, "goto", "goto2");
Log_SetStringToLog(LanguageConvertString(tmpLangFileID,"You regain consciousness after a long feverish sleep"));
DeleteAttribute(mc,"notaverngirl");
}
else
{
//start bedroomscene, as before
WaitDate("", 0,0,4,0,0);
....
LAi_ActorDialog(chr,mc, "", 4.0, 1.0);
}
 
Thanks a lot, CCC! <img src="style_emoticons/<#EMO_DIR#>/w00t.gif" style="vertical-align:middle" emoid=":woot" border="0" alt="w00t.gif" />

One question: If you die, you have a random character name, instead of your original name, don't you? I thought the talk to the tavern girl put that back to your original name... <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Why code responsible for restoring proper name for Hawk was put in tavern girl dialog? Wouldn't better to put it directly in that code CCC showed?

pirate_KK
 
It's this code:
PChar.name = FIRSTNAME;
PChar.lastname = LASTNAME;
PChar.title = "Captain";

Now that I have a look at this code, I am wondering if this is still going to work rigth with the ingame namechanging mods. You can change your name in the startup screen, as well as in the F2 character screen. I doubt you'll still have the right name after "dying". That'll need to be checked and fixed, I think.
 
<!--quoteo(post=150099:date=Jun 2 2006, 08:45 PM:name=pirate_kk)--><div class='quotetop'>QUOTE(pirate_kk @ Jun 2 2006, 08:45 PM) [snapback]150099[/snapback]</div><div class='quotemain'><!--quotec-->
Why code responsible for restoring proper name for Hawk was put in tavern girl dialog? Wouldn't better to put it directly in that code CCC showed?

pirate_KK
<!--QuoteEnd--></div><!--QuoteEEnd-->
Good question. In the original version of the survival mod the taverngirl dialog runs always to explain how you survived, so it made no difference in which file the name restoring was. But Pieter is right, if you skip the teverngirl <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /> you also skip the name restoring.

But as you said, you can also put the name code into seadogs.c. You must only use mc instead of pchar as reference:

if(CheckAttribute(mc,"notaverngirl")
{
//no bedroomscene, only teleport
DoReloadCharacterToLocation(loc, "goto", "goto2");
Log_SetStringToLog(LanguageConvertString(tmpLangFileID,"You regain consciousness after a long feverish sleep"));
DeleteAttribute(mc,"notaverngirl");
mc.name = FIRSTNAME;
mc.lastname = LASTNAME;
mc.title = "Captain";

}

Though I don't know anything about those ingame namechanging mods.
 
I tried adding this code to my Post Build 13 Alpha, but for some reason it crashed my game. I really can't understand why, because it looks Ok to me. Could you please send me your modified seadogs.c file?
 
Sorry, can't send you any files cause I haven't actually made them. (Simply lack the time <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />: ) All I can offer at the moment are hints and proposals made on the fly.

The error in the code I posted was a missing ) in this line:
if(CheckAttribute(mc,"notaverngirl") )

Sorry for that.
 
Seeing as I have a lot of time on my hands I might play around with it & see what I can come up with.

One question though, I would have to name each town that has a tavern that are on the new islands, seeing as the towns on the original mod are also the island names as well.
 
For some reason I still end up in QC.

What is wrong with the following ??

switch(islandID)
{
case "FalaiseDeFleur":
loc = "Falaise_de_fleur_Tavern_upstairs";
chr = characterFromID("Falaise_de_fleur_officiant");
break;

case "SaintMartin":
loc = "Saint_Martin_Tavern_upstairs";
chr = characterFromID("Saint_Martin_officiant");
break;

case "Philipsburg":
loc = "Philipsburg_Tavern_upstairs";
chr = characterFromID("Philipsburg_officiant");
break;

case "Marigot":
loc = "Marigot_Tavern_upstairs";
chr = characterFromID("Marigot_officiant");
break;

case "LaHavana":
loc = "La_Havana_Tavern_upstairs";
chr = characterFromID("La_Havana_officiant");
break;

case "PortauPrince":
loc = "Port_au_Prince_Tavern_upstairs"
chr = characterFromID("Port_au_Prince_officiant");
break;

case "PointàPitre":
loc = "Point_à_Pitre_Tavern_upstairs";
chr = characterFromID("Point_à_Pitre_officiant");
break;

case "Redmond":
loc = "Redmond_Tavern_upstairs";
chr = characterFromID("Redmond_officiant");
break;

case "Conceicao":
loc = "Conceicao_Tavern_upstairs";
chr = characterFromID("Conceicao_officiant");
break;

case "Douwesen":
loc = "Douwesen_Tavern_upstairs";
chr = characterFromID("Douwesen_officiant");
break;

case "Oxbay":
loc = "Greenford_Tavern_upstairs"
chr = characterFromID("Greenford_officiant");
break;

case "IslaMuelle":
loc = "Muelle_Tavern_upstairs";
chr = characterFromID("Muelle_officiant");
break;

//default: // scheffnow - bfd
loc = "QC_Tavern_upstairs";
chr = characterFromID("QC_officiant");
setCharacterShipLocation(mc, "QC_port");
break;
}



Is there something I've missed ?
Or
Is there something I havent added ?
Or
Have I got something written wrong ?
 
I think you need to use the island name, not the town name. The switch reads "switch(islandID)". Also: If you die in Oxbay (town), you reawaken in the Greenford tavern, not the Oxbay tavern.
 
Ok, it works now without any CTD's or lock ups on the following Islands.

switch(islandID)
{
case "FalaiseDeFleur":
loc = "Falaise_de_fleur_Tavern_upstairs";
chr = characterFromID("Falaise_de_fleur_officiant");
break;

case "SaintMartin":
loc = "Marigot_Tavern_upstairs";
chr = characterFromID("Saint_Martin_officiant");
break;

case "Cayman":
loc = "Grand_Cayman_Tavern_upstairs";
chr = characterFromID("Marigot_officiant");
break;

case "Cuba":
loc = "La_Havana_Tavern_upstairs";
chr = characterFromID("La_Havana_officiant");
break;

case "Hispaniola":
loc = "Port_au_Prince_Tavern_upstairs"
chr = characterFromID("Port_au_Prince_officiant");
break;

case "Redmond":
loc = "Redmond_Tavern_upstairs";
chr = characterFromID("Redmond_officiant");
break;

case "Conceicao":
loc = "Conceicao_Tavern_upstairs";
chr = characterFromID("Conceicao_officiant");
break;

case "Douwesen":
loc = "Douwesen_Tavern_upstairs";
chr = characterFromID("Douwesen_officiant");
break;

case "Oxbay":
loc = "Greenford_Tavern_upstairs"
chr = characterFromID("Greenford_officiant");
break;

case "IslaMuelle":
loc = "Muelle_Tavern_upstairs";
chr = characterFromID("Muelle_officiant");
break;

//default: // scheffnow - bfd
loc = "QC_Tavern_upstairs";
chr = characterFromID("QC_officiant");
setCharacterShipLocation(mc, "QC_port");
break;
}
 
Did you also add the define the new island's "officiant" characters and added the required code to their dialog files?
 
All the dialogue works as it should when you revive at whichever island. As far as I can remember, the only islands I didnt do it on were Guadalope ( constant CTD's) & Khael Roa ( obviously nowhere to revive at ).
The revival locations for these 2 are at QC.
 
Back
Top