Jump to content

Dialog Help


Troll

Recommended Posts

IF ~~ THEN BEGIN SellTell

SAY ~Only the rarest and most exotic implements of war, seidy. I have a helmet made from wyvern skulls, a bow made from salamander-spine! Weapons taken from the bodies of magical creatures! Armour forged from their hides!~

IF ~~ THEN REPLY ~Sure, we'll take a look.~ DO ~StartStore("AhmedStore",LastTalkedToBy())~

IF ~~ THEN REPLY ~Aren't you just selling the same kind of stuff Cromwell is?~ GOTO Insulted

IF ~~ THEN REPLY ~No, thank-you.~ GOTO Byebye

END

 

Weidu is rejecting the third IF down. No matter what line is there, it rejects that line. why would that be?

Link to comment
Thanks. How do I copy the store to the override? When I use that StartStore command, is the name inside the command its apparent name, or file name?

 

Oh and that 'LastTalkedToBy()' thing in the startstore line, do those brackets need anything in it?

 

You can find the attributes required by the StartStore action (as well as all the other actions) here at IESDP. As you can see there, you should use the filename.

 

LastTalkedToBy() is equal to writing LastTalkedToBy(Myself); ie. if you do not specify an object here, the engine will assume "Myself", which always refers to the creature whose script or dialog is in question.

 

You copy the store to the override just like you copy any other file; i.e. by placing a COPY command in your .tp2 file:

 

COPY ~<YourMod>/<yourstore>.sto~ ~override~

 

where <YourMod> is the folder which holds the files of your mod (located under the BG2 installation folder), and <yourstore> is the name of your .sto file.

Link to comment

IF ~~ THEN REPLY ~Sure, we'll take a look.~ DO ~StartStore("ahmeds",LastTalkedToBy())~ EXIT

 

This is the line that starts my store. ive copied the store to the override and it is that same filename, but the comp crashes when i click that line of dialogue, without a message. Anyone know why?

Link to comment
What does this line of startstore do?

 

IF

    Global("KRSTART_STORE","LOCALS",1)

 

This is from iesdp

 

It checks that the value of the local variable KRSTART_STORE on the creature in question has previously been set to 1. This could be for a number of reasons. One could be that the writer of that bit of script wanted to make sure that the store is available only after certain conditions are met; e.g. after a certain bit dialog has occurred or a quest has been accomplished (that whatever would set the variable to 1).

 

As to your crashing problem, I really have no idea.

Link to comment
IF ~~ THEN REPLY ~Sure, we'll take a look.~ DO ~StartStore("ahmeds",LastTalkedToBy())~ EXIT

 

This is the line that starts my store. ive copied the store to the override and it is that same filename, but the comp crashes when i click that line of dialogue, without a message. Anyone know why?

 

Not sure, but maybe your store file is corrupted or does not have everything needed? I'd try it first with one of the game's original stores in order to get see of how it works and change it to my own store later. ;)

Link to comment
IF ~~ THEN REPLY ~Sure, we'll take a look.~ DO ~StartStore("ahmeds",LastTalkedToBy())~ EXIT

 

This is the line that starts my store. ive copied the store to the override and it is that same filename, but the comp crashes when i click that line of dialogue, without a message. Anyone know why?

 

Not sure, but maybe your store file is corrupted or does not have everything needed? I'd try it first with one of the game's original stores in order to get see of how it works and change it to my own store later. ;)

 

That would be my advice as well.

Link to comment

Some things - which I don't know if they are exactly the cause of the crash.

 

First: When copying your store to the override through weidu you need the following in your tp2

 

COPY ~[ModDirectory]/ahmedsto.sto~ ~override~

SAY NAME2 ~Ahmed's Store~

 

The second line is to update the dialog.tlk - so the store will have his proper name in game - not doing this should not cause a crash however, it should only display some non-sensical text instead of the right store name.

 

Second: BG always uses files with a name not longer than 8 characters (like old DOS did). The long name of your store might thus be the cause of the crash.

 

Try f.e. AhmedSto.sto and see if it still crashes.

 

In general: try always to limit your file names to max 8 characters.

Link to comment

Problem solved everyone! Thank you very much all, everything you guys said was helpful. Now just one more thing... if my NPC Larok is in the party, I want Ahmed to say a bit of a hello to him, and Larok to say a hello back, THEN initiate his normal dialog, like ribald and mazzy do. What do I add to Ahmed and Larok's script/.d file to do that?

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...