Need some help with enabling things and killing some people.

Post » Sat May 28, 2011 2:41 pm

So I have cell A, B, and C. There are two NPC's in Cell A. And the player and 4 other NPC's are in Cell C. An NPC in C tries to 'talk' via intercom to one in A. But the intercom only makes ghoul sounds. (As while you were gone, ghouls came in and killed the 2 people in A) So you and the party must rush out of C, through B, into A. Upon arrival I wan't the two npc's to be dead, and ghouls to be standing around. Now I don't know how enabling/disabling things works if you are not in the cell they are in. How would I best change up cell A too kill the NPC's and add the ghouls? Should it be done via trigger at the entrance, so whenever the player loads into the cell, or an NPC they trigger it and the changes are made, or should I have them done right there when you hear the ghouls on the intercom? I don't know if I could change things in another cell with those commands, and I have never tried. How should I do this? Thanks for any help and sorry if this is confusing.

Gunmaster95
User avatar
W E I R D
 
Posts: 3496
Joined: Tue Mar 20, 2007 10:08 am

Post » Sat May 28, 2011 5:03 am

Gunmaster,

My recommendation would be to use a Quest to control the enabling / disabling of NPCs, so that you have absolute control over the course of events. Enabling / Disabling NPCs works just fine in. The talking activator / intercomm is an ideal place to attach the script, which will have no problem enabling / disabling NPCs in other cells As Long As the NPCs and Ghouls are all marked as persistent and given a Reference Editor ID for each so that you can call them from the script. That done, you can enable, disable, kill, moveto, anything you need to do. :) Once you enable / disable / kill NPCs, you can advance the quest stages along so things happen in the right order and only once.

Let me know if there is anything I can do to help with that,

Miax
User avatar
JESSE
 
Posts: 3404
Joined: Mon Jul 16, 2007 4:55 am

Post » Sat May 28, 2011 6:27 am

Ok. If I can enable/disable/kill things in cells other than the one the player is in (Which I remember like a year ago someone told me you could not do, not sure why though) then I will just throw all the changes into my quests script. Man, more quest scripting. :P So far out of my two quests, they have like 40-60 stages total and change things and packages and such... this is getting pretty extensive, and I am only like 40% done. :P I will let you know if any of the enable/disabling does not work. :)
User avatar
kristy dunn
 
Posts: 3410
Joined: Thu Mar 01, 2007 2:08 am

Post » Sat May 28, 2011 3:48 am

I know what you mean. :) I've made one quest so far (of 5) with 189 users and almost 70 stages - and that wasn't even that large by comparison to the big ones in Fo3 (Moira's quest is well over 800 or 900 users!). It took quite a bit to get all the objectives, stages and scripts done. I think the key in touching NPCs in other cells is that they need to be persistent with a unique editor ID (so that they are not Dynamic NPCs), which may be the key difference that other person was referring to.

Luck!

Miax
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Sat May 28, 2011 4:39 pm

Well, I am trying to have it enable 6 ghouls (Custom Forms I tweaked for the vanilla ones), 3 blood spots, and 2 dead bodies. It enables everything but the two dead bodies. I have their health at 0, and havok-placed them in the geck just fine, it just is not enabling their bodies along with everything else. Any clue why? :/
User avatar
Nancy RIP
 
Posts: 3519
Joined: Mon Jan 29, 2007 5:42 am

Post » Sat May 28, 2011 3:58 pm

Enabling dead bodies... hmmm. Are the bodies the actual corpses of NPCs that you killed with the script?

If so, then you may be running into the fact that once an NPC is killed, some of their characteristics change (such as the corpse decay timer being set), and there may be something happening to them such as loosing persistence once they actually die. This is just a theory, but I have an idea on how you can get around it; don't kill the NPCs until you need to enable them... If they are disabled initially, then you can enable them and then issue the kill command - which preserves their persistence and will enable them and then drop them on the spot.

Thoughts?

Miax
User avatar
Jerry Jr. Ortiz
 
Posts: 3457
Joined: Fri Nov 23, 2007 12:39 pm

Post » Sat May 28, 2011 6:09 am

Unfortunately I am using straight up dead bodies. I copied the live ones in the GECK, making them dead, and placed them. The living ones are just disabled, and their bodies enabled to give it the appearance the Ghouls brutally killed them. They have Ref ID's and it still isnt doing it. D: I have tried enabling them directly by saying MyDeadNPCRef.Enable, and by setting an enable parent (xmarker) and enabling that, which is how the ghouls and blood are enabled and they work. :/
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Sat May 28, 2011 12:01 pm

I used a script that I garnered from vanilla FO3 to enable a slaughtered NPC. The NPC is set to zero health and is the enable parent for blood decals and bits of gore on the ground around his feet and a wheel of animated buzzards flying high over his head. He is placed in an exterior Wasteland cell and is enabled by another script that runs while the player is in an interior cell.

This object script is placed on the NPC:

scn AGenericDeathAndDismemberSCRIPTshort doOnceref thisRefBegin OnLoad	if doOnce == 0		set thisRef to getSelf		killActor thisRef 1				set doOnce to 1	endifEnd

The NPC does a ragdoll death when the player next enters the same cell and appears dead and headless, so it works best if the player loads the cell that time out of sight of the body, unless you WANT the player to see them die. I used the same script on 3 supermutants at one time, each with his own reference to the script attached and enabled from a different cell by a separate script.

The player's savegame preserves the initial death position of the bodies until they are disabled again later in the quest.
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Sat May 28, 2011 2:39 am

Nice Badpenny. :)

If that doesn't work Gunmaster, you may need to copy/create a custom corpse object and make it persistent, so that it's treated as nothing more than a container to the player but would also act like a static object. Not sure that will be any more successful. Also, is this a case where you a Live and a Dead version of the same NPC in the same room? This leads me to think that they should be separate RefIDs of the base object, even if the NPC is cloned, so that there is only 1 of it in the game?

I'm grasping at straws here, hopefully Badpennys plan can work.

Miax
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Sat May 28, 2011 4:15 am

Well BadPenny's plan might work, and I planned something like that originally, just that would lead to them possibly dying in random spots throughout the room, depending on where they were. I have the bodies positioned specifically, but looks like that might be unavoidable. As for separate RefID's, the live and dead ones are different base objects, and have their own unique Ref ID's, so I am not sure why it doesnt work. Disabling the live ones works, so why not the dead ones? I guess I will have to place in live ones, and just kill them. So it wont be perfect, but I can deal with that. I'll let you guys know how it works.
User avatar
Naomi Lastname
 
Posts: 3390
Joined: Mon Sep 25, 2006 9:21 am

Post » Sat May 28, 2011 4:40 pm

Not sure why you have trouble enabling dead NPCs. Have you tried leaving the dead ones as initially enabled while making one of the living NPCs their enable parent with the condition that the dead ones have the opposite enable status of the parent? That should toggle the enable status between living and dead nicely.

Wanted to mention also that dead NPCs' placement is much easier to control if you place them in the GECK with zero health and use Havoc Physics on them to make them drop to the ground ( as observable in the GECK's cell view window ). That way the script will dismember them but their bodies will remain close to the spot that you intend. In game havoc will have less effect on them because they have already fallen.
User avatar
Bird
 
Posts: 3492
Joined: Fri Nov 30, 2007 12:45 am

Post » Sat May 28, 2011 6:32 am

Yea I have placed their bodies with Havok exactly the way I want. One is on a table, covered in blood, it looks really cool/unfortunate :P

Setting the enable parents to the living ones is a great idea. But since they are currently set to an xmarker, and that didnt work, I don't see how this would. But its worth a try. Otherwise I will just enable them when you enter the cell and see if that works.
User avatar
Jah Allen
 
Posts: 3444
Joined: Wed Jan 24, 2007 2:09 am

Post » Sat May 28, 2011 8:09 am

I just thought of another option - move the corposes outside the cell walls until you want them to appear, then move them back.

1. Place a piece of floor tile (or 2 or 5) just Above the ceiling of where you have them placed.

2. Initially put the bodies on those new floor tiles above the room (so the player cannot see or interact with them).

3. When you want them in play, simply move the corpses vertically downwards to exactly where you want them in the cell - and you accomplish the same effect.

This is essentially the same thing as the secret door script idea that I use, except your doing the move only once and in only one direction (to simplify the code).

The pseudo-code would look like:

FLOAT StopPositionZSET StopPositionZ to DeadBody.GETPOS Z  - 100DeadBody.SETPOS Z StopPositionZ


This would move the body downwards by 100 units. You'll have to experiment with this in-game to find the exact value that you need to move the bodies downwards, but once done the body will eeriely float downwards througth the ceiling and into position.

Miax
User avatar
Sarah Evason
 
Posts: 3507
Joined: Mon Nov 13, 2006 10:47 pm

Post » Sat May 28, 2011 5:08 am

By god, Its genius! That might be the simplest way to do it. Great idea! I will simply move them like 1000 units up, to be simple, so they are still positioned exactly how I want them to be. That way they are there the whole time, just out of place. Perfect. I will go try this and let you know how it works.
User avatar
Taylor Bakos
 
Posts: 3408
Joined: Mon Jan 15, 2007 12:05 am

Post » Sat May 28, 2011 7:22 am

Well, I am trying to have it enable 6 ghouls (Custom Forms I tweaked for the vanilla ones), 3 blood spots, and 2 dead bodies. It enables everything but the two dead bodies. I have their health at 0, and havok-placed them in the geck just fine, it just is not enabling their bodies along with everything else. Any clue why? :/


Did you try ticking the 'quest item' box on the dead NPC's?
User avatar
Soph
 
Posts: 3499
Joined: Fri Oct 13, 2006 8:24 am

Post » Sat May 28, 2011 12:52 pm

Ahha! Well, First I set up the script like Miax said, but to no avail. Then I checked if htey were every there before (loaded a much earlier save) and they were. Then set them to quest objects, and poof there they are. :D Of course now the blood has stopped working properly... I noticed I did not have it set to an enable parent, so it was ALWAYS there, which was bad. So I get it to the same xmarker as the ghouls, but now it just wont show up... I will have to make sure I didn't botch anything with this.. --_--

Thank you everyone for the help! That was really anoying me, and held my progress at a full halt for a day. :D
User avatar
El Goose
 
Posts: 3368
Joined: Sun Dec 02, 2007 12:02 am

Post » Sat May 28, 2011 2:25 am

Well nevermind... Now its like hit and miss or something... sometimes when I go in the bodies and there, sometimes they arent. Also I notice when they arent, that its like the navmesh is whack or something, because my NPC's and the ghouls dont move properly. I think this might be because I have an esp not an esm? I want to try it as esm. How do I make it one? I have never done it before. :/
User avatar
Ludivine Dupuy
 
Posts: 3418
Joined: Tue Mar 27, 2007 6:51 pm

Post » Sat May 28, 2011 6:38 am

Ok things only get messed up if I reload. The first time I open the game, it all works great. So it is because its an esp, I know this can cause those things. I fully intent to make it an esm upon release, and I guess I will for testing purposes too. So how will I make it an esm? I know its something in the file header?
User avatar
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Sat May 28, 2011 10:01 am

Ok things only get messed up if I reload. The first time I open the game, it all works great. So it is because its an esp, I know this can cause those things. I fully intent to make it an esm upon release, and I guess I will for testing purposes too. So how will I make it an esm? I know its something in the file header?


Yes its incredibly simple - I use Fo3Edit. Load your mod up, and once done expand it by clicking on the + in the left-hand column. Then click on File Header.

Then in the right-hand screen you will see a "Record Flags" entry. Right-click in the open space after that, select Yes in the confirmation window and you'll see the ESM flag check-box. Simply check it then close Fo3Edit and select Yes for the Save.

Lastly, change the file extension from esp to esm and your done. :) Just remember you can't edit it in the GECK as the Active File while its a master, so I would wait to do this until your all done.

Miax
User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm

Post » Sat May 28, 2011 2:52 pm

Alright. I am going to do it whenever I send it out to people to test, and if I have issues testing, like right now. Otherwise I will keep it an esp. Thanks! :D
User avatar
Jack Walker
 
Posts: 3457
Joined: Wed Jun 06, 2007 6:25 pm

Post » Sat May 28, 2011 1:03 pm

Sometimes while playtesting a mod I find that nothing seems to work right no matter what I do. I have to make a savegame that is completely free of earlier versions of my mod in order to see what is going to happen clearly. I keep savegames with advance characters from a totally mod free games. Sometimes I load up one and play my mod from its beginning to get to the right point where I can check things out. I often find that many "problems" in the mod no longer exist with a clean game.
User avatar
Killer McCracken
 
Posts: 3456
Joined: Wed Feb 14, 2007 9:57 pm

Post » Sat May 28, 2011 5:06 am

True. Except alot of my issues right now occur when loading a previous save, whether starting with a clean save or not, and whether making changes to the mod or not. So its an esp problem for the most part, so I will have to make it esm upon release to rid of them. :/
User avatar
jessica Villacis
 
Posts: 3385
Joined: Tue Jan 23, 2007 2:03 pm

Post » Sat May 28, 2011 2:43 pm

Bah!

This frustrates me a little, as you should not have to goto such lengths of making an ESM or starting with clean saves to get a couple of corpses to load!

I think the compromise has to come in wanting the bodies in some Exact position. I don't even think Bethesda does this do they? When looking at the Statesman Hotel, I notice that in all cases where you run across a dead mutie, it started out as a live NPC when the cell loads and the NPCs are instantly killed and fall where they stand - no specific body placement.

What we need is to find an anolog in the game that also positions a body exactly, and study that example at depth. What problems did you have moving the body down from the ceiling above?

Miax
User avatar
Juan Cerda
 
Posts: 3426
Joined: Thu Jul 12, 2007 8:49 pm


Return to Fallout 3