Ascension64 Posted February 15, 2009 Share Posted February 15, 2009 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
berelinde Posted February 15, 2009 Share Posted February 15, 2009 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
Ascension64 Posted February 15, 2009 Author Share Posted February 15, 2009 I guess it depends on what the script name and override scripts are used for. If they aren't critical for the dialogue, then it will work, but whatever depends on the script name and override won't. Link to comment
jastey Posted February 15, 2009 Share Posted February 15, 2009 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? Link to comment
Mike1072 Posted February 15, 2009 Share Posted February 15, 2009 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
berelinde Posted February 15, 2009 Share Posted February 15, 2009 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
jastey Posted February 15, 2009 Share Posted February 15, 2009 Ah, I understand, too. Thank you! In my case, the WRITE_ASCII is fine, then. Link to comment
Ascension64 Posted February 20, 2009 Author Share Posted February 20, 2009 I think its the only WeiDU command that is separated into one version that doesn't accept variable substitution, and one that does, although you could use WRITE_EVALUATED_ASCII all the time. I think it's a backwards compatibility thing. Link to comment
berelinde Posted February 20, 2009 Share Posted February 20, 2009 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
Ascension64 Posted February 20, 2009 Author Share Posted February 20, 2009 Don't we all? My modding time is now limited to weekends, and only a few hours at best, and I foresee that it's only going to get worse. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.