Acleacius Posted January 21, 2011 Share Posted January 21, 2011 I installed HK Remote as it didn't seem like it would conflict with anything. It will spawn HKs but they are not following, currently two on Nar Shaddaa they don't seem to despawn. Is there anyway to remove/delete an object while ingame with the console? Thanks for any tips. Edit:I wonder if it's possible to add an On and Off to the Shield slot item? Currently if you hit it a second time, it just spawns another HK. They should despawn when zoning according to the Readme. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted January 21, 2011 Share Posted January 21, 2011 I am taking a look at it right now... This is something I have had to say a few times recently... Please post questions about specific mods in that specific mods release thread! Holowan is for mod-making and WIPs, and does not need this sort of clutter - I selfishly say this because I want to be able to find questions I am asking or help answer questions of others, related to what we are working on. Link to comment Share on other sites More sharing options...
Acleacius Posted January 21, 2011 Author Share Posted January 21, 2011 Please post questions about specific mods in that specific mods release thread! Holowan is for mod-making and WIPs, and does not need this sort of clutter - I selfishly say this because I want to be able to find questions I am asking or help answer questions of others, related to what we are working on. Couldn't find one, the only thread found was the link I posted. Not only did I search the forums but did a Google search, also. So if you find one please link it, I would be glad to post there. It was very late/early in the morning if there is a thread, will be more careful in the future, posting half awake and half asleep! Last time I posted a General Question about a mod, in Taris Upper City Emporium and I couldn't find an official thread for, I was told not to post it there, heh. Thanks for any help. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted January 21, 2011 Share Posted January 21, 2011 Last time I posted a General Question about a mod, in Taris Upper City Emporium and I couldn't find an official thread for, I was told not to post it there, heh. I don't want that to be the case... I have the script in question, I will post it, but currently the logic seems sound. The filename in question from LR's source is lr_hk.nss. void SummonHK(string sHK, location lLoc) { if ((!GetIsObjectValid(GetObjectByTag(sHK))) [color=darkorange]&&[/color] (!GetIsObjectValid(GetObjectByTag("HK47")))) { CreateObject(OBJECT_TYPE_CREATURE, sHK, lLoc); } else { SendMessageToPC(OBJECT_SELF, "Hey! There is already a HK near you! No HK armies!"); } } void main () { object oNearest = GetNearestObject(OBJECT_TYPE_DOOR || OBJECT_TYPE_PLACEABLE, OBJECT_SELF); location lLoc = GetLocation(oNearest); SummonHK("lr_rem_hk", lLoc); } The conditional says "if there is no "sHK" or regular HK in party, spawn lr_rem_hk, the Puppet HK. My only thought is this... It is not necessary to use sHK in that place, we can use the actual tag (since we know it to be lr_rem_hk). I will test this as far as compilation goes, and if it does compile, you can test it. BRB. EDIT: I do not have TSL installed at the moment, unfortunately, so I cannot compile the new code. If someone will be so kind, perhaps they can compile this for you, or perhaps you can do so yourself with Ktool... I will walk you through it! ~snip It was not bad, but not good. Very little change, may do nothing at all, I think it might just fix it.... We shall see! EDIT2: Thinking about it, I doubt that will work. The parameter for the function SummonHK requires use of a sVar... a string, not an actual tag. The code is good I think.... EDIT 3: Well, I think actually that code I posted using the tag in that way would have been fine, as the other side of the OR was checking directly for a tag. Overall, I wanted to simplify (in my eyes) LR's code, and I think this will work at least equivalently, possibly better. void main() { object ONearest = GetNearestObject(OBJECT_TYPE_DOOR || OBJECT_TYPE_PLACEABLE, OBJECT_SELF); object oHK = GetObjectByTag("HK47"); object oPK = GetObjectByTag("lr_rem_hk"); location lLoc = GetLocation(oNearest); if ((!GetIsObjectValid(oPK)) [color=darkorange]&&[/color] (!GetIsObjectValid(oHK))) [color=darkorange]// Was ||[/color] { CreateObject(OBJECT_TYPE_CREATURE, oPK, lLoc); } else { SendMessageToPC(OBJECT_SELF, "Hey! There is already a HK near you! No HK armies!"); } } Edit#4: Ok.... thinking some more, perhaps the real issue is the wrong logical operator in the conditional. I think it should be &&, not ||, as in AND not OR. Reason: Translating the code into an english sentence helps: If there is no PuppetHK or there is no RealHK, spawn a PuppetHK. In this case, if either of the creatures does not exist, a new one is created, because an OR conditional is true if either side of the OR is true. It only takes one side, and we actually want both.... so that only if there are no HKs of any kind around, a PuppetHK will spawn. So, in english, the statement should be: "If there is no PuppetHK AND there is no RealHK, then spawn one. This thought experiment provided by too much coffee! So.... I am going to change that code again.... the version above will now be with && rather than ||, I will comment it. Link to comment Share on other sites More sharing options...
Acleacius Posted January 21, 2011 Author Share Posted January 21, 2011 Thanks for all your time and hard work Qui-Gon Glenn! The "and/or" issue makes perfect sense. This thought experiment provided by too much coffee! Yummy, caffeine! Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted January 21, 2011 Share Posted January 21, 2011 It was good exercise! My pleasure... did you compile it? My version I think is more elegant, but if it fails to compile, you could just change the operator in the original, since you followed the coffee-bender Glad to help! Link to comment Share on other sites More sharing options...
Acleacius Posted January 22, 2011 Author Share Posted January 22, 2011 I did read and learn how to compile it with KotOR Tool, overwrote it in the English folder, then reinstalled. Alas now it doesn't spawn any HK-47. I could have done something wrong, made sure I picked Kotor 2 script compling, so think I got that part correct. Thanks for all your help on this. Link to comment Share on other sites More sharing options...
Acleacius Posted January 22, 2011 Author Share Posted January 22, 2011 Trying to Compile with no luck. I read Darth333's post. When using Kotor Tool, I write the script Save As, then try to Compile. It says "Unable to Input" then gives the current directory structure to the file and destroys the the file. When I use the manual version "nwnnsscomp.exe" or "_CompileAll.bat", it says "Unable to Open Neverwinter" then pauses my DOS window with "Press any Key to Continue". It closes the window when any key is pressed. DoH!!! Link to comment Share on other sites More sharing options...
Acleacius Posted January 22, 2011 Author Share Posted January 22, 2011 Don't know how you Modelers and Skinners do this! Since I couldn't get any Compiling to function, with the KotOR Tool Scripter downloaded GMax. It won't let me look at a mdl file, downloaded NWMax. Loaded up a mdl, starts decompiling, then error "make sure you have "nwnmdlcomp". Downloaded it put mdl and "nwnmdlcomp.exe" in the same folder. Error Make sure you have "nwnmdlcomp"! Is this the time to start pulling hair out? Edit: Are there any programs that you can double click on to actually just open a .mdl file? Thanks. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted January 22, 2011 Share Posted January 22, 2011 Not yet.... I have a couple ideas as to why my script didn't work and why changing the operator in LR's will work. By declaring oPK and oHK and defining them, I made them valid objects immediately, so there is no way for the CreateObject to occur. This is why LR's code seemed so ungainly to me.... it needed to be to a certain extent. He used GetObjectByTag() inside of the if (), so that there did not need to be any declared valid object in the code, breaking it. So, the filename we need to make is lr_hk.nss. Step 1: Open LR's download folder, open the original lr_hk.nss, with notepad. Step 2: Change the operator in the original script, in the SummonHK function, in the if conditional, from || to && Step 3: Save as.... use save as, that way you can be sure it is still named as you like, then save. Step 4: Take the new lr_hk.nss and put it in your Override. Make sure that you see a file in your Override called nwscript.nss as well.... if it is not there, KTool will not be able to compile. Step 5: Start KTool, click on the TXT button, press Ctrl-O and then navigate through the GUI into your Override folder. Select lr_hk.nss Step 6: Go to the Script Tab, select Script is for TSL Step 7: Go to the Script Tab, select Compile. It should ask you for a filename. Select lr_hk.nss, click it so that it appears in the output file window, then simply change the middle 's' to a 'c' and then compile.... should be gravy, as LR's script compiled fine before, and we are only changing the logical operator. If this doesn't work, I will install TSL and figure it out... I need to get it installed again anyway! EDIT: But it really should work. Sleeping on it actually brought out the correct problem, I think. It must be the declared objects I made that botch my version of the script. EDIT 2: If you have a file in your override already called lr_hk.nss, remove it to another folder (marked "old scripts" or something) or just delete it. It will interfere with compilation by KT. Link to comment Share on other sites More sharing options...
Acleacius Posted January 22, 2011 Author Share Posted January 22, 2011 AHHH, in the Source folder, that's what those files are for! The compiling worked great, with the nss file, however I thinking this mod is borked. It still will spawn multiple HKs and they don't despawn when you zone. Also, they run up to you when you first spawn them BUT then won't follow you. Actually it's a great idea for a mod, guess it could be a conflict with another mod, wonder if the Improved/Modified AI is effecting it. Thanks for your help. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted January 22, 2011 Share Posted January 22, 2011 As for being borked... possible, glad I wasn't the maker! As for it being broken, and still spawning multiple HK's... that shouldn't be happening! Weird. As for the following behaviors, there are some later mods that have much better "follow me" scripts.... I think LR was very creative, but not a scripter per se, although who am I to talk?!?! It may be that the Improved AI mod is affecting things... Have you tried to spawn an HK while your party was in combat? That is what the modmaker intended this mod for... I wonder if the spawned HK joins the fight properly if there is one, or just watches from the sidelines? I see a few hours of screwing around coming on..... Link to comment Share on other sites More sharing options...
Acleacius Posted January 22, 2011 Author Share Posted January 22, 2011 Bah, ignore me. Your right it worked, you can only spawn one, good work! For some reason the first time the nss didn't save the changes. He still doesn't follow or despawn, going to check if I spawn him in a fight. He will fight in when spawned in a fight but he won't move after if he is still alive. I let him fight, till he took enough damage and he did despawn. Link to comment Share on other sites More sharing options...
Qui-Gon Glenn Posted January 22, 2011 Share Posted January 22, 2011 Bah, ignore me. Your right it worked, you can only spawn one, good work! For some reason the first time the nss didn't save the changes. Uh..... wait a minute....... I DID SOMETHING RIGHT????!??!!?!!?!??!?!?1111???!!one PS: Uh... congratulations Acleacius, you have modded today EDIT: Well, I guess this is a new WIP for me... I am going to make an improved version of this, all due credit to the quite talented Litl Ridl. Thank you Acleacius for the *request* of sorts Since you started this, hope you will test the new version for me when it is ready? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.