PDA

View Full Version : One last question about Module editing


DarthJebus05
01-12-2008, 08:59 AM
As I don't want to make a new Module, do I only extract the .git file for the module I want to edit? Or do I extract some other files?

Say I was adding a custom NPC:

1) Extracted the .git

2) Added a new Creature in the .git file

3) Put the .utc, .git and the .dlg file into a MOD file

4) Build .mod

5) Put in Module folder

Will this work? Do I need anything else other than the .git if I'm EDITING to module?

Thanks,

Jebus

P.S. I'm using the first Endar Spire module.

Marius Fett
01-12-2008, 09:41 AM
What changes are you trying to make exactly?

DarthJebus05
01-12-2008, 09:53 AM
Just add my UTC in the Creature list (GIT file). So I can add the co-ordinates in the GIT file so he will spawn on the Endar Spire.

Marius Fett
01-12-2008, 10:34 AM
The original endar spire in the start of the game?

Or a new area?

If you just want to make a new NPC appear at the start of game module it would be easier to use a script.

But if you want to go the module file way you have to extract the git are ifo and all the placeables characters etc and pack em all into a .mod with tha same name as the original module.

DarthJebus05
01-12-2008, 10:38 AM
Original area. The very room you start the game in.

I used this script:

void main()
{
//do a whereami cheat to get the coordinates of the location
//where you want the npc to spawn
float x=123.10f;
float y=98.72f;
float z=3.75f;
//unless you want something specific, forget about orientation
float r=0.0f;
vector vecNPC=Vector(x,y,z);
location locNPC=Location(vecNPC, r);
//insert your npc tag instead of my_creature_resref. Don't remove the quotes and do not exceed 16 chars.
object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"lordjedi",locNPC);
object oPC=GetFirstPC();
AssignCommand(oNPC,ActionMoveToObject(oPC));
//replace my_dlg by the name of the dlg file the npc is supposed to use
AssignCommand(oNPC,ActionStartConversation(oPC,"lordjedi"));
}

With the Tag AND ResRef as 'lordjedi' (in the .utc) and it's dialog. I followed the "How To Spawn A NPC In Less Than 10 Steps" thread.

NOTE: These are the only files I am using to spawn 'lordjedi':

http://i67.photobucket.com/albums/h305/RosieJA/untitled.jpg

Marius Fett
01-12-2008, 10:48 AM
Attatch that to one of Trasks dialog lines that doesnt have a script on it already.

And you can get rid of the bits with // as they just take up room and make a mess.

void main()
{
float x=123.10f;
float y=98.72f;
float z=3.75f;
float r=0.0f;
vector vecNPC=Vector(x,y,z);
location locNPC=Location(vecNPC, r);
object oNPC=CreateObject(OBJECT_TYPE_CREATURE,"lordjedi",locNPC);
object oPC=GetFirstPC();
AssignCommand(oNPC,ActionMoveToObject(oPC));
AssignCommand(oNPC,ActionStartConversation(oPC,"lordjedi"));

You do know that that script will make the spawned NPC start running towards you and start talking as soon as it is spawned right?

If you only wanted to spawn it use this:

void main()
{
float x = 123.10;
float y = 98.71;
float z = 3.75;
float r = 0.00;

vector vCre = Vector(x, y, z);
location lCre = Location(r, vCre);

object oCre = CreateObject(OBJECT_TYPE_CREATURE, "lordjedi", lCre);

}

Oh and as for Orientation (that "float r") you can use these numbers for it to be more specific:

0.00 = North
90.00 = East
180.00 = South
270.00 = West

DarthJebus05
01-12-2008, 11:03 AM
I added the script, did the dialog, and still no luck. I put the files in my override at first, then that didn't work, so I made a .mod file. And no luck again. If I send you the files through MSN, could you take a look at them for me please?

Marius Fett
01-12-2008, 11:23 AM
Sure thing

Just send em when you're ready. :)

DarthJebus05
01-12-2008, 12:53 PM
A big thanks to DarthDingDong for being able to spawn the NPC!

However, he could only spawn it behind the PC. But the other spawn script doesn't work. Anyone know why?