Jump to content


Photo

Druid Grove


  • Please log in to reply
17 replies to this topic

#1 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 14 June 2005 - 12:56 PM

How do you code it to make Faldorn recognize a druid so they can channenge her? Need a few hints/helps/blatant how to posts, etc... on this. Perferably keeping it compatable with the multi-stronghold component, as well as how to install it with weidu as an optional component.

- The transitioned former modder once known as MTS.


#2 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 14 June 2005 - 03:49 PM

I'm not sure what you are asking here, Faldorn does let you challenge her if you are a druid. Check out her dialog. Umm... CEFALDOR.dlg.

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


#3 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 14 June 2005 - 04:15 PM

Wow, my post was about clear as mud. Sorry about that everyone.

What I am asking is how do you add another NPC to her dialogue so she will accept challenges from them?

Edited by MajorTomSawyer, 14 June 2005 - 04:20 PM.

- The transitioned former modder once known as MTS.


#4 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 14 June 2005 - 06:36 PM

Here's the original state from the dialog with the text extracted:
IF ~~ THEN BEGIN 2 
  SAY ~I am stronger than ever with the aid of this grove. No harm can come to me here. Such bonding is frowned upon as it drains from the earth, but the mother feeds me that I might fight for her!~ [CEFALD07] /* #9616 */
  IF ~!Class(Player1,DRUID_ALL)
InParty("Cernd")
!Dead("Cernd")
!StateCheck("Cernd",STATE_SLEEPING)
//See("Cernd")
~ THEN REPLY ~The rituals of ascension still rule here. Cernd will challenge you for leadership. ~ /* #9619 */ EXTERN ~CERNDJ~ 69
  IF ~!Class(Player1,DRUID_ALL)
InParty("Jaheira")
!Dead("Jaheira")
!StateCheck("Jaheira",STATE_SLEEPING)
//See("Jaheira")
~ THEN REPLY ~The rituals still govern this place! As a druid it is Jaheira's right to challenge you!~ /* #9620 */ EXTERN ~JAHEIRAJ~ 94
  IF ~Class(Player1,DRUID_ALL)
See(PLAYER1)
!StateCheck(PLAYER1,STATE_SLEEPING)
~ THEN REPLY ~The rituals of ascension still stand! I challenge you for leadership! Such is my right!~ /* #9621 */ GOTO 13
  IF ~!Class(Player1,DRUID_ALL)
See(PLAYER1)
!StateCheck(PLAYER1,STATE_SLEEPING)
~ THEN REPLY ~I will fight you, I will fight all of you!~ /* #9622 */ GOTO 3
  IF ~Global("CerndFightObserve","GLOBAL",0)~ THEN REPLY ~Perhaps we could make a deal? A bargain for the lives of those in Trademeet?~ /* #9623 */ GOTO 5
  IF ~Class(Player2,DRUID_ALL)
!Name("Jaheira",Player2)
!Name("Cernd",Player2)
//!Dead(PLAYER2)
See(PLAYER2)
!StateCheck(PLAYER2,STATE_SLEEPING)
~ THEN REPLY ~There is another with us that could challenge you according to the old rituals. A druid called <PLAYER2>.~ /* #9948 */ GOTO 22
  IF ~Class(Player3,DRUID_ALL)
!Name("Jaheira",Player3)
!Name("Cernd",Player3)
//!Dead(PLAYER3)
See(PLAYER3)
!StateCheck(PLAYER3,STATE_SLEEPING)
~ THEN REPLY ~There is another with us that could challenge you according to the old rituals. A druid called <PLAYER3>.~ /* #9952 */ GOTO 23
  IF ~Class(Player4,DRUID_ALL)
!Name("Jaheira",Player4)
!Name("Cernd",Player4)
//!Dead(PLAYER4)
See(PLAYER4)
!StateCheck(PLAYER4,STATE_SLEEPING)
~ THEN REPLY ~There is another with us that could challenge you according to the old rituals. A druid called <PLAYER4>.~ /* #9953 */ GOTO 24
  IF ~Class(Player5,DRUID_ALL)
!Name("Jaheira",Player5)
!Name("Cernd",Player5)
//!Dead(PLAYER5)
See(PLAYER5)
!StateCheck(PLAYER5,STATE_SLEEPING)
~ THEN REPLY ~There is another with us that could challenge you according to the old rituals. A druid called <PLAYER5>.~ /* #9954 */ GOTO 25
  IF ~Class(Player6,DRUID_ALL)
!Name("Jaheira",Player6)
!Name("Cernd",Player6)
//!Dead(PLAYER6)
See(PLAYER6)
!StateCheck(PLAYER6,STATE_SLEEPING)
~ THEN REPLY ~There is another with us that could challenge you according to the old rituals. A druid called <PLAYER6>.~ /* #9955 */ GOTO 26
  IF ~!Class(Player1,DRUID_ALL)
!InParty("Cernd")
!Dead("Cernd")
!StateCheck("Cernd",STATE_SLEEPING)
See("Cernd")
~ THEN REPLY ~The rituals of ascension still rule here. Cernd will challenge you for leadership.~ /* #38457 */ EXTERN ~CERND~ 60
END

If you read each transition, you can see the criteria. It is read from bottom to top by the engine. To add to this, you'd need to compile a new .d file. In the .d file you'll need some code such as:

EXTEND_BOTTOM CEFALDOR 2

  IF ~!Class(Player1,DRUID_ALL)
InParty("MyNPC")
!Dead("MyNPC")
!StateCheck("MyNPC",STATE_SLEEPING)
//See("MyNPC")
~ THEN REPLY ~The rituals of ascension still rule here. MyNPC will challenge you for leadership. ~ EXTERN ~MyNPCJ~ ChallRply //To whatever state you've named it in the dialog file of the NPC. 
END

Compile this at the same time as your MyNPCJ.d file to get a good linkage between the dialogs. If you want to link to an already existing state in a NPC dialog, just reference that state. If you need more, give a shout. ;)

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


#5 AnnabelleRose

AnnabelleRose

    The great pretender... of modding!

  • Modder
  • 2083 posts

Posted 14 June 2005 - 07:36 PM

Ok, this actually looks doable for me. Now how would I use weidu to append (rather then replace) this to the regular game?

- The transitioned former modder once known as MTS.


#6 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 14 June 2005 - 07:46 PM

Ok, this actually looks doable for me. Now how would I use weidu to append (rather then replace) this to the regular game?

View Post


That's what the EXTEND_BOTTOM is for in the lower code I gave you. ;)

Edit: If you want to provide details, and get some specific code back on it without giving spoilers to everyone, feel free to PM me. ;)

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


#7 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 05 March 2012 - 11:08 PM

Reviving an old thread...

This is really great for adding a specific NPC, but how do you keep them from being added *twice,* since the dialog offering Players 2-6 only checks to make sure they're not Jaheira or Cernd? As far as I can tell from this, the new druid line would fire--but so would the PLAYERX line, leaving the player unsure which was the "real" offering that would lead to the new NPC responding.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#8 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9202 posts

Posted 05 March 2012 - 11:15 PM

You have to add !Name("Hubelpot") to each of those options.

#9 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 05 March 2012 - 11:24 PM

Aand--I'm not sure how to do that! I mean, sure, I could retype them with !Name("Hubelpot"), but that wouldn't overwrite the originals, would it?

*Clearly missing something

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#10 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9202 posts

Posted 06 March 2012 - 12:42 AM

ADD_TRANS_TRIGGER might do the trick :)

#11 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 06 March 2012 - 04:04 PM

Aaand... I'm not sure where to add it,.

ADD_TRANS_TRIGGER CEFALDOR 2
~!Name("Hubelpot",Player2)~

Is too vague

And ADD_TRANS_TRIGGER CEFALDOR 2 5
~!Name("Hubelpot",Player2)~

Is not allowed.

As far as I can tell, once the fight cutscene is activated (and that can be a near-clone of the existing scenes) all subsequent scenes can be handled by the existing code, without further revision/addition. Correct?

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#12 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9202 posts

Posted 06 March 2012 - 04:32 PM

I'm not sure where you're getting the 5 from, but--looking at the WeiDU doc:

ADD_TRANS_TRIGGER: fileenamestateNumber transTriggerString [moreStateNumbers list ] [ DO transNumber list ] dActionWhen list

The transitions we want are in CEFALDOR state 2, and the relevant transitions are 7->11. So, it should be:

ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player2)~ DO 7
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player3)~ DO 8
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player4)~ DO 9
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player5)~ DO 10
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player6)~ DO 11

:)

#13 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 06 March 2012 - 04:45 PM

Many thanks.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#14 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 07 March 2012 - 02:28 AM

ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player2)~ DO 7
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player3)~ DO 8
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player4)~ DO 9
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player5)~ DO 10
ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player6)~ DO 11

You can write them as a single D action: ADD_TRANS_TRIGGER CEFALDOR 2 ~!Name("Hubelpot",Player2)~ DO 7 8 9 10 11
Also note that transitions are counted from 0 in this case, so maybe you want 6, 7, 8, 9 and 10 instead.

#15 Bookwyrme

Bookwyrme
  • Modder
  • 5804 posts

Posted 07 March 2012 - 10:06 AM

11 did get me an "out of bounds!" warning & a stopped install. 5-9 looks right on the decompiled dlg. I haven't tested it yet, though.

Mods: <a data-cke-saved-href="http://www.shsforums...-auroras-shoes/">Aurora's Shoes (released),

 


 

 


#16 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9202 posts

Posted 07 March 2012 - 01:33 PM

Wisp: She could, but then it wouldn't work properly; the dialogue needs !Player2 -> !Player6, not all !Player2 :)

Bookwyrme: Yep, you're right -- it's 5 through 9!

#17 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 07 March 2012 - 02:12 PM

Wisp: She could, but then it wouldn't work properly; the dialogue needs !Player2 -> !Player6, not all !Player2 :)

Well, don't I look stupid. Carry on.

#18 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9202 posts

Posted 07 March 2012 - 02:47 PM

I did the same thing initially, then stealthily edited my post when I tested it, heh :-D