
Compiling with WeiDU
#21
Posted 05 August 2002 - 03:56 PM
* Section III: Scripts *
------------------------
Possible the shortest step. If you want your NPC to walk up to your PC when they
first meet, you'd write this script:
IF
See([PC])
NumTimesTalkedTo(0)
THEN
RESPONSE #100
Dialogue(Nearest([PC]))
END
>>>>>>>>>How, and Where to I right this?? Make a Blank Text file??
Compile it using your favourite compiler
>>>>>>Complie it to a what?
, NI works fine, save it, and assign it to
your NPC's .cre file.
Then the method to get your NPC into the area is to append a small portion of
script to an existing area script. Let's say we want to add him to the Government
District. We'd need to append a bit to AR1000.bcs. For now let's create a script
called J#AR1000.bcs with the bits we want to add.
>>>>>>>Make a Text file name J#AR1000.bcs ??????
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[9137.2046],3)
END
This portion of script will be going into our installation package, and will be
appended to AR1000.bcs by WeiDU when the time is right. See section IV for details
on how this is done.
>>>>>>>I don?t understand this. Help Would Be Appreciated
#22
Posted 05 August 2002 - 03:58 PM
Kool It Works, I got a full worken Npc. Thanks Weimer! a few more questions......
Well done.
1) How did you get Valen Sounds? She says "You are foolish to face my mistress" and that other stuff. I'm guessing it was allredy in the game.
Valen's sounds are the union of one of the default female soundsets and Valen's original in-game CRE soundset (since they were apparently done by the same actress).
2)If I wanna Add Weidu to my Bg 2 Folder How to I get into it with a Dos Shell? If I Type:
Don't, use windows explorer. :-) You could also just unzip it there.
#23
Posted 05 August 2002 - 04:03 PM
Kool It Works, I got a full worken Npc. Thanks Weimer! a few more questions......
Well done.
1) How did you get Valen Sounds? She says "You are foolish to face my mistress" and that other stuff. I'm guessing it was allredy in the game.
Valen's sounds are the union of one of the default female soundsets and Valen's original in-game CRE soundset (since they were apparently done by the same actress).
>>>>>K
2)If I wanna Add Weidu to my Bg 2 Folder How to I get into it with a Dos Shell? If I Type:
Don't, use windows explorer. :-) You could also just unzip it there.
>>>>>>Windows explorer?? What?
#24
Posted 05 August 2002 - 06:03 PM
Interesting. Someone who doesn't know much about either Windows or DOS. Are you mostly a Mac user?Don't, use windows explorer. :-) You could also just unzip it there.
>>>>>>Windows explorer?? What?
Windows Explorer is the file manager that comes with Windows. If you're thinking of Internet Explorer, I can see why you might be confused. You can get at Windows Explorer through the Start menu.
#25
Posted 05 August 2002 - 06:24 PM
#26
Posted 05 August 2002 - 07:41 PM
C:\> cd \progra~1\blacki~1\bgii-s~1How do I access Weidu with the Dos Shell if I moved Weidu to my bg2 folder"
Then weidu as normal. Advanced: make a symbolic link to "command.com" or "cmd.com" on your deskopt, edit the properties, and change the "working directory" to your BGII directory. Whenever you click on that dos prompt icon to start it, it should start in the given directory.
#27
Posted 05 August 2002 - 07:58 PM
------------------------
* Section III: Scripts *
------------------------
Possible the shortest step. If you want your NPC to walk up to your PC when they
first meet, you'd write this script:
IF
See([PC])
NumTimesTalkedTo(0)
THEN
RESPONSE #100
Dialogue(Nearest([PC]))
END
>>>>>>>>>How, and Where to I right this?? Make a Blank Text file??
Compile it using your favourite compiler
>>>>>>Complie it to a what?
, NI works fine, save it, and assign it to
your NPC's .cre file.
Then the method to get your NPC into the area is to append a small portion of
script to an existing area script. Let's say we want to add him to the Government
District. We'd need to append a bit to AR1000.bcs. For now let's create a script
called J#AR1000.bcs with the bits we want to add.
>>>>>>>Make a Text file name J#AR1000.bcs ??????
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[9137.2046],3)
END
This portion of script will be going into our installation package, and will be
appended to AR1000.bcs by WeiDU when the time is right. See section IV for details
on how this is done.
>>>>>>>I don?t understand this. Help Would Be Appreciated
#28
Posted 05 August 2002 - 08:43 PM
>>>>>>>>>How, and Where to I right this?? Make a Blank Text file??
Make a blank textfile called J#VONDO.BAF with notepad and put that IF-block in it. The suffix BAF means "text file for a baldur's gate script".
>>>>>>Complie it to a what?
Compile it to a BCS file. BCS means "compiled baldur's gate script". The game can only read BCS files. Humans can (usually) only read BAF files.
Have windows explorer open to a directory that contains myfile.baf (or whatever). Fire up Near Infinity. Press Ctrl-Z in the NI window. This will bring up the "script compiler". Drag (windows-style) the BAF file into the "Compiler Drop Zone" window. If you don't see any error messages, myfile.bcs was created in the same directory. Copy it to your override directory.
Restart NI or press F5. Go to your CRE (J#VONDO.CRE) and change his "override script" so that it is J#VONDO.BCS (or whatever).
Now restart the game and summon Vondo. If you did it right, he should talk to you!
>>>>>>>Make a Text file name J#AR1000.bcs ??????
Sure, if you like. Use notepad, just as if you were creating a D file.
>>>>>>>I don?t understand this. Help Would Be Appreciated
Let's see how you do with just making the script, compiling the script and assigning it to Vondo. Let us know if that works.
#29
Posted 06 August 2002 - 05:40 AM
If you go to Start-->Program Files--> and then right click on the Command Prompt icon, (In ME I'm not sure if the command prompt is under Accessories or not) you can change what directory you want to start in. So if you put "C:\program files\black isle\bgii -soa" in the Start In field, and then make a shortcut on your desktop, everytime you open your command prompt from there it will start right in your bg2 folder.
Also if you don't want to use tildes when browsing to directories with more then 8 characters, you can put the path in quotes.
Example:
cd "c:\program files\black isle\bgii - soa"
#30
Posted 06 August 2002 - 06:33 AM
Im using windows explorer to drag and drop but its not doing annything. It wont complie nor decomplie it. When I drop it it does nothing
It might be because the true filename is J#VONDO.BAF.txt but I ant get rid of the txt
EDIT: Fortunately I have infinity script editor(Creates blank .baf files) But it disappoints me that I cant use notepad, I would still like to fix this.
So I got my bcs file and assign it to vondo thanks guys
#31
Posted 06 August 2002 - 06:45 AM
Try emailing the Near Infinity author about this one. I've never heard of the drop-zone not working for anyone.Have windows explorer open to a directory that contains myfile.baf (or whatever). Fire up Near Infinity. Press Ctrl-Z in the NI window. This will bring up the "script compiler". Drag (windows-style) the BAF file into the "Compiler Drop Zone" window. If you don't see any error messages, myfile.bcs was created in the same directory. Copy it to your override directory.
Im using windows explorer to drag and drop but its not doing annything. It wont complie nor decomplie it. When I drop it it does nothing
It might be because the true filename is J#VONDO.BAF.txt but I ant get rid of the txt
You can use the dos prompt to rename the file and lose the TXT extension. Try something like:
C:\whatever> rename j#vond~1.txt j#vondo.baf
This usually wins even when "'windows rename" fails.
#33
Posted 06 August 2002 - 07:05 AM
// The following is appending what we wrote in J#AR1000.bcs to the bottom of
// AR1000.bcs
EXTEND_BOTTOM ~Ar1000.bcs~ ~j#ar1000.bcs~
I renamed my text file Ar1000.bcs with the proper tag for him to be in government:
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[9137.2046],3)
END
They say type:
EXTEND_BOTTOM ~Ar1000.bcs~ ~j#ar1000.bcs~
and extend_Bottom is not a proper tag. What do I type?
#34
Posted 06 August 2002 - 07:06 AM
oh kool thanks japheth that workedWhen your saving your .baf files in Notepad, just make sure you go to Save As and then choose All Files as the file type.
Then just type blah.baf for example and it won't add the .txt extension to the file.
EDIT: What should I do about the Above Post?
#35
Posted 06 August 2002 - 08:56 AM
#36
Posted 06 August 2002 - 09:39 AM
Do not put EXTEND_BOTTOM in a BAF.
I'm not sure what you mean by "every two seconds" or whatnot. Is he starting dialogue with you? Displaying a string in the scrolling window? Playing audio?
#37
Posted 06 August 2002 - 09:41 AM
From what you just said it sounds like your just typing the scripts commands in notepad and saving them with a .bcs extension.Yup that worked weimer, thanks. now about this. the maker of the walkthrough screwed up or sumthing look:
// The following is appending what we wrote in J#AR1000.bcs to the bottom of
// AR1000.bcs
EXTEND_BOTTOM ~Ar1000.bcs~ ~j#ar1000.bcs~
I renamed my text file Ar1000.bcs with the proper tag for him to be in government:
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[9137.2046],3)
END
They say type:
EXTEND_BOTTOM ~Ar1000.bcs~ ~j#ar1000.bcs~
and extend_Bottom is not a proper tag. What do I type?
You have to *compile* your .baf scripts with the Dropzone in NI or with ISE.
So, if you name your baf j#ar1000.baf and slap it into the drop zone, it should come out as j#ar1000.bcs.
Make sure that all your files are in your root BG2 directory (where WeiDU is located) and if they're not, you have to put the path to where your patch script is located.
As for him saying Hello every two seconds, you probably used the script that comes with the NPC tutorial, which will do that because it's simply:
IF
See(Player1)
THEN
RESPONSE #100
StartDialogueNoSet(Player1)
END
So he keeps seeing you and then he'll keep initiating dialog no matter what. Try using this one instead for your NPC's default script:
IF
NumTimesTalkedTo(0) //First time you are talking to you NPC
Global("NPCFirstChat","GLOBAL",0) //Global check incase you want to have him remark later that he's already been talked to
Allegiance(Myself,NEUTRAL) //Don't want your NPC to be hostile when initiating dialogue.
See(Player1) //You'll want to see the PC.
Range(Player1,5) //This is optional, but it will make it so that the PC has to come close to the NPC before dialog is initiated
!StateCheck(Myself,STATE_SLEEPING) //check if the NPC is sleeping
!StateCheck(Player1,STATE_SLEEPING)//check if Player1 is sleeping
THEN
RESPONSE #100
MoveToObject(Player1) //Moves your NPC to the PC
SetGlobal("NPCFirstChat","GLOBAL",1) //Set's that Global to 1 so you know he's been talked to once already
StartDialogueNoSet(Player1) //Starts the dialogue.
END
#38
Posted 06 August 2002 - 09:45 AM
BEGIN J#Vondo
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings good
IF ~GlobalLT("Chapter","GLOBAL",3)~ THEN REPLY ~Hey Vondo, you seen Irenicus around here?~ GOTO InquireIrenicus
IF ~~ THEN REPLY ~Heya.~ GOTO Greet
IF ~Class(Player1,PALADIN)~ THEN REPLY ~I know a paladin when I see one!~ GOTO BothPaladins
IF ~~ THEN REPLY ~Go away.~ GOTO GoAway
END
IF ~~ THEN BEGIN InquireIrenicus
SAY ~Nope, but I can help you look for him. I'm a paladin!~
IF ~~ THEN REPLY ~Sure. Join the party~ DO ~SetGlobal("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Nah, go away.~ EXIT
END
IF ~~ THEN BEGIN Greet
SAY ~So, you need a paladin in your group?~
IF ~~ THEN REPLY ~Yes, as a matter of fact we do.~ DO ~SetGlobal("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Nah, go away.~ EXIT
END
IF ~~ THEN BEGIN BothPaladins
SAY ~Another paladin! Hail and well met brother. Let us journey together and smite evil.~
IF ~~ THEN REPLY ~Sounds like a plan.~ DO ~SetGlobal("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Nah, go away.~ EXIT
END
IF ~~ THEN BEGIN GoAway
SAY ~Very well my
IF ~~ THEN EXIT
END
BEGIN J#VondoP
IF ~Global("VondoJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~You are now kicking me out.~
IF ~~ THEN REPLY ~Oops, I meant to boot that twit Anomen, not you. Sorry~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~That's right, I don't want you in the party.~ DO ~SetGlobal("VondoJoined","LOCALS",0)~ EXIT
END
IF ~Global("VondoJoined","LOCALS",0)~ THEN BEGIN Rejoin
SAY ~You want me to rejoin?~
IF ~~ THEN REPLY ~That's right Vondo, get back in formation.~ DO ~SetGlobal("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~That's right, I don't want you in the party.~ EXIT
END
>>>>Thats my dlg, Theres no If See Player 1 then start dialog. He just keeps saying Heya, He opens a dialoge box and plays a sound
#39
Posted 06 August 2002 - 10:03 AM
If it is, then make sure you clear all of his script slots (race, class, default, etc.) to None, and just put the script you made for him in the default slot.
Also make sure his Enemy/Ally is set to Neutral.
#40
Posted 06 August 2002 - 10:10 AM
See([PC])
NumTimesTalkedTo(0)
THEN
RESPONSE #100
Dialogue(Nearest([PC]))
END
Thats my J#vondo.bcs file I think thats what your talking about. Why would I clear his (race, class, default, etc.)?? Wouldent that screw him up?
Hes not saying "Hello there" annymore(I changed is ally/enemy to netural. How do I get him to be in the Government district like the one in the faq