[WIPz] NPC ACE - NPC Advanced Control Engine

Post » Wed Mar 30, 2011 3:15 am

Well, Umpa has many animations that could be nicely combined with new movements to get very good chorus line shows.
I may, every now and then, improve this mod with some ideas I did not use, like new shows or a quest line. There is even room for some romance.

As I see it, the mod has accomplished its objective, which was being the base for developing the NPC control engine.
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Wed Mar 30, 2011 12:31 pm

So, about buying and selling, will it affect items in a transaction, or is it "fake"?
User avatar
james reed
 
Posts: 3371
Joined: Tue Sep 18, 2007 12:18 am

Post » Wed Mar 30, 2011 2:20 pm

I am not sure what buying & selling you are talking about.

I don't have buying & selling in this mod and I am not planning on having it in the next.

But the script engine supports this feature. As every stage has a script controlling it, you could script a "Go buy food" activity composed by a "Go to the Bakery" + "Buy bread" + "Go home" actions/stages.
In the "Buy Bread" script, you could exchange money and bread between the NPC and the baker. And it would not be a fake, as the bread would actually be added to the NPC inventory.

You could create a whole, realistic micro economy, where NPCs would earn money from their trade and spend it on their daily needs. If I remember it correctly, this was one of the features of the "NPC with Jobs" mod.
User avatar
Sarah Unwin
 
Posts: 3413
Joined: Tue Aug 01, 2006 10:31 pm

Post » Wed Mar 30, 2011 2:25 pm

Main objectives
?Allow for activities involving more than one NPC (Buy&Sell, dating, etc)

So buying and selling is just an example then, and not a real part of the mod. But it is supported through the engine. That's good.
User avatar
Bek Rideout
 
Posts: 3401
Joined: Fri Mar 02, 2007 7:00 pm

Post » Wed Mar 30, 2011 10:11 am

Yes, Buy&Sell, dating and several others examples I mentioned were just examples.

So far, in this ''prototype" mod I have these kinds of activities:
- Go To - several
- Wander - at the dock, at the bar, at the theater
- Seat - at the bar, at the theater
- Drink - at the bar, at the theater
- Acquire Partner - select a partner
- Drink with partner - NPC and partner go to a table, have a drink and chat.

(Worth mentioning that there are only bohemian (?!) activities because the controlled NPCs are only 'active' between 9:00 PM and 3:00 AM. During the day they are disabled in a hidden cell)
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am

Post » Wed Mar 30, 2011 7:20 am

I am seriously considering give it a try with vanilla NPCs.

As a prototype, I am thinking about selecting one area and control all NPCs native to that area. The area would be the Anvil dock. It has about 20 'natives', which seem a good number to work with.

The general idea is just to override their original AI packages with similar packages controlled by the ACE engine. Just to see what kind of problems will arise.

They would just continue doing what they do, but I would like to add a very small behavior change.
The only small thing I could think of is they changing clothes from day to day.
Also they could consider the weather outside and dress appropriately.

What do you think? Any other VERY SMALL behavior suggestion.
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Post » Wed Mar 30, 2011 3:18 am

I am seriously considering give it a try with vanilla NPCs.

As a prototype, I am thinking about selecting one area and control all NPCs native to that area. The area would be the Anvil dock. It has about 20 'natives', which seem a good number to work with.

The general idea is just to override their original AI packages with similar packages controlled by the ACE engine. Just to see what kind of problems will arise.

They would just continue doing what they do, but I would like to add a very small behavior change.
The only small thing I could think of is they changing clothes from day to day.
Also they could consider the weather outside and dress appropriately.

What do you think? Any other VERY SMALL behavior suggestion.


I think that is a very good idea. Especially the changing clothes part. I think there is a mod that does that already (made by corepc if I remember correctly) but it handles it in a completely different way from what your engine would, yours presumably being more efficient. this really isn't a suggestion, more of a question actually. Could this engine possible tell the NPC's when it's raining so they could go inside? Or change their clothes in the middle of the day if the weather takes a turn for the worst? How about just popping inside for a second and putting a hat on when it's rainy?
Sorry for all the questions, this just really intrigues me.

Ravin
User avatar
Nina Mccormick
 
Posts: 3507
Joined: Mon Sep 18, 2006 5:38 pm

Post » Wed Mar 30, 2011 3:46 am

I am seriously considering give it a try with vanilla NPCs.

As a prototype, I am thinking about selecting one area and control all NPCs native to that area. The area would be the Anvil dock. It has about 20 'natives', which seem a good number to work with.

The general idea is just to override their original AI packages with similar packages controlled by the ACE engine. Just to see what kind of problems will arise.

They would just continue doing what they do, but I would like to add a very small behavior change.
The only small thing I could think of is they changing clothes from day to day.
Also they could consider the weather outside and dress appropriately.

What do you think? Any other VERY SMALL behavior suggestion.


The fight that takes place every night involving Hauls Ropes Faster may be a good place to test your engine, Simple suggestion, have the fight rake place in doors i the weather is bad.

would it be possible to introduce random bar fights into the Anvil dockside pub?
User avatar
Connor Wing
 
Posts: 3465
Joined: Wed Jun 20, 2007 1:22 am

Post » Wed Mar 30, 2011 6:10 am

I think that is a very good idea. Especially the changing clothes part. I think there is a mod that does that already (made by corepc if I remember correctly) but it handles it in a completely different way from what your engine would, yours presumably being more efficient. this really isn't a suggestion, more of a question actually. Could this engine possible tell the NPC's when it's raining so they could go inside? Or change their clothes in the middle of the day if the weather takes a turn for the worst? How about just popping inside for a second and putting a hat on when it's rainy?

I've never messed with weather but, browsing thru the functions, it seems I can only know the weather of the current player cell, so most of the [good] ideas you mentioned can be done for NPCs around the player.

Like: player is wandering around the docks, starts raining, NPCs run inside or put a raincoat, or open an umbrella (btw, any links for lower class raincoats, hats or umbrellas resources?)

Also, If the player is outside and it is raining, it would be possible to make NPCs inside the buildings decide not to go out.

I think the problem will be when the player is in an interior cell. There may not be a way to know the outside weather in advance, so NPCs will go out anyway. And if the player goes out and it is raining, NPCs would start running for cover as if the rain has just started.

The fight that takes place every night involving Hauls Ropes Faster may be a good place to test your engine, Simple suggestion, have the fight rake place in doors i the weather is bad.

would it be possible to introduce random bar fights into the Anvil dockside pub?

Good point. Making them fight inside may well be possible.
Since I would have to make those two guys fight anyway, it may not be too much work to expand it to random bar fights.
User avatar
Spaceman
 
Posts: 3429
Joined: Wed May 23, 2007 10:09 am

Post » Tue Mar 29, 2011 11:33 pm

The Bar fights would be non-lethal right? We need a script that makes it when someone's health is lowered to a certain point in Hand-to-Hand combat, they are knocked unconscious.

It would be awesome if someone made a mod that used this system to bit-by-bit replace almost all of the NPCs in Cyrodiil.
User avatar
adam holden
 
Posts: 3339
Joined: Tue Jun 19, 2007 9:34 pm

Post » Wed Mar 30, 2011 2:39 pm

I suppose.
As I said before, I have no experience with combat. But I think it is just a matter of doing the same thing as the vanilla game does.

From a quick browsing into their AI, it does not seem to have anything to prevent them from killing each other. They just fight for 2 hours every night. I suppose their stats are such that 2 hours of hand fighting is not enough to drain their heath to zero.
User avatar
Trey Johnson
 
Posts: 3295
Joined: Thu Oct 11, 2007 7:00 pm

Post » Wed Mar 30, 2011 7:11 am

Oh, okay. I still think it would be fun to walk into a bar and see an unconscious drunk on the floor every once in a while.
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm

Post » Wed Mar 30, 2011 7:53 am

And if the player goes out and it is raining, NPCs would start running for cover as if the rain has just started.
That effect was done beautifully in The Witcher. Traveling NPCs start to run when it begins to rain and those idling in the open move under architectural outcrops.

From a quick browsing into their AI, it does not seem to have anything to prevent them from killing each other. They just fight for 2 hours every night. I suppose their stats are such that 2 hours of hand fighting is not enough to drain their heath to zero.
They're probably in a Special Combat enabled faction. That allows them to fight each other without attracting the guards. I also believe it prevents them from taking any damage.
User avatar
Pat RiMsey
 
Posts: 3306
Joined: Fri Oct 19, 2007 1:22 am

Post » Wed Mar 30, 2011 5:50 am

Lol. I spent some time tring to find The Witcher mod. There is one at the Nexus, but the file is missing. I finally googled it and found out that there is a game called The Witcher. Maybe I should add this to the thread "You've been modding Oblivion for too long when... ": . . . when you don't know about the new games on the market.

As for the fight, I figured it out: they are not really fighting each other. That is a clever use of UseItemAt with "Weapons NONE" as the Object type. So they are just playing a fighting animation, pretty much like drinking or painting. Therefore, no damage inflicted.
But I may use the Special Combat you mentioned, instead.
User avatar
Laura Cartwright
 
Posts: 3483
Joined: Mon Sep 25, 2006 6:12 pm

Post » Tue Mar 29, 2011 10:24 pm

Lol. I spent some time tring to find The Witcher mod. There is one at the Nexus, but the file is missing. I finally googled it and found out that there is a game called The Witcher. Maybe I should add this to the thread "You've been modding Oblivion for too long when... ": . . . when you don't know about the new games on the market.

As for the fight, I figured it out: they are not really fighting each other. That is a clever use of UseItemAt with "Weapons NONE" as the Object type. So they are just playing a fighting animation, pretty much like drinking or painting. Therefore, no damage inflicted.
But I may use the Special Combat you mentioned, instead.
Hehe ... given the work you've been doing, I concur.

Ah ... but they probably are a part of a special faction that has that flag, similar to the 2 in the Arena district.
User avatar
Sakura Haruno
 
Posts: 3446
Joined: Sat Aug 26, 2006 7:23 pm

Post » Wed Mar 30, 2011 7:59 am

I've never messed with weather but, browsing thru the functions, it seems I can only know the weather of the current player cell, so most of the [good] ideas you mentioned can be done for NPCs around the player.

Like: player is wandering around the docks, starts raining, NPCs run inside or put a raincoat, or open an umbrella (btw, any links for lower class raincoats, hats or umbrellas resources?)

I think the problem will be when the player is in an interior cell. There may not be a way to know the outside weather in advance, so NPCs will go out anyway. And if the player goes out and it is raining, NPCs would start running for cover as if the rain has just started.


Well I spent a while searching but all I could find is these.
http://www.tesnexus.com/downloads/file.php?id=8264 (Permissions granted as long as credit is given)
http://www.tesnexus.com/downloads/file.php?id=9558 Not sure about permissions on this one.
There doesn't seem to be any raincoats or umbrellas.
But maybe http://tesnexus.com/downloads/file.php?id=4539 would work? That one is a resource. There are many mods that add cloaks though.

I think the problem will be when the player is in an interior cell. There may not be a way to know the outside weather in advance, so NPCs will go out anyway. And if the player goes out and it is raining, NPCs would start running for cover as if the rain has just started.


There's a mod called All Natural that played the sound effects from the weather outside while you are inside. I'm not sure how it's done but you may want to talk to the Project leader (I think) Arthmoor to see how it's done.

Ravin
User avatar
Rowena
 
Posts: 3471
Joined: Sun Nov 05, 2006 11:40 am

Post » Tue Mar 29, 2011 10:40 pm

Well I spent a while searching but all I could find is these.

Hey, thanks.
I will download and check them in game, but, from the pictures, they seem a little too fancy for mere sailors. The hats may be OK, thou.
But now that you mentioned cloaks, it occurred to me that vanilla clothes has a few lower class robes with matching hoods. It seems that the Grey, Tan and Tattered ones may look good as raincoats.

There's a mod called All Natural that played the sound effects from the weather outside while you are inside. I'm not sure how it's done but you may want to talk to the Project leader (I think) Arthmoor to see how it's done.

I will check, thanks.
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Wed Mar 30, 2011 9:30 am

I've been applying the ACE engine on the vanilla NPCs at the Anvil Docks area.
Very interesting, as it raised several new requirements.

Quick update:
The most important change is that I added a new, higher level to the "Activity-composed-of-Stages" concept. What was called Activity is now BaseActivity. Same concept as before, just a name change (hard to find proper names for these things).
Now it is Activity-composed-of-BaseActivities-composed-of-Stages.

Example:
Activity "Lunch" (eat for 1.5 hours, sometime between 11AM and 2PM)
BaseActivities - Eat at Bar01 (80%) or Eat at Bar02 (20%)
Each base activity composed of stages (1) go to barXX and (2) eat at BarXX

The top level activity is used to filter the BaseActivities that are candidates at the moment. For example: at 7PM, the BaseActivity candidates would from the Activities like: "Dine", "Drink" and "Wander", but not "Lunch" or "Work".

The good news is that it may not be necessary to use tokens at all. So far, it has been just a matter of generating the timer event more often.

Another good news is that it may not be necessary to remove the original AI packages. I ran into some problems when, sometimes, the NPC loses (??) his added package and reverts to his original packages. I added a check to detect if the NPC is running a vanilla package (FormID=00xxxxxx) and reapply the added package. So far, so good.

And, if memory serves, except for the added scripts, quests and packages, the only change to the vanilla environment is an XMarker I dropped at The Focsle.
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Wed Mar 30, 2011 4:32 am

Sounds Awesome!

I'm glad that there's progress with vanilla npcs.

I'm not sure I can bring myself to reinstall oblivion before this mod comes out.
User avatar
Emma Copeland
 
Posts: 3383
Joined: Sat Jul 01, 2006 12:37 am

Post » Wed Mar 30, 2011 6:11 am

This sounds really interesting. As an experienced SW developer, I can guess how much work you've put into this, and I'm really impressed by how you have designed this. It almost make me want to mod NPCs when you're done :)
User avatar
Dale Johnson
 
Posts: 3352
Joined: Fri Aug 10, 2007 5:24 am

Post » Wed Mar 30, 2011 11:51 am

Here we go: uploaded it to the http://www.tesnexus.com/downloads/file.php?id=20878. Filename: QQuix Conceptual - NPC ACE - Anvil Docks - Beta 0.1.7z

It takes control of 10 NPCs in the Anvil docks area and I tried to replicate their schedules as in their original AI packages. Actually, I elaborated them a bit, as they were rather simple.
I left alone the NPCs that are quest related, as Lelles, Hirtel and the three rogues.

Therefore, they should go about their normal, vanilla lives, including the fight between Hauls-Ropes-Faster and Thurindil.

Also, every morning, they will wear a new set of clothes (from the vanilla lower class clothes)

Besides that, it makes the NPCs aware of the weather:
- If they are outside, on their way to some interior area, and it starts raining, they will run to their present destination.
- If they are outside, in a wander package, they will abort their activity, select a new, indoors one, and run to that destination.
- If they are indoors and it is raining, they will not select an outdoors activity, but they may decide to go to another indoors location.
- Whenever they leave home and it is raining, they will wear a raincoat (actually a robe and hood). That raincoat will stay in their inventory until they come back home. Home being their editor location.
- Whenever they are outdoors, it is raining and they have a raincoat, they will wear it and walk to their destination (instead of running).

I did not implement the bar fights yet.

If you look into the scripts, you may notice that they are not quite as described originally in the first post. That description represented my original development for the Anvil Red Light District mod, which is still in beta test (should be out by now, but I've been out of touch with the beta testers since Christmas - their site was down).

This as a variant (improved?) version of the first one. I already mentioned some differences a few posts back. I will post the updated description sometime this coming week.

If you plan to look at the scripts, start with the very first one: aaaaqqacDocsSCRIPT. It contains some comments about the code, including notes on the naming convention I use.

As I mentioned in the first post, I did not removethe log system I have in place to track scripts. Very useful for debugging. Designed to work with shadeMe's Conscribe, it spits hundreds (thousands?) of lines per second to the console. It is originally turned off. To turn it on, go to the user function zzzInitializeMod and change the line "let g.bDesvMode := 0" to "let g.bDesvMode := 1" and restart the game from a clean save. I must write a Wiki article about it someday.

Hope someone has the interest and the patience to check and use these scripts. As always, comments and suggestions are welcome, as there certainly is a lot of room for improvement.
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Wed Mar 30, 2011 10:34 am

This looks like how the "Radiant AI" is supposed to work. I might take a look at the scripts later. I do have a question, though. Does script containing thousands of lines will bog computer's performance down when working in conjunction with dozens of other similar scripts (quest and object)? I tried to implement some "advanced behavior" to the existing guards, but I suspect it might led to stuttering and other anomaly if it requires many scripts containing tens of thousands of lines (with routines).
User avatar
Tarka
 
Posts: 3430
Joined: Sun Jun 10, 2007 9:22 pm

Post » Tue Mar 29, 2011 11:45 pm

A large size and/or large quantity of scripts don't, necessarily, mean that they will drag CPU resources.
It really depends on what they do and how frequently they run.

In general, scripts don't affect performance enough to be noticeable, unless of course they do some heavy stuff every single frame. But, even doing just a little, they add up, therefore it is always good practice for scripters to try to reduce processing as much as one can.

In this particular engine, although there are dozens of scripts, they only run from every few seconds (for NPCs going from one place to another) to every few minutes (for NPCs doing things like eating, wandering or sleeping) per NPC.

Therefore, even with 100 NPCs, I still would not have one NPC processed per frame, which, I believe, is pretty light on CPU.
User avatar
Fanny Rouyé
 
Posts: 3316
Joined: Sun Mar 25, 2007 9:47 am

Post » Wed Mar 30, 2011 1:47 am

Any news ?
User avatar
abi
 
Posts: 3405
Joined: Sat Nov 11, 2006 7:17 am

Post » Wed Mar 30, 2011 2:05 pm

No feedback since I uploaded, a week ago.

As it is in a group with a big headline: "THESE ARE NOT PLAYABLE MODS", I don't expect any downloads or feedback from the general public.

I suppose it will take a while until some modder gets interested enough to try it, dig into the code and use it to do something else.
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

PreviousNext

Return to IV - Oblivion