Jump to content


Photo

Writing a detailed Anomen romance conflict for an engaged PC.


12 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 5086 posts
  • Gender:Female

Posted 26 April 2007 - 11:43 AM

This is not meant to be a "tutorial," but rather a collection of my experiences while coding the Anomen - Ajantis romance conflict. My thanks to berelinde for providing the English BANOMEN.dlg and comments and proof reading!

EDIT: If someone feels like discussing the fact whether Anomen actually would romance an engaged woman, maybe this thread is more suitable: Poll: Multiromancing in the committed state?

I felt the need for a more individualised Anomen - Ajantis romance conflict, as Ajantis (if the player wants to play the romance) and the PC would be already engaged at the beginning of BGII. Since I did not want to "shut down" the Anomen romance from the start, I needed a more specific romance conflict than the usual "two men in the party realise they are both romancing the PC - one of them starts a conflict - PC has to decide - one romance gets shut down" approach.

The following abbreviations are used:
"CN Anomen": Anomen as a chaotic neutral cleric, after failing his knighthood test.
"LG Anomen": Sir Anomen as a lawful good knight, after passing his knighthood test.
"RA" = "RomanceActive": Variable which defines the status of a romance. For Anomen's romance, that would be "1" for an uncommitted relationship, "2"for flirt status (see below), "2" for committed, and "3" for terminated.
"LT" = LoveTalk variable: the value of the local variable named "LoveTalk" that is used to trigger the romance dialogues. Anomen's romance is coded so that the love talks are triggered by even LT values, uneven values are in between while the timer is running.

I advise decompiling the BANOMEN.dlg into a readable file, such as a text editor, and comparing the states. I have identified the ones that would cause Ajantis to react. It could well be that your NPC would react to different states!

Summary of important points of the Anomen romance for conflict talks:

Between LT variables 26 and 28: Anomen has his knighthood test.

If he passes the test and becomes a knight, the variable ~Global("AnomenIsKnight","GLOBAL",1)~ is set and his alignment is changed to LG (lawful good).

If he fails, the variable ~Global("AnomenIsNotKnight","GLOBAL",1)~ is set and his alignment changes to CN (chaotic neutral).

LT 30: CN Anomen wants to kiss the PC

LT 32: CN and LG Anomen asks the PC to spend the night with him

LT 34: CN Anomen's love confession


There are several reasons I found the Anomen romance conflict to be quite complex:
1. Anomen's romance is structured differently, depending on whether he is LG or CN, which, in turn, is dependent on whether or not he passed his knigthood test. Ajantis's reactions and conflicts would be different, depending on Anomen's path. Apart from alignment, Ajantis would react differently to a fellow knight than to a CN cleric and "ex" order member.
2. Anomen's sequence of first love night, then love confession: Makes it possible, that the PC "only" sleeps with him but ends the relation afterwards.
3. Inaccurate or missing setting of the Anomen RA variable. The "committed" romance state, i.e. the "AnomenRomanceActive = 2" is actually already set in LoveTalk 28, which is the first love talk after the knighthood test, two lovetalks before the deciding night talk. It can still be set to "3" if the PC brakes with him, but other than that the romance variable indicates already "committed romance". So, detecting the "AnomenRomanceActive = 2" alone for a "committed" Anomen romance would not be enough!

Plus, Anomen LT triggered by Global("LoveTalk","LOCALS",28) ("~A glorious day it is, my lady! I have achieved my dream, and I owe much of that to your assistance and counsel.~") is triggered without check of AnomenRomanceActive variable. Meaning: If the AnomenRomanceActive is set to 3 by another mod while Anomen's LoveTalk variable is Global("LoveTalk","LOCALS",27), Anomen will start his dialogue after the knighting test and AnomenRomanceActive gets set to 2!
I solved this problem for my mod in the way that I allow the Anomen romance to proceed until this dialogue, and make the shut down then. For this, I need a check whether the after-test dialogue already fired:
IF
	GlobalGT("LoveTalk","LOCALS",27)
	Global("C#CheckAnomenLTGT27","GLOBAL",0)
THEN
	RESPONSE #100
		SetGlobal("C#CheckAnomenLTGT27","GLOBAL",1)
END
With this, I add a block to my NPC's script:
//Kill Anomenromance if PC and Ajantis are married 
IF
	Global("C#AjantisPCMarriage","GLOBAL",1) 
	Global("C#AjantisKillAnomenRom","GLOBAL",0) 
	Global("C#CheckAnomenLTGT27","GLOBAL",1)
	OR(2)
		Global("AnomenRomanceActive","GLOBAL",1)
		Global("AnomenRomanceActive","GLOBAL",2)
THEN
	RESPONSE #100
		SetGlobal("C#AjantisKillAnomenRom","GLOBAL",1)
		SetGlobal("AnomenRomanceActive","GLOBAL",3)
END

Now let us take care of point number 3. In addition to the confusion caused by setting the variable before the decision whether or not to sleep with Anomen, there are two states where setting the RA to "3" for break-up is missing: state 437 (LG Anomen, PC refuses to sleep with him two times), and state 399 (CN Anomen, PC insults him and Anomen leaves for ever).

There is also one state where setting to RA = 2 is missing (as said before, it would not really be needed, but I added it nonetheless to make sure): state 434, where the PC sleeps with LG Anomen without being too positive about his desire.

Adding these actions would be done by "ADD_TRANS_ACTION", to be put into a .d-file for compilation:

/* adding action states to ensure that the AnomenRomanceActive has the right value depending on the PC's behaviour */

ADD_TRANS_ACTION BANOMEN BEGIN 434 END BEGIN END ~SetGlobal("AnomenRomanceActive","GLOBAL",2) ~

ADD_TRANS_ACTION BANOMEN BEGIN 437 399 END BEGIN END ~SetGlobal("AnomenRomanceActive","GLOBAL",3)~

Further, I said that checking for RA = 2 is not enough, so a check for the LoveTalk number would be needed. Since "LoveTalk" is a local variable, the check has to be performed in Anomen's script Anomen.bcs:

IF //check for love night in Anomen.bcs
	GlobalGT("LoveTalk","LOCALS",32)
	Global("C#CheckAnomenLTGT32","GLOBAL",0)
THEN
	RESPONSE #100
		SetGlobal("C#CheckAnomenLTGT32","GLOBAL",1)
END

In addition, a check whether Anomen slept with the PC could be introduced, which would be sufficient if it is assumed that the Anomen romance would be played while the Ajantis mod is installed (and not before). The states for committed Anomen love night are 432 and 434 for LG Anomen, and 366 for CN Anomen:


ADD_TRANS_ACTION BANOMEN BEGIN 432 434 366 END BEGIN END ~SetGlobal("C#AjantisPCSleptWithAno","GLOBAL",1)~ //variable is set for committed anomen love night

So the global variable "C#CheckAnomenLTGT32" or "C#AjantisPCSleptWithAno" tell Anomen's love night happened. Combined "C#CheckAnomenLTGT32" with Anomenromance = 2 would mean the PC slept with Anomen. The script block to deactivate the Ajantis romance for committed romance with Anomen now looks like this:

IF
	Global("C#AjantisRomanceActive","GLOBAL",2)
	Global("AnomenRomanceActive","GLOBAL",2)
	OR(2)
		GlobalGT("C#CheckAnomenLTGT32","GLOBAL",0) //after Ano love night
		Global("C#AjantisPCSleptWithAno","GLOBAL",1) //PC slept with Anomen
	Global("C#AjantisPCOtherRom","GLOBAL",0)
THEN
	RESPONSE #100
		SetGlobal("C#AjantisPCOtherRom","GLOBAL",1)
		SetGlobal("C#AjantisRomanceActive","GLOBAL",3)
END

Now comes the interesting part: Adapting the Anomen romance so it is appropriate for the case of "romancing an engaged woman". I was anxious to give the PC enough answer options concerning her relation with Ajantis. Most of them do not end the Anomen romance, especially not for CN Anomen. Still, I didn't want LG Anomen to look like a jerk, but that's to the author's taste, I guess.

The additional PC choice would be added with EXTEND_BOTTOM.

So, the interesting points would be:

-in LT 30 for CN Anomen:

State 347: Anomen asks for a kiss.

(CN Anomen doesn't let himself be decouraged, no matter how rude the answer. For refusal, I used state "354", which is the origial one for rejection.)

State BANOMEN 350 would be after the actual kiss.

If Ajantis would be in the party, I wanted him to react to that, of course.


/* adding interjection if PC kissed CN Anomen with Ajantis in the party*/

INTERJECT BANOMEN 350 C#AnomenKissedPC
== ~C#AjanJ~ IF ~InParty("C#Ajantis") !Dead("C#Ajantis") !StateCheck("C#Ajantis",CD_STATE_NOTVALID)
Global("C#AjantisRomanceActive","GLOBAL",2) Global("C#AjantisNoRomance","GLOBAL",0)~ THEN
~<CHARNAME>, my love!... What... what are you doing there with Anomen?~
END BANOMEN pc_kiss

-For LG Anomen, I added answer option after his flower present, where he finds quite direct words already (state BANOMEN 411 and 416).

-Next is the love night (LoveTalk","LOCALS",32).

CN Anomen: state BANOMEN 361, 364, 365

LG Anomen: state BANOMEN 429

In addition to the PC reply options, I felt it necessary that Anomen expresses his awareness that he is romancing an engaged woman. It can be easily realised by letting him say some more additional lines via "INTERJECT_COPY_TRANS", which would only be triggered if the romance case would be true. For example after state 427, where LG Anomen makes his intro to his final question:

Here are the original states:
IF ~~ THEN BEGIN 427 // from: 426.0
SAY #35850 /* ~You have become the captain of my soul, and have kept me on the path of righteousness and good... and aided me in achieving a dream I had nearly thought to be impossible.~ */
IF ~~ THEN GOTO 428
END 

IF ~~ THEN BEGIN 428 // from: 427.0
SAY #35851 /* ~I... I wish to become closer to you, <CHARNAME>. I wish to feel you in my arms, to caress your skin and lay with you in the night.~ */
IF ~~ THEN GOTO 429
END
I let him express his awareness that what he is doing is somehow wrong:


I_C_T BANOMEN 427 C#Banomen_Add_427_01
== ~BANOMEN~ IF ~Global("C#AjantisRomanceActive","GLOBAL",2) Global("C#AjantisNoRomance","GLOBAL",0)
OR(2)
GlobalGT("C#AjanAnomenConflictKnight","GLOBAL",0)
GlobalGT("C#AjanAnomenConflictKnight2","GLOBAL",0)
OR(2)
Global("DomainPaladinBattle","GLOBAL",0)
Global("C#AjantisExistiert","GLOBAL",1)~ THEN ~I know that I am wrong to address such direct words to the fiance of an Order comrade, and yet, my lady, if I do not ask you now, I will never know the answer to my painful desire!~
END

I hope someone will find this useful. If you have any comments or corrections please let me know!

Edited by jastey, 13 January 2008 - 07:22 AM.


#2 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Location:New Jersey, USA

Posted 26 April 2007 - 12:04 PM

I'm finding it very useful, believe me.
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#3 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Location:New Jersey, USA

Posted 26 April 2007 - 02:01 PM

Quick question: how are you checking for Anomen's LT numbers. Anomen's romance uses local variables, and I'm not sure how you would check for them.

I can check

IF ~Global("AnomenRomanceActive","GLOBAL",1)~

with any script, but putting a check for Anomen's local variables, in Gavin's script isn't likely to help. Do you add a trans action to the appropriate state of Anomen's LT setting your own global variable?

Edited by berelinde, 26 April 2007 - 02:35 PM.

Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#4 Kulyok

Kulyok
  • Members
  • 5543 posts
  • Gender:Female
  • Location:Moscow, Russia

Posted 26 April 2007 - 09:23 PM

I would disagree that Anomen would romance an engaged woman, especially a woman who gave her word to a fellow paladin. I do think it is out of character for him.

EDIT: In any case, I would change the name of the thread, indicating that it is not a regular romance-conflict, a-la Anomen-Kelsey, but a special case(engaged woman/Ajantis' romance still active after Anomen's turns to 2).

Edited by Kulyok, 26 April 2007 - 09:25 PM.


#5 jastey

jastey
  • Gibberlings
  • 5086 posts
  • Gender:Female

Posted 26 April 2007 - 09:54 PM

Kulyok: We have different opinions here, as I think that Anomen would romance her, as he seems to be overwhelmed by his own feelings quite a lot. I made sure he stays polite (or whatever you want to call it), though. All he does is showing his feelings. :)

And, well, yeah, I just like the Anomen romance too much to just shut it down.

Title: I thought the subtitle would be sufficient for identification, but I will change the main title to make it clearer. Thank you for the hint.

Berelinde: I set GLOBAL variables by adding script blocks to the Anomen .bcs (second "code" window above).

#6 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 6910 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 27 April 2007 - 11:17 AM

To you ladies this is review, but since this is a tutorial thread,

The transfer of "LOCALS" to "GLOBAL" in a character's .BCS is a pretty important cross-mod trick, that probably ought to have it's own tutorial. The same trick is very useful for "AREA" and "AR8700" and such variables, which (I believe) cannot be seen by the engine unless the area script is active. You can use the reverse, too, setting the "LOCALS" from a "GLOBAL" or "AR####".

This one is also independent of Multi-Romance tweaks; if one were to want to force players into choosing only what one wanted to have happen, one could use these created variables to shut off other romances or even kill this romance. I wouldn't suggest doing this, because I believe that players should play their own games their own way, but for a less draconian measure than killing the romance the same variable set could spark a very serious discussion between Gavin, Ajantis, Anomen, any LG person in the area - you name it. Multi-Romance could not shut this one down; you can have consequences for multi-romance occur by crossmatching variables across lovetalks. It also looks like there might need to be some carefullness with escaping the relationship completely under Multi-Romance;

from the Multi-Romance present in BG2_Tweaks:
IF
	InParty(Myself)
	GlobalLT("LoveTalk","LOCALS",28)
	!Global("AnomenRomanceActive","GLOBAL",1)
THEN
	RESPONSE #100
		SetGlobal("AnomenRomanceActive","GLOBAL",1)
		Continue()
END

IF
	InParty(Myself)
	GlobalGT("LoveTalk","LOCALS",27)
	!Global("AnomenRomanceActive","GLOBAL",2)
THEN
	RESPONSE #100
		SetGlobal("AnomenRomanceActive","GLOBAL",2)
		Continue()
END
so the consequences would have to be something that did not just set the Romance variable back. I can't find any part of the BG2_Tweaks code that pushes it back from 3, but I was sure there was an option for an "always loves me" - perhaps that was Sabre's original one that I saw. Anyways, it is out there somewhere, so it should probably be something besides messing with Romance variables.

I imagine a deathmatch would not be a pleasant experience for the player, though, even one where the choice is made and I would seriously consider the idea of not getting too graphic about this kind of conflict, as players might not take kindly to having their freedom curtailed.
I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#7 jastey

jastey
  • Gibberlings
  • 5086 posts
  • Gender:Female

Posted 27 April 2007 - 11:23 AM

I do not understand the meaning of your post, cmorgan. :)

Did you critisize my LOCALS to GLOBAL variable method? Are you proposing something that should or should not reset romance variables? Sorry for asking so dumb.

#8 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Location:New Jersey, USA

Posted 27 April 2007 - 11:38 AM

He posted the code from BG2 Tweaks that prevents Anomen's romance from being killed by saying the wrong thing.

Not sure how it pertains to this, though.
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#9 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 6910 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 27 April 2007 - 11:56 AM

OH, no Jastey, I'm so sorry - I don't know what I said to make you think that; let me be clearer! You are *not* stupid - I am just not coherently organizing my thoughts.

Sentence 1 and Paragraph 1 - berelinde asked how you got the "LOCALS" value to be "GLOBAL", and you pointed her to the code, but since this was in the tutorial thread I expanded what you folks meant: the trick you use is a cool one, and not explained well anywhere I have seen, so I was trying to show it could be used for both local variables and area variables. I must have gotten stuffy and pendantic, so when you (eventually) clean up the top post as a tutuorial, just grab the concept stuff and rewrite it so it doesn't sound so awkward!

Paragraph 2 - Extrapolation - nothing to do with the code you presented or your choices, just extending the idea for other uses, especially the silliness that is the Multi-Romance tweak. You have explained pretty much step by step a great method here for setting up any cross-mod material someone could want, by showing what you have to do to manipulate both "LOCALS" and states into talking to eachother. I was trying to show that this allows modders to add content that is independent of the Multi-Romance tweak. With some careful handling and sidestepping away from the Romance variables (i.e. your use of a new variable, SetGlobal("C#CheckAnomenLTGT32","GLOBAL",1) ) a modder can have Aerie and Jaheira comment on the shared bedroll of Player1 with someone using the Multi-Romance Tweak. They should avoid messing with setting the Romance Variable to 1, returning to "uncommitted", as Tweaks can put everything back in play; they could move it to 3, but I am pretty sure that there is a tweak against that (but need to do more research before committing myself).
I tried to point out that this way instead of enforcing player choices, you can enhance the consequences of their actions. The ingame characters recognizing that they were being two-timed, and responding appropriately, the way you are setting up in the above code, is a much more permanent solution, hard to get away from by the player; and then

Paragraph 3 a quick reminder to anyone going forward with this idea in their own mod, that while fighting against the use of the Multi-Romance Tweak (which is a real blow to anyone trying to tell an internally consistent story) is possible using this method, it is probably wise to not kill off other NPCs or the character as that drastic a solution just means players will get turned off.

You do not suggest anything of the kind in your post. I was just imagining what was possible, and suddenly had a catfight between Jaheira and Aerie running in my head, and suddenly Jaheira got angry and started whacking Aerie with her staff, and Aerie started randomly throwing a temper tantrum, tears, and fireballs, in random order...

Edited by cmorgan, 27 April 2007 - 11:57 AM.

I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#10 jastey

jastey
  • Gibberlings
  • 5086 posts
  • Gender:Female

Posted 27 April 2007 - 12:04 PM

So, what I read as critic was actually a praise? I seem to have severe problems to grab your speech pattern, silly me.
Do you want me to extend the LOCALS to GLOBAL transformation description in any way? The way I proposed seems to be such a trivial thing to do.

#11 cmorgan

cmorgan

    journeyman investigator

  • Gibberlings
  • 6910 posts
  • Gender:Male
  • Location:Glencoe, IL, USA

Posted 27 April 2007 - 01:22 PM

yep - sorry - too much philosophy discussion at SHS. I do sound obtuse, lecturing, pointless... I knew I was spending too much time reading forums and not enough coding!!!!

if the language seems like it is too silly or off topic, I can delete the post. I can even boil it down to three concrete suggestions, for the eventual top post of the tutorial:
  • I suggest expanding your description of what you do to set a "GLOBAL" from a "LOCALS" with the "why I do this", so new folks can follow exactly why this is important, and copy you. (Plus, point out that you can use this to set stuff from area-stored variables, too.)
  • I suggest adding a qualifier to what you are saying, explaining that anyone reading this for use in their own modding also needs to keep track of what the Multi-Romance Tweak actually does to the romance code, so that they don't accidentally write themselves into problems.
  • I suggest completely ignoring all my stupid extrapolation about how you could use this to add romance conflict that sidesteps Multi-Romance Tweaks, because now that I have reread it, it is kind of like saying "blue is blue" - duh - of course setting a new variable independent of the Romance chain allows this :)

Edited by cmorgan, 27 April 2007 - 01:32 PM.

I love deadlines. I love the whooshing noise they make as they go by. - Douglas Adams

#12 jastey

jastey
  • Gibberlings
  • 5086 posts
  • Gender:Female

Posted 29 April 2007 - 10:30 AM

Points one and two are good suggestions, thank you, cmorgan. I will deal with them as soon as I'll come back to this.

#13 jastey

jastey
  • Gibberlings
  • 5086 posts
  • Gender:Female

Posted 13 January 2008 - 07:10 AM

I just noticed that Anomen LT Global("LoveTalk","LOCALS",28) ("~A glorious day it is, my lady! I have achieved my dream, and I owe much of that to your assistance and counsel.~") is triggered without check of AnomenRomanceActive variable.

Meaning: If the AnomenRomanceActive is set to 3 by another mod while Anomen's LoveTalk variable is Global("LoveTalk","LOCALS",27), Anomen will start his dialogue after the knighting test and AnomenRomanceActive gets set to 2!
Bugger.

EDIT: Edited the above post to reflect this. Plus I corrected the Anomen LT numbers, as there was a mix up I didn't notice earlier.

Edited by jastey, 13 January 2008 - 07:23 AM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users