Lone Wanderer NPC

Post » Fri Nov 05, 2010 8:31 am

Thanks Bonedog, I'll give it a try

pkleiss has kindly done alot of work on the mod and has got her travel packages working now, to use your UseItemAt suggestion do I then put the command lines for the safe in the on end box or are they still better off as a safe script?
User avatar
Cesar Gomez
 
Posts: 3344
Joined: Thu Aug 02, 2007 11:06 am

Post » Fri Nov 05, 2010 7:28 pm

Thanks Bonedog, I'll give it a try

pkleiss has kindly done alot of work on the mod and has got her travel packages working now, to use your UseItemAt suggestion do I then put the command lines for the safe in the on end box or are they still better off as a safe script?

If you do use the Use Item At package, then she'll already be traveling there specifically to activate that safe, so no need to put anything in the package scripts at all. If it's a generic safe used by the rest of the game too, then go in the geck and change the ID of it, make it a custom safe (so every other safe like it wont do your script commands). Change the safe you have at her home location to the custom one (make sure the referrence name is the same), create and save the safe script, then add the script to the custom safe in its script dropdown box.
Maybe something like this:
ScriptName PamelaSafeScriptSCRShort PamelaAmmoCountShort PamelaStimpakCountShort PamelaCapsCountBegin OnActivate  if (IsActionRef lonewandererpamela01ref)    lonewandererpamela01ref.RemoveAllItems pamelawallsaferef    Set PamelaAmmoCount to pamelawallsaferef.GetItemCount Ammo556mm    Set PamelaStimpakCount to pamelawallsaferef.GetItemCount Stimpak    Set PamelaCapsCount to pamelawallsaferef.GetItemCount Caps001    pamelawallsaferef.Removeitem Ammo556mm PamelaAmmoCount    pamelawallsaferef.RemoveItem WeapChineseAssaultRifle 1    pamelawallsaferef.RemoveItem ArmorRaider04 1    pamelawallsaferef.RemoveItem Stimpak PamelaStimpakCount    pamelawallsaferef.RemoveItem Caps001 PamelaCapsCount    lonewandererpamela01ref.AddItem Ammo556mm PamelaAmmoCount    lonewandererpamela01ref.AddItem WeapChineseAssaultRifle 1    lonewandererpamela01ref.AddItem ArmorRaider04 1    lonewandererpamela01ref.AddItem Stimpak PamelaStimpakCount    lonewandererpamela01ref.AddItem Caps001 PamelaCapsCount    lonewandererpamela01ref.AddItem SlaveCollar 1    lonewandererpamela01ref.EquipItem SlaveCollar 1    lonewandererpamela01ref.RemoveItem SlaveCollar 1  else    Activate  endifEnd

User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Fri Nov 05, 2010 11:31 am

If you do use the Use Item At package, then she'll already be traveling there specifically to activate that safe, so no need to put anything in the package scripts at all. If it's a generic safe used by the rest of the game too, then go in the geck and change the ID of it, make it a custom safe (so every other safe like it wont do your script commands). Change the safe you have at her home location to the custom one (make sure the referrence name is the same), create and save the safe script, then add the script to the custom safe in its script dropdown box.
Maybe something like this:
ScriptName PamelaSafeScriptSCRShort PamelaAmmoCountShort PamelaStimpakCountShort PamelaCapsCountBegin OnActivate  if (IsActionRef lonewandererpamela01ref)    lonewandererpamela01ref.RemoveAllItems pamelawallsaferef    Set PamelaAmmoCount to pamelawallsaferef.GetItemCount Ammo556mm    Set PamelaStimpakCount to pamelawallsaferef.GetItemCount Stimpak    Set PamelaCapsCount to pamelawallsaferef.GetItemCount Caps001    pamelawallsaferef.Removeitem Ammo556mm PamelaAmmoCount    pamelawallsaferef.RemoveItem WeapChineseAssaultRifle 1    pamelawallsaferef.RemoveItem ArmorRaider04 1    pamelawallsaferef.RemoveItem Stimpak PamelaStimpakCount    pamelawallsaferef.RemoveItem Caps001 PamelaCapsCount    lonewandererpamela01ref.AddItem Ammo556mm PamelaAmmoCount    lonewandererpamela01ref.AddItem WeapChineseAssaultRifle 1    lonewandererpamela01ref.AddItem ArmorRaider04 1    lonewandererpamela01ref.AddItem Stimpak PamelaStimpakCount    lonewandererpamela01ref.AddItem Caps001 PamelaCapsCount    lonewandererpamela01ref.AddItem SlaveCollar 1    lonewandererpamela01ref.EquipItem SlaveCollar 1    lonewandererpamela01ref.RemoveItem SlaveCollar 1  else    Activate  endifEnd



Thanks Bonedog, I really will have to learn scripting but unlike every other part of the GECK there doesn't seem to be much in the way of tutorials out there.
pkleiss suggested a patrol package would work better for Pamela so I'll do that, make a Patrol then a Use Item At package

Thanks again
User avatar
Everardo Montano
 
Posts: 3373
Joined: Mon Dec 03, 2007 4:23 am

Post » Fri Nov 05, 2010 9:18 am

Just remember that using a Patrol package with all of her destinations in that one package will make her loose the ability to sandbox at each location. You can make her wait and perform idle animations by adding 'Patrol Data' to the objects you use as patrol points though.

You could also add a sandbox package above the patrol package that is set for a short duration and uses conditions like GetDistance [some patrol marker object] < [some distance]. You could string several conditions together using the 'OR' logical operator to include many of her patrol points. This would be similar to what the caravan merchants do when they get to certain locations. But you would also have to add a condition that checks a quest variable in such a way that the sandbox package only runs once before resuming the patrol package again. That quest variable could be set to a different value depending on the patrol point (set the quest variable in the patrol data results script) such that the quest script could then reset that variable after she moves far enough away from the patrol point so as not to trigger the condition again. Whew... I hope that wasn't too much.
User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Fri Nov 05, 2010 12:15 pm

Thanks Bonedog, I really will have to learn scripting but unlike every other part of the GECK there doesn't seem to be much in the way of tutorials out there.


So about scripting and learning it. I started working in the GECK at the beginning of Jan with zero coding experience. So I am now able to do some very little amount of scripting and I would say that the tuts to look at are Cipscis'

http://www.cipscis.com/fallout/tutorials/beginners.aspx

His "Scripting for Beginners" tut is great.

And this may sound weird, but I just go through the scripts of the game to see how stuff is written and study it. I also read all the threads here and read the scripts people post and the problem solving in the threads to see how different people do things. Sure, I still don't understand most things about scripting, but I've learned enough to do most of the things I've wanted to do so far :)
User avatar
Laura Tempel
 
Posts: 3484
Joined: Wed Oct 04, 2006 4:53 pm

Post » Fri Nov 05, 2010 11:34 am

So about scripting and learning it. I started working in the GECK at the beginning of Jan with zero coding experience. So I am now able to do some very little amount of scripting and I would say that the tuts to look at are Cipscis'

http://www.cipscis.com/fallout/tutorials/beginners.aspx

His "Scripting for Beginners" tut is great.

And this may sound weird, but I just go through the scripts of the game to see how stuff is written and study it. I also read all the threads here and read the scripts people post and the problem solving in the threads to see how different people do things. Sure, I still don't understand most things about scripting, but I've learned enough to do most of the things I've wanted to do so far :)


Cheers llamaRCA

That page has never shown on my google searches, appreciate the link
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Fri Nov 05, 2010 6:37 am

pkleiss suggested a patrol package would work better for Pamela so I'll do that, make a Patrol then a Use Item At package

Is good advice. All my wandering NPCs have been doing their own thing since I changed over to using patrol a while back.. and not one issue since. They go through just about every major area in between their farthest patrol points, so I'm finding a lot more fresh kills lying around that I didn't make, and finding something to shoot is getting more difficult. Granted that's my fault for unleashing about 12 of them out on the wasteland armed with my 10mm explosive round automatic flash pistols.
User avatar
Je suis
 
Posts: 3350
Joined: Sat Mar 17, 2007 7:44 pm

Post » Fri Nov 05, 2010 10:00 pm

Oh dang I came in hoping this was a topic about scripting a separate NPC who would act as the main character (you) so your character could actually play a whole different role in the story. Now that would be really cool. But I bet that would be a monumental task considering all the different events triggered by variables based on the player, player's faction, race, journal/quest flags, etc. Still, would be a helluva killer mod to roll up a character and wander the wastes while the actual MQ unraveled in front of you based on the actions of the new "Main Character" played by a NPC.
User avatar
Joanne Crump
 
Posts: 3457
Joined: Sat Jul 22, 2006 9:44 am

Previous

Return to Fallout 3