Jump to content


Photo

WeidU question


  • Please log in to reply
73 replies to this topic

#41 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 18 June 2005 - 08:45 PM

I am guessing there is something wrong with my BLokyr.d. to install a Bxxx.d, do you do it different then just compile ~Bxxx.d~? At the moment my BLokyr is empty. Do i have to put something in it so it would link up the the CHAIN i have in the ARGRIM file.


Yes, you need to create a .d file for that specific dialog or the chain has no where to extern to. They should be compiled together as well for it to work correctly.
Remember, you can even do multiple dialog (.dlg) file compilations in a single .d file!

The great wolf Fenrir gapes ever at the dwelling of the gods.


#42 Pex657

Pex657
  • Member
  • 159 posts

Posted 18 June 2005 - 09:58 PM

Yes, you need to create a .d file for that specific dialog or the chain has no where to extern to. They should be compiled together as well for it to work correctly.
Remember, you can even do multiple dialog (.dlg) file compilations in a single .d file!

that is the part that confuses with chain. what should i put in the blokyr dialog to make it work?

#43 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 19 June 2005 - 01:49 AM

Inside your .d file there should be a number of BEGIN xxxx.d commands so that weidu can create the necessary file.

Best thing to do is to put all the blank ones at the top and then use ARGRIM as the last before the actual chains:

///top of .d file
BEGIN LokyrJ
BEGIN LokyrP
BEGIN BLokyr
BEGIN ARGRIM ///or whatever the file with the dialog in it is called

CHAIN etc etc

///end of .d file

This allows weidu to create the necessary files that the CHAIN's will use. All separate dialog files you wish to create for new characters in game will need to be either created in this fashion or have separate .d file Compile's in your tp2.

If I am wrong in any of this I am sure I will be corrected...it's been a while since I did anything with dialog files!
A knight without armour in a savage land...

#44 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 08:50 AM

I got it to install with out error. but the conversation does not start. It might be how ARGRIM is compiled. IT is a changed .d
is it still COMPLIE ~LokyrNPC\ARGRIM.g~
or would i have to put something different.

SConrad said to put it as COMPILE ~dir/bodhi.d or maybe. COMPLIE ~LOKYRNPC\dir/ARGRIM.d~ but that just gives me errors :crying:
I feel so close, but then so far away from getting my weidu knowledge down pat.

It also might be the order so i will try moving thigns around.
right now it is this order
IF ~InParty("Lokyr") !StateCheck("Lokyr",STATE_SLEEPING) Global("Businlokyr","GLOBAL",0) !Died("Lokyr")~ Businlokyr

Edited by Pex657, 19 June 2005 - 09:02 AM.


#45 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 19 June 2005 - 09:07 AM

If it's a banter, you will have to wait for it to trigger, or hold down Ctrl-I ingame.

You will also need to append INTERDIA.2da and Pdialog.2da. These two files are used by joinable NPCs to manage all their dialogue files.

APPEND ~pdialog.2da~
~SDNPC	SDNPCP	SDNPCJ	SDNPC	SDNPC25P	SDNPC25J	SDNPC25  SDNPC25~
UNLESS ~SDNPC~

APPEND ~interdia.2da~
  ~SDNPC     BSDNPC      BSDNPC25~
  UNLESS ~SDNPC~
  IF ~25FILE~


#46 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 09:09 AM

i will try adding that, but it is more of an interjection than banter. the problem right now is that ARGRIM won't start the conversation at all. even if all the IF's are correct

Edited by Pex657, 19 June 2005 - 09:21 AM.


#47 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 19 June 2005 - 11:55 AM

What exactly are you trying to do? A banter is a random dialog triggered during the game between npc's in the party. An interjection is a dialog that occurs between one or more party members and a non-joinable npc.

Is ARGRIM the dialog file for the npc Lokyr? If yes then unless this is listed as the dialog file in the cre file it will need to be appended as Shed outlines above.

What are the criteria to start the dialog? Is it at a specific stage during the game or do you just want it to happen when the party first meets Lokyr or just happen shortly after Lokyr joins the party but at no particular time or place?
A knight without armour in a savage land...

#48 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 12:05 PM

I am having Lokyr(the npc i made) talk with another npc in the game(not one in my group)

ARGRIM is the npc in the game that is not in the group.
the dialogue should happen when the group goes to talk with Grim(his last name) and sets up the Lokyr quest.

#49 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 19 June 2005 - 12:35 PM

Then if GRIM is the one who initiates the dialog he should have his dialog file in his cre file name ARGRIM and their should be a BEGIN ARGRIM in one of your .d files so that the dialog file can be created at installation.

Have you checked the ARGRIM cre file in NI to see if his dialog is entered and if it is, it should be clickable and you should be able to read it using NI. If this is not the case it hasn't installed correctly.
A knight without armour in a savage land...

#50 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 12:52 PM

his dialog works, just not the part that i added.

Edited by Pex657, 19 June 2005 - 12:52 PM.


#51 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 19 June 2005 - 01:04 PM

BEGIN ~ARGRIM~ 2 // non-zero flags may indicate non-pausing dialogue
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #2 /* Triggers after states #: 5 6 even though they appear after this state */
~CheckStatGT(LastTalkedToBy,13,42)
RandomNum(4,1)~ THEN BEGIN 0 // from:
  SAY #29702 /* ~My family is one of the wealthiest in Athkatla... we have interests in the gold mines up north and the shipwrights here in the city.  So I will thank you not to stand too close..~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 5 6 even though they appear after this state */
~CheckStatGT(LastTalkedToBy,13,42)
RandomNum(4,2)~ THEN BEGIN 1 // from:
  SAY #29703 /* ~I don't suppose you're from one of the mercantile companies, are you?  No... I didn't think so.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 5 6 even though they appear after this state */
~CheckStatGT(LastTalkedToBy,13,42)
RandomNum(4,3)~ THEN BEGIN 2 // from:
  SAY #29704 /* ~If you ever travel to Riatavin or Trademeet, my friend, beware of the Copriths.  That family will be the ruin of Amn, I swear by Helm's beard!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 5 6 even though they appear after this state */
~CheckStatGT(LastTalkedToBy,13,42)
RandomNum(4,4)~ THEN BEGIN 3 // from:
  SAY #29705 /* ~I'm having a difficulty with the workers at one of our gold mines, and I'm not leaving until I speak to a Councilor about it.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 /* Triggers after states #: 5 6 even though they appear after this state */
~CheckStatLT(LastTalkedToBy,14,42)
~ THEN BEGIN 4 // from:
  SAY #29706 /* ~Begone, peasant!  I am the lord of one of Amn's great families and I'll not have your rude stench assaulting my nostrils!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~See("Cernd")
InParty("Cernd")
!StateCheck("Cernd",STATE_SLEEPING)
RandomNum(2,1)
Global("argrimcernd","LOCALS",0)~ THEN BEGIN 5 // from:
  SAY #29707 /* ~(sniff)  I didn't realize they let wilderness erudites in here without hosing them down, first.~ */
  IF ~~ THEN DO ~SetGlobal("argrimcernd","LOCALS",1)~ EXTERN ~CERNDJ~ 81
END

IF WEIGHT #1 ~See("Aerie")
InParty("Aerie")
!StateCheck("Aerie",STATE_SLEEPING)
RandomNum(2,1)
Global("argrimaerie","LOCALS",0)~ THEN BEGIN 6 // from:
  SAY #29709 /* ~Hmm... hmmn.  Yes, you'll do.  You... the pretty elf, there.  I need a new mistress, and I think you'll do nicely.~ */
  IF ~~ THEN DO ~SetGlobal("argrimaerie","LOCALS",1)~ EXTERN ~AERIEJ~ 34
END


This is the ARGRIM dialog as it would appear in a .d file when extracted. You wish to add an interjection similar to the Aerie and Cernd ones? It is likely that the weights and the statchecks are what are causing your problem.
A knight without armour in a savage land...

#52 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 01:20 PM

all i did was just add
IF ~InParty("Lokyr") !StateCheck("Lokyr",STATE_SLEEPING) Global("Businlokyr","AR1002",0) !Died("Lokyr")~ Businlokyr
SAY ~I am a very busy man, with lots of money to put towards investments, if you could let me do that, I would be very glad.~
IF ~~ THEN REPLY ~I think you should listen to us. We have a investment that you might be interested in. It would be worth your time, and money to listen.~ GOTO Listen
IF ~~ THEN REPLY ~We do not care how busy you are! We have a business proposal and we think you should listen.~ GOTO Listen
IF ~PartyGoldGT(101)~ THEN REPLY ~ We know that you like to invest in new investments. We will give you 100 gold pieces to listen to a proposal.~ GOTO Listengold
IF ~OR(2) CheckStatGT(Player1,18,CHR) CheckStatGT(Player1,17,Int)~ THEN REPLY ~My dear friend. I am not here to burdon you. I  hear around that you are the man to see if one wants to invest in to a new store. I have lots of money and I am ready to spend, if you know what I mean!~ GOTO Listentrick
IF ~~ THEN REPLY ~I am sorry to bother you. I will be on my way.~ GOTO Leave
END

IF ~~ THEN BEGIN Listen
SAY ~Why are you still talking with me. I do not deal with the slum population.~
IF ~~ THEN REPLY ~Do not anger us. If you have not noticed, it is very easy for us to hurt you. So if your smart you will listen.~ GOTO Threat
IF ~~ THEN REPLY ~Why are you so rude. We are just trying to talk business with you and all you are doing is insulting us.~ GOTO Cry
IF ~PartyGoldGT(101)~ THEN REPLY ~ We know that you like to invest in new investments. We will give you 100 gold pieces to listen to a proposal.~ DO ~TakePartyGold(100)~ GOTO Listengold
IF ~CheckStatGT(Player1,18,CHR) OR(1) CheckStatGT(Player1,17,Int)~ THEN REPLY ~My dear friend. I am not here to burdon you. I  hear around that you are the man to see if one wants to invest in to a new store. I have lots of money and I am ready to spend, if you know what I mean!~ GOTO Listentrick
IF ~~ THEN REPLY ~I am sorry to bother you. I will be on my way.~ GOTO Leave
END


CHAIN 
IF ~~ THEN ARGRIM Listengold
~Well, I might have time to listen to your proposal after all.~ DO ~SetGlobal("Businlokyr","AR1002",1)~
== BLokyr
~This is only a small amount of money that you have recieved from us. There is much more money if you invest in my business. I come from Waterdeep and own trade corporation there. I want to extend my look outs down in Amn.~
== ARGRIM
~I see, but how much money would you need?~
== BLokyr
~Atleast 10,000 upfront and then some. The payback would be atleast double this amount. Plus my merchants can offer other services.~
== ARGRIM
~Other services? Go on...~
== BLokyr
~Protection, warehousing, just to name a few.~
== ARGRIM
~I am interested, but I cannot give you the space or money at this moment. One of my deals went sower.. wait.. Maybe you can help me out in my situation and I would lend you all the money you need.~
== BLokyr
~Tell us about your situation.~
== ARGRIM
~A man called Torvald, at the moment holds most of my belongs. If you could some how... make him... disappear. He has deed papers. If he is dead, he won't really need them anymore.~
END

IF ~~ THEN REPLY ~we will see what we can do.~ EXIT
to the bottom. what would be a good way of fixing my problem. maye just take out all the weights??

#53 Rabain

Rabain

    God

  • Member
  • 653 posts

Posted 19 June 2005 - 01:46 PM

Give your dialog a Weight of -1 and weidu will reorder the weights with yours first.

IF WEIGHT #-1 ~InParty("Lokyr") !StateCheck("Lokyr",STATE_SLEEPING) etc

The Death Variable for Lokyr is Lokyr right?...just checking! Other dialogs using InParty("Lokyr") are working right?...just checking again!
A knight without armour in a savage land...

#54 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 04:09 PM

The Death Variable for Lokyr is Lokyr right?...just checking! Other dialogs using InParty("Lokyr") are working right?...just checking again!

yes the death variable for Lokyrr is Lokyr, and this is the first time i am using Inparty("Lokyr").

I put the weight -1 and still.. he just goes through his normal sayings, not what i added to his .dlg. this is getting strange. i can't tell what is wrong. everything installs with out any error. but Grim will not start the conversation that I added.

Edited by Pex657, 19 June 2005 - 04:09 PM.


#55 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 08:36 PM

I have been messing with this the whole day and still no luck. I think I might just have to make a new npc to replace Grim, so i am not editing any original .dlg and maybe it might work.

#56 Pex657

Pex657
  • Member
  • 159 posts

Posted 19 June 2005 - 08:58 PM

I took out all his other dialogs and just left what i made.
BEGIN ARGRIM

IF ~NumTimesTalkedTo(0)~ FirstMeeting
SAY ~I am a very busy man, with lots of money to put towards investments, if you could let me do that, I would be very glad.~
IF ~~ THEN REPLY ~I think you should listen to us. We have a investment that you might be interested in. It would be worth your time, and money to listen.~ GOTO Listen
IF ~~ THEN REPLY ~We do not care how busy you are! We have a business proposal and we think you should listen.~ GOTO Listen
IF ~PartyGoldGT(101)~ THEN REPLY ~ We know that you like to invest in new investments. We will give you 100 gold pieces to listen to a proposal.~ GOTO Listengold
END
what happens in the game is it says he has nothing to say.

i have no idea why it is doing this.....

#57 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 21 June 2005 - 02:04 AM

all i did was just add code to the bottom. what would be a good way of fixing my problem. maye just take out all the weights??

View Post


So, you added this with an APPEND, did you <_< ?

APPEND ARGRIM
// All your new dialogue
END
// Your CHAIN here

And don't forget to do that to the original file, to see if it will work.
Don't use BLOKYR, use LOKYRJ.
Use "IsValidForPartyDialogue("Lokyr")" instead of your other checks.

what happens in the game is it says he has nothing to say.

Highly likely that you've spoken to him more than once.

Edited by Shed, 21 June 2005 - 02:53 AM.


#58 -Guest-

-Guest-
  • Guest

Posted 21 June 2005 - 09:31 AM

To test dialogue I often replace the triggers with "true()". Then see if your dialogue triggers.

The_Swordalizer

#59 Pex657

Pex657
  • Member
  • 159 posts

Posted 01 July 2005 - 09:07 AM

Once again, shed has saved the day. But for some strange reason, when one thing works, something else feels like giving up. The problem I am having now, is that when i give the files to some one else, it does not save the NPC's biography or his name....

#60 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 01 July 2005 - 09:21 AM

For all new strings (that's text), you must add it in the tp2 file.

Download Hubelpot. It's a great NPC (in it's own right, but also) for copying code.

COPY ~SC#Hub\Creatures\SC#Hub.cre~ ~override\SC#Hub.cre~
  SAY NAME1 ~Hubelpot~
  SAY NAME2 ~Hubelpot~
  SAY BIO ~When asked about his life, Hubelpot seems surprised by your interest. Cheerfully enough he relates tales of his life in the apparently cut-throat world of vegetable marketing, and regales you with stories of his wife Morag and their son, Hamlish, an apprentice baker. When pressed he speaks with a certain longing about his childhood in the tiny village of Dunny on the Woad, and his father, the Village Druid. ?The missus an? me,? Hubelpot tells you, ?We used te take the vegetables and such inte town fer market. She always loved the Promenade, an? so one day she talked old Enge inte leasin? us space. Thought we could be gentlefolk merchants.? Frowning slightly, Hubelpot insists that it?s time he got back to arranging your supplies.~

Edited by Shed, 01 July 2005 - 09:22 AM.