Jump to content

Home

[TSL] Placeables


kay338

Recommended Posts

Where are they located? im trying to addmyself some gear and dont know where the placeables are, i pretty much got the idea of how to put the items in the placeables but cant seem to find them. for example, in nar shadda in a plasteel container with some theres items in there, where would i be able to find this placeable?

Link to comment
Share on other sites

Originally posted by kay338

Where are they located? im trying to addmyself some gear and dont know where the placeables are, i pretty much got the idea of how to put the items in the placeables but cant seem to find them. for example, in nar shadda in a plasteel container with some theres items in there, where would i be able to find this placeable?

 

Module / area specific placeables can be found here:

 

Kotor II > RIMs > Modules >

 

Look in the _s.rim files and open the Blueprint, Placeables tree

 

Word of warning however. TSL is really weird about the placeables and tends to want to use the same one over and over.... even if it looks like it would be "unique". Scripting is probably the safest route to go, unless you want to try placing it in an encounter's .utc file. Just make sure that too is an "unique" confrontation...

Link to comment
Share on other sites

wow your right, the placeables are confusing :confused: nothing like kotor1

 

well im gonna go with the scripting then, are they the same? for both kotor1 and tsl? cause i found some but im not sure if they are for tsl. and thnx chains.2da big help :)

Link to comment
Share on other sites

Originally posted by kay338

wow your right, the placeables are confusing :confused: nothing like kotor1

 

well im gonna go with the scripting then, are they the same? for both kotor1 and tsl? cause i found some but im not sure if they are for tsl. and thnx chains.2da big help :)

Some scripting features are the same, and I've heard there's even new things to play around with. A scripter I'm not, but lately it's the "in thing" :lol:

 

Just look around the threads and stickies for some examples and remember... help is just a "desperate plea" away ;)

Link to comment
Share on other sites

Originally posted by kay338

lol it sure is the "in Thing" i gotta read some stuff about scripting, hopefully compile some of my own scripting i always wanted to get into C++ :) Not the STUPID!! A++ i got :mad:

Our resident scripting experts have made it all to easy for us. This should cover just about anything you hope to do (within reason).

 

I hope that helps.

 

BTW: found this in the stickies :D

Link to comment
Share on other sites

yay thnx guys :) really helpful u all got me into scripting, hopefully i will become a natural :) Darth333,Tk102 THNX!!! you showed me the way of scripting after reading your tutorials, and thanks to all others who were very helpfull!

Link to comment
Share on other sites

Originally posted by kay338

yay thnx guys :) really helpful u all got me into scripting, hopefully i will become a natural :) Darth333,Tk102 THNX!!! you showed me the way of scripting after reading your tutorials, and thanks to all others who were very helpfull!

I hope so too... then I'll have someone else I can beg for help :D

Link to comment
Share on other sites

i asked envida if i can post his code on how to spawn an item in tsl and he said yes... ive added my own notes in black text... some of the notes seem obvious.. but hey we were all newbies once...

 

(o and if i made any mistakes please someone correct me)

 

First things first .. before we get into the actual script you need to find out where you want the placeable... corpse footlocker etc... to, "spawn", be created

 

so since we are using a script to make our placeable we will need to find a place that uses a cutscene ... this way we can have our script fire when the script for the cutscene plays....

 

for this purpose we are going to use the Harbinger crew quarters.. where in the game you come to a door ... a cutscene plays ... and you find out that this was your room..

 

now comes the scripting

 

this first script will actually "spawn", create, your container corpse, whatever placeable , with the items already in the inventory... copy this and paste it into notepad

 

//:: FileName: ev_har_pclocker.nss
//:: Author: envida
//:: Created: 10 FEB 2005
//:: Description: adds a container with extra equipment inside the players quarters onboard the Harbinger

void main() {

// get object
object oldPcLocker = GetObjectByTag("ev_har_pclocker");[b][color=black]// Put the name of your item in the parenthesis between the quotes[/color][/b]

// check if object is already spawned
if (oldPcLocker == OBJECT_INVALID) {

	// set coordinates for object [b][color=black]//Use Darth333 whereami armband find it here [url]http://www.lucasforums.com/showthread.php?s=&postid=1770398#post1770398[/url][/b][/color]
	float x=6.419308662415f;  // set the 'x' coordinate
	float y=6.078714561462f;  // set the 'y' coordinate
	float z=0.133353590965f;  // set the 'z' coordinate
	float r=-0.000000000000f; // set the orientation 'r' in degrees

	// add coordinates to object
	vector myVec = Vector(x,y,z);
	location myPcLocker = Location(myVec, r);

	// create new object:[b][color=black] this next line will create, "spawn", your Placeable.. i.e. locker, corpse plasteel cylander etc...
               // Put the name of your placeable in the quotes[/b][/color]  
	object newPcLocker = CreateObject(OBJECT_TYPE_PLACEABLE, "ev_har_pclocker", myPcLocker);

	// create new items in object:[b][color=black] these next lines will create an inventory of items you want on the object that was just spawned
                              //Again put the name of your item in the quotes..... you can have as many items as you wish[/b][/color]
	CreateItemOnObject("ev_gloves_01", newPcLocker); // <FullName>'s Gloves
	CreateItemOnObject("ev_belt_01", newPcLocker);   // <FullName>'s Belt
	CreateItemOnObject("ev_robe_01", newPcLocker);   // <FullName>'s Dark Robe
	CreateItemOnObject("ev_robe_02", newPcLocker);   // <FullName>'s Light Robe
	CreateItemOnObject("ev_imp_01", newPcLocker);    // <FullName>'s Implant
	CreateItemOnObject("ev_band_01", newPcLocker);   // Finesse Armband

}
}

 

save this as a Unique name that you know the game is not using or will ever use so as to not overwrite any other scripts.. also save the file with the extension .nss

 

and finally we need a new script that will fire both our script and the original script, which in this case is k_152area_enter.ncs.

 

//:: FileName: k_152area_enter.nss
//:: Author: [email]envida@gmail.com[/email]
//:: Created: 10 FEB 2005
//:: Description: allows for launching extra scripts when entering a area along with the original enter script

void main() {

// launch new scripts [b][color=black]put the name of the script you just made in between the quotes[/b][/color]
ExecuteScript("ev_har_pclocker", OBJECT_SELF);

// launch the original enter script
ExecuteScript("152_har_enter", OBJECT_SELF);

}

 

now save this new file as the same name as the orriginal script ... which in this case is k_152area_enter

 

again save the file with the extension .nss

 

after you finished doing that compile your scripts using nwnnsscomp and dropthe newly created .ncs files into your Override directory... if you dont have a Override directory ... than you can create one ... goto where you Kotor2 installation is.. the default is c:>program files>lucasarts>swkotor2

create a new folder and call it Override and thats it

 

hope this helped

 

again if i made any mistakes even the smallest please correct me...

 

i would like to thank envida for allowing me to post his script and of course all of holowan labs that made me even able to understand what little i know.. :)

Link to comment
Share on other sites

Originally posted by Xcom

No mistakes, but you basically reposted the tutorial (RedHawke's) that's included in the stickies here (and credited envida for the script... ???).

http://www.lucasforums.com/showthread.php?s=&threadid=143536

 

:giveup:

 

o ... hmm i didnt realize thta... i gave credit to envida cuz i got that from one of his mods... regardless the final script . the one needed to fire both the orig and the new one werent posted..... so i guess its still somewhat helpful... :(

Link to comment
Share on other sites

Someone may allready have said this but here goes:

1. KOTOR II was designed to use the same placeable over and over again. Why? Well, remember when they said, "We cut corners to save some memory."

 

2. Scripting is probally the best way.

 

Keep this in mind:

Obsidian said, "We altered alot of the original game, so we can cut back on its use on memory" Here is what they did:

 

!. Visis Marr and Krea, when you change their clothes to Jedi clothing, they never change their apperience. Thus, nothing needs to be loaded.

 

2. Placeables, they use the same placeables throughout a planet/ship, which will reduce loading time. Therefore, when you alter a placeable, such as Coorta, and then you place his file into the KOTOR II override folder, the placeables naming convention will override any other mod, which has the same naming convention regardless of what you do. Other words they were cheap.

 

3. They also re-used elements between levels, so they didn't have to recreate new elements. Placeables, textures, etc... So, becareful.

 

--------------------------------------------------------------

 

I know this turned into a rant, but I thought you should just be aware of some of the problems I have been dealling with when I altered placeables.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...