Jump to content

Prostitute interchange, and more


Ascension64

Recommended Posts

If you plan to use variables in WRITE_ASCII, you need to use WRITE_EVALUATED_ASCII instead. Hence, the following snippet of code isn't working and everyone is missing out on the prostitute banter with Gavin.

 

COPY ~GAVIN/CRE/BKittyS.bmp~ ~override~

COPY_EXISTING ~%tutu_scriptp%ROSBA_B.CRE~ ~override~

SAY NAME1 @98

SAY NAME2 @98

WRITE_ASCII 0x248 ~%tutu_scriptp%ROSBA_B~ #8 // override

WRITE_ASCII 0x280 ~%tutu_scriptp%ROSBA_B~ #32 //DV

WRITE_ASCII 0X34 ~BKittyS~ #8 //small portrait

BUT_ONLY_IF_IT_CHANGES

 

COPY ~GAVIN/CRE/BWrenS.bmp~ ~override~

COPY_EXISTING ~%tutu_scriptp%ROSBA_C.CRE~ ~override~

SAY NAME1 @98

SAY NAME2 @98

WRITE_ASCII 0x248 ~%tutu_scriptp%ROSBA_C~ #8 // override

WRITE_ASCII 0x280 ~%tutu_scriptp%ROSBA_C~ #32 //DV

WRITE_ASCII 0X34 ~BWrenS~ #8 //small portrait

BUT_ONLY_IF_IT_CHANGES

 

and

 

COPY_EXISTING ~%tutu_var%SLEEPMH.CRE~ ~override~

SAY NAME1 @66

SAY NAME2 @66

WRITE_ASCII 0x248 ~%tutu_var%SLEEPMH~ #8 // override

WRITE_ASCII 0x280 ~%tutu_var%SLEEPMH~ #32 //DV

BUT_ONLY_IF_IT_CHANGES

 

COPY_EXISTING ~%tutu_var%SLEEPFH.CRE~ ~override~

SAY NAME1 @67

SAY NAME2 @67

WRITE_ASCII 0x248 ~%tutu_var%SLEEPFH~ #8 // override

WRITE_ASCII 0x280 ~%tutu_var%SLEEPFH~ #32 //DV

BUT_ONLY_IF_IT_CHANGES

Link to comment

Thanks for pointing that out. It worked during testing, but maybe that's a "sometimes it works, sometimes it doesn't" scenario. I'll try WRITE_EVALUATED and see how it goes. In fact, I might have meant to use something else entirely. It's been a while. I'm pretty rusty.

Link to comment
Sorry to highjack this thread: Is this a prinicple thing? I use WRITE_ASCII in my BGII mod, for DV of own creatures and to change item BAMs. Should I witch to WRITE_EVALUATED_ASCII, too? When do I use WRITE_ASCII at all?

WRITE_ASCII is for writing any normal text that doesn't contain variables, like ~text~.

 

WRITE_EVALUATED_ASCII (aka WRITE_ASCIIE) is for writing text that contains variables, like ~text with %variable%~. Using WRITE_EVALUATED_ASCII will evaluate the variables before writing the text, so if %variable% was ~awesomeness~, it would write text with awesomeness. If you used WRITE_ASCII instead, you'd get exactly text with %variable%.

 

Short version: if what you're writing contains a variable, use EVALUATED. Otherwise, it doesn't matter.

Link to comment

OK, I get it now. The issue arose during the cross-platform conversion. It worked before because the term inside the tildes contained no variables.

 

Thanks for explaining that.

 

All that happens if the script isn't executed is that the prostitutes don't leave and sleeping figures inside the house won't destroy themselves. It isn't quite the intended effect, but it doesn't break anything, either.

Link to comment

I still thank you for the clarification. It won't be a big deal in BG2, since I don't have to deal with cross-platform stuff, but I'll probably want to realease a bugfixed v4 for BG1 soonish. I say "soonish" because you know perfectly well how modders' lives work. Sometimes, you have nothng but time, others, you're just hoping you can catch the bugs. My current job is night work: zombie during the day, too fried to mod at night. I do the best I can.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...