NPC/companion scripting questions

Post » Fri Dec 31, 2010 11:36 am

Firstly I want to thank WillieSea for all of the help he's given me. :) Now I have some other scripting questions:

How would I script a recall teleporter? Say the NPC falls too far behind, how would I allow the player to call her to them?
If I wanted an NPC to sit and/or lie in a bed on command, do I just make a new package with those options active? Also, does the NPC have to stop following the player to do that?
Do NPCs automatically heal when you rest? If not, how can I implement that? Right now she'll do some basic healing after combat, but won't heal fully and I wanted to make sure she will if the player rested.
How do I tell an NPC that a particular cell is home (e.g. the house you can get in Megaton) and send her back there via dialog?
Are there problems with lowering an NPC's Bravery status from brave? Also, can I do that via dialog without having to create a new AI package?
I'm assuming that if I don't want the NPC to follow the player into the DLCs, I have to have those DLCs loaded so that I can reference the cells and/or quest stages to have her wait. Can I make a dummy cell to do that instead? I'm not sure if I want to write dialog for her for the DLCs, which is why I ask. Basically I don't want to have the mod dependent on the DLCs if I can avoid it.

Thanks in advance.
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Fri Dec 31, 2010 8:45 am

How would I script a recall teleporter? Say the NPC falls too far behind, how would I allow the player to call her to them?
You can use http://geck.gamesas.com/index.php/GetDistance to see how far away from the player they are and use http://geck.gamesas.com/index.php/MoveTo to bring them to the player.

If I wanted an NPC to sit and/or lie in a bed on command, do I just make a new package with those options active? Also, does the NPC have to stop following the player to do that?
A new AI package is needed that is conditioned. I am not too familiar with AI packages.

Do NPCs automatically heal when you rest? If not, how can I implement that? Right now she'll do some basic healing after combat, but won't heal fully and I wanted to make sure she will if the player rested.
You might try http://geck.gamesas.com/index.php/IsPCSleeping and if the player is, you can use http://geck.gamesas.com/index.php/ResetHealth on the follower.

Are there problems with lowering an NPC's Bravery status from brave? Also, can I do that via dialog without having to create a new AI package?
You could script it using http://geck.gamesas.com/index.php/GetActorValue.
http://geck.gamesas.com/index.php/Stats_List
http://geck.gamesas.com/index.php/Confidence

User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Fri Dec 31, 2010 7:33 am

Firstly I want to thank WillieSea for all of the help he's given me. :) Now I have some other scripting questions:


I suggest studying the game's regular followers - - examining their object scripts and such, and how their commands are made to work, including the topics for firing them. Those dialogue topics are in the "Followers" quest.

Any time the game's regular followers can do something which resembles what you want yours to do, you've got those regular followers right there as examples, to help.
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm


Return to Fallout 3