New Perk

Post » Tue Aug 09, 2011 3:53 am

I've created a new perk and would like it to be given to the player upon activating the mod. How can I do this?

Also, I'm trying to make the perk give the player the option to make a body disappear. How can I script such a thing?

Thanks in advance for any help given.
User avatar
Elizabeth Davis
 
Posts: 3406
Joined: Sat Aug 18, 2007 10:30 am

Post » Mon Aug 08, 2011 10:45 pm

You could add a quest with a quest script. In the quest script, run a gamemode block that adds the perk then ends the quest (which in turn stops the quest script). As for giving an option to make a body disappear, there's an undertaker mod that gives players the option on interacting with a corpse to bury it, which obviously makes the corpses disappear (and some other stuff you probably don't care about). That seems to be exactly what you're looking for.
User avatar
cheryl wright
 
Posts: 3382
Joined: Sat Nov 25, 2006 4:43 am

Post » Tue Aug 09, 2011 3:24 am

I didn't find any "undertaker" mod. Can you please link it?

Basically all I need is a script that will make a body you "use" during sneak mode disappear. I added a perk that adds the option to "bag" a corpse once you use it in sneak mode (similar to "devour" with the cannibal perk). I just need the body to disappear with a proper script command and then this follows:

Player.RemoveItem 01TrashBag 3;
Player.AddItem 01BodyBag 3;
User avatar
Elea Rossi
 
Posts: 3554
Joined: Tue Mar 27, 2007 1:39 am

Post » Tue Aug 09, 2011 4:35 am

That's easy enough. The script command could easily just be 'disable'.
User avatar
Esther Fernandez
 
Posts: 3415
Joined: Wed Sep 27, 2006 11:52 am

Post » Mon Aug 08, 2011 3:11 pm

This is brilliant! It works! So basically, disable will remove the body forever, there's no way the game will "think" that NPC is still alive, right?
User avatar
Luis Longoria
 
Posts: 3323
Joined: Fri Sep 07, 2007 1:21 am

Post » Mon Aug 08, 2011 7:30 pm

Almost - disabled refs still run any scripts on them, which might be a problem in some weird way somehow if someone scripted it oddly. Similarly, however, completely deleting a ref (by using MarkForDelete after Disabling the ref) might be problematic if a script upon the actor needs to run after they've been killed for some reason. It might be safer just to disable the ref and leave it up to the normal cell-resetting procedure to clear them up (thus preventing save-game bloat). Still, the only time this should be any problem is someone did some really weird scripting somewhere, so it shouldn't be a problem in the vast majority of cases.

You might want to look into RemoveAllItems-ing the stuff from the dead body into some other container, just in case you accidentally 'remove' someone who has a quest item on their body.
User avatar
Marie Maillos
 
Posts: 3403
Joined: Wed Mar 21, 2007 4:39 pm

Post » Mon Aug 08, 2011 3:15 pm

Ok then, I'll just put disable then without the mark for delete.

Thanks a lot for all your help.
User avatar
Taylah Illies
 
Posts: 3369
Joined: Fri Feb 09, 2007 7:13 am

Post » Mon Aug 08, 2011 2:31 pm

Also, I want my filled body bags to sink when they hit water. I'm using the mesh of the Yeast object. Is there a way to do this (mind you the weight I set for a body bag is 50 pounds),
User avatar
Melissa De Thomasis
 
Posts: 3412
Joined: Tue Feb 27, 2007 6:52 pm

Post » Mon Aug 08, 2011 6:51 pm

That'll be handled in the nif, somewhere in the havok properties. Don't know whereabouts though, poking through it for something like bouyancy might help.
User avatar
saxon
 
Posts: 3376
Joined: Wed Sep 19, 2007 2:45 am


Return to Fallout: New Vegas