BEGIN J#Vondo
BEGIN J#Vondo
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings good <SIRMAAM>! My name is Vondo the Just.~
+ ~GlobalLT("Chapter","GLOBAL",3)~ + ~Hey Vondo, you seen Irenicus around here?~ + InquireIrenicus
++ ~Heya.~ + 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 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.~ GOTO GoAway
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.~ GOTO GoAway
END
IF ~~ THEN BEGIN GoAway
SAY ~Very well my <LADYLORD>, I will await the day when you return, so that we might smite evil!~
IF ~~ THEN EXIT
END
IF ~NumTimesTalkedToGT(0)~ THEN BEGIN ReturnDialogue
SAY ~I see you have returned, my friend.~
IF ~~ THEN REPLY ~Yep, come and join the party.~ DO ~SetGlobal("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Yeah, but I still don't want you in the party.~ GOTO RefusedAgain
END
IF ~~ THEN BEGIN RefusedAgain
SAY ~Ah, once again you refuse my offer. No matter, I will amuse myself with this magical device I have purchased. It was given to be by a gnome named John Johnson, or something similar.~
IF ~~ THEN EXIT
END
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
BEGIN J#Vondo
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings good <SIRMAAM>! My name is Vondo the Just.~
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 <LADYLORD>, I will await the day when you return, so that we might smite evil!~
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
IF
See([PC])
NumTimesTalkedTo(0)
THEN
RESPONSE #100
Dialogue(Nearest([PC]))
END
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[1137.2046],3) // 1137.2046 are the x.y coordinates that will cause him to show up. 3 is the direction he's facing. It ranges from 0 (South), to 15, going clockwise.
END
BACKUP ~VondoTheNPC\backup~
AUTHOR ~ghreyfain@pocketplane.net~
BEGIN ~Vondo the NPC for BG2:ToB~
// The following is the copying of Vondo's .cre file, as well as assigning his sound-set. See the file sndslot.ids for a listing of sounds you can add.
COPY ~VondoTheNPC\J#Vondo.cre~ ~override\J#Vondo.cre~
SAY NAME1 ~Vondo~
SAY NAME2 ~Vondo~
SAY SELECT_COMMON4 ~Blah blah blah.~ [Vondo1] // [Vondo1] is the name of the .wav
file for this sound
SAY SELECT_COMMON5 ~Give the word.~ [Vondo2]
SAY SELECT_COMMON6 ~Point the way.~ [Vondo3]
SAY SELECT_ACTION1 ~I'm on the job.~ [Vondo4]
SAY SELECT_ACTION2 ~As you wish.~ [Vondo5]
// The following is telling WeiDU to compile the following .d files
COMPILE ~VondoTheNPC\J#Vondo.d~
// The following is compilling the script and placing it in the override. We haven't actually made a script yet, though, so this isn't necessary.
COMPILE ~VondoTheNPC\J#Vondo.baf~
// The following is appending what we wrote in AR1000.baf to the bottom of
// AR1000.bcs
EXTEND_TOP ~Ar1000.bcs~ ~VondoTheNPC\ar1000.baf~
APPEND ~pdialog.2da~
~J#VondoTheJust J#VondoP J#VondoJ J#VondoD J#Von25P J#Von25J J#Von25D J#Vond25~
UNLESS ~J#VondoTheJust~
APPEND ~interdia.2da~
~J#VondoTheJust J#VondoB J#VonB25~
UNLESS ~J#VondoTheJust~
They're talking about assigning script/dialog/portrait to a .cre via the .tp2, which involves a bit of hex code as opposed to editing the .cre file using NI or DLTCEP.You don't (shouldn't) need hex code for dialog/script assignments with the newer WeiDU.
In the long run I'm not sure one method is inherently better than another (for experienced modders, the TP2 approach is probably quite a bit faster), but since it's a lot easier to conceptualize "Edit this field in NI" than it is to explain the WRITE_BYTE concept in what we know from experience is for many people is their first modding tutorial, I think it's best to stick with the "edit this field in NI" approach.A small tutorial for not-so-experienced modders who are interested in this method would be welcome :).
In the long run I'm not sure one method is inherently better than another (for experienced modders, the TP2 approach is probably quite a bit faster), but since it's a lot easier to conceptualize "Edit this field in NI" than it is to explain the WRITE_BYTE concept in what we know from experience is for many people is their first modding tutorial, I think it's best to stick with the "edit this field in NI" approach.A small tutorial for not-so-experienced modders who are interested in this method would be welcome :).
<OK, checked the show Hex offsets>I believe that is correct.
Am I correct to say that "0x2e4" and " 0x330" are literally the positions of the attributes on NI?
That I do not need to alter their hex values but only to edit the fields as string?
Anyway my configuration is as follows:
Override Script: Char.bcs <-edit as string
Class Script: None
Race Script: None
General Script: wtasight.bcs
Default Script: Initdlg.bcs
...
...etc
#effects:2
Dialog: Char <-edit as string
Is this ok?
Next we are to create a script at *.baf, *.tp2, and *.2da are these files a simple text file modified to the respective extensions?
Thanks!
i dont get at all whats supposed to be in the .dlg file, everything seems to be put into the .d file.. whats the use of this .dlg file?
why do i need to create a .dlg file when its all empty?
there should be a summry like, J#Vondo.d is supposed to contain all of this info, J#VondoP.dlg is supposed to contain all of this.. becasue ive read it thru lots of times and i only get more and more confused everytime i read it.. a summary is much needed..
Ugh. I think I finally got all of this done as I should, but I have one major problem. No matter what I do, my text files on notepad always end up ".txt". So what's supposed to be the .baf file is "filename.baf.txt" and my tp2 file is "file-setup.tp2.txt". and I can't do anything about it. I did change the dropdown box to "All files" when I saved them, an deverything, but I just can't figure it out.
Scripts at the moment are unimportant, but for now you should set the override script slot to "J#Vondo". This means that when we create a J#Vondo.bcs file, it will be assigned to our .cre file. You should also blank out the leftovers from your .chr file (which should be dplayer3.bcs), and set that to none. If you want your PC to initiate dialogue as soon as they see the PC, use shoutdl2.bcs. If you want them to walk up to the PC to start a conversation, use initdlg.bcs. A basic combat script for them to use would be WTASIGHT.bcs, or WTARSGT.bcs for ranged weapons. So now we should have J#Vondo assigned to override, initidlg.bcs assigned to a slot further down, and wtasight or wtarsgt.bcs below that.
The dialogue assignment is at 0x330, or in the same area as the Script Name/Death Variable, just a bit further down. Right-click the field, choose "Edit as String", and type in J#Vondo. This means when our finished product is installed, and our dialogue compiled, J#Vondo.cre will use J#Vondo.dlg initially.
It should be in the section where five scripts are labelled override, default, class, race, and default. Not necessarily in that order.
I finally have the basics of my NPC complete, with one minor problem. In your tutorial, it suggests making the following to be what activates when you talk to the NPC subsequent times after rejecting them entrance into the party:
The following step is important. Read it! - Ghreyfain, 07/30/05
Finally, a small change that many people forget, but which is responsible for numerous headaches. Scroll to the top of your .cre file, and find the Flags field. In a newly converted .cre file, the flag "Export allowed" is still checked. Uncheck that. Odd side-effects that could crop up include scripts and dialogues behaving like those of a multi-player NPC. Not what we want at all.
I know I'm a pain, but as soon as you start talking about the Death Variable I get stuck. Maybe I need a tutorial on NI... could you direct me to one??
Now, for the Death Variable (More properly known as the Script Name, but I'm old Fashioned), one should scroll down to offset 0x2e4. In real english, this means about 2/3s of the way down the file, as shown by NI.Now that I'm actually looked at the tutorial again, the "offest 0x2e4 blah blah blah" bit is actually the numbering system (in hexadecimal... joy) that runs down the right-hand column. If you can count in hexadecimal, then just scroll down and look for that number in the right-hand column. If you're more used to words, then it's much easier to look for the words "Death Variable" in the left-hand column about 2/3 of the way down, as suggested.
Did you follow all the instructions for making a .cre?
He isn't flagged as "export allowed"?
You aren't testing with a saved game?
You've used NI to look at the .cre and ar0305.bcs when your mod's installed, to verify that everything looks right?
Is f1gartk the .cre file name? Can you CLUA him into the area?
Check to see if AR0305.are is in mastarea.2da. In my install, it isn't, and this means variables for it won't work. You can use either GLOBAL, or add AR0305 to mastarea.2da much in the same way as adding lines to interact.2da or pdialog.2da.
Check to see if AR0305.are is in mastarea.2da. In my install, it isn't, and this means variables for it won't work. You can use either GLOBAL, or add AR0305 to mastarea.2da much in the same way as adding lines to interact.2da or pdialog.2da.
I apologise in advance for my noob of a question, but how does one get an NPC to interact with other NPCs.....for example, if i wanted my new NPC Fiero to talk to Aerie, what would the necessary command be?
// interdia.2da is a bit simpler, but acts the same as pdialog.2da. It adds the NPCs banter file, which is used for inter-party banter, and romance dialogues.
APPEND ~interdia.2da~
~J#VondoTheJust J#VondoB J#VonB25~
UNLESS ~J#VondoTheJust~
Got it to work! Can someone please tell me how to change the portrait, name and bio in WeiDU?
Thanks for your help so far,
Biubid_boy.
COPY ~Jelina/Creatures/G#JLNA7.cre~ ~override/G#JLNA7.cre~
~Jelina/Creatures/G#JLNA8.cre~ ~override/G#JLNA8.cre~
~Jelina/Creatures/G#JLNA9.cre~ ~override/G#JLNA9.cre~
~Jelina/Creatures/G#JLNA10.cre~ ~override/G#JLNA10.cre~
SAY NAME1 ~Jelina~
SAY NAME2 ~Jelina~
SAY BIO ~When asked about her past, JELINA...~
WRITE_ASCII PORTRAIT_SMALL ~G#JLINAS~
WRITE_ASCII PORTRAIT_LARGE ~G#JLINAM~
BACKUP ~Smith/backup~
AUTHOR ~Biubidboy@gmail.com~
BEGIN ~Smith Fighter Kit for BGII~
ADD_KIT ~C#Smith~
//weapons
~C#Smith 1 1 1 1 1 1 1 1~
~C#Smith 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5~
// STR DEX CON INT WIS CHR
~C#Smith 15 0 9 13 0 14~
~C#Smith 0 1 -1 0 0 0~
~C#Smith 0 0 0 0 0 0~
~C#Smith 0 0 0 0 0 0~
//alingments
~C#Smith 0 0 1 0 0 1 0 0 1~
// dualcass
~C#Smith 0 0 0 0 0 0~
// 2da
~C#Smith.2da~
~K_F_D~
// unusable and class
~0x00040009 2~
// high level abilities
~LuFi0.2da~
// description
SAY ~ dwarven smith~
SAY ~Dwarven Smith~
SAY ~Dwarven Smith: The Dwarven Smith is as good with the tongs and anvils as he is with a sword. They are volitile characters, but firm in their beliefs, be it evil or good. They have fine hand-skills, but over-use of their armour has weakened their hide in comparison to their bretheren.
Advantages:
-Gain Smith Weapon. This will create a magical +3 weapon in the inventory of the Dwarven Smith. The weapon can be either a Long Sword, Short Sword, Mace or Axe. This spell can only be used once a day.
-Gain Smith Armour (Works like ghost armor)
-Plus 1 to Dexterity
Disadvantages:
-Cannot use ranged weapons.
-Must be a dwarf.
-Must be a chaotic allignment.
-Does not gain an extra constitution point like other dwarves.
~
//special abilities
COPY ~RYMAAN1.SPL~ ~override/RYMAAN1.SPL~
SAY NAME1 ~Smith Weapon~
COPY ~RYMAAN2.SPL~ ~override/RYMAAN2.SPL~
SAY NAME1 ~Smith Armor~
// high level abilities.
~LuFi0.2da~
I get a parse error for SAY ~ dwarven smith~.
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN4,2 POTN14,5 HAM07 SW1H27 STAF08~
2DA V1.0
*
Column1 Column2
ABILITY1 GA_RYMAAN1 ****
ABILITY2 **** GA_RYMAAN2
ERROR: Unix.Unix_error(20, "stat", "C#Smith.2da")Sorry for talking so much about kits in an NPC tutorial, I just don't want to start on the Kit Creation thread when it has been dead for so long.
BACKUP ~EnforcerKit/backup~Any help you could give would be great,
AUTHOR ~Biubidboy@gmail.com~
BEGIN ~Smith Fighter Kit for BGII~
ADD_KIT ~C#Enforcer~
//weapons
~C#Enforcer 1 1 1 1 1 1 1 1~
~C#Enforcer 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1~
// STR DEX CON INT WIS CHR
~C#Enforcer 3 13 3 3 3 3~
~C#Enforcer +1 -1 +1 -2 0 -3~
~C#Enforcer 0 0 0 0 0 0~
~C#Enforcer 0 0 0 0 0 0~
//alingments
~C#Enforcer 0 1 1 1 1 1 1 1 1~
// dualcass
~C#Enforcer 0 0 0 0 0 0~
// 2da
~EnforcerKit/Enforcer.2da~
~K_T_H~
// unusable and class
~0x00008000 4~
// high level abilities
~LuFi0~
//equipment
~~
// description
SAY ~enforcer~
SAY ~Enforcer~
SAY ~Enforcer: An Enforcer is a character less proficient at the finery of theiving. More burly than the the average shady character, they can intimidate most commoners and creatures alike. They may even be referred to as thugs. But the fact remains, the Enforcer is good at what they do.
Advantages:
-Gain Underhanded Blow. Gives the Enforcer 1 turn to give the enemy an underhanded blow. The shot deals 1 D10 damage to the next creature the Enforcer hits. A miss will waste the ability.
-Gain Intimidate. All enemy creatures around the Enforcer must make a save-versus-spell or flee. Lasts 1 turn. Undead and other magical creatures are immune.
-Plus 1 to Strength and Constitution.
Disadvantages:
-Minus 1 to Dexterity.
-Minus 2 to Intelligence.
-Minus 3 to Charisma.
-Must be human.
~
//special abilities
COPY ~EnforcerKit/ENFORCER1.SPL~ ~override/ENFORCER1.SPL~
SAY NAME1 ~Underhanded Blow~
COPY ~EnforcerKit/ENFORCER2.SPL~ ~override/ENFORCER2.SPL~
SAY NAME1 ~Intimidate~
Question: the only copies of Weidu I can find are for a Mac. Where can I find this Weidu.exe that you refer to? (a PC version)
Summon the NPC "manually"? I have no idea what that means...
Yeah, I tried experimenting with a .baf file to make the script but it generated an error. I'm still pretty new at this :)
Ummm...Hey Grim, is there any chance I can email you the CRE file and have you look at it and try to figure out what's wrong (and not tell anyone who the NPC is until it actually is finished and put up for download)? Pretty please? ;D ;D ;D ;D
srry, so then the name that is shown is the "Short Name" (in dltcep)?
I'm back! And still making an NPC. Everythings ready, but theres a problem with my tp2 file. If I put the sound setup code first in my file, only the sound, not the portrait works. If I put the potrtait code first only the portrait works. How do you get both to work?
COPY ~Jelina/Creatures/G#JLNA7.cre~ ~override/G#JLNA7.cre~
~Jelina/Creatures/G#JLNA8.cre~ ~override/G#JLNA8.cre~
~Jelina/Creatures/G#JLNA9.cre~ ~override/G#JLNA9.cre~
~Jelina/Creatures/G#JLNA10.cre~ ~override/G#JLNA10.cre~
SAY NAME1 ~Jelina~
SAY NAME2 ~Jelina~
SAY SELECT_ACTION1 ~Stuff~ [FILENAME]
// SAY the various other lines
WRITE_ASCII PORTRAIT_SMALL ~G#JLINAS~
WRITE_ASCII PORTRAIT_LARGE ~G#JLINAM~
The other question has to do with the PC banters I am trying to add. I want Raist to talk to the PC, just like the other NPCs do, but I can't get it to work. I've been using <IF ~Global("WeAlreadyTalkedAboutThis","LOCALS",1)~ THEN BEGIN RaistTalks1> type statements like the ones in this tutorial, only placed in the banter file instead of the initial dialogue file. The PC banters are located after all the CHAINs for the NPC banters. But WeiDU encounters a problem right at the first IF. Any ideas?
hokay. sorry to bother yet again. i need something explained please. Now, to whoever answers this, thanks heaps. Please explain it in really simple terms, as though to a REALLY slow child. (Witness Flames -16 y/o australian.... believe me, it NEEDS to be simple)
1. interdia.2da and pdialogue.2da.....do i actually need files named those things in order for the banter to work? If so, exactly what should i put in it? if not.....what is their purpose??
2. Name still not working, so i'm probably going to start the NPC from scratch *sigh*
3. anyone know how to use THEN EXTERN.....couldn't quite figure it out.....because should the PC decide to be an ass i was thinking of having Aerie have a whinge....in the initial dialogie before my NPC joins the party.(refer to stupid child thing again)
4. Last one. Moving my entire party. I know i asked this before, but i didn't realy get an answer. i can get my NPC to move, but not the party.....any ideas?
Alright. Cheers everyone.
Also, is there a way to use an OR operator type of thing? For example, I'd like the conditions for the next banter to be either that the first one has already run OR that Imoen has been rescued. They don't both have to be true, just one of them.
Umm... I have a couple of questions. Firstly, code do you have to change to make your custom banters come up and secondly, how do I link the leaving script to my NPC because when I kick him out he says nothing.
Thanks,
Biubid_boy
Hit another snag, though :(. You guys are awesome for helping me so much...maybe someone can tell me why WeiDU gives me an error message right at the first "IF" when I try to add banters with the PC? Here's the first state copied and pasted directly...
BEGIN ~BKM#RAIS~
IF ~Global("RaistPC","LOCALS",0)~ THEN BEGIN RaistPC1
SAY ~The others tell me you are searching for a lost sibling. Is that true?~
IF ~~ THEN REPLY ~She's my foster sister. I have to save her~ GOTO RaistPC1Sister
IF ~~ THEN REPLY ~Actually, I mostly just want to kill the man who took her--I owe him one.~ GOTO RaistPC1Revenge
IF ~~ THEN REPLY ~They are mistaken. I seek a man who offered me power beyond my wildest dreams, and I intend to have it.~ GOTO RaistPC1Power
IF ~~ THEN REPLY ~Raistlin, I'd rather not talk about this right now.~ GOTO RaistPC1Goodbye
END
Don't you need to use CHAIN for banters?
No and no :(. Using Notepad, and I've never given the BEGIN BKM#RAIS command before this line.
The dialogue assignment is at 0x330, or in the same area as the Script Name/Death Variable, just a bit further down. Right-click the field, choose "Edit as String", and type in J#Vondo. This means when our finished product is installed, and our dialogue compiled, J#Vondo.cre will use J#Vondo.dlg initially.
I'm not sure if this would help, but after I type in the name of my d.file (using edit as string), NI gave me the error:Same here.
"Error Updating Value"
Is there a special guide for creating improved battles? I'm still trying to figure how to create a battle somewhat similar to the four paladins in Valen's mod.
BACKUP ~Minuit The NPC\backup~
AUTHOR ~Madieron@hotmail.fr~
BEGIN ~Minuit the NPC for BG2:ToB~
// The following is the copying of Minuit's .cre file, as well as assigning her sound-set. See the file sdnslot.ids for a listing of sounds you can add.
COPY ~Minuit The NPC\Minui1.cre~ ~override\Minui1.cre~
SAY NAME1 ~Minuit~
SAY NAME2 ~Minuit~
SAY SELECT_COMMON4 ~Bla bla bla.~ [Minuit1] // [Minuit1] is the name of the .wav file for this sound
SAY SELECT_COMMON5 ~Salut à toi, Champion.~ [Minuit2]
SAY SELECT_COMMON6 ~Suivez moi !.~ [Minuit3]
SAY SELECT_ACTION1 ~A l'aventure compagnons....~ [Minuit4]
SAY SELECT_ACTION2 ~Comme vous voulez.~ [Minuit5]
// The following is telling WeiDU to compile the following .d files
COMPILE ~Minuit The NPC\Mad#Minuit.d
// The following is compilling the script and placing it in the override.
COMPILE ~Minuit The NPC\Mad#Minuit.baf
// The following is appending what we wrote in AR1000.baf to the bottom of
// AR1000.bcs
EXTEND_TOP ~Ar1000.bcs~ ~Minuit The NPC\ar1000.baf~
IF
See([PC])
NumTimesTalkedTo(0)
THEN
RESPONSE #100
Dialogue(Nearest([PC]))
END
IF ~~ THEN BEGIN TwoPallys
SAY ~Blah~
= ~Blah~
++ ~Blah~ + Request
++ ~Blah~ + DismissCharacter
END
Thanks for the suggestions guys. I found it in the block above the one that WeiDU stated. I forgot to put END at the end of the block, but I have no clue why WeiDU mentioned the next block having the error. Ah well, thanks again! ;)
sorry that i ask but i can't create .dlg file :-Zzz. I rename it to XXX.dlg but its stil a txt file, so basically i just change nake from XXX to XXX.dlg and not change files extention from txt to dlg. Anyone willing to help??
BEGIN NSafaP
IF ~HappinessLT(Myself,-290)~ THEN BEGIN unhappy
SAY ~I've tried to guide this group in the right direction, but I'm tired of trying. Goodbye.~
IF ~~ THEN DO ~LeaveParty() EscapeArea()~ EXIT
END
IF ~Global("SafanaJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~You are kicking me out?~
IF ~~ THEN REPLY ~Oops, I meant to boot that twit Keldorn, not you. Sorry.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~That's right, I don't want you in the party.~ DO ~SetGlobal("SafanaJoined","LOCALS",0)~ EXIT
END
IF ~Global("SafanaJoined","LOCALS",0)~ THEN BEGIN Rejoin
SAY ~You want me to rejoin?~
IF ~~ THEN REPLY ~That's right Safana, get back in formation.~ DO ~SetGlobal("SafanaJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~That's right, I don't want you in the party.~ EXIT
END
I left out SAY_NAME in the Tp2 since SAFANA as a StringRef does exist already in the CRE/Dialogue, the DV is also SAFANA, seems to not have any side effects.
since ive barely started on this project, ill be sure to correct such prefixes before any release to avoid conflicts, my script names NS are already invalid/taken.
since ive barely started on this project, ill be sure to correct such prefixes before any release to avoid conflicts, my script names NS are already invalid/taken.
I'd say that'sratherextremely unwise. Best to get into the habit of using the prefix now, otherwise debugging will be a nightmare. Trust us.
I dont see "7S" as a registered prefix, so this is valid? :)
All my files are right but my character doesn't appear.... Do I need to start a new game for it ?If you used a script to place the NPC, then, no, you just have to trigger the script.
Vefiry the AR????.BCS got changed correctly with NearInfinity; if it did, you should have
IF
Global("J#VondoExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#VondoExists","AR1000",1)
CreateCreature("J#Vondo",[1137.2046],3)
END
That will be at the top of the script (bad form, really, EXTEND_BOTTOM should be used, or OnCreation() put in the block and a Continue() added to the end. As it stands, it would bust an OnCreation() scripting).
If that scripting is there, then you're good to go, just visit the area. The only thing that would stop your NPC from showing would be
(1) using mismatched area variables - that is, putting the character in AR0400, but then making the script still try to use "AR1000"
(2) not having the CRE spelled right
BEGIN T#Rhythm
BEGIN ~T#Rhythm~
Maybe you could just copy and paste the relevant lines from the tp2, like
COMPILE ~T#RHYTHM.D~
etc.
One of the first rules of proofreading can frequently be found in my own posts: it is practically impossible to effectively proofread your own work. You will stare at it forever and see only what you think you should be seeing. If someone else sees it, or, as I have so often found, you see it posted somewhere public, the tiny little errors will jump out at you.
Sometimes, all it takes is a fresh pair of eyes.
Ok I've done all the steps and have completed the tp2. file, but here's my problem; when I try to do the setup, the Weidu window says this:
** Error ** [VONDOTHENPC-SETUP.TP2] not found.
[C:\Program Files\Black Isle\BGII - SoA\VondaTheNPC-setup.exe] Using scripting style "BG"
[...] After that, I used NI to remove the "export allowed" flag, change the ally/enemy field to Neutral-128You may also need to check (and correct) Morale, Morale Recovery, and Morale Break fields in the .CRE file, IIRC
Either double-click the field, or right-click it and select Edit As String in order to do free entry of your new script name.
And as for the "error updating value", don't write MYFILE.DLG, just write "MYFILE".
COPY ~mymod/cre/crefile.cre~ ~override~
SAY NAME1 ~Name~
SAY NAME2 ~Name~
WRITE_ASCII 0x248 ~mynpcs~ #8 // assign override script
WRITE_ASCII 0x2cc ~mynpc~ #8 // assign pre-joining dialogue file
WRITE_ASCII 0x280 ~mynpcdv~ #32 // assign DV
WRITE_ASCII 0x34 ~mynpcs~ #8 // assign small portrait
WRITE_ASCII 0x3c ~mynpcl~ #8 // assign medium portrait
It's just easier for me.If you have the latest version of Java you'll probably have to use the latest NI beta, as the current non-beta release is incompatible.
WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory")
[SETUP-MEPHAESTUS.TP2] PARSE ERROR at line 3 column 8-17
Near Text: Mephaestus
syntax error
[SETUP-MEPHAESTUS.TP2] ERROR at line 3 column 8-17
Near Text: Mephaestus
Parsing.Parse_error
ERROR: parsing [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error
BACKUP ~Mephaestus\backup~
AUTHOR ~rabbi_satan@hotmail.com
BEGIN ~Mephaestus the NPC for BGII:ToB~
COPY ~Mephaestus\RSJC#MEPH.cre~ ~override\RSJC#MEPH.cre~
SAY NAME1 ~Mephaestus~
SAY NAME2 ~Mephaestus~
WeiDU v 185 Log
F:\Black Isle\BGII - SoA\setup-mephaestus.exe
[./CHITIN.KEY] loaded, 590551 bytes
[./CHITIN.KEY] 182 BIFFs, 41793 resources
[dialog.tlk] loaded, 8692747 bytes
[dialog.tlk] 74107 string entries
[./Autorun.ini] loaded, 1452 bytes
[./baldur.ini] loaded, 621 bytes
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD1\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD3\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD4\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD2\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD5\]
[./Keymap.ini] loaded, 5615 bytes
[./Mplaynow.ini] loaded, 230 bytes
[dialog.tlk] claims to be writeable.
[dialog.tlk] claims to be a regular file.
WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory")
[SETUP-MEPHAESTUS.TP2] LEXER ERROR at line 11 column 26-35
Near Text: \
invalid character [\]
[SETUP-MEPHAESTUS.TP2] ERROR at line 11 column 26-35
Near Text: \
Parsing.Parse_error
ERROR: parsing [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error
FATAL ERROR: Parsing.Parse_error
WeiDU Timings
load TLK 0.000
parsing .tp2 files 0.010
loading files 0.064
unmarshal KEY 0.194
unmarshal TLK 0.230
TOTAL 0.498
EXTEND_TOP ~AR1000.bcs~ ~Mephaestus\AR1000.baf~
Kulyok's just trying to promote independence and good reporting techniques. But, yes, because parser errors are often the product of a mistake that occurs higher up in the file, you usually don't get much in the way of results by just staring at the actual line in question. Depends on the type of error. (But this one sounds awfully like another missing tilde.)
// The following is the copying of Vondo's .cre file, as well as assigning his sound-set. See the file sndslot.ids for a listing of sounds you can add.
COMPILE ~LokitheAdventurer\V#LOKI.d~
SAY SELECT_COMMON1 ~I'm here.~ [INNOC0]
BEGIN M#AVARIA
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~You there! You look like adventuring types, help me! Please!~
IF ~~ THEN REPLY ~Slow down! Who are you and what's the problem?~ GOTO HelpA
IF ~~ THEN REPLY ~Sorry, we don't have the time.~ GOTO RejectA
END
IF ~~ THEN BEGIN HelpA
SAY ~My name is Avaria, and I need your help. I'm running from a group of assassins. Please hurry, we have to hide!~
IF ~~ THEN REPLY ~Okay, but how can we help?~ GOTO JoinPA
IF ~~ THEN REPLY ~No, I don't want to mess around with assassins.~ GOTO RejectA
END
IF ~~ THEN BEGIN JoinPA
SAY ~Oh, I don't know! Hide me! Let me join your group, I've a good hand in combat, just help me!~
IF ~~ THEN REPLY ~Alright then, you can join us.~ DO ~SetGlobal("AvariaJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Sorry, I don't want you to join us, maybe another time?~ GOTO RejectA
END
IF ~~ THEN BEGIN RejectA
SAY ~WHAT? PLEASE! I'm desperate! I'm going to be killed unless you help me!~
IF ~~ THEN REPLY ~Okay then, I'm sorry. You can join us, what help do you need?~ DO ~SetGlobal ("AvariaJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Sorry, it's too risky with the assassins and all that, you're on your own.~ GOTO RejectedA
END
IF ~~ THEN BEGIN RejectedA
SAY ~What?! NO! PLEASE! Damn you! Curse you! May the demon blood I carry consume you and torture you for eternity!~ DO ~EscapeArea()~ EXIT
END
BEGIN M#AVAP
IF ~Global("AvariaJoined","LOCALS",1)~ THEN BEGIN KickAv
SAY ~What? But we're not finished! Don't kick me out yet! You'll not find me again if you do!~
IF ~~ THEN REPLY ~My mistake, stay in the group.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~I'm afraid so, don't worry, you'll be fine out there on your own.~ DO ~EscapeArea()~ EXIT
END
Just the .chr convert to .cre is greyed out for every chrAre you sure you selected the chr file before you go to the File to adjust it.
COPY ~haldamir/character/b!hal.cre~ ~override~
ADD_CRE_ITEM ~leat04~ #0 #0 #0 ~IDENTIFIED~ ~ARMOR~
ADD_CRE_ITEM ~sw1h01~ #0 #0 #0 ~IDENTIFIED~ ~SHIELD~
ADD_CRE_ITEM ~sw1h02~ #0 #0 #0 ~IDENTIFIED~ ~WEAPON1~ EQUIP
ADD_CRE_ITEM ~potn52~ #0 #0 #0 ~IDENTIFIED~ ~QITEM1~
ADD_CRE_ITEM ~bow01~ #0 #0 #0 ~IDENTIFIED~ ~INV1~
ADD_CRE_ITEM ~arow01~ #14 #0 #0 ~IDENTIFIED~ ~QUIVER1~
ADD_CRE_ITEM ~arow02~ #5 #0 #0 ~IDENTIFIED~ ~QUIVER2~
SAY NAME1 ~Haldamir~
SAY NAME2 ~Haldamir~
WRITE_ASCII 0x248 ~B!HALS~ #8 // assign override script
WRITE_ASCII 0x2cc ~B!HAL~ #8 // assign pre-joining dialogue file
WRITE_ASCII 0x280 ~B!HALDAMIR~ #32 // assign DV
WRITE_ASCII 0x34 ~b!haldas~ #8 // assign small portrait
WRITE_ASCII 0x3c ~b!haldam~ #8 // assign medium portrait
IF ~~ THEN BEGIN SalemJoin
SAY ~Hmm. Sit here and drink myself to death, or travel on an adventure with a stranger? Let me just pay my tab to the barkeep and we'll be off!~
IF ~~ THEN DO ~SetGlobal("SALEMJoined","GLOBAL",1) JoinParty()~ EXIT
END
After installing, the area behaves exactly as it did before. Pulling up Infinity Explorer again, AR0412.ARE still uses AR0412.BCS as its script--and clicking on that filename still does nothing, because the game can't seem to find it: I can see AR0412.BCS in the Override folder, and if I have Infinity Explorer pull it from there it looks all right . . . but it's still not in the Scripts.bif menu, and it still doesn't seem to be attached to AR0412.ARE, so the script never runs, and my NPC never appears.Well... it's not going to be biffed unless you did that explicitly. EXTEND_TOP should create a non-existing script the same way EXTEND_BOTTOM should (which, incidentally, is probably better in most cases, since it won't mess up any OnCreation blocks that have to run first). Use a #8 after your WRITE_ASCII since it's less than 8 characters.
Use a #8 after your WRITE_ASCII since it's less than 8 characters.I've dropped the COPY_EXISTING and WRITE_ASCII bit from my TP2, as all it was really doing was rewriting a script reference that was already there. [/ADD]
Is my mistake that I'm trying to access a variable local to AR0413 from AR0412?
GlobalLT("Chapter","GLOBAL",1)Not possible. The game starts in chapter 1 - there's no chapter 0/prologue.
QuoteGlobalLT("Chapter","GLOBAL",1)Not possible. The game starts in chapter 1 - there's no chapter 0/prologue.
BEGIN M#JUlbra
APPEND ~M#JUlbra~
IF ~NumTimesTalkedTo(0)~ THEN BEGIN Greeting
SAY ~Hello~
IF ~~ THEN REPLY ~Hi.~ GOTO control
IF ~~ THEN REPLY ~Go away.~ GOTO gamble
IF ~~ THEN REPLY ~I don't have time for such a stupid person.~ EXIT
END
IF ~NumTimesTalkedToGT(1)~ THEN BEGIN Second
SAY ~My, my, is curiousity eating you yet?~
IF ~~ THEN REPLY ~What did you do exactly?~ GOTO explain
IF ~~ THEN REPLY ~Still not sure.~ GOTO goodbye
IF ~~ THEN REPLY ~What are your talents exactly?~ GOTO talents
END
END
IF ~NumTimesTalkedToGT(0)~ THEN BEGIN Second
SAY ~My, my, is curiousity eating you yet?~
IF ~~ THEN REPLY ~What did you do exactly?~ GOTO explain
IF ~~ THEN REPLY ~Still not sure.~ GOTO goodbye
IF ~~ THEN REPLY ~What are your talents exactly?~ GOTO talents
END
END