Relax AI

Post » Sun May 16, 2010 7:01 am

Hello everyone, I am making a mod which will add the option to Relax to the followers in FO3. What I am trying to do is copy the default wait package and just duplicate everything just like the wait command but make it sandbox type of package so that the followers wander around and do idle animations.

I will add pictures because you can see everything that I have done and tell me if something is wrong. My though was to do Charon first so I did and when I "finished" the dialogue appeared but when I pressed it he said what he was supposed to however he did not start the package. I know it's simple and that I am maybe missing something little but here are screens:

http://img709.imageshack.us/img709/7282/relaxtopic.jpg
http://img535.imageshack.us/img535/2069/charoncondition.jpg
http://img683.imageshack.us/img683/6320/letsgotopic.jpg

The script is the default follower script i just added short relax ( I dont know if thats correct seems to make sense, I am new to modding)

SCN CharonSCRIPTshort 	CharonKillAhzrukhalSceneStartshort	CharonKillAhzrukhalSceneKillshort	CharonKillAhzrukhalSceneTalkToPlayershort 	HasBeenHiredshort	WeaponOutshort	CombatStyleRangedshort	CombatStyleMeleeshort	IsFollowingDefaultshort	IsFollowingShortshort	IsFollowingLongshort	Waitingshort Relaxfloat	TimerBEGIN OnDeath	set DialogueUnderworld.CharonDead to 1ENDBEGIN OnActivate	if ( CharonKillAhzrukhalSceneStart != 1 ) && ( CharonKillAhzrukhalSceneKill != 1 )		activate	endifENDBEGIN OnCombatEND	if ( GetPlayerTeammate == 1 )		resethealth		restoreav perceptioncondition 100		restoreav endurancecondition 100		restoreav leftattackcondition 100		restoreav leftmobilitycondition 100		restoreav rightattackcondition 100		restoreav rightmobilitycondition 100	endifENDBEGIN OnDeath		set CharonKillAhzrukhalSceneKill to 0		set CharonKillAhzrukhalSceneStart  to 0		if ( Followers.CharonHired == 1  )			set Followers.PlayerHasFollower to 0			set Followers.CharonHired to 0			ShowMessage FollowerMessageDeadCharon		endifEND

User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Sun May 16, 2010 12:43 pm

Looks like you did it right in what you posted. Only problem I can think of is the sandbox package's position in the AI Package list. For it to work as you have set it up you will need that package to be at the top of the list. You Should add set CharonRef.relax to 0 in the other commands like the distance options.
User avatar
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Sun May 16, 2010 11:30 am

I agree, the packages are eveluated from top down and the first package whos conditions are met will be picked. So put the most specific packages at the top and the more general ones at the bottom. Most likely, since you did not change the follow variabe, one of the follow packages is being picked instead of your relaxed one. You can also add more conditions to the packages to ensure only one will ever be picked in any circumstance, but changing the package order should work in your case.
User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am

Post » Sun May 16, 2010 5:23 pm

Two things:

1) Did you add the package into the list on his AI Packages Tab on his NPC page?

2) There is already a mod that does exactly this if you are interested: http://www.fallout3nexus.com/downloads/file.php?id=2581.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Sun May 16, 2010 7:29 pm

In this screenshot you meant to show the condition, but, I can see the package list on the follower to the left: http://img535.imageshack.us/img535/2069/charoncondition.jpg

That package of yours is way too low in the list. You can move them up and down with these little arrow boxes, but, it glitches sometimes and blanks the window out, then you have to kinda select another tab and come back to see the package list again.

You prolly want to place the new package directly above "wait", and give some thought to eliminating the possibility of applying both WAIT and RELAX commands at the same time because it doesn't make sense. You could disallow the WAIT dialogue if RELAX variable is already set, and visa versa, or script a toggle so that relax toggles wait off, etc.

And yeah it's been done before, but if you're looking for a learning thing, there's nothing wrong with making your own.
User avatar
aisha jamil
 
Posts: 3436
Joined: Sun Jul 02, 2006 11:54 am

Post » Sun May 16, 2010 3:10 pm

Thank to everyone for the responses.

I knew it was something simple that I was missing anyway it sort of works now for example if I tell him to Wait he waits and if I tell him to relax he relaxes however its a bit buggy. What I mean is if I tell him to wait and then come back to him the first command "lets go" is missing and the other two "Nah, I just wanted to speak to you about sometihng", "No Im just checking if you are here" are there. Also if I tell him to relax and come back to him it will just open the standard menu not the one with the three options to follow, talk and just checking if hes still there. It's kind of confusing if anyone has ideas please help otherwise I can upload the esp if someone wants to take a look at it and tell me whats wrong so that I can fix it (I'd be very grateful).

BTW: I know that there is Relax mod for the followers however its that mod that made me start mine. The reason being is that it lacks the option to just wait, the modder just changed the wait packages to sandbox which just doesn't cut it for me.
User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Sun May 16, 2010 10:09 am

Those problems are based on you dilaogue and the topics available under the circumstances. You probablt need to tick top level for the missing command, and you may need to add some condition and/or setup some conditions for the latter issue. Like if the follower is on the Relaxed package, then you need a condition that the dialogue topic(s) you want are conditioned to happen when that package is active and also that no other infos within the topic will evaluate true instead. The infos evalute like the packages, top down. The first one that evaluates true will be used. So, again, put the more specific responses at the top of a topic and the more (repeated) general ones near the bottom and ensure that only the one you want will occur under the circumstances it was designed for by using conditions.
User avatar
MarilĂș
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Sun May 16, 2010 6:31 pm

I've done what you said, actually I have made it identical to the default wait option just replaced the wait conditions with Relax. The default wait function is working as it should now also it's really weird as when i tell him to relax he starts the package and when I talk to him again its like I didnt tell him that but the package has turned on and also the one to tell him to follow again is working its just not giving me the option to select it when I talk to him for the first time after i have told him to relax.

I tested it by checking the top-level box and the results were as expected when I spoke to him for first time there was no "follow" option but when I clicked on relax and talked to him again it appeared (along with the rest which shouldnt) and it worked, he started to follow me. So the problem is to make the follow option appear after I told him to relax. It should work its the same method.

Heres screen of the http://img705.imageshack.us/img705/6406/condition.jpg

As I understand it what it does is if Relax package = 1 it shows the text and if the text is clicked it plays the end script. It just doesnt show only that text when Relax = 1


sry for being a bit of a noob ;]
User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Sun May 16, 2010 12:39 pm

It looks like that topic does not have top level ticked, so it won't show up as an option until some other topic points to it using the choices box. Basicly for every initial option that the player sees on screen (after the GREETING), the coresponding topic must either be ticked as top level (or the AddTopic command has to be used in a script somewhere prior) to be seen. Topics that don't have the top level ticked can be seen only after they are pointed to by some other topic (like using the choices box).
User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Sun May 16, 2010 6:38 am

BTW: I know that there is Relax mod for the followers however its that mod that made me start mine. The reason being is that it lacks the option to just wait, the modder just changed the wait packages to sandbox which just doesn't cut it for me.


Sorry if I sounded crabby when I told you about the other mod's existence. I thought you might be interested in knowing it's there so you could go check it out if you wanted to do so. :) I completely agree with you that the companions should have their default wait/guard option and a sandbox one as well.

I knew it was something simple that I was missing anyway it sort of works now for example if I tell him to Wait he waits and if I tell him to relax he relaxes however its a bit buggy. What I mean is if I tell him to wait and then come back to him the first command "lets go" is missing and the other two "Nah, I just wanted to speak to you about sometihng", "No Im just checking if you are here" are there.


Have you solved this? I've very recently gone through all of this myself, as I'm a newb as well, and am doing a mod that completely revamps Charon, and I've successfully implemented what you are attempting to do. Packages are a pain (seriously I hate them) but I found a thread at some point that made it very clear to me how to do it and after that I was able to set him up with about five packages and his Sandbox package that lets him do whatever (he wanders around and does stuff) and they never interfere with each other. It sounds like you are still having weirdness issues. Are they just dialogue issues or are you uncertain if he is going in and out of the packages like he should?
User avatar
Lexy Dick
 
Posts: 3459
Joined: Mon Feb 12, 2007 12:15 pm

Post » Sun May 16, 2010 6:10 am

I've done what you said, actually I have made it identical to the default wait option just replaced the wait conditions with Relax. The default wait function is working as it should now also it's really weird as when i tell him to relax he starts the package and when I talk to him again its like I didnt tell him that but the package has turned on and also the one to tell him to follow again is working its just not giving me the option to select it when I talk to him for the first time after i have told him to relax.

I tested it by checking the top-level box and the results were as expected when I spoke to him for first time there was no "follow" option but when I clicked on relax and talked to him again it appeared (along with the rest which shouldnt) and it worked, he started to follow me. So the problem is to make the follow option appear after I told him to relax. It should work its the same method.

Heres screen of the http://img705.imageshack.us/img705/6406/condition.jpg

As I understand it what it does is if Relax package = 1 it shows the text and if the text is clicked it plays the end script. It just doesnt show only that text when Relax = 1


sry for being a bit of a noob ;]


It sounds like your dialogue conditions aren't well tuned.

Like, if the follower is already in "relax" mode, you want to deny the ability to tell him to relax again (or in fact, deny ability to request wait). You want all of that stuff clean or it can become nasty. And the cancellation for Relax should be combined with the cancellation for Wait, and the result script should cancel both variables.

DO NOT FORGET TO CHARONREF.EVP AFTER EVERY SINGLE VARIABLE CHANGE
User avatar
Makenna Nomad
 
Posts: 3391
Joined: Tue Aug 29, 2006 10:05 pm

Post » Sun May 16, 2010 8:40 am

Thank you guys I will remmeber that. I fixed it yesterday after Pkleiss mentioned greetings then I looked at the greeting topic and saw that I was missing a greeting of my own which then I linked to check if Relax = 1 then display my text, I used the choices box and now it works just like the wait command :)

Well the hardest part ( for me xD) is done now to add the function to the rest of the companions.
User avatar
Avril Louise
 
Posts: 3408
Joined: Thu Jun 15, 2006 10:37 pm


Return to Fallout 3