lfnetwork.com mark read register faq members calendar

Thread: Editing git files and rebuilding
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 01-25-2005, 10:43 PM   #1
envida
Rookie
 
envida's Avatar
 
Join Date: Jan 2005
Posts: 145
Editing git files and rebuilding

I have a question about the git files. I have been editing an existing git file for one of the modules in the game so I can add some extra footlockers and I'm not sure what I should do now. Can I just put the edited git file in the override folder or do I need to rebuild the mod/erf file for that module? If I need to rebuild it, how would I do that?
Hope Iím not asking a stupid question, I have looked at some of the tutorials but haven't found anything.
envida is offline   you may: quote & reply,
Old 01-25-2005, 10:48 PM   #2
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
you would need to rebuild the module.

Now are you talking about changing one of the original modules in the game? If so you might be better served by having a script that spawns the items for you activated from something like a door within that module.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 01-25-2005, 10:55 PM   #3
RedHawke
Shadow Lord Of The Sithô
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
No it's not a stupid question... at least it isn't to me. Though editing a modules .git file just to add some footlockers/placeables for anything but a custom module is a little extreme IMHO.

I think you should be able to place the modded .git and the footlockers .utp files into your override, but I'm not sure that would work as desired, and possibly it could cause some strange unforseen effects.

I don't know if you can re-pack the games .rim files.

My suggestion, also Darkkender's I see, would be to script your Footlockers into the area, if the area has an on-enter script this is easy to do, otherwise you will have to find a dialogue or something to fire your script. This is usually easier than editing the games modules.

Just my guesses, and 2 cents!


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Old 01-26-2005, 04:53 AM   #4
envida
Rookie
 
envida's Avatar
 
Join Date: Jan 2005
Posts: 145
Thanks guys for your quick replies!

Quote:
Originally posted by RedHawke

I think you should be able to place the modded .git and the footlockers .utp files into your override, but I'm not sure that would work as desired, and possibly it could cause some strange unforseen effects.
Yeah that is what I did and it is working now. Initial I had some problems because there where some in games scenes in the module that acted weird in that you didnít see anything but I found out that when you edit a git file with a gff editor it corrupts the camera. After I used the CAMedit by TK102 it is now working fine

Quote:
Originally posted by Darkkender

Now are you talking about changing one of the original modules in the game? If so you might be better served by having a script that spawns the items for you activated from something like a door within that module.
Quote:
Originally posted by RedHawke

No it's not a stupid question... at least it isn't to me. Though editing a modules .git file just to add some footlockers/placeables for anything but a custom module is a little extreme IMHO.

My suggestion, also Darkkender's I see, would be to script your Footlockers into the area, if the area has an on-enter script this is easy to do, otherwise you will have to find a dialogue or something to fire your script. This is usually easier than editing the games modules.
When you say it is overkill I found it very easy this way when I wanted to add some extra items to a footlocker or similar that isnít unique in the game. I just open the git file for the module find the utp file name, change it to a unique name and then add my modified old utp file with the new name in the override folder.

But if it is easier with a script Iím all for it. There is a cut scene triggered just before where I want my stuff so I guess it would be easy to use that. I just havenít found anything on how to do it that way, so I donít really know where to start.

If you guys have any suggestion Iíll welcome those. But if this has been asked about several times already just ignore me and Iíll find it.
envida is offline   you may: quote & reply,
Old 01-26-2005, 04:58 AM   #5
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
As Redhawke mentioned, having .git file in your override can have side-effects. I recall that every time I entered the area, it was if I was entering it for the first time... people who had been killed were still alive, doors that were open were closed, etc.

To get around this "feature" you have to pack the entire module into a .mod file and put it in the modules folder. And that's what RH meant as overkill.

Good job though editing and fixing the .git file!


tk102 is offline   you may: quote & reply,
Old 01-26-2005, 07:51 AM   #6
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
Another reason not to throw the GIT file in the overide is when somebody makes a new area module since we are reusing original module area's the git and are file keep there original name so if you use an area that is being used by another mods module your git file will overide the one in that area as well as the original area which very well may mess up the mod.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 01-26-2005, 08:01 AM   #7
Leviathan
Senior Member
 
Leviathan's Avatar
 
Join Date: Jun 2004
Location: Onboard the Sun Crusher
Posts: 1,008
RedHawke, you said "I don't know if you can re-pack the games .rim files." I've seen a tool named "Input / Output Tools" (iotools.tar.gz) which can extract and compile *.RIM files ; But I do not know any more where I saw it ...
Leviathan is offline   you may: quote & reply,
Old 01-26-2005, 08:17 AM   #8
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
Quote:
Originally posted by Galakmech
RedHawke, you said "I don't know if you can re-pack the games .rim files." I've seen a tool named "Input / Output Tools" (iotools.tar.gz) which can extract and compile *.RIM files ; But I do not know any more where I saw it ...
I missed that originally in Redhawke's post.

But you don't need another tool to do it when you use the ERF builder in KOTOR tool it give you the option to build as a rim file.

So here's what you do extract all files from a RIM into a empty folder. Then add your new files for that rim into the same folder. Use erf builder to create your RIM file there. Then copy your new RIM file to the modules folder overwriting the original. Or you can keep a copy of the original in a seperate folder if your smart.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 01-26-2005, 02:40 PM   #9
envida
Rookie
 
envida's Avatar
 
Join Date: Jan 2005
Posts: 145
I see there is more than enough reasons not to just put the git file in the override folder. Guess I have to learn how to script now

Also I didnít check what would happen if re-entered the module for the git file belonged. But come to think of it I read somewhere that the game makes new git files with new values after you been to an area that it puts in you saves to remember where you been, so having another git file in override folder would overwrite the new one and make it seem as you haven't been to that module yet.
envida is offline   you may: quote & reply,
Old 01-26-2005, 07:30 PM   #10
RedHawke
Shadow Lord Of The Sithô
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
envida,

If you want to spawn your own Footlocker, try this;

Extract a game footlocker, remove any items from it's invantory and scripts from the scripts fields, then change the templateresref and resref to footlker099, then change it's tag to Footlocker99 then save the .utp file as footlker099.utp.

Here is the basic script to spawn a footlocker that uses the .utp you created above in the game and place some items into it, therefore you can use the same footlocker .utp all throughout the game and it all works the same as it is the script that denotes what is in the footlocker / metalbox / plastic cylender / etc.

Code:

void main()
{
    	float x=0.00f; //Here is where you add the 'whereami' cheat coordinate 1. 
    	float y=0.00f; //Here is where you add the 'whereami' cheat coordinate 2.
    	float z=0.00f; //Here is where you add the 'whereami' cheat coordinate 3.
    	float r=0.0f; // This is where you set the orientation of the placeable, set in degrees.
    	vector MyVec = Vector(x,y,z);    //line 1
    	location MyLoc = Location(MyVec, r);     //line 2
    	CreateObject(OBJECT_TYPE_PLACEABLE, "footlker099", MyLoc); //line3

	CreateItemOnObject("g_w_lghtsbr05", GetObjectByTag("Footlocker99"));
	CreateItemOnObject("g_a_mstrrobe01", GetObjectByTag("Footlocker99"));
	CreateItemOnObject("g_w_sbrcrstl04", GetObjectByTag("Footlocker99"), 2);

}
Copy this text paste it to notepad and then edit the file to taste, you will have to enter the coordinates for your footlocker in the appropriate lines that you got from the 'whereami' cheat.

You will likely have to test the script a couple of times to get the Footlocker's orientation correct, I suggest sticking to North or 0.00, East or 90.00, South or 180.00, and West or 270.00, but you can use any others.

Regarding the items you wish to place in the Footlocker, you can easily add more of the CreateItemOnObject lines... hundreds if you want to, all you have to do is change the item tags in the first set of quotations. The ones that look like the 'giveitem' cheat codes.

Also note the last CreateItemOnObject line in the script has a 2 on the end, this is if you wish a certain quantity of the same item to be placed into the container, so in this line when run it would place 2 of those saber crystals with the item tag of g_w_sbrcrstl04 in the locker, you can use any number, I have used up to 500 with no problems.

Save your script as... say ev_footlkr1.nss make sure you save it as an .nss file and not .txt.

Next you will have to compile it a good thread to help you with that is here.

Once you have your script compiled and you have your ev_footlkr1.ncs, you can move on to the last parts.

FYI you can celete the .ndb files that the compiler generates.

Next you will need the .dlg file from the cutscene you are talking about, open it up in the dialogue editor of your choice, Fred's or tk102's and search for a line that is certain to be spoken, and you should see somewhere a place that says "script to run for this node" (I know in the dialogue editor in KT it says this) and make sure it is blank, if it is then you can easily enter your script name in there, in your case it would be ev_footlkr1. Save the edited .dlg file.

Place the .dlg file you edited, the ev_footlkr1.ncs, the footlker099.utp, and all of your possible custom item files you want to place in the Footlocker into your override.

Fire up the game, and then load your save you have before entering that area or activating that dialogue, and see what happens, as I stated above you may have to test the orientation of your placeable a couple of times, but that is just a simple number change in the script and a recompile.

This is why I personally favor useing the Metal Box placeable as it's orientation doesn't really matter.

Once you get the hang of it you will find this easy to do. Wow... this is a mini-tutorial isn't it?

EDIT: Here is the same script example, except it is useable in situations where the dialogue can be repeated and you want the script to fire only once, then you would use this;
Code:

void main() 
{
//Conditional Spawn NPC Script By  TK102, Darth333, and RedHawke
int nBoolSlot=6; //any number 0-7 can be used here
int nCheck=GetLocalBoolean(GetFirstPC(),nBoolSlot);
if (nCheck) { return; } //exit if TRUE

    	float x=0.00f; //Here is where you add the 'whereami' cheat coordinate 1. 
    	float y=0.00f; //Here is where you add the 'whereami' cheat coordinate 2.
    	float z=0.00f; //Here is where you add the 'whereami' cheat coordinate 3.
    	float r=0.0f; // This is where you set the orientation of the placeable, set in degrees.
    	vector MyVec = Vector(x,y,z);    //line 1
    	location MyLoc = Location(MyVec, r);     //line 2
    	CreateObject(OBJECT_TYPE_PLACEABLE, "footlker099", MyLoc); //line3

	CreateItemOnObject("g_w_lghtsbr05", GetObjectByTag("Footlocker99"));
	CreateItemOnObject("g_a_mstrrobe01", GetObjectByTag("Footlocker99"));
	CreateItemOnObject("g_w_sbrcrstl04", GetObjectByTag("Footlocker99"), 2);
	
// now close the door so we can't re-enter
SetLocalBoolean(GetFirstPC(),nBoolSlot,TRUE);
}
This script is identical to the one I gave above, only this version will run only once... handy in certain areas of the game.

I hope this helps!


"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------

Last edited by RedHawke; 01-27-2005 at 06:48 PM.
RedHawke is offline   you may: quote & reply,
Old 01-26-2005, 08:53 PM   #11
Darkkender
Knight of Holowan
 
Darkkender's Avatar
 
Join Date: Aug 2004
Location: In the mountains of Oregon
Posts: 2,953
Current Game: Star Wars The Old Republic
Veteran Modder 
Quote:
Originally posted by RedHawke

Once you get the hang of it you will find this easy to do. Wow... this is a mini-tutorial isn't it?

I hope this helps!
Actually it helps me as well Redhawke. Because I wasn't aware of the orientation angles. That and that script is handy as well. So I would say this fits as a mini-tut.


Working so, we will learn history as a tree knows it; we will climb into shapes printed in the seed; we will become time made visible, years made fragrant; we will make of concentric memory a stem of praise; we will inhabit daylight at a trees own speed; we will be travelers who remain, patriots to this ground.
OMG I only rank 62.13018% geek or a Extreme Geek as it is referred to on the geektest at Geektest
[TSL]Holowan Plugin
Darkkender is offline   you may: quote & reply,
Old 01-27-2005, 12:35 AM   #12
envida
Rookie
 
envida's Avatar
 
Join Date: Jan 2005
Posts: 145
Thanks Redhawke I really appreciate that. A very helpful tutorial and I have now managed to create my script and edit the dlg file. Havenít had chance to test it yet.

I just have a couple of more questions if itís ok, you already been more then helpful enough

Can I use the same method to add extra stuff to a container that is already in the game or will this remove the stuff that is already in the container and just add the stuff that I have in my script?

Second thing is; using this method requires that the dlg file has a unique name right?
envida is offline   you may: quote & reply,
Old 01-27-2005, 10:06 AM   #13
tk102
Well past expiration date
 
tk102's Avatar
 
Join Date: Jan 2004
Posts: 5,765
Current Game: Watch_Dogs
Forum Veteran Helpful! Notable contributor 
Quote:
Can I use the same method to add extra stuff to a container that is already in the game
Sure you can. The code is similar to what Redhawke posted. In that case, you wouldn't need the CreateObject function, but only the CreateItemOnObject function in the same way that Redhawke outlined. The non-scripted items in that container will not be disturbed at all.

I used this scripting method in "Zaalbar Finds Items" technique where a dialog with Zaalbar spawns an item into a container. You can download the original Darkside Choker mod to see that example here.

The only difference here that I think is worth pointing out, is that Redhawke's script allows for re-entry, but hopefully the cutscene dialog only fires once, so that's not a problem. In the link I gave you, you'll see the use of the SetLocalBoolean (in the spawn script) and GetLocalBoolean (in conditional dialog script). These are used to prevent you from speaking the dialog branch that would respawn the items in the container. Since you plan on using a cutscene dialog, I won't go into great detail about all of this, but I'll save it for the tutorial that this thread will assuredly become.

As for your second question: No, Redhawke suggested that you use the existing dialog, modify it, save it with the same name, and place it in your Override. That way the game will implement your modified dialog as if it were the original.


@Redhawke:
Thank you for writing this up!

As a point of convenience: the CreateObject function returns the object that it created so you could simplify your code a bit like this
Code:
object oLocker=
CreateObject(OBJECT_TYPE_PLACEABLE, "footlker099", MyLoc); //line3

	CreateItemOnObject("g_w_lghtsbr05", oLocker);
	CreateItemOnObject("g_a_mstrrobe01", oLocker);
	CreateItemOnObject("g_w_sbrcrstl04", oLocker, 2);


tk102 is offline   you may: quote & reply,
Old 01-27-2005, 06:41 PM   #14
RedHawke
Shadow Lord Of The Sithô
 
RedHawke's Avatar
 
Status: Moderator
Join Date: Mar 2004
Location: Stormreach CA.
Posts: 9,184
Current Game: DDO, Stormreach
Thanks people, I'm glad I could help!

And envida this using the games dialogues to fire your scripts is the most convienient and prudent way to add your items all throughout the game, on my game I have placeables spawning with stuff all over the place.

@tk102 I know the script example I gave will fire more than once, I figured since envida was refrencing a cutscene it wouldn't need to be the run once kind...

But just in case I'm adding that type of script, so it'll give the reader the option, into my mini-tutorial above.



"Beware the form-fitting black armor-clad Drow hottie with twin Mineral II Greensteel Khopeshes!"
"Liella d'Orien says, '"You're the fool, Devil. -- Witness the power of this fully ARMED and OPERATIONAL Titan!"'"
----------------------------------------------------------------------
RedHawke is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Editing git files and rebuilding

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:13 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.