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

Adding NPCs through Storyline (B14 9.5A)

computica

Master Mariner
Storm Modder
Cool I got it to work just one thing, the model is invisible when sitting. <img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />:

-----------------------------------
void CreateOfficersCharacters(ref n)
{
object chobj;
ref ch;

makeref(ch, chobj);

ch.old.name = "Jessie";
ch.old.lastname = "Quinn";
ch.name = TranslateString("", "Jessie");
ch.lastname = TranslateString("", "Quinn");
ch.id = "Jessie Quinn";
ch.model = "Danielle";//NOTE: I don't think it's the model that causes the invisibility but one of the location codes that does that...
ch.activity_begin = "0";//Times
ch.activity_end = "24";//Basicly there all hours of the day...
ch.sex = "woman";
ch.location = "Tortuga_tavern";//NOTE:I DO understand...
ch.location.group = "sit";//NOTE:I don't understand...
ch.location.locator = "sit1";//NOTE:I don't understand...
ch.homelocation = "Tortuga_tavern";//NOTE:I DO understand...
ch.homelocation.group = "sit";//NOTE:I don't understand...
ch.homelocation.locator = "sit1";//NOTE:I don't understand... is there more sits??? I'm gonna play with this...
ch.homestate = "sit";//NOTE:I don't understand...
ch.Dialog.Filename = "Random_mates_sit_tavern_dialog.c";//NOTE:This is correct dialog for sitting Officers
GiveItem2Character(ch, "blade34+1");//The fun stuff begins!
ch.equip.blade = "blade34+1";
GiveItem2Character(ch, "pistol1+1");
ch.equip.gun = "pistol1+1";
ch.nodisarm = 1;//Anti-disarm
//JRH ammo mod -->
if (ENABLE_AMMOMOD) { // LDH change
TakenItems(ch, "gunpowder", 6);
TakenItems(ch, "pistolbullets", 6);
}
//JRH ammo mod <--
ch.nation = PIRATE;
ch.rank = 1;
ch.reputation = "None";
ch.experience = "0";
ch.skill.Leadership = "1";
ch.skill.Fencing = "1";
ch.skill.Sailing = "1";
ch.skill.Accuracy = "1";
ch.skill.Cannons = "1";
ch.skill.Grappling = "1";
ch.skill.Repair = "1";
ch.skill.Defence = "1";
ch.skill.Commerce = "4";
ch.skill.Sneak = "1";
ch.perks.list.BasicCommerce = true;
ch.perks.list.AdvancedCommerce = true;
ch.perks.list.Trustworthy = true;
ch.perks.list.SharedExperience = true;
ch.money = "2500";//The fun stuff ends here
LAi_SetSitType(ch);//NOTE:It makes sense!
LAi_SetLoginTime(ch, 0.0, 24.0);//NOTE:basicly the time the NPC appears 0:00-24:00
LAi_SetHP(ch, 80.0, 80.0);//NOTE:HP
ch.HPBonus = 100;//NOTE:moddingven more HP, I can do without
LAi_NoRebirthEnable(ch);//NOTE:Anti-cheat I guess?
ch.greeting = "Gr_camilo machado";
AddGameCharacter(n, ch);
}
------------------------------------------------------------
 
Invisible even? What happens if you use a male character model?
Try adding a line <i>ch.model.animation = "man_woman_sit";</i>
 
LOL! A little late but I had figured it out last night, thanks though it worked. Here's the new code:
------------------------------------------------------
void CreateOfficersCharacters(ref n)
{
object chobj;
ref ch;

makeref(ch, chobj);

ch.old.name = "Jessie";
ch.old.lastname = "Winded";
ch.name = TranslateString("", "Jessie");
ch.lastname = TranslateString("", "Winded");
ch.id = "Jessie Winded";
ch.model = "Daniell3";
ch.activity_begin = "0";
ch.activity_end = "24";
ch.model.animation = "man_woman_sit";
ch.sex = "woman";
ch.location = "Tortuga_tavern";
ch.location.group = "sit";
ch.location.locator = "sit2";
ch.homelocation = "Tortuga_tavern";
ch.homelocation.group = "sit";
ch.homelocation.locator = "sit2";
ch.homestate = "sit";
ch.Dialog.Filename = "Random_mates_sit_tavern_dialog.c";
GiveItem2Character(ch, "blade34+1");
ch.equip.blade = "blade34+1";
GiveItem2Character(ch, "pistol1+1");
ch.equip.gun = "pistol1+1";
ch.nodisarm = 1;
TakeNItems(ch,"medical1", Rand(4)+1);

//JRH ammo mod -->
if (ENABLE_AMMOMOD) { // LDH change
TakenItems(ch, "gunpowder", 6);
TakenItems(ch, "pistolbullets", 6);
}
//JRH ammo mod <--

ch.nation = PIRATE;
ch.rank = 4;
ch.reputation = "25";
ch.reputation = "None";
ch.experience = CalculateExperienceFromRank(4)+ (CalculateExperienceFromRank(4)/10 + rand(4000));
//COMP -->
ch.skill.Leadership = "4";
ch.money = "726";
ch.Ship.Name = "Lucy Lu";
ch.Ship.Type = "GunBoat"; // Petros: was Brig1
ch.Ship.Stopped = true;
//COMP <--
LAi_SetSitType(ch);
LAi_SetLoginTime(ch, 0.0, 24.0);
LAi_SetHP(ch, 90.0, 90.0);
ch.HPBonus = 100;
LAi_NoRebirthEnable(ch);
ch.greeting = "Gr_camilo machado";
AddGameCharacter(n, ch);
}
----------------------------------------------------

I want to know If I can make characters that own ships? Ones that can be like secret bosses or something...
 
Certainly; have a look for the "Mary Wood" character in the dialog files and the character init files.
Actually, the character you post above already DOES have a ship: a gunboat.
 
Thanks!

I had a quetion about the gov'na of Alice Town. I came to this glorious town hall only to figure out that his dialouge was missing! What was his main purpose? Was he supposed to be important? I was gonna use the "Cole Arkwright_dialog" files to make "Michael Wainwright"'s Dialog files...

EDIT:
<!--quoteo(post=319436:date=May 13 2009, 01:06 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 13 2009, 01:06 PM) <a href="index.php?act=findpost&pid=319436"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Actually, the character you post above already DOES have a ship: a gunboat.<!--QuoteEnd--></div><!--QuoteEEnd-->

<img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Yeah I know I need to test that out, I'm trying to find out if an officer owns a boat, will the boat become apart of my fleet when my leadership level is over 5.
 
He isn't yet important, so just making a copy of the Governor's Harbor governor dialog files would certainly be a good idea.
Future "importance" modifications could then be added in that dialog file. <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />
 
Ok that's what's up! I wanna glue some quick quest/missions to him. I noticed a guy in a prison at Tortuga had missing dialog also. What happend to most of the stock dialog? some one had commented this:

ch.Dialog.Filename = "Michael Wainwright_dialog.c"; // seems to be missing in the package
 
Uhm... apparently that was missing at some point, but not anymore. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
Most of the stock dialog should still be there. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
The prisoned character dialog doesn't exist yet; could easily be made though.
Prisoner: "I don't like it here"
Player: "Well that's your problem"

It wouldn't need to be more advanced than that; though more advanced stuff could always be added at a later point.
 
LMAO! Nice script/play on the prisoner dialog! I didn't realize how sparsely loose the game was in actual completion ( 100%) normally when you hear mod or add-on you think (115%).

I'm modding because I want more of a complete game, that's all.
 
I'm not quite sure what you mean by those percentages.
I think we ALL want a more complete game; though when the game would BE completed is anyone's guess. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
I'm just saying that a stock game is 100% meaning complete that's all. It's just that we have to fill some gaps to make a more complete game. Like making the boarding locations...

EDIT: I was wondering was there a default town hall dialog that can be used as a base for a governor or is each town hall governor unique?
 
I think we're doing a good job of going to 200% with Build 14. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" />
 
<!--quoteo(post=319469:date=May 13 2009, 02:19 PM:name=Pieter Boelen)--><div class='quotetop'>QUOTE (Pieter Boelen @ May 13 2009, 02:19 PM) <a href="index.php?act=findpost&pid=319469"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I think we're doing a good job of going to 200% with Build 14. <img src="style_emoticons/<#EMO_DIR#>/icon_mrgreen1.gif" style="vertical-align:middle" emoid=":cheeky" border="0" alt="icon_mrgreen1.gif" /><!--QuoteEnd--></div><!--QuoteEEnd-->

Shoot, More like 300% POTC: NH is the only thing I want to play right now, I guess since it's a cousin of the elder scrolls games which pique my interest...

(In-case you didn't catch my last edit in my last post)
EDIT: I was wondering was there a default town hall dialog that can be used as a base for a governor or is each town hall governor unique?
 
Although most governors do (and should) have their own file, many of them are actually exactly the same.
Having different files for each governor is important though in case governors are involved in quests though.
 
Yeah I'm just trying to find which file is that so I can make a unique dialog for the gov'na with no dialog...
 
If I recall correctly, the "Thomas Lynch" dialog should be good for a generic governor.
 
Oops; that's the one. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
I still think that you know everything! <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
 
You'll stop thinking that eventually if you stay here long enough. <img src="style_emoticons/<#EMO_DIR#>/razz.gif" style="vertical-align:middle" emoid=":razz" border="0" alt="razz.gif" />
 
Back
Top