Help Wanted - Conversations

For toolset tutorials as well as question and answers.
Locked
User avatar
Curmudgeon
Gadfly
Posts: 4312
Joined: Thu Oct 07, 2004 12:07 am
Location: East coast US

Help Wanted - Conversations

Post by Curmudgeon »

Can anyone suggest a good tutorial or guide to writing conversations for static quests? Damned things look like a plate of spaghetti to me...
- Curmudgeon
HDM ALFA 03 - The Silver Marches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Maxim #12: A soft answer turneth away wrath. Once wrath is looking the other way, shoot it in the head." - The Seventy Maxims of Maximally Effective Mercenaries

"This is not my circus. These are not my monkeys."

Realmslore: Daily Dwarf Common
User avatar
Mick
Beholder
Posts: 1946
Joined: Mon May 30, 2005 2:19 am
Location: Why do you want to know?

Re: Help Wanted - Conversations

Post by Mick »

Not sure about a tutorial, but I enjoy coming up with convos. If you need some done, I can help out.
Talk less. Listen more.

Current PCs: ?
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: Help Wanted - Conversations

Post by Zelknolf »

Is this generally "How do I hook scripted events into conversations?", a more-narrow "How do I make this confounded ACR Quest system behave?" or a little of both?
User avatar
Curmudgeon
Gadfly
Posts: 4312
Joined: Thu Oct 07, 2004 12:07 am
Location: East coast US

Re: Help Wanted - Conversations

Post by Curmudgeon »

A bit of both, and a bit of head-scratching over "now how does this damned Conversation Editor work? How do I follow the way the branches are supposed to flow?"

I should go dig out my chatlogs of the seminar session Wynna gave on this...

But yes, how do I call the right acr scripts?
- Curmudgeon
HDM ALFA 03 - The Silver Marches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Maxim #12: A soft answer turneth away wrath. Once wrath is looking the other way, shoot it in the head." - The Seventy Maxims of Maximally Effective Mercenaries

"This is not my circus. These are not my monkeys."

Realmslore: Daily Dwarf Common
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: Help Wanted - Conversations

Post by Zelknolf »

Righto-- this one should get you the basics:
http://nwvault.ign.com/View.php?view=nw ... tail&id=28

And that gets us far enough for me to point at the "Conditions" and "Actions" tabs inside of any given node in a conversation (click on the conversation line then look to the bottom half of the conversation editor). Conditions are the ones that determine the path of the conversation-- For lines spoken by an NPC, the engine will pick the first conversation option which the Conditions tab returns TRUE for; if there is nothing there, that one is always TRUE. For lines available for PCs to speak, all statements which return TRUE are visible and selectable, and statements which return FALSE are invisible/unselectable.

The green space inside of the conditions tab is where all of the scripts that you want to run go, and the buttons beside them determine how you want them to be treated compared to one another-- as "and" (the whole node is TRUE only if both scripts return TRUE) or "or" (the whole node is TRUE if either script returns TRUE)-- and that's your first step in setting up a conditional. Figuring out what you want to check and which ones have to be so to make the line make sense.

For example, if we had a conversation like so:
- Root
+ Howdy!
+ Your mother has an increased risk of heart disease and diabetes on account of her weight problem.

And in the conditions tab of "Howdy!" we have:
gc_is_female
AND gc_align_good
(gc_*.nss being the conditional scripts that Bioware/Obsidian gives us; they're always available for playing around)

Then only good-aligned women get a proper southern greeting, while all men and all non-good characters get a crude comment about maternal gravity-- and if that AND was an OR, we'd instead have someone who is polite to all of the women and the good guys, but has harsh words for non-good men.

Some of those scripts have parameters in them, as well, which are put in on the lines with the conditionals on that screen. For example, the entry point for:
gc_distance

is:
int StartingConditional(string sTagA, string sTagB, string sCheck)

In this case, you pick a script, and then press refresh. You then get three fields (on account of the three parameters) to put in the things that you want the script to check. If the person responsible for that script is sufficiently-considerate, those parameters will be easy to read: things like "int nDamageToDeal" (int is a whole number; float is a number with a decimal, string is anything you can type) -- though sometimes you'll get stuck with "string a" (which you should write tickets against; we ought to be better than that). And the values of those go into the script as like-named variables (to be handled the way NWScript handles things). This is how most of the ACR Quest scripts work, being written with the intent of being reused against many quests with different parameters (which the ACR Quest page covers, but assumes in it that you have knowledge like this).

In this fairly-simple example, you'd give it two tags, which refer to two objects, and a distance. The script checks the distance between the first objects it fings with sTagA and sTagB as tags, figures out how far apart they are, and then determines the result by how they compare-- but that whole (slightly-more-complex) thing evaluates to just TRUE or just FALSE, so it can be added up with the others (if there are any) like gc_is_female and gc_align_good do above. e.g. if we replace gc_is_female with gc_distance("goblin_a", "goblin_b", 5.0f), and we're still evaluating with an AND, then our speaker is only polite to good guys, and then only if goblins A and B are sufficiently-friendly with one another.


There is also an actions tab, which is simpler-- it just calls all of the scripts on the list, in order, whenever that conversation node is used. They don't return anything and don't determine the flow of the conversation, unless they set something that a conditional script (above) checks later. Those are just like calling events on placeables or areas-- just in a conversation, and you're allowed to have more than one if you want. If they have parameters (most of the ACR Quest ones do), you can get access to them with the refresh button.
Dorn
Haste Bear
Posts: 2196
Joined: Sat Apr 17, 2004 5:00 pm
Location: Australia (West - GMT+8)

Re: Help Wanted - Conversations

Post by Dorn »

Zelknolf wrote:Righto-- the basics
Great!! (reads on) :D

yes :)
..ok :?
....ah.. :|
.....well.. :(
.........but the.... :cry:
what colour string do you need and can it be purchased from any hardware store?
*presses the refresh button on his internet page to no avail*

;) (j/k, thanks zelk)
playing Nathaniel Ward - Paladin of the Morninglord and devout of Torm (cookie cutter and proud of it)
User avatar
Curmudgeon
Gadfly
Posts: 4312
Joined: Thu Oct 07, 2004 12:07 am
Location: East coast US

Re: Help Wanted - Conversations

Post by Curmudgeon »

Zel:

Thanks for the help so far.

I know I'm going to seem a total noob asking this, but:
The Technical Documentation Writing Conversations & Quests page gives us a list of five types of quests supported by the ACR Quest System: Scouting, Errand, Escort, Bounty, and Patrol and gives us a list of ACR_QST variables that should be set on triggers at "specific locations" to set up scouting, bounty, and patrol quests and acr_quest scripts for conversations that start errand and escort quests. In the accompanying texts, mention is made several times of the "module journal" particularly in reference to PlotID, but I've been unable so far to discover where or how to edit this journal. Is this Journal also connected somehow to the Journal Entries a PC receives over the course of a static? Are there syntactical or naming standards we should follow for these?

Thanks again,
- Curmudgeon
HDM ALFA 03 - The Silver Marches
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Maxim #12: A soft answer turneth away wrath. Once wrath is looking the other way, shoot it in the head." - The Seventy Maxims of Maximally Effective Mercenaries

"This is not my circus. These are not my monkeys."

Realmslore: Daily Dwarf Common
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: Help Wanted - Conversations

Post by Zelknolf »

Aha,

So, Journals are a whole different thing, with a whole different structure behind them. They are indeed the things that show up in the player's journal, and there's a brief explanation of them here:
http://www.nwn2toolset.dayjo.org/Toolse ... urnal.html

The sum of it is that you make a bundle of text things, specify what order they appear in, and then our scripts let you wiggle through "Go back to the last one / move to the next one" shimmy until you call the "OK they're done, here's your money." one.

That gets referenced in our handling of quests, but isn't actually built in the triggers or conversations. I would need to spend a little time rummaging for scripts to be placed on the triggers, but I believe (don't quote me quite yet; I'm at work and thus not looking at the ACR) that works on the generic ACR trigger scripts and variables configured on the trigger (as they're described on the linked page).
Locked