The Black Wyrm's Lair - Forums

Mod development resources & discussion => Modder's Workshop => Topic started by: Sir_Carnifex on April 19, 2008, 12:04:43 AM

Title: Dialogue File/WeiDU compilation problems
Post by: Sir_Carnifex on April 19, 2008, 12:04:43 AM
Alright, here's my problem:

I have written out the dialogue file for an NPC following the instructions of a tutorial.  Everything (to me anyway) looks like it's in place, but WeiDU keeps stopping the install when it runs into commands such as "DO" and "EXIT".  If I remove the first one, it will get a little further and stop at the next.  I have no idea why this happens (as I'm a total newbie to this).  I'd post my code into a PM for someone who wants to see it (and help, not just see it!!!)

Thanks,
Carnifex

Title: Dialogue File/WeiDU compilation problems
Post by: Valiant on April 19, 2008, 06:55:12 AM
Post a file here. Somebody will take a look on it I´m sure...
Title: Dialogue File/WeiDU compilation problems
Post by: Sir_Carnifex on April 19, 2008, 06:39:12 PM
Very well.  I shall post the code here with all text replaced with generic sentences!  :D

BEGIN CXHalbo

IF ~NumTimesTalkedTo(0)~ THEN BEGIN 1
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO 2
IF ~~ THEN REPLY ~Insert text here.~ GOTO 3
IF ~~ THEN REPLY ~Insert text here.~ GOTO 4
IF ~~ THEN REPLY ~Insert text here.~ DO ~EscapeArea()~ EXIT
END

IF ~~ THEN BEGIN 2
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO 5
IF ~~ THEN REPLY ~Insert text here.~ GOTO 6
IF ~~ THEN REPLY ~Insert text here.~ GOTO 4
IF ~~ THEN REPLY ~Insert text here.~ GOTO 8
IF ~~ THEN REPLY ~Insert text here.~ GOTO 6
END

IF ~~ THEN BEGIN 3
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO 2
END

IF ~~ THEN BEGIN 4
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO 6
IF ~~ THEN REPLY ~Insert text here.~ GOTO 8
END

IF ~~ THEN BEGIN 5
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO 6
IF ~~ THEN REPLY ~Insert text here.~ GOTO 4
END

IF ~~ THEN BEGIN 6
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO 7
IF ~~ THEN REPLY ~Insert text here.~ GOTO 7
IF ~~ THEN REPLY ~Insert text here.~ GOTO 8
END

IF ~~ THEN BEGIN 7
SAY ~Insert text here.~ DO ~SetGlobal("HalboJoined","LOCALS",1) JoinParty()~ EXIT
END

IF ~~ THEN BEGIN 8
SAY ~Insert text here.~ EXIT
END

IF ~NumTimesTalkedToGT(0)~ THEN BEGIN ExtraMeeting
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ DO ~SetGlobal("HalboJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Insert text here.~ EXIT
END


BEGIN CXHalboP

IF ~Global("HalboJoined","LOCALS",1)~ THEN BEGIN LeaveGroup
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~Insert text here.~ EXIT
END

IF ~Global("HalboJoined","LOCALS",0)~ THEN BEGIN ComeBack
SAY ~Insert text here.~
IF ~~ THEN REPLY ~Insert text here.~ GOTO Comeback2
IF ~~ THEN REPLY ~Insert text here.~ EXIT
END

IF ~~ THEN BEGIN Comeback2
SAY ~Insert text here.~ DO ~SetGlobal("HalboJoined","LOCALS",1)
JoinParty()~ EXIT
END


For some reason WieDU says something is wrong with the 2nd "DO" (line 45 or something).  When I remove that, it's then the "EXIT" following it, and so on.

Thanks in advance for any help.
Title: Dialogue File/WeiDU compilation problems
Post by: Razfallow on April 19, 2008, 07:13:51 PM
EXIT and DO actions can not be used within the SAY line.

IF ~~ THEN BEGIN 7
SAY ~Insert text here.~
IF ~~ THEN DO ~SetGlobal("HalboJoined","LOCALS",1) JoinParty()~ EXIT
END

IF ~~ THEN BEGIN 8
SAY ~Insert text here.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN Comeback2
SAY ~Insert text here.~
IF ~~ THEN DO ~SetGlobal("HalboJoined","LOCALS",1)JoinParty()~ EXIT
END
Title: Dialogue File/WeiDU compilation problems
Post by: Sir_Carnifex on April 19, 2008, 07:56:00 PM
Thanks a lot for the help.  WeiDU compiled it successfully, so now I can spend countless hours play-testing. :)

I'm sure I'll be back with lots more questions.

Carnifex
Title: Dialogue File/WeiDU compilation problems
Post by: Sir_Carnifex on April 20, 2008, 12:12:51 AM
Well, I predicted having more problems.  Here's the next one.

My character works perfectly when I create him using the CLUA console, but I can't get him to appear in the section he is supposed to be in.  For testing purposes, I just copied the area script file provided by a tutorial (Ghreyfain's, I believe) and changed the names.  Supposedly he should appear somewhere in the government district, but he doesn't.

So far I have not tried to enter the district in a normal manner.  I just teleported straight from Chateau Irenicus to the government.   Does the cut-scene upon leaving the dungeon somehow activate scripts elsewhere, or do I just have something typed incorrectly?

IF
Global("CXHalboExists","AR01000",0)
THEN
RESPONSE #100
SetGlobal("CXHalboExists","AR1000",1)
CreateCreature("CXHalbo",[1137.2046],3)
END


Also, could someone explain how the coordinates work?  I've looked at the minimap in Infinity Explorer and the X/Y coordinates will not go as far as 1137 or 2046.  

Thanks,
Carnifex
Title: Dialogue File/WeiDU compilation problems
Post by: Razfallow on April 20, 2008, 08:39:17 AM
Have you checked that area script in game? Make sure that your block is definetely there.

Also your NPC won't show up on coordinates you have in the script, as it aims on impassable surface. But don't worry the game will create him on nearest passable surface.

Coordinates - top left corner is origin of coordinates. X-axis goes to the right and Y-axis goes down ([x.y]). And minimaps are smaller than actual area.

You can determine coordinates:
1) in game - go to the desired location and press x, it will show the coordinates of your cursor in dialog window
2) use DLTCEP

Title: Dialogue File/WeiDU compilation problems
Post by: Sikret on April 20, 2008, 09:05:17 AM
Quote from: Sir_Carnifex on April 20, 2008, 12:12:51 AMIF
Global("CXHalboExists","AR01000",0)
THEN
RESPONSE #100
SetGlobal("CXHalboExists","AR1000",1)
CreateCreature("CXHalbo",[1137.2046],3)
END

Fix the typo. The area codes don't match with each other. There is an extra "0" in the code in the trigger line, which you should remove.

Have you extended the bottom of AR1000.bcs properly in your tp2?
Title: Dialogue File/WeiDU compilation problems
Post by: Valiant on April 20, 2008, 11:31:58 AM
Extending the top of the file and use the Continue() command within the block is also an option...
Title: Dialogue File/WeiDU compilation problems
Post by: Sir_Carnifex on April 20, 2008, 08:31:27 PM
Thanks for all the help!  The NPC is now showing up.  If I remember correctly, those coordinates I had before had him falling off a cliff!  :o

I can't believe I missed that typo.  Looks like I'll need proof-readers in the future!  :lol:

Until the next question...

Carnifex

P.S. I used Extend_Top as that's what the tutorial directed.