Author Topic: Another question, if you please  (Read 2022 times)

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Another question, if you please
« on: June 24, 2004, 05:46:41 PM »
I want to code in a transition inthe dialogue file for Wallace the gnome in Trademeet.  Since I'm new at this I've essentially been trying to use Append statements with the triggers.

I wondering if some of the Weidu commands I haven't tried yet would accomplish what I want more efficiently.  What I want to do is transition to a new state in his dialogue file (Wall1) state 7 to give my npc's choices.  This parses perfectly in Weidu but I want it to happen sooner than by chance.

// Wallace in TradeMeet
APPEND WALL1
IF WEIGHT #-10 ~InParty("MyNPC")
See("MyNPC") !Dead("MyNPC")
!StateCheck("MyNPC"",STATE_SLEEPING)
Global("geniesgone","GLOBAL",1)
Global("Wallace","GLOBAL",1)~ THEN GetPoison
SAY @520 = @521
IF ~~ DO ~SetGlobal("Wallace","GLOBAL",2)~ EXTERN MyNPC GetPoison2
END
END

CHAIN MyNPC GetPoison2
@522
== Wall1 @523 = @524 DO ~GiveItemCreate("MISCA2","D#Silver",0,0,0)~
== MyNPC @525
== Wall1 @526
EXIT

I know I've seen in action.ids for such an occasion but I don't understand them.

Thanks.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Another question, if you please
« Reply #1 on: June 24, 2004, 06:02:37 PM »
You're using the word "transition", which means going somewhere from an existing line of dialogue. If that's the case, where (what state in WALL1) are you transitioning FROM?

In that case, you would use an INTERJECT command.

However, if you want this to be a stand-alone dialogue for WALL1--that is, a dialogue that would OPEN with line @520 when you click-talked WALL1 with your conditions in place, then this is basically correct. The one extra note is that you can do the entire thing in a CHAIN:

CHAIN IF WEIGHT #-1
~InParty("MyNPC")
See("MyNPC") !Dead("MyNPC")
!StateCheck("MyNPC",STATE_SLEEPING)
Global("geniesgone","GLOBAL",1)
Global("Wallace","GLOBAL",1)~ THEN WALL1 GetPoison
@520 = @521 DO ~SetGlobal("Wallace","GLOBAL",2)~
== MYNPC @522
== Wall1 @523 = @524 DO ~GiveItemCreate("MISCA2","D#Silver",0,0,0)~
== MyNPC @525
== Wall1 @526
EXIT

Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another question, if you please
« Reply #2 on: June 25, 2004, 08:00:00 AM »
Quote
However, if you want this to be a stand-alone dialogue for WALL1--that is, a dialogue that would OPEN with line @520 when you click-talked WALL1 with your conditions in place, then this is basically correct. The one extra note is that you can do the entire thing in a CHAIN:

Thank you, this is much more elegant coding and I did want it to work as a click-talk.  I'm assuming that this still will have to be part of an APPEND block as Wallace starts the dialogue. Will try it out with your suggestions when I get home.
 ;)

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Another question, if you please
« Reply #3 on: June 25, 2004, 08:51:23 AM »
Thank you, this is much more elegant coding and I did want it to work as a click-talk.  I'm assuming that this still will have to be part of an APPEND block as Wallace starts the dialogue. Will try it out with your suggestions when I get home.

No, the use of CHAIN eliminates the need for an APPEND statement. What I've shown you is all you need.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another question, if you please
« Reply #4 on: June 25, 2004, 09:46:50 AM »
I'll take your word for it as you're a master at this stuff but I'm surprised it will work with Wallace initiating the dialogue in the chain as this code sequence is called from MyNPCJ.D file and not the Wall1.d.  I always thought the first dialogue line in a Chain had to belong to the creature in whose file the commands are being run.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Another question, if you please
« Reply #5 on: June 25, 2004, 10:48:55 AM »
I'll take your word for it as you're a master at this stuff but I'm surprised it will work with Wallace initiating the dialogue in the chain as this code sequence is called from MyNPCJ.D file and not the Wall1.d.  I always thought the first dialogue line in a Chain had to belong to the creature in whose file the commands are being run.

Nope.

CHAIN is sort of its own little entity. Since you define who the first speaker is (CHAIN DLGNAME statelabel), it doesn't matter where it appears. So you can put it anywhere, as long as all of the DLGs you reference already exist (that is, either exist in-game, or have previously been created by BEGIN DLGNAME statements.)

Also, a CHAIN implicitly ends a BEGIN DLGNAME.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another question, if you please
« Reply #6 on: June 25, 2004, 10:53:36 AM »
Quote
CHAIN is sort of its own little entity. Since you define who the first speaker is (CHAIN DLGNAME statelabel)

Thanks again - you've made things much easier.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Another question, if you please
« Reply #7 on: June 25, 2004, 10:59:41 AM »
No problem.

This is a good case, though, where you should let existing work be your guide. Banter Packs (one big CHAINfest) consist of just two .d files, one for SOA and one for TOB, despite the fact that various people start the conversations.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another question, if you please
« Reply #8 on: June 25, 2004, 11:11:22 AM »
I'll take another look at them.  Like most people, I was using Blue's "Road to Banter" tutorial as my guide.

Offline Diana

  • Neophyte
  • Planewalker
  • *****
  • Posts: 251
  • Gender: Female
Re: Another question, if you please
« Reply #9 on: June 30, 2004, 07:15:16 PM »
*Doing happy dance*
Thank you**2!
That advice has helped me think outside the "box" with other things.  It's given me more ideas how to link my banters to current ingame Bioware events with the EXTEND_BOTTOM command and, wonder of wonders, it worked!

 ;D

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Another question, if you please
« Reply #10 on: June 30, 2004, 07:32:42 PM »
Modding does, on rare occasions, actually work. :)
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: