Jump to content


Romance Specific coding questions


  • Please log in to reply
116 replies to this topic

#21 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 12 February 2004 - 05:08 AM

Hi Sillara,

I corrected your file and send it to you today.

By the way - as I suspected there is no need to start your file names with

J#, JK# or any other prefixes.

Quoting Ghreyfain:

I'll name mine
J#Vondo.d. The first line of code we should right is "BEGIN J#Vondo", which means
that at the time of compilation, it will create a file called *J#Vondo.dlg.

* Note that you don't need to use the prefix "J#", this is just a naming convention
I use for all my files to keep them from overwriting other people's custom files.

It's not necessary to use prefixes, but it is a good idea for compatability reasons. Here's a link to a list of prefixes that people are using for their projects. http://www.teambg.ne...y;threadid=5677

If you use one, pick one that's not on the list.

#22 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 12 February 2004 - 06:41 AM

Yep. Very good link. I use ER_ for Edwin Romance and LR_ for the Longer Road files.

And I just realised that a great number of my globals better be renamed until it is too late! If you use generic 'ImoenInterjected' for a GLOBAL variable there is almost 99% chance that somebody else used it.

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#23 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 12 February 2004 - 07:06 AM

OK, we are still not in the clear on the Morning Afters. I'll see if I can ask one of the gurus to allow to have their LT dissected  and analysed :)

'Morning after' dialogues are pretty easy. You just have variable set on 'the night before' so either in the ###D.script or in the dialogue that is triggered from that script. And have that variable trigger a dialogue in the script. Therefore it should occur after the rest:
e.g.

[See corrected version, on Page 2]
"You alone can make my song take flight..."

#24 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 12 February 2004 - 02:23 PM

:( Umm, would someone being willing to either PM the list from the above link or else post it somewhere on this board? My computer is having difficulty accessing that link, and I do not know why. :unsure:

Thanks!

Sillara
Check out my RPG forum!

#25 -Ashara-

-Ashara-
  • Guest

Posted 12 February 2004 - 03:59 PM

It must be teambg. It goes down once in a while.

#26 Gabrielle

Gabrielle

    Do what thou wilt

  • Member
  • 1567 posts

Posted 12 February 2004 - 06:35 PM

No comment on that.


Any how would someone compile all of this info in one easy to read tutorial or something?
For all of your BG modding needs: Chosen of Mystra.

This is The End.

#27 -Ashara-

-Ashara-
  • Guest

Posted 12 February 2004 - 07:05 PM

Thank you, Grim. It is a good example. I may still have questions ;)

@Gabrielle - I intended to do it, but alas, all the Nine Hells broke lose at work, so I won't be getting to it in the next two weeks. Anyone who'd like to do it prior to that is very welcome. :D

#28 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 12 February 2004 - 07:27 PM

I'll do it this weekend.

Watch it to go up on RPG Dungeon during the site update next week.
Home of Kitanya, Improved Asylum, more...

Posted Image

#29 -Ashara-

-Ashara-
  • Guest

Posted 12 February 2004 - 07:46 PM

Sounds good. Just post a link in the Links section, OK?

#30 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 12 February 2004 - 09:37 PM

Grim the Austin example was terrific - too bad they dont have 'two thumbs up' icon here.

Posted Image

However there are few clarifications that can be made.

'Morning after' dialogues are pretty easy. You just have variable set on 'the night before' so either in the ###D.script or in the dialogue that is triggered from that script. And have that variable trigger a dialogue in the script. Therefore it should occur after the rest:
e.g.

AustinD.baf: (Austin's resting script)

IF
Global("G#LetsShag","GLOBAL",0)
THEN
RESPONSE #100
SetGloblal("LetsShag","GLOBAL",1)
Interact(Player1)
END


Firstly - you have Global("G#LetsShag","GLOBAL",1) at first and then switch to

SetGloblal("LetsShag","GLOBAL",1) - I am not sure if this is not just typo or you meant to have 2 different GLOBALS? The way it is now it won't work methinks.

Secondly-

The GabberD.bcs (or baf) governs the events that happen 'just before the rest' - not after. In this case after you click on the rest icon
Austin will offer to shag etc. However the other dialog might fire away before you had a chance to 'sleep' with your beloved, so it is better to actually insert a Timer.
A short interval of 10 seconds will do the trick. There is also a point of these scenes coinciding with the 'Dreams' - I discovered that the in-game dreams prevent the 'morning after dialogs' from happening in some cases, so the safeguards have to be put in.

As in

AustinD.bcs

IF
Global("LetsShag","GLOBAL",0)
THEN
RESPONSE #100
SetGloblal("LetsShag","GLOBAL",1)
RealSetGlobalTimer("TimeToShag","GLOBAL",10)
Interact(Player1)
END

and Austin.bcs

Austin.baf: (Austin's script)

IF
RealGlobalTimerExpired(("TimeToShag","GLOBAL")
Global("LetsShag","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("LetsShag","GLOBAL",2)
Interact(Player1)
END

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#31 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 12 February 2004 - 11:21 PM

How do I set the Global (and it is a Global, right?) that sets the parameters for the romance? Tsujatha only romances human, Elven, or half-elven females of good alignment. How do I set it to that?

Thanks!

Sillara

@Rastor. Thank you for putting this information into a tutorial. :D Please post the link as soon as it is done!

@Grim and dorotea: Thank you for the morning-after help! I have a few dialogues triggered by rest, both before and after. Thank you!
Check out my RPG forum!

#32 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 12 February 2004 - 11:39 PM

IF
Global("GabberMatch","GLOBAL",0)
Global("CheckGabberMatch","GLOBAL",0)
Gender(Player1,FEMALE)
!Global("AnotherMaleRomanceActive","GLOBAL",2)
!Global("GabberRomanceActive","GLOBAL",3)
Alignment(Player1,MASK_GOOD)
OR(6)
Race(Player1,HUMAN)
Race(Player1,HALF_ELF)
Race(Player1,ELF)
Race(Player1,HALFLING)
Race(Player1,GNOME)
Race(Player1,HALF_ORC)

THEN
RESPONSE #100
SetGlobal("CheckGabberMatch","GLOBAL",1)
SetGlobal("GabberMatch","GLOBAL",1)
END

This will activate the romance for every one of the 6 races but only good alignment. Mind that ! == 'not true'


And by the way - this link is somewhat of a must for scripting.

http://dragonlance.t.../bg2actions.htm

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#33 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 13 February 2004 - 12:06 AM

Actually I don't think the timer is necessery now that I've put in a RestParty() action at the end of pre-shag dialogue. But oh well just for safety I put in the timer...

Corrected version:

AustinD.baf: (Austin's resting script)

IF
Global("LetsShag","GLOBAL",0)
THEN
RESPONSE #100
SetGloblal("LetsShag","GLOBAL",1)
Interact(Player1)
END


Austin.baf: (Austin's script)

IF
Global("G#LetsShag","GLOBAL",1)
RealGlobalTimerExpired(("TimeToShag","GLOBAL")
THEN
RESPONSE #100
SetGlobal("LetsShag","GLOBAL",2)
Interact(Player1)
END


BAustin.d: (Austin's banter file)

IF ~CONDITIONS
Globlal("LetsShag","GLOBAL",1)~ THEN BEGIN TheShagging
SAY ~So, shall we shag now, or shag later?~
++ ~I want to shag now, Austin!~ GOTO ShagNow
++ ~Later, Austin~ GOTO ShagLater
END

IF ~~ THEN BEGIN ShagNow
SAY ~Groovy, baby!~
IF ~~ THEN DO ~RealSetGlobalTimer("TimeToShag","GLOBAL",10)
RestParty()~ EXIT
END

//Blah blah

IF ~CONDITIONS
Globlal("LetsShag","GLOBAL",2)
RealGlobalTimerExpired(("TimeToShag","GLOBAL")~ THEN BEGIN MorningAfter
SAY ~You were groovy baby, yeah!~
++ ~You were pretty damn good yourself...~ DO ~SetGlobal("LetsShag","GLOBAL",3)~ GOTO PrettyDamnGood
++ ~You want to go again?~ DO ~SetGlobal("LetsShag","GLOBAL",3)~ GOTO MoreShagging
END

//'Lets Shag' was set to 3 in that last dialogue so that next time you banter
// with Austin then that dialogue won't run again.

// Blah blah...
"You alone can make my song take flight..."

#34 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 13 February 2004 - 06:44 AM

IF ~CONDITIONS
Globlal("LetsShag","GLOBAL",1)~ THEN BEGIN TheShagging
SAY ~So, shall we shag now, or shag later?~
++ ~I want to shag now, Austin!~ GOTO ShagNow
++ ~Later, Austin~ GOTO ShagLater
END

IF ~~ THEN BEGIN ShagNow
SAY ~Groovy, baby!~
IF ~~ THEN DO ~RealSetGlobalTimer("TimeToShag","GLOBAL",10)
RestParty()~ EXIT
END


Hi Grim,

I dont think this will work -> you see the GabberD.bcs (baf) is triggered 'after' you click the rest button. And it in turn triggers first and second states of this pre-shag conversation. If you put additional RestParty() command in this dialog the party will rest twice (once because you clicked the rest button and second because the dialog triggered another rest) - and I am not sure what will happen to you 'morning after' dialog after 2 rests in a row - but there can be problems. I think it maybe better to leave timer and remove the 2nd rest from the dialog.

IF ~~ THEN BEGIN ShagNow
SAY ~Groovy, baby!~
IF ~~ THEN DO ~RealSetGlobalTimer("TimeToShag","GLOBAL",10) ~ EXIT
END

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#35 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 13 February 2004 - 06:59 AM

I think the RestParty() is required or actual resting won't happen. I think the D script activating nullifies the rest command.
e.g.

Aerie: I...I will show you my body, <CHARNAME>...and I hope it pleases you.  Would you...would you stay with me this night, <CHARNAME>?  Will you show me what true love consists of?

Charname: How could I refuse such a sweet offer?

Aerie: C-come close to me, then, <CHARNAME>.  Let me feel your hands on my skin...let us lay together so I may experience your love and become a woman at last... 

RestParty()


I think the RestParty() is needed for the actual resting to take place after the dialogue.
"You alone can make my song take flight..."

#36 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 13 February 2004 - 07:01 AM

Hi Grim,

I dont think this will work -> you see the GabberD.bcs (baf) is triggered 'after' you click the rest button. And it in turn triggers first and second states of this pre-shag conversation. If you put additional RestParty() command in this dialog the party will rest twice (once because you clicked the rest button and second because the dialog triggered another rest) - and I am not sure what will happen to you 'morning after' dialog after 2 rests in a row - but there can be problems. I think it maybe better to leave timer and remove the 2nd rest from the dialog.

IF ~~ THEN BEGIN ShagNow
SAY ~Groovy, baby!~
IF ~~ THEN DO ~RealSetGlobalTimer("TimeToShag","GLOBAL",10) ~ EXIT
END

Actually Grim is correct. Doing anything in the xxD.bcs will interrupt the resting and you will have to call RestParty() manually.

#37 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 13 February 2004 - 07:57 AM

Actually Grim is correct.

Not something I hear everyday!
"You alone can make my song take flight..."

#38 dorotea

dorotea

    witch extraordinaire

  • Modder
  • 1927 posts

Posted 13 February 2004 - 07:59 AM

I need to check my own scripts when I get home - but I think I never used the second RestParty() and it worked. The again - it has been awhile, so I might be mistaken. Most likely you are correct though.

Freedom cannot be equated with goodness, virtue, or perfection. Freedom has its own unique self-contained nature; freedom is freedom ? not universal goodness. Any confusion or deliberate equalization of freedom with goodness and excellence is in itself negation of freedom, and acceptance of the path of restraint and enforcement.

Nikolai Berdyaev - Christian Existentialist, Philosopher of Freedom.


The Longer Road mod
Redemption mod
Bitter Grey Ashes


#39 Grim Squeaker

Grim Squeaker

    Fallen

  • Member
  • 1018 posts

Posted 13 February 2004 - 08:06 AM

I need to check my own scripts when I get home - but I think I never used the second RestParty() and it worked. The again - it has been awhile, so I might be mistaken. Most likely you are correct though.

Well its not a second RestParty(), its just actually performing the original rest, as the command from the user was interrupted and died.
"You alone can make my song take flight..."

#40 Sillara

Sillara

    He made me love him without looking at me.

  • Member
  • 537 posts

Posted 13 February 2004 - 06:15 PM

IF
Global("GabberMatch","GLOBAL",0)
Global("CheckGabberMatch","GLOBAL",0)
Gender(Player1,FEMALE)
!Global("AnotherMaleRomanceActive","GLOBAL",2)
!Global("GabberRomanceActive","GLOBAL",3)
Alignment(Player1,MASK_GOOD)
OR(6)
Race(Player1,HUMAN)
Race(Player1,HALF_ELF)
Race(Player1,ELF)
Race(Player1,HALFLING)
Race(Player1,GNOME)
Race(Player1,HALF_ORC)

THEN
RESPONSE #100
SetGlobal("CheckGabberMatch","GLOBAL",1)
SetGlobal("GabberMatch","GLOBAL",1)
END

This will activate the romance for every one of the 6 races but only good alignment. Mind that ! == 'not true'


And by the way - this link is somewhat of a must for scripting.

http://dragonlance.t.../bg2actions.htm

Please be patient with me and my simple (stupid) questions.

The "Gabber" is replaced with the name of my NPC, correct?

When it checks for another romance to have reached the committed state, is it sufficient to put AnotherMaleRomanceActive, or do I need to put AnomenRomanceActive, SolaufeinRomanceActive, EdwinRomanceActive, etc.?

When it checks for the PC's race, do I put the following?
OR(6)
Race(Player1,HUMAN)
Race(Player1,HALF_ELF)
Race(Player1,ELF)

Or do I put this?
OR(3)
Race(Player1,HUMAN)
Race(Player1,HALF_ELF)
Race(Player1,ELF)

Also, what does RESPONSE #100 mean? I have seen it a lot, but I do not know what it means. Do I need to put RESPONSE #100? Or does that change according to various things I have named in my scripts?

Thank you!
Sillara
P.S. dorotea, if you would rather I PM you these questions, just let me know.
Check out my RPG forum!