Help - Search - Members - Calendar
Full Version: Lilarcor like weapon.
The Black Wyrm's Lair - Forums > Mod development resources & discussion > Modder's Workshop
Rotts
Hey all,

I started making some of my own content for BG2+ToB the other day and I've been wanting to make my own weapon which blurts out a sound file at random times exactly like Lilarcor but with different sound sets.
I've been trying to figure it out by looking up how Lilarcor is coded but with little succes (as in only found the converse banter).

Could anyone help me with this?
Would just need to be the random sound files playing at random times. Not really interrested in making it conversable.

Cheers in advance.
Razfallow
It's scripted, see the Baldur.bcs.
Jarno Mikkola
Just understand that if you are going to include the item to a real mod, make sure you give option to include the item or not to include it, cause everybody will hate this feature in the mod... slowdown the game #4_5.
Rotts
First of all cheers for the replies helped me to move a bit forward smile.gif ,

However i'm not sure how to code it in the files.
From looking up the lilarcor codes etc i've learned (if i'm not wrong that is):

- IF
Delay(600)
CombatCounter(0)
OR(6)
HasItemEquipedReal("Myitemcode",Player1)
etc...
THEN
RESPONSE #10
DisplayStringHeadOwner("Myitemcode", mystrref)
etc...
END

In the bcs file, there are 2 versions one 600 and one 125, both with different strrefs, I'm guessing this is the delay for when the sound file plays? why is this coded in 2 delays?
Do I have to add the new lines to the end of the .bcs files?
And also with ToB I have to code the exact same lines in the Baldur25.bcs? I'm pretty sure i do but just being sure =)

- I've figured out how to add a new strref line in the dialog.tlk file and added the sound recourse name

Here i've found the references are to a .bif file with subsequent .wav files for the sound.
Do i have to do the same with my custom .wav files, as in make em into a .bif if that's at all possible since I can't seem to build a .bif using DLTC?
And if I do does it at all matter where in the bg2 folder I put the .bif file since the path to the file isn't specified anywhere.

I guess some of these questions might be dumb or are just so obvious nobody has asked it before but tried to figure out as much on my own and the intrawebs but if anyone has the time and patience to explain the programming proces for this to me it would be greatly appreciated since as I said I'm completely new to modmaking huh.gif
Jarno Mikkola
QUOTE(Rotts @ Oct 13 2009, 11:34 PM) *
Here i've found the references are to a .bif file with subsequent .wav files for the sound.
Do i have to do the same with my custom .wav files, as in make em into a .bif if that's at all possible since I can't seem to build a .bif using DLTC?
And if I do does it at all matter where in the bg2 folder I put the .bif file since the path to the file isn't specified anywhere.
You don't have to create a .bif file from the .wavs for them to be played, they just need to be referred in the dialog file... or in the .bcs file, and the file need to be within game files.

Now the code above only displays the set string above the sword wearers head, so if you wish to play a specified sound like "example1.wav", you do it by first copying the .wav file to the "override" folder in the game folder, and then you add it to the .bcs, with PlaySound("example1") ... just remember the sound file name needs to have only up to 8 letters, so if you have 9, the sound will not play, nor will the .bcs actually compile.
So the example source file for .bcs would be like this:

CODE
IF
  Delay(600)
  CombatCounter(0)
OR(6)
  HasItemEquipedReal("Myitemcode",Player1)
etc...
THEN
RESPONSE #10
  DisplayStringHeadOwner("Myitemcode", mystrref)
  PlaySound("example1")
etc...
END
Razfallow
QUOTE(Rotts @ Oct 13 2009, 10:34 PM) *
In the bcs file, there are 2 versions one 600 and one 125, both with different strrefs, I'm guessing this is the delay for when the sound file plays? why is this coded in 2 delays?


First block plays sounds, when there is no combat in progress - CombatCounter(0). And second plays sounds only during combat - !CombatCounter(0).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.