Pocket Plane Group

Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Kai of CandleKeep on May 03, 2018, 03:06:47 PM

Title: Code Help
Post by: Kai of CandleKeep on May 03, 2018, 03:06:47 PM
I'm about 20 years late for this modding train, but I decided to try my hand at NPC creation.  I am a complete n00b with no talent whatsoever in coding, so I took Kulyok's Branwen mod, picked it apart and am [trying my best to learn on my own] using that as a template for my NPC (which just happens to be yet another Solaufein of Ust Natha romance). 

So anyway, I am trying to add some dialogue to Elhan, the elf in the ruined temple just outside the Underdark.    The idea is that when <CHARNAME> returns with the Rhynn Lanthorn with her beloved Solaufein in tow, he gets upset and says a few choice words to the party. 

Please, please do not laugh at my pathetic attempt at code.  I really need the help of someone who knows what they're doing. 

IF ~InParty("k7Sola") InMyArea("k7Sola") !StateCheck("k7Sola",CD_STATE_NOTVALID) Global

("k7SolaElhan","GLOBAL",0) ~ EXTERN C6ELHAN2 el1

~But what is this?  You harbor a drow among you!  How dare you bring the enemy into our midst even as you profess to help!  Treachery!~
DO ~SetGlobal("k7SolaElhan","GLOBAL",1)~
++ ~Wait!  Solaufein is not one of them, he is my friend and companion and he means you no harm.~ EXTERN K7SOLAJ el1.1
++ ~Solaufein is one of us, and if you want our help you will simply have to accept his presence.~ EXTERN K7SOLAJ el1.1

~Very well, but best keep your dog on a short leash lest we be forced to end his miserable existence. ~

I'm actually embarrassed to be posting this, but I really wanted to get help.  Thank you in advance.
Title: Re: Code Help
Post by: Creepin on May 04, 2018, 03:55:06 PM
I am sorry I will be of no help with dialogues as I haven't touched one in 10 years or so, I just wanted to say, as a 20 years-long player and few months-long modder, no one is going to laugh because, frankly, there's no reason to. Do not worry :)