Author Topic: About the WEIDU "COPY" command  (Read 3002 times)

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
About the WEIDU "COPY" command
« on: May 23, 2004, 11:10:43 AM »
In Ghreyfain's guide to NPC's he illustrates the following COPY command

COPY ~VTP\\J#Vondo.cre~ ~override\J#Vondo.cre~
    SAY SELECT_COMMON4 ~Vlah blah blah~ [Vondo1]
// [Vodo1] is the .wav file for this sound


I have tried to find an example in the Weidu readme but I can't find an example that helps me

1.     Does the string Vondo1 agree with a file name stem, and why does the sub directory structure not get mentioned? Where should the *.wav be, in the BG2 directory, the Mod install directory or have been previously copied over to the override  using a prior copy statement?

2.     Does the syntax

COPY SELECT_COMMON4 3867

work, where 3867 is a valid string reference for a .wav object in the IE evironment.

This isn't very clear, but can someone show me a valid example of COPY/SAT showing the necessary filestructures to support it pleaee?

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: About the WEIDU "COPY" command
« Reply #1 on: May 23, 2004, 11:32:55 AM »
Only the bit 'COPY ~VTP\\J#Vondo.cre~ ~override\J#Vondo.cre~' actually copies something.  The 'SAY' parts are assigning information to the CRE, in this case, his soundfiles and their appropriate subtitles.  The actual WAVs themselves have to be copied somewhere else in the tp2.  The WAV files that are being mentioned will have to be in the override directory for the sounds to actually play.
"You alone can make my song take flight..."

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: About the WEIDU "COPY" command
« Reply #2 on: May 23, 2004, 11:38:44 AM »
2.     Does the syntax

COPY SELECT_COMMON4 3867

work, where 3867 is a valid string reference for a .wav object in the IE evironment.

Almost. When referring to strrefs in this manner, you use #. #3867.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Bons

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1237
  • Gender: Female
  • Glad Corvis Isn't Dead Club
Re: About the WEIDU "COPY" command
« Reply #3 on: May 23, 2004, 12:09:16 PM »
A lot of this is redundant now thanks to Grim and JC, but here goes :) :


In Ghreyfain's guide to NPC's he illustrates the following COPY command

COPY ~VTP\J#Vondo.cre~ ~override\J#Vondo.cre~
    SAY SELECT_COMMON4 ~Vlah blah blah~ [Vondo1]
// [Vondo1] is the .wav file for this sound


I have tried to find an example in the Weidu readme but I can't find an example that helps me

1.     Does the string Vondo1 agree with a file name stem, and why does the sub directory structure not get mentioned? Where should the *.wav be, in the BG2 directory, the Mod install directory or have been previously copied over to the override  using a prior copy statement?

Yes, [Vondo1] means that the engine should look for a file named Vondo1.wav in the game audio or the override folder to play when this line is invoked. You do need another COPY statement to move your sound files to the override at some point in your tp2, like:

COPY ~VTP\sounds~ ~override~  \\There's a subfolder named 'sounds' and we're copying all it's contents over to the override folder.

This can be done either before or after the .cre handling.

Quote
2.     Does the syntax

COPY SELECT_COMMON4 3867

work, where 3867 is a valid string reference for a .wav object in the IE evironment.

If you want the .cre to reference an existing line in the dialog.tlk, your syntax will be:
SAY SELECT_COMMON4 #3867

If you're installing a new line using a .tra file, the syntax would be:

SAY SELECT_COMMON4 @3867

The way I understand it, with these SAY statements, you're writing to the .cre file as well as appending dialog.tlk (unless you're using the #3867 structure). The same thing goes for when you use them with an .itm or .spl

~~~~~~~~~~~~~~~~~~~~~~
To sum up, these should all be valid for your .tp2:

1) COPY ~VTP\J#Vondo.cre~ ~override\J#Vondo.cre~
    SAY SELECT_COMMON4 ~Vlah blah blah~ [Vondo1]

COPY ~VTP\sounds~ ~override~

2)COPY ~VTP\J#Vondo.cre~ ~override\J#Vondo.cre~
    SAY SELECT_COMMON4 @1

    COPY ~VTP\sounds~ ~override~

And in your .tra file there is a line that says:

@1 = ~Vlah blah blah~ [Vondo1]

3)COPY ~VTP\J#Vondo.cre~ ~override\J#Vondo.cre~
    SAY SELECT_COMMON4 #3867  //Which is the equivalent of ~ By Tempus' shield.~ [BRANW17]
Newt had always suspected that people who regularly used the word "community" were using it in a very specific sense that excluded him and everyone he knew.

             --Neil Gaiman, Terry Pratchett, "Good Omens"

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: About the WEIDU "COPY" command
« Reply #4 on: May 23, 2004, 04:35:07 PM »
Now that everything's been explained adequately, I'll give you some minor trivia.

When one writes SAY BLAH ~etc.~ in a .tp2, this is merely an alias for a hex offset in the file you're patching.  In the example above, that'd be J#Vondo.cre.  For example, the hex offset of INITIAL_MEETING is 0xa4 in all .cre files, so WeiDU will interpret SAY INITIAL_MEETING as SAY 0xa4.

If you want to have a string written somewhere other than those spots with aliases, like a spell or item that will show a custom string when it is cast or used, you can just write the raw hex offset (NI is very handy for finding this out, not sure about DLTCEP).  Here's an example of how I do it for Bolas in Ashes of Embers, which have a special ability to tangle the enemy and display the message "Bola snare" whenever that happens.

By searching through the Display String effect in my weapon and turning on the "Show Hex Offsets" option in NI, I can find out that the offset for the string is 0x1ce.  So I could do this in my .tp2:

COPY ~AshesofEmbers\Itemdesc\itemdesc\bola01.itm~
~override\bola01.itm~
  SAY NAME1 @23
  SAY NAME2 @23
  SAY DESC @24
  SAY UNIDENTIFIED_DESC @24
SAY 0x1ce @25 // This is in my .tra file that says "Bola snare"
// or I could do
SAY 0x1ce ~Bola snare~ // Which would do the same thing
// or I could use an existing string
SAY 0x1ce #12345 // Which would show the line "Noblewoman 4" each time the ability occurs.
Earn Money Sleeping.

Offline lennon

  • Planewalker
  • *****
  • Posts: 71
  • Gender: Male
Re: About the WEIDU "COPY" command
« Reply #5 on: May 24, 2004, 04:01:47 AM »
Thanks people  ;D

I need to give this a try, I'm sure I'll be back with my next query, but I am making progress

--
Lennon

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

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:
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)?: