i just wanted to know what would be nessesary to put the player made items into the game, like putting t7's dark side lightsaber in naga sadow's tomb instead of the crappy sity saber and to put other items elsewhere so i dont have to use cheats and the game still flows nicely with the new items
You can try to rename my saber to k39_itm_cersaber Which is the name for the sith Lightsaber. It might override the sith saber, I haven't tested this, but I think Shimaon has already done this very thing.
For it to work properly the upcrystals.2da will also have to changed.
If someone wants to test this that has a save right before going into the temple I would be intersted to know if it works. I tried using a warp cheat ,but that just brought me to the entrance and i couldn't enter.
thanks for the reply, on not on korriban yet, but when i get there i'll let you know if it works, and i dont really mind if it replaces the sith saber, as long as i can still complete the quest with the new saber
also is there a way to place an item into any of the other foot lockers in the game without replacing something already in there, and also is it possible to add things to the replicater in the star forge (the one you get the star forge robes from) like for a specific number a spikes i can tell it to put your guardian of the light saber in the replicater bin along with my star forge robes?
basically i just downloaded a few cool mods, including t7's sabers and i want to find a way to add them into the game without using cheats, to keep the flow of the game coherent.
thanks again
well I have intended to add the items directly to the game, but I haven't taken the time to work out the best way to do it. I like the idea of placeing the sabers in specifc plot points.
Originally posted by i like commas
also is there a way to place an item into any of the other foot lockers in the game without replacing something already in there,
Yes it is possible. Here (
http://webpages.charter.net/alvintamsir/misc/k_act_mispaz.ncs) I have uploaded a small compiled script file that do just that. It will put T7 lightsabers as well as Shimaon's lightsabers into the Metal box in the ebon hawk. All you have to do is go talk to Mission in the ebon hawk and ask to play pazaak. You still need T7 and Shim's mod files.
The source code is this:
void main()
{
CreateItemOnObject("T7_w_dblsbr072", GetObjectByTag("MetalBox"));
CreateItemOnObject("T7_w_lghtsbr74", GetObjectByTag("MetalBox"));
CreateItemOnObject("T7_w_dblsbr070", GetObjectByTag("MetalBox"));
CreateItemOnObject("T7_w_lghtsbr70", GetObjectByTag("MetalBox"));
CreateItemOnObject("shi_a_robe01", GetObjectByTag("MetalBox"));
CreateItemOnObject("shi_w_lghtsbr01", GetObjectByTag("MetalBox"));
}
You can replace those file names with any other new items that you want. Additionally, you can be more creative and place these items somewhere else in the game by changing the object Tag. Or, you can put the script file to be called from somewhere else, say like the Starforge computer that you mentioned.
hey gameunlimited, Im a little confused. What is it that says that those objects are only in the metal box on the ebon hawk.
When it comes to scripting I barely have a clue.
Also another thing is if I want to make a new container and have an object to appear in a certain area or on a certain person or creature what would I need to do. Is it just a matter of writeing a script thats spawns an object or do I have to add the objects to the area git and have a script as well.
I have been trying to figure out how to do simple things like this, but I am at a loss. I pretty much understand what all the files are that makes up an area and how to add them. well sort of.
Can you recomend a good tutorial or site for writing scripts
:confused: I have gone though alot of what is at bioware about scripting, but those requirer the NWN which i do have it's just that the tool set takes short cuts that we aren't able to make yet.
Anyway you can help would be appreciated.
What is it that says that those objects are only in the metal box on the ebon hawk.
It is because the script is being called in the ebon hawk module. The function "GetObjectByTag" will return an object in the current module. In fact, there are two metal boxes in the ebon hawk. This function will return one of it, randomly perhaps. If you need to select one container but not the other, maybe you can use the function "GetNearestObject".
Also another thing is if I want to make a new container and have an object to appear in a certain area or on a certain person or creature what would I need to do. Is it just a matter of writeing a script thats spawns an object or do I have to add the objects to the area git and have a script as well.
Whenever you write a script that spawns an object, it will modify the git file in your savegame. So one or the other will suffice. I think the best way to do this is to modify the git file and put a placable container with a unique tag. Then use the script like above to spawn whatever you want into that container. This way, I can have flexibility on what items I will put in the container, say depending on the player choices. Or (i have not tested this) if you know what item for sure you want to put, i think you can specify what items are in the container right from the .utp file itself. Under the node "Item List" or something, not sure about this one.
As for a good scripting tutorial, I usually take a look at those non compiled scripts to find these functions. The bioware forum seems a good place also.
I thought I might as well throw out some common functions that is commonly used for spawning object for those who wants to try.
CreateItemOnFloor("ItemFileName", location);
CreateItemOnObject("ItemFileName", object target, int NumberOfItems);
GetFirstPC(); -->Returns the PC player, very useful if you want to put item directly in your inventory
GetNearestObjectByTag("Tag", object Target, int NthClosestObjectFromTarget);
So if I want to spawn three copies of item with file name "my_item" in a container second closest to me which has the tag "container001", the script would be:
CreateItemOnObject("my_item", GetNearestObjectByTag("container001", GetFirstPC(), 2), 3);
Thanks i'll try and digest that. It sounds simple. ok forgive my ignorance, how do they work :confused: I think I am going to have to learn C/C++ :(
CreateItemOnFloor("ItemFileName", location);
ok so this is replaced with the name of the item "ItemFileName".
how does "location" work. do i leave it the way it is or do I need to add somthing like this to specify what location like location="area name" then
location Location(vector vPosition, float fOrientation)
I have pritty much the same questions for the rest that you posted.
maybe I am just overthinking this thing or im tired.
gameunlimited if you don't mind giving a detailed explenation of those scripts I would really appreciate it. Just think of me as a retarded baby, lol :D
My bad if I did not make it that clear. :p
To create an object on the floor, I would suggest if you use the function "CreateObject" instead. The syntax is as follow:
CreateObject(int nObjectType, string sTemplate, location lLocation)
So this means, to call this function, you need to put forward 3 parameters, the first one is an integer, then a string, then a location. The first one, int nObjectType, should be replaced by either one of these:
OBJECT_TYPE_ITEM
OBJECT_TYPE_CREATURE
OBJECT_TYPE_PLACEABLE
OBJECT_TYPE_STORE
Pretty straight forward, if you want to spawn a creature, then replace "int nObjectType" with "OBJECT_TYPE_CREATURE".
The second parameter is the filename such as "g_w_lghtsbr01".
Now the location is little bit tricky. As you mentioned, a locations is declared as Location(vector vPosition, float fOrientation). However, to declare a location, you need to supply two more different parameter, vector vPosition and float fOrientation. A float is a standard variable, you can just put numbers like 3.1475315. However, a vector is tricky also, you have to declare it beforehand. The syntax is
vector Vector(float x=0.0f, float y=0.0f, float z=0.0f)
Perhaps it is easier if you take a look at this sample code
void main()
{
vector MyVec = Vector(52.0, 42.0, 2.0); //line 1
location MyLoc = Location(MyVec, 0.0); //line 2
CreateObject(OBJECT_TYPE_PLACEABLE, "metalbox001", MyLoc); //line3
}
First, what I did is to declare a vector called "MyVec" in line 1. Those three numbers correspond to the x, y, and z coordinates. You can get this numbers by using the cheat command in the game "whereami". Go to whereever you want to spawn the object then type it to get the coordinates.
Next in line 2, I declare another variable, this time is a Location variable. I supply the "MyVec" vector variable into this function as a parameter. The second parameter of the Location function is a float number. (A float is simply a decimal number) It corresponds to the direction the object will be facing once spawned. Now you got yourself a location variable called MyLoc. Now you can use this for the CreateObject function.
Note: if you input a number, let say"1", into a function that required a float, you might get an error as the compiler will treat "1" as an integer. You have to use "1.0" instead to do this, as only floats can have decimals.
So basically, that script above will create an object with the filename "metalbox001" in the coordinate 52.0, 42.0, 2.0. (this coordinates correspond to the center room where T3 stands in the ebon hawk).
Save the above code as "k_act_mispaz.nss" then compile it. I usually use nwncompiler. This is the script that is called whenever you play pazaak with mission. Do that and a metal box will be spawned. :)
As for the other function that I mentioned earlier, these are the more clear definitions of the as taken from the KotOR script itself.
object CreateItemOnObject(string sItemTemplate, object oTarget, int nStackSize)
object GetFirstPC() **highly useful**
object GetNearestObjectByTag(string sTag, object oTarget, int nNth)
location GetLocation(object oObject) **highly useful**
So for example, you have supply a string, an object, and an integer to call the function CreateItemOnObject. (If you leave some parameters blanks, sometimes the function will still work. It will assign a default value for itself). Meanwhile, the function GetFirstPC does not require you to supply anything.
Now unto the different types of variables:
String: A string can contains text in it. To supply a string DIRECTLY, you have to use the quotation mark. However, if you supple a variable name, you can not use quotation mark. Example: (these are not real ingame functions)
Print("Hello World") not Print(Hello World).
However, you can do it this way too:
string MyString = "Hello World";
Print(MyString);
Integer: Simply put an integer number, remember no decimals allowed.
Float: These are decimals. If you want to supply 100, either write it as 100.0 or 100f. The f tells that it is a float.
Object: Objects are that objects. It can be an item, a creature, a waypoint, or most other ingame objects. You can not define object from scratch. You should use some of the functions such as GetFirstPC() to return an object.
Example:
object MyObject = GetFirstPC();
That line means, create a variable MyObject, then assign the Main Character into it. There are many other functions that can assign different in game objects into a variable.
Location: See my previous post. Alternatively, there are some functions that return a location. The most common one is the GetLocation(object oTarget). Example:
location MyLocation = GetLocation(GetFirstPC());
Those are about the common ones that are found quite often. Hope this help.
ok, thanks that does help me to beggin to understand.
i'm glad someone is beginning to understand, lol
i know pretty much nothing about modding and had no idea how complicated these things got.
thanks for all of your help guys, you all rock
i really glad people like the idea of player made items being placed later in the game, as using the give item cheat kinda takes away from the game a little, especially which such powerful items, that would make the game a little two easy early on, but will help a lot later in the game, especially when using the hardcore mod like i plan to on my next couple games
good luck to the people trying to do this, i hope you post it if you guys figure it out :)
I'm knew to this entire thing. I've started downloading mods and creating my own only a few days ago, and I'm picking up pretty quickly. I'm not exactly sure how that scripting works though. I see you, gameunlimited, gave a had to give a location variable and you altered the file so that a custom item containing metal box would spawn in the center of the Ebon Hawk when you tried to play Pazakk with Mission. What I'd like to know is how you place similar custom items on the remains of enemies, like Davik or Brejik. I assume that the format would be similar, but that a different file would have to be altered and the location variables wouldn't be quite the same. Coudl you please explain how that would work.
I think I understand everything gameunlimited has done, but I'm not really sure. I get better as I try stuff, so I'll probably understand everything after I've messed with it a while. I'd still like to go ahead and ask incase I get stuck, but I will try it myself with the information you have given so far. Thanks.
Originally posted by True_None
What I'd like to know is how you place similar custom items on the remains of enemies, like Davik or Brejik.
If you want items to appear on npc corpes all you have to do is find the utc for the npc and add the items to the item list so for Davik it would be tar08_davik082. you can find it @ RIMs-->Modules-->tar_m08aa_s.rim--> blueprint,Character.
Simply double click tar08_davik082 and the utc editor will pop up, then click the Inventory button in the lower left corner. Simply drag the item off the Game items tab to Pack Inventory . when your done click ok then save the file to override and when davik dies you will get to plunder the loot you added. *note, For this to work the area would have to be loadedfor the first time so that the game will load the file in override instead of the one in the module.
Originally posted by T7nowhere
*note, For this to work the area would have to be loadedfor the first time so that the game will load the file in override instead of the one in the module.
What do you mean the first time. Do you mean before I enter Davik's Estate, or before I ever start a new game.
:fett:
Before you enter the module where Davik is located for the first time.
Thanks to both of you T7 and Darth333. I'll try it right away. I really hope it works.
hey gameunlimited i was just wondering if you know how to give a recuiteble npc a lightsaber with a costum made sabercrystle in it because i made a recuiteble npc and i made a light saber and a implant a robe and a crystle and i made it so my costum npc was holding them when you recruited him but the only problom is that i don't know how to get him to have my costum made sabercrystle in the lightsaber (or even just have them so you could just do a upgrade on your light saber that put it in the lightsaber but for some reason i can't get him to have it when i recruite him PLEASE HELP.
:firehead :lightning
:newbie:
your going to need to hex edit the model files to add. It would be nice if you PM'd some of us instead of building new threads or reviving dead threads.
Simply edit the utc file with Kotor tool or GFF editor to add the item in your npc's inventory.
@ Darkender: on the contrary, I encourage Withguy to post his questions on the boards instead of using PM.
It benefits to other persons that may have the same questions, especially since the search function has been temporarily turned off. Also, it is to the advantage of the person who asks the question: many times there is more than one way of doing things. This community has been able to develop because people were sharing the info on the boards. If everyone would always work via PM, then Holowan labs would not exist and Kotor modding would be far less developped than it is and accessible only to a few.
...and this is not a dead thread: although Gameunlimited is no longer coming to the forums, I just pointed Withguy to t7's sticky Do you want to mod SW-Kotor? then start here. were there is a link to the present thread. Please leave forum policy issues to the moderators.
I apologize. I jumped the gun but I have noticed the questions that have been asked are answered in other stickies and threads.
________________________________________________
Originally posted by Darth333
Simply edit the utc file with Kotor tool or GFF editor to add the item in your npc's inventory.
________________________________________________
thanks Darkender and darth333 for the help but i all ready did what darth333 did and it still isn't there when i recruite him so either i messed up on my item or something or i just didn't do it right.
:firehead :lightning
:newbie:
what you need to do is hex edit the mdl file when I get home I'll put together some instructions and post them for you.
__________________________________________________ ____
Originally posted by Darth333
it could be your .uti file. Verify these tutorials made by Achilles to make sure everything is in place:
http://www.lucasforums.com/showthre...threadid=132253) and
http://www.lucasforums.com/showthre...threadid=129450)
__________________________________________________ ____
thanks darth333 i'll try it out soon
__________________________________________________ ____
Originally posted by darkkender
what you need to do is hex edit the mdl file when I get home I'll put together some instructions and post them for you.
__________________________________________________ ____
thanks darkkender i'll try your thing right when you get it
THANKS everybody
:firehead :lightning
:newbie:
I DID IT i found out what was wrong with it i looked it over for some time and then went to GFF editor and i found out what was wrong with it i had miss spelled one of the words in the items text :o so i treid to put it wright but it wouldn't let me put another letter on it so all i had to do was change what it said.
BUT THANKS FOR ALL THE HELP ANY WAYS
:firehead :lightning
:newbie:
:o
good to here. hope to see a mod from you soon.
Originally posted by darkkender
good to here. hope to see a mod from you soon.
ya thanks im going to put out a little version and see how it does (but first im going to wait untill darth333 checks it because i can't get the portiet to work so she is checking it out for me)and then soon after that im going to put an update out for it.BUT HERES A SPOILER:I'm going to make it so you have the choice to recruite two people or you can kill the second person and just get a few dark side points.
:firehead :lightning
:newbie:
Originally posted by whitguy
(but first im going to wait untill darth333 checks it because i can't get the portiet to work so he is checking it out for me)
ummm...
"she" is checking it out for you ;)
Originally posted by ChAiNz
ummm...
"she" is checking it out for you ;)
oops thats funny i didn't mean that thanks for making it all right HAHAHAHA
:firehead :lightning
:newbie:
i just read this thread and im not sure i got the jist of anything that was said aside for the davik thing
i made a dbl bladed saber and want to put it on yavin station in a new container with a datapad how do i do that... if thats what gamesunlimited was talking about can someone simplify it ... for super noob dummies :amidala:
Originally posted by sketch42
i just read this thread and im not sure i got the jist of anything that was said aside for the davik thing
i made a dbl bladed saber and want to put it on yavin station in a new container with a datapad how do i do that... if thats what gamesunlimited was talking about can someone simplify it ... for super noob dummies :amidala: If you're super noob, then you might want to consider setting your sights on something a little simpler. A new container involves module editting and/or scripting. Placing it involves scripting, dialog editing, and/or placeable editing. Not to mention actually making the saber and the datapad. Resources for all of these can be found in the stickies and tutorials found within. I hope this helps to get you started.
Or you can do what I did (and still do occasionally), use Achilles' method of placing items in game without scripting. Granted there's no unique placeable on Yavin Station, but if you're 'itching' to get your stuff in the game without cheat codes, this method proves to be a winner :thumbsup:
Take advantage of Holowan's new Tutorials Forum. Achilles' method is in the General Tutorials Forum :)
Originally posted by ChAiNz.2da
Or you can do what I did (and still do occasionally), use Achilles' method of placing items in game without scripting. Granted there's no unique placeable on Yavin Station, but if you're 'itching' to get your stuff in the game without cheat codes, this method proves to be a winner :thumbsup:
Take advantage of Holowan's new Tutorials Forum. Achilles' method is in the General Tutorials Forum :)
yes i just saw that tut today and thought hey thats just wat im looking for i think.... when is it not possible to use this method...
Forward: It is important to note that not all placeables can be utilized using this method. Footlockers, corpses, and other placeables that are not uniquely labeled or not normally used by the game may require the use of scripting to store custom items.
but he says how to make it ULP so ...
:confused:
Originally posted by sketch42
but he says how to make it ULP so ...
:confused:
Well, you can't "make" anything ULP (other than scripting), so unfortunately you're pretty much stuck with whatever the game gives you.
What you would want to do is open Kotor Tool, and open:
RIMS > Modules
From here, you'll see a list of all of the game's module, pretty much named in a self-explanatory method.
Choose where (the area) you want to place your item(s). Now click the + next to that area with the "s.rim" extension and look for the Blueprint, Placeables section.
Here you'll find a list of all the placeables within that area. The trick is to find a placeable that has a 'unique' indentifier. Usually it's an underscore "_". You can extract this particular .utp with Kotor Tool.
Once extracted, open the .utp (again with KT) and to your lower left is an "Inventory" button. Press it and you'll see a list of what this placeable contains. Add your items to this list and save.
Now all you have to do is drop the saved file in your override and from here on out, you'll find your items in the particular container of the specific area you chose.
Hope that helps :)
though I think I just re-itterated the tutorial ;)
Originally posted by ChAiNz.2da
Well, you can't "make" anything ULP (other than scripting), so unfortunately you're pretty much stuck with whatever the game gives you.
What you would want to do is open Kotor Tool, and open:
RIMS > Modules
From here, you'll see a list of all of the game's module, pretty much named in a self-explanatory method.
Choose where (the area) you want to place your item(s). Now click the + next to that area with the "s.rim" extension and look for the Blueprint, Placeables section.
Here you'll find a list of all the placeables within that area. The trick is to find a placeable that has a 'unique' indentifier. Usually it's an underscore "_". You can extract this particular .utp with Kotor Tool.
Once extracted, open the .utp (again with KT) and to your lower left is an "Inventory" button. Press it and you'll see a list of what this placeable contains. Add your items to this list and save.
Now all you have to do is drop the saved file in your override and from here on out, you'll find your items in the particular container of the specific area you chose.
Hope that helps :)
though I think I just re-itterated the tutorial ;)
yea lol i got that.. i just wanted to know of instances where you couldnt use this method..
Yeah I used this method myself I found a locker to place my items in, only problem was that this locker's name wasnt uniqe so my stuff started to pop up in alot of lockers :rolleyes:
So are there any tutorials on how to add a item to an exsisting placeable?
I could really need that now. I was so happy when my stuff appeard in the locker but when it started to appear everywhere else I knew something was wrong.
To answer both of your questions, Achilles' method does work, I've used it countless times in my mods. The trick is determining what's a Unique Placeable versus a standard re-used placeable.
ie - a Unique Placeable (what you're looking for) will usually have an underscore in it's filename:
dan13_nemobody.utp
dan14aa_speeder.utp
Don't use .utp's named like:
metalbox001.utp
footlker001.utp
You can find areas and placeables in RIMS > Modules. Look for the modules with the s.rim extension...
If all else fails, place it in an encounter character's .utc inventory.
ie - dan14_sherruk.utc (mandalorian with an attitude).
Make sure it's marked droppable and when you gut him, voila your item is claimable "booty"...again, make sure the character encounter is Unique via an underscore.
It's best when using this method that you don't pick something generic such as "duros" UNLESS it has a numbered suffix like "duros03, duros04, etc." And obviously, make sure it's a kill or be killed encounter. If you put it in someone like Shen's inventory, you'll never get it ;)
you can also do what Redhawke does and that is have a placeable that is your own custom(Redhawke uses metalbox069.utp) and then you have a script spawn the placeable and then add your items into it. Then you have that script fired from a dialogue or from a ondeath entry for a creature.
I've read through this, and I'm still lost ... I have a robe I have created ... it is in my Override folder, but it doesn't show up in KOTOR TOOL as an Item ... so I can't add it to any placeable .. (KOTOR-II) It has a unique name, etc .. and I can add it using the game editor, but I can't add it to the container that has the miner clothes or the exile's quarters because it won't show up in my item list ... what am I doing wrong?
Hello Dread Wolf... welcome to the forums! :waive1:
Open up the placeable utp with KotoR Tool add any item to its invantory (Like a Mining Laser or something) then simply click on the items ResRef you just added and change it to the ResRef/Tag of your custom item. Save the utp to override. Test away! :D
Just be warned there are not many unique placeables in TSL so be careful. ;)
Thank you for the welcome! And thank you for the help ... (I must have missed the part where I had to type in my tag name over top another item) ... it worked wonders ... my 10 year old (and I) are both very happy now .... I'm not that great at modding .. and all I really wanted to do was make a robe that looked like the Dark Jedi Robe and had the abilities a little better than the Ossus Keeper Robes .... but now that I have this little gem .. I may have to make some changes to allow two types of upgrades to the Miner's Uniform and Robes (and beef up the Minor's Uniform) ... hmmm maybe I'll make some changes to the Dancer's Outfit too ......