Thimblerig Posted December 8, 2013 Share Posted December 8, 2013 Er... how does one do that? Say I wanted to add a generic ~moo~ to the cows in Candlekeep, for example? Link to comment
Wisp Posted December 8, 2013 Share Posted December 8, 2013 TP2: COPY_EXISTING some.cre override WRITE_ASCII DIALOG ~resref~ #8 BUT_ONLY where some.cre is the creature you want to patch and resref is the resref of your DLG file (which need not exist). Link to comment
Thimblerig Posted December 8, 2013 Author Share Posted December 8, 2013 Thanks, Wisp! Link to comment
Thimblerig Posted December 14, 2013 Author Share Posted December 14, 2013 So I ran the basic code and, according to Infinity Explorer the new dialog file is attached to the creature "Cow", but the esteemed animals in Candlekeep still have nothing to say to me. Do I need to start a new game for this adding of a dialog file to take effect? COPY_EXISTING some.cre override WRITE_ASCII DIALOG ~resref~ #8 BUT_ONLY Is "BUT_ONLY" what you meant, instead of "BUT_ONLY_IF_IT_CHANGES"? (Sorry, am very unfamiliar with this part of the code.) Sorry if I'm missing something really obvious. The tp2, in all its glory: BACKUP ~thecowgoesmoo/Backup~ AUTHOR ~Thimblerig @ Gibberlings3~ VERSION ~v1~ BEGIN ~The Cow Goes Moo~ // CD_STATE_NOTVALID - custom state from CamDawg APPEND ~STATE.IDS~ ~0x80101FEF CD_STATE_NOTVALID~ UNLESS ~CD_STATE_NOTVALID~ // Patching the cows COPY_EXISTING cow.cre override WRITE_ASCII DIALOG ~T1COW~ #8 BUT_ONLY COPY_EXISTING cowh.cre override WRITE_ASCII DIALOG ~thecowgoesmoo~ #8 BUT_ONLY COMPILE EVALUATE_BUFFER ~thecowgoesmoo/thecowgoesmoo.d~ The eloquent, nay Shakespearean, speech: /* The Cow Goes Moo */ // Generic Cows BEGIN ~T1COW~ IF ~True()~ cow1 SAY ~...moo...~ IF ~~ THEN EXIT END Link to comment
Jarno Mikkola Posted December 14, 2013 Share Posted December 14, 2013 COMPILE EVALUATE_BUFFER ~thecowgoesmoo/thecowgoesmoo.d~ That file can only have 8 marks or letters in it's name !!! So "thecowgo.d" can be compiled and made to work properly in the above function, but yours can't !Yes, the path doesn't matter so just gut the excess out... aka: COMPILE EVALUATE_BUFFER ~thecowgoesmoo/thecowgo.d~ And rename the file of course. This is actually the reason why the - #8 - is there, as a reminder. PS, you should also get yourself a prefix and use that in all your file names. Is "BUT_ONLY" what you meant, instead of "BUT_ONLY_IF_IT_CHANGES" They are exactly the same... as a weidu.exe insert function take either from the .tp2 in and executes the exact same function in both cases. The reason why this is that weimer didn't include the shorter version in the first weidu.exe, so the longer is just remnant from the old days. Link to comment
jastey Posted December 14, 2013 Share Posted December 14, 2013 "WRITE_ASCII DIALOG ~thecowgoesmoo~ #8" will compile to ~thecowgo~ (8 letters). The changes will only show for areas you haven't visited (or newly spawned creaturs in areas you already visited). Link to comment
jastey Posted December 14, 2013 Share Posted December 14, 2013 COMPILE EVALUATE_BUFFER ~thecowgoesmoo/thecowgoesmoo.d~ That file can only have 8 marks or letters !!! So "thecowgo.d" can be compiled and made to work properly but yours can't ! Nonsense (sorry for the offence): The .d file can have a smuch letters as you want, but the DLG inside can't have more than 8. Example: You can call your .d file "thisismydialoguefile" and inside it sais BEGIN ~mydlg~, and thus a mydlg.dlg will be created out of it. Link to comment
Wisp Posted December 14, 2013 Share Posted December 14, 2013 As you have probably been able to infer from the previous replies, you WRITE_ASCII the name of the DLG (t1cow, in your case), rather than the name of the source D. Link to comment
Jarno Mikkola Posted December 14, 2013 Share Posted December 14, 2013 Nonsense (sorry for the offence) OK, so yeah... I just usually use the same one format to all the dialogs and thus compile them in unison to dialog.tlk or whatever ... my mistake. COMPILE ~Esiriak/IJ#esir.d~ ~Esiriak/IJ#es25J.d~ ~Esiriak/IJ#eprT.d~ APPEND ~pdialog.2da~ ~IJ#esir IJ#esirP IJ#esirJ IJ#esirD IJ#es25P IJ#es25J IJ#es25D IJ#esi25 IJ#eprT~ UNLESS ~IJ#esir~ APPEND ~interdia.2da~ ~IJ#esir IJ#esirA IJ#esirB IJ#esi25B IJ#eprT~ UNLESS ~IJ#esir~ PS, where's the offense !!! Link to comment
jastey Posted December 14, 2013 Share Posted December 14, 2013 Jarno: As you might be able to perceive from Thimblerig's example, she has a prefix (T1). Thimblerig: I am not sure why you are patching this: COPY_EXISTING cowh.cre override WRITE_ASCII DIALOG ~thecowgoesmoo~ #8 BUT_ONLY It's what Wisp said: The name of the .d file is of no importance for the patched creature. It is only important for the installer to find the appropiate file for patching. If you want to have Hulrik's cow tp have the same moo (cowh.cre), change the patching to the one for the cow.cre. Link to comment
Thimblerig Posted December 14, 2013 Author Share Posted December 14, 2013 Thanks, everybody - that was very helpful! As you have probably been able to infer from the previous replies, you WRITE_ASCII the name of the DLG (t1cow, in your case), rather than the name of the source D. Thanks. I am not sure why you are patching this: COPY_EXISTING cowh.cre override WRITE_ASCII DIALOG ~thecowgoesmoo~ #8 BUT_ONLY The short answer is, I shouldn't be - realised halfway through that keeping my mitts off the specific 'Hulrik's cow' was probably a good idea but forgot to take out the half-done code. (The long answer is that, silly as it is, it teaches me a bit of technique to use elsewhere. And someone asked me to supply talking cows.) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.