Jump to content

Home

Help With Spawning!


HodgePodge

Recommended Posts

Okay guys, I have embarked on a quest for a new mod, but I have a question that needs answering first. For my mod, I need a Twi'lek to spawn in the middle dormitory on the Enclave on Dantooine (after Belaya confronts you, go straight across the courtyard to the hallway that takes a turn to the left, and it's the second door on the left. Here's the script I'm using to spawn him, any help appreciated:

 

void main()
{
CreateObject(OBJECT_TYPE_CREATURE, "c_rec_officer", Location(Vector(52.15,69.01,8.76), 0.0)); 
}

 

I'm sure my mistake is horrendously obvious, but I'm a script noob xD

Link to comment
Share on other sites

Use the .git file. Ahh, I love that file.

 

Open the .git file, go to Creatures, copy a full struct, and paste it. Go down to the bottom of the Creatures list, and you will see your copied struct. Now fill that in with the (I think) ResRef, or the tag of your NPC, and the co-ordinates. Fiddle around with the orientation, as thats the way it will be facing when spawned.

 

Now package that into a MOD... or ERF file using KOTOR Tool, and put it in your Modules folder. Go to a save or start a new game and warp to Dantooine.

Link to comment
Share on other sites

My Computer>C: Drive>Program Files>Kotor Tool>Global Templates>K2

 

And yes, it LOOKS like a movie file, but it's a ERF file.

 

Remember when building the ERF file, to do: "<modulenamegoeshere>.erf" as well as choosing for the file to be ERF.

 

As I've only built .MOD files, the above sentences my not be entirely true.

Link to comment
Share on other sites

Okay, like I said, I've never built a ERF file, so do it this way.

 

Extract everything from "danm13" and "danm13_s" from KOTOR Tool into a folder. Make sure you have a backup of the altered .git file. Then put your UTC, and that .git file (and what other files you made) into the folder where you extracted everything. Then build all that into a MOD file using this name:

 

danm13.mod

 

Make sure you put the .mod after the "danm13"!!

 

Then go back to the K2 folder and place the new .mod file into the Modules folder.

Link to comment
Share on other sites

It seems a bit over the top to make an erf/mod file when you can just name it the onenter script name and then add the line "ExecuteScript "old_onenter" or whatever. That way the game will run it and anything else it needs to and you don't have to worry about including a file that has to go in another folder.

 

However, there's something to be said for "If it isn't broken, don't fix it."

 

_EW_

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...