Jump to content


Photo

Wanna do it the easy way, but...


  • Please log in to reply
48 replies to this topic

#21 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 05 July 2007 - 12:09 PM

Moment... does that make it so that all the start up's of every dialogue with the PC should be at the front??

I have like the conversations running down, starting the first being triggered by script and the right one picked out because it is said so with a global. These all need to go up and than the rest under it?


Yes, I think this sums it up nicely, triggered by script have to go up. berelinde put it even more eloquently than me.

#22 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 13 July 2007 - 12:25 AM

Totally new question, as I don't want to start a new topic.

I am missing something in IESDP. How do you check the current reputation of the PC? I can only find increases, decreases and the setting of a a reputation to a number.

Is that GlobalGT("GLOBAL","Reputation",11), if you want it to be 12 or higher?



edit: english grammar mistake

Edited by Deathsangel, 13 July 2007 - 12:26 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#23 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 13 July 2007 - 12:36 AM

ReputationGT(Player1,11)

#24 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 13 July 2007 - 12:38 AM

ReputationGT(Player1,11)


As always you and Berlinde are great helps, thanks Kulyok

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#25 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 13 July 2007 - 01:49 AM

About the IESDP: things like ~ReputationGT(Player1,11)~ and ~InParty("MyNPC")~ are under "Triggers." Increasing and decreasing reputation, as well as setting it to a number are under "Actions." It is pretty confusing.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#26 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 13 July 2007 - 02:10 AM

Was for me for a while, too(because in my Russian mind, trigger is what you pull when you kill someone), but in the end I got it that
- Actions = stuff after DO in .d files, and after THEN in .baf files;
- Triggers = conditions

It went easier from there.

#27 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 13 July 2007 - 04:55 AM

Heh. It took me a year to figure out that the TRANS in INTERJECT_COPY_TRANS stood for "transition," not "across." Which made it very difficult for me to understand how interjections and trans actions worked.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#28 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 13 July 2007 - 04:58 AM

Another question to this works. I have a file called Bohunl.d. I code here for a lot of dialogue and I want the bioware NPC's to interject so I code this in example:

APPEND JAHEIRAJ
I_C_T BOHUNL HUNT_3 ReJahbohu
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
END

I_C_T BOHUNL HUNT_9 ReJahbohu2
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
END

I_C_T BOHUNL HUNT_10 ReJahbohu3
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
END
END

Here HUNT_10 are the names of the bits of text, so:

IF ~~ THEN BEGIN HUNT_10
SAY ~Well, I am here to bring her to justice. Better to say, I am here to claim her bounty. She is now worth quite a fortune and thus I will not let anyone stand in my way either.~
=
~We could resolve this of course without violence and quickly, if you would be willing to 'part' with her on a non-violent basis. I can even provide you with... let us say 3000 gold for the trouble. Call it a 'finders-fee' or whatever suits you, I do not care. What say you?~
  IF ~~ THEN REPLY ~I don't care enough for Ariena or for you to be even remotely interested. All I like is a good fight. So, shall we get on with it?~ GOTO HUNT_11
  IF ~~ THEN REPLY ~Do you really think I would sell such a good ally? I think not. Come and get her!~ GOTO HUNT_11
  IF ~CheckStatGT(Player1,CHR,12) Global("Arrecbohu2","GLOBAL",0)~ THEN REPLY ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu2
  IF ~CheckStatLT(Player1,CHR,13) Global("Arrecbohu3","GLOBAL",0)~ THEN REPLY ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu3
  IF ~~ THEN REPLY ~3000 gold? Sold!~ GOTO HUNT_6~
END

The point is I know I can put everywhere triggers to see if the NPC is there and then EXTERN and stuff. However, I want to save myself a headache in possible answer as Keldorn, Jaheira, Korgan, Yoshimo, Mazzy and Edwin react and I don't want six of those lines checking one by one if they are present for three blocks, thus making 18 answers with 18 EXTERN's. This goes quicker and easier, at least in my eyes with my knowledge, however, provided it works of course. Any info the two lovely ladies or somebody else has?

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#29 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 13 July 2007 - 05:24 AM

Somehow, I am not sure it is going to work, because of compilation order. But please, do check it out - it looks like an interesting experiment.

But for me, it is still too long. CHAIN would be much shorter:

CHAIN BOHUNL HUNT_10
~Well, I am here to bring her to justice. Better to say, I am here to claim her bounty. She is now worth quite a fortune and thus I will not let anyone stand in my way either.~
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words, <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
== BOHUNL ~We could resolve this, of course, without violence and quickly, if you would be willing to 'part' with her on a non-violent basis. I can even provide you with... let us say, 3000 gold for the trouble. Call it a 'finders-fee' or whatever suits you, I do not care. What say you?~
END
++ ~I don't care enough for Ariena or for you to be even remotely interested. All I like is a good fight. So, shall we get on with it?~ EXTERN BOHUNL HUNT_11
++ ~Do you really think I would sell such a good ally? I think not. Come and get her!~ EXTERN BOHUNL HUNT_11
+ ~CheckStatGT(Player1,CHR,12) Global("Arrecbohu2","GLOBAL",0)~ + ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu2
+ ~CheckStatLT(Player1,CHR,13) Global("Arrecbohu3","GLOBAL",0)~ + ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu3
+ ~~ THEN REPLY ~3000 gold? Sold!~ EXTERN BOHUNL HUNT_6

- or some such.

Edited by Kulyok, 13 July 2007 - 05:25 AM.


#30 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 13 July 2007 - 06:10 AM

Ah, of course that is not a bad idea with EXTERN from the dialogue and EXTERN from the CHAIN...

And test it... well, problem remains I have no laptop, so I can't. I am doing here a lot of questions trying to get as much things running for certain so I can get on to the next thing.
Thing if this code works is that I don't have to reform dialogues with all of the quests I am making later on, if I want to add an interjection somewhere, as instead I can add it just a bit of appending through this code, so it would be an interresting experiment.

Anyone up for trying to see if it works? ;)

edit: Can I not end with JaheiraJ actually?

Edited by Deathsangel, 13 July 2007 - 06:19 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#31 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 13 July 2007 - 06:27 AM

APPEND JAHEIRAJ
I_C_T BOHUNL HUNT_3 ReJahbohu
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
END
END

is not going to work correctly -

I_C_T s and I_C_T2 s work as direct Dfile commands on compilation. All you need is (in your TP2)

COMPILE ~myFile.d~

with the contents (assuming somewhere else you have the line BEGIN BOHUNL, if this is your added NPC)


I_C_T BOHUNL HUNT_3 ReJahbohu
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
END

As for the rest, I am not so sure... I would definitely say this is one of the reasons CHAIN exists.

It is not standard practice, but one of the other modders (I think at CoM, the old forums) had a great tutorial on how to (abuse) CHAIN to do this sort of thing. The technical claim is that you can build tremendously complex materials and be assured they work, tailored by condition. Kulyok has the base code posted - The basic idea can even be extended this way:


== NPC1 ~second time talked to only, adds line~ ~you again?~
== NPC1 ~not fighter, enough money~ ~reply1a~
== NPC1 ~not enough money~ ~reply1b~
== NPC1 ~fighter only, enough money but not enough intelligence~ ~reply1c~
== NPC2 ~second time talked to only, adds line~ ~you again?~
== NPC2 ~enough money~ ~reply2a~
== NPC2 ~not enough money~ ~reply2b~
== NPC2 ~fighter only, enough money but not enough intelligence~ ~reply2c~
{etc., etc.}
END
++ ~condition~ ~PC Reply~

The advantage is you can have all sorts of conditions come into play, and only write one simple run of dialogue. WeiDU then does all the hard work of sorting out what manual coding needs to take place, and does it for you. You will still end up with your 18 different end states, but they will all have been recreated (or not, if they can be tied back) by WeiDU instead of manually.

I would suggest working with this to provide more detailed tailoring of dialogue.

I also strongly suggest adding an "IsValidForPartyDialogue" variant of some type, or your dialogue will fail if Jaheira (for example) is in the party but dead :)

Edited by cmorgan, 13 July 2007 - 06:28 AM.


#32 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 13 July 2007 - 07:15 AM

For the Nth time - InParty() already checks for Dead() characters - it will only return true if Jaheira is in party and alive. For just in party, there is InPartyAllowDead().

#33 berelinde

berelinde

    Troublemaker

  • Modder
  • 4916 posts

Posted 13 July 2007 - 08:10 AM

Let's put aside the whole InParty() thing for a moment.

If I understand this correctly, you are attempting to add BioWare NPC interjections into mod-added dialogue.

Deathsangel, this is why CHAIN was invented. You're writing both the mod dialogue and the BioWare interjections, so why not merge them in one CHAIN?

CHAIN BEREJ UsingCHAIN
~I'm using CHAIN here to allow other NPCs to interject freely into my dialogue.~
== CMORGANJ IF ~InParty("cmorgan") See("cmorgan") !StateCheck("cmorgan",CD_STATE_NOTVALID)~ THEN ~Didn't there used to be a tutorial by Zyraen on the old CoM site about abusing CHAIN?~
== BEREJ IF ~InParty("cmorgan") See("cmorgan") !StateCheck("cmorgan",CD_STATE_NOTVALID)~ THEN ~Yes. I'll look it up when I get home.~
== MINSCJ IF ~InParty("Minsc") See("Minsc") !StateCheck("Minsc",CD_STATE_NOTVALID)~ THEN ~Boo remembers the very nice tutorial Theacefes wrote on CHAIN, too! It was at the new CoM forum.~
== BEREJ ~If there were anybody else around, anyone and everyone could interject at will, but you get the idea. I've got my own banter/CHAIN tutorial in the works, and will post it next week.~
EXIT


Edit: Oops, didn't see Kulyok posted something similar. That's what happens when you open a reply window hours before you actually finish typing into it.

Edited by berelinde, 13 July 2007 - 08:53 AM.

"Imagination is given to man to console him for what he is not; a sense of humor, for what he is." - Oscar Wilde

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum


#34 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 13 July 2007 - 08:38 AM

edit: Can I not end with JaheiraJ actually?


In CHAIN? No. You wish. :( That's why I have to write a closing line for a mod NPC every time Bioware ones have their say, both in Xan and in Romantic Encounters.

edit: if you want an explanation: END and PC replies are tied to the last state in the CHAIN. If they are tied to Jaheira's, and she is not in party, well... you get the idea.

(My advice would be taking chunks of Ghareth/Xan/Tiax code and replacing lines with your own dialogue - the fastest way to do it, because 1) this way you already have workable code, you only need to alter it; 2) soon enough, you'll no longer need it).

Edited by Kulyok, 13 July 2007 - 08:42 AM.


#35 cmorgan

cmorgan
  • Modder
  • 2301 posts

Posted 13 July 2007 - 01:32 PM

News to me on the InParty() STATE_DEAD equivalency - cool. The two most common current banter/interjection failures right now deal with an NPC being in party but not in the area, and legacy code calling for InParty() without a secondary check for availability. If this is the case, it sounds like See() replaces InMyArea well enough - but you still need the CD_STATE_NOTVALID to keep the rest of the "not valid" conditions from allowing the states to be followed. I still strongly suggest either IfValidForPartyDialogue/CD_STATE_NOTVALID/IsValidForPartyDialogue or another combination.

Personaly, I am sticking with

~InParty("dv") InMyArea("dv") !StateCheck("dv",CD_STATE_NOTVALID)~

, as I have had See() fail with Yoshimo standing in the prearranged Bhodi proposal cutscene.

And if you set the last state in the chain as

END
++ ~Reply1~
++ ~Reply2~
IF ~InParty("jaheira") InMyArea("jaheira") !StateCheck("jaheira",CD_STATE_NOTVALID)~ THEN EXTERN JAHEIJ MyNewStateName

, won't that work the same way a standard EXTEND_BOTTOM does, leaving the attached states instanlty escaped to if Jaheira is in the party?

Edited by cmorgan, 13 July 2007 - 01:35 PM.


#36 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 13 July 2007 - 10:32 PM

That will work, yes - though it's not the last _state_, it is the list of _transitions_. Look at Xan's joining dialogue - he does something like this there(if PC is an elven female, the transition gets you to the memory choice, otherwise you just get replies).

#37 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 14 July 2007 - 01:46 AM

Sorry, but the last bit of discussion confused me. What I meant with Jaheira at the end was this:

CHAIN BOHUNL HUNT_10
~Well, I am here to bring her to justice. Better to say, I am here to claim her bounty. She is now worth quite a fortune and thus I will not let anyone stand in my way either.~
=
~We could resolve this, of course, without violence and quickly, if you would be willing to 'part' with her on a non-violent basis. I can even provide you with... let us say, 3000 gold for the trouble. Call it a 'finders-fee' or whatever suits you, I do not care. What say you?~
== JAHEIRAJ IF ~InParty("Jaheira") See("Jaheira")~ THEN ~Watch your words, <CHARNAME>. Though I am not fond of Ariena, a life surely hangs in the balance here.~
END
++ ~I don't care enough for Ariena or for you to be even remotely interested. All I like is a good fight. So, shall we get on with it?~ EXTERN BOHUNL HUNT_11
++ ~Do you really think I would sell such a good ally? I think not. Come and get her!~ EXTERN BOHUNL HUNT_11
+ ~CheckStatGT(Player1,CHR,12) Global("Arrecbohu2","GLOBAL",0)~ + ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu2
+ ~CheckStatLT(Player1,CHR,13) Global("Arrecbohu3","GLOBAL",0)~ + ~Can we negotiate about the price?~ EXTERN ARIENAJ ReaBohu3
+ ~~ THEN REPLY ~3000 gold? Sold!~ EXTERN BOHUNL HUNT_6

Does this fail Kulyok or not? As said in the MftW forums, which I totally understand you don't check out when discussing here, I can't download stuff. I have no laptop of my own anymore and working on company computer with strict rules... sorry. That is why I need to ask so much as of late.

@Cmorgan
As said in the start post of this little discussion. I have a Bohunl.d file with there the BEGIN of course.
However, do you mean I need to have a seperate file if I want to do it this way? Does this name to be like the one associated with the NPC.
I am using like you suggest in your last post actually for the NPC self, guess I move that up to the chain as well, as I know she must be in the party, for this dialogue is coupled to a NPC specific in party encounter.

@All
The reason why I am less into the CHAIN thing is explained above. I am writing a lot now and probably decide later where to interject everything, or else I'll go mad trying to figure out how the normal dialogue runs... This is why I want to see if there is an "Add-on" system for interjections. Not incoperating it directly. Also if this doesn't work like Kulyok says, it means I have to make up extra lines. Those extra lines tend to be weak, as they are just 'need to end the chain with the correct person lines'.

Edited by Deathsangel, 14 July 2007 - 01:48 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#38 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 14 July 2007 - 02:05 AM

Yes, it will fail. You will have to write one more line starting with == BOHUNL after Jaheira's line.

#39 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 14 July 2007 - 02:54 AM

Thanks. will chain things now, but is it understandable why I am searching for another way?

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#40 Kulyok

Kulyok
  • Modder
  • 2450 posts

Posted 14 July 2007 - 03:00 AM

It is clear to me, though I disagree, myself. I think PC should answer the person who asks the question: that is, the last line should be your quest character's, not Jaheira's.

Many BG1 NPC Project interjections, however, look just like the way you're describing(except that they interject into *existing game material*, so they use simple I_C_T, not CHAINs), so, yes, you're not alone.