Jump to content

Advanced interactions


khravv

Recommended Posts

grmblf

perhaps I have done a poor job of explaining myself so I'll try to clear things up a bit.my intention here was to sell you on the Idea of using the companion engine to make this mod

because it really contains much of what is needed to keep track of whats going on in the mod.

The Ideas I have presented are for my own mods and really don't have anything to do with this

I threw them out there in an effort to enlighten you as to what it is really capable of.the job engine does really care if it is controlling a companion or an npc what ever script is attached to it

is what it will run. advanced ai will only be possible with the ability to change scripts, to have a timing system to balance it all out and an effective way to reference the attributes needed for

this type of mod.creating a quest script for every npc would be a nightmare. the companion engine uses arrays and adding an attribute to an npc is as simple as

Let arWorld[06]["Happy"] := 10

arWorld is the array of the npc. [06] is where we put attributes and ["Happy"] is our new

attribute. if this code seems alittle strange it because it part of the OBSE which is required for the

engine.if you decide to use the engine I will help you to understand it,and work on parts of the code that are beneficial to the engine but that's about it as I have my own mods to make.so what ever way you decide to go is ok by me

Link to comment
Share on other sites

hey QQuix I didn't see your post, I had the topic open and I didn't update the page when I was going to post. It's great that you're working on something similar. Man, making NPC choose their bar-mates naturally is really great! May I ask you how did you make it to give them some preferences about the conversations they might enjoy? A thread you could point to?

I am pretty much experimenting with the concept of total control of NPCs with scripts, instead of predefined AI packages. It is kind of a proof of concept, which results I plan to apply to my The Evolving Society mod. I have just finished the code for them to decide what they 'want' to do next. Drinking at the bar is one of the candidate activities.

 

If and when an NPC decides to go to the bar, the implementation goes as follows:

- There are a number of predefined conversation subjects (Politics, Religion etc)

- Each NPC has a degree of interest in each subject (hardcoded)

- Arriving at the bar, his interests are matched against the interests of each one at the bar and he will approach the NPC that has the best match.

 

This approach implies that their personal interests are public. A more interesting alternative would be not knowing up front, but, instead, learning about each other interests over time (by chatting at the bar) and each NPC 'ranking' the others as more or less 'fit' to be his pal.

 

As a matter of fact, I don't think I will implement this particular bar-pal thing, but I do have NPCs 'ranking' each other based on other factors. Either way, the 'engine' is exactly the same.

Link to comment
Share on other sites

Wow, and here I thought my suggestion would be outright ignored.

 

What I was envisioning fits with almost all of that. The truth is, if it makes them more human seeming, how could it be bad? However we cannot do everything, and so maybe I think I should point out some things that would be more important, however I am more then open to ideas.

I was thinking of things along the lines of:

 

-Personal set of rules/morals. So that good NPCs would follow you, but if you did something unjust they would confront you, this way your companions are not robots who simply kill on command, but have their own ideas of right and wrong.

 

-Personal quests. often times, even if they only have scripted personalities, having their own story quests that are unlocked if they like the player, and these alone help make them more real, although there needs to be a continued feeling of friendship.

 

-Romance. While i'm not a romance junkie, or a porn mod lover, I recognize that having the potential for romance is fun, and immersing. However, when there is a character that feels like it has romantic potential, and yet nothing can be done about it, that reminds me its a game and breaks said immersion.

 

-Backstory/job/purpose. The NPC having a purpose alone makes them seem more real.

 

-Moods. If they can get depressed, and especially if the player can help them in that, makes them more real. not to mention if they feel good one day and are a lot happier and more upbeat in their personality, it makes them less predictable and more real.

 

-Having interactions with other NPCs. like mentioned in QQuix's mod, if they interacted with each other and their environment it makes it seem like life happens without the player.

 

-Ultimately, anything that makes them seem more alive, less predictable and robotic, and makes the player feel less like nothing happens without him. What would be interesting is if some smaller quests already ingame would be solved without the player, but this would be hard to do.

 

-Initiative. If the Player starts all interactions, it feels fake. If a character who is supposed to be outgoing randomly approaches the player and asks his opinion on something, it seems more realistic. Like that argonian girl in Chorral. If they make small talk, or things like that, it seems better. If the player is infamous or suspicious looking, a guard could ask him a question, and if he is acting very suspicious the guard may follow him. The beggar who realizes the player is rich would maybe follow him. If the player stands in the chapel for a long time, the Priest should approach him and ask if he is okay, and if he needs prayer, etc.

 

-Acknowledgement. If they like you, they would help you, if you are famous, they would react so. Why is it that even after the player has saved the land he still must pay for lodging, he still gets treated like a normal person, and people still have a mistrust of him? while some would still not like him, it seems odd he can be that famous and not be treated different. If the NPCs treat him according to who he is, that would be nice. If he is naked and without money, why would he get held up by a brigand? If he is massive and menacing with strong looking armor, dangerous sword, etc. then why is he still attacked with impunity?

 

anyways, those are just a few ways I think Interactions could be enhanced.

 

Thank you for your ideas and willingness to discuss this request.

Link to comment
Share on other sites

QQuix

your work sounds interesting but it seems like a lot of work when the end results are likely to be the same every time or would it. and what if another npc entered the bar any chance of one npc abanding his group and joining another

The way I am implementing it, the ranking system does not directly determine which one to select. The system determines the odds of choosing each of the candidates, including a good chance of not selecting anyone and drink alone. This way, each time an NPC enter the bar, her decision will be different.

 

Another factor to consider is that, from the 40+ NPCs, only a handful will be at the bar at any given moment, so the chances of meeting the same group twice are very low.

 

For the first version, there would be only one-to-one conversations, not groups. So the arriving NPC will consider only the 'free' customers. Also, they stay at the bar just for a short period, so the NPC will select and talk to just one of the patrons each time she/he goes to the bar.

 

Group talk would be just one step ahead in complexity. It, also, would not be difficult to make the NPC reevaluate his options every few minutes, so she/he may decide to leave the group and, maybe, join another group.

 

Back on topic, the main technical difficulty I see when considering NPCs interacting with each other is that NPCs don't do much when the player is not around.

 

For example, using the bar scenario, when the player enters the bar and there are, say, 8 NPCs there . . . which ones are talking to which? Remember that when the NPCs went to the bar, the bar-cell was not loaded and the NPC selection algorithm did not run.

 

And what if the player leaves the bar and returns one hour later? The scenario should be different. But if the player just leaves and returns, everything is supposed to be pretty much the same as before.

 

I say it is quite a challenge to cover all the situations.

 

Of course, this is just a side discussion/consideration, and does not apply to main subject raised by khravv, namely an improved NPC-Player interaction.

Link to comment
Share on other sites

@ rdamstrom: today I've learned how tose arrays work for oblivion because I needed it for my mod and I get what you say about making an array per NPC with all the info about them. I haven't worked before with non-numerical indexed arrays kinda attributes but I see it has a lot of potential. Every day I script something I fall deeper in love with the OBSE team, this stuff is amazing!

 

Anyway this concerns storing info, but I still don't get how do you "activate" them, put them in the "job slot" or whatever the procedure is, in the end, how they are "updated", altough I assume you have a good way to do so.

 

 

I think one of the big points here is actually making a good system of inter-actions that could work either for the NPCs and the player, because if the difference is very big then it could seem a fake, like they're very deep with you but then they don't act according to what they say, so I think whatever this system finally become it should consider the player just like another NPC the more it could.

 

So if NPCs have a pre-set of possible moods let's make the player has one as well. In my opinion that could be done via dialogues, just a few questions with 4 possible answers, kinda bar chatting, and you can determine how inclined is the player to certain behaviour, so that's something that NPC may evaluate from you.

 

 

I've thought about buidling the "disposition" upon 4 parameters, please share your thoughts about that:

 

- first-glance affinity: simply because your PC is a young girl or is dressed with quality clothes or because s/he has green eyes s/he might be in a better (or worse) position to befriend someone. In this category falls everything "objective" that the player cannot lie about.

 

- personal affinity: assumin NPCs tend more to some moods than others, they could have preferences about other's moods, and prefear kind people over those that shows to be arrogant, etc. In the case of the player it could be given several answers to a question showing different behaviours, even the same answer with different words but that could connote different attitudes, and also use some deeds of the player the NPC has witnessed or has known about and the opinions the PC express in game. The problem here is tracking how much and what an NPC knows about any other NPC, but I'd leave that for impossible and rather make they "discover" the other each time they talk or make they already know this things.

 

- time spent together: could be a factor, just to roleplay a bit, and also could be a tool to create groups within small comunities, so even if they don't like each other at least there's some tolerance.

 

- special (inter)actions: this probably would be the most important part. It could include things like offering a drink, confess a "sin" or a secret to a friend, make a gift, obtain something for them, run a prank on someone like those in Bruma, and all the own small quests each NPC could have, but it would require some more generic actions.

 

 

Last point, about updating the AI when player isn't near, maybe it's a big mess but we could run a script when the player enters the city and then update each NPC. Instead of checking their packages and the places they're suposed to be, we could set some places they use to visit as attributes of each NPC (to know who will he probably meet). This could be randomized, representing they don't have the strict routine they actualy have. If they meet then it's checked the initial disposition and affinity, if they "match" then at least they "spent their time together" (they do talk each other), and then there's a small chance that the NPC performs one of this "special actions" that obviously you won't see reflected in the game except that they might seem more friends. The point of this is making it quite linear and not reciprocal, so when you're evaluating a NPC you only consider those actions that affect positively the disposition of that NPC towards some other, so the work doesn't grow exponentialy. To make people could meet new people we could give a random chance to meet everyone in the city according to the sociability of each NPC, so when evaluating the chances for two npcs to meet that would be: npc1 sociability + npc2 sociability + concurrency factor.

 

 

I think this is doable, but that would be only a part of the work, because once there would be a system to check NPC's sympathy for each other there'd still being all the interactions themselves and all the dialogues needed, wich probably will require more work than the scripting part. C'mon people, the best Oblivion mod (n)ever made needs you!

 

 

PD oh damn I apologize for the lenght of this post.

Link to comment
Share on other sites

Well I don't mean to burst anyone's bubble here but if you don't tone thing's down a bit this project will never fly.here is a list of things to think about.

 

1.Dialog is a nightmare with cs, getting just two npc's to talk will take many hours of trial and error and thats just the start. then there is voice acting trying to find a voice actor's for all these character's is not going to be easy.and finally there is the lipsink file's,another nightmare,you have to revert back to the old version of cs just to make these files.again hours and hours of work. Is lipsink need, for npc's yes otherwise you won't be able to tell who's talking.

 

2.So let's just say that you manage to get through all that.you've created hundreds of pages of dialog and managed to get everyone talking. will it keep the player's interest or just become background noise.if you can't keep it interesting it won't be used very long and all you hard work will be quickly forgotten.

 

My Idea of Advanced interactions would be a more modular approach and my tool of choice would be companions. why people like making companion's, they like taking them with them dressing them taking picture's of them writing story's about them. there is no end to what people will do with there companion's.why is this important to us? getting other people involved is the key to making this project fly.If I design a character it won't be as much fun for me to play as it would someone else.why because I know every thing about this character,what there going to say how their going to react. that doesn't mean I don't like my character it just lacks the element of surprise.so buy getting other people to make their own special character to add to your mod your going to get something back for all your hard work.lets say that we build a little village put in house's that can be lived in job's that can be done places they can go to have fun. so now we have x numbers of house's to be fill. now we starting making companion's to fill these houses based on job skill's job availability wealth. there will be good jobs and not so good a dark side and a light side. companion's that don't have a job will become a beggar and will do most anything to survive prostitution murder thief those living on the street will follow you anywhere to make enough money to survive but maybe not if they had enough money. on the flip side a companion with a good job and alot of money won't follow you anywhere but might hire you to do a job for him. as the player you can choose a job as well but only if the job is open and your more qualified or can buy your way into the job you could be mayor, sergeant of the guards run angel house or be a priest. every companion would have to find a place.and any anytime you remove one you would see a shuffle to fill the slots there could be wife slots for the more wealthy and a romantic female may spend alot of time trying to get that wealthy companion to take her in. so now we have something that could prove to be quite interesting on many different levels and has a little something for everyone. so now we make a generic dialog to handle all of the interactions but allow companion designer to tweak those part's that interest them for thier companion. so let's say I want to make a romantic companion and I set her attributes to make her most incline to be someone's housewife and I want to give her something special to say something less generic and more like my character but I don't really care about the other stuff.since there is no guaranty she actually end up a house wife she will still need the generic dialog to fill the gaps. no matter where she ends up her goal will always be to end up as someones wife.

well I could go on forever but I need a break, so chew on this a while and see how it tastes

Link to comment
Share on other sites

1. Dialog is a nightmare with cs...

 

2. So let's just say that (...) you've created hundreds of pages of dialog....

 

3. My Idea of Advanced interactions...

 

1 - Dialog is a nightmare, either one way or another. Even with "jobs" you need that generic dialogues and also the specific dialog for each NPC, so on that department it makes little difference.

 

 

2 - I didn't mean NPC having deep conversations, in fact I didn't even mention those dialogues being voice-acted nor publicly spoken. First I don't have the need of those lines being voiced, so if they're silent that'd be ok for me. But also I was thinking more some kind of generic speech that NPCs could use with the player, first to show it's "personality" but also to gather info about the player's personality. Once this "test" is passed then it could start a conversation about some matter the NPC cares about. But this conversation will be only with the player.

 

A practical example:

You enter the inn and a redguard approaches to you and says something to start off like "are you new here?" and you can answer:

- "go bother someone else"

- "please, leave me, I want to be alone"

- "I'm just passing by"

- "Yes, I've come recently and I don't know yet the surroundings"

- "No, I think the new here it's you"

 

Depending on your answer you'll be showing a behaviour or another so the NPC could check it against it's "preferences" and then decide next question/comment. A second and maybe a third row and the NPC could know a bit more about you, and if you both are "compatible" then a "conversation" starts. By conversation I mean actually speaking of some matter (ie expressing opinion). There would be a limited amount of matters to talk about, and a limited number of opinions about each one. This "opinion" could be summarized in a line, like the dialogues we have in vanilla oblivion, and don't need to be extensive and detailed, it'd just suffice a sentence showing the NPC opinion about that single matter. It would be nice if the player has also the oportunity to say his own opinion among the pre-def opinions about that matter, to conclude the conversation.

 

All this would happen only between the player and a NPC, because it would be impossible if we would have to track what a NPC knows about each other NPC, so what I was suggesting is making NPC auto-calc this stuff so each one knows perfectly each other.

 

Imagine you know a priest you meet every day and every day he's talking about the nine and all this stuff, and you meet another religious that also uses to speak about divinity. If those NPC meet each other, you might guess what they're talking about. If you approach them you'll probably hear a generic dialog, like "I found a mudcrab. Nasty creatures!", so you'd have to assume that the sentence you've heard is just the anecdote and not the main point of their conversation.

 

To make it simple, the answers the player has could correspond to several "behaviours/personalities" always in the same order. Let's say option 1 is the cruel, evil one, 2 is an emo, 3 is the rude lonely soul, 4 is the good samaritan and 5 is the boss. This would be to match somehow the options above but this might not be the right ones, the point would be setting a few personality archetypes and choose the right sentences.

 

I know that I'm focusing a lot on the persuasion aspect, but in my opinion this is a key element of this interactions system. At least this is the thing that most annoys me in vanilla oblivion, not that I cannot ask marriage to the innkeeper's daughter, but rather all these other things khravv commented, like being the Champion of Cyrodiil and actualy be treaten like garbage, that a total stranger could share his/her most intimate secret with you, etc. Really, I can't imagine taking further interaction with NPCs without improving the persuasion system to a point that could, at very least, determine if two actors are "friends", "enemies", or simply they know each other, beyond the current faction-based disposition, wich is useful to make enemies but not friends or other kind of relationship.

 

 

3 - I absolutely agree with the modular stuff, and I actualy think this "slots" system would do the job, I only try to draw a procedure so all the NPC could have a "personality", with real preferences and "opinions" so it's not only that they act because of their needs, but because of their will, so don't look at it as an alternative or something incompatible with your suggestion, rather it's meant to make it richer and more complete. I have to assume you already have a procedure to make NPC take decisions based on their own preferences, because you mention so, but since I don't know how is this done in your mod all I can do is posting what I think that could be a feasible way to obtain it, and that's what I'm doing. If I'm going too far... I coudn't tell you, I haven't tried to make it, that's simply what I'd really like to see in the game.

Link to comment
Share on other sites

Well I'm certainly not trying to discourage you,but to keep it real so you don't end up with an unrealistic view of what is doable in oblivion. I am no expert modder but I know there are some serious problems when it come's to doing anything in oblivion. if it weren't for OBSE I wouldn't even bother. before you get to envolved with your dialog I suggest you spend some time there and get to know the limitations. when you start typing out your choices you get about half of a line in and run out of room.so you try to shorten it so it will fit and now it sounds stupid.I was really let down by this because it really kills the possibility of having a meaningful conversation. I was hoping that I could put in a request to the OBSE to address this problem but at the moment no one is work on it and v18 is still in beta.well I gota go now but do try it out so you know what your up against.
Link to comment
Share on other sites

grmblf

here is a link to my mod. if you download it you can get a better Idea of how it works and I

can answer you questions. I think you should use the template to create a compainion to work out

some of your Ideas and see what you come up with I will help you with some of the scripting if needed and you can show me what you have come up with.

http://www.tesnexus.com/downloads/file.php?id=28449

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...