Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Erg
« on: September 07, 2014, 03:13:49 PM »

I've got permission to use for Finch the same Dream Timer of BG1 NPC Project. I will upload a new beta shortly :)
Posted by: Erg
« on: September 05, 2014, 04:39:18 AM »

Thanks Kulyok.

I posted here instead of the official BG1 NPC Project Forum, because a technical problem is preventing me from accessing my account there. I've contacted one of the admin of G3 and hopefully the problem will be sorted out soon :)
Posted by: Kulyok
« on: September 04, 2014, 12:32:39 PM »

You'd have better luck asking in BG1 NPC forum, I would think. :) I don't see why not, but I'm not an official here.
Posted by: Erg
« on: September 02, 2014, 05:02:42 AM »

I'm currently fixing some legacy bugs in Finch. In particular, the one reported here requires changes to the Dream Script, so I'm considering to add also a Dream Timer.

Can I borrow the code, the variable name and the BG1 NPC Project prefix (i.e. X#DreamTalk)? It makes sense to use the same timer across mods (and Gavin does that too), so it should be OK, but I'm asking permission just in case.
Posted by: Kulyok
« on: July 12, 2007, 07:53:47 AM »

Quote
// R_2_E_F this one manually because SOMEBODY (KULYOK) CAN'T APPEND PROPERLY TO THE 2DA

By the way, does anybody remember what's wrong with Xan's/Tiax' 2da appending? Or was it back from Xan SoA-only days, with their "Thou shalt not create Xan ToB?"

(I mean, I could, like, correct it or something?)
Posted by: cmorgan
« on: July 11, 2007, 10:48:34 AM »

I have missed this? Darn it... ok, I need to go back and restudy them.

The work I was talking about, though, wasn't the scripting. It was the hundreds of cumulative entries to build for each biography you want to alter. Depending on the level of detail, of course.

I just *knew* I hadn't come up with a new idea ...
Posted by: Kulyok
« on: July 11, 2007, 09:24:06 AM »

Quote
but all this doesn't matter to this codeblock, because if the NPC is installed, the biography would have already run.

Not if it is set this way:
Code: [Select]
IF
Global("Condition","GLOBAL",1)
Global("Biography","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("Biography","GLOBAL",1)
SetPlayerSound(Myself,@999,EXISTANCE5)
END

Quote
(Hey- cool idea. Hard to implement in terms of writing and heavy additions, but a dynamic biogtraphy using the stringfixer code to reset just that section of the soundset to a new cumulative Biography? wow.... cool.      Too much work for somethig most folks ignore.)

It's five minutes' work, and both Keto and Xan use it.
Posted by: cmorgan
« on: July 11, 2007, 08:59:42 AM »

OK, I almost got some of hat - I am going to have to reread that a bunch of times.

There should not be a current NPC that uses a null reference for biography, but there probably will be in the future. The only way to avoid problems with an NPC matching different instalss is to completely blank the .cre and add all soundest and assigned information afterwards, including BIO or EXISTENCE5 (I think...).
 
but all this doesn't matter to this codeblock, because if the NPC is installed, the biography would have already run. I have not seen/studied any mods which begin with a null reference and then assign BIO with a dynamically changing biography string.

(Hey- cool idea. Hard to implement in terms of writing and heavy additions, but a dynamic biogtraphy using the stringfixer code to reset just that section of the soundset to a new cumulative Biography? wow.... cool.      Too much work for somethig most folks ignore.)
Posted by: Kulyok
« on: July 11, 2007, 07:16:32 AM »

Okay, found the code. It doesn't sound impossible, though it might take some reading/adapting:

Code: [Select]
COPY_EXISTING_REGEXP GLOB ~^.*\.cre$~ ~override~
  READ_ASCII 0x280 deathvariable
  READ_BYTE  0x280 check
  READ_ASCII 0x248 script
  READ_BYTE  0x27b align
  READ_LONG  0x1cc biography
  SPRINT s_r ~%SOURCE_RES%~
  PATCH_IF FILE_CONTAINS_EVALUATED (~override/pdialog.2da~ ~^%deathvariable%[ \t]~) AND // if it's an NPC
    check != 0  AND NOT (("%biography%" > 2147483646) OR ("%biography%" < 1)) BEGIN // and the DV is nonempty
    SPRINT ~pdialogue~ ~void_this_is_void~ // useful to catch missing *p file from the 2da
    // read all pre-read lines in pdialog and find the one with this DV. find out the SoA *p dialogue
    // (the TOB *P dialogue doesn't matter).
    FOR (i = 1; i < _#_#_#pdialog; i+=1) BEGIN // skip the first line, AKA the one with the headers
      READ_2DA_ENTRY_FORMER ~_#_#_#pdialog~ i 0 thisline
      PATCH_IF !(~%thisline%~ STRING_COMPARE_CASE ~%deathvariable%~) BEGIN
        READ_2DA_ENTRY_FORMER ~_#_#_#pdialog~ i 1 pdialogue
        // R_2_E_F this one manually because SOMEBODY (KULYOK) CAN'T APPEND PROPERLY TO THE 2DA
        //READ_2DA_ENTRY_FORMER ~_#_#_#pdialog~ i 7 tobscript
        SPRINT tobscript ~_#_#_#pdialog_%i%_7~
        SPRINT ~tobscript~ EVALUATE_BUFFER ~%%tobscript%%~
        SPRINT tobpdial ~_#_#_#pdialog_%i%_4~
        SPRINT ~tobpdial~ EVALUATE_BUFFER ~%%tobpdial%%~
//         PATCH_PRINT ~%tobscript%~
      END
    END
    PATCH_IF (NOT FILE_CONTAINS_EVALUATED (~virtue/donescript~ ~^%script% -~)) BEGIN
                                                      //I didn't already deal with this script
//       PATCH_PRINT ~%s_r% SoA script~
      INNER_ACTION BEGIN
        APPEND_OUTER ~virtue/donescript~ ~%script% -~ // add this to the log!
        COPY - ~virtue/bg2/npcs/ET_GENER.BAF~ ~virtue/temp/this_et.baf~ // prepare a virtual copy of the generic script
          REPLACE_TEXTUALLY ~___NPC___~ ~%deathvariable%~ // ... which references our NPC DV.

        EXTEND_TOP ~%script%.bcs~ ~virtue/temp/this_et.baf~ // and append it to the current NPC script
      END
    END

By the way, can there be an NPC with a null biography? If someone assigns it later via script/hotkey/whatever? What to do in this case?
Posted by: Kulyok
« on: July 11, 2007, 12:45:02 AM »

Yes, virtue I have here is version 18(does it work as a pun? thought not), so it doesn't have it. Maybe you'll just upload it quickly? :) But, okay, okay, biggland it is...
Posted by: SimDing0™
« on: July 10, 2007, 06:38:32 PM »

No, the pdialog thing will work. Virtue might have an example of this sort of thing too (to automatically apply itself to all mod NPCs), but if I didn't get round to uploading that version you're going to have to venture into biggland for a demo. (He showed me the technique anyway.)
Posted by: cmorgan
« on: July 10, 2007, 06:13:38 PM »

Yeah, unless we do a "hardcoded" list, the regexp is going to require someone with serious skillz, and still runs into the problem of mod added stuff. I think for now the only way we can do this is to add it to all standard dudes/dudettes and the specific non-joinables we mess with.

BG2 is a *lot* more difficult to mod for than Tutu. We don't have as much overlap, and take up lots of the airspace there with one or two mods.
Posted by: SimDing0™
« on: July 10, 2007, 04:14:31 PM »

Quote
Ah. Whoops. "Ribald.bcs" wasn't in the picture. Now, how to get these filenames from pdialog.2da...
Oh.
Posted by: SimDing0™
« on: July 10, 2007, 04:13:54 PM »

COPY_EXISTING_REGEXP GLOB ~.*[dD]\.bcs~ ~override~
You're matching way more than just dream scripts there--anything ending in D. Read the script filenames from pdialog.2da.
Posted by: Kulyok
« on: July 09, 2007, 02:36:45 PM »

Ah. Whoops. "Ribald.bcs" wasn't in the picture. Now, how to get these filenames from pdialog.2da...