Jump to content

Dismembering a corpse?


QuentinVance

Recommended Posts

So, I've just started working on a mod for New Vegas and for the first time ever I'm placing dead bodies around.

Problem is, I need to dismember one of the bodies at the very moment it spawns, just as he stepped on a mine or something like that.

 

I managed to create a character that looks dumb enough to step on a mine he just put on the ground, then I got stuck with the KillActor code:

 

1. First of all, I'm not used to the Geck's code and I can't find any simple example that doesn't involve other conditions to be met in order for it to work.

2. Most important, every single time I try to save a script and then close the window, I get a message asking me to save it; then, any modification to that script doesn't get saved.

 

So I've just decided to take a step back, delete the script I've made and start again.

Right now I basically have an actor with its inventory and face sorted out, and nothing more. Can you guide me through this?

Link to comment
Share on other sites

According to the game, there were a bunch of people beheaded in Nipton, but there were no beheaded bodies. So I created a bunch of NPCs and had them immediately get beheaded as soon as they spawned. This is the script I used:

 

scn zzMongoBeheadedScript

Begin GameMode
If (GetDead == 0)
Kill zzMongoCrucDead1REF 1 -1
Endif
End

Just give this script, or rather your modified version of it, to your NPC in the dialog box where you define the NPC, under the ID and name. You probably know this already, but just making sure.

 

zzMongoCrucDead1REF is one of the beheaded NPCs. Basically, by using him as the killer, he gets blamed for all of the deaths and not the player or anyone else (prevents any factions from getting angry at the player or with other factions). 1 is the dismembered part, which in this case is the head. You'll want to change this for your exploded NPC. -1 is the cause of death, which you will want to change to 0 for explosion. The documentation for GetCauseofDeath has a list of values for the cause of death.

 

It sounds like your script isn't compiling. I recommend installing the GECK Powerup so that you get some reason why it failed instead of having it just fail.

Link to comment
Share on other sites

I'm not entirely sure I get this

If (GetDead == 0){
        Kill zzMongoCrucDead1REF 1 -1
}

 

zzMongoCrucDead1REF is one of the beheaded NPCs. Basically, by using him as the killer, he gets blamed for all of the deaths

 

Shouldn't zzMongoCrucDead1REF be the one who is subject to the kill command, rather than the one who is to blame? Or does kill ​execute the command itself, while the ref explains who did that?

Link to comment
Share on other sites

I've had this conceptual problem myself. The key is that the script is tied to the target NPC's dialog, which establishes that NPC as the default "ActorRef". As madmongo said:

Just give this script, or rather your modified version of it, to your NPC in the dialog box where you define the NPC, under the ID and name.

 

That sets up the "target reference", the object of the action. See the syntax of the "KillActor" function. The first parameter is the "killer" reference.

 

You could use the "[ActorRef].command" syntax to make it clear who is the object of the command (being affected by it). Think of the syntax as "[subject]"."action". The "[]" are used to indicate it is an "optional" component of the function.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

Okay, well, looks like it's either me not understanding code (which I do not), or the GECK not understanding me.

 

I used this code:

scn BOBScript

Begin GameMode
	If (GetDead == 0)
		Kill BOB 1 -1
	Endif
End

Hit the save icon and tried to close the window, and I got a message saying

 

Do you want to save the current script?

Current =

 

And then if I hit YES, it brings me back to the script, and that seems to loop.

Link to comment
Share on other sites

1. Do you have the game installed in the default Steam location? If so, Please see the wiki "Installing Games on Windows Vista+" article for why the default Steam behavior of installing games to the "C:\Program Files" folder tree is bad and "disabling UAC and running as Administrator" is NOT sufficient, with instructions how to move it. This is the single most important thing you can do to fix and protect yourself against problems in the future.

 

2. Are you running GECK with "admin" credentials? Please see the 'Solutions to "Garden of Eden Construction Kit" (G.E.C.K.) problems' section in the wiki "Fallout NV Mod Conflict Troubleshooting" guide, which covers this and other common problems with GECK.

 

3. The "save prompt" does not seem to be showing the script name (i.e. "Current ="). That suggests it is not recognizing the script name as valid. Try a longer, more descriptive name. Make sure it is not already in use.

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

There are ready-to-use scripts available for several combinations of dismemberments in the GECK already.

 

To use them, drop a new cubic activator in the cell you want to use it and point it to one of the GenericDismembermentXXX base forms. Then set its linked reference to the corpse that you want to dismember.

Link to comment
Share on other sites

There are ready-to-use scripts available for several combinations of dismemberments in the GECK already.

 

To use them, drop a new cubic activator in the cell you want to use it and point it to one of the GenericDismembermentXXX base forms. Then set its linked reference to the corpse that you want to dismember.

 

I'm pretty noob at the GECK, how do I use these Cubic Activators?

 

Also, dubiousintent yes I do have the game installed in its default location, I'm running GECK as admin and I've tried multiple names for the script but it still doesn't seem to work.

Link to comment
Share on other sites

The default location causes all kinds of problems. Read that article and move it. (It links to the official Steam procedure for doing so. A sure sign that they recognize it was a mistake.)

 

Quests have stages and objectives, and we can advance the stages using "cubic activators" (it's the T-box midway through the main menu in GECK); drawing one of these down and binding a script to it will allow us to activate the script, setting the active quest stage (or whatever else you'd like to happen).

 

See the "Bethsoft Tutorial Basic Quest".

 

-Dubious-

Link to comment
Share on other sites

Okay, well, looks like it's either me not understanding code (which I do not), or the GECK not understanding me.

 

I used this code:

scn BOBScript

Begin GameMode
	If (GetDead == 0)
		Kill BOB 1 -1
	Endif
End

Hit the save icon and tried to close the window, and I got a message saying

 

Do you want to save the current script?

Current =

 

And then if I hit YES, it brings me back to the script, and that seems to loop.

 

Is BOB a ref or a form ID? BOB needs to be a ref.

 

In other words, create an NPC with a form ID of BOB. Place BOB somewhere in the world, and double click on BOB and give him a reference name like BOBREF. Then change kill BOB 1 -1 to kill BOBREF 1 -1.

 

You are blaming BOB's death on BOB, by the way, which is weird, but it works.

 

As Dubious said, since the script is running on an NPC, that NPC's ref is assumed. So "kill BOBREF 1 -1" is basically the same as "BOBREF.kill BOBREF 1 -1".

 

Again, I strongly recommend installing the GECK Powerup so you get understandable error messages.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...