Change - Soundset (scripting question!)
#1
Posted 23 August 2004 - 02:11 PM
I am making a shapeshift spell, what's basicly a demon form (Tana'ri).
And I have included the change portrait variable to change portraits when you shapeshift, now my question was, that I want to do the same to the soundset (PC Voice). I want to change the soundset when I am shapeshifting into the demon.
But I couldn't find any change variables to soundset's. So is there such a variable, that is perhaps not included in the Near Infinity Resource Editor? If so, is there a way to script it myself?
thanks in advance
#2
Posted 23 August 2004 - 03:39 PM
how come you always look so damn cool in every photo I see you in?!?
Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.
Still a cyberjock, still hacking the matrix, still unsure of what that means.
TeamBG member - http://www.teambg.eu
#3
Posted 24 August 2004 - 03:34 AM
Thanks already for your help.
#4
Posted 24 August 2004 - 04:11 AM
Also, the various talk fixers for NPC mods use that command too to make sure the soundset is correct for save games after you uninstall/reinstall mods.
Edited by Kismet, 24 August 2004 - 04:13 AM.
#5
Posted 24 August 2004 - 05:39 AM
second where does it say which soundset it has to use?
and a follow up question, where do I have to place this script? within the spell script?
Thanks already
#6
Posted 24 August 2004 - 10:03 AM
So anyone, any help is apreciated... :help:
#7
Posted 24 August 2004 - 11:09 AM
~Sorry for being so impatient.~ [TANARI1]
where [TANARI1] is the nawe of your .wav file and ~Sorry for being so impatient.~ is what your character will say. You cen find names of sound slots (I:SlotNum*SNDSLOT) in IESDP or by looking at cre files in NearInfinity or DLTCEP.
So your script would look like this:
IF Tue() THEN RESPONSE #100 SetPlayerSound(LastSummonerOf(Myself),~Sorry for being so impatient.~ [TANARI1],INITIAL_MEETING) SetPlayerSound(LastSummonerOf(Myself),~Blah, blah.~ [TANARI2],SELECT_COMMON1) ... DestroySelf() END
Edited by Kwiat_W, 24 August 2004 - 11:17 AM.
W_GUI - a GUI replacement for Baldur's Gate 2/TUTU/BGT/CA
W_PackMule - Your own pack mule for Baldur's Gate 2/Tutu/BGT/CA, BGEE and BG2:EE
Psionics Unleashed - play as a Psion, mod for Baldur's Gate 2/Tutu/BGT/CA
#8
Posted 24 August 2004 - 12:00 PM
So if I am correct this goes into a *.bcs script?
So if I understand this correctly it will be like this:
(using Illid_ (soundset, standard)
(When Shapeshift in Tanar'i / Demon form Demon_ (soundset, changed)):
IF Tue() //Should this not be True, instead of Tue? THEN RESPONSE #100 SetPlayerSound(LastSummonerOf(Myself),~Sorry for being so impatient.~ [Demon_],INITIAL_MEETING) SetPlayerSound(LastSummonerOf(Myself),~Blah, blah.~ [Illid_],SELECT_COMMON1) ... DestroySelf() END
You were also speaking of an invisible creature? Will it not be easier of this is used by the shapeshifted creature so Creature B (DEM)?
Eitherway thanks again.
Edited by Vae Victus, 24 August 2004 - 12:18 PM.
#9
Posted 24 August 2004 - 12:56 PM
Look up the creature in NI, and see that all diffrent soundclips have a name, called INITIAL_MEETING, BATTLE_CRY1, etc.
Now look at the code:
SetPlayerSound(LastSummonerOf(Myself),~Sorry for being so impatient.~ [Demon_],INITIAL_MEETING)
The blue is the string.
The red is the wav-file.
The green is the name of that specific sound in the character soundset.
So, the script above will: Set the INITIAL_MEETING-sound to Demon_.wav and the string (the text that will be shown in the feedback-box) will be "Sorry for being so impatient."
This code:
SetPlayerSound(LastSummonerOf(Myself),~Blah, blah.~ [Illid_],SELECT_COMMON1)
will: Set the SELECT_COMMON1-sound to Illid_.wav and the string will be "Blah, blah.".
You do not have to specify the soundclip or the string you're overwriting, only which sound in the character soundset.
Confusing? Eh, maybe so, until I can find a better word for what INITIAL_MEETING, BATTLE_CRY1, etc. really is.
Also, in the beginning:
Tue() //Should this not be True, instead of Tue?
Yes, he means true, but you shouldn't use that. Use a global or local variable instead.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#10
Posted 24 August 2004 - 01:11 PM
SetPlayerSound(LastSummonerOf(Myself),~Sorry for being so impatient.~ [Demon_b],INITIAL_MEETING)
SetPlayerSound(LastSummonerOf(Myself),~Blah, blah.~ [Illid_b],SELECT_COMMON1)
Because I do not have the wav file Demon_.wav or Illid_.wav (I can make them but if it is not needed, I will let it be.)
Another thing, how do I command the creature / spell to activate this script?
Thanks already for the big help!
Well I did made two new sound files: Illid_.wav and Demon_.wav.
But when I was testing this script in NI I got an error, saying:
Error 1/3 - Line 6
Expected I:STRREF* But found ~Sorry for being so impatient.~[Demon_]
Error 2/3 - Line 7
blah~[Illid_],SELECT_COMMON1 not found in SNDSLOT.IDS
So more help definately appreciated!
Edited by Vae Victus, 24 August 2004 - 01:26 PM.
#11
Posted 24 August 2004 - 01:25 PM
SetPlayerSound(LastSummonerOf(Myself),~I am the leader now~ [leader],BECOMING_LEADER)
Nothing else except for the rest of the script.
To activate it, you add this script to the override-script of the creature, and I suggest you have a variable, like Global("voicechange",GLOBAL,1) and then you simply set the dialogue somewhere in a dialogue, for example.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#12
Posted 24 August 2004 - 01:56 PM
Error 1/3 - Line 6
Expected I:STRREF* But found ~Sorry for being so impatient.~[Demon_]
Error 2/3 - Line 7
blah~[Illid_],SELECT_COMMON1 not found in SNDSLOT.IDS
Should I ignore them?
Further I could not find any dialogue (*.BCS file) of the creature, could it be the case that I changed a character into a creature, that that's why I cannot find any *.BCS?
Eitherway I was thinking, is there not a way to include this SetPlayerSound,
within the shapeshift spell file, like it was possible for the set portrait variable?
If so, then in which program could I manualy write such a variable to add it to the spell? Because that would be a hack lot easier then is?
Thanks again for the help and interest.
Edited by Vae Victus, 24 August 2004 - 01:58 PM.
#13
Posted 24 August 2004 - 02:54 PM
I would very much suggest you compile a .baf-script to a .bcs-script using WeiDU. I'm sure you can do it some other way, but then you'd have to ask someone else, I always do these things in WeiDU.
With WeiDU:
You'll need a .tra-file with your lines.
The script (sound.baf):
IF Global("voicechange","GLOBAL",1) Global("NewSounds","LOCALS",0) THEN RESPONSE #100 SetPlayerSound(Myself,@1,INITIAL_MEETING) //note that you can change INITIAL_MEETING into something else... SetPlayerSound(Myself,@2,SELECT_COMMON1) //same here... SetGlobal("NewSounds","LOCALS",1) END
And the .tra-file (sound.tra):
@1 = ~Sorry for being so impatient.~ [Demon_b] //the string and the soundfile. these could be anything. @2 = ~Blah, blah.~ [Illid_b] //same here
The tp2:
COMPILE ~dir\sound.baf~ USING ~dir\sound.tra~ EXTEND_BOTTOM ~anyscript.bcs~ ~override\sound.bcs~ //Use this if you want this script to be a part of another script.
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#14
Posted 24 August 2004 - 04:06 PM
I have made these files just as you wrote them down, with only changing the lines:
~Sorry for being so impatient.~ And ~Bla, bla.~
I have saved all the files with the same name: Sound
So I have the following files:
Sound.baf
sound.tra
sound.tp2
Or do I have to rename all the files to the same name as the creature (DEMON.CRE) file has, so "DEMON.<file type>" ?
And when you say Weidu, then If I am correct I have to copy over the newest weidu.exe file and rename it to the same name as the tp2 file, right?
I must be a pain in the arse with all those questions?!
Thanks again!
Edited by Vae Victus, 24 August 2004 - 04:09 PM.
#15
Posted 24 August 2004 - 04:22 PM
Or do I have to rename all the files to the same name as the creature (DEMON.CRE) file has, so "DEMON.<file type>" ?
You do not need to do this. As long as the scripts are properly assigned, then the name was does not matter.
And when you say Weidu, then If I am correct I have to copy over the newest weidu.exe file and rename it to the same name as the tp2 file, right?
You don't have to do that, but it's the easiest way.
I must be a pain in the arse with all those questions?!
That's not a question.
#16
Posted 24 August 2004 - 04:35 PM
You do not need to do this. As long as the scripts are properly assigned, then the name was does not matter.
Or do I have to rename all the files to the same name as the creature (DEMON.CRE) file has, so "DEMON.<file type>" ?
So how does it work then, because what I understand of this, is that when I shapeshift my avatar into the creature (DEMON.CRE) then the script does its work, giving me the choice to change soundsets.
Do I then have to change the .tp2 file to this?:
COMPILE ~dir\sound.baf~ USING ~dir\sound.tra~ EXTEND_BOTTOM ~anyscript.bcs~ ~override\DEMON.bcs~ //Use this if you want this script to be a part of another script.
So that it is activated when the avatar turns into the DEMON.CRE?
I must be a pain in the arse with all those questions?!
That's not a question.
As Quoted from Eek The Cat:
"Really?!"
Eitherway thanks for the help so far.
Edited by Vae Victus, 24 August 2004 - 04:41 PM.
#17
Posted 24 August 2004 - 04:46 PM
BACKUP ~Soundchange\Backup~ AUTHOR ~youremail@youremail.com~ ASK_EVERY_COMPONENT BEGIN ~Soundchange~ COMPILE ~Soundchange\sound.baf~ USING ~Soundchange\sound.tra~ EXTEND_BOTTOM ~demon.bcs~ ~override\sound.bcs~ //Where demon.bcs is the script assigned to the creature.You place sound.baf and sound.tra in a folder called "Soundchange", and inside there you also place an empty folder called "Backup".
Also, did you create the file demon.cre yourself?
Do you think I would know all this stuff if I'd never asked someone to teach me?I must be a pain in the arse with all those questions?!
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#18
Posted 24 August 2004 - 05:10 PM
Also, did you create the file demon.cre yourself?
Yes, I did. I made it out of a character file and converted it to a creature file.
The .TP2 file has to be named the same as the folder "Soundchange", am I right?
Everything else has been done as you said.
Do you think I would know all this stuff if I'd never asked someone to teach me?
Thanks, now I feel less newbie-like!
Edited by Vae Victus, 24 August 2004 - 05:11 PM.
#19
Posted 24 August 2004 - 05:22 PM
Then you might want to add the creature into the tp2.Yes, I did. I made it out of a character file and converted it to a creature file.
Do you have a script called demon.bcs assigned to the creature.
Oh, boy, converted character files... I hope you've edited it in NI. Removed player-scripts and unflagging Export Allowed and stuff...
No. The weidu-file should be named the same as the tp2, though. As Rastor said, it isn't vital, but recommended.The .TP2 file has to be named the same as the folder "Soundchange", am I right?
Thanks, now I feel less newbie-like!Do you think I would know all this stuff if I'd never asked someone to teach me?
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#20
Posted 24 August 2004 - 05:36 PM
Then you might want to add the creature into the tp2.
Will do!
Do you have a script called demon.bcs assigned to the creature.
No, how do you do that?
Oh, boy, converted character files... I hope you've edited it in NI. Removed player-scripts and unflagging Export Allowed and stuff...
I checked everything, I only wasn't sure about Export Allowed, so I have removed that flag. After the char to cre conversion (Done via Creature Maker), I checked the creature in NI, and changed all of the things, but I am unsure of three things:
Overide script: JP1COUNT.BCS*
Default script: DPLAYER3.BCS*
Dialog: SRCHOOS.DLG
* Are these the .BCS scripts? Which one of them (or both) has to be assigned to the DEMON.BCS?
I have included the DEMON.CRE file, for a closer look if you will.
No. The weidu-file should be named the same as the tp2, though. As Rastor said, it isn't vital, but recommended.
I have changed both files (TP2 & Exe) to Setup-Sound.
Thanks again for your time and help.
Attached Files
Edited by Vae Victus, 24 August 2004 - 05:40 PM.