Jump to content


Photo

Need a line of code.


  • Please log in to reply
22 replies to this topic

#1 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 13 July 2006 - 12:10 AM

I want to edit a few dialog files. I want to check for a global and if the global is set then NOT to play the dialog. I need a check to see if ('endofbg1','GLOBAL',1) has been set and the not play the dialog.

Edited by Chevalier, 11 August 2006 - 02:28 AM.

I Ride for the King!


a.k.a. Chev


#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11149 posts

Posted 13 July 2006 - 12:33 AM

Moved this to the IE Help forums.

What you're looking for is to add another condition to the state, which easily can be done if there are other conditions there already. If there is, you can just use a similar approach as I showed here, only that you use DECOMPILE_DLG_TO_D instead of BCS and BAF (and other way around). Then you use a R_T to add another condition.

It'd be much easier to explain if I saw the entire state you wish not to appear.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#3 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 13 July 2006 - 02:02 AM

////Area Script - in Firewine////

IF WEIGHT #-2 ~
Global("ImoenFIRE","GLOBAL",1)
~ THEN BEGIN IMPC9
SAY ~So that's Firewine bridge!? Wow! Isn't it just so grand!? I wonder what it would have been like when it was actually in use.~ 
IF ~~ THEN REPLY ~Bah! You seen one bridge, you seen them all!~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.1
IF ~~ THEN REPLY ~Yes, it just goes to show you how grand things can withstand the test of time.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.2
IF ~~ THEN REPLY ~Yes, but it just goes to show you that humans and other races can do what they want, but nothing they do will last forever. Eventually everything will be forgotten and destroyed.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.7
IF ~~ THEN REPLY ~Didn't you read about it at Candlekeep, or were you sleeping that day?~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.8
IF ~~ THEN REPLY ~I'm still wondering how they built it.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.9
END


And many others. This is from BG1NPC4BGTWeiduv111.rar file X#imoen.d When in BG2, BG1 dialogs are starting and making problems. See the bugs I am getting
here I thought if I had check or block I could copy and paste and test it.

I Ride for the King!


a.k.a. Chev


#4 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 15 July 2006 - 10:27 PM

Why don't you simply replace the bg1 stuff (dialogs/scripts) with the bg2 equivalent, or if there is no equivalent, you could simply replace it with "".
There is no need to mangle all the bg1 stuff.
Avenger

#5 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 18 July 2006 - 12:47 AM

Avenger_teambg

There 2 banter packs, 'BG1 NPC Projec't and 'Banter Pack's, if you install 'Banter Pack's before you start BG2 then messes up BG1 dialogs and if you still have 'BG1 NPC Project' installed when you start BG2 it messes up BG2 Dialogs. I don't want to install and uninstall as I am playing the game, that might F... it up too.

I Ride for the King!


a.k.a. Chev


#6 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 18 July 2006 - 07:07 AM

I'm not entirely sure what you're asking. You can probably add a condition to every state in a DLG in a hacky way:

COPY_EXISTING ~myfile.dlg~ ~override~
DECOMPILE_DLG_TO_D
REPLACE_TEXTUALLY %~ THEN BEGIN% % Global("endofbg1","GLOBAL",1)~ THEN BEGIN%
COMPILE_D_TO_DLG
BUT_ONLY_IF_IT_CHANGES

(The "correct" way of doing this is ADD_STATE_TRIGGER with every state specified--optionally it's possible to construct a D which incorporates every state number in a DLG on the fly--but the above should be safe.)

However, if the BG1 and BG2 texts are in the same file then clearly an automated process can't distinguish them. (You can actually have WeiDU patch the source D before it makes it into the game, since presumably then the texts are separate. Lose the DECOMPILE/COMPILE combo for that.) If all you're asking is how to do it manually, then Global("endofbg1","GLOBAL",1) is the check you need to use.

This is the sort of post you miss out on when I'm banned!

Edited by SimDing0, 18 July 2006 - 07:07 AM.

Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#7 Avenger_teambg

Avenger_teambg
  • Member
  • 604 posts

Posted 18 July 2006 - 11:54 PM

Avenger_teambg

There 2 banter packs, 'BG1 NPC Projec't and 'Banter Pack's, if you install 'Banter Pack's before you start BG2 then messes up BG1 dialogs and if you still have 'BG1 NPC Project' installed when you start BG2 it messes up BG2 Dialogs. I don't want to install and uninstall as I am playing the game, that might F... it up too.

You can replace the scripts/dialogs after you transferred to bg2.
And i didn't mean a manual transfer, but a script which replaces all that needs replacement.
Avenger

#8 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 19 July 2006 - 12:33 AM

You can't replace NPC banter DLGs.
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#9 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 19 July 2006 - 01:12 AM

However, if the BG1 and BG2 texts are in the same file then clearly an automated process can't distinguish them. (You can actually have WeiDU patch the source D before it makes it into the game, since presumably then the texts are separate. Lose the DECOMPILE/COMPILE combo for that.) If all you're asking is how to do it manually, then Global("endofbg1","GLOBAL",1) is the check you need to use.


If I understand you right, then we are on the same page.

Current:

////Area Script - in Firewine////

IF WEIGHT #-2 ~
Global("ImoenFIRE","GLOBAL",1)
~ THEN BEGIN IMPC9
SAY ~So that's Firewine bridge!? Wow! Isn't it just so grand!? I wonder what it would have been like when it was actually in use.~
IF ~~ THEN REPLY ~Bah! You seen one bridge, you seen them all!~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.1
IF ~~ THEN REPLY ~Yes, it just goes to show you how grand things can withstand the test of time.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.2
IF ~~ THEN REPLY ~Yes, but it just goes to show you that humans and other races can do what they want, but nothing they do will last forever. Eventually everything will be forgotten and destroyed.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.7
IF ~~ THEN REPLY ~Didn't you read about it at Candlekeep, or were you sleeping that day?~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.8
IF ~~ THEN REPLY ~I'm still wondering how they built it.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.9
END

What I want:
////Area Script - in Firewine////

IF WEIGHT #-2 ~
IF Global("endofbg1","GLOBAL",1) then don't play this
Global("ImoenFIRE","GLOBAL",1)
~ THEN BEGIN IMPC9
SAY ~So that's Firewine bridge!? Wow! Isn't it just so grand!? I wonder what it would have been like when it was actually in use.~
IF ~~ THEN REPLY ~Bah! You seen one bridge, you seen them all!~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.1
IF ~~ THEN REPLY ~Yes, it just goes to show you how grand things can withstand the test of time.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.2
IF ~~ THEN REPLY ~Yes, but it just goes to show you that humans and other races can do what they want, but nothing they do will last forever. Eventually everything will be forgotten and destroyed.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.7
IF ~~ THEN REPLY ~Didn't you read about it at Candlekeep, or were you sleeping that day?~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.8
IF ~~ THEN REPLY ~I'm still wondering how they built it.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.9
END

I am willing to cut and paste IF Global("endofbg1","GLOBAL",1) then don't play this in each dialog that needs it. I am also looking for a global set at the start of BG2 to add as a check for Banter Packs that will work even if BGT is not installed.

This is the sort of post you miss out on when I'm banned!

I know that you can be very helpful!! Just sometimes people just don't get you, if you know what I mean. ;) Oh Lord, Please don't let me be missunderstood

I Ride for the King!


a.k.a. Chev


#10 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 19 July 2006 - 01:49 AM

This is the correct code:

////Area Script - in Firewine////

IF WEIGHT #-2 ~!Global("endofbg1","GLOBAL",1)
Global("ImoenFIRE","GLOBAL",1)~ THEN BEGIN IMPC9
SAY ~So that's Firewine bridge!? Wow! Isn't it just so grand!? I wonder what it would have been like when it was actually in use.~
IF ~~ THEN REPLY ~Bah! You seen one bridge, you seen them all!~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.1
IF ~~ THEN REPLY ~Yes, it just goes to show you how grand things can withstand the test of time.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.2
IF ~~ THEN REPLY ~Yes, but it just goes to show you that humans and other races can do what they want, but nothing they do will last forever. Eventually everything will be forgotten and destroyed.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.7
IF ~~ THEN REPLY ~Didn't you read about it at Candlekeep, or were you sleeping that day?~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.8
IF ~~ THEN REPLY ~I'm still wondering how they built it.~ DO ~SetGlobal("ImoenFIRE","GLOBAL",2)~ GOTO IMPC9.9
END

You simply add the "endofbg1" line alongside the "ImoenFIRE" one within the initial tildes.

I am also looking for a global set at the start of BG2 to add as a check for Banter Packs that will work even if BGT is not installed.

I'm not aware of any variable that can detect whether Banter Packs are installed.

Incidentally, since the BG1 content is the new addition, to maintain maximum compatibility with existing BG2 mods, it would actually make more sense for BGT and associates to have a "aminbg1" variable and key content off this, rather than deactivating when "endofbg1" becomes true.

I know that you can be very helpful!! Just sometimes people just don't get you, if you know what I mean. ;) Oh Lord, Please don't let me be missunderstood

ADDED TO THE HITLIST.

:)

Edited by SimDing0, 19 July 2006 - 01:54 AM.

Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#11 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 19 July 2006 - 02:32 AM

ARE you sure it would not be:
IF WEIGHT #-2 ~!Global("endofbg1","GLOBAL",0)
Global("ImoenFIRE","GLOBAL",1)~ THEN BEGIN IMPC9

Because if the global is set then I don't want it to play??


What I need is not a check for Banter Packs, but a Global to check for to add to Banter Packs. A Global set at the start of BG2.

I Ride for the King!


a.k.a. Chev


#12 SimDing0

SimDing0

    GROUP ICON

  • Member
  • 1654 posts

Posted 19 July 2006 - 02:33 AM

! is negation. The banter will only play if the variable is NOT 1.
Repeating cycle of pubes / no pubes.

A Comprehensive Listing of IE Mods

#13 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 19 July 2006 - 02:35 AM

Oh I get it.

GREAT!!! THANK YOU!!!! :Bow:

I Ride for the King!


a.k.a. Chev


#14 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 11 August 2006 - 02:15 AM

Almost there!!!

How do you fix the stutter bug??? I am working on making BG1NPC truely BGT compatable. I know Imoen want to say something, but I want to stop her!

IF ~!Global("endofbg1","GLOBAL",1)
	IsGabber(Player1)
  ~ THEN BEGIN IMCH
 SAY ~*Imoen seems a little quiet for her. Funnily enough, you do not know all that much about your oldest friend. Perhaps this is a good time to find out what Imoen is all about.*~
 ++ ~*You decide that you cannot be bothered, lest you learn things you do not want to know about Imoen.*~ EXIT

+ ~GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,1)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure1
+ ~GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,2)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure2
+ ~GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,3)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure3
+ ~GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,4)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure4


 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,1)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHSuccessEarly
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,2)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure1
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,3)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure2
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,4)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure3
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,5)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure4

 +~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,INT) RandomNum(2,1)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHSuccessEarly
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,INT) RandomNum(2,2)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure1

 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,1)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHSuccessEarly
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,2)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure1
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,3)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure2
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,4)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure3
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,5)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure4

+ ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,WIS) RandomNum(2,1)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHSuccessEarly
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,WIS) RandomNum(2,2)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure2

 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,1)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHSuccessEarly
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,2)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure1
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,3)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure2
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,4)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure3
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,5)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure4

+ ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,CHR) RandomNum(2,1)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHSuccessEarly
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,CHR) RandomNum(2,2)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure3

 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,1)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHSuccessEarly

 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,2)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure1
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,3)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure3
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,4)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure2
 + ~GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,5)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure4

+ ~!GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,1)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure1
+ ~!GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,2)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure2
+ ~!GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,3)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure3
+ ~!GlobalLT("Chapter","GLOBAL",6) Global("IMCHdone","GLOBAL",1) RandomNum(4,4)~ + ~So, Imoen, can you tell me more about yourself?~ + IMCHFailure4

 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,1)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,2)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure1
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,3)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure2
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,4)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure3
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) RandomNum(5,5)~ + ~*You ask Imoen lots of personal questions.*~ + IMCHFailure4

 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,INT) RandomNum(2,1)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,INT) RandomNum(2,2)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure1

 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,1)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,2)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure1
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,3)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure2
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,4)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure3
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,INT) RandomNum(5,5)~ + ~*You proceed with asking inquisitive questions about Imoen?s past.* ~ + IMCHFailure4

+ ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,WIS) RandomNum(2,1)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,WIS) RandomNum(2,2)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure2

 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,1)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,2)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure1
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,3)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure2
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,4)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure3
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,WIS) RandomNum(5,5)~ + ~*You talk about Imoen's problems and hopes, in a friendly and kind manner, in hopes of making Imoen confide in you.*~ + IMCHFailure4

+ ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,CHR) RandomNum(2,1)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) CheckStatGT(Player1,15,CHR) RandomNum(2,2)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure3

 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,1)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHSuccessLATE
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,2)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure1
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,3)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure3
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,4)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure2
 + ~!GlobalLT("Chapter","GLOBAL",6) !Global("IMCHdone","GLOBAL",1) !CheckStatGT(Player1,15,CHR) RandomNum(5,5)~ + ~*You are used to hearing things from the bottom of people?s hearts... so you try to charm Imoen into telling you more about herself.* ~ + IMCHFailure4

I Ride for the King!


a.k.a. Chev


#15 Sir BillyBob

Sir BillyBob
  • Modder
  • 5315 posts

Posted 11 August 2006 - 05:27 AM

When does she actually stutter? This is a PC initiated dialog not an NPC inititated. Normally the stutter happens because she wants to talk but can't find a valid condition that can be met. In the above dialog, I would think that you start to talk to her and the dialog just ends because your dialog didn't have the right conditions for her to say anything, this normally gives you the <No Valid Response> error, not a stutter.

Tired of Bhaal? Try some classics mods instead:
Classic Adventures
Official Classic Adventures Website


#16 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 11 August 2006 - 04:10 PM

Still getting there. :)

I think I got most of this figured out. Imoen's other incorect dialogue seem to have been taken care of. All of you coding gurus out there which do you think is best
!Global("endofbg1","GLOBAL",1)
or
GlobalLT("endofbg1","GLOBAL",1)

The remaining conflict is between the trigger for
IF ~!Global("endofbg1","GLOBAL",1)
	IsGabber(Player1)
  ~ THEN BEGIN IMCH
SAY ~*Imoen seems a little quiet for her. Funnily enough, you do not know all that much about your oldest friend. Perhaps this is a good time to find out what Imoen is all about.*~
++ ~*You decide that you cannot be bothered, lest you learn things you do not want to know about Imoen.*~ EXIT
and Reilev.dlg
False()OR(5)
!InParty("Imoen")
Dead("Imoen")
!See("Imoen")
StateCheck("Imoen",STATE_SLEEPING)
!See(Player1)
OR(5)
!InParty("Imoen")
Dead("Imoen")
!See("Imoen")
StateCheck("Imoen",STATE_SLEEPING)
!See(Player1)
InParty("Imoen")
See("Imoen")
!Dead("Imoen")
!StateCheck("Imoen",STATE_SLEEPING)
See(Player1)
InParty("Imoen")
See("Imoen")
!Dead("Imoen")
!StateCheck("Imoen",STATE_SLEEPING)
See(Player1)
!IsValidForPartyDialog("Jaheira")IsValidForPartyDialog("Jaheira")GiveItemCreate("Misc4e",LastTalkedToBy,1,0,0)
AddexperienceParty(4000)
TriggerActivation("Rielevdeadtrigger",TRUE)
DestroySelf()
GiveItemCreate("Misc4e",LastTalkedToBy,1,0,0)
AddexperienceParty(1000)
TriggerActivation("Rielevdeadtrigger",TRUE)
DestroySelf()GiveItemCreate("Misc4e",LastTalkedToBy,1,0,0)
AddexperienceParty(4000)
TriggerActivation("Rielevdeadtrigger",TRUE)
DestroySelf()

I Ride for the King!


a.k.a. Chev


#17 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 16 August 2006 - 06:57 PM

Not a coding guru, but reading alot of mods, and I am pretty sure simplest is easiest: !Global("endofbg1","GLOBAL",1)

What are the symptoms of the conflict? Is this firing when Imoen's PID is supposed to be firing? If so, the answer is to follow SimDing0's advice in http://www.shsforums...dpost&p=257875:

ADD_STATE_TRIGGER filename stateNumber stateTriggerString [ stateNumber list ]

where the stateTriggerString is ~Global("endofbg1","GLOBAL",1)~
(saying yes, it is time for BG2 content).

thus the comination of
!Global for everything in BG1 content, and
Global for everything in BG2/TOB content
(plus you might need to add the "endofBG1" check to whatever other mods get added to the install who have Imoen no-condition-check or always evaluate true states...)


but you didn't hear it from me... I was never here... nope. Just a fig newton of your imagination. Hildeskaaf and Sir Billy Bob deserve huge amounts of cash and serious props for making a conversion even begin to be possible. Don't send Sim cash, though, he will spend it on beer instead of scotch. Plus, we need him turning out more mods.

Edited by cmorgan, 16 August 2006 - 07:01 PM.


#18 pro5

pro5
  • Modder
  • 722 posts

Posted 16 August 2006 - 09:38 PM

Note that as far as I remember (I can't check right now) the value of ENDOFBG1 variable in BGT is:

0 during BG1, until you kill Sarevok
1 in BG1, after you kill Sarevok but before you move on to BG2
2 in BG2

Look at Horred's last comment on this post.

#19 seanas

seanas
  • Modder
  • 1906 posts

Posted 17 August 2006 - 12:52 AM

Note that as far as I remember (I can't check right now) the value of ENDOFBG1 variable in BGT is:

0 during BG1, until you kill Sarevok
1 in BG1, after you kill Sarevok but before you move on to BG2
2 in BG2


yr memory is correct, pro5:
!Global("endofbg1","GLOBAL",1) is going to cause potential stutter problems in BG2 because "endofbg1"=2 in BGT - so any !=1 check will return true in the BG2 component (which is what Chev has found with the Rieltev dialogue stutter).

!Global("endofbg1","GLOBAL",2) check would cover all of the BGT content however.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#20 Chevalier

Chevalier

    Knight of the Realms

  • Modder
  • 2405 posts

Posted 17 August 2006 - 02:40 AM

Thanks cmorgan :Bow:


ADD_STATE_TRIGGER filename stateNumber stateTriggerString [ stateNumber list ]

where the stateTriggerString is ~Global("endofbg1","GLOBAL",1)~
(saying yes, it is time for BG2 content).


I get the bold part. But I don't get how to use ADD_STATE_TRIGGER? Is it an auto add feature to mods? WeiDU?? I had been cutting and pasting !Global("endofbg1","GLOBAL",1). Like this:

CHAIN
IF WEIGHT #-1 ~CombatCounter(0) !See([ENEMY])InParty("BRANWEN")
See("BRANWEN")
!StateCheck("BRANWEN",STATE_SLEEPING)
!Global("endofbg1","GLOBAL",1)
Global("EDBR1","LOCALS",0)~ THEN ~BEDWIN~ EDBR1
~(It is not only dwarves that have trouble discerning women from men...)~ 
DO ~SetGlobal("EDBR1","LOCALS",1)~
== ~BBRANW~ ~What is that you say, Edwin?~
== ~BEDWIN~ ~Nothing, nothing, I was merely musing on the fact that certain women have an uncanny ability of imitating the environment from which they come. Just because one has lived amongst rocks... or was one... does not mean one has to mimic them in appearance.~
== ~BBRANW~ ~Tempus endows each and every one of his children as he sees fit. Why should strength of spirit and faith not be doubled by strength of body?~
== ~BEDWIN~ ~Or tripled by strength of voice. (Talking to her is threatening my sensitive ear.)~
EXIT

Thanks pro5 :cheers:

It then should be 2. I still want BG1 dialogue while still on the Swordcoast. This may fix the last of the bugs I am getting. :)

seanas

You are right, that is what I will do. I hope to test it latet today.

I Ride for the King!


a.k.a. Chev