akuma7802 Posted May 30, 2006 Share Posted May 30, 2006 is there an easier way to place custom items in lets say like a footlocker and/or dead body in the game? is there a tutorial that can make me be able to place custom items in the game TSL Link to comment Share on other sites More sharing options...
RedHawke Posted May 30, 2006 Share Posted May 30, 2006 The only easy way to place items in-game is through the work bench or medical lab station. It only requires the editing of a couple of 2da files, and is by far the easiest route for beginners. Here is a guide/tutorial for that. Unfortunately, most of the placables are re-used between modules so if you were to add an item to a footlocker, for example, you would find your item a ton of times throughout the game, you can even break the game or quests this way. The only safe way of adding items to placables in TSL is through scripting. We have a plethora of scripting tutorials up above in our Scripting tutorial forum. But be warned, scripting can get complicated, while not overly difficult there is more than a little bit you will have to learn. A great way of seeing how this is done is to take a look at someones released mod that does something similar to what you want to do. Most of us modders include our source script files, and that is the best way to get the feel for what you'll likely have to do. I hope this helps! Link to comment Share on other sites More sharing options...
ABCoLD Posted May 31, 2006 Share Posted May 31, 2006 You want the following threads: http://www.lucasforums.com/showthread.php?t=134067 (Non-script method) and the more useful: http://lucasforums.com/showthread.php?t=143536 (scripted method) I used the second one, Darth333's stuff if I remember correctly when I made my Yet Another Exile Item Pack and it worked wonderfully. (And it's a cool mod, check it out!) Link to comment Share on other sites More sharing options...
RedHawke Posted May 31, 2006 Share Posted May 31, 2006 ^^^^ ABCoLD, the non script method won't work in TSL as placables are re-used between modules like I said above. Link to comment Share on other sites More sharing options...
akuma7802 Posted June 5, 2006 Author Share Posted June 5, 2006 i got the whereami band and used it and got the areas and location i need just using the loactions to put a new footlocker with custom items in there. in the threads it shows //note this code allows for re-entry as-is, // you should only attach it to a dialog // that you know will only fire once. // To prevent re-entry in a more general sense, see tk102's notes in the next post 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 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); putting self explained but the bearing and neartest to door and whats the vector, location and object locker? what do i put there. sorry kinda blonde Link to comment Share on other sites More sharing options...
RedHawke Posted June 5, 2006 Share Posted June 5, 2006 //note this code allows for re-entry as-is, // you should only attach it to a dialog // that you know will only fire once. // To prevent re-entry in a more general sense, see tk102's notes in the next post 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 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); putting self explained but the bearing and neartest to door and whats the vector, location and object locker? what do i put there. sorry kinda blonde The only things you need to concern yourself with on the script is the 4 numbers you get from the Whereami coordinates, place them, in order, over the 0.00's in the script above... X, Y, and Z and Orientation in R. The vector and location lines are simply declairing the different variables the script is going to use later. The object locker line you need not worry about either other than the "footlker099" part as this should be changed to whatever you named your placeable utp file just make sure to leave the quotes on either side. The last few createitemonobject lines are where the items get spawned into the placeable the only things you need alter is the text in between the quotes as this is where the filename/tag of the items you want to spawn go. These lines can also be added as many times as you want to spawn as many items as you want. Also note on the last line of code... CreateItemOnObject("g_w_sbrcrstl04", oLocker, [color=yellow][b]2[/b][/color]); The part I colored yellow the 2 indicates that this will spawn a stack of 2 of the items, you can change the 2 to 10 or 100, this way you can place quantities of items. I hope this helps! Link to comment Share on other sites More sharing options...
lord ignarn Posted June 5, 2006 Share Posted June 5, 2006 But, what about some unique locations, like the Iziz Palace museum? If you add one object there it won´t appear all over the game, will it? Link to comment Share on other sites More sharing options...
EnderWiggin Posted June 5, 2006 Share Posted June 5, 2006 As long as it is unique, no, it will appear once. But there was a lot of reusing, and so you should use FindRefs or something to check. _EW_ Link to comment Share on other sites More sharing options...
akuma7802 Posted June 5, 2006 Author Share Posted June 5, 2006 wow thats helps thx, if i have anymore question i will ask. thx very much Link to comment Share on other sites More sharing options...
akuma7802 Posted June 6, 2006 Author Share Posted June 6, 2006 one more thing. where and what .dlg to use for the new footlocker. Next you will need the .dlg file from an in game cutscene. The best place for attaching placeable spawning scripts is the mandantory in game cutscenes. Example: the Sith and Republic Soldiers bantering on Manaan. Open the module up and locate the cutscenes dialog (.dlg) file 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" or "script that fires when spoken" 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. i got eveything expect the .dlg. which .dlg from kt should i use or is it the Dialog.Tlk editor? Link to comment Share on other sites More sharing options...
RedHawke Posted June 6, 2006 Share Posted June 6, 2006 Unfortunately we cannot tell you anything more until you identify better what in game cutscenene or dialog that runs in the module that you want to use to run your script. Link to comment Share on other sites More sharing options...
akuma7802 Posted June 7, 2006 Author Share Posted June 7, 2006 i want to be able to put a footlocker or a metal container inside the game with my custom items where i can obtain them without having to use the cheat mod. i was following your tutorial on spawning items in the game and got stumpped at the .dlg. i am gratefull for your help. the place i am working on is the crystal cave where i can put a footlocker next to the crystal formation. i have the "whereami" and using it. just wondering about the .dlg thats all. the .dlg that i know is in use at the time is when u get the personal crystal and kiera cutscene comes into play Edit: what do u mean by dialog runs in the module. i am not sure what u mean Link to comment Share on other sites More sharing options...
akuma7802 Posted June 12, 2006 Author Share Posted June 12, 2006 one question i was following the tutorial made by redhawke on spawning items. i am using KT and wanted to spawn a footlocker in TSL. i have made a new footlocker and figuered out how to use the nss and to complie the file to make it into .ncs now i am having trouble with the cutscene dialog. where can i find the cutscene in KT. like would it be .utc , utp , utd. which one? or is it the dialog from the charater itsself such as handmaiden or another i am lost on that part need a little help sorry for the blonde hair lol. what i want to do is to be able to place spawn with my items in it but just there no cutscene its just there smell what i am stepping in. Link to comment Share on other sites More sharing options...
RedHawke Posted June 12, 2006 Share Posted June 12, 2006 A cutscene is a mandantory dialog that the game runs, one such cutscene is at the very beginning of TSL when your PC is floating in the tank and Kreia says "awaken" and you end up on the floor. You will be searching for dialog files (dlg), and you either edit the cutscene dialog and add your script call into one of those dialog lines or the better method in case the dialog files isn't uniquely named you can find a script that the dialog runs and name yours the same as that one, simply renaming the original, then run the previous script after yours is run by calling it to run from your script. What you are doing isn't a beginners level thing and that tutorial does assume that you, the reader, have some knowledge of the various game files and are familiar with where things are in KotOR Tool. Since this is basically the same topic as your other thread I am going to merge them... Link to comment Share on other sites More sharing options...
akuma7802 Posted June 13, 2006 Author Share Posted June 13, 2006 oh ok i think i understand now. thx Link to comment Share on other sites More sharing options...
darthrevanrlz Posted June 15, 2006 Share Posted June 15, 2006 so how exactly do you add the script calling? Just got started modding like 2 days, ago, eh. Like Akuma, I'm simply stumped at the dlg. part... Assuming I'm using the 'awaken' dialogue... I've got the DLGEditor and the dialogue. Now what? Link to comment Share on other sites More sharing options...
RedHawke Posted June 16, 2006 Share Posted June 16, 2006 Just got started modding like 2 days, ago, eh. What you are doing isn't a beginners level thing and that tutorial does assume that you, the reader, have some knowledge of the various game files and are familiar with where things are in KotOR Tool. Start with simpler modding aspirations then move up to the more difficult ones, just trying to dive right in, and not knowing what goes where and why, will lead only to frustration. I've got the DLGEditor and the dialogue. Now what? Up above, in Holwan Labs here, you should see some locked forums, they are full of tutorials and such, you should start there. Link to comment Share on other sites More sharing options...
darthrevanrlz Posted June 16, 2006 Share Posted June 16, 2006 Any thread you can think of? Browsed the tutorials, but they seem to go rather quickly over the part I'm stuck at... Hey, I can handle .2da, edit/create items and even script simple force powers. I just can't seem to find a tutorial going into details on how to handle dlg. files and thus make the medbox/container/locker actually appear... And for some reasons, I just can't compile k_force_inc.nss, K_inc_debug and k_sp1_genreric.nss for KOTOR2... Wanted to tweak some powers, but it seems I can't even compile the ORIGINAL k_inc_force... getting a report of like a hundred mistakes... And yes, I have nsscomp.exe and the 3 files in the same folder... Was able to compile powers scripts, eh. You'd think just tweaking during duration and lessening overpowered FPs would be simple, geez... For crying out loud, it'd be easier to just remove buffs and replaces them with a scripted version... Oh well, I'm off to sleep... Hopefully someone can shed more light on all that mumbo-jumbo... Oh, and about "aspirations"... So far, all I want so far is to tweak some in-game force powers and "put stuff around in boxes...". Well, I already tweaked and created "special" (can't say more since those WORK, lol, but let's just say they act as lesser force powers for non-Jedi NPCs...) armbands/powers for specific PCs... Oh, by the way, RH, just so you know... I DID try to do it easy way... Copied/pasted your PCBeginning itempack only I tried to change the location ever so slightly and the name of the box (created an according .uti file)... Couldn't even get the freakin' thing to spawn... Double sigh. Link to comment Share on other sites More sharing options...
RedHawke Posted June 16, 2006 Share Posted June 16, 2006 I just can't seem to find a tutorial going into details on how to handle dlg. files and thus make the medbox/container/locker actually appear... There isn't one just for dlg files as there is no way to write a tutorial to cover everything possible. Have you looked at the tools thread, downloaded tk102's DLGEdit yet? Download that extract a dlg file from the game with KT then open it up in DLGEdit, play around with things. And for some reasons, I just can't compile k_force_inc.nss, K_inc_debug and k_sp1_genreric.nss for KOTOR2... Wanted to tweak some powers, but it seems I can't even compile the ORIGINAL k_inc_force... getting a report of like a hundred mistakes... And yes, I have nsscomp.exe and the 3 files in the same folder... Was able to compile powers scripts, eh. Because you don't compile those scripts they are include scripts, while you can make changes to them they only compile as part of other scripts, so if you change an include script you will need to re-compile every game script that uses that include script. @ You started out well by tweaking anothers mod to see if you can get things to work, I suggest you keep trying. (That's why modders include the source script files with their mods.) Also, and this is for everyone as well, you will have to do a fair amount of reading but you can find what you are looking for even in Tutorials that seem to have nothing to do with what you want to accomplish. Example: Step #4 in this Tutorial How To Recruit An NPC In 10 Steps is about dialogs and attaching scripts to them. Link to comment Share on other sites More sharing options...
darthrevanrlz Posted June 16, 2006 Share Posted June 16, 2006 Oh, about the K_inc_force thingie, I meant compiling k_sp1 alone WITH the other two in same compiling folder... Reason why it didn't work seems to be that I accidently deleted the nwnnscript.txt... Got the "revamped" power (in-game effect) to work just fine... Now I'm trying to figure out how to show it in the FP description screen... Anyway, about the dlg. thingie... Is there a thread/tutorial listing *some8 functions/commands or at least a few examples on how to do a few key things? Meh, worst case scenario I'll just compare a modded dlg.file with an in-game original one, I suppose... Link to comment Share on other sites More sharing options...
stoffe Posted June 16, 2006 Share Posted June 16, 2006 Got the "revamped" power (in-game effect) to work just fine... Now I'm trying to figure out how to show it in the FP description screen... The force power descriptions are found in the dialog.tlk file. Check the desc column for the power's line in spells.2da for the StrRef in question. Then you can look it up and modify that entry in the dialog.tlk file. As for DLG editing, what exactly are you having trouble with? It's one of the more complex structures used by the game, but using tk102's DLG Editor makes it a lot easier. It's still a pretty big subject to explain everything about though. Link to comment Share on other sites More sharing options...
Darth333 Posted June 16, 2006 Share Posted June 16, 2006 For .dlg files, you can have a look at this sticky thread: http://www.lucasforums.com/showthread.php?t=143356 Also take the time to read the readme that comes with tk102's dlgeditor. Link to comment Share on other sites More sharing options...
darthrevanrlz Posted June 16, 2006 Share Posted June 16, 2006 The force power descriptions are found in the dialog.tlk file. Check the desc column for the power's line in spells.2da for the StrRef in question. Then you can look it up and modify that entry in the dialog.tlk file. As for DLG editing, what exactly are you having trouble with? It's one of the more complex structures used by the game, but using tk102's DLG Editor makes it a lot easier. It's still a pretty big subject to explain everything about though. Will do. BUt I remember checking the modded .dlg file after installing you High Lvl Powers mod, Stoffe. New saw the description of YOUR customized powers and I still can't figure for the life of me where those numbers in the spells.2da (name & Spell description) came from... I get how the "Changes" file numbers match the ones in the .2da... but where the hell did those 136xxx values come from? Anyway, I'm off to lunch.... Guess I'll use one of those create-FP threads and start from scratch later this afternoon... Probably will be easier than trying to get all of what ya did and keep up... Link to comment Share on other sites More sharing options...
stoffe Posted June 16, 2006 Share Posted June 16, 2006 BUt I remember checking the modded .dlg file after installing you High Lvl Powers mod, Stoffe. New saw the description of YOUR customized powers and I still can't figure for the life of me where those numbers in the spells.2da (name & Spell description) came from... I get how the "Changes" file numbers match the ones in the .2da... but where the hell did those 136xxx values come from? The values in the name and desc columns in the spells.2da file are StrRefs (String References), which essentially are index values for an entry to use within the dialog.tlk file. DLG files on the other hand are not used for force powers (unless you script them to activate a dialog for whatever purpose). All standard text in the game is located in the dialog.tlk file to make it easy to localize to other languages. This way the developers just have to replace this single file, and all text in the game will be changed. Remember the distinction .dlg files = Dialog files, used for in-game conversations, computer terminals and to control cutscenes. dialog.tlk file = Repository of all standard in-game text strings, and sound references for the creature Soundsets. The dialog.tlk file, located in your main KotOR folder alongside the swkotor2.exe file (not in the override folder like most other modified resources), can be thought of as a long array (or list), with labels starting at index 0 and going upwards, that contain text string entries. A StrRef is an index value into this list/array. For example, StrRef 136500 refers to the 136501th string entry in the dialog.tlk file (since the index starts at 0). An entry in the dialog.tlk file contains a text string, and an associated ResRef (Resource Reference, i.e. name of the sound resource file to use) value that can optionally specify a sound. You can use an utility like TalkEd or KotorTLK, found here, to view and modify your dialog.tlk file. As for the TSLPatcher mod installer you mention, it can be used to insert new entries into the dialog.tlk file of the user, keep track of which StrRef values the entries are added as (which may vary depending on what other changes this particular user has made to the file earlier), and insert those StrRef values into the proper cells in a 2DA file, thus saving the user the trouble of doing all this manually with KotorTool when installing the mod into their game. Since the resulting StrRefs vary depending on what other mods the user has installed, the installer configuration uses dummy indexes in the form of StrRef# tokens, which are substituted for the actual resulting values when installation occurs. This was made to make it easier to install and make my High Level Force Powers mod compatible with other mods people already had installed, since it's lots of grunt work to manually merge 2DA files, append entries to dialog.tlk and make sure everything adds up. Link to comment Share on other sites More sharing options...
darthrevanrlz Posted June 16, 2006 Share Posted June 16, 2006 Oh dear... Just came back and realized I wasn't even looking at the right tlk file. For some reason, the TLKEDitor always opens in the KOTOR I directory... Browsed all the way to KOTOR2 folder the first time and just assumed it would go right back... So, yeah... All your numbers DO add up (duh) and I can actually make sense of it all... Oh well, thanks anyway, for the answer... Got a free two hours, so I'll try figuring out the TSLPatcher thingie... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.