Hello!->about a dialogue system that really works

Mapping & modding Fallout Tactics and reviewing maps thereof.
Post Reply
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Hello!->about a dialogue system that really works

Post by Izno »

Hi how are ya?I'm new here and as of 3 days i'm new to the FoT Editor.At first i thought it was gonna be too hard but now i've done some reading and experimenting and ive found a way to talk to a lot of people.sorta free style.the idea is that you have a bunch of notes in your inventory.then when you want to talk to someone you barter with them and give them a note, like one that's called 'Say Hi'.Through scripting, and use of custom speech files, you can then make them reply appropriately.The only limits are 1)you have to be able to barter with whoever you want to 'talk' to, which doesnt really matter, since otherwise they're prolly enemies and you just kill them.2)The more different notes you would script, the more work of custom speech, scripting, etc.3)in custom maps, if you make a lot of different player indexes, and want to talk to all of them, thats gonna cost you more scripting work.on the upside, the more player indexes you use will cause less actors to respond together.for the truckload of scripting i think if you simply copy the first set of scripts and adjust them, there would be less work.They also give the note back to the player, so you dont have to barter back for it or anything.The only problem i can think of is that you _will_ break the script if you do it with your own campaign char, which is a bummer(because theres no way to tag name him i think?).Also, is it right when i think that what i write in the box 'event' and 'default event', is used for the condition 'Speech Occured'?this could help in more scripts.
So anyway, i'm looking for anyone willing to reply to my crazy rant, and until then ill write down my script so i can put it up here(if i get a reply :p)
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

The only problem I see with it is that you can't say specific things to specific NPCs - all your general dialog options would have to be on the notes.
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

well yeah but the scripts use simple vars so you could set things to trigger when you've spoken to people (edit:you can use conditions for specific npcs) more then once, or if you said both hi and how are you, or any combo, and they would give you a quest or something.for instance an npc that if you talk to him more and more his replies become more aggressive and if you keep pissing him off he will go hostile.or some sort of slavemaster who doesnt like you talking to his slaves.Also ive thought about asking like, what have you been doing?and, what are you going to do?in which cases you could make it reply accurately if you set it up.like if it patrols, it responds with 'walking a damn patrol' its quite a bit of work but the more work you put in it the more dialogue paths you get.you could even ask something like, have you made a frag yet?to which they could respond, again, with help of more conditions, to like, 'not yet', or 'just got me one the other day' or even 'hell, im the master fragger!' if they made a lot of kills.
oh well if no one thinks its worth the work then i'll just use it myself, i dont mind the work
edit2: i dont really see your point about not being able to say specific things to specific npc's.what would you like to say then?something quest related?if so then its only a matter of making the note and copying/editing the triggers.takes 5 mins.
edit3: aaah now i get it!:) no you cant 'talk' to a single npc like this _unless_ they have a unique player index.as it is, simply all npcs with same player index will react.thats not so bad i think , as, again, if its for a quest, in a storyline, the one you wanna talk to should prolly have one anyway.kinda like fo1 where all the important people are somebody on their own and the rest is usually part of a group.
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

I'm talking about immersion and simulating a dynamic dialog. Using this system, you can't get the interactivity of the RPG dialog system. For example, it would take a ridiculous amount of work to be able to ask Jagged Jimmy J where he got his scar from without the player giving that note to the wrong NPC.

That aside, it seems this is the most advanced dialog system usable in FoT. It's a damn sight better than yes/no sprites.

I'd appreciate it if you would post the technique. I need something like this in the mod I've been tinkering with. As for it being worth the work or not, it would depend on what a modder was trying to achieve.
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

actually its easy, just make a note called 'Ask Jagged Jimmy J where he got his scar from' and make the triggers so it only works on some char named Jagged Jimmy J (or whatever you want) and that he replies with something.btw, the replies are always floats.you could use click speech, but i dont see the point, as then you would have to click on them to get them to say something.it doesnt use random speech either, ive noticed they dont always say something immediately.
Heres the Setup, ill note where there are problems:
1.actor with tag name 'player' and player index 1(problem 1: cant be main char, real bummer)
2.Actor or actors with tag name 'citizens' and player index 2(problem 2: there can be more of them, but if you have an entire village set to the same player index, it'll look like crap.i use alot of different pi's which i bet most people do)
3.Custom item, i used a pamphlet cuz it looked like a note, renamed to 'Say Hi' with tag name 'NotesHi' and PI 0 (player index dont matter for this obvious, its just an item and thus scenery)
4.custom speech file.for this example, you'll need one that gives some replies to a friendly hi.for example: 'What the hell do you want?' or 'This better be good...'
5.Script:
-Varstart: -Condition : always -Actions : set variable 'NotesHi_Var' to 'F' NOT preserved
-NotesHi Start : -Condition : (Quantity-player) 'Citizens' has 'more then 0'
ItemsTagged 'NotesHi' ; if mission variable 'NotesHi_Var' is 'F' -Action : Set mission variable 'NotesHi_Var' to 'T' -PRESERVED ON
-NotesHi End : Condition : if mission variable 'NotesHi_Var' is 'T'
action : -Entity 'Citizens' will use speech node 'Your_reply_speech_node_here'; B(lock) Wait 5 seconds ; Entity 'Citizens' will use speech node '' ; give ItemsTagged 'NotesHi' from 'Citizens' to human; set mission variable 'NotesHi_Var' to T -Preserved
There ya go.thats 1.now for the other 50 player indexes, and with 10 different things to say, thats some work.good thing there's a 'copy' button :).also ya can save the thingy if you wrote it out completely, then load it up first whenever you make a new map.that way it'll be in there from the start and no need to rewrite.Oh and for the custom speech file, if you put it in generic_mission.txt, you can use all of them in every mission.handy.like i said earlier, you can do alot with this.you can make stuff happen by letting them check the vars.i'll have more to say later.PS: Interested in a way to move item from npc to npc?
User avatar
Retlaw83
Goatse Messiah
Goatse Messiah
Posts: 5326
Joined: Sat Jul 17, 2004 1:49 am

Post by Retlaw83 »

So, for a natural dialog tree, appropriate notes could be dropped into the player inventory, then removed when that stage of the conversation is over and a new set of notes is loaded?
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

Definitely.all that you would change is in the appropriate npcs inventory, to have the notes in it.then when you like say hi, instead of only giving that one back, he would also give you one like, 'ask about his dog' and another like, 'ask about his cat', and depending on which one you pick then, would determine where you go with the dialogue.in this example, if you would for instance go for 'ask about his dog', you can make the script to remove the note 'ask about his cat' from the player, and even make the other notes that required you to ask about his cat disappear from his inventory.Of course, you could not remove them, and keep the line open.
edit: just thought of this: you could throw in some rep checks to allow or disallow dialogue lines.and maybe its possible to tune your rep to your charisma using scripts, like if you only have 2 charisma, and your supposedly horrid to look at, your rep would take a hit of -1 point every 10 seconds or something.So you would either have to get your charisma up or first go do a bunch of good deeds before you can get that quest from a very law abiding paladin or something.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

It seems rather complex for just saying hi. Even in the rpgs if you went up to someone without anything significant to say all they do is display some floating text, much the same as the existing click speech option in FOT, since you'd need to click on them to barter anyway why not use that? For a more complex dialogue with npcs endocore's clone system works well, I'm working on a slight modification of that, when I get round to the speech files that is.

Moving items between an npc and player is one of those triggers that doesn't always work and doesn't always transfer the item to the squad member you used to initiate the conversation. Moving from npc to npc isn't possible without using the player in a three way trade.

If you want to tagname the main character restrict the player to using a prefab. You can supply prefabs with tagnames and make one blank which people can use to create a character from scratch.

I've got different speech events for if a player approaches with a weapon equipped or not, using the more than items tagged equipped trigger. You could use something similar instead of the clone system.

If you start the prefab with notes in their inventory, instead of needing to barter the item you'd just use human has more than 0 items tagged equipped with the action changing the click speech for npcs depending on which note is equipped. You could also have some that change attitude, i.e. a token for being aggressive, a token for being neutral and a token for being passive. As well as tokens that ask generic questions, ask about, tell me more etc. Equipping them would change the npcs dialogue for each time you clicked on them.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

hey that's a great idea!you could have 2 equipped like the token you mentioned for passive/neutral/aggressive, and then another one, but will they be 'equipped' at the same time?dunno that, but anyway thats a great idea since that way you can skip the whole barter thing.I'll try it now.
oops, looks like i jumped the gun a bit, how exactly do you use the speech event trigger?
nvm i found out.Works 10 times better now.let me detail the improvements:
1.since u can do 'player' has itemtaggedequiped, that _can_ be the main character too.no more prefabs
2.apparently a bit less scripting, namely i only need 3 triggers to be able to say Hi to everyone on the map.
3.using the speech occured event, you can still give the player new note sets, allowing for the same dialogue build.
so theres only one tiny insignificant flaw i see right now and thats that evryone you want to talk to needs a tagname.thats doable.
another thing i just thought of, u need an extra trigger for when player doesnt have any equipped, then turn clickspeeches back to ''
=>now only to build more complicated dialogues with the extra use of reputation would be nice, even nicer if charisma could count for something too like i said earlier.
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Virtually any individual that needs to be scripted will need a tagname, it's easier than giving everyone seperate player index entries.

You need the trigger to turn off the click speech for every version of your notes.

Only the main player gains reputation IIRC. Charisma can be done but you'd need to take into account the charisma of the other team members. Easy enough to do if you've got a small recruit pool or a limited amount of recruitable npcs. Though it would be better to spawn the player in the first map without any squad members then you can count his/her charisma and set a campaign variable accordingly, same for the other stats and skills.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

well everything with just the notes works fine.havent tried matching them up yet, because of been busy with something else, and it seems to be impossible to get working.
If you put a 'stop timer' behind every timer change, you have a sort of variable that you can add and subtract to.the problem is, i havent gotten anywhere near scripting it right so it actually does both.I want it to Add 100 when its less then 100 and make it subtract 100 when its more then 100.the point was to get sort of a random number when you let the timer go past several notes, sorta like when you are saying more to people.the point to doing both add and subtract is that i wanted it so that if you said hi, you get 100 "charisma points" for explanations sake, but if you then said hi again, when you had those 100 you would lose them again.Hmm, im gonna look into this(got an idea) but i'd like some comments about the whole var thing that u can add and subtract to/from it.this way you could script different dialogues for different "charisma points levels"
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

Sorry you've totally lost me?
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

Ok as far as i can tell the 'add' and 'subtract' timer do exactly the same as 'set' timer; they 'add' TO and 'subtract' TO...What you can have with timer and timer stop together is a variable that you can set to any number triggered by anything you want at any time but if the damn functions would work we could 'add' and 'subtract'.....
This is how i would use it; if you Say Hi(with the note thing) to someone, it would add 100 seconds to a certain timer.then when you say hi again, and the timer _already_ has 100 seconds i want it to subtract 100.And the idea is that when you say 'how are you?' right after the first 'hi' you would get an extra 100 seconds on the timer.so just when you repeat the same thing, you lose 100 seconds, and when you use different things, you get 100 seconds.that way in the end you couldve used 10 different notes and could have accumulated 1000 seconds, but there would also need to be a way for you to fail the action and not gain or lose points, then when you've exhausted your options you'll be left with a certain number of points.depending on how lucky you got, and how many different notes u used, that number would then differ.which could thus trigger different things, like, if you only have 100 seconds nothing would change, if you had 200 seconds you got a random fedex quest(working on that), if you had 600 or more for example, you would get a random assassination quest(working on that too).
see what i'm getting at?a random way to get random missions.btw both those i suggested are do-able i believe.could be i'm dreaming.the idea would be that u get an extra note at those values, and if you talk to someone with one of those special notes you may or may not get a quest, depending on whether the person you tried with needed a quest done(working on this as well :D)
anyway i hope this clarifies my intentions, simply to use the timer not to descend or ascend, but to add or subtract certain values to it.like i said, doesnt work though.:(maybe i could use random numbers?hmm...
User avatar
requiem_for_a_starfury
Hero of the Wastes
Hero of the Wastes
Posts: 1820
Joined: Tue Oct 29, 2002 11:13 am

Post by requiem_for_a_starfury »

As you've determined the add and subtract just reset the timer rather than reducing or increasing by the amount specified, so you can't do what you want.

It's not a rpg and is never going to be an rpg, deal with it and move on.

I don't know why you choose to use the timers anyway, the reputation would be a much better bet. Reputation levels go up 101 points at a time IIRC (there's a post in the gameplay forum with a list) so if you added/subtracted 1 point for speech events you could probably set off different variables without drastically affecting the player's reputation level.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Izno
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 29
Joined: Mon Jun 27, 2005 8:40 pm

Post by Izno »

well i might be able to deal with it but then i'd have to go back to fo1 because unfortunately i dont have fo2 :( but i still think some nice things can be done, i mean in the past 3 days every idea i could think of could be done.Your right about the rep, but what i thought was, instead of using that, make your own.but yea, with rep, the things i want might be doable.guess i need some more experience :)
Our Host!
Post Reply