Jump to content

Home

making a corpse


Vox Kalam

Recommended Posts

"Corpsemaker, corpsemaker, make me a corpse..."

But how?!?! I am making my first mod (it's for TSL), which has several new items, and I want to make a new corpse in the Sith tomb on Korriban to place them, but I don't know how.

To quote C-3PO:

"Over heeere! Hey! Heeeeeeey! Help! Pleeeease heeeeelp!":c3po:

Link to comment
Share on other sites

How To make a Corpse:

 

1. Find a person.

2. Kill them.

3. Burn them, scratch them, let them sit in a dry place for some time to give them that aged look.

4. Put some old clothes on them

5. Stash them with goodies and candy!

 

-----------

lol yeah dont ask me. lol

 

"I Feel So Helpless." :c3po:

Link to comment
Share on other sites

Attach the following script to the OnSpawn field of the .utc file:

void main()
{
   SetIsDestroyable(FALSE,FALSE,FALSE);
   ApplyEffectToObject (DURATION_TYPE_INSTANT,EffectDeath(), OBJECT_SELF);
}

edit: or just type k_def_spawndead in the OnSpawn field :D (the script is already in the Bifs)

 

Make sure you have a unique .utc file: give it a custom name otherwise it can create funny (and less funny) effects in the game.

Link to comment
Share on other sites

Originally posted by Darkkender

Hey Darth333 wouldn't a corpse placeable be more apropriate? I mean that is what they were created for in the first place right.:p

yes, there are a few corpse placeables but if you want a specific "look" for the dead, a script will do the job too as long as you don't try dead Jawa's :D ...they continue to stand up even after they're dead. I had to add a script to destroy them in the svosh and colja's BD mod. They don't have the animation :(

 

Vox Kalam:

 

How are you spawning the corpse? are you making a new module? Is the npc listed in you .git file or are you spawning the npc with a script?

 

I was talking about the .utc file of your npc. If it's unique you can edit it. But otherwise avoid it as you could create some serious problemsat other locations in the game: http://www.lucasforums.com/showthread.php?s=&threadid=145353

 

You can also attach the Death script animation to a conversation, the script that fires when the module loads, etc. In this case, you would need to use this:

void main()
{
   SetIsDestroyable(FALSE,FALSE,FALSE);
   ApplyEffectToObject (DURATION_TYPE_INSTANT,EffectDeath(), GetObjectByTag("my_npc_tag"));
}

Replace my_ncp_tag by the tag of the npc (when you open the .utc file for the npc, you should see a tag field.)

Link to comment
Share on other sites

Originally posted by Darth333

You can also attach the Death script animation to a conversation, the script that fires when the module loads, etc. In this case, you would need to use this:

void main()
{
   SetIsDestroyable(FALSE,FALSE,FALSE);
   ApplyEffectToObject (DURATION_TYPE_INSTANT,EffectDeath(), GetObjectByTag("my_npc_tag"));
}

Technically, that's not an animation, that's a real death script. :)

 

Edit:

Here's an animation:

AssignCommand( GetObjectByTag("my_npc_tag"), ActionPlayAnimation(ANIMATION_LOOPING_DEAD_PRONE , 1, -1));
Link to comment
Share on other sites

Since I have limited knowledge of corpse creating, I did find an issue to watch out from. I had this great idea, why don't I use Corta's corpse, and place an Exile robe in his inventory. What had occured was, Corta shared a tag with another corpse file, and he spawned everywhere. Instead of 'Corpse001', for an example only, it turned into 'Corta', and he replaced a generic corpse through out Peragus. Yeah, I was sucessful in putting the robes in Corta's inventory, but what a mess to clean up. I had to remove the mod from pcgamemods.com, for it was an embarising moment. I can now look back at it an laugh. That was my very first mod ever!

Link to comment
Share on other sites

Originally posted by Vox Kalam

I am NOT trying to make an NPC, and then kill it, OR make a new module. Basically, I want the Exile to find a new corpse, already dead, in the Sith Tomb on Korriban, and to have my new items inside for him/her to find.

The visual result at the end is the same whether you use a corpse placeable or a npc using the above script when spawned. The corpse in the Korriban tomb as well as Master Vash use a script. They are not placeables.

Link to comment
Share on other sites

I am beginning to see what you mean. While playing a game of KOTOR I, I entered the grove for the first time by warping, and I landed in front of Juhani and the two Mandalorian corpses. Except that they were still alive, and died in front of me when the module had loaded.

But what about the corpses that are brownish, decayed, and wearing those god-awful yellowish-tan clothes? Do you do the same for them? No, right?

Link to comment
Share on other sites

Originally posted by Vox Kalam

I am beginning to see what you mean. While playing a game of KOTOR I, I entered the grove for the first time by warping, and I landed in front of Juhani and the two Mandalorian corpses. Except that they were still alive, and died in front of me when the module had loaded.

But what about the corpses that are brownish, decayed, and wearing those god-awful yellowish-tan clothes? Do you do the same for them? No, right?

Those are corpse placeables (.utp files)...kinda some "furniture" :rolleyes:

 

You can spawn them like any other placeable , such as a container. Check this tutorial to spawn them with a script: http://www.lucasforums.com/showthread.php?s=&threadid=143536 . If you are making a custom module, you can put the in the .git file instead of using a script.

 

 

There is one right at the top in the BIFs>Templates>BluePrint, Placeables>corpse_maintoff.utp

 

If you double click on the file with KT, you will see in the new window that opens that you can change the appearance if you want another corpse appearance (there are a few of them in the drop down list). Then, to make sure you don't overwrite any of the game's existing corpses and create conflicts, change the tag to whatever you want (i.e. CorpseMaintenanceOfficer to blabla , per example) and rename the file blabla.utp (whatever, no more than 16 characters) .

 

Finally I always suggest , unless you intend to do something specific such as having various npcs being affected by the same script, that you use the same name for the tag and the template ResRef (Template ResRef always has to be the same as your file name).

 

Finally, just spawn your new placeable blabla.utp with a script or attach it to a .git file depending on what you are doing (using an existing module or making a custom module).

Link to comment
Share on other sites

I never realized that modding is so hard.

Now the "whereami" cheat doesn't show up, and when I equip the "whereami armband, its icon doesn't show up on the row of buttons at the bottom of the screen, so I can't activate it. What am I doing wrong?

Link to comment
Share on other sites

Okay, never mind, I found out the problem with the band, but I have one last question (sorry!).

In the the thread you sent me to, in the first sample script in the first post, I am unsure what to do with the following lines:

 

"vector MyVec = Vector(x,y,z); //line 1

location MyLoc = Location(MyVec, r); //line 2"

 

and that thread is "no longer accepting posts" or something, so I don't know where else to ask this question (sorry again!).

Link to comment
Share on other sites

Simply use the band at the location you want to place the corpse. Get the x, y, z values from the feedback screen and us their values as parameters for the Vector function. For r, you can use the Orientation value that you got from the feedback screen, or just put 0.0 in for the value.

Link to comment
Share on other sites

I am now quite frustrated. I have finished my mod and placed the new items and the .ncs compiled script in the override folder, but the placable doesn't show up, and tell me, isn't there supposed to be a severed arm and a datapad outside the Shyrack breeding brooding, or whatever room? Because if so, it's GONE.

How do you modders survive with the frustration?!:confused:

Link to comment
Share on other sites

Scripts need some sort of event to trigger them. This can be done when someone says something in a dialog, when a door is opened, when a character enters an area, etc.

 

When were you expecting the code in your .ncs to "happen"?

Link to comment
Share on other sites

You need to fire your script from somewhere: You can use the area's OnEnter evetn to fire your script as explained in this tutorial: http://www.lucasforums.com/showthread.php?s=&threadid=137370

 

You can check the Svosh and colja's birthday mod t7 and I made for samples if you want: http://www.starwarsknights.com/mods/Happy_Bday_guys.rar

 

You can also attach the script to a .dlg file or elsewhere. Just make sure it's in the same module where you want to spawn the placeable. If you attach the script to a .dlg branch, make it's a mandatory branch: the script will fire when this branch is spoken.

 

and don't forget to compile your script: http://www.lucasforums.com/showthread.php?s=&threadid=143681

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...