Jump to content


Creating Own Mod - Romance won't start!


  • Please log in to reply
17 replies to this topic

#1 -Lima-

-Lima-
  • Guest

Posted 31 May 2014 - 11:38 AM

Hi

 

I am currently trying to make my own NPC mod with a romance. 

 

Really very helpful tutorials on the forums. I have been following the "Coding Friendships and Romance" one by Kaeloree, which has been great. The only problem I have having is my NPC joins up with my PC but the romance just won't start no matter what. I have attached both my NPCJ dialogue file and script file for the romance. If you could have a look at them and double check I haven't missed something really stupid that would be great! No matter how much I read them I just can't seem to find the problem!!

 

Thanks in advice :)

 

 

// 1. Someone Like You
IF ~Global("LE#LetanLoveTalk","GLOBAL",1)~ LoveTalk1
  SAY ~So what is someone like you doing in the lovely Amn?~
  IF ~~THEN REPLY ~I am hunting down Irencius. I will find him and have what he knows~GOTO Power
  IF ~~THEN REPLY ~I am trying to get Imoen back. She is like a sister to me. I must find her~GOTO Family
  IF ~~THEN REPLY ~Just decided to come here for a holiday. Was told it was a great place for fun~GOTO Liar
  IF ~~THEN REPLY ~None of your business Half-Drow. Now come away from me~GOTO Fine
END
 
IF ~~THEN BEGIN Power
SAY ~Ah.. I see. Power is what you are after then. Why kind of power could this Irencius possess that you already don't <RACE>?~
= ~Oh don't look at me that way, I know what you are <RACE>... the famous Bhaal of the Sword Coast. So again I ask what kind of power could this wizard hold for you?~
IF ~~THEN REPLY ~Oh so that is why you approached me then Half-Drow, thought to be protected?~GOTO Protected
END
 
IF ~~THEN BEGIN Protected
SAY ~Can you blame me Bhaal spawn? Isn't it better to be on the winning side. Ha! But still you intrigue me. I will follow you for now. Come let us find this wizard of yours~
  IF ~~ DO ~SetGlobal("LE#LetanLoveTalk","GLOBAL",2) RealSetGlobalTimer("LE#LetanRomanceTimer","GLOBAL",3600)~ EXIT
END
 
IF ~~THEN BEGIN Family
SAY ~Pfff.... you do all this for some human girl who is like a sister to you. She is no sister... for a start she is Human. Really <RACE>? You obviously are more stupid than you look! At the end of the day Family mean nothing. I spit on family! Power is what counts~
IF ~~THEN REPLY ~Family meets everything to me Letan.~GOTO Fool
IF ~~THEN REPLY ~Imeon means something to me but the promise of power is intruging to me too~GOTO Power
END
 
IF ~~THEN BEGIN Fool
SAY ~You are a fool <RACE>. You will die a fool too. Pfff... Family. *laughs* You will learn.~
  IF ~~ DO ~SetGlobal("LE#LetanLoveTalk","GLOBAL",2) RealSetGlobalTimer("LE#LetanRomanceTimer","GLOBAL",3600)~ EXIT
END
 
IF ~~THEN BEGIN Liar
SAY ~Ha! <RACE> you can't lie to me. I know why you are here really. So you might as well come out with it~
IF ~~THEN REPLY ~It's not none or your business fool!~GOTO Fine
IF ~~THEN REPLY ~Ha! You got me. I am hunting Irencius for what he might be able to do for me~GOTO Power
IF ~~THEN REPLY ~As much as I would love a holiday now, I am trying to get Imeon back... she is a sister to me~GOTO Family
END
 
IF ~~THEN BEGIN Fine
SAY ~Fine <RACE>. Have it your way...~
  IF ~~ DO ~SetGlobal("LE#LetanLoveTalk","GLOBAL",2) RealSetGlobalTimer("LE#LetanRomanceTimer","GLOBAL",3600)~ EXIT
END
 
// 2. The Stink
IF ~Global("LE#LetanLoveTalks","GLOBAL",3)~ ##F2
  SAY ~The stink can sometimes get too much. Don't you think?~
  IF ~~ DO ~SetGlobal("LE#LetanLoveTalk","GLOBAL",4) RealSetGlobalTimer("LE#LetanRomanceTimer","GLOBAL",3600)~ EXIT
END

 

 

// Dialogues
IF
    InParty(Myself)
    Global("LE#LetanRomanceCheck","GLOBAL",0)
    Global("LE#LetanRomanceActive","GLOBAL",0)
    Global("LE#LetanLoveTalk","GLOBAL",0)
    OR(3)
      Race(Player1,HALF_ELF)
      Race(Player1,HALF_ORC)
      Race(Player1,HALFLING)
THEN
  RESPONSE #100
    RealSetGlobalTimer("LE#LetanRomanceTimer","GLOBAL",1200)
    SetGlobal("LE#LetanLoveTalk","GLOBAL",1)
    SetGlobal("LE#LetanRomanceCheck","GLOBAL",1)
    SetGlobal("LE#LetanLoveTalk","GLOBAL",1)
END
 
IF
    InParty(Myself)
    Global("LE#LetanRomanceCheck","GLOBAL",0)
THEN
  RESPONSE #100
    SetGlobal("LE#LetanRomanceCheck","GLOBAL",1)
END
 
 
IF
    InParty(Myself)
    See(Player1)
    !StateCheck("Letan",CD_STATE_NOTVALID)
    !StateCheck(Player1,CD_STATE_NOTVALID)
    RealGlobalTimerExpired("LE#LetanRomanceTimer","GLOBAL")
    CombatCounter(0)
    !See([ENEMY])
    OR(8)
      Global("LE#LetanLoveTalk","GLOBAL",1)
      Global("LE#LetanLoveTalk","GLOBAL",3)
      Global("LE#LetanLoveTalk","GLOBAL",5)
      Global("LE#LetanLoveTalk","GLOBAL",7)
      Global("LE#LetanLoveTalk","GLOBAL",9)
      Global("LE#LetanLoveTalk","GLOBAL",11)
      Global("LE#LetanLoveTalk","GLOBAL",13)
      Global("LE#LetanLoveTalk","GLOBAL",15)
THEN
  RESPONSE #100
    MoveToObject(Player1)
    Dialogue(Player1)
END
 
 
IF
    InParty(Myself)
    See(Player1)
    RealGlobalTimerExpired("LE#LetanRomanceTimer","GLOBAL")
    OR(6)
      Global("LE#LetanLoveTalk","GLOBAL",2)
      Global("LE#LetanLoveTalk","GLOBAL",4)
      Global("LE#LetanLoveTalk","GLOBAL",6)
      Global("LE#LetanLoveTalk","GLOBAL",8)
      Global("LE#LetanLoveTalk","GLOBAL",12)
      Global("LE#LetanLoveTalk","GLOBAL",14)
THEN
  RESPONSE #100
    IncrementGlobal("LE#LetanLoveTalk","GLOBAL",1)
END

 



#2 Rhaella

Rhaella
  • Modder
  • 648 posts

Posted 31 May 2014 - 12:10 PM

There is one problem in the script -- your first talk is going to show up as soon as someone tries to force talk her. You're going to want to renumber things so you can increment it to 2 once the timer expires. Then you won't run into crazy bugs there.

 

That doesn't explain why nothing is happening at all, though. The first thing you'll want to know is whether your script is working at all. You may not have assigned it properly with the cre or tp2.

 

Try to forcetalk her now. If the talk shows up, you'll at least know that the script is functioning. If not, you're probably going to want to post your tp2 and possibly attach your cre file as well.



#3 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 31 May 2014 - 12:59 PM

I'm not sure cool shades smileys are a valid Weidu expression.

 

Also:

 


IF
    InParty(Myself)
    Global("LE#LetanRomanceCheck","GLOBAL",0)
THEN
  RESPONSE #100
    SetGlobal("LE#LetanRomanceCheck","GLOBAL",1)
END

 

 

 

This block sets the RomanceCheck variable to 1, and it has to be 0 to trigger the first block. If it's firing early, that could screw things up.



#4 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 31 May 2014 - 12:59 PM

Oh hey double post, thanks phony error message.


Edited by Glam Vrock, 31 May 2014 - 12:59 PM.


#5 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 01 June 2014 - 06:48 AM

It's also good practice to prefix all your dialogue block names (LoveTalk1, Power, Protected, etc.) with your modder prefix.


Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#6 Almateria

Almateria

    most garbage person

  • Modder
  • 969 posts

Posted 01 June 2014 - 06:50 AM

You misspelled "Irenicus" and "Imoen".

 

This might not be the solution to your problem though



#7 -Guest-

-Guest-
  • Guest

Posted 02 June 2014 - 09:09 AM

Thanks for all your suggestions and help! Unfortunately none of them worked to fix the problem :(
 
I force talked and all i got was the usual multiplayer response.
 
Below is my tp2 file and attached is my cre file (its not complete with how I want my char to be class/stats wise etc but should be correct re the scripts as followed on the tutorials).
 
 

BACKUP~Letan/backup~
AUTHOR~Limalama (penfold_liam@hotmail.com)~
BEGIN ~Letan for BG2:EE~
COPY ~Letan/LETAN.cre~ ~override/LETAN.cre~
SAY NAME1 ~Letan~
SAY NAME2 ~Letan~
SAY BIO ~Bio To Add~
SAY MORALE ~Hmmppff the human stench is everywhere.~ 
SAY HAPPY ~Now this is what I call fun!~ 
SAY UNHAPPY_ANNOYED ~Really must we follow this path?~ 
SAY UNHAPPY_SERIOUS ~You are making very poor choices.~ 
SAY UNHAPPY_BREAKING ~I've had enough of your goody goody ways.~ 
SAY LEADER ~About time too.~ 
SAY TIRED ~Must you crack the whip so much, you are no Matron Mother!~ 
SAY BORED ~Get moving before I get stabbing!~ 
SAY BATTLE_CRY1 ~DEATH TO SCUM!~ 
SAY BATTLE_CRY2 ~Oh I love a bloody battle!~ 
SAY BATTLE_CRY3 ~THE HUMAN STENCH WILL BE WHIPPED OUT!~ 
SAY BATTLE_CRY4 ~UURGGGHHH!!!~ 
SAY DAMAGE ~Ouch!~ 
SAY DYING ~This is not the end!~ 
SAY HURT ~Don't just stand there! DO SOMETHING!!!~ 
SAY AREA_FOREST ~This reeks of Elfs....~ 
SAY AREA_CITY ~Ah cities. The human stench... oh how I do love a city.~ 
SAY AREA_DUNGEON ~Now this is more like my scene.~ 
SAY AREA_DAY ~I never liked the light.~ 
SAY AREA_NIGHT ~Darkness is when the fun starts.~ 
SAY SELECT_COMMON1 ~What do you want?~ 
SAY SELECT_COMMON2 ~Really?~ 
SAY SELECT_COMMON3 ~You rang?~ 
SAY SELECT_COMMON4 ~Touch me again and it will be the last thing you do.~ 
SAY SELECT_COMMON5 ~What?~ 
SAY SELECT_COMMON6 ~Really?~ 
SAY SELECT_ACTION1 ~Really?~ 
SAY SELECT_ACTION2 ~Do you think that wise?~ 
SAY SELECT_ACTION3 ~Fine, I am moving!~ 
SAY SELECT_ACTION4 ~If you wish...~ 
SAY SELECT_ACTION5 ~Pfff..~ 
SAY SELECT_ACTION6 ~Yes alright.~ 
SAY SELECT_ACTION7 ~Fine.~ 
SAY SELECT_RARE1 ~If only we could find a nice tavern with a nice fighting pit, I could show you a thing or two about humans skulls.~ 
SAY SELECT_RARE2 ~Elfs.. I hate the lot of them, but Humans now Humans are a different matter.~ 
SAY CRITICAL_HIT ~Have That!~ 
SAY CRITICAL_MISS ~What I missed?~ 
SAY TARGET_IMMUNE ~Told you it wouldn't work!~ 
SAY INVENTORY_FULL ~What do you think I am, some pack mule?~ 
COMPILE ~Letan/LE#Letan.d~
EXTEND_TOP ~AR0406.bcs~ ~Letan/AR0406.baf~
APPEND ~pdialog.2da~ 
~LE#Letan LE#LetaP LE#LetaJ LE#LetaD LE#Let25P LE#Let25J LE#Let25D LE#Let25~ 
UNLESS ~LE#Letan~ 
UNLESS ~25POST~ 
 
APPEND ~interdia.2da~ 
~LE#Letan LE#LetaB LE#LetB25~ 
UNLESS ~LE#Letan~ 
UNLESS ~25FILE~ 
 
// Adds CD_STATE_NOTVALID state
APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~
UNLESS ~CD_STATE_NOTVALID~

 
Cre file here: http://www.fileswap.com/dl/t6n8vyyLg/
 
 And yeah I realised I misspelled them after, blame my fast typing lol Gonna spell check it all after I've got it working!



#8 Rhaella

Rhaella
  • Modder
  • 648 posts

Posted 02 June 2014 - 09:32 AM

Put LE#LETAN.BSC as the Default Script as well. I've run into problems before when I haven't filled that line out, so that could be part of the problem.

 

Half the time in your script, you're checking for "Letan" as the Death Variable. In both the CRE and TP2, however, you have it as LE#Letan. You're going to need consistency there. (I'd use the LE#Letan version. Better for crossmod purposes.)



#9 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 02 June 2014 - 09:37 AM

COMPILE ~Letan/LE#Letan.d~

 

 

You've only compiled this one dialogue file. You need to do them all.



#10 -Lima-

-Lima-
  • Guest

Posted 02 June 2014 - 11:25 AM

Thanks! Silly me not compiling them! It seems to be kinda working now... he will come up to me and start his lovetalk or at least try but all I get instead is the mutliplayer talk when I normally forcetalk him. Something about idle banter. Have I missed something in script or CRE file?



#11 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 02 June 2014 - 11:32 AM

Oh yeah. You didn't compile his scripts either. Unless you fixed that with the dialogue files.



#12 -Lima-

-Lima-
  • Guest

Posted 02 June 2014 - 11:54 AM

Yeah compiled them too when I did the dialogue files.



#13 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 02 June 2014 - 12:44 PM

Did you post the entire dialogue file? Have you got BEGIN LE#LetanJ (or whatever it's called) at the start?



#14 -Lima-

-Lima-
  • Guest

Posted 02 June 2014 - 01:48 PM

Sorry forgot to copy that bit, yeah it is at the beginning of the dialogue file for my lovetalks.



#15 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 02 June 2014 - 02:08 PM

What about APPEND LE#LetanJ?

 

If that's not missing, try setting the global manually. In the game, open the console and type CLUAConsole:SetGlobal("LE#LetanLoveTalk","GLOBAL",1)



#16 -Lima-

-Lima-
  • Guest

Posted 04 June 2014 - 09:03 AM

Still no such luck. Still giving me the usual mutliplayer banter about "idle banter" :(



#17 Glam Vrock

Glam Vrock
  • Member
  • 16 posts

Posted 04 June 2014 - 10:53 AM

I was going to take a look at your CRE file, but the download link is invalid. Can you put it up somewhere else?



#18 -Lima-

-Lima-
  • Guest

Posted 04 June 2014 - 11:25 AM

No problem

 

https://www.dropbox....hqvo3/LETAN.CRE