Jump to content

Why Won't my Summoned Cow talk to me?


Recommended Posts

I'll preface this by stating I am a rank amateur at scriptwriting/programming.  I have been making little item mods and such for my own use however for a long time.

Anyway, I've been working on a silly mod that adds a summon spirit animal innate to the game.  I basically took the innate form of animate dead, and made some tweaks so that it summons a cow instead.  I want this cow to be interactable through dialog, however whenever I try to talk to it the very simple .dlg file I wrote does not fire, even if I use the force talk command in game.  I've tried a few things but I haven't been able to figure out why the dialog won't fire:

 

BEGIN ~DBCOW~


IF ~~ THEN BEGIN 0 
SAY ~Moooooo!~
IF ~~ THEN REPLY #14 /*~Scratch behind Bess' ears.~*/ DO ~SetGlobalRandom("CowTalk","GLOBAL",1,10)~ GOTO 1
IF ~GlobalLT("MilkNumber","GLOBAL",3)~ THEN REPLY ~Attempt to Milk Bess.~ GOTO 1
IF ~Global("MilkNumber","GLOBAL",3)~ THEN REPLY ~Attempt to Milk Bess.~ GOTO 2
IF ~~ THEN REPLY ~Do nothing.~ EXIT
END

IF ~~ THEN BEGIN 1
SAY ~Bess appears relieved.~ 
IF ~~ THEN DO ~GiveItemCreate("dbmilk1",LastTalkedToBy,0,0,0) SetGlobalRandom("MilkNumber","GLOBAL",1,3)~ GOTO 0
END

IF ~~ THEN BEGIN 2
SAY ~Bess appears to be tired~
IF ~~ THEN GOTO 0
END


The .cre for the cow definitely points to this dialog file.  Any ideas?  For the cow .cre itself I copied a random cow that I found in the games files, renamed it and made an .eff that points to it.  I then chose the .dlg I compiled from above for the cow's dialog script. 

NOTE:  I am not looking for advice on general improvements.  I know about cdstatenotinvalid and such.  I just want this dialog script to run so I can make many hundreds of additions improvements to it over a period of time.  it does not fire at all in its current state which is the entirety of what I am asking about.

Link to comment
41 minutes ago, dbianco87 said:

IF ~~ THEN BEGIN 0 
SAY ~Moooooo!~

A dialogue state needs a true trigger if it is supposed to start a dialogue with it. If you change this to

IF ~True()~ THEN BEGIN 0 
SAY ~Moooooo!~

You should be able to start the dialogue by talking to the cow then.

Some cre files do not support dialogues, though. I had problems to make an invisible helper cre talk at some point. (I ended up using a cow for testing to make sure the "invisible" cre was there at all and that worked, so I guess cows can talk. 🙂 )

Link to comment
4 hours ago, jastey said:

A dialogue state needs a true trigger if it is supposed to start a dialogue with it. If you change this to

IF ~True()~ THEN BEGIN 0 
SAY ~Moooooo!~

You should be able to start the dialogue by talking to the cow then.

Some cre files do not support dialogues, though. I had problems to make an invisible helper cre talk at some point. (I ended up using a cow for testing to make sure the "invisible" cre was there at all and that worked, so I guess cows can talk. 🙂 )

eureka!  For some reason I thought ~~ and ~true()~ would be functionally identical.   That is apparently not the case! Cheers.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...