Dialog result

Post » Sun May 01, 2011 5:13 pm

In one NPCs dialog result box, I wrote:

StartScript "thiefdial1"player->ModHealth 10player->RemoveItem ring_keleyModAlarm 100


Do I put commas there? I have mixed examples in MWSFD. Above I want to start a script, damage 10 points from the player, remove a ring from players inventory and make the NPC call the guards.
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Sun May 01, 2011 2:56 pm

Did these Results not work?
You probably don't need a comma after StartScript, but otherwise I always use them in the Results box, and I always use quotations around items.
example: Player->Removeitem, "ring_keley", 1

oh, and it should be: Player->ModCurrentHealth -10
(because you want to subtract health)
User avatar
Matt Fletcher
 
Posts: 3355
Joined: Mon Sep 24, 2007 3:48 am

Post » Mon May 02, 2011 2:41 am

Did these Results not work?
You probably don't need a comma after StartScript, but otherwise I always use them in the Results box, and I always use quotations around items.
example: Player->Removeitem, "ring_keley", 1

oh, and it should be: Player->ModCurrentHealth -10
(because you want to subtract health)

Thanks. This is my first scripting attempt, will see how it works. It should work though. XD
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Sun May 01, 2011 6:36 pm

Well, nothing happened. I got a pause on every 30 seconds instead.

This is my script.
Begin thiefdialfargothshort hasfargothringshort thiefdial1;fargoth thief dialog starter;rest of the senaryo dealt in dialog short doOnce;keeps sleepers from ForceGreeting over and overshort NoLore;don't want sleepers being too talkativeset hasfargothring to ( player->HasItemEquipped "ring_keley" )if ( hasfargothring != 1 )	Set thiefdial1 to 0	Return	;no ring no scriptendifSet thiefdial1 to 1if ( GetDistance Player > 3000 )	set doOnce to 0	Returnendifif ( doOnce != 0 )	Returnendifif ( GetDistance Player < 150 )		set doOnce to 1endif;the scenario starts;with a basic helloEnd


In dialog, I set a voice greating(Hello!) with
NPC fargoth,
thiefdial1=1

Nothing happened when I approached fargoth with fargoth's ring equipped. I was expecting him to greet me with a hello.

Edit: Now that I checked my the dialog edits are gone. :glare:
User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Sun May 01, 2011 3:11 pm

This:

set hasfargothring to ( player->HasItemEquipped "ring_keley" )if ( hasfargothring != 1 )


Should be written like this:

if ( Player->HasItemEquipped "ring_keley" == 1 )

User avatar
lauren cleaves
 
Posts: 3307
Joined: Tue Aug 15, 2006 8:35 am

Post » Sun May 01, 2011 3:54 pm

This:

set hasfargothring to ( player->HasItemEquipped "ring_keley" )if ( hasfargothring != 1 )


Should be written like this:

if ( Player->HasItemEquipped "ring_keley" == 1 )


I updated the script to this. I'm trying to follow the break first do later logic:

Begin thiefdialfargothshort hasfargothringshort thiefdial1;fargoth thief dialog starter;rest of the senaryo dealt in dialog short doOnce;keeps sleepers from ForceGreeting over and overshort NoLore;don't want sleepers being too talkativeif ( Player->HasItemEquipped "ring_keley" != 1 )	Set thiefdial1 to 0	Return	;no ring no scriptendifSet thiefdial1 to 1if ( GetDistance Player > 3000 )	set doOnce to 0	Returnendifif ( doOnce != 0 )	Returnendifif ( GetDistance Player < 150 )		set doOnce to 1endif;the scenario starts;with a basic helloEnd


(The dialog was there, I just couldn't find it in the huge list.)

Fargoth still greets me stuff like "I have no time" and such. I only want a simple hello.

In dialog:
ID fargoth
disp 0
Function/variable
local thiefdial1 = 1

Maybe that local should be global?

PS. Another question, is that above script actually started at all? I just wrote it.
User avatar
Ryan Lutz
 
Posts: 3465
Joined: Sun Sep 09, 2007 12:39 pm

Post » Mon May 02, 2011 4:34 am

Your script is attached to Fargoth, right? (or whatever NPC you're using)

Also, In your dialog Results you have: StartScript thiefdial1
But your script isn't called that, that's the name of your short.
But you can set the short to 1 in the Results box if you want to: Set thiefdial1 to 1
Otherwise, just delete that part.
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am

Post » Sun May 01, 2011 7:19 pm

Your script is attached to Fargoth, right? (or whatever NPC you're using)

Yeah, this is the question. Is it attached? I don't think so. :P How do you attach it? I'm so noob.

Also, In your dialog Results you have: StartScript thiefdial1
But your script isn't called that, that's the name of your short.
But you can set the short to 1 in the Results box if you want to: Set thiefdial1 to 1
Otherwise, just delete that part.

That is the part 2, if this script succeeds, result will call another script, and it will trigger another voice dialog, and another, I have 4 scripts, after the last script and triggered dialog:
player->ModHealth -10
player->RemoveItem "ring_keley", 1
ModAlarm 100


And that's it.

Edit: He has a local state script. Can I safely swap it with mine?

Hehe. He said "Hello". Progress!
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Sun May 01, 2011 12:38 pm

Yesterday, I managed to make Fargoth talk.

But my intention is to make him talk a couple of lines. In my original plan, I had a couple of scripts which I trigger via dialog result. But I realized I have to attach my script to fargoth. I think this forces me to use only one script.

This is the script:
Begin thiefdialfargothshort hasfargothringshort thiefdial1short ;fargoth thief dialog starter;rest of the senaryo dealt in dialog short doOnce;keeps sleepers from ForceGreeting over and overshort NoLore;don't want sleepers being too talkativeif ( Player->HasItemEquipped "ring_keley" != 1 )	Set thiefdial1 to 0	Return	;no ring no scriptendifif ( GetDistance Player > 3000 )	set doOnce to 0	Returnendifif ( doOnce != 0 )	ReturnendifSet thiefdial1 to 1if ( GetDistance Player < 150 )		set doOnce to 1endif;the scenario starts;with a basic helloEnd


In dialog(voice):
"Hello!"

condition
local thiefdial1 = 1

In result:
set thiefdial1 to 2

In dialog(voice):
"How are you!"

condition
local thiefdial1 = 2

in result:
set thiefdial1 to 3
.
.
.
.
.

and goes on.

But fargoth doesn't speak after hello.

Also in my original plan my scripts was setting set thiefdial to 1234 and has a delayer. How can delay inside dialog result(for voices)?

edit:
I added a new short: thiefdial2 and changed it instead in dialog result. Which made the second line spoken but not third. But I had to re-approach to trigger it. I think problem is in my script?
User avatar
Amanda Furtado
 
Posts: 3454
Joined: Fri Dec 15, 2006 4:22 pm

Post » Mon May 02, 2011 12:41 am

The reason you have to re-approach is because you're setting doOnce to 1 when you do the first voice, and when that happens it returns until doOnce gets set back to 0, which doesn't happen until you walk away. Remember that a script runs once per frame (well, that's the theory... In practice it's more true to say it "usually" runs once per frame, but can run more than once, and occasionally not at all).

You don't actually have to attach your script to Fargoth. You can use a targeted script or a global script instead. If you use a targeted script, you need to start it "on" Fargoth somehow - either using dialogue results (if you start the script in dialogue results it's automatically targeted on the NPC you're talking to), or by using another script (global or local) and starting the script like this:
fargoth->StartScript thiefdialfargoth


If you use a global script, it doesn't need to be attached in any way, but you'll need to start it somehow (e.g. set it as a startscript, or put an invisible activator in the cell with a simple local script that just starts the script if it isn't running already). And you'll also need to specify the ID, so e.g. instead of this:
if ( GetDistance player < 150 )

you would use this:
if ( fargoth->GetDistance player < 150 )


On the subject of commas: In my experience, you should NOT use commas in scripts. I've found that removing commas from scripts in all mods I run made for a lot less crashes during play, and I'm not the only one who's noticed that. Dialogue results tend to be less fussy, but it's better to just use one method everywhere, so I'd say "no commas". ;)

Also - I used to recommend using quotes for IDs even if they weren't needed, but I've changed my mind on that again after realising that MWSE scripts will crash the game if you use quotes round IDs in certain circumstances.
User avatar
Tamara Dost
 
Posts: 3445
Joined: Mon Mar 12, 2007 12:20 pm

Post » Sun May 01, 2011 1:15 pm

The reason you have to re-approach is because you're setting doOnce to 1 when you do the first voice, and when that happens it returns until doOnce gets set back to 0, which doesn't happen until you walk away. Remember that a script runs once per frame (well, that's the theory... In practice it's more true to say it "usually" runs once per frame, but can run more than once, and occasionally not at all).
.....

So basically I need a doFourth, for four lines of dialog.

PS. Thanks for all the info. Very useful. I want to keep it generic, it is targeted to simulate AI. :o

edit: I think I need more help, especially someone helping with the basics. This is my first script.

Here is the non-working script attached to Fargoth with commenting and questions:

Begin thiefdialfargoth;ring will cause fargoth shout stuffshort hasfargothring;this will trigger the first dialogshort thiefdial1;this will trigger the rest of the dialog and be increased in dialog result for the next dialog;why I didn't used thiefdial1, I'm setting it to 1, that can break  the cycle. Question: or maybe there is way?short thiefdial2short doOnceif ( Player->HasItemEquipped "ring_keley" != 1 )	Set thiefdial1 to 0	Return	;no ring no script     ;Question: why return?endifif ( GetDistance Player < 150 )	Set thiefdial1 to 1	set doOnce to 1     ;Q: Why don't we have return here? Or we should?     ;Q: also how am I gonna stop it from getting 1, this is causing problems.endifif ( GetDistance Player > 3000 )	set doOnce to 1endifif ( doOnce == 1 )return	;again another return without knowing what's happeningendif;the scenario starts;with a basic hello;I shouldn't actually need this script anymore except thiefdial2. I am increasing it in result box and checking in other dialog's conditions.End;Q:now where this ends and starts? What is return if there is an end?

User avatar
Sunny Under
 
Posts: 3368
Joined: Wed Apr 11, 2007 5:31 pm

Post » Mon May 02, 2011 3:50 am

First, let's clarify once more: do you really want the script *attached* to Fargoth? That means, when you look at NPC list in the main tab, "Fargoth" line has "thiefdialfargoth" in the "script" column.

Begin thiefdialfargothshort state; this is the variable declared in Fargoth's own script. You won't use it, but since his own script is overridden by yours, you should keep its functionality.;ring will cause fargoth shout stuffshort hasfargothring;this will trigger the first dialogshort thiefdial1;this will trigger the rest of the dialog and be increased in dialog result for the next dialog;why I didn't used thiefdial1, I'm setting it to 1, that can break  the cycle. Question: or maybe there is way?short thiefdial2short doOnceif ( Player->HasItemEquipped "ring_keley" != 1 )	Set thiefdial1 to 0	Return	;no ring no script     ;Question: why return?     ; Answer: to make sure that no code is running further when player has no ring equipped.     ;   Also, cutting the script early prevents it from taking unnecessary time and dropping framerate.endifif ( doOnce == 0 ); As I understand, you'll want thiefdial1 to be changed further to 2,3,etc by the dialog.; Hence, this condition must be only checked until it matches for the first time.; Trehe's a reason why the variable is called doONCE, you know. It's used to make stuff happen once.	if ( GetDistance Player < 150 )		Set thiefdial1 to 1		set doOnce to 1	     ;Q: Why don't we have return here? Or we should?	     ;Q: also how am I gonna stop it from getting 1, this is causing problems.	     ; Answer: because if we have return here, nothing below will be checked/performed if Fargoth is close	endifendif; The rest I can't explain without understanding what exactly you're trying to achieve.; What should happen when player is too far from Fargoth?if ( GetDistance Player > 3000 )	set doOnce to 1; If you do this, you will only have one chance to initiate the dialog. If you go far, and the first "Hello" wasn't said, it won't be ever.;	set doOnce to 0; If you set it to 0, as you did in the first version of the script, then going away and coming back will restart the sequence.; No matter how many greetings Fargoth did, the next time he'll start from the first "Hello".; If you meant something else by putting it here, please clarify.endif;if ( doOnce == 1 );return	; If there's nothing else you want in the script, you don't need it here.;endif;the scenario starts;with a basic hello;I shouldn't actually need this script anymore except thiefdial2. I am increasing it in result box and checking in other dialog's conditions.End;Q:now where this ends and starts? What is return if there is an end?;"End" is the end of a script. It means that there's no code beyond that at all. "Return" means that there's more code below,; but *FOR THIS FRAME* it should not be ran.

User avatar
sam smith
 
Posts: 3386
Joined: Sun Aug 05, 2007 3:55 am

Post » Mon May 02, 2011 2:14 am

Thanks for detailed answer. But above script didn't work. I managed to get him say Hello(post #9). And with a second approach, "How are you!"(post #9: adding thiefdial2 and using it instead in result and condition in dialog number 2).

Now I have 1 question.

DoOnce:
You said we set it for a reason, to make it only happen once. But we aren't checking it in rest of the code. So is it some kind of global function?(edit: Is it a good idea to update doonce in dialog #1's result, if not?)

And one assumption:
I added thiefdial2 because I thought when I'm near, thiefdial1 will get 1 and it will retrigger dialog #1 again and again. Adding thiefdial2, (which should't fix it logically-but a hunch), did second line spoken but not the third. Maybe those variables doesn't get updated across one dialog. (I will try it with thiefdial2,3,4 and use them in each dialog result respectively, maybe that can fix it.) Also note that I want this dialogs(voices) to be spoken back to back not with re-approaches.

What I want to achieve is, aggressive AI 101(for myself),
I approach fargoth, with his ring equipped,
Fargoth first greets me:
Hello, how are you! :P (2 voice dialog spoken back to back, thiefdial1 is set to 1 in script, dialog condition reads it and triggers first dialog, in first dialog's result I have thiefdial1or2 set to 2, which triggers second dialog "howareyou!", which has in result box: set thiefdial1 to 3)
third dialog:
What's this? Thief!
result: set thiefdial2 to 4
final dialog #4
Over here!
Again condition is triggered by previous dialog's(voice) result box.
This one has a couple of stuff in its result box:
Player->ModCurrentHealth -10;Fargoth bites PC's finger with the key attached, this is the hit point from it :PPlayer->Removeitem, "ring_keley", 1Additem, "ring_keley", 1;Now Fargoth has the ringModAlarm 100;this should call the guards I guess, but don't know how much guards will charge Pcset thiefdial2 to 5;well this will stop the dialogs but probably unnecessary, a better thing could be a stopscript altogether command


Since this is my first script, I'm starting with easy stuff. After managing this I will try to make this for global scale and fully automatic. NPCs will recognize their armor/cloth/weapon and call the guards. And they will acquire their stuff directly.(I don't know if in vanilla stolen items returns to their owners, but this mod will do it.)

Then I will do it for healers, healers with aggressive AI will offer potions, cast heal spells directly to PC, if they have high disposition and some certain other conditions, triggered by relevant voice greetings...

I will also provide small tweaks to regular quests, watch this, at 9:39:
http://www.youtube.com/watch?v=yPPgYKK_-lA&feature=related

Player talks to Mehra Milo, she says "follow me it is not safe here." Player follows and waits because, player thinks Mehra will decide if it is safe or not, by logic. Watch the disappointment player feels when he had to make the assumption: "Is that good enough?" and nothing happens. This could be fixed with a basic forcegreet. This will be manual, I guess.

Quest givers from same faction will forcegreet you(with high chance), automatically. So quests will call you. You don't have to search them(or let's say searching and finding will be easier.). When you return from a mission, quest giver will forcegreet you with very high chance. Random quest givers will forcegreet you with a low chance. With added relevant voice greets.

I even want to make guards AI sensitive to criminal intent. :P

There are many topics I want to add aggression. (like combat!)

I will fully exploit voice greetings for this. Greetings happen all the time and can be triggered by conditions. Binding everything in voice dialog is possible. The world will be constantly changing. Every greeting will change something ingame, trigger stuff. Even between NPCs. Just randomly, but it will create, in the end, what I call as:

A.I.

And above little project is the start that can lead to wonderful things. :)
User avatar
MR.BIGG
 
Posts: 3373
Joined: Sat Sep 08, 2007 7:51 am

Post » Mon May 02, 2011 12:36 am

DoOnce:
You said we set it for a reason, to make it only happen once. But we aren't checking it in rest of the code. So is it some kind of global function?

No, it's a conventional name for a normal variable used for a particular purpose. You could call it anything you want, it's just that "doOnce" (or doonce, or do_once...) is easily understood when reading the script.

OK, for the script itself, here's a suggestion:

Attach this script to an invisible activator in Fargoth's cell (ie Seyda Neen) (for an invisible activator, use the "editormarker.nif" mesh):
begin thiefdialstartshort doOnceif ( doOnce == 0 )	fargoth->StartScript thiefdialfargoth	set doOnce to 1endifend


For the main script, try this:
begin thiefdialfargothshort stateif ( MenuMode )	returnelseif ( GetHealth < 1 )	StopScript thiefdialfargoth	returnelseif ( player->HasItemEquipped ring_keley == 0 )	returnendifif ( state == 0 )	if ( GetDistance player < 150 )		say "Vo\w\m\Hlo_WM112.mp3" "Hello!"		set state to 1	endifelseif ( state == 1 )	if ( SayDone )		say "Vo\w\m\Hlo_WM113.mp3" "How are you?"		set state to 2	endifelseif ( state == 2 )	if ( SayDone )		say "Vo\w\m\Thf_WM005.mp3" "What's this? Thief!"		set state to 3	endifelseif ( state == 3 )	if ( SayDone )		say "Vo\w\m\Thf_WM003.mp3" "Over here!"		player->ModCurrentHealth -10		player->RemoveItem ring_keley 1		AddItem ring_keley 1		ModPCCrimeLevel 1		set state to 4	endifelseif ( state == 4 )	StopScript thiefdialfargothendifend


If you try to use voice dialogue for all this, you will have to walk away and back no matter what you do in script, because the game doesn't keep issuing hellos when you're close to an NPC - it's supposed to happen as you approach, so the game will do it once, then reset when you get a certain distance away (the distance is worked out from the NPC's hello value and a GMST).

ModAlarm 100
;this should call the guards I guess

No, it will make Fargoth report crimes and attack the player if he sees any. What you need here is ModPCCrimeLevel. I used a value of 1, you can increase this to get the effect you want - I just didn't know what you wanted the player to be charged for.

Regarding your plans:

NPCs will recognize their armor/cloth/weapon and call the guards.

I doubt this is possible. MWSE has a function to detect owner, but the item has to be in the world. It doesn't work for items in inventory.

(I don't know if in vanilla stolen items returns to their owners, but this mod will do it.)

No, they go to the nearest "evidence chest", where the player can try to steal them again if they're really persistent. You could remove the items from the chest by script if you use MWSE but you still can't return them to their owners.

Then I will do it for healers, healers with aggressive AI will offer potions, cast heal spells directly to PC, if they have high disposition and some certain other conditions, triggered by relevant voice greetings...

I'm pretty sure this has been done. Can't remember the mod name or who made it atm though.

Player talks to Mehra Milo, she says "follow me it is not safe here." Player follows and waits because, player thinks Mehra will decide if it is safe or not, by logic. Watch the disappointment player feels when he had to make the assumption: "Is that good enough?" and nothing happens. This could be fixed with a basic forcegreet. This will be manual, I guess.

Not sure what you mean here? What did you want to do?

Quest givers from same faction will forcegreet you(with high chance), automatically. So quests will call you. You don't have to search them(or let's say searching and finding will be easier.). When you return from a mission, quest giver will forcegreet you with very high chance. Random quest givers will forcegreet you with a low chance. With added relevant voice greets.

This could be good - especially with some misc quests you meet on the road, since their first greeting often sounds like they're supposed to be calling out to the player. But - do be careful with forcegreeting, it can cause problems. If you're doing this on a large scale I'd advise you check for combat (no forcegreetings in combat, please), and make sure the player has been in the cell at least a few seconds before forcegreeting. You'll also need to check other things (e.g. disease, vampirism, is werewolf, and whether the player is on the Sanctus Shrine quest) before doing any forcegreetings.
User avatar
Gisela Amaya
 
Posts: 3424
Joined: Tue Oct 23, 2007 4:29 pm

Post » Sun May 01, 2011 2:05 pm

No, it's a conventional name for a normal variable used for a particular purpose. You could call it anything you want, it's just that "doOnce" (or doonce, or do_once...) is easily understood when reading the script.

OK, for the script itself, here's a suggestion:

Attach this script to an invisible activator in Fargoth's cell (ie Seyda Neen) (for an invisible activator, use the "editormarker.nif" mesh):
begin thiefdialstartshort doOnceif ( doOnce == 0 )	fargoth->StartScript thiefdialfargoth	set doOnce to 1endifend


For the main script, try this:
begin thiefdialfargothshort stateif ( MenuMode )	returnelseif ( GetHealth < 1 )	StopScript thiefdialfargoth	returnelseif ( player->HasItemEquipped ring_keley == 0 )	returnendifif ( state == 0 )	if ( GetDistance player < 150 )		say "Vo\w\m\Hlo_WM112.mp3" "Hello!"		set state to 1	endifelseif ( state == 1 )	if ( SayDone )		say "Vo\w\m\Hlo_WM113.mp3" "How are you?"		set state to 2	endifelseif ( state == 2 )	if ( SayDone )		say "Vo\w\m\Thf_WM005.mp3" "What's this? Thief!"		set state to 3	endifelseif ( state == 3 )	if ( SayDone )		say "Vo\w\m\Thf_WM003.mp3" "Over here!"		player->ModCurrentHealth -10		player->RemoveItem ring_keley 1		AddItem ring_keley 1		ModPCCrimeLevel 1		set state to 4	endifelseif ( state == 4 )	StopScript thiefdialfargothendifend

Now this makes more sense in using of doonce and starting the script logic as well as terminating. Thanks. I thought this too off course but:

If you try to use voice dialogue for all this, you will have to walk away and back no matter what you do in script, because the game doesn't keep issuing hellos when you're close to an NPC - it's supposed to happen as you approach, so the game will do it once, then reset when you get a certain distance away (the distance is worked out from the NPC's hello value and a GMST).

I want this to be an AI thing. I have to utilize voice dialog. Maybe I can add it to idle greetings, can that work? Or maybe I can change the GMST back and forth to retrigger it. It is very important to do this via voice greetings.

I doubt this is possible. MWSE has a function to detect owner, but the item has to be in the world. It doesn't work for items in inventory.

I don't take impossible as an answer. We will find a way for this, then. :wink_smile: I often hear about this limitation: the invisible inventory. I am sure if we all combine our powers, with enough brainstorming and hrnchamd's skills, we can find a solution.

No, they go to the nearest "evidence chest", where the player can try to steal them again if they're really persistent. You could remove the items from the chest by script if you use MWSE but you still can't return them to their owners.

Well, I can't say I like this behavior. They should return to their owners. Maybe after a delay.

I'm pretty sure this has been done. Can't remember the mod name or who made it atm though
.
Aggressive healers? I actually searched but nothing came up. In my case they will come to you! You know EVERYONE knows how to greet a wounded player. But noone do something about it. But there is a big RESULT box there NOT USED at all. Do you catch my drift?

I have to utilize this result box for the favor of dynamic AI. I will add results for every greeting. Something in the equation will change, the whole world will become dynamic. Even with Morrowind's current state, AI does wonders. You can watch the whole LP I posted above. Some of the awesome moments are when Gix says something, NPCs greet with a somewhat relevant response. What if those dialog was triggering more random stuff around the world, it would have been so immersive. AI would be dynamic like a real AI. Even I can't estimate the full impact of this.


Not sure what you mean here? What did you want to do?

A little fix to there when the NPC course ends and PC is near/comes near, the Mehra will activate dialog, PC won't wait for a dialog box to appear as in the video I posted. It is small but important.

This could be good - especially with some misc quests you meet on the road, since their first greeting often sounds like they're supposed to be calling out to the player. But - do be careful with forcegreeting, it can cause problems. If you're doing this on a large scale I'd advise you check for combat (no forcegreetings in combat, please), and make sure the player has been in the cell at least a few seconds before forcegreeting. You'll also need to check other things (e.g. disease, vampirism, is werewolf, and whether the player is on the Sanctus Shrine quest) before doing any forcegreetings.

I will look out for those, I have seen scripts with werewolfs and stuff. Voice dialog has 6 conditions and they can take additional script variables too which I can extend with common ones...

Well, I still need to convert this to voice dialog. Any suggestions?

PS. Take a look at this:
http://www.gamesas.com/index.php?/topic/1090289-guards-killing-guards/page__view__findpost__p__15899375
and this
http://www.gamesas.com/index.php?/topic/1079701-funny-phrases/
AI is capable. Dialog is powerful. It just needs right conditions and some randomness with triggers.
User avatar
Brian Newman
 
Posts: 3466
Joined: Tue Oct 16, 2007 3:36 pm

Post » Mon May 02, 2011 3:30 am

What you can do - which would work for your other idea too - is use the first hello voice to start a script, and do the rest from the script. For generic stuff, remember that a script started from dialgoue results is automatically targeted on the NPC that said the dialogue line - so you won't need the NPC's ID, the script will default to that NPC just like dialogue results do. Just make sure the script isn't already running first (trying to start a script that's already running can crash the game sometimes).
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am


Return to III - Morrowind