Jump to content


Photo

Change - Soundset (scripting question!)


  • Please log in to reply
62 replies to this topic

#21 Kwiat_W

Kwiat_W
  • Modder
  • 290 posts

Posted 24 August 2004 - 09:21 PM

You don't have to use a .TRA file. If you will do everything right it will work without it. Yuo must tell us who is going to use your spell. If it's for any mamber of your party then yuo can't use override slot! NPCs have already assigned scripts in that slot, if you change them many bad things will happen. I strongly suggest the invisible cre trick. But if you still want to do that in your way then add effect "Set AI Script" (82) to yur spell.

icon11.gif W_GUI - a GUI replacement for Baldur's Gate 2/TUTU/BGT/CA
icon11.gif W_PackMule - Your own pack mule for Baldur's Gate 2/Tutu/BGT/CA, BGEE and BG2:EE

icon11.gif Psionics Unleashed - play as a Psion, mod for Baldur's Gate 2/Tutu/BGT/CA

 


#22 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 25 August 2004 - 04:20 AM

It is for the PC (playable character), So there won't be any NPC's involved.
The Demon.cre will get this script assigned, which is basicly the shapeshifted creature the avatar changes in, when you use the spell.

My only concern is, will this also effect the PC (playable character)?

But I do prefere the way SConrad did it, because he did put alot of efford in making the script for me.

Eitherway thanks for the otherway.

P.s. If I want to assign the Demon.bcs to the Demon.cre, then first of I must create a demon.bcs (with nothing in it) myself, then assign it to the "Override scipt" variable within the creature file via NI, and after that start the setup-Sound.exe. Am I right?

Thanks already

EDIT:

I tried it out via the above way, but nothing happened when I had shapeshifted.
I think I know why it doesn't work, the soundset (Demon_ or Illid_) have no strings in the dialog.tlk. So the DEMON.bcs script cannot find the sounds, atleast so it appears.

So more help please. :help: SConrad, Kwiat_W, anyone?!

Edited by Vae Victus, 25 August 2004 - 06:12 AM.


#23 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 25 August 2004 - 07:14 AM

The easiest way is to do as I suggested.

P.s. If I want to assign the Demon.bcs to the Demon.cre, then first of I must create a demon.bcs (with nothing in it) myself, then assign it to the "Override scipt" variable within the creature file via NI, and after that start the setup-Sound.exe. Am I right?

That would work, yes, but this solution is better.

Create a script called demon.baf. Add the lines of the soundscript. Delete the soundscript. Open up NI and set the override-script to demon.bcs (this requires that you have such a file in the override when you edit the creature). Then, change the soundscript line in the tp2 to this:

COMPILE ~Soundchange\demon.baf~ 
USING ~Soundchange\sound.tra~
This will result in the demon.baf compiling to demon.bcs that will end up in your override-folder.

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?

Take these files away from the creature.

I might take a look at your .cre if it doesn't work. But I want you to try to fix it yourself first. ;)

I tried it out via the above way, but nothing happened when I had shapeshifted.
I think I know why it doesn't work, the soundset (Demon_ or Illid_) have no strings in the dialog.tlk. So the DEMON.bcs script cannot find the sounds, atleast so it appears.

Let's make sure that the script actually works before we go on to the shapeshift-thing. We need another identifier for that one, we'll take that later.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#24 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 25 August 2004 - 08:15 AM

Ok this is what I have done:

I made a new script demon.baf and put in the lines:

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

I have deleted the following file:

sound.baf

I made a new file demon.bcs (an empty file)

I have set the override-script variable to demon.bcs.

I replaced the:

Default script: DPLAYER3.BCS

Dialog: SRCHOOS.DLG

With:

Default script: NONE

Dialog: NONE

and changed the lines of the setup-sound.tp2 to:

BACKUP ~Soundchange\Backup~
AUTHOR ~youremail@youremail.com~
ASK_EVERY_COMPONENT

BEGIN ~Soundchange~

COMPILE ~Soundchange\demon.baf~ 
USING ~Soundchange\sound.tra~
EXTEND_BOTTOM ~demon.bcs~ ~override\sound.bcs~ //Where demon.bcs is the script assigned to the creature.

I might take a look at your .cre if it doesn't work. But I want you to try to fix it yourself first.  ;)


:( <- I may be, but you are right, otherwise I will be known as the noob who asks the same questions over and over and over again! :lol: And we don't want that!

#25 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 25 August 2004 - 08:39 AM

Alright, good. Now you can delete the demon.bcs.

You should also remove the EXTEND_BOTTOM-action from your tp2.

And you should perhaps use weidu for your creature as well. Do you know how to do that?

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#26 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 25 August 2004 - 09:15 AM

Alright, good. Now you can delete the demon.bcs.


Demon.bcs has been deleted.

You should also remove the EXTEND_BOTTOM-action from your tp2.


I have done that, so this is now how the code looks like:

BACKUP ~Soundchange\Backup~
AUTHOR ~youremail@youremail.com~
ASK_EVERY_COMPONENT

BEGIN ~Soundchange~

COMPILE ~Soundchange\demon.baf~ 
USING ~Soundchange\sound.tra~

And you should perhaps use weidu for your creature as well. Do you know how to do that?


I am sorry to say, that I do not know how to do that.
So if you recommend this, I will make a new on via weidu, but I will need some help how to do it.

So thanks already.

#27 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 25 August 2004 - 10:27 AM

Do you want this creature to be joinable? There's quite the diffrence...

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#28 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 25 August 2004 - 10:33 AM

No, it does not have to be joinable, because it is just a creature which the PC avatar changes into. That is if you mean joinable within the PC's party.

Edited by Vae Victus, 25 August 2004 - 10:36 AM.


#29 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 25 August 2004 - 11:02 AM

:blink:

Okay, I'd say: Take a look at the shapeshift-spells in the game and try to do the same...

As for the creature, look at examples from other mods (ie. their tp2's).

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#30 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 25 August 2004 - 11:22 AM

:unsure: What do I have to look out for in the shapeshift spells? Because Mine spell is a edited spell, of the shapechange Greater Cat.

About the creature, I have taken a look of the Valen Mod creature, and what do I have to look for? Furthermore I addded the tp2 code of the mod as an attachment

*If the code may not be posted, let me know, and I will remove it ASAP.*

I did noticed that it uses variables to overwrite existing files. CRE and such.
Is this what you mean?

Attached Files



#31 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 25 August 2004 - 12:48 PM

Okay, would you mind emailing me all files associated with your mod? sebastian8987@edu.upplands-bro.se

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#32 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 25 August 2004 - 02:42 PM

Offcourse, I have send the files to your E-mail adres.

It is rather a big file: 3.80 MB; using the best compression! I have used Winrar to compress the file.

Will you send or post a message if you have recieved the file?

Thanks already.

#33 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 25 August 2004 - 04:45 PM

Alright, got it.

I'll look into it later, it's 2.46 am and I have a full day to wake up to, so I won't do anything more tonight...

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#34 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 25 August 2004 - 05:31 PM

Is all the hassle really worth it? Just copy over the sounds via the TP2, or at least make sure that they correlate in regards to streff's and make a bcs that can be run from any dialog file. Something like this should work:-

IF
True()
THEN
RESPONSE #100
  CutSceneId("Mymod")
  SetName(0001) // MyMod
  SetPlayerSound(Myself,0002,INITIAL_MEETING)
  SetPlayerSound(Myself,0003,EXISTANCE5)
  SetPlayerSound(Myself,0004,BATTLE_CRY1)
  SetPlayerSound(Myself,0005,LEADER)
  SetPlayerSound(Myself,0006,TIRED)
  SetPlayerSound(Myself,0007,BORED)
  SetPlayerSound(Myself,0008,DAMAGE)
  SetPlayerSound(Myself,0009,SELECT_COMMON1)
  SetPlayerSound(Myself,0010,SELECT_COMMON2)
  SetPlayerSound(Myself,0012,SELECT_COMMON3)
  SetPlayerSound(Myself,0013,SELECT_ACTION1)
  SetPlayerSound(Myself,0014,SELECT_ACTION2)
  SetPlayerSound(Myself,0015,SELECT_ACTION3)
  SetPlayerSound(Myself,0015,HURT)
  SetPlayerSound(Myself,0016,DYING)
  SetPlayerSound(Myself,0017,AREA_FOREST)
  SetPlayerSound(Myself,0018,AREA_CITY)
  SetPlayerSound(Myself,0019,AREA_DUNGEON)
  SetPlayerSound(Myself,0020,AREA_DAY)
  SetPlayerSound(Myself,0021,AREA_NIGHT)
  SetPlayerSound(Myself,0022,SELECT_ACTION4)
  SetPlayerSound(Myself,0023,SELECT_ACTION5)
  SetPlayerSound(Myself,0024,SELECT_ACTION6)
  SetPlayerSound(Myself,0025,SELECT_ACTION7)
  SetPlayerSound(Myself,0026,REACT_TO_DIE_GENERAL)
  SetPlayerSound(Myself,0027,SELECT_RARE1)
  SetPlayerSound(Myself,0028,SELECT_RARE2)
  SetPlayerSound(Myself,0029,CRITICAL_HIT)
  SetPlayerSound(Myself,0030,CRITICAL_MISS)
  SetPlayerSound(Myself,0031,TARGET_IMMUNE)
  SetPlayerSound(Myself,0032,INVENTORY_FULL)
  SetPlayerSound(Myself,0033,PICKED_POCKET)
  SetPlayerSound(Myself,0034,EXISTANCE1)
  SetPlayerSound(Myself,0035,EXISTANCE2)
  SetPlayerSound(Myself,0036,EXISTANCE3)
  SetPlayerSound(Myself,0037,BATTLE_CRY2)
  SetPlayerSound(Myself,0038,BATTLE_CRY3)
  SetPlayerSound(Myself,0039,SELECT_COMMON6)
  SetPlayerSound(Myself,0040,INITIAL_MEETING)
  SetPlayerSound(Myself,0041,HAPPY)
  SetPlayerSound(Myself,0042,UNHAPPY_ANNOYED)
  SetPlayerSound(Myself,0043,UNHAPPY_SERIOUS)
  SetPlayerSound (Myself,0044,UNHAPPY_BREAKING_POINT)
END


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

#35 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 26 August 2004 - 03:03 AM

I'll look into it later, it's 2.46 am and I have a full day to wake up to, so I won't do anything more tonight...


Take your time, there is no hurry with the mod.


Is all the hassle really worth it? Just copy over the sounds via the TP2, or at least make sure that they correlate in regards to streff's and make a bcs that can be run from any dialog file. Something like this should work:-


The soundset's of mine, does not have any strings to the dialog.tlk, which is one of the problems why Sconrad is looking at it.

But thanks anyway.

#36 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 26 August 2004 - 07:00 AM

Is all the hassle really worth it? Just copy over the sounds via the TP2, or at least make sure that they correlate in regards to streff's and make a bcs that can be run from any dialog file. Something like this should work:-

I'm afraid I don't follow your reasoning, Seif...

Coping over the sounds from one folder to the override is no problem whatsoever. Then we need to compile the script, using the tra-file. No problem there either.

Neither the script actions are any issues, as you can see, they're almost the same as mine, only I don't have any cutscene or SetName.

The problem is to get the creature to work, as well as fixing the identifiers for the script, which could be a tricky one. As far as I've understood, Vae Victus wants to change the soundset of the character when s/he is shapeshifted. The problem is to change it back when shapeshifting back...

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#37 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 26 August 2004 - 07:40 AM

Wait, you're trying to change the PC (including picture and soundset) to a demon and back again or you're tying to do this with a new NPC?

If you're trying to do this for the PC then I don't think you can. Well you can change the picture and soundset but you can't change them back because, unlike NPC pictures/soundsets, PC pictures/soundsets don't have fixed names.

#38 -Guest-

-Guest-
  • Guest

Posted 26 August 2004 - 07:46 AM

The problem is to change it back when shapeshifting back...


Perhaps what could work, is if we use the same script, but then for the character file, so basicly when you change back to the character from the creature via the shapeshift spell, you will get the same dialogue. The only thing is, what will happen if you go to another area or load another game, will the same dialogue come over and over again?

#39 Vae Victus

Vae Victus
  • Member
  • 34 posts

Posted 26 August 2004 - 07:49 AM

I just saw that I was logged out, so the above topic is mine.

#40 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 26 August 2004 - 07:53 AM

If you're trying to do this for the PC then I don't think you can. Well you can change the picture and soundset but you can't change them back because, unlike NPC pictures/soundsets, PC pictures/soundsets don't have fixed names.

That's exactly what bothers me... It's really a tough one.

Perhaps what could work, is if we use the same script, but then for the character file, so basicly when you change back to the character from the creature via the shapeshift spell, you will get the same dialogue. The only thing is, what will happen if you go to another area or load another game, will the same dialogue come over and over again?

No dialogue would be needed.

The problem is that a PC's soundset and stuff is highly customizeable... AFAIK, there's no way to restore the original sounds. Unless...

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner