Darkkender Posted November 8, 2004 Share Posted November 8, 2004 I'll try it Darth and thanks. I do have one question about that is the {int nResult = GetGlobalNumber("KOR_DANEL");} portion of the script the one you must define yourself? I may have more questions yet to come after trying this out but not right now. Link to comment Share on other sites More sharing options...
Darth333 Posted November 8, 2004 Share Posted November 8, 2004 "KOR_DANEL" and "K_SWG_DUSTIL1" are the names of the globals that are used for the Dustil plot. I don't know what is it for Bastila. I don't have the game with me but you can use tk102's Global Variable comparison tool to find out the what are the globals and correct values. You can also look at the scripts that are attached to the dialogues to see what globals are fired - tk102's recent FindRefs tool may also come very handy when you work with this. edit: you'll find more examples in this thread: http://www.lucasforums.com/showthread.php?s=&threadid=130668&highlight=KSTARMAP Link to comment Share on other sites More sharing options...
Darkkender Posted November 8, 2004 Share Posted November 8, 2004 Thanks Darth, I thought KOR_DANEL looked familiar. Now that I'm going to being playing with globals I already have strted DL those utilities. To help me out. Link to comment Share on other sites More sharing options...
tk102 Posted November 8, 2004 Share Posted November 8, 2004 Hi darkkender, Not really sure I understand the scenario you're posing, because if Bastila's recruitment script has fired, then Bastila is already in your party and should replace any NPC that may already exist in her slot. Or is that the problem - that Bastila can't be recruited if you have an NPC in her slot? I haven't played much with those functions. The closest Global that I found is a Boolean called "Tar_SwoopRace" whose value is TRUE when you've won the swoop race on Taris, just prior to recruiting Bastila. My guess is that you'll probably need to 'inject' a script into the dialog that frees Bastila to remove any NPC that may exist in her slot. It's simple enough to do -- beancounter wrote a thread regarding this technique here. Link to comment Share on other sites More sharing options...
darkersoul Posted November 8, 2004 Share Posted November 8, 2004 Hey. I tried the script and it worked...only not for the droids. It kept giving me a compiling error or something like that. I think I have the wrong codes for them or something. Anyways, I hit a little snag in the mod and I was wonderin' if anybody knows how to remove a character from your group (not the party as a whole, like you have to do for custom NPC recruitment, but the group as in the two others that follow you around all the time). Where do you guys find all this scripting stuff anyhows? Link to comment Share on other sites More sharing options...
tk102 Posted November 8, 2004 Share Posted November 8, 2004 Try this script darkersoul for removing a party member: void main() { int nPMIx=0; object oPartyMember=GetPartyMemberByIndex(nPMIx); while (GetIsObjectValid(oPartyMember)) { if (GetTag(oPartyMember)=="tag_of_member_to_remove") { RemovePartyMember(nPMIx); break; } nPMIx++; oPartyMember=GetPartyMemberByIndex(nPMIx); } } I haven't tested this... Link to comment Share on other sites More sharing options...
Darkkender Posted November 8, 2004 Share Posted November 8, 2004 Originally posted by tk102 Hi darkkender, Not really sure I understand the scenario you're posing, because if Bastila's recruitment script has fired, then Bastila is already in your party and should replace any NPC that may already exist in her slot. Or is that the problem - that Bastila can't be recruited if you have an NPC in her slot? I haven't played much with those functions. The closest Global that I found is a Boolean called "Tar_SwoopRace" whose value is TRUE when you've won the swoop race on Taris, just prior to recruiting Bastila. My guess is that you'll probably need to 'inject' a script into the dialog that frees Bastila to remove any NPC that may exist in her slot. It's simple enough to do -- beancounter wrote a thread regarding this technique here. Hey thanks for getting back to me Tk102 actually Darth333 pretty much put me on the right track of where I wanted to go. I was using bastilla as an example purpose. When I saw the other thread that talked about the global conditions that happen and realized that those were exactly what I was needing to use as a reference in game. Link to comment Share on other sites More sharing options...
tk102 Posted November 8, 2004 Share Posted November 8, 2004 Np, darkkender. I just realized my previous post should've been directed at darkersoul... oops. And if you need to set a global variable, you can either reuse an old one (like one's from the Endar Spire) or create a new one in globalcat.2da. Local variables are handy for short term sets/checks otherwise. Link to comment Share on other sites More sharing options...
Darkkender Posted November 8, 2004 Share Posted November 8, 2004 Originally posted by darkersoul Hey. I tried the script and it worked...only not for the droids. It kept giving me a compiling error or something like that. I think I have the wrong codes for them or something. Anyways, I hit a little snag in the mod and I was wonderin' if anybody knows how to remove a character from your group (not the party as a whole, like you have to do for custom NPC recruitment, but the group as in the two others that follow you around all the time). Where do you guys find all this scripting stuff anyhows? If I understand you correctly you will want to use a destroyobject script and it will destroy the NPC/partymember on the spot without removing them from your overall party. Where do we get the stuff, well from many sources if your using kotor tool(which you should really use) then go to BIF's, scripts, script sources and you can see alot of the scripts used in the game uncompiled. Also the reason you may not getting a proper compile because you probably need the include files placed in the same directory that you are compiling your scripts. Link to comment Share on other sites More sharing options...
darkersoul Posted November 9, 2004 Share Posted November 9, 2004 Hey, thanks all you guys for all the help. I will have to give those scripts a good look. Anyways, what I am tryin' to do is just write a little mod for fun that allows you to take certain characters into the final battle against Malak...not that I find the fight hard or anything. Anyways, the snag I ran into is that apparently for some reason or another the ending scene for a light side character doesn't like what I am doing and crashes the game when it tries to load. Everything else works just fine. So I figure that if I get a script that removes all the "extra" members of the party that *might* fix things. I dunno, though. We shall see... Never mind that. I just remembered that the savegame that I was using was brought in from a previous run-through of the game where I had been using the recruit Redhawke mod... nice mod by the way, if I do say so myself. Anyways, since then I removed the mod (technical difficulties, namely a virus hit my comp. hard) and never got around to reinstall it. I bet the snag is from the fact that Redhawke was in my group and that now it cannot load the character anymore the fact that I didn't realize this earlier is because the game had never needed to load Redhawke untill that point... hehe, I'm such an idiot. =>Yup, that did it. No problems there anymore. I don't even have to remove the extra members from the group. Now to fix that dialoge problem and I'll be all set... Link to comment Share on other sites More sharing options...
darkersoul Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by darkkender Where do we get the stuff, well from many sources if your using kotor tool(which you should really use) then go to BIF's, scripts, script sources and you can see alot of the scripts used in the game uncompiled. Also the reason you may not getting a proper compile because you probably need the include files placed in the same directory that you are compiling your scripts. I also fixed that little problem. The thing was that I was using incorrect syntax. I accidentally typed "NPC_HK47" and "NPC_T3M4" instead of "NPC_HK_47" and "NPC_T3_M4" like I should have. I found this out by looking through the scripts as you advised. Link to comment Share on other sites More sharing options...
Darkkender Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by tk102 Np, darkkender. I just realized my previous post should've been directed at darkersoul... oops. And if you need to set a global variable, you can either reuse an old one (like one's from the Endar Spire) or create a new one in globalcat.2da. Local variables are handy for short term sets/checks otherwise. Hi, got a small problem what should I be using in your gui findrefs utility to get more than one result sometimes 2. If I turn on the partial search it locks up my system. I spent around 3 hours last night trying to decipher through the globalcat.2da, global.jrl, and savedgames ref files with kotor tool. I was thinking should I download and make use of your non-gui findrefs utility? Link to comment Share on other sites More sharing options...
tk102 Posted November 9, 2004 Share Posted November 9, 2004 Hi, got a small problem what should I be using in your gui findrefs utility to get more than one result sometimes 2. If I turn on the partial search it locks up my system. I spent around 3 hours last night trying to decipher through the globalcat.2da, global.jrl, and savedgames ref files with kotor tool. I was thinking should I download and make use of your non-gui findrefs utility? You'll probably need to switch on partial matching and make sure it is not case sensitive. If we're still talking about global variables, you only need to search .ncs files (uncheck the ALL box). You are certainly welcome to use the non-GUI version as well. The syntax would be findrefs -nPq [i]what-to-search-for[/i] . Fred also added a search function in Kotor Tool that you could try as well. Link to comment Share on other sites More sharing options...
darkersoul Posted November 9, 2004 Share Posted November 9, 2004 Is there somethin' special you have to do to make custom dialogs to work? I have made sure the conversation line in the .utc file was given the same name as the .dlg file I wanted to use but no dice. I can't seem to figure this one out. Am I missing a script or something? Link to comment Share on other sites More sharing options...
Darth333 Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by darkersoul Is there somethin' special you have to do to make custom dialogs to work? I have made sure the conversation line in the .utc file was given the same name as the .dlg file I wanted to use but no dice. I can't seem to figure this one out. Am I missing a script or something? You don't need any script for this, most likely somehing is wrong with your dlg file. What did you used to make your .dlg? Link to comment Share on other sites More sharing options...
darkersoul Posted November 9, 2004 Share Posted November 9, 2004 I am usin' tk102's DlGEditor v1.0.1. Should I try redoing the whole .dlg file? => Ahhh, forget it. Upon more investigation I found the problem was more Darkersoul Stupidity. In short I was screwing up the speaker settings and whenever the dialog was called during the game it was looking for a character with a tag that didn't exist, thus creating the problem...I think. I really need to get the hang of this... Link to comment Share on other sites More sharing options...
tk102 Posted November 9, 2004 Share Posted November 9, 2004 In that case, email me the .utc and .dlg file. My email is in the Help: About menu of DLGEditor. Also there is a more recent version available. v1.0.5 Link to comment Share on other sites More sharing options...
Darth333 Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by darkersoul I am usin' tk102's DlGEditor v1.0.1. Should I try redoing the whole .dlg file? No but easier solution is probably to compare it to an original dialogue file and .utc file to make sure you have everything in place. Make sure your starting list is ok. Is it a complex dialogue or just a few lines? If it's not too long, and if you cn't figure out what's wrong, then I could have a look at it. edit: tk102 you beat me - I'll leave this into your hands Link to comment Share on other sites More sharing options...
darkersoul Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by Darth333 No but easier solution is probably to compare it to an original dialogue file and .utc file to make sure you have everything in place. Make sure your starting list is ok. Is it a complex dialogue or just a few lines? If it's not too long, and if you cn't figure out what's wrong, then I could have a look at it. edit: tk102 you beat me - I'll leave this into your hands The dialogue was custom-made with tk102's utility. In essence, it is the original. Link to comment Share on other sites More sharing options...
Darth333 Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by darkersoul The dialogue was custom-made with tk102's utility. In essence, it is the original. Sorry if I wasn't clear, I meant to compare it with one of the game's original dlg files (a non-modified file already part of the game and not a custom dlg). Link to comment Share on other sites More sharing options...
darkersoul Posted November 9, 2004 Share Posted November 9, 2004 Originally posted by Darth333 Sorry if I wasn't clear, I meant to compare it with one of the game's original dlg files (a non-modified file already part of the game and not a custom dlg). Yeah, that's what I did in the end. You see, my problem was laughably simple. I was using the name of my .utc file as the speaker instead of the character tag in the .utc file. I noticed the difference while looking through another dialogue file and when I opened the dialogue in Kotor Tool it actually said "Speaker Tag". Again, I feel like an idiot, but hey, I am still learning. I tested the fix and everything works now. Link to comment Share on other sites More sharing options...
Darkkender Posted November 10, 2004 Share Posted November 10, 2004 Originally posted by Darth333 Find the global you are looking for in the game - I don't have the game with me and can't check it ) and then use a script like this one: (This script checks the advancement of the Dustil plot) void main() { int nResult = GetGlobalNumber("KOR_DANEL"); int nPlot = GetGlobalBoolean("K_SWG_DUSTIL1"); if ((nResult == 6) && (nPlot == FALSE)) { do something } else { do something else } } Ok Darth333 I used the script you have above with different global boolean and global number results. Now my question is you used 6 as the nResult above where do you find this number for definitions or did you just choose a random number. Right now I can not get the script to compile. I added a #include "k_inc_debug" line at top and put all the other information in the proper fields I can PM you the code this evening if you would like. I should ask do I need globalcat.2da or global.jrl in the compile directory? I edited my script in the quote to make sure no one gets that mistake if they use it - Darth333 Link to comment Share on other sites More sharing options...
Darth333 Posted November 10, 2004 Share Posted November 10, 2004 Originally posted by darkkender Ok Darth333 I used the script you have above with different global boolean and global number results. Now my question is you used 6 as the nResult above where do you find this number for definitions or did you just choose a random number. Right now I can not get the script to compile. If you can't find it in the scripts, use tk102's Global variable Comparison tool to find out the right value. Save your game right before and after the event you want and then compare the globals of the 2 saved games with the the tool. I added a #include "k_inc_debug" line at top and put all the other information in the proper fields I can PM you the code this evening if you would like. I should ask do I need globalcat.2da or global.jrl in the compile directory? There is no need to include k_inc_debug or anything else in the code. and no, you don't compile .nss files with .2da files ( you can put them in the same directory but they will have no effect). You can PM me what you have Link to comment Share on other sites More sharing options...
Darkkender Posted November 10, 2004 Share Posted November 10, 2004 I'll PM the code tonight after work I'll also include the error I'm getting. I'll also run myself through to the spot in the game where it occurs and check variables that way. would kse also have those variables? Link to comment Share on other sites More sharing options...
Darth333 Posted November 10, 2004 Share Posted November 10, 2004 Originally posted by darkkender would kse also have those variables? You can change the variables with KSE. It's pretty good when you know exactly what you are looking for. However, it does not allow you to compare the variables between two saved games. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.