[RELz] AP - Automatic Patrols

Post » Wed Aug 03, 2011 1:43 pm

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


Check out the Automatic Patrols http://www.youtube.com/watch?v=dp6S61ageV4&feature=player_embedded!

Automatic Patrols is a system that allows the user to easily put any creature on a patrol route. These patrol routes are automatically and procedurally generated and work in any area that has pathgrids: Dungeons, wilderness, cities, Oblivion gates, etc.

Keep on your toes and prepare to be surprised, as the dungeons will be much more alive. Patrols just might decide to come at you from behind, or wander into an area you thought was clear of monsters!

This system has also been integrated into Dynamic Leveled Lists (link below), to will make a percentage of every spawn in your entire world patrol automatically. So, if that sounds more appealing to you, then head on over to the DLL page!

This is more of a modder's resource if they want to make a mod that has the Automatic Patrol system, but don't want to have the entire DLL package as a requirement.

Please refer to the Automatic Patrols readme for more information! 8)

The most up to date http://www.afterimagemetal.com/AutomaticPatrolsReadme.html .
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Wed Aug 03, 2011 6:31 am

That's pretty neat! :)

EDIT: Quick look at scripts and I noticed APPatrolScriptInitialize does not nullify the array variables.
User avatar
Anna Krzyzanowska
 
Posts: 3330
Joined: Thu Aug 03, 2006 3:08 am

Post » Wed Aug 03, 2011 10:26 pm

You really know how to mak good videos and graphics, Lev! I really liked that about your other mods - and this is no coming short either :)

Congrats on this release - I see that you decided to make this separate from DLL and I am glad you did too! :)
User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Wed Aug 03, 2011 9:57 am

@Kyoma
Thanks! 8)

As for the array variables issue, I didn't think it was necessary. Take this quote from the OBSE manual:
"OBSE keeps track of the number of references to each array and destroys the array when no references to it remain. This makes it unnecessary for scripts to worry about destroying arrays explicitly. "

@Anithinks
Automatic Patrols is also packed into Dynamic Leveled Lists, as DLL allows the script to be easily applied to everything in the world. Automatic Patrols is just a detachment for people that want AP for certain creatures, without requiring the entire DLL package.
User avatar
Chris Cross Cabaret Man
 
Posts: 3301
Joined: Tue Jun 19, 2007 11:33 pm

Post » Wed Aug 03, 2011 8:52 pm

How does this work? Does it affect all creatures/spawns? Are you able to pick which spawns/creatures/npcs get patrol routes?
User avatar
john palmer
 
Posts: 3410
Joined: Fri Jun 22, 2007 8:07 pm

Post » Wed Aug 03, 2011 3:25 pm

@Kyoma
Thanks! 8)

As for the array variables issue, I didn't think it was necessary. Take this quote from the OBSE manual:
"OBSE keeps track of the number of references to each array and destroys the array when no references to it remain. This makes it unnecessary for scripts to worry about destroying arrays explicitly. "

True, you don't have to destroy array vars but you do need to inform OBSE that a script no longer needs/uses that array variable. Otherwise the array var will always keep 1 reference and thus continue to exist. Even though no script uses it anymore. And each time the user function is called a new array var is created.
User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Wed Aug 03, 2011 10:34 pm

I believe you're correct for things like quest scripts.

However, the scripts you're referring to are User Defined OBSE scripts that are called by the initializing quest, run, and then are closed. All the array variables you stated are local to those user functions, and so their references are destroyed, and consequently, the arrays. Similar to calling a function in C++, you never have to destruct your local int variables and whatnot, and any custom structure has a destructor that cleans up. OBSE has its own array destructor that cleans up the array when the user function closes and there are no more references anymore.

If the array variables were part of a quest script that never went out of scope, then I would have to make the array variables null for them to be destroyed. But I think everything I've done in AP are definitely safe.
User avatar
danni Marchant
 
Posts: 3420
Joined: Sat Oct 07, 2006 2:32 am

Post » Wed Aug 03, 2011 3:25 pm

How does this work? Does it affect all creatures/spawns? Are you able to pick which spawns/creatures/npcs get patrol routes?


Yes and no, Automatic Patrols lets you pick which creatures will go on patrol. Just attach the "APattachmentScript" to the creature/NPC in CS or Tes4edit, and when it spawns it will have a percent chance to go on patrol. And of course, you can set the percent chance in the ini.

If you want this script attachment to be done automatically, you'll have to install Dynamic Leveled Lists instead (linked below).

AP is the "modder's resource" version that doesn't require DLL.
User avatar
He got the
 
Posts: 3399
Joined: Sat Nov 17, 2007 12:19 pm

Post » Wed Aug 03, 2011 6:20 am

....
Doh! Yea you're right, I mixed up array vars with string vars there for a moment. Please forget my disturbance. :blush:
User avatar
Sammi Jones
 
Posts: 3407
Joined: Thu Nov 23, 2006 7:59 am

Post » Wed Aug 03, 2011 7:23 am

8) No worries!
I always appreciate people double checking my work. I'd rather have it right then never be disturbed.. XD
User avatar
Milad Hajipour
 
Posts: 3482
Joined: Tue May 29, 2007 3:01 am

Post » Wed Aug 03, 2011 9:31 am

Yes and no, Automatic Patrols lets you pick which creatures will go on patrol. Just attach the "APattachmentScript" to the creature/NPC in CS or Tes4edit, and when it spawns it will have a percent chance to go on patrol. And of course, you can set the percent chance in the ini.

If you want this script attachment to be done automatically, you'll have to install Dynamic Leveled Lists instead (linked below).

AP is the "modder's resource" version that doesn't require DLL.


I see... thanks. I just watched the video (was at work earlier), dude - it looks amazing. Your mods have been really impressive! I especially like the loading screens ones.

Back to this though - it is also quite remarkable to think about how much Oblivion needed something like this. I am going to go ahead and give this a go. Thanks for your hard work.
User avatar
Olga Xx
 
Posts: 3437
Joined: Tue Jul 11, 2006 8:31 pm

Post » Wed Aug 03, 2011 6:35 pm

Great idea! This with DLL should make those tedious dungeon crawls much more exciting.

Thanks!
User avatar
Rodney C
 
Posts: 3520
Joined: Sat Aug 18, 2007 12:54 am

Post » Wed Aug 03, 2011 10:13 pm

Neat idea! Keep up the bad work :thumbsup:
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm


Return to IV - Oblivion