Jump to content


Photo

Static and fluid dialogue states in BGT


  • Please log in to reply
54 replies to this topic

#41 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 22 January 2008 - 08:25 PM

Ahhh - well, if someone actually ever really uses those distributed libraries, it would help them alot. So it would be a good idea to just do it right and set everything up that way.

I think I will split the difference, as I am coming up with pretty large numbers, and if I were going all the way I would do a pre-read of all those regular files (like %tutu_var%brilla, etc) and check them, too.

For getting this up and out the door for v15, I am going to concentrate on the fluid states.

ALWAYS
  ACTION_IF FILE_EXISTS_IN_GAME ~FW0100.are~ THEN BEGIN
	/* Tell the player it is using Tutu stuff */
	PRINT @1000
	INCLUDE ~BG1NPC\lib\g3_tutu_cpmvars.tpa~
  END ELSE BEGIN
	ACTION_IF FILE_EXISTS_IN_GAME ~AR7200.are~ THEN BEGIN
	  /* Tell the player it is using BGT stuff */
	  PRINT @1001
	  INCLUDE ~BG1NPC\lib\g3_bgt_cpmvars.tpa~
	  /* Tell the player it is not Tutu or BGT */
	  END ELSE BEGIN FAIL @1002
	END
  END

  /*  alter fluid states */ 
  INCLUDE ~BG1NPC\lib\g3_fluid_cpmvars.tpa~

  /* prep tras for sound references */
  COPY ~BG1NPC/TRA/%LANGUAGE%/BG1NPC_tmp.tra~ ~BG1NPC/TRA/%LANGUAGE%/BG1NPC.tra~
	   EVALUATE_BUFFER
  LOAD_TRA ~BG1NPC/TRA/%LANGUAGE%/BG1NPC.tra~

END

After we get it working, I can take another pass at it for v16, and refine it. I am not sure how many folks have to account for this, really.

#42 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 22 January 2008 - 09:50 PM

EDIT> updated Jan23, 8:14pm RE-EDIT> Jan23, 10:05pm
BG1NPC\lib\g3_fluid_cpmvars.tpa
  //OUTER_SET BGTBEDWINState0, vanilla _BEDWIN = 15 states {0-15} //done
  OUTER_FOR (cpv = 0; cpv < 16; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBEDWINState%cpv%~ = cpv + BGTBEDWINState0
  END
  //OUTER_SET BGTBJAHEIState0 vanilla _BJAHEI = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 9; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBJAHEIState%cpv%~ = cpv + BGTBJAHEIState0
  END
  //OUTER_SET BGTBMINSCState0 vanilla _BMINSC = 9 states {0-8} //done 
  OUTER_FOR (cpv = 0; cpv < 9; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBMINSCState%cpv%~ = cpv + BGTBMINSCState0
  END
  //OUTER_SET BGTBVICONIState0 vanilla _BVICON = 13 states {0-12} //done
  OUTER_FOR (cpv = 0; cpv < 13; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBVICONIState%cpv%~ = cpv + BGTBVICONIState0
  END
  //OUTER_SET BGTEDWINState0 vanilla _EDWIN = 29 states {0-28} //done
  OUTER_FOR (cpv = 0; cpv < 29; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTEDWINState%cpv%~ = cpv + BGTEDWINState0
  END
  //OUTER_SET BGTEDWINJState0 vanilla _EDWINJ = 13 states {0-12} //done
  OUTER_FOR (cpv = 0; cpv < 14; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTEDWINJState%cpv%~ = cpv + BGTEDWINJState0
  END
  //OUTER_SET BGTEDWINPState0 vanilla _EDWINP = 5 states {0-4} //done
  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTEDWINPState%cpv%~ = cpv + BGTEDWINPState0
  END
>>>  //OUTER_SET BGTIMOENState0 vanilla _IMOEN = 10 states {0-9}  Initial CandleKeep
>>>  OUTER_FOR (cpv = 0; cpv < 11; cpv += 1) BEGIN
>>>				SET EVALUATE_BUFFER ~BGTIMOENState%cpv%~ = cpv + BGTIMOENState0
>>>  END
>>>  //OUTER_SET BGTIMOENJState0 vanilla _IMOEN2 = 5 states {0-4}
>>>  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
>>>	SET EVALUATE_BUFFER ~BGTIMOENJState%cpv%~ = cpv + BGTIMOENJState0
>>>  END
>>>  //OUTER_SET BGTIMOENPState0 vanilla _IMOENP = 5 states {0-4}
>>>  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
>>>	SET EVALUATE_BUFFER ~BGTIMOENPState%cpv%~ = cpv + BGTIMOENPState0
>>>  END
  //OUTER_SET BGTJAHEIJState0 vanilla _JAHEIJ = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTJAHEIJState%cpv%~ = cpv + BGTJAHEIJState0
  END
  //OUTER_SET BGTJAHEIPState0 vanilla _JAHEIP = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTJAHEIPState%cpv%~ = cpv + BGTJAHEIPState0
  END
  //OUTER_SET BGTMINSCJState0 vanilla _MINSCJ = 8 states {0-7} //done
  OUTER_FOR (cpv = 0; cpv < 9; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTMINSCJState%cpv%~ = cpv + BGTMINSCJState0
  END
  //OUTER_SET BGTMINSCPState0 vanilla _MINSCP = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTMINSCPState%cpv%~ = cpv + BGTMINSCPState0
  END
  //OUTER_SET BGTVICONIJState0 vanilla _VICONJ = 2 states {0-1} //done
  OUTER_FOR (cpv = 0; cpv < 3; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTVICONJState%cpv%~ = cpv + BGTVICONJState0
  END
  //OUTER_SET BGTVICONIPState0 vanilla _VICONP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTVICONPState%cpv%~ = cpv + BGTVICONPState0
  END
  //Never Ending Journey 2 compatibility appending
  //OUTER_SET BGTXANState0 vanilla _XAN = 11 states {0-10} //done
  OUTER_FOR (cpv = 0; cpv < 12; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTXANState%cpv%~ = cpv + BGTXANState0
  END
  //The Darkest Day compatibility appending
  //OUTER_SET BGTKAGAIPState0 vanilla _KAGAIP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTKAGAIPState%cpv%~ = cpv + BGTKAGAIPState0
  END
  //OUTER_SET BGTKIVANPState0 vanilla _KIVANP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTKIVANPState%cpv%~ = cpv + BGTKIVANPState0
  END
  //OUTER_SET BGTSHARTPState0 vanilla _SHARTP = 5 states {0-4} //done
  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTSHARTPState%cpv%~ = cpv + BGTSHARTPState0
  END
  //OUTER_SET BGTXZARPState0 vanilla _XZARP = 10 states {0-9} //done
  OUTER_FOR (cpv = 0; cpv < 11; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTXZARPState%cpv%~ = cpv + BGTXZARPState0
  END
  //OUTER_SET BGTYESLIPState0 vanilla _YESLIP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTYESLIPState%cpv%~ = cpv + BGTYESLIPState0
  END
  //Tortured Souls compatibility appending
  //OUTER_SET BGTBCORANState0 vanilla _BCORAN = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBCORANState%cpv%~ = cpv + BGTBCORANState0
  END
  //OUTER_SET BGTCORANState0 vanilla _CORAN = 17 states {0-16} //done
  OUTER_FOR (cpv = 0; cpv < 18; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTCORANState%cpv%~ = cpv + BGTCORANState0
  END
  //OUTER_SET BGTCORANJState0 vanilla _CORANJ = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTCORANJState%cpv%~ = cpv + BGTCORANJState0
  END
  //OUTER_SET BGTCORANPState0 vanilla _CORANP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTCORANPState%cpv%~ = cpv + BGTCORANPState0
  END
  //OUTER_SET BGTDYNAHJState0 vanilla _DYNAHJ = 12 states {0-11} //done
  OUTER_FOR (cpv = 0; cpv < 13; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTDYNAHJState%cpv%~ = cpv + BGTDYNAHJState0
  END
  //OUTER_SET BGTDYNAHPState0 vanilla _DYNAHP = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTDYNAHPState%cpv%~ = cpv + BGTDYNAHPState0
  END



EDIT: Clearer thinking after a night's sleep.

Please confirm:
>> //OUTER_SET BGTVICONIJState0 vanilla ??? = X states {0-X}
>> //OUTER_SET BGTVICONIPState0 vanilla ??? = x states {0-X}
actually are BG dialogue files VICONJ and VICONP, which become _VICONJ _VICONP in Tutu, and are appended to VICONIJ and VICONIP in BGT.
Repaired above and in master


>> //OUTER_SET BGTIMOENState0 vanilla ??? = #+1 states {0-#}
>> OUTER_FOR (cpv = 0; cpv < #of DialogueStatesNeededFromOriginal; cpv += 1) BEGIN
>> SET EVALUATE_BUFFER ~BGTIMOENState%cpv%~ = cpv + BGTIMOENState0
>> END

are for Candlekeep Imoen beginning dialogue, rather than her joining dialogue in Chapter 1:
IMOEN in BG = _IMOEN in Tutu = IMOEN in BGT

??

Edited by cmorgan, 23 January 2008 - 08:29 PM.


#43 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 23 January 2008 - 07:35 PM

Better make those variables name BGTVICONJState0, BGTVICONPState0. and BGT<whatever the Imoen Chapter 1 first dialogue file name is>State0, then (will need to check the Imoen one when I get home).

Edited by Ascension64, 23 January 2008 - 07:36 PM.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#44 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 23 January 2008 - 08:19 PM

Thanks - sorry for the mess with Imoen, but between all the versions and manipulations needed to make her files work, I tend to get very paranoid and a little lost.

Holding for directions on this code, to make sure Imoen is ok:
>>>  //OUTER_SET BGTIMOENState0 vanilla _IMOEN = 10 states {0-9}  Initial CandleKeep
>>>  OUTER_FOR (cpv = 0; cpv < 11; cpv += 1) BEGIN
>>>				SET EVALUATE_BUFFER ~BGTIMOENState%cpv%~ = cpv + BGTIMOENState0
>>>  END
>>>  //OUTER_SET BGTIMOENJState0 vanilla _IMOEN2 = 5 states {0-4}
>>>  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
>>>	SET EVALUATE_BUFFER ~BGTIMOENJState%cpv%~ = cpv + BGTIMOENJState0
>>>  END
>>>  //OUTER_SET BGTIMOENPState0 vanilla _IMOENP = 5 states {0-4}
>>>  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
>>>	SET EVALUATE_BUFFER ~BGTIMOENPState%cpv%~ = cpv + BGTIMOENPState0
>>>  END


All other BG1 NPC states listed in this post <<insert link>> have been migrated to variable usage and checked manually on vanilla BGT v1.05b versus EasyTutu_ToB.

I will create a dummy entry for Imoen to test, because as we discussed earlier we don't really jump into any of Imoen's fluid states (we only add on) that I can find, except for the singe ~HappinessLT(0)~ JFile state to false it out, which we might be able to do by other means - this is setting it up for mass distribution.

I have a BGT install, a Fixpacked BGT install that's silly - on BGT 1.05 the OUTER_SET matches will match vanilla BGT, an EasyTutu_ToB install, and an EasyTutu_ToB_Beta install ready for test install and spot decompilation comparisons. Going back now to recheck variables for typos/cut&paste errors. (Dunno why I'm telling you this - just makes me feel good to say "almost done" :)

Edited by cmorgan, 23 January 2008 - 08:32 PM.


#45 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 24 January 2008 - 02:56 AM

Right, so the variable BGTIMOENState0 should be BGTIMOEN2State0, and also BGTBVICONIState0 should be BGTBVICONState0. I think that removes all the remaining inconsistencies.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#46 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 25 January 2008 - 01:55 PM

Right, so the variable BGTIMOENState0 should be BGTIMOEN2State0, and also BGTBVICONIState0 should be BGTBVICONState0. I think that removes all the remaining inconsistencies.

Sorry - I almost understand, but am not quite sure:

I have your basics as

BGTIMOENState0 (= Tutu vanilla _IMOEN = 10 states {0-9} Initial CandleKeep)

BGTIMOENJState0 (= Tutu vanilla _IMOEN2 = 5 states {0-4} Chapter 1 joining)

BGTIMOENPState0 (= vanilla _IMOENP = 5 states {0-4} Post Dialogue)


and I ignore BIMOEN, because no one in their right mind would I_C_T or COPY_TRANS into that...

it sounds like you are saying

BGTIMOENState0 changes to BGTIMOEN2State0 (= Tutu vanilla _IMOEN2 = 5 states {0-4} Chapter 1 joining)

and leave a second identical reference under a different label;

BGTIMOENJState0 (= Tutu vanilla _IMOEN2 = 5 states {0-4} Chapter 1 joining)

and then finally


BGTIMOENPState0 (= vanilla _IMOENP = 5 states {0-4} Post Dialogue)

(so I am not understanding...)

I see in BGT

IMOEN|IMOENP|IMOENJ |IMOEND|IMOENP|IMOENJ|IMOEND |imoe25
IMOEN2|IMOEN2P|IMOEN2J|IMOEN2D|IMOEN25P|IMOEN25J|IMOEN2D |imoe25

And I see in our code to touch BG materials on BGT that we use IMOEN2 as the DV
OUTER_SPRINT "IMOEN_POST" "IMOENP"
OUTER_SPRINT "IMOEN_BANTER" "BIMOEN2" << which we build if it doesn't exist in-game
OUTER_SPRINT "IMOEN_JOINED" "IMOEN2J"

#47 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 25 January 2008 - 05:12 PM

Well, no one should be changing Imoen's dialogue when she first meets you in Candlekeep. When Imoen joins you in Chapter 1, she uses IMOEN2.DLG in all BG1/Tutu/BGT. However, BGT appends IMOEN2.DLG, so if you plan on changing IMOEN2.DLG, you'll need to use a fluid state strategy.

So, completely forget
BGTIMOENState0 (= Tutu vanilla _IMOEN = 10 states {0-9} Initial CandleKeep)

Keep
BGTIMOENPState0 (= vanilla _IMOENP = 5 states {0-4} Post Dialogue)

Change
BGTIMOENJState0 (= Tutu vanilla _IMOEN2 = 5 states {0-4} Chapter 1 joining)
to reflect a Tutu _IMOENJ. This file doesn't even exist in BG1, and BGT adds the happiness check. Since IMOEN2J is appended in BGT with this state, the State0 points to BGT's added happiness check, in case you need to change it or something.

And instigate
BGTIMOEN2State0 (= Tutu vanilla _IMOEN2 = 5 states {0-4} Chapter 1 joining)

This line in PDIALOG.2DA is no longer used when BGT is installed
IMOEN|IMOENP|IMOENJ |IMOEND|IMOENP|IMOENJ|IMOEND |imoe25

This is used, since Imoen's DV is globally "Imoen2" when BGT is installed
IMOEN2|IMOEN2P|IMOEN2J|IMOEN2D|IMOEN25P|IMOEN25J|IMOEN2D |imoe25

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#48 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 26 January 2008 - 09:31 AM

Change
BGTIMOENJState0 (= Tutu vanilla _IMOEN2 = 5 states {0-4} Chapter 1 joining)
to reflect a Tutu _IMOENJ. This file doesn't even exist in BG1, and BGT adds the happiness check. Since IMOEN2J is appended in BGT with this state, the State0 points to BGT's added happiness check, in case you need to change it or something


ok, now this makes sense to me, because there is no IMOENJ in Tutu (we skip to IMOEN2.DLG). So the added happiness check being the one that we need to block from firing in BG content for the PIDs to work without all the bug reports of "I clicked on Imoen, and she left!!!" is an extra state - and instead of searching for it I can find that value and patch it directly. Now it makes perfect sense.

Looks like I need to update both the inproject and community resources to SPRINT "IMOEN2P" as the parting dialogue equivalent in BGT.

Got it (finally) - and for the record, I believe you have now carefully explained this to me three times in the past couple of years (not counting explaining at least twice in this thread).

Thank you for taking the time to patiently do so again; for some reason, Imoen just does not want to stay straight in my brain. I have clipped out the PMs and linked the posts under a Favorites title of "I's Imoen, Stupid!" :D


OK, final recheck for code, and I am testing on BGT 1.05 and EasyTutu_ToB:

BG1NPC\lib\g3_fluid_cpmvars.tpa
//OUTER_SET BGTBEDWINState0, vanilla _BEDWIN = 15 states {0-15} //done
  OUTER_FOR (cpv = 0; cpv < 16; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBEDWINState%cpv%~ = cpv + BGTBEDWINState0
  END
  //OUTER_SET BGTBJAHEIState0 vanilla _BJAHEI = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 9; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBJAHEIState%cpv%~ = cpv + BGTBJAHEIState0
  END
  //OUTER_SET BGTBMINSCState0 vanilla _BMINSC = 9 states {0-8} //done 
  OUTER_FOR (cpv = 0; cpv < 9; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBMINSCState%cpv%~ = cpv + BGTBMINSCState0
  END
  //OUTER_SET BGTBVICONState0 vanilla _BVICON = 13 states {0-12} //done
  OUTER_FOR (cpv = 0; cpv < 13; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBVICONState%cpv%~ = cpv + BGTBVICONState0
  END
  //OUTER_SET BGTEDWINState0 vanilla _EDWIN = 29 states {0-28} //done
  OUTER_FOR (cpv = 0; cpv < 29; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTEDWINState%cpv%~ = cpv + BGTEDWINState0
  END
  //OUTER_SET BGTEDWINJState0 vanilla _EDWINJ = 13 states {0-12} //done
  OUTER_FOR (cpv = 0; cpv < 14; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTEDWINJState%cpv%~ = cpv + BGTEDWINJState0
  END
  //OUTER_SET BGTEDWINPState0 vanilla _EDWINP = 5 states {0-4} //done
  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTEDWINPState%cpv%~ = cpv + BGTEDWINPState0
  END
  //OUTER_SET BGTIMOEN2State0 vanilla _IMOEN2 = 5 states {0-4}  After CandleKeep Chap 1 joining
  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTIMOEN2State%cpv%~ = cpv + BGTIMOEN2State0
  END
  //OUTER_SET BGTIMOENJState0 BGT added happiness state = 1 states {0}
  OUTER_FOR (cpv = 0; cpv < 2; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTIMOENJState%cpv%~ = cpv + BGTIMOENJState0
  END
  //OUTER_SET BGTIMOENPState0 vanilla _IMOENP = 5 states {0-4}
  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTIMOENPState%cpv%~ = cpv + BGTIMOENPState0
  END
  //OUTER_SET BGTJAHEIJState0 vanilla _JAHEIJ = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTJAHEIJState%cpv%~ = cpv + BGTJAHEIJState0
  END
  //OUTER_SET BGTJAHEIPState0 vanilla _JAHEIP = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTJAHEIPState%cpv%~ = cpv + BGTJAHEIPState0
  END
  //OUTER_SET BGTMINSCJState0 vanilla _MINSCJ = 8 states {0-7} //done
  OUTER_FOR (cpv = 0; cpv < 9; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTMINSCJState%cpv%~ = cpv + BGTMINSCJState0
  END
  //OUTER_SET BGTMINSCPState0 vanilla _MINSCP = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTMINSCPState%cpv%~ = cpv + BGTMINSCPState0
  END
  //OUTER_SET BGTVICONJState0 vanilla _VICONJ = 2 states {0-1} //done
  OUTER_FOR (cpv = 0; cpv < 3; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTVICONJState%cpv%~ = cpv + BGTVICONJState0
  END
  //OUTER_SET BGTVICONPState0 vanilla _VICONP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTVICONPState%cpv%~ = cpv + BGTVICONPState0
  END
  //Never Ending Journey 2 compatibility appending
  //OUTER_SET BGTXANState0 vanilla _XAN = 11 states {0-10} //done
  OUTER_FOR (cpv = 0; cpv < 12; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTXANState%cpv%~ = cpv + BGTXANState0
  END
  //The Darkest Day compatibility appending
  //OUTER_SET BGTKAGAIPState0 vanilla _KAGAIP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTKAGAIPState%cpv%~ = cpv + BGTKAGAIPState0
  END
  //OUTER_SET BGTKIVANPState0 vanilla _KIVANP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTKIVANPState%cpv%~ = cpv + BGTKIVANPState0
  END
  //OUTER_SET BGTSHARTPState0 vanilla _SHARTP = 5 states {0-4} //done
  OUTER_FOR (cpv = 0; cpv < 6; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTSHARTPState%cpv%~ = cpv + BGTSHARTPState0
  END
  //OUTER_SET BGTXZARPState0 vanilla _XZARP = 10 states {0-9} //done
  OUTER_FOR (cpv = 0; cpv < 11; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTXZARPState%cpv%~ = cpv + BGTXZARPState0
  END
  //OUTER_SET BGTYESLIPState0 vanilla _YESLIP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTYESLIPState%cpv%~ = cpv + BGTYESLIPState0
  END
  //Tortured Souls compatibility appending
  //OUTER_SET BGTBCORANState0 vanilla _BCORAN = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTBCORANState%cpv%~ = cpv + BGTBCORANState0
  END
  //OUTER_SET BGTCORANState0 vanilla _CORAN = 17 states {0-16} //done
  OUTER_FOR (cpv = 0; cpv < 18; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTCORANState%cpv%~ = cpv + BGTCORANState0
  END
  //OUTER_SET BGTCORANJState0 vanilla _CORANJ = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTCORANJState%cpv%~ = cpv + BGTCORANJState0
  END
  //OUTER_SET BGTCORANPState0 vanilla _CORANP = 6 states {0-5} //done
  OUTER_FOR (cpv = 0; cpv < 7; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTCORANPState%cpv%~ = cpv + BGTCORANPState0
  END
  //OUTER_SET BGTDYNAHJState0 vanilla _DYNAHJ = 12 states {0-11} //done
  OUTER_FOR (cpv = 0; cpv < 13; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTDYNAHJState%cpv%~ = cpv + BGTDYNAHJState0
  END
  //OUTER_SET BGTDYNAHPState0 vanilla _DYNAHP = 9 states {0-8} //done
  OUTER_FOR (cpv = 0; cpv < 10; cpv += 1) BEGIN
	SET EVALUATE_BUFFER ~BGTDYNAHPState%cpv%~ = cpv + BGTDYNAHPState0
  END


in BG1NPC\lib\g3_tutu_cpmvars.tpa, zero states
//BGT Dialogues always appended, zero for Tutu
	 OUTER_SET BGTBEDWINState0 = 0
	 OUTER_SET BGTBJAHEIState0 = 0
	 OUTER_SET BGTBMINSCState0 = 0
	 OUTER_SET BGTBVICONState0 = 0
	 OUTER_SET BGTEDWINState0 = 0
	 OUTER_SET BGTEDWINJState0 = 0
	 OUTER_SET BGTEDWINPState0 = 0
	 OUTER_SET BGTIMOENJState0 = 0  // BGT Happiness state
	 OUTER_SET BGTIMOEN2State0 = 0  // post CandeKeep joinup
	 OUTER_SET BGTIMOENPState0 = 0  // post dialogue for BG content
	 OUTER_SET BGTJAHEIJState0 = 0
	 OUTER_SET BGTJAHEIPState0 = 0
	 OUTER_SET BGTMINSCJState0 = 0
	 OUTER_SET BGTMINSCPState0 = 0
	 OUTER_SET BGTVICONJState0 = 0
	 OUTER_SET BGTVICONPState0 = 0
	
	 //Never Ending Journey 2 compatibility appending, zero for Tutu
	 OUTER_SET BGTXANState0 = 0
	 
	 //The Darkest Day compatibility appending, zero for Tutu
	 OUTER_SET BGTKAGAIPState0 = 0
	 OUTER_SET BGTKIVANPState0 = 0
	 OUTER_SET BGTSHARTPState0 = 0
	 OUTER_SET BGTXZARPState0 = 0
	 OUTER_SET BGTYESLIPState0 = 0
	 
	 //Tortured Souls compatibility appending, zero for Tutu
	 OUTER_SET BGTBCORANState0 = 0
	 OUTER_SET BGTCORANState0 = 0
	 OUTER_SET BGTCORANJState0 = 0
	 OUTER_SET BGTCORANPState0 = 0
	 OUTER_SET BGTDYNAHJState0 = 0
	 OUTER_SET BGTDYNAHPState0 = 0


BG1NPC\lib\g3_bgt_cpmvars.tpa
ACTION_IF FILE_EXISTS ~BGT/Compat/BG1NPC/FluidStates.tpa~ THEN BEGIN 
	INCLUDE ~BGT/Compat/BG1NPC/FluidStates.tpa~  // BGT1.06 and higher
  END ELSE BEGIN // BGT1.05 and lower
	//BGT Dialogues always appended
	OUTER_SET BGTBEDWINState0 = 106
	OUTER_SET BGTBJAHEIState0 = 461
	OUTER_SET BGTBMINSCState0 = 99
	OUTER_SET BGTBVICONState0 = 575
	OUTER_SET BGTEDWINState0 = 74
	OUTER_SET BGTEDWINJState0 = 188
	OUTER_SET BGTEDWINPState0 = 9
	OUTER_SET BGTIMOENJState0 = 111
	OUTER_SET BGTIMOEN2State0 = 26   
	OUTER_SET BGTIMOENPState0 = 16
	OUTER_SET BGTJAHEIJState0 = 531
	OUTER_SET BGTJAHEIPState0 = 74
	OUTER_SET BGTMINSCJState0 = 241
	OUTER_SET BGTMINSCPState0 = 10
	OUTER_SET BGTVICONJState0 = 183
	OUTER_SET BGTVICONPState0 = 14
	
	//Never Ending Journey 2 compatibility appending
	OUTER_SET BGTXANState0 = 0
	
	//The Darkest Day compatibility appending
	OUTER_SET BGTKAGAIPState0 = 0
	OUTER_SET BGTKIVANPState0 = 0
	OUTER_SET BGTSHARTPState0 = 0
	OUTER_SET BGTXZARPState0 = 0
	OUTER_SET BGTYESLIPState0 = 0
	
	//Tortured Souls compatibility appending
	OUTER_SET BGTBCORANState0 = 0
	OUTER_SET BGTCORANState0 = 0
	OUTER_SET BGTCORANJState0 = 0
	OUTER_SET BGTCORANPState0 = 0
	OUTER_SET BGTDYNAHJState0 = 0
	OUTER_SET BGTDYNAHPState0 = 0
  END


I will clip and clean up this whole thing and set up an addendum to the cross-platform tiutorial stuff and the community code clips.

Edited by cmorgan, 27 January 2008 - 09:12 AM.


#49 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 26 January 2008 - 05:53 PM

Great. Glad we finally got it sorted out.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#50 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 27 January 2008 - 11:08 AM

darn. no love. WeiDU hates me.


[BG1NPC\lib\g3_fluid_cpmvars.tpa] PARSE ERROR at line 3 column 5-7
Near Text: SET
GLR parse error

[BG1NPC\lib\g3_fluid_cpmvars.tpa] ERROR at line 3 column 5-7
Near Text: SET
Parsing.Parse_error
ERROR: parsing [BG1NPC\lib\g3_fluid_cpmvars.tpa]: Parsing.Parse_error
Stopping installation because of error.

ERROR Installing [The BG1 NPC Project: Required Modifications for Version 15, Ja
nuary 5, 2008], rolling back to previous state
Will uninstall 0 files for [BG1NPC/SETUP-BG1NPC.TP2] component 0.
In state 314, I expected one of these tokens:
[3] <<<<<<<<
[10] EXTEND_TOP_REGEXP
[12] GET_DIRECTORY_ARRAY
[14] REQUIRE_FILE
[15] DEFINE_ACTION_MACRO
[17] ADD_MUSIC
[24] EXTEND_TOP
[25] VERBOSE
[27] APPEND_COL
[28] ADD_PROJECTILE
[39] DEFINE_PATCH_MACRO
[42] LOAD_TRA
[67] CLEAR_MEMORY
[69] AT_INTERACTIVE_NOW
[72] COPY
[74] OUTER_PATCH
[80] UNINSTALL
[83] GET_FILE_ARRAY
[87] PRINT
[91] ADD_KIT
[93] FAIL
[94] MKDIR
[98] COPY_EXISTING_REGEXP
[99] COPY_LARGE
[103] ACTION_READLN
[105] ACTION_DEFINE_ARRAY
[107] AT_UNINSTALL
[111] AT_INTERACTIVE_UNINSTALL
[116] STRING_SET_RANGE
[117] OUTER_SPRINT
[118] CLEAR_IDS_MAP
[120] STRING_SET
[121] COPY_KIT
[124] AT_EXIT
[125] COPY_ALL_GAM_FILES
[126] END
[133] LAUNCH_ACTION_MACRO
[142] COMPILE
[146] OUTER_WHILE
[150] APPEND
[155] RANDOM_SEED
[181] REINCLUDE
[182] EXTEND_BOTTOM
[193] SILENT
[197] COPY_EXISTING
[200] ACTION_PHP_EACH
[209] AT_NOW
[210] FORBID_FILE
[211] STRING_SET_EVALUATE
[216] EXTEND_BOTTOM_REGEXP
[222] AT_INTERACTIVE_EXIT
[225] OUTER_SET
[229] APPEND_OUTER
[230] OUTER_FOR
[235] INCLUDE
[238] OUTER_PATCH_SAVE
[239] OUTER_TEXT_SPRINT
[251] ACTION_FOR_EACH
[253] COPY_RANDOM
[263] BIFF
[266] ACTION_IF
[277] ACTION_BASH_FOR
[280] ADD_SPELL
Parse error (state 314) at SET

[BG1NPC\lib\g3_fluid_cpmvars.tpa] PARSE ERROR at line 3 column 5-7
Near Text: SET
GLR parse error

[BG1NPC\lib\g3_fluid_cpmvars.tpa] ERROR at line 3 column 5-7
Near Text: SET
Parsing.Parse_error
ERROR: parsing [BG1NPC\lib\g3_fluid_cpmvars.tpa]: Parsing.Parse_error
Error Uninstalling [BG1NPC/SETUP-BG1NPC.TP2] component 0:
Parsing.Parse_error
ERROR: Parsing.Parse_error
PLEASE email the file SETUP-BG1NPC.DEBUG to The BG1 NPC Project Team: forums.gib
berlings3.net/index.php?showforum=45
Using Language [English]

Install Component [The BG1 NPC Project: Required Modifications for Version 15, J
anuary 5, 2008]?
[I]nstall, or [N]ot Install or [Q]uit?


Tying again with OUTER_FOR > OUTER_SET


[Edit> well, with O_S it works, as evidenced by the fact that I obviously forgot to track all the variable changes across all files!!!


Compiling 1 dialogue file ...
ERROR: Cannot resolve internal symbolic label [BGTBVICONIState0] for DLG [_BVICO
N]
Known labels: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2
5 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
79 80 81 82 83 84 85 86 87 88 89 90
ERROR: processing .D actions [tb#_compile_eval_bufferBG1NPC/Phase1/DLG/X#KIVAN.D
]: Failure("cannot resolve label")
Stopping installation because of error.

ERROR Installing [The BG1 NPC Project: Banters, Quests, and Interjections], roll
ing back to previous state
Will uninstall 45 files for [BG1NPC/SETUP-BG1NPC.TP2] component 1.
Uninstalled 45 files for [BG1NPC/SETUP-BG1NPC.TP2] component 1.
ERROR: Failure("cannot resolve label")
PLEASE email the file SETUP-BG1NPC.DEBUG to The BG1 NPC Project Team: forums.gib
berlings3.net/index.php?showforum=45
Using Language [English]

Install Component [The BG1 NPC Project: Banters, Quests, and Interjections]?
[I]nstall, or [N]ot Install or [Q]uit?


Going back to clean up my mess, then test install on BGT.

Edited by cmorgan, 27 January 2008 - 11:13 AM.


#51 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 27 January 2008 - 10:45 PM

SET when WeiDU expects a patch, OUTER_SET when WeiDU expects an action.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#52 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 04 February 2008 - 07:49 AM

Weekend report: successful test and DEBUG logging on BGT and EasyTutu, with or without Fixpack on the BGT. We have liftoff! Still have some minor project work (mostly docs) on the BG1 NPC side, and then we are good to go. Going back over the DEBUGs with a fine-toothed comb and spot-checking dialogues, .cres, and .bcs compilations side by side with EasyTutu to make sure we haven't forgotten something.

I am clipping and turning the relevant portions of this thread into a follow up tutorial to the G3 cross-platform stuff, crediting Ascension64, Nythrun, and the bigg with the technical breakthroughs, then updating the common code to account for the new changes. I will be back with links, so that if someone does come along and wants to use it, there is a cross reference.

It looks like we just got a successful way of allowing BG content mods to account for some of the challenges of supporting pre-BGT install mods. Thank you very much for the help, and for working hard to make it happen.

Edited by cmorgan, 04 February 2008 - 07:51 AM.


#53 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 05 February 2008 - 05:07 PM

Y'know, that whole cpmv stuff - it was so cool, 'til I saw this in UB for BGT/Tutu, and realized it is much less of a load, and more customizable:
OUTER_SPRINT temp_tutu "_AR0705" OUTER_SPRINT temp_bgt "AR7705" OUTER_SPRINT temp_bg "AR0705" LAUNCH_ACTION_MACRO ~getcpmvara~
EXTEND_BOTTOM ~%temp_cpmvar%.BCS~ ~.../bg1ub/ub_ar0705sc.baf~
  EVALUATE_BUFFER
I just gotta go take some classes, so I can think like this.

#54 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 05 February 2008 - 05:16 PM

There isn't a class in the world that could make me think like that, unfortunately.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#55 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 06 February 2008 - 12:31 AM

You need your basics, though. I only retrieved temporary variables when there wasn't anything specific in the CPM variables. I wouldn't want to define variables over and over for every single COPY_EXISTING.

Anyway, it's really just the equivalent of a function call in a stack-oriented language (like PostScript and ASM). Unlike object-oriented and event-driven programming where functions are like

GetLargestNumber(1, 2, 3)

the arguments go first:

1 2 3 GetLargestNumber

So, classes in stack-oriented language can make you think like that, no matter how much of a klutz one may be.

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)